Skip to content

Commit c8bc839

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: ipr: 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-16-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 f65eb76 commit c8bc839

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/scsi/ipr.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4769,15 +4769,17 @@ static void ipr_slave_destroy(struct scsi_device *sdev)
47694769
}
47704770

47714771
/**
4772-
* ipr_slave_configure - Configure a SCSI device
4772+
* ipr_device_configure - Configure a SCSI device
47734773
* @sdev: scsi device struct
4774+
* @lim: queue limits
47744775
*
47754776
* This function configures the specified scsi device.
47764777
*
47774778
* Return value:
47784779
* 0 on success
47794780
**/
4780-
static int ipr_slave_configure(struct scsi_device *sdev)
4781+
static int ipr_device_configure(struct scsi_device *sdev,
4782+
struct queue_limits *lim)
47814783
{
47824784
struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
47834785
struct ipr_resource_entry *res;
@@ -4798,7 +4800,7 @@ static int ipr_slave_configure(struct scsi_device *sdev)
47984800
sdev->no_report_opcodes = 1;
47994801
blk_queue_rq_timeout(sdev->request_queue,
48004802
IPR_VSET_RW_TIMEOUT);
4801-
blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
4803+
lim->max_hw_sectors = IPR_VSET_MAX_SECTORS;
48024804
}
48034805
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
48044806

@@ -6397,7 +6399,7 @@ static const struct scsi_host_template driver_template = {
63976399
.eh_device_reset_handler = ipr_eh_dev_reset,
63986400
.eh_host_reset_handler = ipr_eh_host_reset,
63996401
.slave_alloc = ipr_slave_alloc,
6400-
.slave_configure = ipr_slave_configure,
6402+
.device_configure = ipr_device_configure,
64016403
.slave_destroy = ipr_slave_destroy,
64026404
.scan_finished = ipr_scan_finished,
64036405
.target_destroy = ipr_target_destroy,

0 commit comments

Comments
 (0)