Skip to content

Commit 9ca2dc2

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: pmcraid: 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-17-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 c8bc839 commit 9ca2dc2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

drivers/scsi/pmcraid.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
197197
}
198198

199199
/**
200-
* pmcraid_slave_configure - Configures a SCSI device
200+
* pmcraid_device_configure - Configures a SCSI device
201201
* @scsi_dev: scsi device struct
202+
* @lim: queue limits
202203
*
203204
* This function is executed by SCSI mid layer just after a device is first
204205
* scanned (i.e. it has responded to an INQUIRY). For VSET resources, the
@@ -209,7 +210,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
209210
* Return value:
210211
* 0 on success
211212
*/
212-
static int pmcraid_slave_configure(struct scsi_device *scsi_dev)
213+
static int pmcraid_device_configure(struct scsi_device *scsi_dev,
214+
struct queue_limits *lim)
213215
{
214216
struct pmcraid_resource_entry *res = scsi_dev->hostdata;
215217

@@ -233,8 +235,7 @@ static int pmcraid_slave_configure(struct scsi_device *scsi_dev)
233235
scsi_dev->allow_restart = 1;
234236
blk_queue_rq_timeout(scsi_dev->request_queue,
235237
PMCRAID_VSET_IO_TIMEOUT);
236-
blk_queue_max_hw_sectors(scsi_dev->request_queue,
237-
PMCRAID_VSET_MAX_SECTORS);
238+
lim->max_hw_sectors = PMCRAID_VSET_MAX_SECTORS;
238239
}
239240

240241
/*
@@ -3668,7 +3669,7 @@ static const struct scsi_host_template pmcraid_host_template = {
36683669
.eh_host_reset_handler = pmcraid_eh_host_reset_handler,
36693670

36703671
.slave_alloc = pmcraid_slave_alloc,
3671-
.slave_configure = pmcraid_slave_configure,
3672+
.device_configure = pmcraid_device_configure,
36723673
.slave_destroy = pmcraid_slave_destroy,
36733674
.change_queue_depth = pmcraid_change_queue_depth,
36743675
.can_queue = PMCRAID_MAX_IO_CMD,

0 commit comments

Comments
 (0)