mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
scsi: Rename .slave_alloc() and .slave_destroy()
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>
This commit is contained in:
committed by
Martin K. Petersen
parent
40384c840e
commit
ed638918f4
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
+10
-10
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user