Skip to content

Commit a92041b

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: pata_macio: Switch to using ->device_configure
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hannes Reinecke <[email protected]> Acked-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 3cfedd5 commit a92041b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/ata/pata_macio.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ static void pata_macio_reset_hw(struct pata_macio_priv *priv, int resume)
796796
/* Hook the standard slave config to fixup some HW related alignment
797797
* restrictions
798798
*/
799-
static int pata_macio_slave_config(struct scsi_device *sdev)
799+
static int pata_macio_device_configure(struct scsi_device *sdev,
800+
struct queue_limits *lim)
800801
{
801802
struct ata_port *ap = ata_shost_to_port(sdev->host);
802803
struct pata_macio_priv *priv = ap->private_data;
@@ -814,7 +815,7 @@ static int pata_macio_slave_config(struct scsi_device *sdev)
814815

815816
/* OHare has issues with non cache aligned DMA on some chipsets */
816817
if (priv->kind == controller_ohare) {
817-
blk_queue_update_dma_alignment(sdev->request_queue, 31);
818+
lim->dma_alignment = 31;
818819
blk_queue_update_dma_pad(sdev->request_queue, 31);
819820

820821
/* Tell the world about it */
@@ -829,7 +830,7 @@ static int pata_macio_slave_config(struct scsi_device *sdev)
829830
/* Shasta and K2 seem to have "issues" with reads ... */
830831
if (priv->kind == controller_sh_ata6 || priv->kind == controller_k2_ata6) {
831832
/* Allright these are bad, apply restrictions */
832-
blk_queue_update_dma_alignment(sdev->request_queue, 15);
833+
lim->dma_alignment = 15;
833834
blk_queue_update_dma_pad(sdev->request_queue, 15);
834835

835836
/* We enable MWI and hack cache line size directly here, this
@@ -918,7 +919,7 @@ static const struct scsi_host_template pata_macio_sht = {
918919
* use 64K minus 256
919920
*/
920921
.max_segment_size = MAX_DBDMA_SEG,
921-
.slave_configure = pata_macio_slave_config,
922+
.device_configure = pata_macio_device_configure,
922923
.sdev_groups = ata_common_sdev_groups,
923924
.can_queue = ATA_DEF_QUEUE,
924925
.tag_alloc_policy = BLK_TAG_ALLOC_RR,

0 commit comments

Comments
 (0)