]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: Rename .slave_alloc() and .slave_destroy()
authorBart Van Assche <bvanassche@acm.org>
Tue, 22 Oct 2024 18:07:53 +0000 (11:07 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 4 Dec 2024 20:34:28 +0000 (15:34 -0500)
Rename .slave_alloc() into .sdev_init() and .slave_destroy() into
.sdev_destroy(). The new names make it clear that these are actions on
SCSI devices. Make this change in the SCSI core, SCSI drivers and also
in the ATA drivers. No functionality has been changed.

This patch has been created as follows:
* Change the text "slave_alloc" into "sdev_init" in all source files
  except those in drivers/net/ and Documentation/.
* Change the text "slave_destroy" into "sdev_destroy" in all source
  files except those in drivers/net/ and Documentation/.
* Rename lpfc_no_slave() into lpfc_no_sdev().
* Manually adjust whitespace where necessary to restore vertical
  alignment (dc395x driver and include/linux/libata.h).

Acked-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241022180839.2712439-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
58 files changed:
drivers/ata/libata-scsi.c
drivers/firewire/sbp2.c
drivers/message/fusion/mptfc.c
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.h
drivers/message/fusion/mptspi.c
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/scsi/zfcp_sysfs.c
drivers/s390/scsi/zfcp_unit.c
drivers/scsi/53c700.c
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/bfa/bfad_im.c
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
drivers/scsi/csiostor/csio_scsi.c
drivers/scsi/dc395x.c
drivers/scsi/esp_scsi.c
drivers/scsi/fcoe/fcoe.c
drivers/scsi/fnic/fnic_main.c
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
drivers/scsi/hpsa.c
drivers/scsi/ibmvscsi/ibmvfc.c
drivers/scsi/ipr.c
drivers/scsi/libfc/fc_fcp.c
drivers/scsi/libsas/sas_scsi_host.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/mpi3mr/mpi3mr_os.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/myrb.c
drivers/scsi/myrs.c
drivers/scsi/ncr53c8xx.c
drivers/scsi/pmcraid.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla4xxx/ql4_os.c
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/smartpqi/smartpqi_init.c
drivers/scsi/snic/snic_main.c
drivers/scsi/storvsc_drv.c
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/scsi/virtio_scsi.c
drivers/scsi/xen-scsifront.c
drivers/ufs/core/ufshcd.c
drivers/usb/image/microtek.c
drivers/usb/storage/scsiglue.c
drivers/usb/storage/uas.c
include/linux/libata.h
include/scsi/libfc.h
include/scsi/libsas.h
include/scsi/scsi_device.h
include/scsi/scsi_host.h

index 2ce5befd2242be38fbdf9bd3dce0bb5137fab43f..7bfb57b4e659db3f21aa263fc1c02f5f63745216 100644 (file)
@@ -1133,7 +1133,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim,
 }
 
 /**
- *     ata_scsi_slave_alloc - Early setup of SCSI device
+ *     ata_scsi_sdev_init - Early setup of SCSI device
  *     @sdev: SCSI device to examine
  *
  *     This is called from scsi_alloc_sdev() when the scsi device
@@ -1143,7 +1143,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim,
  *     Defined by SCSI layer.  We don't really care.
  */
 
-int ata_scsi_slave_alloc(struct scsi_device *sdev)
+int ata_scsi_sdev_init(struct scsi_device *sdev)
 {
        struct ata_port *ap = ata_shost_to_port(sdev->host);
        struct device_link *link;
@@ -1166,7 +1166,7 @@ int ata_scsi_slave_alloc(struct scsi_device *sdev)
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(ata_scsi_slave_alloc);
+EXPORT_SYMBOL_GPL(ata_scsi_sdev_init);
 
 /**
  *     ata_scsi_device_configure - Set SCSI device attributes
@@ -1195,7 +1195,7 @@ int ata_scsi_device_configure(struct scsi_device *sdev,
 EXPORT_SYMBOL_GPL(ata_scsi_device_configure);
 
 /**
- *     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
@@ -1208,7 +1208,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_device_configure);
  *     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;
@@ -1228,7 +1228,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
index 827dee0f57dde2324f2de93c92284e8eca990812..4937df12c3fb745fe3dabc52576466d7eca5cc7d 100644 (file)
@@ -1490,7 +1490,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_init(struct scsi_device *sdev)
 {
        struct sbp2_logical_unit *lu = sdev->hostdata;
 
@@ -1590,7 +1590,7 @@ static const 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_init              = sbp2_scsi_sdev_init,
        .device_configure       = sbp2_scsi_device_configure,
        .eh_abort_handler       = sbp2_scsi_abort,
        .this_id                = -1,
index 91242f26defb008e0451cbc07074fc386565dfab..f034ebacf974fe493a4291203ae5d012753f79b9 100644 (file)
@@ -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_init(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,10 +113,10 @@ static const struct scsi_host_template mptfc_driver_template = {
        .info                           = mptscsih_info,
        .queuecommand                   = mptfc_qcmd,
        .target_alloc                   = mptfc_target_alloc,
-       .slave_alloc                    = mptfc_slave_alloc,
+       .sdev_init                      = mptfc_sdev_init,
        .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,
@@ -503,7 +503,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_init will fill in vdevice from vtarget.
                         */
                        if (ri->starget) {
                                vtarget = ri->starget->hostdata;
@@ -631,7 +631,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_init(struct scsi_device *sdev)
 {
        MPT_SCSI_HOST           *hd;
        VirtTarget              *vtarget;
@@ -651,7 +651,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_init kmalloc(%zd) FAILED!\n",
                                ioc->name, sizeof(VirtDevice));
                return -ENOMEM;
        }
index a798e26c6402d430934a6ef3d0543a40a5001974..b884e634acc6b365d8de8e4a6241bacd1609f217 100644 (file)
@@ -1867,7 +1867,7 @@ mptsas_target_destroy(struct scsi_target *starget)
 
 
 static int
-mptsas_slave_alloc(struct scsi_device *sdev)
+mptsas_sdev_init(struct scsi_device *sdev)
 {
        struct Scsi_Host        *host = sdev->host;
        MPT_SCSI_HOST           *hd = shost_priv(host);
@@ -1880,7 +1880,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_init kzalloc(%zd) FAILED!\n",
                                ioc->name, sizeof(VirtDevice));
                return -ENOMEM;
        }
@@ -2005,10 +2005,10 @@ static const struct scsi_host_template mptsas_driver_template = {
        .info                           = mptscsih_info,
        .queuecommand                   = mptsas_qcmd,
        .target_alloc                   = mptsas_target_alloc,
-       .slave_alloc                    = mptsas_slave_alloc,
+       .sdev_init                      = mptsas_sdev_init,
        .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,
index 6c3f25cc33ff993f65ebf373192e032a3c1459bc..50ea4ee65d5ca9cce6d83149c9a8b945ab616792 100644 (file)
@@ -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)
@@ -2331,7 +2331,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);
@@ -3302,7 +3302,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);
index e3d92c3926733e9b37436aa04727dc1c556c24b6..9f1cde8e76a843f642ee386d98878c8c3be6b43f 100644 (file)
@@ -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);
index 574b882c9a85404971f92f1554cdc35c6a6b6c5b..09828c34f8fb91cb2dba00f7d8371fbc7f9cae65 100644 (file)
@@ -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_init(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_init kmalloc(%zd) FAILED!\n",
                                ioc->name, sizeof(VirtDevice));
                return -ENOMEM;
        }
@@ -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 const struct scsi_host_template mptspi_driver_template = {
@@ -828,10 +828,10 @@ static const struct scsi_host_template mptspi_driver_template = {
        .info                           = mptscsih_info,
        .queuecommand                   = mptspi_qcmd,
        .target_alloc                   = mptspi_target_alloc,
-       .slave_alloc                    = mptspi_slave_alloc,
+       .sdev_init                      = mptspi_sdev_init,
        .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,
index b2a8cd792266e62191ff58f15fbe2fe93f1f152d..c9cb9db8c2ee7619693964ecfa4e0cac57f647e5 100644 (file)
@@ -37,11 +37,11 @@ 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);
 
-       /* if previous slave_alloc returned early, there is nothing to do */
+       /* if previous sdev_init 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_init(struct scsi_device *sdev)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
        struct zfcp_adapter *adapter =
@@ -427,9 +427,9 @@ static const 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_init               = zfcp_scsi_sdev_init,
        .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",
index 304b81bb5f90c42ca40d0890e06ebe5c75c41b58..41e36af35488eb948a7d40d8e58d3674408a784a 100644 (file)
@@ -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_init */
        zfcp_sysfs_port_set_removing(port);
        in_use = false;
 
index 60f2a04f0869e6c904b0125f3b8bcda4453b8f4d..4ef2a635d34f2a10282171684f2ba416f3d21e11 100644 (file)
@@ -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_init()
         */
        mutex_unlock(&zfcp_sysfs_port_units_mutex);
 
index 85439e976143b9c619ee7c778ca0ebf89d4024f5..71c1d25f93b1d81c1923d222c293ddb2ea73c50f 100644 (file)
@@ -158,9 +158,9 @@ 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_init(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 const struct attribute_group *NCR_700_dev_groups[];
@@ -331,8 +331,8 @@ 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->slave_alloc = NCR_700_slave_alloc;
+       tpnt->sdev_destroy = NCR_700_sdev_destroy;
+       tpnt->sdev_init = NCR_700_sdev_init;
        tpnt->change_queue_depth = NCR_700_change_queue_depth;
 
        if(tpnt->name == NULL)
@@ -2017,7 +2017,7 @@ NCR_700_set_offset(struct scsi_target *STp, int offset)
 }
 
 STATIC int
-NCR_700_slave_alloc(struct scsi_device *SDp)
+NCR_700_sdev_init(struct scsi_device *SDp)
 {
        SDp->hostdata = kzalloc(sizeof(struct NCR_700_Device_Parameters),
                                GFP_KERNEL);
@@ -2052,7 +2052,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;
index 4202059815a0beb5875ac14c3241b30978566c59..2a137629e48d2f63ca97fba22d5f6472b0563dc8 100644 (file)
@@ -672,7 +672,7 @@ ahd_linux_target_destroy(struct scsi_target *starget)
 }
 
 static int
-ahd_linux_slave_alloc(struct scsi_device *sdev)
+ahd_linux_sdev_init(struct scsi_device *sdev)
 {
        struct  ahd_softc *ahd =
                *((struct ahd_softc **)sdev->host->hostdata);
@@ -906,7 +906,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_init              = ahd_linux_sdev_init,
        .slave_configure        = ahd_linux_slave_configure,
        .target_alloc           = ahd_linux_target_alloc,
        .target_destroy         = ahd_linux_target_destroy,
index b0c4f2345321533794eb713f25f9136e42f58ae7..9066ab2ef6e3b8280b54b3003298231819505650 100644 (file)
@@ -632,7 +632,7 @@ ahc_linux_target_destroy(struct scsi_target *starget)
 }
 
 static int
-ahc_linux_slave_alloc(struct scsi_device *sdev)
+ahc_linux_sdev_init(struct scsi_device *sdev)
 {
        struct  ahc_softc *ahc =
                *((struct ahc_softc **)sdev->host->hostdata);
@@ -791,7 +791,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_init              = ahc_linux_sdev_init,
        .slave_configure        = ahc_linux_slave_configure,
        .target_alloc           = ahc_linux_target_alloc,
        .target_destroy         = ahc_linux_target_destroy,
index 66fb701401de76c8cc17efa87779d210081183ee..5729f429ed8be762be9b6859ba20e297887ad759 100644 (file)
@@ -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_init(struct scsi_device *sdev);
 static void bfad_im_fc_rport_add(struct bfad_im_port_s  *im_port,
                                struct bfad_itnim_s *itnim);
 
@@ -404,10 +404,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;
@@ -800,9 +800,9 @@ 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_init = bfad_im_sdev_init,
        .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,
@@ -823,9 +823,9 @@ 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_init = bfad_im_sdev_init,
        .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,
@@ -915,7 +915,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_init() 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.
  *
@@ -946,10 +946,10 @@ bfad_im_check_if_make_lun_visible(struct scsi_device *sdev,
 }
 
 /*
- * Scsi_Host template entry slave_alloc
+ * Scsi_Host template entry sdev_init
  */
 static int
-bfad_im_slave_alloc(struct scsi_device *sdev)
+bfad_im_sdev_init(struct scsi_device *sdev)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
        struct bfad_itnim_data_s *itnim_data;
index f49783b89d04f428797bbd869cfc8d7a49a5328a..938e38a01326c78d39582ae32e19214cc99aee7c 100644 (file)
@@ -2951,7 +2951,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_init              = fc_sdev_init,
        .change_queue_depth     = scsi_change_queue_depth,
        .this_id                = -1,
        .cmd_per_lun            = 3,
index 8329f0cab4e7db2aca779bc51e7413dc9f871cfb..527530b17a5179c6d06344aee3fead7c78433c40 100644 (file)
@@ -2224,7 +2224,7 @@ fail:
 }
 
 static int
-csio_slave_alloc(struct scsi_device *sdev)
+csio_sdev_init(struct scsi_device *sdev)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
 
@@ -2244,7 +2244,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;
 }
@@ -2276,9 +2276,9 @@ 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_init              = csio_sdev_init,
        .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,
@@ -2295,9 +2295,9 @@ 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_init              = csio_sdev_init,
        .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,
index d108a86e196efe9ff00afad55227f87aa78bb2cf..235ebc851ca94d73bcefd68891efa958d2ac15c3 100644 (file)
@@ -3715,13 +3715,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_init - 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_init(struct scsi_device *scsi_device)
 {
        struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)scsi_device->host->hostdata;
        struct DeviceCtlBlk *dcb;
@@ -3736,12 +3736,12 @@ static int dc395x_slave_alloc(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);
@@ -4547,8 +4547,8 @@ static const 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,
-       .slave_destroy          = dc395x_slave_destroy,
+       .sdev_init              = dc395x_sdev_init,
+       .sdev_destroy           = dc395x_sdev_destroy,
        .can_queue              = DC395x_MAX_CAN_QUEUE,
        .this_id                = 7,
        .sg_tablesize           = DC395x_MAX_SG_TABLESIZE,
index 0175d2282b4581c535d95747d1bd09f02486d460..d14a3383abb0582555b05a1e5b077b98539ef8c9 100644 (file)
@@ -2441,7 +2441,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_init(struct scsi_device *dev)
 {
        struct esp *esp = shost_priv(dev->host);
        struct esp_target_data *tp = &esp->target[dev->id];
@@ -2479,7 +2479,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;
 
@@ -2667,9 +2667,9 @@ const 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_init              = esp_sdev_init,
        .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,
index 39aec710660cfa77ac7d3c6a56392fb484a35a45..038e385786764a0d2401f19dda1c5e0760100edb 100644 (file)
@@ -269,7 +269,7 @@ static const 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_init = fc_sdev_init,
        .change_queue_depth = scsi_change_queue_depth,
        .this_id = -1,
        .cmd_per_lun = 3,
index adec0df24bc475ea4d7d8089ea0f75fe96746956..a6b6670547927729a99d7a82bf7c982f12b4b3ca 100644 (file)
@@ -87,7 +87,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_init(struct scsi_device *sdev)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
 
@@ -106,7 +106,7 @@ static const 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_init = fnic_sdev_init,
        .change_queue_depth = scsi_change_queue_depth,
        .this_id = -1,
        .cmd_per_lun = 3,
index a44768bceb9ab25320f85037580e5127eeda392a..fee3cadfde1eea3425e8a9aba1ea72c7e0830468 100644 (file)
@@ -646,7 +646,7 @@ extern void hisi_sas_remove(struct platform_device *pdev);
 
 int hisi_sas_device_configure(struct scsi_device *sdev,
                struct queue_limits *lim);
-extern int hisi_sas_slave_alloc(struct scsi_device *sdev);
+extern int hisi_sas_sdev_init(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);
index 53cb15f6714bd4be2212d1674b477b7ab980b03c..a80d8b2a9941692d3025026f8454407a33b3f359 100644 (file)
@@ -805,13 +805,13 @@ static int hisi_sas_init_device(struct domain_device *device)
        return rc;
 }
 
-int hisi_sas_slave_alloc(struct scsi_device *sdev)
+int hisi_sas_sdev_init(struct scsi_device *sdev)
 {
        struct domain_device *ddev = sdev_to_domain_dev(sdev);
        struct hisi_sas_device *sas_dev = ddev->lldd_dev;
        int rc;
 
-       rc = sas_slave_alloc(sdev);
+       rc = sas_sdev_init(sdev);
        if (rc)
                return rc;
 
@@ -821,7 +821,7 @@ int hisi_sas_slave_alloc(struct scsi_device *sdev)
        sas_dev->dev_status = HISI_SAS_DEV_NORMAL;
        return 0;
 }
-EXPORT_SYMBOL_GPL(hisi_sas_slave_alloc);
+EXPORT_SYMBOL_GPL(hisi_sas_sdev_init);
 
 static int hisi_sas_dev_found(struct domain_device *device)
 {
index c3e571be22220ae48fab4736eb55e4d939736283..098a9f07d14335669b4ea6e60e274f89348c4a80 100644 (file)
@@ -1757,7 +1757,7 @@ static const struct scsi_host_template sht_v1_hw = {
        .scan_finished          = hisi_sas_scan_finished,
        .scan_start             = hisi_sas_scan_start,
        .sg_tablesize           = HISI_SAS_SGE_PAGE_CNT,
-       .slave_alloc            = hisi_sas_slave_alloc,
+       .sdev_init              = hisi_sas_sdev_init,
        .shost_groups           = host_v1_hw_groups,
        .host_reset             = hisi_sas_host_reset,
 };
index 1a62b5d15eca720fff3c4f9ccaa7e293015d2622..e16868801159e42cf4934f51f3f57cb1e616ee43 100644 (file)
@@ -3589,7 +3589,7 @@ static const struct scsi_host_template sht_v2_hw = {
        .scan_finished          = hisi_sas_scan_finished,
        .scan_start             = hisi_sas_scan_start,
        .sg_tablesize           = HISI_SAS_SGE_PAGE_CNT,
-       .slave_alloc            = hisi_sas_slave_alloc,
+       .sdev_init              = hisi_sas_sdev_init,
        .shost_groups           = host_v2_hw_groups,
        .sdev_groups            = sdev_groups_v2_hw,
        .host_reset             = hisi_sas_host_reset,
index 5db931663ae4e3d63b76205b355ba39a611f1d3e..5758388508ec59e18c2823176aabe747ed6e20e7 100644 (file)
@@ -3342,7 +3342,7 @@ static const struct scsi_host_template sht_v3_hw = {
        .map_queues             = hisi_sas_map_queues,
        .sg_tablesize           = HISI_SAS_SGE_PAGE_CNT,
        .sg_prot_tablesize      = HISI_SAS_SGE_PAGE_CNT,
-       .slave_alloc            = hisi_sas_slave_alloc,
+       .sdev_init              = hisi_sas_sdev_init,
        .shost_groups           = host_v3_hw_groups,
        .sdev_groups            = sdev_groups_v3_hw,
        .tag_alloc_policy       = BLK_TAG_ALLOC_RR,
index 0c49414c1f350bd318b9fc5fd2285499e4e23f63..91552254fff4c03ee561d9ec6b3a94735561f2c2 100644 (file)
@@ -283,9 +283,9 @@ 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_init(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,
@@ -978,9 +978,9 @@ static const 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_init              = hpsa_sdev_init,
        .slave_configure        = hpsa_slave_configure,
-       .slave_destroy          = hpsa_slave_destroy,
+       .sdev_destroy           = hpsa_sdev_destroy,
 #ifdef CONFIG_COMPAT
        .compat_ioctl           = hpsa_compat_ioctl,
 #endif
@@ -2107,7 +2107,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_init(struct scsi_device *sdev)
 {
        struct hpsa_scsi_dev_t *sd = NULL;
        unsigned long flags;
@@ -2173,7 +2173,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;
 
index e66c3ef74267a5527b21e6e1d13efb91425b158e..48417615bffeb3ff5a0cfeb2b9ed343fefe9a7f8 100644 (file)
@@ -3393,7 +3393,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_init - 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
@@ -3402,7 +3402,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_init(struct scsi_device *sdev)
 {
        struct Scsi_Host *shost = sdev->host;
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
@@ -3696,7 +3696,7 @@ static const 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_init = ibmvfc_sdev_init,
        .slave_configure = ibmvfc_slave_configure,
        .target_alloc = ibmvfc_target_alloc,
        .scan_finished = ibmvfc_scan_finished,
index 31cf2d31cceba090859c15f72f85fe7ca1698a55..41bc54e27896ec6808e8bb5841f2fca2ac3abf30 100644 (file)
@@ -4745,13 +4745,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;
@@ -4815,7 +4815,7 @@ static int ipr_device_configure(struct scsi_device *sdev,
 }
 
 /**
- * ipr_slave_alloc - Prepare for commands to a device.
+ * ipr_sdev_init - Prepare for commands to a device.
  * @sdev:      scsi device struct
  *
  * This function saves a pointer to the resource entry
@@ -4826,7 +4826,7 @@ static int ipr_device_configure(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_init(struct scsi_device *sdev)
 {
        struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
        struct ipr_resource_entry *res;
@@ -6398,9 +6398,9 @@ static const 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_init = ipr_sdev_init,
        .device_configure = ipr_device_configure,
-       .slave_destroy = ipr_slave_destroy,
+       .sdev_destroy = ipr_sdev_destroy,
        .scan_finished = ipr_scan_finished,
        .target_destroy = ipr_target_destroy,
        .change_queue_depth = ipr_change_queue_depth,
index 80be3a936d9267a10d11c9d2c090ca21449fc0b0..fd1ef06655cb84d409deab6b32455d06ca807369 100644 (file)
@@ -2222,13 +2222,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_init() - 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_init(struct scsi_device *sdev)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
 
@@ -2238,7 +2238,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_init);
 
 /**
  * fc_fcp_destroy() - Tear down the FCP layer for a given local port
index da11d32840e2723e3a53df54203c938ce801b0ce..e7d5093f7c5d6992a27e8af9f19b4b02ccdc25b8 100644 (file)
@@ -1194,14 +1194,14 @@ void sas_task_abort(struct sas_task *task)
 }
 EXPORT_SYMBOL_GPL(sas_task_abort);
 
-int sas_slave_alloc(struct scsi_device *sdev)
+int sas_sdev_init(struct scsi_device *sdev)
 {
        if (dev_is_sata(sdev_to_domain_dev(sdev)) && sdev->lun)
                return -ENXIO;
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(sas_slave_alloc);
+EXPORT_SYMBOL_GPL(sas_sdev_init);
 
 void sas_target_destroy(struct scsi_target *starget)
 {
index 905026a4782cf97c181c9fd5e56ecd5bf9662d10..10f6e8ff682fc724e1a1026f4978b41504f75776 100644 (file)
@@ -6226,7 +6226,7 @@ error:
 }
 
 /**
- * lpfc_slave_alloc - scsi_host_template slave_alloc entry point
+ * lpfc_sdev_init - scsi_host_template sdev_init entry point
  * @sdev: Pointer to scsi_device.
  *
  * This routine populates the cmds_per_lun count + 2 scsi_bufs into  this host's
@@ -6239,7 +6239,7 @@ error:
  *   0 - Success
  **/
 static int
-lpfc_slave_alloc(struct scsi_device *sdev)
+lpfc_sdev_init(struct scsi_device *sdev)
 {
        struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata;
        struct lpfc_hba   *phba = vport->phba;
@@ -6371,13 +6371,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;
@@ -6737,7 +6737,7 @@ lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
 }
 
 static int
-lpfc_no_slave(struct scsi_device *sdev)
+lpfc_no_sdev(struct scsi_device *sdev)
 {
        return -ENODEV;
 }
@@ -6748,8 +6748,8 @@ struct scsi_host_template lpfc_template_nvme = {
        .proc_name              = LPFC_DRIVER_NAME,
        .info                   = lpfc_info,
        .queuecommand           = lpfc_no_command,
-       .slave_alloc            = lpfc_no_slave,
-       .slave_configure        = lpfc_no_slave,
+       .sdev_init              = lpfc_no_sdev,
+       .slave_configure        = lpfc_no_sdev,
        .scan_finished          = lpfc_scan_finished,
        .this_id                = -1,
        .sg_tablesize           = 1,
@@ -6772,9 +6772,9 @@ struct scsi_host_template lpfc_template = {
        .eh_device_reset_handler = lpfc_device_reset_handler,
        .eh_target_reset_handler = lpfc_target_reset_handler,
        .eh_host_reset_handler  = lpfc_host_reset_handler,
-       .slave_alloc            = lpfc_slave_alloc,
+       .sdev_init              = lpfc_sdev_init,
        .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,
@@ -6799,9 +6799,9 @@ struct scsi_host_template lpfc_vport_template = {
        .eh_target_reset_handler = lpfc_target_reset_handler,
        .eh_bus_reset_handler   = NULL,
        .eh_host_reset_handler  = NULL,
-       .slave_alloc            = lpfc_slave_alloc,
+       .sdev_init              = lpfc_sdev_init,
        .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,
index 8e75e2e279a40ae5fdc6b7b07a7aed15241a8d54..7bdd28af62eae3c4fd00aecc40fe39fc73876468 100644 (file)
@@ -2109,7 +2109,7 @@ static int megasas_device_configure(struct scsi_device *sdev,
        return 0;
 }
 
-static int megasas_slave_alloc(struct scsi_device *sdev)
+static int megasas_sdev_init(struct scsi_device *sdev)
 {
        u16 pd_index = 0, ld_tgt_id;
        struct megasas_instance *instance ;
@@ -2154,7 +2154,7 @@ scan_target:
        return 0;
 }
 
-static void megasas_slave_destroy(struct scsi_device *sdev)
+static void megasas_sdev_destroy(struct scsi_device *sdev)
 {
        u16 ld_tgt_id;
        struct megasas_instance *instance;
@@ -3511,8 +3511,8 @@ static const struct scsi_host_template megasas_template = {
        .name = "Avago SAS based MegaRAID driver",
        .proc_name = "megaraid_sas",
        .device_configure = megasas_device_configure,
-       .slave_alloc = megasas_slave_alloc,
-       .slave_destroy = megasas_slave_destroy,
+       .sdev_init = megasas_sdev_init,
+       .sdev_destroy = megasas_sdev_destroy,
        .queuecommand = megasas_queue_command,
        .eh_target_reset_handler = megasas_reset_target,
        .eh_abort_handler = megasas_task_abort,
index 5f2f67acf8bf3194cb8ec78904096ffb4bdd7ff2..6b9f453565f282e966b23d69ab3e3003cf8223d1 100644 (file)
@@ -4465,14 +4465,14 @@ static int mpi3mr_scan_finished(struct Scsi_Host *shost,
 }
 
 /**
- * mpi3mr_slave_destroy - Slave destroy callback handler
+ * mpi3mr_sdev_destroy - Slave destroy callback handler
  * @sdev: SCSI device reference
  *
  * Cleanup and free per device(lun) private data.
  *
  * Return: Nothing.
  */
-static void mpi3mr_slave_destroy(struct scsi_device *sdev)
+static void mpi3mr_sdev_destroy(struct scsi_device *sdev)
 {
        struct Scsi_Host *shost;
        struct mpi3mr_ioc *mrioc;
@@ -4599,14 +4599,14 @@ static int mpi3mr_device_configure(struct scsi_device *sdev,
 }
 
 /**
- * mpi3mr_slave_alloc -Slave alloc callback handler
+ * mpi3mr_sdev_init -Slave alloc callback handler
  * @sdev: SCSI device reference
  *
  * Allocate per device(lun) private data and initialize it.
  *
  * Return: 0 on success -ENOMEM on memory allocation failure.
  */
-static int mpi3mr_slave_alloc(struct scsi_device *sdev)
+static int mpi3mr_sdev_init(struct scsi_device *sdev)
 {
        struct Scsi_Host *shost;
        struct mpi3mr_ioc *mrioc;
@@ -5062,10 +5062,10 @@ static const struct scsi_host_template mpi3mr_driver_template = {
        .proc_name                      = MPI3MR_DRIVER_NAME,
        .queuecommand                   = mpi3mr_qcmd,
        .target_alloc                   = mpi3mr_target_alloc,
-       .slave_alloc                    = mpi3mr_slave_alloc,
+       .sdev_init                      = mpi3mr_sdev_init,
        .device_configure               = mpi3mr_device_configure,
        .target_destroy                 = mpi3mr_target_destroy,
-       .slave_destroy                  = mpi3mr_slave_destroy,
+       .sdev_destroy                   = mpi3mr_sdev_destroy,
        .scan_finished                  = mpi3mr_scan_finished,
        .scan_start                     = mpi3mr_scan_start,
        .change_queue_depth             = mpi3mr_change_queue_depth,
index f2a55aa5fe65036a3beabae5c0c6e9db835d2aab..f8df6a83c9b7c5909d9880d1db7bf969a3f0a50d 100644 (file)
@@ -2026,14 +2026,14 @@ scsih_target_destroy(struct scsi_target *starget)
 }
 
 /**
- * scsih_slave_alloc - device add routine
+ * scsih_sdev_init - 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_init(struct scsi_device *sdev)
 {
        struct Scsi_Host *shost;
        struct MPT3SAS_ADAPTER *ioc;
@@ -2108,11 +2108,11 @@ scsih_slave_alloc(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;
@@ -11905,10 +11905,10 @@ static const 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_init                      = scsih_sdev_init,
        .device_configure               = scsih_device_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,
@@ -11943,10 +11943,10 @@ static const 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_init                      = scsih_sdev_init,
        .device_configure               = scsih_device_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,
index a7e64b867c8e28289a13fa1660087e75805f047c..154ec80bcd113d356d3dfa6a4d32b27ec03eb40e 100644 (file)
@@ -1619,7 +1619,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_init(struct scsi_device *sdev)
 {
        struct myrb_hba *cb = shost_priv(sdev->host);
        struct myrb_ldev_info *ldev_info;
@@ -1665,7 +1665,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_init(struct scsi_device *sdev)
 {
        struct myrb_hba *cb = shost_priv(sdev->host);
        struct myrb_pdev_state *pdev_info;
@@ -1701,7 +1701,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_init(struct scsi_device *sdev)
 {
        if (sdev->channel > myrb_logical_channel(sdev->host))
                return -ENXIO;
@@ -1710,9 +1710,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_init(sdev);
 
-       return myrb_pdev_slave_alloc(sdev);
+       return myrb_pdev_sdev_init(sdev);
 }
 
 static int myrb_slave_configure(struct scsi_device *sdev)
@@ -1741,7 +1741,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);
 }
@@ -2208,9 +2208,9 @@ static const 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_init              = myrb_sdev_init,
        .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_groups           = myrb_shost_groups,
index 1469d0c54e45580c84226abdf42b1a3fc769f737..a485e95d2d35986ac25541796663a0dceb0469f4 100644 (file)
@@ -1786,7 +1786,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_init(struct scsi_device *sdev)
 {
        struct myrs_hba *cs = shost_priv(sdev->host);
        unsigned char status;
@@ -1910,7 +1910,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);
 }
@@ -1921,9 +1921,9 @@ static const 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_init              = myrs_sdev_init,
        .slave_configure        = myrs_slave_configure,
-       .slave_destroy          = myrs_slave_destroy,
+       .sdev_destroy           = myrs_sdev_destroy,
        .cmd_size               = sizeof(struct myrs_cmdblk),
        .shost_groups           = myrs_shost_groups,
        .sdev_groups            = myrs_sdev_groups,
index 35869b4f9329d3db6d9ecf6bee588ae655bdf97f..8753eab526ab33a160564351102d963b48c4343f 100644 (file)
@@ -7786,7 +7786,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_init(struct scsi_device *device)
 {
        struct Scsi_Host *host = device->host;
        struct ncb *np = ((struct host_data *) host->hostdata)->ncb;
@@ -8094,7 +8094,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_init         = ncr53c8xx_sdev_init;
        tpnt->eh_bus_reset_handler = ncr53c8xx_bus_reset;
        tpnt->can_queue         = SCSI_NCR_CAN_QUEUE;
        tpnt->this_id           = 7;
index 4c5881917d76328c1195a68c1df8a3877df91caf..d9e6e75e801cb95256fd478eb29af9c4a054e4b0 100644 (file)
@@ -125,7 +125,7 @@ MODULE_DEVICE_TABLE(pci, pmcraid_pci_table);
 
 
 /**
- * pmcraid_slave_alloc - Prepare for commands to a device
+ * pmcraid_sdev_init - 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
@@ -136,7 +136,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_init(struct scsi_device *scsi_dev)
 {
        struct pmcraid_resource_entry *temp, *res = NULL;
        struct pmcraid_instance *pinstance;
@@ -248,17 +248,17 @@ static int pmcraid_device_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
  *
  * 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_init will be reset to NULL here.
  *
  * 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;
 
@@ -3668,9 +3668,9 @@ static const 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_init = pmcraid_sdev_init,
        .device_configure = pmcraid_device_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,
index 7f980e6141c28282d4c4a0123dda96e36e1f180e..686e69d3ec98abf030fb28205f0231714e7d68d7 100644 (file)
@@ -1934,7 +1934,7 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
 }
 
 static int
-qla2xxx_slave_alloc(struct scsi_device *sdev)
+qla2xxx_sdev_init(struct scsi_device *sdev)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
 
@@ -1957,7 +1957,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;
 }
@@ -8088,8 +8088,8 @@ struct scsi_host_template qla2xxx_driver_template = {
 
        .slave_configure        = qla2xxx_slave_configure,
 
-       .slave_alloc            = qla2xxx_slave_alloc,
-       .slave_destroy          = qla2xxx_slave_destroy,
+       .sdev_init              = qla2xxx_sdev_init,
+       .sdev_destroy           = qla2xxx_sdev_destroy,
        .scan_finished          = qla2xxx_scan_finished,
        .scan_start             = qla2xxx_scan_start,
        .change_queue_depth     = scsi_change_queue_depth,
index d91f54a6e752f2feb68da69f474375f1415f33a2..863071f80d390427c7935f3a5fc1f26cd34ad166 100644 (file)
@@ -160,7 +160,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_init(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);
 
@@ -234,7 +234,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_init              = qla4xxx_sdev_init,
        .change_queue_depth     = scsi_change_queue_depth,
 
        .this_id                = -1,
@@ -9052,7 +9052,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_init(struct scsi_device *sdev)
 {
        struct iscsi_cls_session *cls_sess;
        struct iscsi_session *sess;
index b52513eeeafa759d8c01bd67f3213da06fc72cc1..8d7b6773b3a5833648519e21c45d794ed6d5f58a 100644 (file)
@@ -5879,10 +5879,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_init(struct scsi_device *sdp)
 {
        if (sdebug_verbose)
-               pr_info("slave_alloc <%u %u %u %llu>\n",
+               pr_info("sdev_init <%u %u %u %llu>\n",
                       sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
 
        return 0;
@@ -5927,14 +5927,14 @@ 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;
        struct sdebug_err_inject *err;
 
        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)
@@ -8712,9 +8712,9 @@ 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_init =            scsi_debug_sdev_init,
        .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,
index 042329b74c6e6829afae5a4feed057bba4bff64b..f981098ad6bc223ff6e002c77a4b981e5bd29a5a 100644 (file)
@@ -265,7 +265,7 @@ static int scsi_realloc_sdev_budget_map(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_init instead
  *
  * Description:
  *     Allocate, initialize for io, and return a pointer to a scsi_Device.
@@ -312,7 +312,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_init instead */
        sdev->hostdata = hostdata;
 
        /* if the device needs this changing, it may do so in the
@@ -363,8 +363,8 @@ 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_init) {
+               ret = shost->hostt->sdev_init(sdev);
                if (ret) {
                        /*
                         * if LLDD reports slave not present, don't clutter
index f3a1ecb42128a2b221ca5c362e041eb59dba0f20..5f164a4a0317cd07507af44dfb04f9af4c03c96f 100644 (file)
@@ -1513,8 +1513,8 @@ void __scsi_remove_device(struct scsi_device *sdev)
        kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags);
        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);
 
        /*
index 870f37b7054644426a2695e857c45a0a12aff051..0a739c0cf83279060b4a36824ce7c8e0d5b4f319 100644 (file)
@@ -6490,7 +6490,7 @@ out:
        return SUCCESS;
 }
 
-static int pqi_slave_alloc(struct scsi_device *sdev)
+static int pqi_sdev_init(struct scsi_device *sdev)
 {
        struct pqi_scsi_dev *device;
        unsigned long flags;
@@ -6574,7 +6574,7 @@ static int pqi_slave_configure(struct scsi_device *sdev)
        return rc;
 }
 
-static void pqi_slave_destroy(struct scsi_device *sdev)
+static void pqi_sdev_destroy(struct scsi_device *sdev)
 {
        struct pqi_ctrl_info *ctrl_info;
        struct pqi_scsi_dev *device;
@@ -7549,9 +7549,9 @@ static const struct scsi_host_template pqi_driver_template = {
        .eh_device_reset_handler = pqi_eh_device_reset_handler,
        .eh_abort_handler = pqi_eh_abort_handler,
        .ioctl = pqi_ioctl,
-       .slave_alloc = pqi_slave_alloc,
+       .sdev_init = pqi_sdev_init,
        .slave_configure = pqi_slave_configure,
-       .slave_destroy = pqi_slave_destroy,
+       .sdev_destroy = pqi_sdev_destroy,
        .map_queues = pqi_map_queues,
        .sdev_groups = pqi_sdev_groups,
        .shost_groups = pqi_shost_groups,
index 9be3f0193145fd481adb09d0b75a2e57b1560d6d..14830b6ab94b3113f9272228470565373b775766 100644 (file)
@@ -42,11 +42,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_init : callback function to SCSI Mid Layer, called on
  * scsi device initialization.
  */
 static int
-snic_slave_alloc(struct scsi_device *sdev)
+snic_sdev_init(struct scsi_device *sdev)
 {
        struct snic_tgt *tgt = starget_to_tgt(scsi_target(sdev));
 
@@ -107,7 +107,7 @@ static const 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_init = snic_sdev_init,
        .slave_configure = snic_slave_configure,
        .change_queue_depth = snic_change_queue_depth,
        .this_id = -1,
index 7ceb982040a5dfe5d490f9a4bd306e99e5140a53..0f18591539e76d5c3835e846e2ca35d1af930479 100644 (file)
@@ -1875,7 +1875,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_init =            storvsc_device_alloc,
        .slave_configure =      storvsc_device_configure,
        .cmd_per_lun =          2048,
        .this_id =              -1,
index a2560cc807d34ce881f86eb9970e1f7bf57da0bf..e7a17f87027da064614a1355869be66c4b203d52 100644 (file)
@@ -765,7 +765,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_init(struct scsi_device *sdev)
 {
        struct sym_hcb *np = sym_get_hcb(sdev->host);
        struct sym_tcb *tp = &np->target[sdev->id];
@@ -861,14 +861,14 @@ 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];
        struct sym_lcb *lp = sym_lp(tp, sdev->lun);
        unsigned long flags;
 
-       /* if slave_alloc returned before allocating a sym_lcb, return */
+       /* if sdev_init returned before allocating a sym_lcb, return */
        if (!lp)
                return;
 
@@ -1684,9 +1684,9 @@ static const struct scsi_host_template sym2_template = {
        .info                   = sym53c8xx_info, 
        .cmd_size               = sizeof(struct sym_ucmd),
        .queuecommand           = sym53c8xx_queue_command,
-       .slave_alloc            = sym53c8xx_slave_alloc,
+       .sdev_init              = sym53c8xx_sdev_init,
        .slave_configure        = sym53c8xx_slave_configure,
-       .slave_destroy          = sym53c8xx_slave_destroy,
+       .sdev_destroy           = sym53c8xx_sdev_destroy,
        .eh_abort_handler       = sym53c8xx_eh_abort_handler,
        .eh_target_reset_handler = sym53c8xx_eh_target_reset_handler,
        .eh_bus_reset_handler   = sym53c8xx_eh_bus_reset_handler,
index 8471f38b730e205eb57052305c154260864bee95..4dab566c913b2bcaf5ef613c988bd8a00761a51a 100644 (file)
@@ -801,7 +801,7 @@ static const 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_init = virtscsi_device_alloc,
 
        .dma_boundary = UINT_MAX,
        .map_queues = virtscsi_map_queues,
index 9ec55ddc120428ba20567b904c8f86cfee0dab36..8ac3b284c2ef6eedeefb9315fc17d5171898a7aa 100644 (file)
@@ -777,7 +777,7 @@ static const 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,
@@ -1075,7 +1075,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),
index 6a26853330763fde7026208211eccdd13e735a3a..92b3abd6a9632e659fcd576d1d47d28812bfc296 100644 (file)
@@ -5158,12 +5158,12 @@ set_qdepth:
 }
 
 /**
- * ufshcd_slave_alloc - handle initial SCSI device configurations
+ * ufshcd_sdev_init - handle initial SCSI device configurations
  * @sdev: pointer to SCSI device
  *
  * Return: success.
  */
-static int ufshcd_slave_alloc(struct scsi_device *sdev)
+static int ufshcd_sdev_init(struct scsi_device *sdev)
 {
        struct ufs_hba *hba;
 
@@ -5244,10 +5244,10 @@ static int ufshcd_device_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;
        unsigned long flags;
@@ -8930,9 +8930,9 @@ static const struct scsi_host_template ufshcd_driver_template = {
        .map_queues             = ufshcd_map_queues,
        .queuecommand           = ufshcd_queuecommand,
        .mq_poll                = ufshcd_poll,
-       .slave_alloc            = ufshcd_slave_alloc,
+       .sdev_init              = ufshcd_sdev_init,
        .device_configure       = ufshcd_device_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,
index 9f758241d9d37602840a85abd55ae6d6e6463b32..934ec5310fb977d35e6b4aa67ae76bb5e7253997 100644 (file)
@@ -322,7 +322,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_init (struct scsi_device *s)
 {
        s->inquiry_len = 0x24;
        return 0;
@@ -626,7 +626,7 @@ static const struct scsi_host_template mts_scsi_host_template = {
        .this_id =              -1,
        .emulated =             1,
        .dma_alignment =        511,
-       .slave_alloc =          mts_slave_alloc,
+       .sdev_init =            mts_sdev_init,
        .max_sectors=           256, /* 128 K */
 };
 
index 8c8b5e6041cc275e5b927e5be94b355b8440083f..a64ce2aca9ec4c3ba213db05d9ae21454e2afc62 100644 (file)
@@ -64,7 +64,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_init (struct scsi_device *sdev)
 {
        struct us_data *us = host_to_us(sdev->host);
 
@@ -127,7 +127,7 @@ static int device_configure(struct scsi_device *sdev, struct queue_limits *lim)
                lim->max_hw_sectors, dma_max_mapping_size(dev) >> SECTOR_SHIFT);
 
        /*
-        * We can't put these settings in slave_alloc() because that gets
+        * We can't put these settings in sdev_init() because that gets
         * called before the device type is known.  Consequently these
         * settings can't be overridden via the scsi devinfo mechanism.
         */
@@ -637,7 +637,7 @@ static const struct scsi_host_template usb_stor_host_template = {
        /* unknown initiator id */
        .this_id =                      -1,
 
-       .slave_alloc =                  slave_alloc,
+       .sdev_init =                    sdev_init,
        .device_configure =             device_configure,
        .target_alloc =                 target_alloc,
 
index 03043d567fa1bebf0c3c4c0c608bf6bf55d1f53c..7bd2a314b32978daf9e1fc2ff414ab05f9dc897d 100644 (file)
@@ -817,7 +817,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_init(struct scsi_device *sdev)
 {
        struct uas_dev_info *devinfo =
                (struct uas_dev_info *)sdev->host->hostdata;
@@ -905,7 +905,7 @@ static const struct scsi_host_template uas_host_template = {
        .name = "uas",
        .queuecommand = uas_queuecommand,
        .target_alloc = uas_target_alloc,
-       .slave_alloc = uas_slave_alloc,
+       .sdev_init = uas_sdev_init,
        .device_configure = uas_device_configure,
        .eh_abort_handler = uas_eh_abort_handler,
        .eh_device_reset_handler = uas_eh_device_reset_handler,
index c1a85d46eba6d51a6fd119d787cb4badff28e06b..fb5e13b8d89f5edfee38e99c30328bbfd0ba7980 100644 (file)
@@ -1199,10 +1199,10 @@ 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_alloc(struct scsi_device *sdev);
+extern int ata_scsi_sdev_init(struct scsi_device *sdev);
 int ata_scsi_device_configure(struct scsi_device *sdev,
                struct queue_limits *lim);
-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,
@@ -1458,8 +1458,8 @@ extern const struct attribute_group *ata_common_sdev_groups[];
        .this_id                = ATA_SHT_THIS_ID,              \
        .emulated               = ATA_SHT_EMULATED,             \
        .proc_name              = drv_name,                     \
-       .slave_alloc            = ata_scsi_slave_alloc,         \
-       .slave_destroy          = ata_scsi_slave_destroy,       \
+       .sdev_init              = ata_scsi_sdev_init,           \
+       .sdev_destroy           = ata_scsi_sdev_destroy,        \
        .bios_param             = ata_std_bios_param,           \
        .unlock_native_capacity = ata_scsi_unlock_native_capacity,\
        .max_sectors            = ATA_MAX_SECTORS_LBA48
index 4a9b4169e08149e69cd4678c440a755007cb3a15..183d9fd50d2dd9658f42cf4b36021dc98c3b2fd8 100644 (file)
@@ -963,7 +963,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_init(struct scsi_device *);
 
 /*
  * ELS/CT interface
index 1324068dd950f3dfb69400b90f5cbcdd82f7f835..f30f716ba04525280d6df69834e110878aa3d241 100644 (file)
@@ -703,7 +703,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_init(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);
@@ -751,7 +751,7 @@ void sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event,
 
 #define LIBSAS_SHT_BASE                        _LIBSAS_SHT_BASE                \
        .device_configure               = sas_device_configure,         \
-       .slave_alloc                    = sas_slave_alloc,              \
+       .sdev_init                      = sas_sdev_init,                \
 
 #define LIBSAS_SHT_BASE_NO_SLAVE_INIT  _LIBSAS_SHT_BASE
 
index 9c540f5468ebff9885359214863d21ea33ac8d20..7acd0ec82bb0a0598745628ea15d6d5d98bc6f16 100644 (file)
@@ -155,7 +155,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_init to scsi
                                 * core. */
        unsigned int eh_timeout; /* Error handling timeout */
 
@@ -357,7 +357,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_init host template callout.
         * If set to zero then there is not limit.
         */
        unsigned int            can_queue;
index 2b4ab0369ffbe9dcdb82f0d19fc7ac1e214364b8..58b29cc6de095f515837b5a308a8c8a2a396b90b 100644 (file)
@@ -168,20 +168,20 @@ 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.
         *
         * Status: OPTIONAL
         */
-       int (* slave_alloc)(struct scsi_device *);
+       int (* sdev_init)(struct scsi_device *);
 
        /*
         * Once the device has responded to an INQUIRY and we know the
@@ -206,7 +206,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
         *
@@ -223,11 +223,11 @@ 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_init or slave_configure calls. 
         *
         * 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