Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Martin K. Petersen
c1f99322 8c9289e6

+4 -3
+4 -3
drivers/firewire/sbp2.c
··· 1506 1506 return 0; 1507 1507 } 1508 1508 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) 1510 1511 { 1511 1512 struct sbp2_logical_unit *lu = sdev->hostdata; 1512 1513 ··· 1533 1532 sdev->start_stop_pwr_cond = 1; 1534 1533 1535 1534 if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) 1536 - blk_queue_max_hw_sectors(sdev->request_queue, 128 * 1024 / 512); 1535 + lim->max_hw_sectors = 128 * 1024 / 512; 1537 1536 1538 1537 return 0; 1539 1538 } ··· 1591 1590 .proc_name = "sbp2", 1592 1591 .queuecommand = sbp2_scsi_queuecommand, 1593 1592 .slave_alloc = sbp2_scsi_slave_alloc, 1594 - .slave_configure = sbp2_scsi_slave_configure, 1593 + .device_configure = sbp2_scsi_device_configure, 1595 1594 .eh_abort_handler = sbp2_scsi_abort, 1596 1595 .this_id = -1, 1597 1596 .sg_tablesize = SG_ALL,