From patchwork Mon Jul 6 19:39:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 11646755 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 446731398 for ; Mon, 6 Jul 2020 19:39:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13C38206E9 for ; Mon, 6 Jul 2020 19:39:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="pbCM9zZG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726702AbgGFTjf (ORCPT ); Mon, 6 Jul 2020 15:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgGFTjf (ORCPT ); Mon, 6 Jul 2020 15:39:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A804CC061755 for ; Mon, 6 Jul 2020 12:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Jk+yv6QaYw2+fGXxuoHte5i1Rdyfr/ajUjQKMT6zTL4=; b=pbCM9zZG/UT44NaOXh6PwRihUK UXLjwG2nSaWvzD2hur1qJYpViq+vkQ/zBlElsL71ZsAKv4LdInW2RwGEJEzTNXPrkXMDxK5I/QnVa EjzfSZMUXWKHCA1OTIqk8U3fSdt4+mhiMKIooaM+0SkVKEGNuH7TT0QXZPHNpvf2gE5iqrYuyfoZi /tExhtWla2XONN3K8SXNjV5OQdvPO+zGyRehzQlm+36aiH2xu8pQH5wF1/32nXqnY8wXcp1a5iCRC DiBbqkefQzDfRP1rP8f/MX/tAXybmlG3cZacy8p6EWM+40WWVCYIzJtEnymyg0/lT6a5Qt2ompU5B FMle/irg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsWxY-0001oG-4u; Mon, 06 Jul 2020 19:39:24 +0000 From: "Matthew Wilcox (Oracle)" To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: "Matthew Wilcox (Oracle)" , linux-scsi@vger.kernel.org Subject: [PATCH 1/3] scsi: Rename slave_alloc to sdev_prep Date: Mon, 6 Jul 2020 20:39:18 +0100 Message-Id: <20200706193920.6897-2-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200706193920.6897-1-willy@infradead.org> References: <20200706193920.6897-1-willy@infradead.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org slave_alloc is badly named because it doesn't actually do the allocation. It's a notification to the driver that it should prepare its internal data structures for this device so it is ready to handle commands. Signed-off-by: Matthew Wilcox (Oracle) --- Documentation/scsi/scsi_mid_low_api.rst | 26 +++++++++---------- drivers/firewire/sbp2.c | 4 +-- drivers/message/fusion/mptfc.c | 10 +++---- drivers/message/fusion/mptsas.c | 6 ++--- drivers/message/fusion/mptspi.c | 6 ++--- drivers/s390/scsi/zfcp_scsi.c | 6 ++--- drivers/s390/scsi/zfcp_sysfs.c | 2 +- drivers/s390/scsi/zfcp_unit.c | 2 +- drivers/scsi/53c700.c | 6 ++--- drivers/scsi/aha152x.c | 2 +- drivers/scsi/aic7xxx/aic79xx_osm.c | 4 +-- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 +-- drivers/scsi/bfa/bfad_im.c | 12 ++++----- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- drivers/scsi/csiostor/csio_scsi.c | 6 ++--- drivers/scsi/dc395x.c | 6 ++--- drivers/scsi/esp_scsi.c | 4 +-- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fnic/fnic_main.c | 4 +-- drivers/scsi/hpsa.c | 6 ++--- drivers/scsi/ibmvscsi/ibmvfc.c | 6 ++--- drivers/scsi/imm.c | 2 +- drivers/scsi/ipr.c | 12 ++++----- drivers/scsi/libfc/fc_fcp.c | 6 ++--- drivers/scsi/lpfc/lpfc_scsi.c | 12 ++++----- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +-- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 +++--- drivers/scsi/myrb.c | 12 ++++----- drivers/scsi/myrs.c | 4 +-- drivers/scsi/ncr53c8xx.c | 4 +-- drivers/scsi/pmcraid.c | 8 +++--- drivers/scsi/ppa.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 4 +-- drivers/scsi/qla4xxx/ql4_os.c | 6 ++--- drivers/scsi/scsi_debug.c | 6 ++--- drivers/scsi/scsi_scan.c | 10 +++---- drivers/scsi/smartpqi/smartpqi_init.c | 4 +-- drivers/scsi/snic/snic_main.c | 6 ++--- drivers/scsi/storvsc_drv.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 6 ++--- drivers/scsi/ufs/ufshcd.c | 6 ++--- drivers/scsi/virtio_scsi.c | 2 +- drivers/staging/rts5208/rtsx.c | 4 +-- .../staging/unisys/visorhba/visorhba_main.c | 6 ++--- drivers/usb/image/microtek.c | 4 +-- drivers/usb/storage/scsiglue.c | 6 ++--- drivers/usb/storage/uas.c | 4 +-- include/scsi/libfc.h | 2 +- include/scsi/libsas.h | 2 +- include/scsi/scsi_device.h | 4 +-- include/scsi/scsi_host.h | 4 +-- 51 files changed, 144 insertions(+), 144 deletions(-) diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst index 5358bc10689e..246495f11da5 100644 --- a/Documentation/scsi/scsi_mid_low_api.rst +++ b/Documentation/scsi/scsi_mid_low_api.rst @@ -112,9 +112,9 @@ Those usages in group c) should be handled with care, especially in a that are shared with the mid level and other layers. All functions defined within an LLD and all data defined at file scope -should be static. For example the slave_alloc() function in an LLD +should be static. For example the sdev_prep() function in an LLD called "xxx" could be defined as -``static int xxx_slave_alloc(struct scsi_device * sdev) { /* code */ }`` +``static int xxx_sdev_prep(struct scsi_device * sdev) { /* code */ }`` .. [#] the scsi_host_alloc() function is a replacement for the rather vaguely named scsi_register() function in most situations. @@ -149,18 +149,18 @@ scsi devices of which only the first 2 respond:: scsi_add_host() ----> scsi_scan_host() -------+ | - slave_alloc() + sdev_prep() slave_configure() --> scsi_change_queue_depth() | - slave_alloc() + sdev_prep() slave_configure() | - slave_alloc() *** + sdev_prep() *** slave_destroy() *** *** For scsi devices that the mid level tries to scan but do not - respond, a slave_alloc(), slave_destroy() pair is called. + respond, a sdev_prep(), slave_destroy() pair is called. If the LLD wants to adjust the default queue settings, it can invoke scsi_change_queue_depth() in its slave_configure() routine. @@ -202,7 +202,7 @@ An LLD can use this sequence to make the mid level aware of a SCSI device:: ===-------------------=========--------------------===------ scsi_add_device() ------+ | - slave_alloc() + sdev_prep() slave_configure() [--> scsi_change_queue_depth()] In a similar fashion, an LLD may become aware that a SCSI device has been @@ -221,7 +221,7 @@ upper layers with this sequence:: slave_destroy() It may be useful for an LLD to keep track of struct scsi_device instances -(a pointer is passed as the parameter to slave_alloc() and +(a pointer is passed as the parameter to sdev_prep() and slave_configure() callbacks). Such instances are "owned" by the mid-level. struct scsi_device instances are freed after slave_destroy(). @@ -337,7 +337,7 @@ Details:: * bus scan when an HBA is added (i.e. scsi_scan_host()). So it * should only be called if the HBA becomes aware of a new scsi * device (lu) after scsi_scan_host() has completed. If successful - * this call can lead to slave_alloc() and slave_configure() callbacks + * this call can lead to sdev_prep() and slave_configure() callbacks * into the LLD. * * Defined in: drivers/scsi/scsi_scan.c @@ -663,7 +663,7 @@ Summary: - ioctl - driver can respond to ioctls - proc_info - supports /proc/scsi/{driver_name}/{host_no} - queuecommand - queue scsi command, invoke 'done' on completion - - slave_alloc - prior to any commands being sent to a new device + - sdev_prep - prior to any commands being sent to a new device - slave_configure - driver fine tuning for given device after attach - slave_destroy - given device is about to be shut down @@ -966,7 +966,7 @@ Details:: /** - * slave_alloc - prior to any commands being sent to a new device + * sdev_prep - prior to any commands being sent to a new device * (i.e. just prior to scan) this call is made * @sdp: pointer to new device (about to be scanned) * @@ -987,7 +987,7 @@ Details:: * * Optionally defined in: LLD **/ - int slave_alloc(struct scsi_device *sdp) + int sdev_prep(struct scsi_device *sdp) /** @@ -1029,7 +1029,7 @@ Details:: * by this driver for given device should be freed now. No further * commands will be sent for this sdp instance. [However the device * could be re-attached in the future in which case a new instance - * of struct scsi_device would be supplied by future slave_alloc() + * of struct scsi_device would be supplied by future sdev_prep() * and slave_configure() calls.] * * Optionally defined in: LLD diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 4d5054211550..5b1cba288550 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1488,7 +1488,7 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost, return retval; } -static int sbp2_scsi_slave_alloc(struct scsi_device *sdev) +static int sbp2_scsi_sdev_prep(struct scsi_device *sdev) { struct sbp2_logical_unit *lu = sdev->hostdata; @@ -1588,7 +1588,7 @@ static struct scsi_host_template scsi_driver_template = { .name = "SBP-2 IEEE-1394", .proc_name = "sbp2", .queuecommand = sbp2_scsi_queuecommand, - .slave_alloc = sbp2_scsi_slave_alloc, + .sdev_prep = sbp2_scsi_sdev_prep, .slave_configure = sbp2_scsi_slave_configure, .eh_abort_handler = sbp2_scsi_abort, .this_id = -1, diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 4314a3352b96..2717d65931ad 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -96,7 +96,7 @@ static u8 mptfcTaskCtx = MPT_MAX_PROTOCOL_DRIVERS; static u8 mptfcInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; static int mptfc_target_alloc(struct scsi_target *starget); -static int mptfc_slave_alloc(struct scsi_device *sdev); +static int mptfc_sdev_prep(struct scsi_device *sdev); static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt); static void mptfc_target_destroy(struct scsi_target *starget); static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); @@ -113,7 +113,7 @@ static struct scsi_host_template mptfc_driver_template = { .info = mptscsih_info, .queuecommand = mptfc_qcmd, .target_alloc = mptfc_target_alloc, - .slave_alloc = mptfc_slave_alloc, + .sdev_prep = mptfc_sdev_prep, .slave_configure = mptscsih_slave_configure, .target_destroy = mptfc_target_destroy, .slave_destroy = mptscsih_slave_destroy, @@ -466,7 +466,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) /* * if already mapped, remap here. If not mapped, * target_alloc will allocate vtarget and map, - * slave_alloc will fill in vdevice from vtarget. + * sdev_prep will fill in vdevice from vtarget. */ if (ri->starget) { vtarget = ri->starget->hostdata; @@ -594,7 +594,7 @@ mptfc_dump_lun_info(MPT_ADAPTER *ioc, struct fc_rport *rport, struct scsi_device * Init memory once per LUN. */ static int -mptfc_slave_alloc(struct scsi_device *sdev) +mptfc_sdev_prep(struct scsi_device *sdev) { MPT_SCSI_HOST *hd; VirtTarget *vtarget; @@ -614,7 +614,7 @@ mptfc_slave_alloc(struct scsi_device *sdev) vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL); if (!vdevice) { - printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", + printk(MYIOC_s_ERR_FMT "sdev_prep kmalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); return -ENOMEM; } diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 6a79cd0ebe2b..d6f27c90878d 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -1839,7 +1839,7 @@ mptsas_target_destroy(struct scsi_target *starget) static int -mptsas_slave_alloc(struct scsi_device *sdev) +mptsas_sdev_prep(struct scsi_device *sdev) { struct Scsi_Host *host = sdev->host; MPT_SCSI_HOST *hd = shost_priv(host); @@ -1852,7 +1852,7 @@ mptsas_slave_alloc(struct scsi_device *sdev) vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL); if (!vdevice) { - printk(MYIOC_s_ERR_FMT "slave_alloc kzalloc(%zd) FAILED!\n", + printk(MYIOC_s_ERR_FMT "sdev_prep kzalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); return -ENOMEM; } @@ -1977,7 +1977,7 @@ static struct scsi_host_template mptsas_driver_template = { .info = mptscsih_info, .queuecommand = mptsas_qcmd, .target_alloc = mptsas_target_alloc, - .slave_alloc = mptsas_slave_alloc, + .sdev_prep = mptsas_sdev_prep, .slave_configure = mptsas_slave_configure, .target_destroy = mptsas_target_destroy, .slave_destroy = mptscsih_slave_destroy, diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index eabc4de5816c..633858a445ce 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -713,7 +713,7 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd, mptspi_read_parameters(sdev->sdev_target); } -static int mptspi_slave_alloc(struct scsi_device *sdev) +static int mptspi_sdev_prep(struct scsi_device *sdev) { MPT_SCSI_HOST *hd = shost_priv(sdev->host); VirtTarget *vtarget; @@ -727,7 +727,7 @@ static int mptspi_slave_alloc(struct scsi_device *sdev) vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL); if (!vdevice) { - printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", + printk(MYIOC_s_ERR_FMT "sdev_prep kmalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); return -ENOMEM; } @@ -828,7 +828,7 @@ static struct scsi_host_template mptspi_driver_template = { .info = mptscsih_info, .queuecommand = mptspi_qcmd, .target_alloc = mptspi_target_alloc, - .slave_alloc = mptspi_slave_alloc, + .sdev_prep = mptspi_sdev_prep, .slave_configure = mptspi_slave_configure, .target_destroy = mptspi_target_destroy, .slave_destroy = mptspi_slave_destroy, diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index d58bf79892f2..a603bdd7b7c5 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -41,7 +41,7 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdev) { struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); - /* if previous slave_alloc returned early, there is nothing to do */ + /* if previous sdev_prep returned early, there is nothing to do */ if (!zfcp_sdev->port) return; @@ -110,7 +110,7 @@ int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt) return ret; } -static int zfcp_scsi_slave_alloc(struct scsi_device *sdev) +static int zfcp_scsi_sdev_prep(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); struct zfcp_adapter *adapter = @@ -427,7 +427,7 @@ static struct scsi_host_template zfcp_scsi_host_template = { .eh_device_reset_handler = zfcp_scsi_eh_device_reset_handler, .eh_target_reset_handler = zfcp_scsi_eh_target_reset_handler, .eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler, - .slave_alloc = zfcp_scsi_slave_alloc, + .sdev_prep = zfcp_scsi_sdev_prep, .slave_configure = zfcp_scsi_slave_configure, .slave_destroy = zfcp_scsi_slave_destroy, .change_queue_depth = scsi_change_queue_depth, diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c index 8d9662e8b717..790321919146 100644 --- a/drivers/s390/scsi/zfcp_sysfs.c +++ b/drivers/s390/scsi/zfcp_sysfs.c @@ -284,7 +284,7 @@ static bool zfcp_sysfs_port_in_use(struct zfcp_port *const port) goto unlock_host_lock; } - /* port is about to be removed, so no more unit_add or slave_alloc */ + /* port is about to be removed, so no more unit_add or sdev_prep */ zfcp_sysfs_port_set_removing(port); in_use = false; diff --git a/drivers/s390/scsi/zfcp_unit.c b/drivers/s390/scsi/zfcp_unit.c index e67bf7388cae..008b483eb10e 100644 --- a/drivers/s390/scsi/zfcp_unit.c +++ b/drivers/s390/scsi/zfcp_unit.c @@ -170,7 +170,7 @@ int zfcp_unit_add(struct zfcp_port *port, u64 fcp_lun) write_unlock_irq(&port->unit_list_lock); /* * lock order: shost->scan_mutex before zfcp_sysfs_port_units_mutex - * due to zfcp_unit_scsi_scan() => zfcp_scsi_slave_alloc() + * due to zfcp_unit_scsi_scan() => zfcp_scsi_sdev_prep() */ mutex_unlock(&zfcp_sysfs_port_units_mutex); diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 461b3babb601..9410a7a3873a 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -159,7 +159,7 @@ STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); STATIC void NCR_700_chip_setup(struct Scsi_Host *host); STATIC void NCR_700_chip_reset(struct Scsi_Host *host); -STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt); +STATIC int NCR_700_sdev_prep(struct scsi_device *SDpnt); STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); @@ -308,7 +308,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN; tpnt->slave_configure = NCR_700_slave_configure; tpnt->slave_destroy = NCR_700_slave_destroy; - tpnt->slave_alloc = NCR_700_slave_alloc; + tpnt->sdev_prep = NCR_700_sdev_prep; tpnt->change_queue_depth = NCR_700_change_queue_depth; if(tpnt->name == NULL) @@ -2006,7 +2006,7 @@ NCR_700_set_offset(struct scsi_target *STp, int offset) } STATIC int -NCR_700_slave_alloc(struct scsi_device *SDp) +NCR_700_sdev_prep(struct scsi_device *SDp) { SDp->hostdata = kzalloc(sizeof(struct NCR_700_Device_Parameters), GFP_KERNEL); diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 90f97df1c42a..df29b8167c03 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -2910,7 +2910,7 @@ static struct scsi_host_template aha152x_driver_template = { .this_id = 7, .sg_tablesize = SG_ALL, .dma_boundary = PAGE_SIZE - 1, - .slave_alloc = aha152x_adjust_queue, + .sdev_prep = aha152x_adjust_queue, }; #if !defined(AHA152X_PCMCIA) diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index dc4fe334efd0..5f41d1ec10ee 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -669,7 +669,7 @@ ahd_linux_target_destroy(struct scsi_target *starget) } static int -ahd_linux_slave_alloc(struct scsi_device *sdev) +ahd_linux_sdev_prep(struct scsi_device *sdev) { struct ahd_softc *ahd = *((struct ahd_softc **)sdev->host->hostdata); @@ -913,7 +913,7 @@ struct scsi_host_template aic79xx_driver_template = { .this_id = -1, .max_sectors = 8192, .cmd_per_lun = 2, - .slave_alloc = ahd_linux_slave_alloc, + .sdev_prep = ahd_linux_sdev_prep, .slave_configure = ahd_linux_slave_configure, .target_alloc = ahd_linux_target_alloc, .target_destroy = ahd_linux_target_destroy, diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 2edfa0594f18..4350a941e060 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -637,7 +637,7 @@ ahc_linux_target_destroy(struct scsi_target *starget) } static int -ahc_linux_slave_alloc(struct scsi_device *sdev) +ahc_linux_sdev_prep(struct scsi_device *sdev) { struct ahc_softc *ahc = *((struct ahc_softc **)sdev->host->hostdata); @@ -800,7 +800,7 @@ struct scsi_host_template aic7xxx_driver_template = { .this_id = -1, .max_sectors = 8192, .cmd_per_lun = 2, - .slave_alloc = ahc_linux_slave_alloc, + .sdev_prep = ahc_linux_sdev_prep, .slave_configure = ahc_linux_slave_configure, .target_alloc = ahc_linux_target_alloc, .target_destroy = ahc_linux_target_destroy, diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 22f06be2606f..bd860b6b8d46 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -25,7 +25,7 @@ struct scsi_transport_template *bfad_im_scsi_transport_template; struct scsi_transport_template *bfad_im_scsi_vport_transport_template; static void bfad_im_itnim_work_handler(struct work_struct *work); static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd); -static int bfad_im_slave_alloc(struct scsi_device *sdev); +static int bfad_im_sdev_prep(struct scsi_device *sdev); static void bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, struct bfad_itnim_s *itnim); @@ -802,7 +802,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { .eh_device_reset_handler = bfad_im_reset_lun_handler, .eh_target_reset_handler = bfad_im_reset_target_handler, - .slave_alloc = bfad_im_slave_alloc, + .sdev_prep = bfad_im_sdev_prep, .slave_configure = bfad_im_slave_configure, .slave_destroy = bfad_im_slave_destroy, @@ -824,7 +824,7 @@ struct scsi_host_template bfad_im_vport_template = { .eh_device_reset_handler = bfad_im_reset_lun_handler, .eh_target_reset_handler = bfad_im_reset_target_handler, - .slave_alloc = bfad_im_slave_alloc, + .sdev_prep = bfad_im_sdev_prep, .slave_configure = bfad_im_slave_configure, .slave_destroy = bfad_im_slave_destroy, @@ -916,7 +916,7 @@ bfad_get_itnim(struct bfad_im_port_s *im_port, int id) } /* - * Function is invoked from the SCSI Host Template slave_alloc() entry point. + * Function is invoked from the SCSI Host Template sdev_prep() entry point. * Has the logic to query the LUN Mask database to check if this LUN needs to * be made visible to the SCSI mid-layer or not. * @@ -947,10 +947,10 @@ bfad_im_check_if_make_lun_visible(struct scsi_device *sdev, } /* - * Scsi_Host template entry slave_alloc + * Scsi_Host template entry sdev_prep */ static int -bfad_im_slave_alloc(struct scsi_device *sdev) +bfad_im_sdev_prep(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); struct bfad_itnim_data_s *itnim_data; diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 0e33324e16f5..97b022a324fb 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2968,7 +2968,7 @@ static struct scsi_host_template bnx2fc_shost_template = { .eh_device_reset_handler = bnx2fc_eh_device_reset, /* lun reset */ .eh_target_reset_handler = bnx2fc_eh_target_reset, /* tgt reset */ .eh_host_reset_handler = fc_eh_host_reset, - .slave_alloc = fc_slave_alloc, + .sdev_prep = fc_sdev_prep, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, .cmd_per_lun = 3, diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 00cf33573136..0ee7d39bde93 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -2219,7 +2219,7 @@ csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd) } static int -csio_slave_alloc(struct scsi_device *sdev) +csio_sdev_prep(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -2270,7 +2270,7 @@ struct scsi_host_template csio_fcoe_shost_template = { .eh_timed_out = fc_eh_timed_out, .eh_abort_handler = csio_eh_abort_handler, .eh_device_reset_handler = csio_eh_lun_reset_handler, - .slave_alloc = csio_slave_alloc, + .sdev_prep = csio_sdev_prep, .slave_configure = csio_slave_configure, .slave_destroy = csio_slave_destroy, .scan_finished = csio_scan_finished, @@ -2289,7 +2289,7 @@ struct scsi_host_template csio_fcoe_shost_vport_template = { .eh_timed_out = fc_eh_timed_out, .eh_abort_handler = csio_eh_abort_handler, .eh_device_reset_handler = csio_eh_lun_reset_handler, - .slave_alloc = csio_slave_alloc, + .sdev_prep = csio_sdev_prep, .slave_configure = csio_slave_configure, .slave_destroy = csio_slave_destroy, .scan_finished = csio_scan_finished, diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index e95f5b3bef4d..6b22777c123f 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -3752,13 +3752,13 @@ static void adapter_remove_and_free_all_devices(struct AdapterCtlBlk* acb) /** - * dc395x_slave_alloc - Called by the scsi mid layer to tell us about a new + * dc395x_sdev_prep - Called by the scsi mid layer to tell us about a new * scsi device that we need to deal with. We allocate a new device and then * insert that device into the adapters device list. * * @scsi_device: The new scsi device that we need to handle. **/ -static int dc395x_slave_alloc(struct scsi_device *scsi_device) +static int dc395x_sdev_prep(struct scsi_device *scsi_device) { struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata; struct DeviceCtlBlk *dcb; @@ -4589,7 +4589,7 @@ static struct scsi_host_template dc395x_driver_template = { .show_info = dc395x_show_info, .name = DC395X_BANNER " " DC395X_VERSION, .queuecommand = dc395x_queue_command, - .slave_alloc = dc395x_slave_alloc, + .sdev_prep = dc395x_sdev_prep, .slave_destroy = dc395x_slave_destroy, .can_queue = DC395x_MAX_CAN_QUEUE, .this_id = 7, diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 89afa31e33cb..37471f82921a 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -2452,7 +2452,7 @@ static void esp_target_destroy(struct scsi_target *starget) tp->starget = NULL; } -static int esp_slave_alloc(struct scsi_device *dev) +static int esp_sdev_prep(struct scsi_device *dev) { struct esp *esp = shost_priv(dev->host); struct esp_target_data *tp = &esp->target[dev->id]; @@ -2678,7 +2678,7 @@ struct scsi_host_template scsi_esp_template = { .queuecommand = esp_queuecommand, .target_alloc = esp_target_alloc, .target_destroy = esp_target_destroy, - .slave_alloc = esp_slave_alloc, + .sdev_prep = esp_sdev_prep, .slave_configure = esp_slave_configure, .slave_destroy = esp_slave_destroy, .eh_abort_handler = esp_eh_abort_handler, diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index cb41d166e0c0..4a9622738526 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -269,7 +269,7 @@ static struct scsi_host_template fcoe_shost_template = { .eh_abort_handler = fc_eh_abort, .eh_device_reset_handler = fc_eh_device_reset, .eh_host_reset_handler = fc_eh_host_reset, - .slave_alloc = fc_slave_alloc, + .sdev_prep = fc_sdev_prep, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, .cmd_per_lun = 3, diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 7910b573bacb..8dffb152e718 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -96,7 +96,7 @@ static struct libfc_function_template fnic_transport_template = { .exch_mgr_reset = fnic_exch_mgr_reset }; -static int fnic_slave_alloc(struct scsi_device *sdev) +static int fnic_sdev_prep(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -115,7 +115,7 @@ static struct scsi_host_template fnic_host_template = { .eh_abort_handler = fnic_abort_cmd, .eh_device_reset_handler = fnic_device_reset, .eh_host_reset_handler = fnic_host_reset, - .slave_alloc = fnic_slave_alloc, + .sdev_prep = fnic_sdev_prep, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, .cmd_per_lun = 3, diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 81d0414e2117..4e4d3045da7a 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -283,7 +283,7 @@ static int hpsa_scan_finished(struct Scsi_Host *sh, static int hpsa_change_queue_depth(struct scsi_device *sdev, int qdepth); static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd); -static int hpsa_slave_alloc(struct scsi_device *sdev); +static int hpsa_sdev_prep(struct scsi_device *sdev); static int hpsa_slave_configure(struct scsi_device *sdev); static void hpsa_slave_destroy(struct scsi_device *sdev); @@ -974,7 +974,7 @@ static struct scsi_host_template hpsa_driver_template = { .this_id = -1, .eh_device_reset_handler = hpsa_eh_device_reset_handler, .ioctl = hpsa_ioctl, - .slave_alloc = hpsa_slave_alloc, + .sdev_prep = hpsa_sdev_prep, .slave_configure = hpsa_slave_configure, .slave_destroy = hpsa_slave_destroy, #ifdef CONFIG_COMPAT @@ -2100,7 +2100,7 @@ static struct hpsa_scsi_dev_t *lookup_hpsa_scsi_dev(struct ctlr_info *h, return NULL; } -static int hpsa_slave_alloc(struct scsi_device *sdev) +static int hpsa_sdev_prep(struct scsi_device *sdev) { struct hpsa_scsi_dev_t *sd = NULL; unsigned long flags; diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 77f4d37d5bd6..1038689057f0 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -2854,7 +2854,7 @@ static int ibmvfc_scan_finished(struct Scsi_Host *shost, unsigned long time) } /** - * ibmvfc_slave_alloc - Setup the device's task set value + * ibmvfc_sdev_prep - Setup the device's task set value * @sdev: struct scsi_device device to configure * * Set the device's task set value so that error handling works as @@ -2863,7 +2863,7 @@ static int ibmvfc_scan_finished(struct Scsi_Host *shost, unsigned long time) * Returns: * 0 on success / -ENXIO if device does not exist **/ -static int ibmvfc_slave_alloc(struct scsi_device *sdev) +static int ibmvfc_sdev_prep(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -3117,7 +3117,7 @@ static struct scsi_host_template driver_template = { .eh_device_reset_handler = ibmvfc_eh_device_reset_handler, .eh_target_reset_handler = ibmvfc_eh_target_reset_handler, .eh_host_reset_handler = ibmvfc_eh_host_reset_handler, - .slave_alloc = ibmvfc_slave_alloc, + .sdev_prep = ibmvfc_sdev_prep, .slave_configure = ibmvfc_slave_configure, .target_alloc = ibmvfc_target_alloc, .scan_finished = ibmvfc_scan_finished, diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 2519fb7aee51..9839b23c684b 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -1113,7 +1113,7 @@ static struct scsi_host_template imm_template = { .this_id = 7, .sg_tablesize = SG_ALL, .can_queue = 1, - .slave_alloc = imm_adjust_queue, + .sdev_prep = imm_adjust_queue, }; /*************************************************************************** diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 7d86f4ca266c..2920b4c48896 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4970,7 +4970,7 @@ static int ipr_slave_configure(struct scsi_device *sdev) } /** - * ipr_ata_slave_alloc - Prepare for commands to a SATA device + * ipr_ata_sdev_prep - Prepare for commands to a SATA device * @sdev: scsi device struct * * This function initializes an ATA port so that future commands @@ -4979,7 +4979,7 @@ static int ipr_slave_configure(struct scsi_device *sdev) * Return value: * 0 on success **/ -static int ipr_ata_slave_alloc(struct scsi_device *sdev) +static int ipr_ata_sdev_prep(struct scsi_device *sdev) { struct ipr_sata_port *sata_port = NULL; int rc = -ENXIO; @@ -5001,7 +5001,7 @@ static int ipr_ata_slave_alloc(struct scsi_device *sdev) } /** - * ipr_slave_alloc - Prepare for commands to a device. + * ipr_sdev_prep - Prepare for commands to a device. * @sdev: scsi device struct * * This function saves a pointer to the resource entry @@ -5012,7 +5012,7 @@ static int ipr_ata_slave_alloc(struct scsi_device *sdev) * Return value: * 0 on success / -ENXIO if device does not exist **/ -static int ipr_slave_alloc(struct scsi_device *sdev) +static int ipr_sdev_prep(struct scsi_device *sdev) { struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; struct ipr_resource_entry *res; @@ -5034,7 +5034,7 @@ static int ipr_slave_alloc(struct scsi_device *sdev) rc = 0; if (ipr_is_gata(res)) { spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); - return ipr_ata_slave_alloc(sdev); + return ipr_ata_sdev_prep(sdev); } } @@ -6735,7 +6735,7 @@ static struct scsi_host_template driver_template = { .eh_abort_handler = ipr_eh_abort, .eh_device_reset_handler = ipr_eh_dev_reset, .eh_host_reset_handler = ipr_eh_host_reset, - .slave_alloc = ipr_slave_alloc, + .sdev_prep = ipr_sdev_prep, .slave_configure = ipr_slave_configure, .slave_destroy = ipr_slave_destroy, .scan_finished = ipr_scan_finished, diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index bf2cc9656e19..85ff7e18aa0c 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -2226,13 +2226,13 @@ int fc_eh_host_reset(struct scsi_cmnd *sc_cmd) EXPORT_SYMBOL(fc_eh_host_reset); /** - * fc_slave_alloc() - Configure the queue depth of a Scsi_Host + * fc_sdev_prep() - Configure the queue depth of a Scsi_Host * @sdev: The SCSI device that identifies the SCSI host * * Configures queue depth based on host's cmd_per_len. If not set * then we use the libfc default. */ -int fc_slave_alloc(struct scsi_device *sdev) +int fc_sdev_prep(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -2242,7 +2242,7 @@ int fc_slave_alloc(struct scsi_device *sdev) scsi_change_queue_depth(sdev, FC_FCP_DFLT_QUEUE_DEPTH); return 0; } -EXPORT_SYMBOL(fc_slave_alloc); +EXPORT_SYMBOL(fc_sdev_prep); /** * fc_fcp_destory() - Tear down the FCP layer for a given local port diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 5e802c8b22a9..6974665f5ade 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5493,7 +5493,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) } /** - * lpfc_slave_alloc - scsi_host_template slave_alloc entry point + * lpfc_sdev_prep - scsi_host_template sdev_prep entry point * @sdev: Pointer to scsi_device. * * This routine populates the cmds_per_lun count + 2 scsi_bufs into this host's @@ -5506,7 +5506,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) * 0 - Success **/ static int -lpfc_slave_alloc(struct scsi_device *sdev) +lpfc_sdev_prep(struct scsi_device *sdev) { struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; struct lpfc_hba *phba = vport->phba; @@ -6006,7 +6006,7 @@ lpfc_no_handler(struct scsi_cmnd *cmnd) } static int -lpfc_no_slave(struct scsi_device *sdev) +lpfc_no_sdev(struct scsi_device *sdev) { return -ENODEV; } @@ -6022,8 +6022,8 @@ struct scsi_host_template lpfc_template_nvme = { .eh_target_reset_handler = lpfc_no_handler, .eh_bus_reset_handler = lpfc_no_handler, .eh_host_reset_handler = lpfc_no_handler, - .slave_alloc = lpfc_no_slave, - .slave_configure = lpfc_no_slave, + .sdev_prep = lpfc_no_sdev, + .slave_configure = lpfc_no_sdev, .scan_finished = lpfc_scan_finished, .this_id = -1, .sg_tablesize = 1, @@ -6046,7 +6046,7 @@ struct scsi_host_template lpfc_template = { .eh_target_reset_handler = lpfc_target_reset_handler, .eh_bus_reset_handler = lpfc_bus_reset_handler, .eh_host_reset_handler = lpfc_host_reset_handler, - .slave_alloc = lpfc_slave_alloc, + .sdev_prep = lpfc_sdev_prep, .slave_configure = lpfc_slave_configure, .slave_destroy = lpfc_slave_destroy, .scan_finished = lpfc_scan_finished, diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 00668335c2af..7f0f058c4a80 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -2071,7 +2071,7 @@ static int megasas_slave_configure(struct scsi_device *sdev) return 0; } -static int megasas_slave_alloc(struct scsi_device *sdev) +static int megasas_sdev_prep(struct scsi_device *sdev) { u16 pd_index = 0; struct megasas_instance *instance ; @@ -3414,7 +3414,7 @@ static struct scsi_host_template megasas_template = { .name = "Avago SAS based MegaRAID driver", .proc_name = "megaraid_sas", .slave_configure = megasas_slave_configure, - .slave_alloc = megasas_slave_alloc, + .sdev_prep = megasas_sdev_prep, .slave_destroy = megasas_slave_destroy, .queuecommand = megasas_queue_command, .eh_target_reset_handler = megasas_reset_target, diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 08fc4b381056..b46a5d6c3f7e 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -1799,14 +1799,14 @@ scsih_target_destroy(struct scsi_target *starget) } /** - * scsih_slave_alloc - device add routine + * scsih_sdev_prep - device add routine * @sdev: scsi device struct * * Return: 0 if ok. Any other return is assumed to be an error and * the device is ignored. */ static int -scsih_slave_alloc(struct scsi_device *sdev) +scsih_sdev_prep(struct scsi_device *sdev) { struct Scsi_Host *shost; struct MPT3SAS_ADAPTER *ioc; @@ -10427,7 +10427,7 @@ static struct scsi_host_template mpt2sas_driver_template = { .proc_name = MPT2SAS_DRIVER_NAME, .queuecommand = scsih_qcmd, .target_alloc = scsih_target_alloc, - .slave_alloc = scsih_slave_alloc, + .sdev_prep = scsih_sdev_prep, .slave_configure = scsih_slave_configure, .target_destroy = scsih_target_destroy, .slave_destroy = scsih_slave_destroy, @@ -10465,7 +10465,7 @@ static struct scsi_host_template mpt3sas_driver_template = { .proc_name = MPT3SAS_DRIVER_NAME, .queuecommand = scsih_qcmd, .target_alloc = scsih_target_alloc, - .slave_alloc = scsih_slave_alloc, + .sdev_prep = scsih_sdev_prep, .slave_configure = scsih_slave_configure, .target_destroy = scsih_target_destroy, .slave_destroy = scsih_slave_destroy, diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index d4bd31a75b9d..2d3ffd79076a 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -1647,7 +1647,7 @@ static int myrb_queuecommand(struct Scsi_Host *shost, return myrb_pthru_queuecommand(shost, scmd); } -static int myrb_ldev_slave_alloc(struct scsi_device *sdev) +static int myrb_ldev_sdev_prep(struct scsi_device *sdev) { struct myrb_hba *cb = shost_priv(sdev->host); struct myrb_ldev_info *ldev_info; @@ -1693,7 +1693,7 @@ static int myrb_ldev_slave_alloc(struct scsi_device *sdev) return 0; } -static int myrb_pdev_slave_alloc(struct scsi_device *sdev) +static int myrb_pdev_sdev_prep(struct scsi_device *sdev) { struct myrb_hba *cb = shost_priv(sdev->host); struct myrb_pdev_state *pdev_info; @@ -1729,7 +1729,7 @@ static int myrb_pdev_slave_alloc(struct scsi_device *sdev) return 0; } -static int myrb_slave_alloc(struct scsi_device *sdev) +static int myrb_sdev_prep(struct scsi_device *sdev) { if (sdev->channel > myrb_logical_channel(sdev->host)) return -ENXIO; @@ -1738,9 +1738,9 @@ static int myrb_slave_alloc(struct scsi_device *sdev) return -ENXIO; if (sdev->channel == myrb_logical_channel(sdev->host)) - return myrb_ldev_slave_alloc(sdev); + return myrb_ldev_sdev_prep(sdev); - return myrb_pdev_slave_alloc(sdev); + return myrb_pdev_sdev_prep(sdev); } static int myrb_slave_configure(struct scsi_device *sdev) @@ -2232,7 +2232,7 @@ struct scsi_host_template myrb_template = { .proc_name = "myrb", .queuecommand = myrb_queuecommand, .eh_host_reset_handler = myrb_host_reset, - .slave_alloc = myrb_slave_alloc, + .sdev_prep = myrb_sdev_prep, .slave_configure = myrb_slave_configure, .slave_destroy = myrb_slave_destroy, .bios_param = myrb_biosparam, diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 5c5666491c2e..6e8882bda8b8 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1790,7 +1790,7 @@ static unsigned short myrs_translate_ldev(struct myrs_hba *cs, return ldev_num; } -static int myrs_slave_alloc(struct scsi_device *sdev) +static int myrs_sdev_prep(struct scsi_device *sdev) { struct myrs_hba *cs = shost_priv(sdev->host); unsigned char status; @@ -1925,7 +1925,7 @@ struct scsi_host_template myrs_template = { .proc_name = "myrs", .queuecommand = myrs_queuecommand, .eh_host_reset_handler = myrs_host_reset, - .slave_alloc = myrs_slave_alloc, + .sdev_prep = myrs_sdev_prep, .slave_configure = myrs_slave_configure, .slave_destroy = myrs_slave_destroy, .cmd_size = sizeof(struct myrs_cmdblk), diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index f88adab3f913..ee727b1511a1 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -7952,7 +7952,7 @@ static void __init ncr_getclock (struct ncb *np, int mult) /*===================== LINUX ENTRY POINTS SECTION ==========================*/ -static int ncr53c8xx_slave_alloc(struct scsi_device *device) +static int ncr53c8xx_sdev_prep(struct scsi_device *device) { struct Scsi_Host *host = device->host; struct ncb *np = ((struct host_data *) host->hostdata)->ncb; @@ -8299,7 +8299,7 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt, tpnt->queuecommand = ncr53c8xx_queue_command; tpnt->slave_configure = ncr53c8xx_slave_configure; - tpnt->slave_alloc = ncr53c8xx_slave_alloc; + tpnt->sdev_prep = ncr53c8xx_sdev_prep; tpnt->eh_bus_reset_handler = ncr53c8xx_bus_reset; tpnt->can_queue = SCSI_NCR_CAN_QUEUE; tpnt->this_id = 7; diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index aa9ae2ae8579..e160c128d3e8 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -123,7 +123,7 @@ MODULE_DEVICE_TABLE(pci, pmcraid_pci_table); /** - * pmcraid_slave_alloc - Prepare for commands to a device + * pmcraid_sdev_prep - Prepare for commands to a device * @scsi_dev: scsi device struct * * This function is called by mid-layer prior to sending any command to the new @@ -134,7 +134,7 @@ MODULE_DEVICE_TABLE(pci, pmcraid_pci_table); * Return value: * 0 on success / -ENXIO if device does not exist */ -static int pmcraid_slave_alloc(struct scsi_device *scsi_dev) +static int pmcraid_sdev_prep(struct scsi_device *scsi_dev) { struct pmcraid_resource_entry *temp, *res = NULL; struct pmcraid_instance *pinstance; @@ -250,7 +250,7 @@ static int pmcraid_slave_configure(struct scsi_device *scsi_dev) * @scsi_dev: scsi device struct * * This is called by mid-layer before removing a device. Pointer assignments - * done in pmcraid_slave_alloc will be reset to NULL here. + * done in pmcraid_sdev_prep will be reset to NULL here. * * Return value * none @@ -4120,7 +4120,7 @@ static struct scsi_host_template pmcraid_host_template = { .eh_device_reset_handler = pmcraid_eh_device_reset_handler, .eh_host_reset_handler = pmcraid_eh_host_reset_handler, - .slave_alloc = pmcraid_slave_alloc, + .sdev_prep = pmcraid_sdev_prep, .slave_configure = pmcraid_slave_configure, .slave_destroy = pmcraid_slave_destroy, .change_queue_depth = pmcraid_change_queue_depth, diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index a406cc825426..fabcb71a17aa 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c @@ -980,7 +980,7 @@ static struct scsi_host_template ppa_template = { .this_id = -1, .sg_tablesize = SG_ALL, .can_queue = 1, - .slave_alloc = ppa_adjust_queue, + .sdev_prep = ppa_adjust_queue, }; /*************************************************************************** diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 9b59f032a569..807db94cf148 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1838,7 +1838,7 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) } static int -qla2xxx_slave_alloc(struct scsi_device *sdev) +qla2xxx_sdev_prep(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -7767,7 +7767,7 @@ struct scsi_host_template qla2xxx_driver_template = { .slave_configure = qla2xxx_slave_configure, - .slave_alloc = qla2xxx_slave_alloc, + .sdev_prep = qla2xxx_sdev_prep, .slave_destroy = qla2xxx_slave_destroy, .scan_finished = qla2xxx_scan_finished, .scan_start = qla2xxx_scan_start, diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 5dc697ce8b5d..c4d2b8f3700d 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -161,7 +161,7 @@ static int qla4xxx_eh_abort(struct scsi_cmnd *cmd); static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd); static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd); static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd); -static int qla4xxx_slave_alloc(struct scsi_device *device); +static int qla4xxx_sdev_prep(struct scsi_device *device); static umode_t qla4_attr_is_visible(int param_type, int param); static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); @@ -200,7 +200,7 @@ static struct scsi_host_template qla4xxx_driver_template = { .eh_host_reset_handler = qla4xxx_eh_host_reset, .eh_timed_out = qla4xxx_eh_cmd_timed_out, - .slave_alloc = qla4xxx_slave_alloc, + .sdev_prep = qla4xxx_sdev_prep, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, @@ -9030,7 +9030,7 @@ static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha) } } -static int qla4xxx_slave_alloc(struct scsi_device *sdev) +static int qla4xxx_sdev_prep(struct scsi_device *sdev) { struct iscsi_cls_session *cls_sess; struct iscsi_session *sess; diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 4692f5b6ad13..bb914e2e7554 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4969,10 +4969,10 @@ static struct sdebug_dev_info *find_build_dev_info(struct scsi_device *sdev) return open_devip; } -static int scsi_debug_slave_alloc(struct scsi_device *sdp) +static int scsi_debug_sdev_prep(struct scsi_device *sdp) { if (sdebug_verbose) - pr_info("slave_alloc <%u %u %u %llu>\n", + pr_info("sdev_prep <%u %u %u %llu>\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); return 0; } @@ -7221,7 +7221,7 @@ static struct scsi_host_template sdebug_driver_template = { .proc_name = sdebug_proc_name, .name = "SCSI DEBUG", .info = scsi_debug_info, - .slave_alloc = scsi_debug_slave_alloc, + .sdev_prep = scsi_debug_sdev_prep, .slave_configure = scsi_debug_slave_configure, .slave_destroy = scsi_debug_slave_destroy, .ioctl = scsi_debug_ioctl, diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index f2437a7570ce..ccd9fb11d305 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -202,7 +202,7 @@ static void scsi_unlock_floptical(struct scsi_device *sdev, * scsi_alloc_sdev - allocate and setup a scsi_Device * @starget: which target to allocate a &scsi_device for * @lun: which lun - * @hostdata: usually NULL and set by ->slave_alloc instead + * @hostdata: usually NULL and set by ->sdev_prep instead * * Description: * Allocate, initialize for io, and return a pointer to a scsi_Device. @@ -246,7 +246,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, sdev->sdev_gendev.parent = get_device(&starget->dev); sdev->sdev_target = starget; - /* usually NULL and set by ->slave_alloc instead */ + /* usually NULL and set by ->sdev_prep instead */ sdev->hostdata = hostdata; /* if the device needs this changing, it may do so in the @@ -281,11 +281,11 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, scsi_sysfs_device_initialize(sdev); - if (shost->hostt->slave_alloc) { - ret = shost->hostt->slave_alloc(sdev); + if (shost->hostt->sdev_prep) { + ret = shost->hostt->sdev_prep(sdev); if (ret) { /* - * if LLDD reports slave not present, don't clutter + * if LLDD reports sdev not present, don't clutter * console with alloc failure messages */ if (ret == -ENXIO) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index cd157f11eb22..ec3bf36b874d 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -5778,7 +5778,7 @@ static int pqi_eh_device_reset_handler(struct scsi_cmnd *scmd) return rc; } -static int pqi_slave_alloc(struct scsi_device *sdev) +static int pqi_sdev_prep(struct scsi_device *sdev) { struct pqi_scsi_dev *device; unsigned long flags; @@ -6500,7 +6500,7 @@ static struct scsi_host_template pqi_driver_template = { .this_id = -1, .eh_device_reset_handler = pqi_eh_device_reset_handler, .ioctl = pqi_ioctl, - .slave_alloc = pqi_slave_alloc, + .sdev_prep = pqi_sdev_prep, .map_queues = pqi_map_queues, .sdev_attrs = pqi_sdev_attrs, .shost_attrs = pqi_shost_attrs, diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index 14f4ce665e58..f74fa7fdbffc 100644 --- a/drivers/scsi/snic/snic_main.c +++ b/drivers/scsi/snic/snic_main.c @@ -56,11 +56,11 @@ module_param(snic_max_qdepth, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(snic_max_qdepth, "Queue depth to report for each LUN"); /* - * snic_slave_alloc : callback function to SCSI Mid Layer, called on + * snic_sdev_prep : callback function to SCSI Mid Layer, called on * scsi device initialization. */ static int -snic_slave_alloc(struct scsi_device *sdev) +snic_sdev_prep(struct scsi_device *sdev) { struct snic_tgt *tgt = starget_to_tgt(scsi_target(sdev)); @@ -121,7 +121,7 @@ static struct scsi_host_template snic_host_template = { .eh_abort_handler = snic_abort_cmd, .eh_device_reset_handler = snic_device_reset, .eh_host_reset_handler = snic_host_reset, - .slave_alloc = snic_slave_alloc, + .sdev_prep = snic_sdev_prep, .slave_configure = snic_slave_configure, .change_queue_depth = snic_change_queue_depth, .this_id = -1, diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 7b686268ad19..5dba63b52e49 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1769,7 +1769,7 @@ static struct scsi_host_template scsi_driver = { .eh_host_reset_handler = storvsc_host_reset_handler, .proc_name = "storvsc_host", .eh_timed_out = storvsc_eh_timed_out, - .slave_alloc = storvsc_device_alloc, + .sdev_prep = storvsc_device_alloc, .slave_configure = storvsc_device_configure, .cmd_per_lun = 2048, .this_id = -1, diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 2ca018ce796f..4d59783ed465 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -721,7 +721,7 @@ static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags) } } -static int sym53c8xx_slave_alloc(struct scsi_device *sdev) +static int sym53c8xx_sdev_prep(struct scsi_device *sdev) { struct sym_hcb *np = sym_get_hcb(sdev->host); struct sym_tcb *tp = &np->target[sdev->id]; @@ -824,7 +824,7 @@ static void sym53c8xx_slave_destroy(struct scsi_device *sdev) struct sym_lcb *lp = sym_lp(tp, sdev->lun); unsigned long flags; - /* if slave_alloc returned before allocating a sym_lcb, return */ + /* if sdev_prep returned before allocating a sym_lcb, return */ if (!lp) return; @@ -1639,7 +1639,7 @@ static struct scsi_host_template sym2_template = { .name = "sym53c8xx", .info = sym53c8xx_info, .queuecommand = sym53c8xx_queue_command, - .slave_alloc = sym53c8xx_slave_alloc, + .sdev_prep = sym53c8xx_sdev_prep, .slave_configure = sym53c8xx_slave_configure, .slave_destroy = sym53c8xx_slave_destroy, .eh_abort_handler = sym53c8xx_eh_abort_handler, diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 59358bb75014..58cd8a609b31 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4607,12 +4607,12 @@ static inline void ufshcd_get_lu_power_on_wp_status(struct ufs_hba *hba, } /** - * ufshcd_slave_alloc - handle initial SCSI device configurations + * ufshcd_sdev_prep - handle initial SCSI device configurations * @sdev: pointer to SCSI device * * Returns success */ -static int ufshcd_slave_alloc(struct scsi_device *sdev) +static int ufshcd_sdev_prep(struct scsi_device *sdev) { struct ufs_hba *hba; @@ -7489,7 +7489,7 @@ static struct scsi_host_template ufshcd_driver_template = { .name = UFSHCD, .proc_name = UFSHCD, .queuecommand = ufshcd_queuecommand, - .slave_alloc = ufshcd_slave_alloc, + .sdev_prep = ufshcd_sdev_prep, .slave_configure = ufshcd_slave_configure, .slave_destroy = ufshcd_slave_destroy, .change_queue_depth = ufshcd_change_queue_depth, diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 0e0910c5b942..fecc7bd5299a 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -737,7 +737,7 @@ static struct scsi_host_template virtscsi_host_template = { .eh_abort_handler = virtscsi_abort, .eh_device_reset_handler = virtscsi_device_reset, .eh_timed_out = virtscsi_eh_timed_out, - .slave_alloc = virtscsi_device_alloc, + .sdev_prep = virtscsi_device_alloc, .dma_boundary = UINT_MAX, .map_queues = virtscsi_map_queues, diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index be0053c795b7..562f1b4bc159 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -57,7 +57,7 @@ static const char *host_info(struct Scsi_Host *host) return "SCSI emulation for PCI-Express Mass Storage devices"; } -static int slave_alloc(struct scsi_device *sdev) +static int sdev_prep(struct scsi_device *sdev) { /* * Set the INQUIRY transfer length to 36. We don't use any of @@ -217,7 +217,7 @@ static struct scsi_host_template rtsx_host_template = { /* unknown initiator id */ .this_id = -1, - .slave_alloc = slave_alloc, + .sdev_prep = sdev_prep, .slave_configure = slave_configure, /* lots of sg segments can be handled */ diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 99c57ceeb357..b6023fcc7908 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -579,7 +579,7 @@ static DEF_SCSI_QCMD(visorhba_queue_command) #endif /* - * visorhba_slave_alloc - Called when new disk is discovered + * visorhba_sdev_prep - Called when new disk is discovered * @scsidev: New disk * * Create a new visordisk_info structure and add it to our @@ -587,7 +587,7 @@ static DEF_SCSI_QCMD(visorhba_queue_command) * * Return: 0 on success, -ENOMEM on failure. */ -static int visorhba_slave_alloc(struct scsi_device *scsidev) +static int visorhba_sdev_prep(struct scsi_device *scsidev) { /* this is called by the midlayer before scan for new devices -- * LLD can alloc any struct & do init if needed. @@ -643,7 +643,7 @@ static struct scsi_host_template visorhba_driver_template = { .can_queue = visorhba_MAX_CMNDS, .sg_tablesize = 64, .this_id = -1, - .slave_alloc = visorhba_slave_alloc, + .sdev_prep = visorhba_sdev_prep, .slave_destroy = visorhba_slave_destroy, }; diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index 360416680e82..4cb6124b4d18 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -318,7 +318,7 @@ static inline void mts_urb_abort(struct mts_desc* desc) { usb_kill_urb( desc->urb ); } -static int mts_slave_alloc (struct scsi_device *s) +static int mts_sdev_prep (struct scsi_device *s) { s->inquiry_len = 0x24; return 0; @@ -628,7 +628,7 @@ static struct scsi_host_template mts_scsi_host_template = { .can_queue = 1, .this_id = -1, .emulated = 1, - .slave_alloc = mts_slave_alloc, + .sdev_prep = mts_sdev_prep, .slave_configure = mts_slave_configure, .max_sectors= 256, /* 128 K */ }; diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index f4c2359abb1b..8bd17467a55e 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -65,7 +65,7 @@ static const char* host_info(struct Scsi_Host *host) return us->scsi_name; } -static int slave_alloc (struct scsi_device *sdev) +static int sdev_prep (struct scsi_device *sdev) { struct us_data *us = host_to_us(sdev->host); @@ -140,7 +140,7 @@ static int slave_configure(struct scsi_device *sdev) blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH); /* - * We can't put these settings in slave_alloc() because that gets + * We can't put these settings in sdev_prep() because that gets * called before the device type is known. Consequently these * settings can't be overridden via the scsi devinfo mechanism. */ @@ -619,7 +619,7 @@ static const struct scsi_host_template usb_stor_host_template = { /* unknown initiator id */ .this_id = -1, - .slave_alloc = slave_alloc, + .sdev_prep = sdev_prep, .slave_configure = slave_configure, .target_alloc = target_alloc, diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d592071119ba..329d1c26b710 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -813,7 +813,7 @@ static int uas_target_alloc(struct scsi_target *starget) return 0; } -static int uas_slave_alloc(struct scsi_device *sdev) +static int uas_sdev_prep(struct scsi_device *sdev) { struct uas_dev_info *devinfo = (struct uas_dev_info *)sdev->host->hostdata; @@ -892,7 +892,7 @@ static struct scsi_host_template uas_host_template = { .name = "uas", .queuecommand = uas_queuecommand, .target_alloc = uas_target_alloc, - .slave_alloc = uas_slave_alloc, + .sdev_prep = uas_sdev_prep, .slave_configure = uas_slave_configure, .eh_abort_handler = uas_eh_abort_handler, .eh_device_reset_handler = uas_eh_device_reset_handler, diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 9b87e1a1c646..e50ddc7a2210 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -942,7 +942,7 @@ int fc_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); int fc_eh_abort(struct scsi_cmnd *); int fc_eh_device_reset(struct scsi_cmnd *); int fc_eh_host_reset(struct scsi_cmnd *); -int fc_slave_alloc(struct scsi_device *); +int fc_sdev_prep(struct scsi_device *); /* * ELS/CT interface diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 4e2d61e8fb1e..2d6afa200c8b 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -695,7 +695,7 @@ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); int sas_eh_target_reset_handler(struct scsi_cmnd *cmd); extern void sas_target_destroy(struct scsi_target *); -extern int sas_slave_alloc(struct scsi_device *); +extern int sas_sdev_prep(struct scsi_device *); extern int sas_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg); extern int sas_drain_work(struct sas_ha_struct *ha); diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index bc5909033d13..0db2506c8d0d 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -148,7 +148,7 @@ struct scsi_device { blist_flags_t sdev_bflags; /* black/white flags as also found in * scsi_devinfo.[hc]. For now used only to - * pass settings from slave_alloc to scsi + * pass settings from sdev_prep to scsi * core. */ unsigned int eh_timeout; /* Error handling timeout */ unsigned removable:1; @@ -310,7 +310,7 @@ struct scsi_target { atomic_t target_blocked; /* - * LLDs should set this in the slave_alloc host template callout. + * LLDs should set this in the sdev_prep host template callout. * If set to zero then there is not limit. */ unsigned int can_queue; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 46ef8cccc982..8e44d61b6f47 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -161,7 +161,7 @@ struct scsi_host_template { * * Status: OPTIONAL */ - int (* slave_alloc)(struct scsi_device *); + int (* sdev_prep)(struct scsi_device *); /* * Once the device has responded to an INQUIRY and we know the @@ -199,7 +199,7 @@ struct scsi_host_template { * has ceased the mid layer calls this point so that the low level * driver may completely detach itself from the scsi device and vice * versa. The low level driver is responsible for freeing any memory - * it allocated in the slave_alloc or slave_configure calls. + * it allocated in the sdev_prep or slave_configure calls. * * Status: OPTIONAL */ From patchwork Mon Jul 6 19:39:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 11646753 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 410131398 for ; Mon, 6 Jul 2020 19:39:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1145B206E9 for ; Mon, 6 Jul 2020 19:39:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jSJpGFj6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgGFTjd (ORCPT ); Mon, 6 Jul 2020 15:39:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgGFTjb (ORCPT ); Mon, 6 Jul 2020 15:39:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7520EC061755 for ; Mon, 6 Jul 2020 12:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=O259ohneVYLUXsebPck069zSzAgapbcAaKchfVpytFI=; b=jSJpGFj6AWT7Icvo9t27j20Mgs Q23BSCxOJt8wzUyEk/XMaLnWJLrmWdNi71uToWSjx032JfTFMDIXVu8zDBLskznRvDW7slv88+e4n qnfKJa0WYcmodO1mSNLnPDIsoX2WqBcKT59r3TFQHO4qq4OXLBXQjVj5vFFhq++cTvwHl3GzMZKl0 3b/Fjkyvqb2fDe/WDsMK4hKXxDG2ygQWeUyrg0LvYZVBhuU1Y+WzypfWGOUUjZkbuZKjyGbrEZS95 /7nHOvZe5i7K/EQ+cU2Ag4iQqjEwIrEEFebAaUP4sOvYYK+Kkhbym0G8VT4mGRqD2SP+kvHbWYtWX ySF1ZuLg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsWxY-0001oK-D9; Mon, 06 Jul 2020 19:39:24 +0000 From: "Matthew Wilcox (Oracle)" To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: "Matthew Wilcox (Oracle)" , linux-scsi@vger.kernel.org Subject: [PATCH 2/3] scsi: Rename slave_destroy to sdev_destroy Date: Mon, 6 Jul 2020 20:39:19 +0100 Message-Id: <20200706193920.6897-3-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200706193920.6897-1-willy@infradead.org> References: <20200706193920.6897-1-willy@infradead.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make the function match sdev_prep(). Signed-off-by: Matthew Wilcox (Oracle) --- Documentation/scsi/scsi_mid_low_api.rst | 26 +++++++++---------- drivers/ata/libata-scsi.c | 6 ++--- drivers/message/fusion/mptfc.c | 2 +- drivers/message/fusion/mptsas.c | 2 +- drivers/message/fusion/mptscsih.c | 6 ++--- drivers/message/fusion/mptscsih.h | 2 +- drivers/message/fusion/mptspi.c | 6 ++--- drivers/net/ethernet/mellanox/mlx4/main.c | 12 ++++----- drivers/s390/scsi/zfcp_scsi.c | 4 +-- drivers/scsi/53c700.c | 6 ++--- drivers/scsi/bfa/bfad_im.c | 8 +++--- drivers/scsi/csiostor/csio_scsi.c | 6 ++--- drivers/scsi/dc395x.c | 6 ++--- drivers/scsi/esp_scsi.c | 4 +-- drivers/scsi/hpsa.c | 6 ++--- drivers/scsi/ipr.c | 8 +++--- drivers/scsi/lpfc/lpfc_scsi.c | 6 ++--- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +-- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 +++--- drivers/scsi/myrb.c | 4 +-- drivers/scsi/myrs.c | 4 +-- drivers/scsi/pmcraid.c | 6 ++--- drivers/scsi/qla2xxx/qla_os.c | 4 +-- drivers/scsi/scsi_debug.c | 6 ++--- drivers/scsi/scsi_sysfs.c | 4 +-- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 +-- drivers/scsi/ufs/ufshcd.c | 6 ++--- drivers/scsi/xen-scsifront.c | 4 +-- .../staging/unisys/visorhba/visorhba_main.c | 6 ++--- include/linux/libata.h | 4 +-- include/scsi/scsi_host.h | 12 ++++----- net/dsa/dsa2.c | 2 +- net/dsa/dsa_priv.h | 2 +- net/dsa/slave.c | 2 +- 34 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst index 246495f11da5..7798f09ad5d1 100644 --- a/Documentation/scsi/scsi_mid_low_api.rst +++ b/Documentation/scsi/scsi_mid_low_api.rst @@ -156,11 +156,11 @@ scsi devices of which only the first 2 respond:: slave_configure() | sdev_prep() *** - slave_destroy() *** + sdev_destroy() *** *** For scsi devices that the mid level tries to scan but do not - respond, a sdev_prep(), slave_destroy() pair is called. + respond, a sdev_prep(), sdev_destroy() pair is called. If the LLD wants to adjust the default queue settings, it can invoke scsi_change_queue_depth() in its slave_configure() routine. @@ -176,8 +176,8 @@ same:: ===----------------------=========-----------------===------ scsi_remove_host() ---------+ | - slave_destroy() - slave_destroy() + sdev_destroy() + sdev_destroy() scsi_host_put() It may be useful for a LLD to keep track of struct Scsi_Host instances @@ -218,12 +218,12 @@ upper layers with this sequence:: ===----------------------=========-----------------===------ scsi_remove_device() -------+ | - slave_destroy() + sdev_destroy() It may be useful for an LLD to keep track of struct scsi_device instances (a pointer is passed as the parameter to sdev_prep() and slave_configure() callbacks). Such instances are "owned" by the mid-level. -struct scsi_device instances are freed after slave_destroy(). +struct scsi_device instances are freed after sdev_destroy(). Reference Counting @@ -381,7 +381,7 @@ Details:: * * Notes: Can be invoked any time on a SCSI device controlled by this * LLD. [Specifically during and after slave_configure() and prior to - * slave_destroy().] Can safely be invoked from interrupt code. + * sdev_destroy().] Can safely be invoked from interrupt code. * * Defined in: drivers/scsi/scsi.c [see source code for more notes] * @@ -512,7 +512,7 @@ Details:: * Notes: If an LLD becomes aware that a scsi device (lu) has * been removed but its host is still present then it can request * the removal of that scsi device. If successful this call will - * lead to the slave_destroy() callback being invoked. sdev is an + * lead to the sdev_destroy() callback being invoked. sdev is an * invalid pointer after this call. * * Defined in: drivers/scsi/scsi_sysfs.c . @@ -665,7 +665,7 @@ Summary: - queuecommand - queue scsi command, invoke 'done' on completion - sdev_prep - prior to any commands being sent to a new device - slave_configure - driver fine tuning for given device after attach - - slave_destroy - given device is about to be shut down + - sdev_destroy - given device is about to be shut down Details:: @@ -982,7 +982,7 @@ Details:: * exist but the mid level is just about to scan for it (i.e. send * and INQUIRY command plus ...). If a device is found then * slave_configure() will be called while if a device is not found - * slave_destroy() is called. + * sdev_destroy() is called. * For more details see the include/scsi/scsi_host.h file. * * Optionally defined in: LLD @@ -998,7 +998,7 @@ Details:: * * Returns 0 if ok. Any other return is assumed to be an error and * the device is taken offline. [offline devices will _not_ have - * slave_destroy() called on them so clean up resources.] + * sdev_destroy() called on them so clean up resources.] * * Locks: none * @@ -1014,7 +1014,7 @@ Details:: /** - * slave_destroy - given device is about to be shut down. All + * sdev_destroy - given device is about to be shut down. All * activity has ceased on this device. * @sdp: device that is about to be shut down * @@ -1034,7 +1034,7 @@ Details:: * * Optionally defined in: LLD **/ - void slave_destroy(struct scsi_device *sdp) + void sdev_destroy(struct scsi_device *sdp) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 435781a16875..bf075f2e4bd8 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1114,7 +1114,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev) EXPORT_SYMBOL_GPL(ata_scsi_slave_config); /** - * ata_scsi_slave_destroy - SCSI device is about to be destroyed + * ata_scsi_sdev_destroy - SCSI device is about to be destroyed * @sdev: SCSI device to be destroyed * * @sdev is about to be destroyed for hot/warm unplugging. If @@ -1127,7 +1127,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_slave_config); * LOCKING: * Defined by SCSI layer. We don't really care. */ -void ata_scsi_slave_destroy(struct scsi_device *sdev) +void ata_scsi_sdev_destroy(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); unsigned long flags; @@ -1148,7 +1148,7 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev) kfree(sdev->dma_drain_buf); } -EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy); +EXPORT_SYMBOL_GPL(ata_scsi_sdev_destroy); /** * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 2717d65931ad..5c7556844a76 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -116,7 +116,7 @@ static struct scsi_host_template mptfc_driver_template = { .sdev_prep = mptfc_sdev_prep, .slave_configure = mptscsih_slave_configure, .target_destroy = mptfc_target_destroy, - .slave_destroy = mptscsih_slave_destroy, + .sdev_destroy = mptscsih_sdev_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_timed_out = fc_eh_timed_out, .eh_abort_handler = mptfc_abort, diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index d6f27c90878d..c393e2ee8373 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -1980,7 +1980,7 @@ static struct scsi_host_template mptsas_driver_template = { .sdev_prep = mptsas_sdev_prep, .slave_configure = mptsas_slave_configure, .target_destroy = mptsas_target_destroy, - .slave_destroy = mptscsih_slave_destroy, + .sdev_destroy = mptscsih_sdev_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_timed_out = mptsas_eh_timed_out, .eh_abort_handler = mptscsih_abort, diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 1491561d2e5c..e7d78e73b236 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -1071,7 +1071,7 @@ EXPORT_SYMBOL(mptscsih_flush_running_cmds); * * Returns: None. * - * Called from slave_destroy. + * Called from sdev_destroy. */ static void mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice) @@ -2278,7 +2278,7 @@ EXPORT_SYMBOL(mptscsih_raid_id_to_num); * Called if no device present or device being unloaded */ void -mptscsih_slave_destroy(struct scsi_device *sdev) +mptscsih_sdev_destroy(struct scsi_device *sdev) { struct Scsi_Host *host = sdev->host; MPT_SCSI_HOST *hd = shost_priv(host); @@ -3243,7 +3243,7 @@ EXPORT_SYMBOL(mptscsih_resume); EXPORT_SYMBOL(mptscsih_show_info); EXPORT_SYMBOL(mptscsih_info); EXPORT_SYMBOL(mptscsih_qcmd); -EXPORT_SYMBOL(mptscsih_slave_destroy); +EXPORT_SYMBOL(mptscsih_sdev_destroy); EXPORT_SYMBOL(mptscsih_slave_configure); EXPORT_SYMBOL(mptscsih_abort); EXPORT_SYMBOL(mptscsih_dev_reset); diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index 2baeefd9be7a..09bab23a9abb 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h @@ -116,7 +116,7 @@ extern const char * mptscsih_info(struct Scsi_Host *SChost); extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt); extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u64 lun, int ctx2abort, ulong timeout); -extern void mptscsih_slave_destroy(struct scsi_device *device); +extern void mptscsih_sdev_destroy(struct scsi_device *device); extern int mptscsih_slave_configure(struct scsi_device *device); extern int mptscsih_abort(struct scsi_cmnd * SCpnt); extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt); diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 633858a445ce..ec8a5396661d 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -799,7 +799,7 @@ mptspi_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) return mptscsih_qcmd(SCpnt); } -static void mptspi_slave_destroy(struct scsi_device *sdev) +static void mptspi_sdev_destroy(struct scsi_device *sdev) { struct scsi_target *starget = scsi_target(sdev); VirtTarget *vtarget = starget->hostdata; @@ -817,7 +817,7 @@ static void mptspi_slave_destroy(struct scsi_device *sdev) mptspi_write_spi_device_pg1(starget, &pg1); } - mptscsih_slave_destroy(sdev); + mptscsih_sdev_destroy(sdev); } static struct scsi_host_template mptspi_driver_template = { @@ -831,7 +831,7 @@ static struct scsi_host_template mptspi_driver_template = { .sdev_prep = mptspi_sdev_prep, .slave_configure = mptspi_slave_configure, .target_destroy = mptspi_target_destroy, - .slave_destroy = mptspi_slave_destroy, + .sdev_destroy = mptspi_sdev_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_abort_handler = mptscsih_abort, .eh_device_reset_handler = mptscsih_dev_reset, diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 3d9aa7da95e9..3e2fd145cb4e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -855,7 +855,7 @@ static void slave_adjust_steering_mode(struct mlx4_dev *dev, mlx4_steering_mode_str(dev->caps.steering_mode)); } -static void mlx4_slave_destroy_special_qp_cap(struct mlx4_dev *dev) +static void mlx4_sdev_destroy_special_qp_cap(struct mlx4_dev *dev) { kfree(dev->caps.spec_qps); dev->caps.spec_qps = NULL; @@ -898,7 +898,7 @@ static int mlx4_slave_special_qp_cap(struct mlx4_dev *dev) err_mem: if (err) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_sdev_destroy_special_qp_cap(dev); kfree(func_cap); return err; } @@ -1082,7 +1082,7 @@ static int mlx4_slave_cap(struct mlx4_dev *dev) err_mem: if (err) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_sdev_destroy_special_qp_cap(dev); free_mem: kfree(hca_param); kfree(func_cap); @@ -2476,7 +2476,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) unmap_bf_area(dev); if (mlx4_is_slave(dev)) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_sdev_destroy_special_qp_cap(dev); err_close: if (mlx4_is_slave(dev)) @@ -3673,7 +3673,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data, } if (mlx4_is_slave(dev)) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_sdev_destroy_special_qp_cap(dev); err_close: mlx4_close_hca(dev); @@ -4110,7 +4110,7 @@ static void mlx4_unload_one(struct pci_dev *pdev) if (!mlx4_is_slave(dev)) mlx4_free_ownership(dev); - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_sdev_destroy_special_qp_cap(dev); kfree(dev->dev_vfs); mlx4_clean_dev(dev); diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index a603bdd7b7c5..1f95c38738e3 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -37,7 +37,7 @@ static bool allow_lun_scan = true; module_param(allow_lun_scan, bool, 0600); MODULE_PARM_DESC(allow_lun_scan, "For NPIV, scan and attach all storage LUNs"); -static void zfcp_scsi_slave_destroy(struct scsi_device *sdev) +static void zfcp_scsi_sdev_destroy(struct scsi_device *sdev) { struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); @@ -429,7 +429,7 @@ static struct scsi_host_template zfcp_scsi_host_template = { .eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler, .sdev_prep = zfcp_scsi_sdev_prep, .slave_configure = zfcp_scsi_slave_configure, - .slave_destroy = zfcp_scsi_slave_destroy, + .sdev_destroy = zfcp_scsi_sdev_destroy, .change_queue_depth = scsi_change_queue_depth, .host_reset = zfcp_scsi_sysfs_host_reset, .proc_name = "zfcp", diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 9410a7a3873a..95c71fba16a2 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -161,7 +161,7 @@ STATIC void NCR_700_chip_setup(struct Scsi_Host *host); STATIC void NCR_700_chip_reset(struct Scsi_Host *host); STATIC int NCR_700_sdev_prep(struct scsi_device *SDpnt); STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); -STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); +STATIC void NCR_700_sdev_destroy(struct scsi_device *SDpnt); static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); STATIC struct device_attribute *NCR_700_dev_attrs[]; @@ -307,7 +307,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, tpnt->sg_tablesize = NCR_700_SG_SEGMENTS; tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN; tpnt->slave_configure = NCR_700_slave_configure; - tpnt->slave_destroy = NCR_700_slave_destroy; + tpnt->sdev_destroy = NCR_700_sdev_destroy; tpnt->sdev_prep = NCR_700_sdev_prep; tpnt->change_queue_depth = NCR_700_change_queue_depth; @@ -2041,7 +2041,7 @@ NCR_700_slave_configure(struct scsi_device *SDp) } STATIC void -NCR_700_slave_destroy(struct scsi_device *SDp) +NCR_700_sdev_destroy(struct scsi_device *SDp) { kfree(SDp->hostdata); SDp->hostdata = NULL; diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index bd860b6b8d46..d93524ab1a47 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -405,10 +405,10 @@ bfad_im_reset_target_handler(struct scsi_cmnd *cmnd) } /* - * Scsi_Host template entry slave_destroy. + * Scsi_Host template entry sdev_destroy. */ static void -bfad_im_slave_destroy(struct scsi_device *sdev) +bfad_im_sdev_destroy(struct scsi_device *sdev) { sdev->hostdata = NULL; return; @@ -804,7 +804,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { .sdev_prep = bfad_im_sdev_prep, .slave_configure = bfad_im_slave_configure, - .slave_destroy = bfad_im_slave_destroy, + .sdev_destroy = bfad_im_sdev_destroy, .this_id = -1, .sg_tablesize = BFAD_IO_MAX_SGE, @@ -826,7 +826,7 @@ struct scsi_host_template bfad_im_vport_template = { .sdev_prep = bfad_im_sdev_prep, .slave_configure = bfad_im_slave_configure, - .slave_destroy = bfad_im_slave_destroy, + .sdev_destroy = bfad_im_sdev_destroy, .this_id = -1, .sg_tablesize = BFAD_IO_MAX_SGE, diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 0ee7d39bde93..cd53c2ed31fb 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -2239,7 +2239,7 @@ csio_slave_configure(struct scsi_device *sdev) } static void -csio_slave_destroy(struct scsi_device *sdev) +csio_sdev_destroy(struct scsi_device *sdev) { sdev->hostdata = NULL; } @@ -2272,7 +2272,7 @@ struct scsi_host_template csio_fcoe_shost_template = { .eh_device_reset_handler = csio_eh_lun_reset_handler, .sdev_prep = csio_sdev_prep, .slave_configure = csio_slave_configure, - .slave_destroy = csio_slave_destroy, + .sdev_destroy = csio_sdev_destroy, .scan_finished = csio_scan_finished, .this_id = -1, .sg_tablesize = CSIO_SCSI_MAX_SGE, @@ -2291,7 +2291,7 @@ struct scsi_host_template csio_fcoe_shost_vport_template = { .eh_device_reset_handler = csio_eh_lun_reset_handler, .sdev_prep = csio_sdev_prep, .slave_configure = csio_slave_configure, - .slave_destroy = csio_slave_destroy, + .sdev_destroy = csio_sdev_destroy, .scan_finished = csio_scan_finished, .this_id = -1, .sg_tablesize = CSIO_SCSI_MAX_SGE, diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 6b22777c123f..77d5c894b5ea 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -3773,12 +3773,12 @@ static int dc395x_sdev_prep(struct scsi_device *scsi_device) /** - * dc395x_slave_destroy - Called by the scsi mid layer to tell us about a + * dc395x_sdev_destroy - Called by the scsi mid layer to tell us about a * device that is going away. * * @scsi_device: The new scsi device that we need to handle. **/ -static void dc395x_slave_destroy(struct scsi_device *scsi_device) +static void dc395x_sdev_destroy(struct scsi_device *scsi_device) { struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata; struct DeviceCtlBlk *dcb = find_dcb(acb, scsi_device->id, scsi_device->lun); @@ -4590,7 +4590,7 @@ static struct scsi_host_template dc395x_driver_template = { .name = DC395X_BANNER " " DC395X_VERSION, .queuecommand = dc395x_queue_command, .sdev_prep = dc395x_sdev_prep, - .slave_destroy = dc395x_slave_destroy, + .sdev_destroy = dc395x_sdev_destroy, .can_queue = DC395x_MAX_CAN_QUEUE, .this_id = 7, .sg_tablesize = DC395x_MAX_SG_TABLESIZE, diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 37471f82921a..70390b43fd9e 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -2490,7 +2490,7 @@ static int esp_slave_configure(struct scsi_device *dev) return 0; } -static void esp_slave_destroy(struct scsi_device *dev) +static void esp_sdev_destroy(struct scsi_device *dev) { struct esp_lun_data *lp = dev->hostdata; @@ -2680,7 +2680,7 @@ struct scsi_host_template scsi_esp_template = { .target_destroy = esp_target_destroy, .sdev_prep = esp_sdev_prep, .slave_configure = esp_slave_configure, - .slave_destroy = esp_slave_destroy, + .sdev_destroy = esp_sdev_destroy, .eh_abort_handler = esp_eh_abort_handler, .eh_bus_reset_handler = esp_eh_bus_reset_handler, .eh_host_reset_handler = esp_eh_host_reset_handler, diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 4e4d3045da7a..7278f2a01983 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -285,7 +285,7 @@ static int hpsa_change_queue_depth(struct scsi_device *sdev, int qdepth); static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd); static int hpsa_sdev_prep(struct scsi_device *sdev); static int hpsa_slave_configure(struct scsi_device *sdev); -static void hpsa_slave_destroy(struct scsi_device *sdev); +static void hpsa_sdev_destroy(struct scsi_device *sdev); static void hpsa_update_scsi_devices(struct ctlr_info *h); static int check_for_unit_attention(struct ctlr_info *h, @@ -976,7 +976,7 @@ static struct scsi_host_template hpsa_driver_template = { .ioctl = hpsa_ioctl, .sdev_prep = hpsa_sdev_prep, .slave_configure = hpsa_slave_configure, - .slave_destroy = hpsa_slave_destroy, + .sdev_destroy = hpsa_sdev_destroy, #ifdef CONFIG_COMPAT .compat_ioctl = hpsa_compat_ioctl, #endif @@ -2161,7 +2161,7 @@ static int hpsa_slave_configure(struct scsi_device *sdev) return 0; } -static void hpsa_slave_destroy(struct scsi_device *sdev) +static void hpsa_sdev_destroy(struct scsi_device *sdev) { struct hpsa_scsi_dev_t *hdev = NULL; diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 2920b4c48896..7d783b5e7b6f 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4891,13 +4891,13 @@ static struct ipr_resource_entry *ipr_find_sdev(struct scsi_device *sdev) } /** - * ipr_slave_destroy - Unconfigure a SCSI device + * ipr_sdev_destroy - Unconfigure a SCSI device * @sdev: scsi device struct * * Return value: * nothing **/ -static void ipr_slave_destroy(struct scsi_device *sdev) +static void ipr_sdev_destroy(struct scsi_device *sdev) { struct ipr_resource_entry *res; struct ipr_ioa_cfg *ioa_cfg; @@ -4994,7 +4994,7 @@ static int ipr_ata_sdev_prep(struct scsi_device *sdev) } if (rc) - ipr_slave_destroy(sdev); + ipr_sdev_destroy(sdev); LEAVE; return rc; @@ -6737,7 +6737,7 @@ static struct scsi_host_template driver_template = { .eh_host_reset_handler = ipr_eh_host_reset, .sdev_prep = ipr_sdev_prep, .slave_configure = ipr_slave_configure, - .slave_destroy = ipr_slave_destroy, + .sdev_destroy = ipr_sdev_destroy, .scan_finished = ipr_scan_finished, .target_alloc = ipr_target_alloc, .target_destroy = ipr_target_destroy, diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 6974665f5ade..aeabcb3b1df7 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5638,13 +5638,13 @@ lpfc_slave_configure(struct scsi_device *sdev) } /** - * lpfc_slave_destroy - slave_destroy entry point of SHT data structure + * lpfc_sdev_destroy - sdev_destroy entry point of SHT data structure * @sdev: Pointer to scsi_device. * * This routine sets @sdev hostatdata filed to null. **/ static void -lpfc_slave_destroy(struct scsi_device *sdev) +lpfc_sdev_destroy(struct scsi_device *sdev) { struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; struct lpfc_hba *phba = vport->phba; @@ -6048,7 +6048,7 @@ struct scsi_host_template lpfc_template = { .eh_host_reset_handler = lpfc_host_reset_handler, .sdev_prep = lpfc_sdev_prep, .slave_configure = lpfc_slave_configure, - .slave_destroy = lpfc_slave_destroy, + .sdev_destroy = lpfc_sdev_destroy, .scan_finished = lpfc_scan_finished, .this_id = -1, .sg_tablesize = LPFC_DEFAULT_SG_SEG_CNT, diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 7f0f058c4a80..0992869bffd4 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -2105,7 +2105,7 @@ static int megasas_sdev_prep(struct scsi_device *sdev) return 0; } -static void megasas_slave_destroy(struct scsi_device *sdev) +static void megasas_sdev_destroy(struct scsi_device *sdev) { kfree(sdev->hostdata); sdev->hostdata = NULL; @@ -3415,7 +3415,7 @@ static struct scsi_host_template megasas_template = { .proc_name = "megaraid_sas", .slave_configure = megasas_slave_configure, .sdev_prep = megasas_sdev_prep, - .slave_destroy = megasas_slave_destroy, + .sdev_destroy = megasas_sdev_destroy, .queuecommand = megasas_queue_command, .eh_target_reset_handler = megasas_reset_target, .eh_abort_handler = megasas_task_abort, diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index b46a5d6c3f7e..674e72ed1398 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -1880,11 +1880,11 @@ scsih_sdev_prep(struct scsi_device *sdev) } /** - * scsih_slave_destroy - device destroy routine + * scsih_sdev_destroy - device destroy routine * @sdev: scsi device struct */ static void -scsih_slave_destroy(struct scsi_device *sdev) +scsih_sdev_destroy(struct scsi_device *sdev) { struct MPT3SAS_TARGET *sas_target_priv_data; struct scsi_target *starget; @@ -10430,7 +10430,7 @@ static struct scsi_host_template mpt2sas_driver_template = { .sdev_prep = scsih_sdev_prep, .slave_configure = scsih_slave_configure, .target_destroy = scsih_target_destroy, - .slave_destroy = scsih_slave_destroy, + .sdev_destroy = scsih_sdev_destroy, .scan_finished = scsih_scan_finished, .scan_start = scsih_scan_start, .change_queue_depth = scsih_change_queue_depth, @@ -10468,7 +10468,7 @@ static struct scsi_host_template mpt3sas_driver_template = { .sdev_prep = scsih_sdev_prep, .slave_configure = scsih_slave_configure, .target_destroy = scsih_target_destroy, - .slave_destroy = scsih_slave_destroy, + .sdev_destroy = scsih_sdev_destroy, .scan_finished = scsih_scan_finished, .scan_start = scsih_scan_start, .change_queue_depth = scsih_change_queue_depth, diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index 2d3ffd79076a..d2dfec5c4a3a 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -1769,7 +1769,7 @@ static int myrb_slave_configure(struct scsi_device *sdev) return 0; } -static void myrb_slave_destroy(struct scsi_device *sdev) +static void myrb_sdev_destroy(struct scsi_device *sdev) { kfree(sdev->hostdata); } @@ -2234,7 +2234,7 @@ struct scsi_host_template myrb_template = { .eh_host_reset_handler = myrb_host_reset, .sdev_prep = myrb_sdev_prep, .slave_configure = myrb_slave_configure, - .slave_destroy = myrb_slave_destroy, + .sdev_destroy = myrb_sdev_destroy, .bios_param = myrb_biosparam, .cmd_size = sizeof(struct myrb_cmdblk), .shost_attrs = myrb_shost_attrs, diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 6e8882bda8b8..1b9f6103096d 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1914,7 +1914,7 @@ static int myrs_slave_configure(struct scsi_device *sdev) return 0; } -static void myrs_slave_destroy(struct scsi_device *sdev) +static void myrs_sdev_destroy(struct scsi_device *sdev) { kfree(sdev->hostdata); } @@ -1927,7 +1927,7 @@ struct scsi_host_template myrs_template = { .eh_host_reset_handler = myrs_host_reset, .sdev_prep = myrs_sdev_prep, .slave_configure = myrs_slave_configure, - .slave_destroy = myrs_slave_destroy, + .sdev_destroy = myrs_sdev_destroy, .cmd_size = sizeof(struct myrs_cmdblk), .shost_attrs = myrs_shost_attrs, .sdev_attrs = myrs_sdev_attrs, diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index e160c128d3e8..0cf4c8d894a4 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -245,7 +245,7 @@ static int pmcraid_slave_configure(struct scsi_device *scsi_dev) } /** - * pmcraid_slave_destroy - Unconfigure a SCSI device before removing it + * pmcraid_sdev_destroy - Unconfigure a SCSI device before removing it * * @scsi_dev: scsi device struct * @@ -255,7 +255,7 @@ static int pmcraid_slave_configure(struct scsi_device *scsi_dev) * Return value * none */ -static void pmcraid_slave_destroy(struct scsi_device *scsi_dev) +static void pmcraid_sdev_destroy(struct scsi_device *scsi_dev) { struct pmcraid_resource_entry *res; @@ -4122,7 +4122,7 @@ static struct scsi_host_template pmcraid_host_template = { .sdev_prep = pmcraid_sdev_prep, .slave_configure = pmcraid_slave_configure, - .slave_destroy = pmcraid_slave_destroy, + .sdev_destroy = pmcraid_sdev_destroy, .change_queue_depth = pmcraid_change_queue_depth, .can_queue = PMCRAID_MAX_IO_CMD, .this_id = -1, diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 807db94cf148..18134c2ad835 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1864,7 +1864,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev) } static void -qla2xxx_slave_destroy(struct scsi_device *sdev) +qla2xxx_sdev_destroy(struct scsi_device *sdev) { sdev->hostdata = NULL; } @@ -7768,7 +7768,7 @@ struct scsi_host_template qla2xxx_driver_template = { .slave_configure = qla2xxx_slave_configure, .sdev_prep = qla2xxx_sdev_prep, - .slave_destroy = qla2xxx_slave_destroy, + .sdev_destroy = qla2xxx_sdev_destroy, .scan_finished = qla2xxx_scan_finished, .scan_start = qla2xxx_scan_start, .change_queue_depth = scsi_change_queue_depth, diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index bb914e2e7554..741502da09c4 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4999,13 +4999,13 @@ static int scsi_debug_slave_configure(struct scsi_device *sdp) return 0; } -static void scsi_debug_slave_destroy(struct scsi_device *sdp) +static void scsi_debug_sdev_destroy(struct scsi_device *sdp) { struct sdebug_dev_info *devip = (struct sdebug_dev_info *)sdp->hostdata; if (sdebug_verbose) - pr_info("slave_destroy <%u %u %u %llu>\n", + pr_info("sdev_destroy <%u %u %u %llu>\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); if (devip) { /* make this slot available for re-use */ @@ -7223,7 +7223,7 @@ static struct scsi_host_template sdebug_driver_template = { .info = scsi_debug_info, .sdev_prep = scsi_debug_sdev_prep, .slave_configure = scsi_debug_slave_configure, - .slave_destroy = scsi_debug_slave_destroy, + .sdev_destroy = scsi_debug_sdev_destroy, .ioctl = scsi_debug_ioctl, .queuecommand = scsi_debug_queuecommand, .change_queue_depth = sdebug_change_qdepth, diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 163dbcb741c1..b27f83e5e6fd 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1441,8 +1441,8 @@ void __scsi_remove_device(struct scsi_device *sdev) blk_cleanup_queue(sdev->request_queue); cancel_work_sync(&sdev->requeue_work); - if (sdev->host->hostt->slave_destroy) - sdev->host->hostt->slave_destroy(sdev); + if (sdev->host->hostt->sdev_destroy) + sdev->host->hostt->sdev_destroy(sdev); transport_destroy_device(dev); /* diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 4d59783ed465..128e4ad0124d 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -817,7 +817,7 @@ static int sym53c8xx_slave_configure(struct scsi_device *sdev) return 0; } -static void sym53c8xx_slave_destroy(struct scsi_device *sdev) +static void sym53c8xx_sdev_destroy(struct scsi_device *sdev) { struct sym_hcb *np = sym_get_hcb(sdev->host); struct sym_tcb *tp = &np->target[sdev->id]; @@ -1641,7 +1641,7 @@ static struct scsi_host_template sym2_template = { .queuecommand = sym53c8xx_queue_command, .sdev_prep = sym53c8xx_sdev_prep, .slave_configure = sym53c8xx_slave_configure, - .slave_destroy = sym53c8xx_slave_destroy, + .sdev_destroy = sym53c8xx_sdev_destroy, .eh_abort_handler = sym53c8xx_eh_abort_handler, .eh_device_reset_handler = sym53c8xx_eh_device_reset_handler, .eh_bus_reset_handler = sym53c8xx_eh_bus_reset_handler, diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 58cd8a609b31..ca9fc27c4f02 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4674,10 +4674,10 @@ static int ufshcd_slave_configure(struct scsi_device *sdev) } /** - * ufshcd_slave_destroy - remove SCSI device configurations + * ufshcd_sdev_destroy - remove SCSI device configurations * @sdev: pointer to SCSI device */ -static void ufshcd_slave_destroy(struct scsi_device *sdev) +static void ufshcd_sdev_destroy(struct scsi_device *sdev) { struct ufs_hba *hba; @@ -7491,7 +7491,7 @@ static struct scsi_host_template ufshcd_driver_template = { .queuecommand = ufshcd_queuecommand, .sdev_prep = ufshcd_sdev_prep, .slave_configure = ufshcd_slave_configure, - .slave_destroy = ufshcd_slave_destroy, + .sdev_destroy = ufshcd_sdev_destroy, .change_queue_depth = ufshcd_change_queue_depth, .eh_abort_handler = ufshcd_abort, .eh_device_reset_handler = ufshcd_eh_device_reset_handler, diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index f0068e96a177..319b8bf68117 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -690,7 +690,7 @@ static struct scsi_host_template scsifront_sht = { .eh_abort_handler = scsifront_eh_abort_handler, .eh_device_reset_handler = scsifront_dev_reset_handler, .slave_configure = scsifront_sdev_configure, - .slave_destroy = scsifront_sdev_destroy, + .sdev_destroy = scsifront_sdev_destroy, .cmd_per_lun = VSCSIIF_DEFAULT_CMD_PER_LUN, .can_queue = VSCSIIF_MAX_REQS, .this_id = -1, @@ -1001,7 +1001,7 @@ static void scsifront_do_lun_hotplug(struct vscsifrnt_info *info, int op) /* * Front device state path, used in slave_configure called - * on successfull scsi_add_device, and in slave_destroy called + * on successfull scsi_add_device, and in sdev_destroy called * on remove of a device. */ snprintf(info->dev_state_path, sizeof(info->dev_state_path), diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index b6023fcc7908..0a7211d600f7 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -615,10 +615,10 @@ static int visorhba_sdev_prep(struct scsi_device *scsidev) } /* - * visorhba_slave_destroy - Disk is going away, clean up resources. + * visorhba_sdev_destroy - Disk is going away, clean up resources. * @scsidev: Scsi device to destroy */ -static void visorhba_slave_destroy(struct scsi_device *scsidev) +static void visorhba_sdev_destroy(struct scsi_device *scsidev) { /* midlevel calls this after device has been quiesced and * before it is to be deleted. @@ -644,7 +644,7 @@ static struct scsi_host_template visorhba_driver_template = { .sg_tablesize = 64, .this_id = -1, .sdev_prep = visorhba_sdev_prep, - .slave_destroy = visorhba_slave_destroy, + .sdev_destroy = visorhba_sdev_destroy, }; /* diff --git a/include/linux/libata.h b/include/linux/libata.h index c57bf6749681..e7153fca9cfc 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1149,7 +1149,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev, sector_t capacity, int geom[]); extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev); extern int ata_scsi_slave_config(struct scsi_device *sdev); -extern void ata_scsi_slave_destroy(struct scsi_device *sdev); +extern void ata_scsi_sdev_destroy(struct scsi_device *sdev); extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth); extern int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev, @@ -1399,7 +1399,7 @@ extern struct device_attribute *ata_common_sdev_attrs[]; .emulated = ATA_SHT_EMULATED, \ .proc_name = drv_name, \ .slave_configure = ata_scsi_slave_config, \ - .slave_destroy = ata_scsi_slave_destroy, \ + .sdev_destroy = ata_scsi_sdev_destroy, \ .bios_param = ata_std_bios_param, \ .unlock_native_capacity = ata_scsi_unlock_native_capacity diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 8e44d61b6f47..334bb4adadaf 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -148,14 +148,14 @@ struct scsi_host_template { * Return values: 0 on success, non-0 on failure * * Deallocation: If we didn't find any devices at this ID, you will - * get an immediate call to slave_destroy(). If we find something + * get an immediate call to sdev_destroy(). If we find something * here then you will get a call to slave_configure(), then the * device will be used for however long it is kept around, then when * the device is removed from the system (or * possibly at reboot - * time), you will then get a call to slave_destroy(). This is - * assuming you implement slave_configure and slave_destroy. + * time), you will then get a call to sdev_destroy(). This is + * assuming you implement slave_configure and sdev_destroy. * However, if you allocate memory and hang it off the device struct, - * then you must implement the slave_destroy() routine at a minimum + * then you must implement the sdev_destroy() routine at a minimum * in order to avoid leaking memory * each time a device is tore down. * @@ -186,7 +186,7 @@ struct scsi_host_template { * specific setup basis... * 6. Return 0 on success, non-0 on error. The device will be marked * as offline on error so that no access will occur. If you return - * non-0, your slave_destroy routine will never get called for this + * non-0, your sdev_destroy routine will never get called for this * device, so don't leave any loose memory hanging around, clean * up after yourself before returning non-0 * @@ -203,7 +203,7 @@ struct scsi_host_template { * * Status: OPTIONAL */ - void (* slave_destroy)(struct scsi_device *); + void (* sdev_destroy)(struct scsi_device *); /* * Before the mid layer attempts to scan for a new device attached diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 076908fdd29b..6baef2a81943 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -368,7 +368,7 @@ static void dsa_port_teardown(struct dsa_port *dp) case DSA_PORT_TYPE_USER: devlink_port_unregister(dlp); if (dp->slave) { - dsa_slave_destroy(dp->slave); + dsa_sdev_destroy(dp->slave); dp->slave = NULL; } break; diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index adecf73bd608..b34ea3df9637 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -174,7 +174,7 @@ extern const struct phylink_mac_ops dsa_port_phylink_mac_ops; extern const struct dsa_device_ops notag_netdev_ops; void dsa_slave_mii_bus_init(struct dsa_switch *ds); int dsa_slave_create(struct dsa_port *dp); -void dsa_slave_destroy(struct net_device *slave_dev); +void dsa_sdev_destroy(struct net_device *slave_dev); bool dsa_slave_dev_check(const struct net_device *dev); int dsa_slave_suspend(struct net_device *slave_dev); int dsa_slave_resume(struct net_device *slave_dev); diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 4c7f086a047b..4591c6245783 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1824,7 +1824,7 @@ int dsa_slave_create(struct dsa_port *port) return ret; } -void dsa_slave_destroy(struct net_device *slave_dev) +void dsa_sdev_destroy(struct net_device *slave_dev) { struct dsa_port *dp = dsa_slave_to_port(slave_dev); struct dsa_slave_priv *p = netdev_priv(slave_dev); From patchwork Mon Jul 6 19:39:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 11646751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FE8F1398 for ; Mon, 6 Jul 2020 19:39:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B492206F5 for ; Mon, 6 Jul 2020 19:39:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="X3kh+7rA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726628AbgGFTjb (ORCPT ); Mon, 6 Jul 2020 15:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgGFTja (ORCPT ); Mon, 6 Jul 2020 15:39:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E33C061755 for ; Mon, 6 Jul 2020 12:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=+9DU425cN2dJVKSz8+pxN8sx6KNlFI3asjnvfpYYKH4=; b=X3kh+7rApcpxAKfWUwkLoV3KlW KpE00sovFt1xb13YDyvhbPiq2KgSCTqC/QfU5jawJdSj7HP1fobQ8+AgkpbXgg3ycMFAcLqDVr/A5 sAUYQ5Qoi/f2Sy+0T2I7deDf4t3t752sATr9vL4dCRosMMTBJqWoKX0/qgvBof5j3ewPHSxwMXkro utr39rd8vMrmjfqZMpRA8q5kg5pC4oA4GDtdWvkjd/ZP/1cdMha9uub/B76Vq7pB3yXtmj/QypnqU CZKEzg6c9iCknOBptT+F6QsUqf8GrSTNpzaCaJTMvpC1SjgOK+LMS6RhQSfzxogJR3X42SDi2zwSe 6DhpgGIQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsWxY-0001oP-NX; Mon, 06 Jul 2020 19:39:24 +0000 From: "Matthew Wilcox (Oracle)" To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: "Matthew Wilcox (Oracle)" , linux-scsi@vger.kernel.org Subject: [PATCH 3/3] scsi: Rename slave_configure to sdev_configure Date: Mon, 6 Jul 2020 20:39:20 +0100 Message-Id: <20200706193920.6897-4-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200706193920.6897-1-willy@infradead.org> References: <20200706193920.6897-1-willy@infradead.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Match sdev_init() and sdev_destroy(). Signed-off-by: Matthew Wilcox (Oracle) --- Documentation/scsi/scsi_mid_low_api.rst | 30 +++++++++++------------ drivers/ata/libata-sata.c | 6 ++--- drivers/ata/libata-scsi.c | 6 ++--- drivers/ata/pata_macio.c | 6 ++--- drivers/ata/sata_nv.c | 16 ++++++------ drivers/firewire/sbp2.c | 4 +-- drivers/infiniband/ulp/srp/ib_srp.c | 4 +-- drivers/message/fusion/mptfc.c | 2 +- drivers/message/fusion/mptsas.c | 6 ++--- drivers/message/fusion/mptscsih.c | 4 +-- drivers/message/fusion/mptscsih.h | 2 +- drivers/message/fusion/mptspi.c | 6 ++--- drivers/s390/scsi/zfcp_scsi.c | 4 +-- drivers/scsi/3w-9xxx.c | 6 ++--- drivers/scsi/3w-sas.c | 6 ++--- drivers/scsi/3w-xxxx.c | 8 +++--- drivers/scsi/53c700.c | 6 ++--- drivers/scsi/BusLogic.c | 6 ++--- drivers/scsi/BusLogic.h | 1 - drivers/scsi/aacraid/linit.c | 6 ++--- drivers/scsi/advansys.c | 18 +++++++------- drivers/scsi/aic7xxx/aic79xx_osm.c | 4 +-- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 +-- drivers/scsi/aic94xx/aic94xx_init.c | 2 +- drivers/scsi/bfa/bfad_im.c | 6 ++--- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 +-- drivers/scsi/csiostor/csio_scsi.c | 6 ++--- drivers/scsi/dpt_i2o.c | 4 +-- drivers/scsi/dpti.h | 2 +- drivers/scsi/esp_scsi.c | 6 ++--- drivers/scsi/gdth.c | 4 +-- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++--- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- drivers/scsi/hpsa.c | 6 ++--- drivers/scsi/hptiop.c | 4 +-- drivers/scsi/ibmvscsi/ibmvfc.c | 6 ++--- drivers/scsi/ibmvscsi/ibmvscsi.c | 6 ++--- drivers/scsi/ipr.c | 8 +++--- drivers/scsi/ips.c | 6 ++--- drivers/scsi/ips.h | 2 +- drivers/scsi/isci/init.c | 2 +- drivers/scsi/iscsi_tcp.c | 4 +-- drivers/scsi/libsas/sas_scsi_host.c | 6 ++--- drivers/scsi/lpfc/lpfc_scsi.c | 8 +++--- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +-- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 +++--- drivers/scsi/mvsas/mv_init.c | 2 +- drivers/scsi/mvumi.c | 4 +-- drivers/scsi/myrb.c | 4 +-- drivers/scsi/myrs.c | 4 +-- drivers/scsi/ncr53c8xx.c | 4 +-- drivers/scsi/pm8001/pm8001_init.c | 2 +- drivers/scsi/pmcraid.c | 6 ++--- drivers/scsi/ps3rom.c | 4 +-- drivers/scsi/qedf/qedf_main.c | 4 +-- drivers/scsi/qla1280.c | 6 ++--- drivers/scsi/qla2xxx/qla_os.c | 4 +-- drivers/scsi/qlogicpti.c | 4 +-- drivers/scsi/scsi_debug.c | 6 ++--- drivers/scsi/scsi_scan.c | 10 ++++---- drivers/scsi/snic/snic_main.c | 6 ++--- drivers/scsi/stex.c | 4 +-- drivers/scsi/storvsc_drv.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 +-- drivers/scsi/ufs/ufshcd.c | 6 ++--- drivers/scsi/xen-scsifront.c | 4 +-- drivers/staging/rts5208/rtsx.c | 4 +-- drivers/usb/image/microtek.c | 4 +-- drivers/usb/storage/scsiglue.c | 4 +-- drivers/usb/storage/uas.c | 4 +-- include/linux/libata.h | 6 ++--- include/scsi/libsas.h | 2 +- include/scsi/scsi_host.h | 8 +++--- 76 files changed, 200 insertions(+), 201 deletions(-) diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst index 7798f09ad5d1..1bd016aff43e 100644 --- a/Documentation/scsi/scsi_mid_low_api.rst +++ b/Documentation/scsi/scsi_mid_low_api.rst @@ -150,10 +150,10 @@ scsi devices of which only the first 2 respond:: scsi_scan_host() -------+ | sdev_prep() - slave_configure() --> scsi_change_queue_depth() + sdev_configure() --> scsi_change_queue_depth() | sdev_prep() - slave_configure() + sdev_configure() | sdev_prep() *** sdev_destroy() *** @@ -163,7 +163,7 @@ scsi devices of which only the first 2 respond:: respond, a sdev_prep(), sdev_destroy() pair is called. If the LLD wants to adjust the default queue settings, it can invoke -scsi_change_queue_depth() in its slave_configure() routine. +scsi_change_queue_depth() in its sdev_configure() routine. When an HBA is being removed it could be as part of an orderly shutdown associated with the LLD module being unloaded (e.g. with the "rmmod" @@ -203,7 +203,7 @@ An LLD can use this sequence to make the mid level aware of a SCSI device:: scsi_add_device() ------+ | sdev_prep() - slave_configure() [--> scsi_change_queue_depth()] + sdev_configure() [--> scsi_change_queue_depth()] In a similar fashion, an LLD may become aware that a SCSI device has been removed (unplugged) or the connection to it has been interrupted. Some @@ -222,7 +222,7 @@ upper layers with this sequence:: It may be useful for an LLD to keep track of struct scsi_device instances (a pointer is passed as the parameter to sdev_prep() and -slave_configure() callbacks). Such instances are "owned" by the mid-level. +sdev_configure() callbacks). Such instances are "owned" by the mid-level. struct scsi_device instances are freed after sdev_destroy(). @@ -337,7 +337,7 @@ Details:: * bus scan when an HBA is added (i.e. scsi_scan_host()). So it * should only be called if the HBA becomes aware of a new scsi * device (lu) after scsi_scan_host() has completed. If successful - * this call can lead to sdev_prep() and slave_configure() callbacks + * this call can lead to sdev_prep() and sdev_configure() callbacks * into the LLD. * * Defined in: drivers/scsi/scsi_scan.c @@ -380,7 +380,7 @@ Details:: * Might block: no * * Notes: Can be invoked any time on a SCSI device controlled by this - * LLD. [Specifically during and after slave_configure() and prior to + * LLD. [Specifically during and after sdev_configure() and prior to * sdev_destroy().] Can safely be invoked from interrupt code. * * Defined in: drivers/scsi/scsi.c [see source code for more notes] @@ -633,14 +633,14 @@ Interface functions are supplied (defined) by LLDs and their function pointers are placed in an instance of struct scsi_host_template which is passed to scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()]. Some are mandatory. Interface functions should be declared static. The -accepted convention is that driver "xyz" will declare its slave_configure() +accepted convention is that driver "xyz" will declare its sdev_configure() function as:: - static int xyz_slave_configure(struct scsi_device * sdev); + static int xyz_sdev_configure(struct scsi_device * sdev); and so forth for all interface functions listed below. -A pointer to this function should be placed in the 'slave_configure' member +A pointer to this function should be placed in the 'sdev_configure' member of a "struct scsi_host_template" instance. A pointer to such an instance should be passed to the mid level's scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()]. @@ -664,7 +664,7 @@ Summary: - proc_info - supports /proc/scsi/{driver_name}/{host_no} - queuecommand - queue scsi command, invoke 'done' on completion - sdev_prep - prior to any commands being sent to a new device - - slave_configure - driver fine tuning for given device after attach + - sdev_configure - driver fine tuning for given device after attach - sdev_destroy - given device is about to be shut down @@ -981,7 +981,7 @@ Details:: * prior to its initial scan. The corresponding scsi device may not * exist but the mid level is just about to scan for it (i.e. send * and INQUIRY command plus ...). If a device is found then - * slave_configure() will be called while if a device is not found + * sdev_configure() will be called while if a device is not found * sdev_destroy() is called. * For more details see the include/scsi/scsi_host.h file. * @@ -991,7 +991,7 @@ Details:: /** - * slave_configure - driver fine tuning for given device just after it + * sdev_configure - driver fine tuning for given device just after it * has been first scanned (i.e. it responded to an * INQUIRY) * @sdp: device that has just been attached @@ -1010,7 +1010,7 @@ Details:: * * Optionally defined in: LLD **/ - int slave_configure(struct scsi_device *sdp) + int sdev_configure(struct scsi_device *sdp) /** @@ -1030,7 +1030,7 @@ Details:: * commands will be sent for this sdp instance. [However the device * could be re-attached in the future in which case a new instance * of struct scsi_device would be supplied by future sdev_prep() - * and slave_configure() calls.] + * and sdev_configure() calls.] * * Optionally defined in: LLD **/ diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c index c16423e44525..68ca4de85bbc 100644 --- a/drivers/ata/libata-sata.c +++ b/drivers/ata/libata-sata.c @@ -1210,7 +1210,7 @@ void ata_sas_port_destroy(struct ata_port *ap) EXPORT_SYMBOL_GPL(ata_sas_port_destroy); /** - * ata_sas_slave_configure - Default slave_config routine for libata devices + * ata_sas_sdev_configure - Default sdev_config routine for libata devices * @sdev: SCSI device to configure * @ap: ATA port to which SCSI device is attached * @@ -1218,13 +1218,13 @@ EXPORT_SYMBOL_GPL(ata_sas_port_destroy); * Zero. */ -int ata_sas_slave_configure(struct scsi_device *sdev, struct ata_port *ap) +int ata_sas_sdev_configure(struct scsi_device *sdev, struct ata_port *ap) { ata_scsi_sdev_config(sdev); ata_scsi_dev_config(sdev, ap->link.device); return 0; } -EXPORT_SYMBOL_GPL(ata_sas_slave_configure); +EXPORT_SYMBOL_GPL(ata_sas_sdev_configure); /** * ata_sas_queuecmd - Issue SCSI cdb to libata-managed device diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bf075f2e4bd8..f5fe60074a8c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1087,7 +1087,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev) } /** - * ata_scsi_slave_config - Set SCSI device attributes + * ata_scsi_sdev_config - Set SCSI device attributes * @sdev: SCSI device to examine * * This is called before we actually start reading @@ -1098,7 +1098,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev) * Defined by SCSI layer. We don't really care. */ -int ata_scsi_slave_config(struct scsi_device *sdev) +int ata_scsi_sdev_config(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev = __ata_scsi_find_dev(ap, sdev); @@ -1111,7 +1111,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev) return rc; } -EXPORT_SYMBOL_GPL(ata_scsi_slave_config); +EXPORT_SYMBOL_GPL(ata_scsi_sdev_config); /** * ata_scsi_sdev_destroy - SCSI device is about to be destroyed diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index e47a28271f5b..09490cf02b37 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c @@ -796,7 +796,7 @@ static void pata_macio_reset_hw(struct pata_macio_priv *priv, int resume) /* Hook the standard slave config to fixup some HW related alignment * restrictions */ -static int pata_macio_slave_config(struct scsi_device *sdev) +static int pata_macio_sdev_config(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct pata_macio_priv *priv = ap->private_data; @@ -805,7 +805,7 @@ static int pata_macio_slave_config(struct scsi_device *sdev) int rc; /* First call original */ - rc = ata_scsi_slave_config(sdev); + rc = ata_scsi_sdev_config(sdev); if (rc) return rc; @@ -922,7 +922,7 @@ static struct scsi_host_template pata_macio_sht = { * use 64K minus 256 */ .max_segment_size = MAX_DBDMA_SEG, - .slave_configure = pata_macio_slave_config, + .sdev_configure = pata_macio_sdev_config, }; static struct ata_port_operations pata_macio_ops = { diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index eb9dc14e5147..fc3c13439ecb 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -295,7 +295,7 @@ static void nv_nf2_freeze(struct ata_port *ap); static void nv_nf2_thaw(struct ata_port *ap); static void nv_ck804_freeze(struct ata_port *ap); static void nv_ck804_thaw(struct ata_port *ap); -static int nv_adma_slave_config(struct scsi_device *sdev); +static int nv_adma_sdev_config(struct scsi_device *sdev); static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc); static enum ata_completion_errors nv_adma_qc_prep(struct ata_queued_cmd *qc); static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc); @@ -317,7 +317,7 @@ static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf); static void nv_mcp55_thaw(struct ata_port *ap); static void nv_mcp55_freeze(struct ata_port *ap); static void nv_swncq_error_handler(struct ata_port *ap); -static int nv_swncq_slave_config(struct scsi_device *sdev); +static int nv_swncq_sdev_config(struct scsi_device *sdev); static int nv_swncq_port_start(struct ata_port *ap); static enum ata_completion_errors nv_swncq_qc_prep(struct ata_queued_cmd *qc); static void nv_swncq_fill_sg(struct ata_queued_cmd *qc); @@ -379,7 +379,7 @@ static struct scsi_host_template nv_adma_sht = { .can_queue = NV_ADMA_MAX_CPBS, .sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN, .dma_boundary = NV_ADMA_DMA_BOUNDARY, - .slave_configure = nv_adma_slave_config, + .sdev_configure = nv_adma_sdev_config, }; static struct scsi_host_template nv_swncq_sht = { @@ -387,7 +387,7 @@ static struct scsi_host_template nv_swncq_sht = { .can_queue = ATA_MAX_QUEUE - 1, .sg_tablesize = LIBATA_MAX_PRD, .dma_boundary = ATA_DMA_BOUNDARY, - .slave_configure = nv_swncq_slave_config, + .sdev_configure = nv_swncq_sdev_config, }; /* @@ -654,7 +654,7 @@ static void nv_adma_mode(struct ata_port *ap) pp->flags &= ~NV_ADMA_PORT_REGISTER_MODE; } -static int nv_adma_slave_config(struct scsi_device *sdev) +static int nv_adma_sdev_config(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct nv_adma_port_priv *pp = ap->private_data; @@ -666,7 +666,7 @@ static int nv_adma_slave_config(struct scsi_device *sdev) int adma_enable; u32 current_reg, new_reg, config_mask; - rc = ata_scsi_slave_config(sdev); + rc = ata_scsi_sdev_config(sdev); if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun) /* Not a proper libata device, ignore */ @@ -1877,7 +1877,7 @@ static void nv_swncq_host_init(struct ata_host *host) writel(~0x0, mmio + NV_INT_STATUS_MCP55); } -static int nv_swncq_slave_config(struct scsi_device *sdev) +static int nv_swncq_sdev_config(struct scsi_device *sdev) { struct ata_port *ap = ata_shost_to_port(sdev->host); struct pci_dev *pdev = to_pci_dev(ap->host->dev); @@ -1887,7 +1887,7 @@ static int nv_swncq_slave_config(struct scsi_device *sdev) u8 check_maxtor = 0; unsigned char model_num[ATA_ID_PROD_LEN + 1]; - rc = ata_scsi_slave_config(sdev); + rc = ata_scsi_sdev_config(sdev); if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun) /* Not a proper libata device, ignore */ return rc; diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 5b1cba288550..9afd65a779b0 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1510,7 +1510,7 @@ static int sbp2_scsi_sdev_prep(struct scsi_device *sdev) return 0; } -static int sbp2_scsi_slave_configure(struct scsi_device *sdev) +static int sbp2_scsi_sdev_configure(struct scsi_device *sdev) { struct sbp2_logical_unit *lu = sdev->hostdata; @@ -1589,7 +1589,7 @@ static struct scsi_host_template scsi_driver_template = { .proc_name = "sbp2", .queuecommand = sbp2_scsi_queuecommand, .sdev_prep = sbp2_scsi_sdev_prep, - .slave_configure = sbp2_scsi_slave_configure, + .sdev_configure = sbp2_scsi_sdev_configure, .eh_abort_handler = sbp2_scsi_abort, .this_id = -1, .sg_tablesize = SG_ALL, diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index d8fcd21ab472..c90561edba5a 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2876,7 +2876,7 @@ static int srp_target_alloc(struct scsi_target *starget) return 0; } -static int srp_slave_configure(struct scsi_device *sdev) +static int srp_sdev_configure(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; struct srp_target_port *target = host_to_target(shost); @@ -3078,7 +3078,7 @@ static struct scsi_host_template srp_template = { .name = "InfiniBand SRP initiator", .proc_name = DRV_NAME, .target_alloc = srp_target_alloc, - .slave_configure = srp_slave_configure, + .sdev_configure = srp_sdev_configure, .info = srp_target_info, .queuecommand = srp_queuecommand, .change_queue_depth = srp_change_queue_depth, diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 5c7556844a76..0a16f1fb1405 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -114,7 +114,7 @@ static struct scsi_host_template mptfc_driver_template = { .queuecommand = mptfc_qcmd, .target_alloc = mptfc_target_alloc, .sdev_prep = mptfc_sdev_prep, - .slave_configure = mptscsih_slave_configure, + .sdev_configure = mptscsih_sdev_configure, .target_destroy = mptfc_target_destroy, .sdev_destroy = mptscsih_sdev_destroy, .change_queue_depth = mptscsih_change_queue_depth, diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index c393e2ee8373..855366716161 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -1682,7 +1682,7 @@ mptsas_firmware_event_work(struct work_struct *work) static int -mptsas_slave_configure(struct scsi_device *sdev) +mptsas_sdev_configure(struct scsi_device *sdev) { struct Scsi_Host *host = sdev->host; MPT_SCSI_HOST *hd = shost_priv(host); @@ -1708,7 +1708,7 @@ mptsas_slave_configure(struct scsi_device *sdev) mptsas_add_device_component_starget(ioc, scsi_target(sdev)); out: - return mptscsih_slave_configure(sdev); + return mptscsih_sdev_configure(sdev); } static int @@ -1978,7 +1978,7 @@ static struct scsi_host_template mptsas_driver_template = { .queuecommand = mptsas_qcmd, .target_alloc = mptsas_target_alloc, .sdev_prep = mptsas_sdev_prep, - .slave_configure = mptsas_slave_configure, + .sdev_configure = mptsas_sdev_configure, .target_destroy = mptsas_target_destroy, .sdev_destroy = mptscsih_sdev_destroy, .change_queue_depth = mptscsih_change_queue_depth, diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index e7d78e73b236..f2ebef5c9149 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -2346,7 +2346,7 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) * Return non-zero if fails. */ int -mptscsih_slave_configure(struct scsi_device *sdev) +mptscsih_sdev_configure(struct scsi_device *sdev) { struct Scsi_Host *sh = sdev->host; VirtTarget *vtarget; @@ -3244,7 +3244,7 @@ EXPORT_SYMBOL(mptscsih_show_info); EXPORT_SYMBOL(mptscsih_info); EXPORT_SYMBOL(mptscsih_qcmd); EXPORT_SYMBOL(mptscsih_sdev_destroy); -EXPORT_SYMBOL(mptscsih_slave_configure); +EXPORT_SYMBOL(mptscsih_sdev_configure); EXPORT_SYMBOL(mptscsih_abort); EXPORT_SYMBOL(mptscsih_dev_reset); EXPORT_SYMBOL(mptscsih_bus_reset); diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index 09bab23a9abb..f6c26a71f948 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h @@ -117,7 +117,7 @@ extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt); extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u64 lun, int ctx2abort, ulong timeout); extern void mptscsih_sdev_destroy(struct scsi_device *device); -extern int mptscsih_slave_configure(struct scsi_device *device); +extern int mptscsih_sdev_configure(struct scsi_device *device); extern int mptscsih_abort(struct scsi_cmnd * SCpnt); extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt); extern int mptscsih_bus_reset(struct scsi_cmnd * SCpnt); diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index ec8a5396661d..afe2dc4603d1 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -746,7 +746,7 @@ static int mptspi_sdev_prep(struct scsi_device *sdev) return 0; } -static int mptspi_slave_configure(struct scsi_device *sdev) +static int mptspi_sdev_configure(struct scsi_device *sdev) { struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host); VirtTarget *vtarget = scsi_target(sdev)->hostdata; @@ -754,7 +754,7 @@ static int mptspi_slave_configure(struct scsi_device *sdev) mptspi_initTarget(hd, vtarget, sdev); - ret = mptscsih_slave_configure(sdev); + ret = mptscsih_sdev_configure(sdev); if (ret) return ret; @@ -829,7 +829,7 @@ static struct scsi_host_template mptspi_driver_template = { .queuecommand = mptspi_qcmd, .target_alloc = mptspi_target_alloc, .sdev_prep = mptspi_sdev_prep, - .slave_configure = mptspi_slave_configure, + .sdev_configure = mptspi_sdev_configure, .target_destroy = mptspi_target_destroy, .sdev_destroy = mptspi_sdev_destroy, .change_queue_depth = mptscsih_change_queue_depth, diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 1f95c38738e3..67bd30d4f4cc 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -49,7 +49,7 @@ static void zfcp_scsi_sdev_destroy(struct scsi_device *sdev) put_device(&zfcp_sdev->port->dev); } -static int zfcp_scsi_slave_configure(struct scsi_device *sdp) +static int zfcp_scsi_sdev_configure(struct scsi_device *sdp) { if (sdp->tagged_supported) scsi_change_queue_depth(sdp, default_depth); @@ -428,7 +428,7 @@ static struct scsi_host_template zfcp_scsi_host_template = { .eh_target_reset_handler = zfcp_scsi_eh_target_reset_handler, .eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler, .sdev_prep = zfcp_scsi_sdev_prep, - .slave_configure = zfcp_scsi_slave_configure, + .sdev_configure = zfcp_scsi_sdev_configure, .sdev_destroy = zfcp_scsi_sdev_destroy, .change_queue_depth = scsi_change_queue_depth, .host_reset = zfcp_scsi_sysfs_host_reset, diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 3337b1e80412..d96af97a6416 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -1976,13 +1976,13 @@ static char *twa_string_lookup(twa_message_type *table, unsigned int code) } /* End twa_string_lookup() */ /* This function gets called when a disk is coming on-line */ -static int twa_slave_configure(struct scsi_device *sdev) +static int twa_sdev_configure(struct scsi_device *sdev) { /* Force 60 second timeout */ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); return 0; -} /* End twa_slave_configure() */ +} /* End twa_sdev_configure() */ /* scsi_host_template initializer */ static struct scsi_host_template driver_template = { @@ -1993,7 +1993,7 @@ static struct scsi_host_template driver_template = { .bios_param = twa_scsi_biosparam, .change_queue_depth = scsi_change_queue_depth, .can_queue = TW_Q_LENGTH-2, - .slave_configure = twa_slave_configure, + .sdev_configure = twa_sdev_configure, .this_id = -1, .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index dda6fa857709..866bcdef6253 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c @@ -1529,13 +1529,13 @@ static void twl_shutdown(struct pci_dev *pdev) } /* End twl_shutdown() */ /* This function configures unit settings when a unit is coming on-line */ -static int twl_slave_configure(struct scsi_device *sdev) +static int twl_sdev_configure(struct scsi_device *sdev) { /* Force 60 second timeout */ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); return 0; -} /* End twl_slave_configure() */ +} /* End twl_sdev_configure() */ /* scsi_host_template initializer */ static struct scsi_host_template driver_template = { @@ -1546,7 +1546,7 @@ static struct scsi_host_template driver_template = { .bios_param = twl_scsi_biosparam, .change_queue_depth = scsi_change_queue_depth, .can_queue = TW_Q_LENGTH-2, - .slave_configure = twl_slave_configure, + .sdev_configure = twl_sdev_configure, .this_id = -1, .sg_tablesize = TW_LIBERATOR_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index fb6444d0409c..2a98ef686ff4 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -172,7 +172,7 @@ Initialize queues correctly when loading with no valid units. 1.02.00.034 - Fix tw_decode_bits() to handle multiple errors. Add support for user configurable cmd_per_lun. - Add support for sht->slave_configure(). + Add support for sht->sdev_configure(). 1.02.00.035 - Improve tw_allocate_memory() memory allocation. Fix tw_chrdev_ioctl() to sleep correctly. 1.02.00.036 - Increase character ioctl timeout to 60 seconds. @@ -2224,13 +2224,13 @@ static void tw_shutdown(struct pci_dev *pdev) } /* End tw_shutdown() */ /* This function gets called when a disk is coming online */ -static int tw_slave_configure(struct scsi_device *sdev) +static int tw_sdev_configure(struct scsi_device *sdev) { /* Force 60 second timeout */ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); return 0; -} /* End tw_slave_configure() */ +} /* End tw_sdev_configure() */ static struct scsi_host_template driver_template = { .module = THIS_MODULE, @@ -2240,7 +2240,7 @@ static struct scsi_host_template driver_template = { .bios_param = tw_scsi_biosparam, .change_queue_depth = scsi_change_queue_depth, .can_queue = TW_Q_LENGTH-2, - .slave_configure = tw_slave_configure, + .sdev_configure = tw_sdev_configure, .this_id = -1, .sg_tablesize = TW_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 95c71fba16a2..cdb7acbca8ce 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -160,7 +160,7 @@ STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); STATIC void NCR_700_chip_setup(struct Scsi_Host *host); STATIC void NCR_700_chip_reset(struct Scsi_Host *host); STATIC int NCR_700_sdev_prep(struct scsi_device *SDpnt); -STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); +STATIC int NCR_700_sdev_configure(struct scsi_device *SDpnt); STATIC void NCR_700_sdev_destroy(struct scsi_device *SDpnt); static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); @@ -306,7 +306,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; tpnt->sg_tablesize = NCR_700_SG_SEGMENTS; tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN; - tpnt->slave_configure = NCR_700_slave_configure; + tpnt->sdev_configure = NCR_700_sdev_configure; tpnt->sdev_destroy = NCR_700_sdev_destroy; tpnt->sdev_prep = NCR_700_sdev_prep; tpnt->change_queue_depth = NCR_700_change_queue_depth; @@ -2018,7 +2018,7 @@ NCR_700_sdev_prep(struct scsi_device *SDp) } STATIC int -NCR_700_slave_configure(struct scsi_device *SDp) +NCR_700_sdev_configure(struct scsi_device *SDp) { struct NCR_700_Host_Parameters *hostdata = (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index bb49d83cadc7..45152740c80e 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -2304,14 +2304,14 @@ static void __init blogic_inithoststruct(struct blogic_adapter *adapter, } /* - blogic_slaveconfig will actually set the queue depth on individual + blogic_sdev_config will actually set the queue depth on individual scsi devices as they are permanently added to the device chain. We shamelessly rip off the SelectQueueDepths code to make this work mostly like it used to. Since we don't get called once at the end of the scan but instead get called for each device, we have to do things a bit differently. */ -static int blogic_slaveconfig(struct scsi_device *dev) +static int blogic_sdev_config(struct scsi_device *dev) { struct blogic_adapter *adapter = (struct blogic_adapter *) dev->host->hostdata; @@ -3845,7 +3845,7 @@ static struct scsi_host_template blogic_template = { .name = "BusLogic", .info = blogic_drvr_info, .queuecommand = blogic_qcmd, - .slave_configure = blogic_slaveconfig, + .sdev_configure = blogic_sdev_config, .bios_param = blogic_diskparam, .eh_host_reset_handler = blogic_hostreset, #if 0 diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h index 6182cc8a0344..4f1f05da2031 100644 --- a/drivers/scsi/BusLogic.h +++ b/drivers/scsi/BusLogic.h @@ -1285,7 +1285,6 @@ static inline void blogic_incszbucket(unsigned int *cmdsz_buckets, static const char *blogic_drvr_info(struct Scsi_Host *); static int blogic_qcmd(struct Scsi_Host *h, struct scsi_cmnd *); static int blogic_diskparam(struct scsi_device *, struct block_device *, sector_t, int *); -static int blogic_slaveconfig(struct scsi_device *); static void blogic_qcompleted_ccb(struct blogic_ccb *); static irqreturn_t blogic_inthandler(int, void *); static int blogic_resetadapter(struct blogic_adapter *, bool hard_reset); diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a308e86a97f1..f0d2dffb5bea 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -378,7 +378,7 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, } /** - * aac_slave_configure - compute queue depths + * aac_sdev_configure - compute queue depths * @sdev: SCSI device we are considering * * Selects queue depths for each target device based on the host adapter's @@ -386,7 +386,7 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, * A queue depth of one automatically disables tagged queueing. */ -static int aac_slave_configure(struct scsi_device *sdev) +static int aac_sdev_configure(struct scsi_device *sdev) { struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; int chn, tid; @@ -1541,7 +1541,7 @@ static struct scsi_host_template aac_driver_template = { .queuecommand = aac_queuecommand, .bios_param = aac_biosparm, .shost_attrs = aac_attrs, - .slave_configure = aac_slave_configure, + .sdev_configure = aac_sdev_configure, .change_queue_depth = aac_change_queue_depth, .sdev_attrs = aac_dev_attrs, .eh_abort_handler = aac_eh_abort, diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index c2c7850ff7b4..6846bbf109aa 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -4545,7 +4545,7 @@ static int AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc) /* * Microcode operating variables for WDTR, SDTR, and command tag - * queuing will be set in slave_configure() based on what a + * queuing will be set in sdev_configure() based on what a * device reports it is capable of in Inquiry byte 7. * * If SCSI Bus Resets have been disabled, then directly set @@ -5062,7 +5062,7 @@ static int AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc) /* * Microcode operating variables for WDTR, SDTR, and command tag - * queuing will be set in slave_configure() based on what a + * queuing will be set in sdev_configure() based on what a * device reports it is capable of in Inquiry byte 7. * * If SCSI Bus Resets have been disabled, then directly set @@ -5557,7 +5557,7 @@ static int AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc) /* * Microcode operating variables for WDTR, SDTR, and command tag - * queuing will be set in slave_configure() based on what a + * queuing will be set in sdev_configure() based on what a * device reports it is capable of in Inquiry byte 7. * * If SCSI Bus Resets have been disabled, then directly set @@ -7305,7 +7305,7 @@ static void AscAsyncFix(ASC_DVC_VAR *asc_dvc, struct scsi_device *sdev) } static void -advansys_narrow_slave_configure(struct scsi_device *sdev, ASC_DVC_VAR *asc_dvc) +advansys_narrow_sdev_configure(struct scsi_device *sdev, ASC_DVC_VAR *asc_dvc) { ASC_SCSI_BIT_ID_TYPE tid_bit = 1 << sdev->id; ASC_SCSI_BIT_ID_TYPE orig_use_tagged_qng = asc_dvc->use_tagged_qng; @@ -7431,7 +7431,7 @@ static void advansys_wide_enable_ppr(ADV_DVC_VAR *adv_dvc, } static void -advansys_wide_slave_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc) +advansys_wide_sdev_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc) { AdvPortAddr iop_base = adv_dvc->iop_base; unsigned short tidmask = 1 << sdev->id; @@ -7477,15 +7477,15 @@ advansys_wide_slave_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc) * Set the number of commands to queue per device for the * specified host adapter. */ -static int advansys_slave_configure(struct scsi_device *sdev) +static int advansys_sdev_configure(struct scsi_device *sdev) { struct asc_board *boardp = shost_priv(sdev->host); if (ASC_NARROW_BOARD(boardp)) - advansys_narrow_slave_configure(sdev, + advansys_narrow_sdev_configure(sdev, &boardp->dvc_var.asc_dvc_var); else - advansys_wide_slave_configure(sdev, + advansys_wide_sdev_configure(sdev, &boardp->dvc_var.adv_dvc_var); return 0; @@ -10797,7 +10797,7 @@ static struct scsi_host_template advansys_template = { .queuecommand = advansys_queuecommand, .eh_host_reset_handler = advansys_reset, .bios_param = advansys_biosparam, - .slave_configure = advansys_slave_configure, + .sdev_configure = advansys_sdev_configure, /* * Because the driver may control an ISA adapter 'unchecked_isa_dma' * must be set. The flag will be cleared in advansys_board_found diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 5f41d1ec10ee..2dcfdf256ac1 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -698,7 +698,7 @@ ahd_linux_sdev_prep(struct scsi_device *sdev) } static int -ahd_linux_slave_configure(struct scsi_device *sdev) +ahd_linux_sdev_configure(struct scsi_device *sdev) { struct ahd_softc *ahd; @@ -914,7 +914,7 @@ struct scsi_host_template aic79xx_driver_template = { .max_sectors = 8192, .cmd_per_lun = 2, .sdev_prep = ahd_linux_sdev_prep, - .slave_configure = ahd_linux_slave_configure, + .sdev_configure = ahd_linux_sdev_configure, .target_alloc = ahd_linux_target_alloc, .target_destroy = ahd_linux_target_destroy, }; diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 4350a941e060..0690dd67b5d5 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -669,7 +669,7 @@ ahc_linux_sdev_prep(struct scsi_device *sdev) } static int -ahc_linux_slave_configure(struct scsi_device *sdev) +ahc_linux_sdev_configure(struct scsi_device *sdev) { struct ahc_softc *ahc; @@ -801,7 +801,7 @@ struct scsi_host_template aic7xxx_driver_template = { .max_sectors = 8192, .cmd_per_lun = 2, .sdev_prep = ahc_linux_sdev_prep, - .slave_configure = ahc_linux_slave_configure, + .sdev_configure = ahc_linux_sdev_configure, .target_alloc = ahc_linux_target_alloc, .target_destroy = ahc_linux_target_destroy, }; diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index bef47f38dd0d..18163b13e954 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -42,7 +42,7 @@ static struct scsi_host_template aic94xx_sht = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + .sdev_configure = sas_sdev_configure, .scan_finished = asd_scan_finished, .scan_start = asd_scan_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index d93524ab1a47..32e36e69dc0b 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -786,7 +786,7 @@ bfad_thread_workq(struct bfad_s *bfad) * Return non-zero if fails. */ static int -bfad_im_slave_configure(struct scsi_device *sdev) +bfad_im_sdev_configure(struct scsi_device *sdev) { scsi_change_queue_depth(sdev, bfa_lun_queue_depth); return 0; @@ -803,7 +803,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { .eh_target_reset_handler = bfad_im_reset_target_handler, .sdev_prep = bfad_im_sdev_prep, - .slave_configure = bfad_im_slave_configure, + .sdev_configure = bfad_im_sdev_configure, .sdev_destroy = bfad_im_sdev_destroy, .this_id = -1, @@ -825,7 +825,7 @@ struct scsi_host_template bfad_im_vport_template = { .eh_target_reset_handler = bfad_im_reset_target_handler, .sdev_prep = bfad_im_sdev_prep, - .slave_configure = bfad_im_slave_configure, + .sdev_configure = bfad_im_sdev_configure, .sdev_destroy = bfad_im_sdev_destroy, .this_id = -1, diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 97b022a324fb..4847edd7552a 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2670,7 +2670,7 @@ static int bnx2fc_cpu_offline(unsigned int cpu) return 0; } -static int bnx2fc_slave_configure(struct scsi_device *sdev) +static int bnx2fc_sdev_configure(struct scsi_device *sdev) { if (!bnx2fc_queue_depth) return 0; @@ -2976,7 +2976,7 @@ static struct scsi_host_template bnx2fc_shost_template = { .dma_boundary = 0x7fff, .max_sectors = 0x3fbf, .track_queue_depth = 1, - .slave_configure = bnx2fc_slave_configure, + .sdev_configure = bnx2fc_sdev_configure, .shost_attrs = bnx2fc_host_attrs, }; diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index cd53c2ed31fb..00c38c9f9619 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -2232,7 +2232,7 @@ csio_sdev_prep(struct scsi_device *sdev) } static int -csio_slave_configure(struct scsi_device *sdev) +csio_sdev_configure(struct scsi_device *sdev) { scsi_change_queue_depth(sdev, csio_lun_qdepth); return 0; @@ -2271,7 +2271,7 @@ struct scsi_host_template csio_fcoe_shost_template = { .eh_abort_handler = csio_eh_abort_handler, .eh_device_reset_handler = csio_eh_lun_reset_handler, .sdev_prep = csio_sdev_prep, - .slave_configure = csio_slave_configure, + .sdev_configure = csio_sdev_configure, .sdev_destroy = csio_sdev_destroy, .scan_finished = csio_scan_finished, .this_id = -1, @@ -2290,7 +2290,7 @@ struct scsi_host_template csio_fcoe_shost_vport_template = { .eh_abort_handler = csio_eh_abort_handler, .eh_device_reset_handler = csio_eh_lun_reset_handler, .sdev_prep = csio_sdev_prep, - .slave_configure = csio_slave_configure, + .sdev_configure = csio_sdev_configure, .sdev_destroy = csio_sdev_destroy, .scan_finished = csio_scan_finished, .this_id = -1, diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 0497ef6a9453..0342524c5aa5 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -405,7 +405,7 @@ static void adpt_inquiry(adpt_hba* pHba) } -static int adpt_slave_configure(struct scsi_device * device) +static int adpt_sdev_configure(struct scsi_device * device) { struct Scsi_Host *host = device->host; adpt_hba* pHba; @@ -3507,7 +3507,7 @@ static struct scsi_host_template driver_template = { .eh_bus_reset_handler = adpt_bus_reset, .eh_host_reset_handler = adpt_reset, .bios_param = adpt_bios_param, - .slave_configure = adpt_slave_configure, + .sdev_configure = adpt_sdev_configure, .can_queue = MAX_TO_IOP_MESSAGES, .this_id = 7, }; diff --git a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h index 8a079e8d7f65..f91e0d1ff9f6 100644 --- a/drivers/scsi/dpti.h +++ b/drivers/scsi/dpti.h @@ -29,7 +29,7 @@ static int adpt_detect(struct scsi_host_template * sht); static int adpt_queue(struct Scsi_Host *h, struct scsi_cmnd * cmd); static int adpt_abort(struct scsi_cmnd * cmd); static int adpt_reset(struct scsi_cmnd* cmd); -static int adpt_slave_configure(struct scsi_device *); +static int adpt_sdev_configure(struct scsi_device *); static const char *adpt_info(struct Scsi_Host *pSHost); static int adpt_bios_param(struct scsi_device * sdev, struct block_device *dev, diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 70390b43fd9e..14c8b9cf2a69 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -2272,7 +2272,7 @@ static void esp_init_swstate(struct esp *esp) INIT_LIST_HEAD(&esp->active_cmds); INIT_LIST_HEAD(&esp->esp_cmd_pool); - /* Start with a clear state, domain validation (via ->slave_configure, + /* Start with a clear state, domain validation (via ->sdev_configure, * spi_dv_device()) will attempt to enable SYNC, WIDE, and tagged * commands. */ @@ -2474,7 +2474,7 @@ static int esp_sdev_prep(struct scsi_device *dev) return 0; } -static int esp_slave_configure(struct scsi_device *dev) +static int esp_sdev_configure(struct scsi_device *dev) { struct esp *esp = shost_priv(dev->host); struct esp_target_data *tp = &esp->target[dev->id]; @@ -2679,7 +2679,7 @@ struct scsi_host_template scsi_esp_template = { .target_alloc = esp_target_alloc, .target_destroy = esp_target_destroy, .sdev_prep = esp_sdev_prep, - .slave_configure = esp_slave_configure, + .sdev_configure = esp_sdev_configure, .sdev_destroy = esp_sdev_destroy, .eh_abort_handler = esp_eh_abort_handler, .eh_bus_reset_handler = esp_eh_bus_reset_handler, diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 7f150d52b4a6..0e58f0636ba2 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -4061,7 +4061,7 @@ static void gdth_flush(gdth_ha_str *ha) } /* configure lun */ -static int gdth_slave_configure(struct scsi_device *sdev) +static int gdth_sdev_configure(struct scsi_device *sdev) { sdev->skip_ms_page_3f = 1; sdev->skip_ms_page_8 = 1; @@ -4073,7 +4073,7 @@ static struct scsi_host_template gdth_template = { .info = gdth_info, .queuecommand = gdth_queuecommand, .eh_bus_reset_handler = gdth_eh_bus_reset, - .slave_configure = gdth_slave_configure, + .sdev_configure = gdth_sdev_configure, .bios_param = gdth_bios_param, .show_info = gdth_show_info, .write_info = gdth_set_info, diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 2bdd64648ef0..b3622e39c594 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -614,7 +614,7 @@ extern int hisi_sas_probe(struct platform_device *pdev, const struct hisi_sas_hw *ops); extern int hisi_sas_remove(struct platform_device *pdev); -extern int hisi_sas_slave_configure(struct scsi_device *sdev); +extern int hisi_sas_sdev_configure(struct scsi_device *sdev); extern int hisi_sas_scan_finished(struct Scsi_Host *shost, unsigned long time); extern void hisi_sas_scan_start(struct Scsi_Host *shost); extern int hisi_sas_host_reset(struct Scsi_Host *shost, int reset_type); diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 11caa4b0d797..1468649c48d4 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -807,10 +807,10 @@ static int hisi_sas_dev_found(struct domain_device *device) return rc; } -int hisi_sas_slave_configure(struct scsi_device *sdev) +int hisi_sas_sdev_configure(struct scsi_device *sdev) { struct domain_device *dev = sdev_to_domain_dev(sdev); - int ret = sas_slave_configure(sdev); + int ret = sas_sdev_configure(sdev); if (ret) return ret; @@ -819,7 +819,7 @@ int hisi_sas_slave_configure(struct scsi_device *sdev) return 0; } -EXPORT_SYMBOL_GPL(hisi_sas_slave_configure); +EXPORT_SYMBOL_GPL(hisi_sas_sdev_configure); void hisi_sas_scan_start(struct Scsi_Host *shost) { diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 09a7669dad4c..2a006cd5dc16 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1758,7 +1758,7 @@ static struct scsi_host_template sht_v1_hw = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = hisi_sas_slave_configure, + .sdev_configure = hisi_sas_sdev_configure, .scan_finished = hisi_sas_scan_finished, .scan_start = hisi_sas_scan_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 968d38702353..fb355d9466fc 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3534,7 +3534,7 @@ static struct scsi_host_template sht_v2_hw = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = hisi_sas_slave_configure, + .sdev_configure = hisi_sas_sdev_configure, .scan_finished = hisi_sas_scan_finished, .scan_start = hisi_sas_scan_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 55e2321a65bc..f393962a3c06 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -3077,7 +3077,7 @@ static struct scsi_host_template sht_v3_hw = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = hisi_sas_slave_configure, + .sdev_configure = hisi_sas_sdev_configure, .scan_finished = hisi_sas_scan_finished, .scan_start = hisi_sas_scan_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 7278f2a01983..d81a366e1b0d 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -284,7 +284,7 @@ static int hpsa_change_queue_depth(struct scsi_device *sdev, int qdepth); static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd); static int hpsa_sdev_prep(struct scsi_device *sdev); -static int hpsa_slave_configure(struct scsi_device *sdev); +static int hpsa_sdev_configure(struct scsi_device *sdev); static void hpsa_sdev_destroy(struct scsi_device *sdev); static void hpsa_update_scsi_devices(struct ctlr_info *h); @@ -975,7 +975,7 @@ static struct scsi_host_template hpsa_driver_template = { .eh_device_reset_handler = hpsa_eh_device_reset_handler, .ioctl = hpsa_ioctl, .sdev_prep = hpsa_sdev_prep, - .slave_configure = hpsa_slave_configure, + .sdev_configure = hpsa_sdev_configure, .sdev_destroy = hpsa_sdev_destroy, #ifdef CONFIG_COMPAT .compat_ioctl = hpsa_compat_ioctl, @@ -2134,7 +2134,7 @@ static int hpsa_sdev_prep(struct scsi_device *sdev) } /* configure scsi device based on internal per-device structure */ -static int hpsa_slave_configure(struct scsi_device *sdev) +static int hpsa_sdev_configure(struct scsi_device *sdev) { struct hpsa_scsi_dev_t *sd; int queue_depth; diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index 6a2561f26e38..9d6396714753 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -1157,7 +1157,7 @@ static struct device_attribute *hptiop_attrs[] = { NULL }; -static int hptiop_slave_config(struct scsi_device *sdev) +static int hptiop_sdev_config(struct scsi_device *sdev) { if (sdev->type == TYPE_TAPE) blk_queue_max_hw_sectors(sdev->request_queue, 8192); @@ -1174,7 +1174,7 @@ static struct scsi_host_template driver_template = { .emulated = 0, .proc_name = driver_name, .shost_attrs = hptiop_attrs, - .slave_configure = hptiop_slave_config, + .sdev_configure = hptiop_sdev_config, .this_id = -1, .change_queue_depth = hptiop_adjust_disk_queue_depth, }; diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 1038689057f0..c7bb93ecacbd 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -2902,7 +2902,7 @@ static int ibmvfc_target_alloc(struct scsi_target *starget) } /** - * ibmvfc_slave_configure - Configure the device + * ibmvfc_sdev_configure - Configure the device * @sdev: struct scsi_device device to configure * * Enable allow_restart for a device if it is a disk. Adjust the @@ -2911,7 +2911,7 @@ static int ibmvfc_target_alloc(struct scsi_target *starget) * Returns: * 0 **/ -static int ibmvfc_slave_configure(struct scsi_device *sdev) +static int ibmvfc_sdev_configure(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; unsigned long flags = 0; @@ -3118,7 +3118,7 @@ static struct scsi_host_template driver_template = { .eh_target_reset_handler = ibmvfc_eh_target_reset_handler, .eh_host_reset_handler = ibmvfc_eh_host_reset_handler, .sdev_prep = ibmvfc_sdev_prep, - .slave_configure = ibmvfc_slave_configure, + .sdev_configure = ibmvfc_sdev_configure, .target_alloc = ibmvfc_target_alloc, .scan_finished = ibmvfc_scan_finished, .change_queue_depth = ibmvfc_change_queue_depth, diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index b1f3017b6547..7e08c1109720 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -1843,14 +1843,14 @@ static void ibmvscsi_handle_crq(struct viosrp_crq *crq, } /** - * ibmvscsi_slave_configure: Set the "allow_restart" flag for each disk. + * ibmvscsi_sdev_configure: Set the "allow_restart" flag for each disk. * @sdev: struct scsi_device device to configure * * Enable allow_restart for a device if it is a disk. Adjust the * queue_depth here also as is required by the documentation for * struct scsi_host_template. */ -static int ibmvscsi_slave_configure(struct scsi_device *sdev) +static int ibmvscsi_sdev_configure(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; unsigned long lock_flags = 0; @@ -2073,7 +2073,7 @@ static struct scsi_host_template driver_template = { .eh_abort_handler = ibmvscsi_eh_abort_handler, .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler, .eh_host_reset_handler = ibmvscsi_eh_host_reset_handler, - .slave_configure = ibmvscsi_slave_configure, + .sdev_configure = ibmvscsi_sdev_configure, .change_queue_depth = ibmvscsi_change_queue_depth, .host_reset = ibmvscsi_host_reset, .cmd_per_lun = IBMVSCSI_CMDS_PER_LUN_DEFAULT, diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 7d783b5e7b6f..175ee8739d9b 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4918,7 +4918,7 @@ static void ipr_sdev_destroy(struct scsi_device *sdev) } /** - * ipr_slave_configure - Configure a SCSI device + * ipr_sdev_configure - Configure a SCSI device * @sdev: scsi device struct * * This function configures the specified scsi device. @@ -4926,7 +4926,7 @@ static void ipr_sdev_destroy(struct scsi_device *sdev) * Return value: * 0 on success **/ -static int ipr_slave_configure(struct scsi_device *sdev) +static int ipr_sdev_configure(struct scsi_device *sdev) { struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; struct ipr_resource_entry *res; @@ -4956,7 +4956,7 @@ static int ipr_slave_configure(struct scsi_device *sdev) if (ap) { scsi_change_queue_depth(sdev, IPR_MAX_CMD_PER_ATA_LUN); - ata_sas_slave_configure(sdev, ap); + ata_sas_sdev_configure(sdev, ap); } if (ioa_cfg->sis64) @@ -6736,7 +6736,7 @@ static struct scsi_host_template driver_template = { .eh_device_reset_handler = ipr_eh_dev_reset, .eh_host_reset_handler = ipr_eh_host_reset, .sdev_prep = ipr_sdev_prep, - .slave_configure = ipr_slave_configure, + .sdev_configure = ipr_sdev_configure, .sdev_destroy = ipr_sdev_destroy, .scan_finished = ipr_scan_finished, .target_alloc = ipr_target_alloc, diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index f25672982c5f..a998a355b37f 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -360,7 +360,7 @@ static struct scsi_host_template ips_driver_template = { .proc_name = "ips", .show_info = ips_show_info, .write_info = ips_write_info, - .slave_configure = ips_slave_configure, + .sdev_configure = ips_sdev_configure, .bios_param = ips_biosparam, .this_id = -1, .sg_tablesize = IPS_MAX_SG, @@ -1180,7 +1180,7 @@ static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, /****************************************************************************/ /* */ -/* Routine Name: ips_slave_configure */ +/* Routine Name: ips_sdev_configure */ /* */ /* Routine Description: */ /* */ @@ -1188,7 +1188,7 @@ static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, /* */ /****************************************************************************/ static int -ips_slave_configure(struct scsi_device * SDptr) +ips_sdev_configure(struct scsi_device * SDptr) { ips_ha_t *ha; int min; diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h index 6c0678fb9a67..d69fe0ce5add 100644 --- a/drivers/scsi/ips.h +++ b/drivers/scsi/ips.h @@ -400,7 +400,7 @@ */ static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]); - static int ips_slave_configure(struct scsi_device *SDptr); + static int ips_sdev_configure(struct scsi_device *SDptr); /* * Raid Command Formats diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index 085e285f427d..7cc880f078b8 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -155,7 +155,7 @@ static struct scsi_host_template isci_sht = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + .sdev_configure = sas_sdev_configure, .scan_finished = isci_host_scan_finished, .scan_start = isci_host_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index b5dd1caae5e9..209d151ca1b4 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -955,7 +955,7 @@ static umode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) return 0; } -static int iscsi_sw_tcp_slave_configure(struct scsi_device *sdev) +static int iscsi_sw_tcp_sdev_configure(struct scsi_device *sdev) { struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(sdev->host); struct iscsi_session *session = tcp_sw_host->session; @@ -982,7 +982,7 @@ static struct scsi_host_template iscsi_sw_tcp_sht = { .eh_device_reset_handler= iscsi_eh_device_reset, .eh_target_reset_handler = iscsi_eh_recover_target, .dma_boundary = PAGE_SIZE - 1, - .slave_configure = iscsi_sw_tcp_slave_configure, + .sdev_configure = iscsi_sw_tcp_sdev_configure, .target_alloc = iscsi_target_alloc, .proc_name = "iscsi_tcp", .this_id = -1, diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 9e0975e55c27..bbcf959d975f 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -835,14 +835,14 @@ int sas_target_alloc(struct scsi_target *starget) #define SAS_DEF_QD 256 -int sas_slave_configure(struct scsi_device *scsi_dev) +int sas_sdev_configure(struct scsi_device *scsi_dev) { struct domain_device *dev = sdev_to_domain_dev(scsi_dev); BUG_ON(dev->rphy->identify.device_type != SAS_END_DEVICE); if (dev_is_sata(dev)) { - ata_sas_slave_configure(scsi_dev, dev->sata_dev.ap); + ata_sas_sdev_configure(scsi_dev, dev->sata_dev.ap); return 0; } @@ -950,7 +950,7 @@ EXPORT_SYMBOL_GPL(sas_request_addr); EXPORT_SYMBOL_GPL(sas_queuecommand); EXPORT_SYMBOL_GPL(sas_target_alloc); -EXPORT_SYMBOL_GPL(sas_slave_configure); +EXPORT_SYMBOL_GPL(sas_sdev_configure); EXPORT_SYMBOL_GPL(sas_change_queue_depth); EXPORT_SYMBOL_GPL(sas_bios_param); EXPORT_SYMBOL_GPL(sas_task_abort); diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index aeabcb3b1df7..2ad59a3cc241 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5609,7 +5609,7 @@ lpfc_sdev_prep(struct scsi_device *sdev) } /** - * lpfc_slave_configure - scsi_host_template slave_configure entry point + * lpfc_sdev_configure - scsi_host_template sdev_configure entry point * @sdev: Pointer to scsi_device. * * This routine configures following items @@ -5620,7 +5620,7 @@ lpfc_sdev_prep(struct scsi_device *sdev) * 0 - Success **/ static int -lpfc_slave_configure(struct scsi_device *sdev) +lpfc_sdev_configure(struct scsi_device *sdev) { struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; struct lpfc_hba *phba = vport->phba; @@ -6023,7 +6023,7 @@ struct scsi_host_template lpfc_template_nvme = { .eh_bus_reset_handler = lpfc_no_handler, .eh_host_reset_handler = lpfc_no_handler, .sdev_prep = lpfc_no_sdev, - .slave_configure = lpfc_no_sdev, + .sdev_configure = lpfc_no_sdev, .scan_finished = lpfc_scan_finished, .this_id = -1, .sg_tablesize = 1, @@ -6047,7 +6047,7 @@ struct scsi_host_template lpfc_template = { .eh_bus_reset_handler = lpfc_bus_reset_handler, .eh_host_reset_handler = lpfc_host_reset_handler, .sdev_prep = lpfc_sdev_prep, - .slave_configure = lpfc_slave_configure, + .sdev_configure = lpfc_sdev_configure, .sdev_destroy = lpfc_sdev_destroy, .scan_finished = lpfc_scan_finished, .this_id = -1, diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 0992869bffd4..9dc4637e7bb3 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -2031,7 +2031,7 @@ static void megasas_set_static_target_properties(struct scsi_device *sdev, } -static int megasas_slave_configure(struct scsi_device *sdev) +static int megasas_sdev_configure(struct scsi_device *sdev) { u16 pd_index = 0; struct megasas_instance *instance; @@ -3413,7 +3413,7 @@ static struct scsi_host_template megasas_template = { .module = THIS_MODULE, .name = "Avago SAS based MegaRAID driver", .proc_name = "megaraid_sas", - .slave_configure = megasas_slave_configure, + .sdev_configure = megasas_sdev_configure, .sdev_prep = megasas_sdev_prep, .sdev_destroy = megasas_sdev_destroy, .queuecommand = megasas_queue_command, diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 674e72ed1398..05eb532f6afe 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -2270,14 +2270,14 @@ _scsih_enable_tlr(struct MPT3SAS_ADAPTER *ioc, struct scsi_device *sdev) } /** - * scsih_slave_configure - device configure routine. + * scsih_sdev_configure - device configure routine. * @sdev: scsi device struct * * Return: 0 if ok. Any other return is assumed to be an error and * the device is ignored. */ static int -scsih_slave_configure(struct scsi_device *sdev) +scsih_sdev_configure(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); @@ -10428,7 +10428,7 @@ static struct scsi_host_template mpt2sas_driver_template = { .queuecommand = scsih_qcmd, .target_alloc = scsih_target_alloc, .sdev_prep = scsih_sdev_prep, - .slave_configure = scsih_slave_configure, + .sdev_configure = scsih_sdev_configure, .target_destroy = scsih_target_destroy, .sdev_destroy = scsih_sdev_destroy, .scan_finished = scsih_scan_finished, @@ -10466,7 +10466,7 @@ static struct scsi_host_template mpt3sas_driver_template = { .queuecommand = scsih_qcmd, .target_alloc = scsih_target_alloc, .sdev_prep = scsih_sdev_prep, - .slave_configure = scsih_slave_configure, + .sdev_configure = scsih_sdev_configure, .target_destroy = scsih_target_destroy, .sdev_destroy = scsih_sdev_destroy, .scan_finished = scsih_scan_finished, diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index b0de3bdb01db..6686d3d4cc61 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -35,7 +35,7 @@ static struct scsi_host_template mvs_sht = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + .sdev_configure = sas_sdev_configure, .scan_finished = mvs_scan_finished, .scan_start = mvs_scan_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 8906aceda4c4..0f86214eca4a 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2000,7 +2000,7 @@ static struct mvumi_instance_template mvumi_instance_9580 = { .reset_host = mvumi_reset_host_9580, }; -static int mvumi_slave_configure(struct scsi_device *sdev) +static int mvumi_sdev_configure(struct scsi_device *sdev) { struct mvumi_hba *mhba; unsigned char bitcount = sizeof(unsigned char) * 8; @@ -2175,7 +2175,7 @@ static struct scsi_host_template mvumi_template = { .module = THIS_MODULE, .name = "Marvell Storage Controller", - .slave_configure = mvumi_slave_configure, + .sdev_configure = mvumi_sdev_configure, .queuecommand = mvumi_queue_command, .eh_timed_out = mvumi_timed_out, .eh_host_reset_handler = mvumi_host_reset, diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index d2dfec5c4a3a..50f70d3a3d22 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -1743,7 +1743,7 @@ static int myrb_sdev_prep(struct scsi_device *sdev) return myrb_pdev_sdev_prep(sdev); } -static int myrb_slave_configure(struct scsi_device *sdev) +static int myrb_sdev_configure(struct scsi_device *sdev) { struct myrb_ldev_info *ldev_info; @@ -2233,7 +2233,7 @@ struct scsi_host_template myrb_template = { .queuecommand = myrb_queuecommand, .eh_host_reset_handler = myrb_host_reset, .sdev_prep = myrb_sdev_prep, - .slave_configure = myrb_slave_configure, + .sdev_configure = myrb_sdev_configure, .sdev_destroy = myrb_sdev_destroy, .bios_param = myrb_biosparam, .cmd_size = sizeof(struct myrb_cmdblk), diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 1b9f6103096d..991ac289f4dc 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1886,7 +1886,7 @@ static int myrs_sdev_prep(struct scsi_device *sdev) return 0; } -static int myrs_slave_configure(struct scsi_device *sdev) +static int myrs_sdev_configure(struct scsi_device *sdev) { struct myrs_hba *cs = shost_priv(sdev->host); struct myrs_ldev_info *ldev_info; @@ -1926,7 +1926,7 @@ struct scsi_host_template myrs_template = { .queuecommand = myrs_queuecommand, .eh_host_reset_handler = myrs_host_reset, .sdev_prep = myrs_sdev_prep, - .slave_configure = myrs_slave_configure, + .sdev_configure = myrs_sdev_configure, .sdev_destroy = myrs_sdev_destroy, .cmd_size = sizeof(struct myrs_cmdblk), .shost_attrs = myrs_shost_attrs, diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index ee727b1511a1..c3a093dfa932 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -7962,7 +7962,7 @@ static int ncr53c8xx_sdev_prep(struct scsi_device *device) return 0; } -static int ncr53c8xx_slave_configure(struct scsi_device *device) +static int ncr53c8xx_sdev_configure(struct scsi_device *device) { struct Scsi_Host *host = device->host; struct ncb *np = ((struct host_data *) host->hostdata)->ncb; @@ -8298,7 +8298,7 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt, tpnt->shost_attrs = ncr53c8xx_host_attrs; tpnt->queuecommand = ncr53c8xx_queue_command; - tpnt->slave_configure = ncr53c8xx_slave_configure; + tpnt->sdev_configure = ncr53c8xx_sdev_configure; tpnt->sdev_prep = ncr53c8xx_sdev_prep; tpnt->eh_bus_reset_handler = ncr53c8xx_bus_reset; tpnt->can_queue = SCSI_NCR_CAN_QUEUE; diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 9e99262a2b9d..debad0464491 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -89,7 +89,7 @@ static struct scsi_host_template pm8001_sht = { .queuecommand = sas_queuecommand, .dma_need_drain = ata_scsi_dma_need_drain, .target_alloc = sas_target_alloc, - .slave_configure = sas_slave_configure, + .sdev_configure = sas_sdev_configure, .scan_finished = pm8001_scan_finished, .scan_start = pm8001_scan_start, .change_queue_depth = sas_change_queue_depth, diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 0cf4c8d894a4..72f308cfd67f 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -195,7 +195,7 @@ static int pmcraid_sdev_prep(struct scsi_device *scsi_dev) } /** - * pmcraid_slave_configure - Configures a SCSI device + * pmcraid_sdev_configure - Configures a SCSI device * @scsi_dev: scsi device struct * * This function is executed by SCSI mid layer just after a device is first @@ -207,7 +207,7 @@ static int pmcraid_sdev_prep(struct scsi_device *scsi_dev) * Return value: * 0 on success */ -static int pmcraid_slave_configure(struct scsi_device *scsi_dev) +static int pmcraid_sdev_configure(struct scsi_device *scsi_dev) { struct pmcraid_resource_entry *res = scsi_dev->hostdata; @@ -4121,7 +4121,7 @@ static struct scsi_host_template pmcraid_host_template = { .eh_host_reset_handler = pmcraid_eh_host_reset_handler, .sdev_prep = pmcraid_sdev_prep, - .slave_configure = pmcraid_slave_configure, + .sdev_configure = pmcraid_sdev_configure, .sdev_destroy = pmcraid_sdev_destroy, .change_queue_depth = pmcraid_change_queue_depth, .can_queue = PMCRAID_MAX_IO_CMD, diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index f75c0b5cd587..728f5d32285d 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c @@ -61,7 +61,7 @@ enum lv1_atapi_in_out { }; -static int ps3rom_slave_configure(struct scsi_device *scsi_dev) +static int ps3rom_sdev_configure(struct scsi_device *scsi_dev) { struct ps3rom_private *priv = shost_priv(scsi_dev->host); struct ps3_storage_device *dev = priv->dev; @@ -330,7 +330,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data) static struct scsi_host_template ps3rom_host_template = { .name = DEVICE_NAME, - .slave_configure = ps3rom_slave_configure, + .sdev_configure = ps3rom_sdev_configure, .queuecommand = ps3rom_queuecommand, .can_queue = 1, .this_id = 7, diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 36b1ca2dadbb..8b8fcf82f5e5 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -939,7 +939,7 @@ static int qedf_eh_host_reset(struct scsi_cmnd *sc_cmd) return SUCCESS; } -static int qedf_slave_configure(struct scsi_device *sdev) +static int qedf_sdev_configure(struct scsi_device *sdev) { if (qedf_queue_depth) { scsi_change_queue_depth(sdev, qedf_queue_depth); @@ -960,7 +960,7 @@ static struct scsi_host_template qedf_host_template = { .eh_device_reset_handler = qedf_eh_device_reset, /* lun reset */ .eh_target_reset_handler = qedf_eh_target_reset, /* target reset */ .eh_host_reset_handler = qedf_eh_host_reset, - .slave_configure = qedf_slave_configure, + .sdev_configure = qedf_sdev_configure, .dma_boundary = QED_HW_DMA_BOUNDARY, .sg_tablesize = QEDF_MAX_BDS_PER_CMD, .can_queue = FCOE_PARAMS_NUM_TASKS, diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 441a45349349..c3a1c83d661d 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -1167,7 +1167,7 @@ qla1280_set_target_parameters(struct scsi_qla_host *ha, int bus, int target) /************************************************************************** - * qla1280_slave_configure + * qla1280_sdev_configure * * Description: * Determines the queue depth for a given device. There are two ways @@ -1178,7 +1178,7 @@ qla1280_set_target_parameters(struct scsi_qla_host *ha, int bus, int target) * default queue depth (dependent on the number of hardware SCBs). **************************************************************************/ static int -qla1280_slave_configure(struct scsi_device *device) +qla1280_sdev_configure(struct scsi_device *device) { struct scsi_qla_host *ha; int default_depth = 3; @@ -4140,7 +4140,7 @@ static struct scsi_host_template qla1280_driver_template = { .proc_name = "qla1280", .name = "Qlogic ISP 1280/12160", .info = qla1280_info, - .slave_configure = qla1280_slave_configure, + .sdev_configure = qla1280_sdev_configure, .queuecommand = qla1280_queuecommand, .eh_abort_handler = qla1280_eh_abort, .eh_device_reset_handler= qla1280_eh_device_reset, diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 18134c2ad835..f51852ab88a1 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1851,7 +1851,7 @@ qla2xxx_sdev_prep(struct scsi_device *sdev) } static int -qla2xxx_slave_configure(struct scsi_device *sdev) +qla2xxx_sdev_configure(struct scsi_device *sdev) { scsi_qla_host_t *vha = shost_priv(sdev->host); struct req_que *req = vha->req; @@ -7765,7 +7765,7 @@ struct scsi_host_template qla2xxx_driver_template = { .eh_bus_reset_handler = qla2xxx_eh_bus_reset, .eh_host_reset_handler = qla2xxx_eh_host_reset, - .slave_configure = qla2xxx_slave_configure, + .sdev_configure = qla2xxx_sdev_configure, .sdev_prep = qla2xxx_sdev_prep, .sdev_destroy = qla2xxx_sdev_destroy, diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 3790e8b70bba..1e8d784add69 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -974,7 +974,7 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int host->sg_tablesize = QLOGICPTI_MAX_SG(num_free); } -static int qlogicpti_slave_configure(struct scsi_device *sdev) +static int qlogicpti_sdev_configure(struct scsi_device *sdev) { struct qlogicpti *qpti = shost_priv(sdev->host); int tgt = sdev->id; @@ -1292,7 +1292,7 @@ static struct scsi_host_template qpti_template = { .name = "qlogicpti", .info = qlogicpti_info, .queuecommand = qlogicpti_queuecommand, - .slave_configure = qlogicpti_slave_configure, + .sdev_configure = qlogicpti_sdev_configure, .eh_abort_handler = qlogicpti_abort, .eh_host_reset_handler = qlogicpti_reset, .can_queue = QLOGICPTI_REQ_QUEUE_LEN, diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 741502da09c4..f4348d674df6 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4977,13 +4977,13 @@ static int scsi_debug_sdev_prep(struct scsi_device *sdp) return 0; } -static int scsi_debug_slave_configure(struct scsi_device *sdp) +static int scsi_debug_sdev_configure(struct scsi_device *sdp) { struct sdebug_dev_info *devip = (struct sdebug_dev_info *)sdp->hostdata; if (sdebug_verbose) - pr_info("slave_configure <%u %u %u %llu>\n", + pr_info("sdev_configure <%u %u %u %llu>\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); if (sdp->host->max_cmd_len != SDEBUG_MAX_CMD_LEN) sdp->host->max_cmd_len = SDEBUG_MAX_CMD_LEN; @@ -7222,7 +7222,7 @@ static struct scsi_host_template sdebug_driver_template = { .name = "SCSI DEBUG", .info = scsi_debug_info, .sdev_prep = scsi_debug_sdev_prep, - .slave_configure = scsi_debug_slave_configure, + .sdev_configure = scsi_debug_sdev_configure, .sdev_destroy = scsi_debug_sdev_destroy, .ioctl = scsi_debug_ioctl, .queuecommand = scsi_debug_queuecommand, diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index ccd9fb11d305..84cc2963015a 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -250,7 +250,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, sdev->hostdata = hostdata; /* if the device needs this changing, it may do so in the - * slave_configure function */ + * sdev_configure function */ sdev->max_device_blocked = SCSI_DEFAULT_DEVICE_BLOCKED; /* @@ -924,7 +924,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, if (*bflags & BLIST_NO_RSOC) sdev->no_report_opcodes = 1; - /* set the device running here so that slave configure + /* set the device running here so that sdev_configure * may do I/O */ mutex_lock(&sdev->state_mutex); ret = scsi_device_set_state(sdev, SDEV_RUNNING); @@ -960,11 +960,11 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, transport_configure_device(&sdev->sdev_gendev); - if (sdev->host->hostt->slave_configure) { - ret = sdev->host->hostt->slave_configure(sdev); + if (sdev->host->hostt->sdev_configure) { + ret = sdev->host->hostt->sdev_configure(sdev); if (ret) { /* - * if LLDD reports slave not present, don't clutter + * if LLDD reports sdev not present, don't clutter * console with alloc failure messages */ if (ret != -ENXIO) { diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index f74fa7fdbffc..db4f58fbb0a7 100644 --- a/drivers/scsi/snic/snic_main.c +++ b/drivers/scsi/snic/snic_main.c @@ -71,11 +71,11 @@ snic_sdev_prep(struct scsi_device *sdev) } /* - * snic_slave_configure : callback function to SCSI Mid Layer, called on + * snic_sdev_configure : callback function to SCSI Mid Layer, called on * scsi device initialization. */ static int -snic_slave_configure(struct scsi_device *sdev) +snic_sdev_configure(struct scsi_device *sdev) { struct snic *snic = shost_priv(sdev->host); u32 qdepth = 0, max_ios = 0; @@ -122,7 +122,7 @@ static struct scsi_host_template snic_host_template = { .eh_device_reset_handler = snic_device_reset, .eh_host_reset_handler = snic_host_reset, .sdev_prep = snic_sdev_prep, - .slave_configure = snic_slave_configure, + .sdev_configure = snic_sdev_configure, .change_queue_depth = snic_change_queue_depth, .this_id = -1, .cmd_per_lun = SNIC_DFLT_QUEUE_DEPTH, diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index d4f10c0d813c..e6741aae3e68 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -584,7 +584,7 @@ static void return_abnormal_state(struct st_hba *hba, int status) spin_unlock_irqrestore(hba->host->host_lock, flags); } static int -stex_slave_config(struct scsi_device *sdev) +stex_sdev_config(struct scsi_device *sdev) { sdev->use_10_for_rw = 1; sdev->use_10_for_ms = 1; @@ -1480,7 +1480,7 @@ static struct scsi_host_template driver_template = { .proc_name = DRV_NAME, .bios_param = stex_biosparam, .queuecommand = stex_queuecommand, - .slave_configure = stex_slave_config, + .sdev_configure = stex_sdev_config, .eh_abort_handler = stex_abort, .eh_host_reset_handler = stex_reset, .this_id = -1, diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 5dba63b52e49..54235622fee6 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1770,7 +1770,7 @@ static struct scsi_host_template scsi_driver = { .proc_name = "storvsc_host", .eh_timed_out = storvsc_eh_timed_out, .sdev_prep = storvsc_device_alloc, - .slave_configure = storvsc_device_configure, + .sdev_configure = storvsc_device_configure, .cmd_per_lun = 2048, .this_id = -1, /* Make sure we dont get a sg segment crosses a page boundary */ diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 128e4ad0124d..b138050fbd8f 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -781,7 +781,7 @@ static int sym53c8xx_sdev_prep(struct scsi_device *sdev) /* * Linux entry point for device queue sizing. */ -static int sym53c8xx_slave_configure(struct scsi_device *sdev) +static int sym53c8xx_sdev_configure(struct scsi_device *sdev) { struct sym_hcb *np = sym_get_hcb(sdev->host); struct sym_tcb *tp = &np->target[sdev->id]; @@ -1640,7 +1640,7 @@ static struct scsi_host_template sym2_template = { .info = sym53c8xx_info, .queuecommand = sym53c8xx_queue_command, .sdev_prep = sym53c8xx_sdev_prep, - .slave_configure = sym53c8xx_slave_configure, + .sdev_configure = sym53c8xx_sdev_configure, .sdev_destroy = sym53c8xx_sdev_destroy, .eh_abort_handler = sym53c8xx_eh_abort_handler, .eh_device_reset_handler = sym53c8xx_eh_device_reset_handler, diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ca9fc27c4f02..742c0ec2c917 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -4657,10 +4657,10 @@ static int ufshcd_change_queue_depth(struct scsi_device *sdev, int depth) } /** - * ufshcd_slave_configure - adjust SCSI device configurations + * ufshcd_sdev_configure - adjust SCSI device configurations * @sdev: pointer to SCSI device */ -static int ufshcd_slave_configure(struct scsi_device *sdev) +static int ufshcd_sdev_configure(struct scsi_device *sdev) { struct ufs_hba *hba = shost_priv(sdev->host); struct request_queue *q = sdev->request_queue; @@ -7490,7 +7490,7 @@ static struct scsi_host_template ufshcd_driver_template = { .proc_name = UFSHCD, .queuecommand = ufshcd_queuecommand, .sdev_prep = ufshcd_sdev_prep, - .slave_configure = ufshcd_slave_configure, + .sdev_configure = ufshcd_sdev_configure, .sdev_destroy = ufshcd_sdev_destroy, .change_queue_depth = ufshcd_change_queue_depth, .eh_abort_handler = ufshcd_abort, diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 319b8bf68117..c5ef9045b68d 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -689,7 +689,7 @@ static struct scsi_host_template scsifront_sht = { .queuecommand = scsifront_queuecommand, .eh_abort_handler = scsifront_eh_abort_handler, .eh_device_reset_handler = scsifront_dev_reset_handler, - .slave_configure = scsifront_sdev_configure, + .sdev_configure = scsifront_sdev_configure, .sdev_destroy = scsifront_sdev_destroy, .cmd_per_lun = VSCSIIF_DEFAULT_CMD_PER_LUN, .can_queue = VSCSIIF_MAX_REQS, @@ -1000,7 +1000,7 @@ static void scsifront_do_lun_hotplug(struct vscsifrnt_info *info, int op) continue; /* - * Front device state path, used in slave_configure called + * Front device state path, used in sdev_configure called * on successfull scsi_add_device, and in sdev_destroy called * on remove of a device. */ diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 562f1b4bc159..4dcc62e85e34 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -68,7 +68,7 @@ static int sdev_prep(struct scsi_device *sdev) return 0; } -static int slave_configure(struct scsi_device *sdev) +static int sdev_configure(struct scsi_device *sdev) { /* * Scatter-gather buffers (all but the last) must have a length @@ -218,7 +218,7 @@ static struct scsi_host_template rtsx_host_template = { .this_id = -1, .sdev_prep = sdev_prep, - .slave_configure = slave_configure, + .sdev_configure = sdev_configure, /* lots of sg segments can be handled */ .sg_tablesize = SG_ALL, diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index 4cb6124b4d18..3c19c3e9cd6a 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -324,7 +324,7 @@ static int mts_sdev_prep (struct scsi_device *s) return 0; } -static int mts_slave_configure (struct scsi_device *s) +static int mts_sdev_configure (struct scsi_device *s) { blk_queue_dma_alignment(s->request_queue, (512 - 1)); return 0; @@ -629,7 +629,7 @@ static struct scsi_host_template mts_scsi_host_template = { .this_id = -1, .emulated = 1, .sdev_prep = mts_sdev_prep, - .slave_configure = mts_slave_configure, + .sdev_configure = mts_sdev_configure, .max_sectors= 256, /* 128 K */ }; diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 8bd17467a55e..5254f6d16022 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -89,7 +89,7 @@ static int sdev_prep (struct scsi_device *sdev) return 0; } -static int slave_configure(struct scsi_device *sdev) +static int sdev_configure(struct scsi_device *sdev) { struct us_data *us = host_to_us(sdev->host); struct device *dev = us->pusb_dev->bus->sysdev; @@ -620,7 +620,7 @@ static const struct scsi_host_template usb_stor_host_template = { .this_id = -1, .sdev_prep = sdev_prep, - .slave_configure = slave_configure, + .sdev_configure = sdev_configure, .target_alloc = target_alloc, /* lots of sg segments can be handled */ diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 329d1c26b710..227209c28f4d 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -835,7 +835,7 @@ static int uas_sdev_prep(struct scsi_device *sdev) return 0; } -static int uas_slave_configure(struct scsi_device *sdev) +static int uas_sdev_configure(struct scsi_device *sdev) { struct uas_dev_info *devinfo = sdev->hostdata; @@ -893,7 +893,7 @@ static struct scsi_host_template uas_host_template = { .queuecommand = uas_queuecommand, .target_alloc = uas_target_alloc, .sdev_prep = uas_sdev_prep, - .slave_configure = uas_slave_configure, + .sdev_configure = uas_sdev_configure, .eh_abort_handler = uas_eh_abort_handler, .eh_device_reset_handler = uas_eh_device_reset_handler, .this_id = -1, diff --git a/include/linux/libata.h b/include/linux/libata.h index e7153fca9cfc..d32b5ad86011 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1148,7 +1148,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]); extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev); -extern int ata_scsi_slave_config(struct scsi_device *sdev); +extern int ata_scsi_sdev_config(struct scsi_device *sdev); extern void ata_scsi_sdev_destroy(struct scsi_device *sdev); extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth); @@ -1240,7 +1240,7 @@ extern int ata_sas_port_start(struct ata_port *ap); extern int ata_sas_tport_add(struct device *parent, struct ata_port *ap); extern void ata_sas_tport_delete(struct ata_port *ap); extern void ata_sas_port_stop(struct ata_port *ap); -extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); +extern int ata_sas_sdev_configure(struct scsi_device *, struct ata_port *); extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap); extern void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis); @@ -1398,7 +1398,7 @@ extern struct device_attribute *ata_common_sdev_attrs[]; .this_id = ATA_SHT_THIS_ID, \ .emulated = ATA_SHT_EMULATED, \ .proc_name = drv_name, \ - .slave_configure = ata_scsi_slave_config, \ + .sdev_configure = ata_scsi_sdev_config, \ .sdev_destroy = ata_scsi_sdev_destroy, \ .bios_param = ata_std_bios_param, \ .unlock_native_capacity = ata_scsi_unlock_native_capacity diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 2d6afa200c8b..8368c2063037 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -664,7 +664,7 @@ int sas_set_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates); int sas_phy_reset(struct sas_phy *phy, int hard_reset); extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); extern int sas_target_alloc(struct scsi_target *); -extern int sas_slave_configure(struct scsi_device *); +extern int sas_sdev_configure(struct scsi_device *); extern int sas_change_queue_depth(struct scsi_device *, int new_depth); extern int sas_bios_param(struct scsi_device *, struct block_device *, sector_t capacity, int *hsc); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 334bb4adadaf..2c2cbb244790 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -149,11 +149,11 @@ struct scsi_host_template { * * Deallocation: If we didn't find any devices at this ID, you will * get an immediate call to sdev_destroy(). If we find something - * here then you will get a call to slave_configure(), then the + * here then you will get a call to sdev_configure(), then the * device will be used for however long it is kept around, then when * the device is removed from the system (or * possibly at reboot * time), you will then get a call to sdev_destroy(). This is - * assuming you implement slave_configure and sdev_destroy. + * assuming you implement sdev_configure and sdev_destroy. * However, if you allocate memory and hang it off the device struct, * then you must implement the sdev_destroy() routine at a minimum * in order to avoid leaking memory @@ -192,14 +192,14 @@ struct scsi_host_template { * * Status: OPTIONAL */ - int (* slave_configure)(struct scsi_device *); + int (* sdev_configure)(struct scsi_device *); /* * Immediately prior to deallocating the device and after all activity * has ceased the mid layer calls this point so that the low level * driver may completely detach itself from the scsi device and vice * versa. The low level driver is responsible for freeing any memory - * it allocated in the sdev_prep or slave_configure calls. + * it allocated in the sdev_prep or sdev_configure calls. * * Status: OPTIONAL */