Skip to content

Commit 49515b7

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: Convert SCSI drivers to .sdev_configure()
The only difference between the .sdev_configure() and .slave_configure() methods is that the former accepts an additional 'limits' argument. Convert all SCSI drivers that define a .slave_configure() method to .sdev_configure(). This patch prepares for removing the .slave_configure() method. No functionality has been changed. Acked-by: Geoff Levand <[email protected]> # for ps3rom Acked-by: Khalid Aziz <[email protected]> # for the BusLogic driver Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 47c2e30 commit 49515b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+162
-121
lines changed

drivers/infiniband/ulp/srp/ib_srp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,7 +2844,8 @@ static int srp_target_alloc(struct scsi_target *starget)
28442844
return 0;
28452845
}
28462846

2847-
static int srp_slave_configure(struct scsi_device *sdev)
2847+
static int srp_sdev_configure(struct scsi_device *sdev,
2848+
struct queue_limits *lim)
28482849
{
28492850
struct Scsi_Host *shost = sdev->host;
28502851
struct srp_target_port *target = host_to_target(shost);
@@ -3067,7 +3068,7 @@ static const struct scsi_host_template srp_template = {
30673068
.name = "InfiniBand SRP initiator",
30683069
.proc_name = DRV_NAME,
30693070
.target_alloc = srp_target_alloc,
3070-
.slave_configure = srp_slave_configure,
3071+
.sdev_configure = srp_sdev_configure,
30713072
.info = srp_target_info,
30723073
.init_cmd_priv = srp_init_cmd_priv,
30733074
.exit_cmd_priv = srp_exit_cmd_priv,

drivers/message/fusion/mptfc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static const struct scsi_host_template mptfc_driver_template = {
114114
.queuecommand = mptfc_qcmd,
115115
.target_alloc = mptfc_target_alloc,
116116
.sdev_init = mptfc_sdev_init,
117-
.slave_configure = mptscsih_slave_configure,
117+
.sdev_configure = mptscsih_sdev_configure,
118118
.target_destroy = mptfc_target_destroy,
119119
.sdev_destroy = mptscsih_sdev_destroy,
120120
.change_queue_depth = mptscsih_change_queue_depth,

drivers/message/fusion/mptsas.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ mptsas_firmware_event_work(struct work_struct *work)
17101710

17111711

17121712
static int
1713-
mptsas_slave_configure(struct scsi_device *sdev)
1713+
mptsas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
17141714
{
17151715
struct Scsi_Host *host = sdev->host;
17161716
MPT_SCSI_HOST *hd = shost_priv(host);
@@ -1736,7 +1736,7 @@ mptsas_slave_configure(struct scsi_device *sdev)
17361736
mptsas_add_device_component_starget(ioc, scsi_target(sdev));
17371737

17381738
out:
1739-
return mptscsih_slave_configure(sdev);
1739+
return mptscsih_sdev_configure(sdev, lim);
17401740
}
17411741

17421742
static int
@@ -2006,7 +2006,7 @@ static const struct scsi_host_template mptsas_driver_template = {
20062006
.queuecommand = mptsas_qcmd,
20072007
.target_alloc = mptsas_target_alloc,
20082008
.sdev_init = mptsas_sdev_init,
2009-
.slave_configure = mptsas_slave_configure,
2009+
.sdev_configure = mptsas_sdev_configure,
20102010
.target_destroy = mptsas_target_destroy,
20112011
.sdev_destroy = mptscsih_sdev_destroy,
20122012
.change_queue_depth = mptscsih_change_queue_depth,

drivers/message/fusion/mptscsih.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
23992399
* Return non-zero if fails.
24002400
*/
24012401
int
2402-
mptscsih_slave_configure(struct scsi_device *sdev)
2402+
mptscsih_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
24032403
{
24042404
struct Scsi_Host *sh = sdev->host;
24052405
VirtTarget *vtarget;
@@ -3303,7 +3303,7 @@ EXPORT_SYMBOL(mptscsih_show_info);
33033303
EXPORT_SYMBOL(mptscsih_info);
33043304
EXPORT_SYMBOL(mptscsih_qcmd);
33053305
EXPORT_SYMBOL(mptscsih_sdev_destroy);
3306-
EXPORT_SYMBOL(mptscsih_slave_configure);
3306+
EXPORT_SYMBOL(mptscsih_sdev_configure);
33073307
EXPORT_SYMBOL(mptscsih_abort);
33083308
EXPORT_SYMBOL(mptscsih_dev_reset);
33093309
EXPORT_SYMBOL(mptscsih_target_reset);

drivers/message/fusion/mptscsih.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt);
117117
extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel,
118118
u8 id, u64 lun, int ctx2abort, ulong timeout);
119119
extern void mptscsih_sdev_destroy(struct scsi_device *device);
120-
extern int mptscsih_slave_configure(struct scsi_device *device);
120+
extern int mptscsih_sdev_configure(struct scsi_device *device,
121+
struct queue_limits *lim);
121122
extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
122123
extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
123124
extern int mptscsih_target_reset(struct scsi_cmnd * SCpnt);

drivers/message/fusion/mptspi.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,15 +746,16 @@ static int mptspi_sdev_init(struct scsi_device *sdev)
746746
return 0;
747747
}
748748

749-
static int mptspi_slave_configure(struct scsi_device *sdev)
749+
static int mptspi_sdev_configure(struct scsi_device *sdev,
750+
struct queue_limits *lim)
750751
{
751752
struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host);
752753
VirtTarget *vtarget = scsi_target(sdev)->hostdata;
753754
int ret;
754755

755756
mptspi_initTarget(hd, vtarget, sdev);
756757

757-
ret = mptscsih_slave_configure(sdev);
758+
ret = mptscsih_sdev_configure(sdev, lim);
758759

759760
if (ret)
760761
return ret;
@@ -829,7 +830,7 @@ static const struct scsi_host_template mptspi_driver_template = {
829830
.queuecommand = mptspi_qcmd,
830831
.target_alloc = mptspi_target_alloc,
831832
.sdev_init = mptspi_sdev_init,
832-
.slave_configure = mptspi_slave_configure,
833+
.sdev_configure = mptspi_sdev_configure,
833834
.target_destroy = mptspi_target_destroy,
834835
.sdev_destroy = mptspi_sdev_destroy,
835836
.change_queue_depth = mptscsih_change_queue_depth,

drivers/s390/scsi/zfcp_scsi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ static void zfcp_scsi_sdev_destroy(struct scsi_device *sdev)
4949
put_device(&zfcp_sdev->port->dev);
5050
}
5151

52-
static int zfcp_scsi_slave_configure(struct scsi_device *sdp)
52+
static int zfcp_scsi_sdev_configure(struct scsi_device *sdp,
53+
struct queue_limits *lim)
5354
{
5455
if (sdp->tagged_supported)
5556
scsi_change_queue_depth(sdp, default_depth);
@@ -428,7 +429,7 @@ static const struct scsi_host_template zfcp_scsi_host_template = {
428429
.eh_target_reset_handler = zfcp_scsi_eh_target_reset_handler,
429430
.eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler,
430431
.sdev_init = zfcp_scsi_sdev_init,
431-
.slave_configure = zfcp_scsi_slave_configure,
432+
.sdev_configure = zfcp_scsi_sdev_configure,
432433
.sdev_destroy = zfcp_scsi_sdev_destroy,
433434
.change_queue_depth = scsi_change_queue_depth,
434435
.host_reset = zfcp_scsi_sysfs_host_reset,

drivers/scsi/3w-9xxx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,13 +1968,14 @@ static char *twa_string_lookup(twa_message_type *table, unsigned int code)
19681968
} /* End twa_string_lookup() */
19691969

19701970
/* This function gets called when a disk is coming on-line */
1971-
static int twa_slave_configure(struct scsi_device *sdev)
1971+
static int twa_sdev_configure(struct scsi_device *sdev,
1972+
struct queue_limits *lim)
19721973
{
19731974
/* Force 60 second timeout */
19741975
blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
19751976

19761977
return 0;
1977-
} /* End twa_slave_configure() */
1978+
} /* End twa_sdev_configure() */
19781979

19791980
static const struct scsi_host_template driver_template = {
19801981
.module = THIS_MODULE,
@@ -1984,7 +1985,7 @@ static const struct scsi_host_template driver_template = {
19841985
.bios_param = twa_scsi_biosparam,
19851986
.change_queue_depth = scsi_change_queue_depth,
19861987
.can_queue = TW_Q_LENGTH-2,
1987-
.slave_configure = twa_slave_configure,
1988+
.sdev_configure = twa_sdev_configure,
19881989
.this_id = -1,
19891990
.sg_tablesize = TW_APACHE_MAX_SGL_LENGTH,
19901991
.max_sectors = TW_MAX_SECTORS,

drivers/scsi/3w-sas.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,13 +1523,14 @@ static void twl_shutdown(struct pci_dev *pdev)
15231523
} /* End twl_shutdown() */
15241524

15251525
/* This function configures unit settings when a unit is coming on-line */
1526-
static int twl_slave_configure(struct scsi_device *sdev)
1526+
static int twl_sdev_configure(struct scsi_device *sdev,
1527+
struct queue_limits *lim)
15271528
{
15281529
/* Force 60 second timeout */
15291530
blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
15301531

15311532
return 0;
1532-
} /* End twl_slave_configure() */
1533+
} /* End twl_sdev_configure() */
15331534

15341535
static const struct scsi_host_template driver_template = {
15351536
.module = THIS_MODULE,
@@ -1539,7 +1540,7 @@ static const struct scsi_host_template driver_template = {
15391540
.bios_param = twl_scsi_biosparam,
15401541
.change_queue_depth = scsi_change_queue_depth,
15411542
.can_queue = TW_Q_LENGTH-2,
1542-
.slave_configure = twl_slave_configure,
1543+
.sdev_configure = twl_sdev_configure,
15431544
.this_id = -1,
15441545
.sg_tablesize = TW_LIBERATOR_MAX_SGL_LENGTH,
15451546
.max_sectors = TW_MAX_SECTORS,

drivers/scsi/3w-xxxx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
Initialize queues correctly when loading with no valid units.
173173
1.02.00.034 - Fix tw_decode_bits() to handle multiple errors.
174174
Add support for user configurable cmd_per_lun.
175-
Add support for sht->slave_configure().
175+
Add support for sht->sdev_configure().
176176
1.02.00.035 - Improve tw_allocate_memory() memory allocation.
177177
Fix tw_chrdev_ioctl() to sleep correctly.
178178
1.02.00.036 - Increase character ioctl timeout to 60 seconds.
@@ -2221,13 +2221,13 @@ static void tw_shutdown(struct pci_dev *pdev)
22212221
} /* End tw_shutdown() */
22222222

22232223
/* This function gets called when a disk is coming online */
2224-
static int tw_slave_configure(struct scsi_device *sdev)
2224+
static int tw_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
22252225
{
22262226
/* Force 60 second timeout */
22272227
blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
22282228

22292229
return 0;
2230-
} /* End tw_slave_configure() */
2230+
} /* End tw_sdev_configure() */
22312231

22322232
static const struct scsi_host_template driver_template = {
22332233
.module = THIS_MODULE,
@@ -2237,7 +2237,7 @@ static const struct scsi_host_template driver_template = {
22372237
.bios_param = tw_scsi_biosparam,
22382238
.change_queue_depth = scsi_change_queue_depth,
22392239
.can_queue = TW_Q_LENGTH-2,
2240-
.slave_configure = tw_slave_configure,
2240+
.sdev_configure = tw_sdev_configure,
22412241
.this_id = -1,
22422242
.sg_tablesize = TW_MAX_SGL_LENGTH,
22432243
.max_sectors = TW_MAX_SECTORS,

0 commit comments

Comments
 (0)