Skip to content

Commit c1f9932

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: sbp2: 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 <hch@lst.de> Link: https://lore.kernel.org/r/20240409143748.980206-14-hch@lst.de Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 8c9289e commit c1f9932

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/firewire/sbp2.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,8 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
15061506
return 0;
15071507
}
15081508

1509-
static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
1509+
static int sbp2_scsi_device_configure(struct scsi_device *sdev,
1510+
struct queue_limits *lim)
15101511
{
15111512
struct sbp2_logical_unit *lu = sdev->hostdata;
15121513

@@ -1532,7 +1533,7 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
15321533
sdev->start_stop_pwr_cond = 1;
15331534

15341535
if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
1535-
blk_queue_max_hw_sectors(sdev->request_queue, 128 * 1024 / 512);
1536+
lim->max_hw_sectors = 128 * 1024 / 512;
15361537

15371538
return 0;
15381539
}
@@ -1590,7 +1591,7 @@ static const struct scsi_host_template scsi_driver_template = {
15901591
.proc_name = "sbp2",
15911592
.queuecommand = sbp2_scsi_queuecommand,
15921593
.slave_alloc = sbp2_scsi_slave_alloc,
1593-
.slave_configure = sbp2_scsi_slave_configure,
1594+
.device_configure = sbp2_scsi_device_configure,
15941595
.eh_abort_handler = sbp2_scsi_abort,
15951596
.this_id = -1,
15961597
.sg_tablesize = SG_ALL,

0 commit comments

Comments
 (0)