Skip to content

Commit f65eb76

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: hptiop: 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-15-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 c1f9932 commit f65eb76

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/scsi/hptiop.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,11 +1151,11 @@ static struct attribute *hptiop_host_attrs[] = {
11511151

11521152
ATTRIBUTE_GROUPS(hptiop_host);
11531153

1154-
static int hptiop_slave_config(struct scsi_device *sdev)
1154+
static int hptiop_device_configure(struct scsi_device *sdev,
1155+
struct queue_limits *lim)
11551156
{
11561157
if (sdev->type == TYPE_TAPE)
1157-
blk_queue_max_hw_sectors(sdev->request_queue, 8192);
1158-
1158+
lim->max_hw_sectors = 8192;
11591159
return 0;
11601160
}
11611161

@@ -1168,7 +1168,7 @@ static const struct scsi_host_template driver_template = {
11681168
.emulated = 0,
11691169
.proc_name = driver_name,
11701170
.shost_groups = hptiop_host_groups,
1171-
.slave_configure = hptiop_slave_config,
1171+
.device_configure = hptiop_device_configure,
11721172
.this_id = -1,
11731173
.change_queue_depth = hptiop_adjust_disk_queue_depth,
11741174
.cmd_size = sizeof(struct hpt_cmd_priv),

0 commit comments

Comments
 (0)