From patchwork Mon Sep 30 20:18:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 831804 Received: from 008.lax.mailroute.net (008.lax.mailroute.net [199.89.1.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CEA31A0BFF for ; Mon, 30 Sep 2024 20:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727719; cv=none; b=N8BID6FY+M4PzYilCmetuUdg+5l0JcszmJpovG4//rUJYbg4/eWI9yaCD+pdUsMn+w0NmaC51I50a2gbO5ctaWKrfUJnYEfqtTH9tnFNdX3Yh8Cm9vUMbA8jufj8R8jTrSZ5UXkpykQ+T4zLsyRyZf40H2/+1Ozkyg/WbcCze48= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727719; c=relaxed/simple; bh=/FFnJ3mKcPpnbtw8VXY3zX7muzDbWQg40kOpQ6guI2c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uesWNd7RT7X2748ovqjqtMKdWsD80NjeEjsbVUZZvMOck2FbxFKA8irXihpW+Y40Km4ALOQHyLTrtqZjAZ2lYEzTRfPR3BFBM/IIXPGB7N0qYL2fUr4m21QOfvryI3MZwruAC924S9x1D6jfarTE8w1G9j8O46U8JbAJDtgaYd8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=JQGpe5rl; arc=none smtp.client-ip=199.89.1.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="JQGpe5rl" Received: from localhost (localhost [127.0.0.1]) by 008.lax.mailroute.net (Postfix) with ESMTP id 4XHXXy5JWsz6ClY9d; Mon, 30 Sep 2024 20:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727727624; x=1730319625; bh=nmfP1 6SWx34DgqKltSkLWKJKjI3amEKmO38FirbiGQc=; b=JQGpe5rlnwgQo23CyJkIm kSadJj7JW1Z08dO6y1W2Iz2p5LxK463FdgCyUfLOLlY7qzMq1vLkFV/MS/sKv2EB cgQBraR6ZBxU6/jStWyVpvTY0Ceh7r9IUh5h6lwpZuzjtWJrRv2OhYh4JjXjUzMl KDrMuIJpvbpyyWbUU0rxFSxCbJFSbrPLkSp5jDiFAB/3BkyUcG1oIfOA0aRQmsCZ hqddKJhKLDkZ8Sf5N9FQkMW+um/QAIvahHfi3ndEmRqaLhHbBIOFKTtANinlvAOz FGn7Zutbc0Kx0KlV0vM8D880PbiQADKAFM0fCZ2GzsYZ4TsY3jh/XOEfrq3s+MHq A== X-Virus-Scanned: by MailRoute Received: from 008.lax.mailroute.net ([127.0.0.1]) by localhost (008.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id gYvcgGZ6Mkut; Mon, 30 Sep 2024 20:20:24 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 008.lax.mailroute.net (Postfix) with ESMTPSA id 4XHXVw5Pbsz6ClY9V; Mon, 30 Sep 2024 20:20:08 +0000 (UTC) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Damien Le Moal , Jonathan Corbet , Niklas Cassel , Takashi Sakamoto , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , Tariq Toukan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Maier , Benjamin Block , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , "James E.J. Bottomley" , Hannes Reinecke , Anil Gurumurthy , Sudarsana Kalluru , Saurav Kashyap , Javed Hasan , GR-QLogic-Storage-Upstream@marvell.com, Oliver Neukum , Ali Akcaagac , Jamie Lenehan , Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , Yihang Li , Don Brace , Tyrel Datwyler , Michael Ellerman , Brian King , James Smart , Dick Kennedy , Kashyap Desai , Sumit Saxena , Shivasharan S , Chandrakanth patil , Nilesh Javali , Manish Rangankar , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Matthew Wilcox , "Michael S. Tsirkin" , Jason Wang , Juergen Gross , Stefano Stabellini , Greg Kroah-Hartman , Alan Stern , Randy Dunlap , John Garry , Soumya Negi , Johannes Thumshirn , Peter Wang , Manivannan Sadhasivam , Avri Altman , Andrew Halaney , Bean Huo , "Bao D. Nguyen" Subject: [PATCH 1/4] scsi: Rename .slave_alloc() and .slave_destroy() Date: Mon, 30 Sep 2024 13:18:47 -0700 Message-ID: <20240930201937.2020129-2-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930201937.2020129-1-bvanassche@acm.org> References: <20240930201937.2020129-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is agreement that the word "slave" should not be used in Linux kernel source code. Hence this patch that renames .slave_alloc() into .device_alloc() and .slave_destroy() into .device_destroy() in the SCSI core, SCSI drivers, ATA drivers and also in the SCSI documentation. Do not modify Documentation/scsi/ChangeLog.lpfc. No functionality has been changed. This patch has been created as follows: * Change the text "slave_alloc" into "device_alloc" in all source files except in the LPFC driver changelog. * Change the text "slave_destroy" into "device_destroy" in all source files except in the LPFC driver changelog. * Rename lpfc_no_slave() into lpfc_no_device(). * Manually adjust whitespace where necessary to restore vertical alignment (dc395x driver and include/linux/libata.h). Cc: Damien Le Moal Signed-off-by: Bart Van Assche Tested-by: Randy Dunlap # doc builds --- Documentation/scsi/scsi_mid_low_api.rst | 50 +++++++++++------------ drivers/ata/libata-scsi.c | 12 +++--- drivers/firewire/sbp2.c | 4 +- drivers/message/fusion/mptfc.c | 12 +++--- drivers/message/fusion/mptsas.c | 8 ++-- drivers/message/fusion/mptscsih.c | 6 +-- drivers/message/fusion/mptscsih.h | 2 +- drivers/message/fusion/mptspi.c | 12 +++--- drivers/net/ethernet/mellanox/mlx4/main.c | 12 +++--- drivers/s390/scsi/zfcp_scsi.c | 10 ++--- drivers/s390/scsi/zfcp_sysfs.c | 2 +- drivers/s390/scsi/zfcp_unit.c | 2 +- drivers/scsi/53c700.c | 12 +++--- drivers/scsi/aic7xxx/aic79xx_osm.c | 4 +- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 +- drivers/scsi/bfa/bfad_im.c | 20 ++++----- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- drivers/scsi/csiostor/csio_scsi.c | 12 +++--- drivers/scsi/dc395x.c | 12 +++--- drivers/scsi/esp_scsi.c | 8 ++-- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fnic/fnic_main.c | 4 +- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- drivers/scsi/hpsa.c | 12 +++--- drivers/scsi/ibmvscsi/ibmvfc.c | 6 +-- drivers/scsi/ipr.c | 12 +++--- drivers/scsi/libfc/fc_fcp.c | 6 +-- drivers/scsi/libsas/sas_scsi_host.c | 4 +- drivers/scsi/lpfc/lpfc_scsi.c | 22 +++++----- drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++-- drivers/scsi/mpi3mr/mpi3mr_os.c | 12 +++--- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 16 ++++---- drivers/scsi/myrb.c | 16 ++++---- drivers/scsi/myrs.c | 8 ++-- drivers/scsi/ncr53c8xx.c | 4 +- drivers/scsi/pmcraid.c | 14 +++---- drivers/scsi/qla2xxx/qla_os.c | 8 ++-- drivers/scsi/qla4xxx/ql4_os.c | 6 +-- drivers/scsi/scsi_debug.c | 12 +++--- drivers/scsi/scsi_scan.c | 8 ++-- drivers/scsi/scsi_sysfs.c | 4 +- drivers/scsi/smartpqi/smartpqi_init.c | 8 ++-- drivers/scsi/snic/snic_main.c | 6 +-- drivers/scsi/storvsc_drv.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 10 ++--- drivers/scsi/virtio_scsi.c | 2 +- drivers/scsi/xen-scsifront.c | 4 +- drivers/staging/rts5208/rtsx.c | 4 +- drivers/ufs/core/ufshcd.c | 12 +++--- drivers/usb/image/microtek.c | 4 +- drivers/usb/storage/scsiglue.c | 6 +-- drivers/usb/storage/uas.c | 4 +- include/linux/libata.h | 8 ++-- include/scsi/libfc.h | 2 +- include/scsi/libsas.h | 4 +- include/scsi/scsi_device.h | 4 +- include/scsi/scsi_host.h | 16 ++++---- 61 files changed, 250 insertions(+), 250 deletions(-) diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst index 2df29b92e196..3507c10164b4 100644 --- a/Documentation/scsi/scsi_mid_low_api.rst +++ b/Documentation/scsi/scsi_mid_low_api.rst @@ -112,9 +112,9 @@ Those usages in group c) should be handled with care, especially in a that are shared with the mid level and other layers. All functions defined within an LLD and all data defined at file scope -should be static. For example the slave_alloc() function in an LLD +should be static. For example the device_alloc() function in an LLD called "xxx" could be defined as -``static int xxx_slave_alloc(struct scsi_device * sdev) { /* code */ }`` +``static int xxx_device_alloc(struct scsi_device * sdev) { /* code */ }`` .. [#] the scsi_host_alloc() function is a replacement for the rather vaguely named scsi_register() function in most situations. @@ -149,18 +149,18 @@ scsi devices of which only the first 2 respond:: scsi_add_host() ----> scsi_scan_host() -------+ | - slave_alloc() + device_alloc() slave_configure() --> scsi_change_queue_depth() | - slave_alloc() + device_alloc() slave_configure() | - slave_alloc() *** - slave_destroy() *** + device_alloc() *** + device_destroy() *** *** For scsi devices that the mid level tries to scan but do not - respond, a slave_alloc(), slave_destroy() pair is called. + respond, a device_alloc(), device_destroy() pair is called. If the LLD wants to adjust the default queue settings, it can invoke scsi_change_queue_depth() in its slave_configure() routine. @@ -176,8 +176,8 @@ same:: ===----------------------=========-----------------===------ scsi_remove_host() ---------+ | - slave_destroy() - slave_destroy() + device_destroy() + device_destroy() scsi_host_put() It may be useful for a LLD to keep track of struct Scsi_Host instances @@ -202,7 +202,7 @@ An LLD can use this sequence to make the mid level aware of a SCSI device:: ===-------------------=========--------------------===------ scsi_add_device() ------+ | - slave_alloc() + device_alloc() slave_configure() [--> scsi_change_queue_depth()] In a similar fashion, an LLD may become aware that a SCSI device has been @@ -218,12 +218,12 @@ upper layers with this sequence:: ===----------------------=========-----------------===------ scsi_remove_device() -------+ | - slave_destroy() + device_destroy() It may be useful for an LLD to keep track of struct scsi_device instances -(a pointer is passed as the parameter to slave_alloc() and +(a pointer is passed as the parameter to device_alloc() and slave_configure() callbacks). Such instances are "owned" by the mid-level. -struct scsi_device instances are freed after slave_destroy(). +struct scsi_device instances are freed after device_destroy(). Reference Counting @@ -331,7 +331,7 @@ Details:: * bus scan when an HBA is added (i.e. scsi_scan_host()). So it * should only be called if the HBA becomes aware of a new scsi * device (lu) after scsi_scan_host() has completed. If successful - * this call can lead to slave_alloc() and slave_configure() callbacks + * this call can lead to device_alloc() and slave_configure() callbacks * into the LLD. * * Defined in: drivers/scsi/scsi_scan.c @@ -375,7 +375,7 @@ Details:: * * Notes: Can be invoked any time on a SCSI device controlled by this * LLD. [Specifically during and after slave_configure() and prior to - * slave_destroy().] Can safely be invoked from interrupt code. + * device_destroy().] Can safely be invoked from interrupt code. * * Defined in: drivers/scsi/scsi.c [see source code for more notes] * @@ -506,7 +506,7 @@ Details:: * Notes: If an LLD becomes aware that a scsi device (lu) has * been removed but its host is still present then it can request * the removal of that scsi device. If successful this call will - * lead to the slave_destroy() callback being invoked. sdev is an + * lead to the device_destroy() callback being invoked. sdev is an * invalid pointer after this call. * * Defined in: drivers/scsi/scsi_sysfs.c . @@ -657,9 +657,9 @@ Summary: - ioctl - driver can respond to ioctls - proc_info - supports /proc/scsi/{driver_name}/{host_no} - queuecommand - queue scsi command, invoke 'done' on completion - - slave_alloc - prior to any commands being sent to a new device + - device_alloc - prior to any commands being sent to a new device - slave_configure - driver fine tuning for given device after attach - - slave_destroy - given device is about to be shut down + - device_destroy - given device is about to be shut down Details:: @@ -960,7 +960,7 @@ Details:: /** - * slave_alloc - prior to any commands being sent to a new device + * device_alloc - prior to any commands being sent to a new device * (i.e. just prior to scan) this call is made * @sdp: pointer to new device (about to be scanned) * @@ -976,12 +976,12 @@ Details:: * exist but the mid level is just about to scan for it (i.e. send * and INQUIRY command plus ...). If a device is found then * slave_configure() will be called while if a device is not found - * slave_destroy() is called. + * device_destroy() is called. * For more details see the include/scsi/scsi_host.h file. * * Optionally defined in: LLD **/ - int slave_alloc(struct scsi_device *sdp) + int device_alloc(struct scsi_device *sdp) /** @@ -992,7 +992,7 @@ Details:: * * Returns 0 if ok. Any other return is assumed to be an error and * the device is taken offline. [offline devices will _not_ have - * slave_destroy() called on them so clean up resources.] + * device_destroy() called on them so clean up resources.] * * Locks: none * @@ -1008,7 +1008,7 @@ Details:: /** - * slave_destroy - given device is about to be shut down. All + * device_destroy - given device is about to be shut down. All * activity has ceased on this device. * @sdp: device that is about to be shut down * @@ -1023,12 +1023,12 @@ Details:: * by this driver for given device should be freed now. No further * commands will be sent for this sdp instance. [However the device * could be re-attached in the future in which case a new instance - * of struct scsi_device would be supplied by future slave_alloc() + * of struct scsi_device would be supplied by future device_alloc() * and slave_configure() calls.] * * Optionally defined in: LLD **/ - void slave_destroy(struct scsi_device *sdp) + void device_destroy(struct scsi_device *sdp) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index a4aedf7e1775..bb82b6400bfb 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -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_device_alloc - 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_device_alloc(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_device_alloc); /** * 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_device_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_device_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_device_destroy); /** * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 827dee0f57dd..e88654b3a220 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -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_device_alloc(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, + .device_alloc = sbp2_scsi_device_alloc, .device_configure = sbp2_scsi_device_configure, .eh_abort_handler = sbp2_scsi_abort, .this_id = -1, diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 91242f26defb..1b43fba24af1 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -96,7 +96,7 @@ static u8 mptfcTaskCtx = MPT_MAX_PROTOCOL_DRIVERS; static u8 mptfcInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; static int mptfc_target_alloc(struct scsi_target *starget); -static int mptfc_slave_alloc(struct scsi_device *sdev); +static int mptfc_device_alloc(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, + .device_alloc = mptfc_device_alloc, .slave_configure = mptscsih_slave_configure, .target_destroy = mptfc_target_destroy, - .slave_destroy = mptscsih_slave_destroy, + .device_destroy = mptscsih_device_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. + * device_alloc 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_device_alloc(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 "device_alloc kmalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); return -ENOMEM; } diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index a0bcb0864ecd..848c45d141e3 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -1867,7 +1867,7 @@ mptsas_target_destroy(struct scsi_target *starget) static int -mptsas_slave_alloc(struct scsi_device *sdev) +mptsas_device_alloc(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 "device_alloc 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, + .device_alloc = mptsas_device_alloc, .slave_configure = mptsas_slave_configure, .target_destroy = mptsas_target_destroy, - .slave_destroy = mptscsih_slave_destroy, + .device_destroy = mptscsih_device_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_timed_out = mptsas_eh_timed_out, .eh_abort_handler = mptscsih_abort, diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 6c3f25cc33ff..18664bbe8db5 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -1071,7 +1071,7 @@ EXPORT_SYMBOL(mptscsih_flush_running_cmds); * * Returns: None. * - * Called from slave_destroy. + * Called from device_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_device_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_device_destroy); EXPORT_SYMBOL(mptscsih_slave_configure); EXPORT_SYMBOL(mptscsih_abort); EXPORT_SYMBOL(mptscsih_dev_reset); diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index e3d92c392673..e3b7368264d7 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h @@ -116,7 +116,7 @@ extern const char * mptscsih_info(struct Scsi_Host *SChost); extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt); extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u64 lun, int ctx2abort, ulong timeout); -extern void mptscsih_slave_destroy(struct scsi_device *device); +extern void mptscsih_device_destroy(struct scsi_device *device); extern int mptscsih_slave_configure(struct scsi_device *device); extern int mptscsih_abort(struct scsi_cmnd * SCpnt); extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt); diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 574b882c9a85..744487585a78 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -713,7 +713,7 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd, mptspi_read_parameters(sdev->sdev_target); } -static int mptspi_slave_alloc(struct scsi_device *sdev) +static int mptspi_device_alloc(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 "device_alloc 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_device_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_device_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, + .device_alloc = mptspi_device_alloc, .slave_configure = mptspi_slave_configure, .target_destroy = mptspi_target_destroy, - .slave_destroy = mptspi_slave_destroy, + .device_destroy = mptspi_device_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_abort_handler = mptscsih_abort, .eh_device_reset_handler = mptscsih_dev_reset, diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index febeadfdd5a5..fc909e336dc3 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -851,7 +851,7 @@ static void slave_adjust_steering_mode(struct mlx4_dev *dev, mlx4_steering_mode_str(dev->caps.steering_mode)); } -static void mlx4_slave_destroy_special_qp_cap(struct mlx4_dev *dev) +static void mlx4_device_destroy_special_qp_cap(struct mlx4_dev *dev) { kfree(dev->caps.spec_qps); dev->caps.spec_qps = NULL; @@ -894,7 +894,7 @@ static int mlx4_slave_special_qp_cap(struct mlx4_dev *dev) err_mem: if (err) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_device_destroy_special_qp_cap(dev); kfree(func_cap); return err; } @@ -1078,7 +1078,7 @@ static int mlx4_slave_cap(struct mlx4_dev *dev) err_mem: if (err) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_device_destroy_special_qp_cap(dev); free_mem: kfree(hca_param); kfree(func_cap); @@ -2503,7 +2503,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) unmap_bf_area(dev); if (mlx4_is_slave(dev)) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_device_destroy_special_qp_cap(dev); err_close: if (mlx4_is_slave(dev)) @@ -3749,7 +3749,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data, } if (mlx4_is_slave(dev)) - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_device_destroy_special_qp_cap(dev); err_close: mlx4_close_hca(dev); @@ -4159,7 +4159,7 @@ static void mlx4_unload_one(struct pci_dev *pdev) if (!mlx4_is_slave(dev)) mlx4_free_ownership(dev); - mlx4_slave_destroy_special_qp_cap(dev); + mlx4_device_destroy_special_qp_cap(dev); kfree(dev->dev_vfs); mlx4_adev_cleanup(dev); diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index b2a8cd792266..355b99fa8c0f 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -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_device_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 device_alloc 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_device_alloc(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, + .device_alloc = zfcp_scsi_device_alloc, .slave_configure = zfcp_scsi_slave_configure, - .slave_destroy = zfcp_scsi_slave_destroy, + .device_destroy = zfcp_scsi_device_destroy, .change_queue_depth = scsi_change_queue_depth, .host_reset = zfcp_scsi_sysfs_host_reset, .proc_name = "zfcp", diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c index cb67fa80fb12..7a6c7fa8f844 100644 --- a/drivers/s390/scsi/zfcp_sysfs.c +++ b/drivers/s390/scsi/zfcp_sysfs.c @@ -284,7 +284,7 @@ static bool zfcp_sysfs_port_in_use(struct zfcp_port *const port) goto unlock_host_lock; } - /* port is about to be removed, so no more unit_add or slave_alloc */ + /* port is about to be removed, so no more unit_add or device_alloc */ zfcp_sysfs_port_set_removing(port); in_use = false; diff --git a/drivers/s390/scsi/zfcp_unit.c b/drivers/s390/scsi/zfcp_unit.c index 60f2a04f0869..a8ad08040366 100644 --- a/drivers/s390/scsi/zfcp_unit.c +++ b/drivers/s390/scsi/zfcp_unit.c @@ -170,7 +170,7 @@ int zfcp_unit_add(struct zfcp_port *port, u64 fcp_lun) write_unlock_irq(&port->unit_list_lock); /* * lock order: shost->scan_mutex before zfcp_sysfs_port_units_mutex - * due to zfcp_unit_scsi_scan() => zfcp_scsi_slave_alloc() + * due to zfcp_unit_scsi_scan() => zfcp_scsi_device_alloc() */ mutex_unlock(&zfcp_sysfs_port_units_mutex); diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 85439e976143..5498417604fc 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -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_device_alloc(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_device_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->device_destroy = NCR_700_device_destroy; + tpnt->device_alloc = NCR_700_device_alloc; 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_device_alloc(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_device_destroy(struct scsi_device *SDp) { kfree(SDp->hostdata); SDp->hostdata = NULL; diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 4202059815a0..1bf60a8d01cf 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -672,7 +672,7 @@ ahd_linux_target_destroy(struct scsi_target *starget) } static int -ahd_linux_slave_alloc(struct scsi_device *sdev) +ahd_linux_device_alloc(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, + .device_alloc = ahd_linux_device_alloc, .slave_configure = ahd_linux_slave_configure, .target_alloc = ahd_linux_target_alloc, .target_destroy = ahd_linux_target_destroy, diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index b0c4f2345321..5724e8940ea8 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -632,7 +632,7 @@ ahc_linux_target_destroy(struct scsi_target *starget) } static int -ahc_linux_slave_alloc(struct scsi_device *sdev) +ahc_linux_device_alloc(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, + .device_alloc = ahc_linux_device_alloc, .slave_configure = ahc_linux_slave_configure, .target_alloc = ahc_linux_target_alloc, .target_destroy = ahc_linux_target_destroy, diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 66fb701401de..b749715cd49c 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -25,7 +25,7 @@ struct scsi_transport_template *bfad_im_scsi_transport_template; struct scsi_transport_template *bfad_im_scsi_vport_transport_template; static void bfad_im_itnim_work_handler(struct work_struct *work); static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd); -static int bfad_im_slave_alloc(struct scsi_device *sdev); +static int bfad_im_device_alloc(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 device_destroy. */ static void -bfad_im_slave_destroy(struct scsi_device *sdev) +bfad_im_device_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, + .device_alloc = bfad_im_device_alloc, .slave_configure = bfad_im_slave_configure, - .slave_destroy = bfad_im_slave_destroy, + .device_destroy = bfad_im_device_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, + .device_alloc = bfad_im_device_alloc, .slave_configure = bfad_im_slave_configure, - .slave_destroy = bfad_im_slave_destroy, + .device_destroy = bfad_im_device_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 device_alloc() 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 device_alloc */ static int -bfad_im_slave_alloc(struct scsi_device *sdev) +bfad_im_device_alloc(struct scsi_device *sdev) { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); struct bfad_itnim_data_s *itnim_data; diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index f49783b89d04..b2d6947cffc4 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -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, + .device_alloc = fc_device_alloc, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, .cmd_per_lun = 3, diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 05e1a63e00c3..68c6c8651b76 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -2224,7 +2224,7 @@ csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd) } static int -csio_slave_alloc(struct scsi_device *sdev) +csio_device_alloc(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_device_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, + .device_alloc = csio_device_alloc, .slave_configure = csio_slave_configure, - .slave_destroy = csio_slave_destroy, + .device_destroy = csio_device_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, + .device_alloc = csio_device_alloc, .slave_configure = csio_slave_configure, - .slave_destroy = csio_slave_destroy, + .device_destroy = csio_device_destroy, .scan_finished = csio_scan_finished, .this_id = -1, .sg_tablesize = CSIO_SCSI_MAX_SGE, diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index d108a86e196e..2d0432028784 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -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_device_alloc - 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_device_alloc(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_device_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_device_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, + .device_alloc = dc395x_device_alloc, + .device_destroy = dc395x_device_destroy, .can_queue = DC395x_MAX_CAN_QUEUE, .this_id = 7, .sg_tablesize = DC395x_MAX_SG_TABLESIZE, diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 0175d2282b45..a754318eca70 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -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_device_alloc(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_device_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, + .device_alloc = esp_device_alloc, .slave_configure = esp_slave_configure, - .slave_destroy = esp_slave_destroy, + .device_destroy = esp_device_destroy, .eh_abort_handler = esp_eh_abort_handler, .eh_bus_reset_handler = esp_eh_bus_reset_handler, .eh_host_reset_handler = esp_eh_host_reset_handler, diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 39aec710660c..7cbd072ad582 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -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, + .device_alloc = fc_device_alloc, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, .cmd_per_lun = 3, diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 0044717d4486..0db2df815048 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -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_device_alloc(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, + .device_alloc = fnic_device_alloc, .change_queue_depth = scsi_change_queue_depth, .this_id = -1, .cmd_per_lun = 3, diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index d223f482488f..378547a3884b 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -645,7 +645,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_device_alloc(struct scsi_device *sdev); extern int hisi_sas_scan_finished(struct Scsi_Host *shost, unsigned long time); extern void hisi_sas_scan_start(struct Scsi_Host *shost); extern int hisi_sas_host_reset(struct Scsi_Host *shost, int reset_type); diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 6219807ce3b9..8b03a806836a 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -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_device_alloc(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_device_alloc(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_device_alloc); static int hisi_sas_dev_found(struct domain_device *device) { diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 71b5008c3552..480fc284942f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1740,7 +1740,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, + .device_alloc = hisi_sas_device_alloc, .shost_groups = host_v1_hw_groups, .host_reset = hisi_sas_host_reset, }; diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 342d75f12051..4651ef440a5d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3572,7 +3572,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, + .device_alloc = hisi_sas_device_alloc, .shost_groups = host_v2_hw_groups, .sdev_groups = sdev_groups_v2_hw, .host_reset = hisi_sas_host_reset, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 4cd3a3eab6f1..046ff15c9202 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -3336,7 +3336,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, + .device_alloc = hisi_sas_device_alloc, .shost_groups = host_v3_hw_groups, .sdev_groups = sdev_groups_v3_hw, .tag_alloc_policy = BLK_TAG_ALLOC_RR, diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index e044ed09d7e0..ba0a85ddb7fe 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -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_device_alloc(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_device_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, + .device_alloc = hpsa_device_alloc, .slave_configure = hpsa_slave_configure, - .slave_destroy = hpsa_slave_destroy, + .device_destroy = hpsa_device_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_device_alloc(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_device_destroy(struct scsi_device *sdev) { struct hpsa_scsi_dev_t *hdev = NULL; diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index e66c3ef74267..689c45e08d28 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -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_device_alloc - 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_device_alloc(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, + .device_alloc = ibmvfc_device_alloc, .slave_configure = ibmvfc_slave_configure, .target_alloc = ibmvfc_target_alloc, .scan_finished = ibmvfc_scan_finished, diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 31cf2d31cceb..30ac01f9dd72 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -4745,13 +4745,13 @@ static struct ipr_resource_entry *ipr_find_sdev(struct scsi_device *sdev) } /** - * ipr_slave_destroy - Unconfigure a SCSI device + * ipr_device_destroy - Unconfigure a SCSI device * @sdev: scsi device struct * * Return value: * nothing **/ -static void ipr_slave_destroy(struct scsi_device *sdev) +static void ipr_device_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_device_alloc - 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_device_alloc(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, + .device_alloc = ipr_device_alloc, .device_configure = ipr_device_configure, - .slave_destroy = ipr_slave_destroy, + .device_destroy = ipr_device_destroy, .scan_finished = ipr_scan_finished, .target_destroy = ipr_target_destroy, .change_queue_depth = ipr_change_queue_depth, diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 80be3a936d92..b4d3ac892f44 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -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_device_alloc() - 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_device_alloc(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_device_alloc); /** * fc_fcp_destroy() - Tear down the FCP layer for a given local port diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index da11d32840e2..83d3e42dc093 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -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_device_alloc(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_device_alloc); void sas_target_destroy(struct scsi_target *starget) { diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 0eaede8275da..f0d6b6bbaae1 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -6226,7 +6226,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) } /** - * lpfc_slave_alloc - scsi_host_template slave_alloc entry point + * lpfc_device_alloc - scsi_host_template device_alloc 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 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) * 0 - Success **/ static int -lpfc_slave_alloc(struct scsi_device *sdev) +lpfc_device_alloc(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_device_destroy - device_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_device_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_device(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, + .device_alloc = lpfc_no_device, + .slave_configure = lpfc_no_device, .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, + .device_alloc = lpfc_device_alloc, .slave_configure = lpfc_slave_configure, - .slave_destroy = lpfc_slave_destroy, + .device_destroy = lpfc_device_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, + .device_alloc = lpfc_device_alloc, .slave_configure = lpfc_slave_configure, - .slave_destroy = lpfc_slave_destroy, + .device_destroy = lpfc_device_destroy, .scan_finished = lpfc_scan_finished, .this_id = -1, .sg_tablesize = LPFC_DEFAULT_SG_SEG_CNT, diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 4ecf5284c0fc..9fba66190093 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -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_device_alloc(struct scsi_device *sdev) { u16 pd_index = 0, ld_tgt_id; struct megasas_instance *instance ; @@ -2154,7 +2154,7 @@ static int megasas_slave_alloc(struct scsi_device *sdev) return 0; } -static void megasas_slave_destroy(struct scsi_device *sdev) +static void megasas_device_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, + .device_alloc = megasas_device_alloc, + .device_destroy = megasas_device_destroy, .queuecommand = megasas_queue_command, .eh_target_reset_handler = megasas_reset_target, .eh_abort_handler = megasas_task_abort, diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 5f2f67acf8bf..4dc9fdce42cc 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -4465,14 +4465,14 @@ static int mpi3mr_scan_finished(struct Scsi_Host *shost, } /** - * mpi3mr_slave_destroy - Slave destroy callback handler + * mpi3mr_device_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_device_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_device_alloc -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_device_alloc(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, + .device_alloc = mpi3mr_device_alloc, .device_configure = mpi3mr_device_configure, .target_destroy = mpi3mr_target_destroy, - .slave_destroy = mpi3mr_slave_destroy, + .device_destroy = mpi3mr_device_destroy, .scan_finished = mpi3mr_scan_finished, .scan_start = mpi3mr_scan_start, .change_queue_depth = mpi3mr_change_queue_depth, diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 728cced42b0e..94b8acfcf933 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -2026,14 +2026,14 @@ scsih_target_destroy(struct scsi_target *starget) } /** - * scsih_slave_alloc - device add routine + * scsih_device_alloc - 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_device_alloc(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_device_destroy - device destroy routine * @sdev: scsi device struct */ static void -scsih_slave_destroy(struct scsi_device *sdev) +scsih_device_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, + .device_alloc = scsih_device_alloc, .device_configure = scsih_device_configure, .target_destroy = scsih_target_destroy, - .slave_destroy = scsih_slave_destroy, + .device_destroy = scsih_device_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, + .device_alloc = scsih_device_alloc, .device_configure = scsih_device_configure, .target_destroy = scsih_target_destroy, - .slave_destroy = scsih_slave_destroy, + .device_destroy = scsih_device_destroy, .scan_finished = scsih_scan_finished, .scan_start = scsih_scan_start, .change_queue_depth = scsih_change_queue_depth, diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index bfc2b835e612..fe39d95d0bdd 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -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_device_alloc(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_device_alloc(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_device_alloc(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_device_alloc(sdev); - return myrb_pdev_slave_alloc(sdev); + return myrb_pdev_device_alloc(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_device_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, + .device_alloc = myrb_device_alloc, .slave_configure = myrb_slave_configure, - .slave_destroy = myrb_slave_destroy, + .device_destroy = myrb_device_destroy, .bios_param = myrb_biosparam, .cmd_size = sizeof(struct myrb_cmdblk), .shost_groups = myrb_shost_groups, diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 3392feb15cb4..56557addbcca 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -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_device_alloc(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_device_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, + .device_alloc = myrs_device_alloc, .slave_configure = myrs_slave_configure, - .slave_destroy = myrs_slave_destroy, + .device_destroy = myrs_device_destroy, .cmd_size = sizeof(struct myrs_cmdblk), .shost_groups = myrs_shost_groups, .sdev_groups = myrs_sdev_groups, diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 35869b4f9329..59821966d54d 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -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_device_alloc(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->device_alloc = ncr53c8xx_device_alloc; tpnt->eh_bus_reset_handler = ncr53c8xx_bus_reset; tpnt->can_queue = SCSI_NCR_CAN_QUEUE; tpnt->this_id = 7; diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 4c5881917d76..250a11a0716a 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -125,7 +125,7 @@ MODULE_DEVICE_TABLE(pci, pmcraid_pci_table); /** - * pmcraid_slave_alloc - Prepare for commands to a device + * pmcraid_device_alloc - 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_device_alloc(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_device_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_device_alloc will be reset to NULL here. * * Return value * none */ -static void pmcraid_slave_destroy(struct scsi_device *scsi_dev) +static void pmcraid_device_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, + .device_alloc = pmcraid_device_alloc, .device_configure = pmcraid_device_configure, - .slave_destroy = pmcraid_slave_destroy, + .device_destroy = pmcraid_device_destroy, .change_queue_depth = pmcraid_change_queue_depth, .can_queue = PMCRAID_MAX_IO_CMD, .this_id = -1, diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 7f980e6141c2..47d7faf9b4d5 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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_device_alloc(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_device_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, + .device_alloc = qla2xxx_device_alloc, + .device_destroy = qla2xxx_device_destroy, .scan_finished = qla2xxx_scan_finished, .scan_start = qla2xxx_scan_start, .change_queue_depth = scsi_change_queue_depth, diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index d91f54a6e752..9cf7362ac1a9 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -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_device_alloc(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, + .device_alloc = qla4xxx_device_alloc, .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_device_alloc(struct scsi_device *sdev) { struct iscsi_cls_session *cls_sess; struct iscsi_session *sess; diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index d95f417e24c0..59782c2d8053 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5881,10 +5881,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_device_alloc(struct scsi_device *sdp) { if (sdebug_verbose) - pr_info("slave_alloc <%u %u %u %llu>\n", + pr_info("device_alloc <%u %u %u %llu>\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); return 0; @@ -5929,14 +5929,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_device_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("device_destroy <%u %u %u %llu>\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); if (!devip) @@ -8714,9 +8714,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, + .device_alloc = scsi_debug_device_alloc, .slave_configure = scsi_debug_slave_configure, - .slave_destroy = scsi_debug_slave_destroy, + .device_destroy = scsi_debug_device_destroy, .ioctl = scsi_debug_ioctl, .queuecommand = scsi_debug_queuecommand, .change_queue_depth = sdebug_change_qdepth, diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index c0b72199b4fa..88b8acfdacd4 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -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 ->device_alloc 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 ->device_alloc 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->device_alloc) { + ret = shost->hostt->device_alloc(sdev); if (ret) { /* * if LLDD reports slave not present, don't clutter diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 32f94db6d6bf..575898ea123c 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -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->device_destroy) + sdev->host->hostt->device_destroy(sdev); transport_destroy_device(dev); /* diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 7fd5a8c813dc..2535138544ed 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6490,7 +6490,7 @@ static int pqi_eh_abort_handler(struct scsi_cmnd *scmd) return SUCCESS; } -static int pqi_slave_alloc(struct scsi_device *sdev) +static int pqi_device_alloc(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_device_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, + .device_alloc = pqi_device_alloc, .slave_configure = pqi_slave_configure, - .slave_destroy = pqi_slave_destroy, + .device_destroy = pqi_device_destroy, .map_queues = pqi_map_queues, .sdev_groups = pqi_sdev_groups, .shost_groups = pqi_shost_groups, diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index 9be3f0193145..a5dd3deaec26 100644 --- a/drivers/scsi/snic/snic_main.c +++ b/drivers/scsi/snic/snic_main.c @@ -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_device_alloc : callback function to SCSI Mid Layer, called on * scsi device initialization. */ static int -snic_slave_alloc(struct scsi_device *sdev) +snic_device_alloc(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, + .device_alloc = snic_device_alloc, .slave_configure = snic_slave_configure, .change_queue_depth = snic_change_queue_depth, .this_id = -1, diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 7ceb982040a5..6487b029ca9f 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -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, + .device_alloc = storvsc_device_alloc, .slave_configure = storvsc_device_configure, .cmd_per_lun = 2048, .this_id = -1, diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index a2560cc807d3..606196ff90f9 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -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_device_alloc(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_device_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 device_alloc 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, + .device_alloc = sym53c8xx_device_alloc, .slave_configure = sym53c8xx_slave_configure, - .slave_destroy = sym53c8xx_slave_destroy, + .device_destroy = sym53c8xx_device_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, diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 8471f38b730e..318d9e55633e 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -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, + .device_alloc = virtscsi_device_alloc, .dma_boundary = UINT_MAX, .map_queues = virtscsi_map_queues, diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 9ec55ddc1204..068267c16cf6 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -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, + .device_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 device_destroy called * on remove of a device. */ snprintf(info->dev_state_path, sizeof(info->dev_state_path), diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index c4f54c311d05..5b481b4d835a 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -57,7 +57,7 @@ static const char *host_info(struct Scsi_Host *host) return "SCSI emulation for PCI-Express Mass Storage devices"; } -static int slave_alloc(struct scsi_device *sdev) +static int device_alloc(struct scsi_device *sdev) { /* * Set the INQUIRY transfer length to 36. We don't use any of @@ -198,7 +198,7 @@ static const struct scsi_host_template rtsx_host_template = { /* unknown initiator id */ .this_id = -1, - .slave_alloc = slave_alloc, + .device_alloc = device_alloc, .slave_configure = slave_configure, /* lots of sg segments can be handled */ diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 24a32e2fd75e..35bce0d7d7a7 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5182,12 +5182,12 @@ static void ufshcd_lu_init(struct ufs_hba *hba, struct scsi_device *sdev) } /** - * ufshcd_slave_alloc - handle initial SCSI device configurations + * ufshcd_device_alloc - handle initial SCSI device configurations * @sdev: pointer to SCSI device * * Return: success. */ -static int ufshcd_slave_alloc(struct scsi_device *sdev) +static int ufshcd_device_alloc(struct scsi_device *sdev) { struct ufs_hba *hba; @@ -5265,10 +5265,10 @@ static int ufshcd_device_configure(struct scsi_device *sdev, } /** - * ufshcd_slave_destroy - remove SCSI device configurations + * ufshcd_device_destroy - remove SCSI device configurations * @sdev: pointer to SCSI device */ -static void ufshcd_slave_destroy(struct scsi_device *sdev) +static void ufshcd_device_destroy(struct scsi_device *sdev) { struct ufs_hba *hba; unsigned long flags; @@ -8973,9 +8973,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, + .device_alloc = ufshcd_device_alloc, .device_configure = ufshcd_device_configure, - .slave_destroy = ufshcd_slave_destroy, + .device_destroy = ufshcd_device_destroy, .change_queue_depth = ufshcd_change_queue_depth, .eh_abort_handler = ufshcd_abort, .eh_device_reset_handler = ufshcd_eh_device_reset_handler, diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index 9f758241d9d3..9acf80304be8 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -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_device_alloc (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, + .device_alloc = mts_device_alloc, .max_sectors= 256, /* 128 K */ }; diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 8c8b5e6041cc..7d5b1b7539ac 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -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 device_alloc (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 device_alloc() 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, + .device_alloc = device_alloc, .device_configure = device_configure, .target_alloc = target_alloc, diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 03043d567fa1..1192df9c4317 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -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_device_alloc(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, + .device_alloc = uas_device_alloc, .device_configure = uas_device_configure, .eh_abort_handler = uas_eh_abort_handler, .eh_device_reset_handler = uas_eh_device_reset_handler, diff --git a/include/linux/libata.h b/include/linux/libata.h index 9b4a6ff03235..e04184b6d79b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1201,10 +1201,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_device_alloc(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_device_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, @@ -1460,8 +1460,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, \ + .device_alloc = ata_scsi_device_alloc, \ + .device_destroy = ata_scsi_device_destroy, \ .bios_param = ata_std_bios_param, \ .unlock_native_capacity = ata_scsi_unlock_native_capacity,\ .max_sectors = ATA_MAX_SECTORS_LBA48 diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 4a9b4169e081..5049391c4c9a 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -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_device_alloc(struct scsi_device *); /* * ELS/CT interface diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 1324068dd950..b29eb58f4ef3 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -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_device_alloc(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, \ + .device_alloc = sas_device_alloc, \ #define LIBSAS_SHT_BASE_NO_SLAVE_INIT _LIBSAS_SHT_BASE diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9c540f5468eb..6c2e09164ad0 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -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 device_alloc 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 device_alloc host template callout. * If set to zero then there is not limit. */ unsigned int can_queue; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 2b4ab0369ffb..934aae4254c3 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -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 device_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 device_destroy(). This is + * assuming you implement slave_configure and device_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 device_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 (* device_alloc)(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 device_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 device_alloc or slave_configure calls. * * Status: OPTIONAL */ - void (* slave_destroy)(struct scsi_device *); + void (* device_destroy)(struct scsi_device *); /* * Before the mid layer attempts to scan for a new device attached From patchwork Mon Sep 30 20:18:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 832673 Received: from 008.lax.mailroute.net (008.lax.mailroute.net [199.89.1.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6436D1A0BCF for ; Mon, 30 Sep 2024 20:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727978; cv=none; b=bmHLKoCtrdOFNZZq+0GAy/pT5V8j2aNgcPGDxXGgJwqpdJX+T4LnL5Y1Oz07CysboLnk+CpSnuaGTxxAusIYpkQ8NGf15MRkXSYbpyPWRMZmCHGz6T06RTZSlfo+FdZU99dk+Nm3yHGFAkDl7dv5joL6vKFEdViHM157D9PeOyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727978; c=relaxed/simple; bh=LOPEwz/PXLQo9eEH2EYLt3DzVrUqyuL06rBZh/PQv/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=poVyH06w2S9mni2WgLgTUhV8xoA/IDEHYj85s/PbK5XptXWRZhF8fOlnYdpNv12CsyVc9UItQHusktGodnAQBZtPyR15usYFwXw2jnVfR6H0v7DY1k3/UuGqJZH2ozLgAbjuuH2Xxs5LksxLUcznzvE46q5EOwRbiyd0gK/XSdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=ZuwKbJqt; arc=none smtp.client-ip=199.89.1.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="ZuwKbJqt" Received: from localhost (localhost [127.0.0.1]) by 008.lax.mailroute.net (Postfix) with ESMTP id 4XHXdy712kz6ClY9b; Mon, 30 Sep 2024 20:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727727714; x=1730319715; bh=cSKT8 1SG7oWWazsMtzU4ZzQs8CIDx3xttTwzjeIn+60=; b=ZuwKbJqtfR/yrW9Ma5IG3 fXo4RRNnsMpBU99NYCW2wRf/myYVhuQvqKOvzOJEk9rm362mcs+LCbsNWFb3iu2D CntNWRXyrh9KxunHrf5mutyQTG0hGp2lCbBzaf71KkudZnRSEAYwVKDpOhD0CfFY JX0vzhpPn2RKTKxlwJ7MEa3u0FP8ck0VH8CPrOrAqFD2cPijvvi+E3EtIJad4Dxq wUFuOAPp0Gxbd3x7kFNaAGPRIvXbiTp5oI0L6iBw4C5wrtlwj5/BOuurtlX26XhM iU7fyfbdv7Y2HVRjELqL3fR6w4bbxlKq7a7y5E69AQvbhG4TE0sJry44NXc2+SJe w== X-Virus-Scanned: by MailRoute Received: from 008.lax.mailroute.net ([127.0.0.1]) by localhost (008.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id C6F8V_L4xy5R; Mon, 30 Sep 2024 20:21:54 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 008.lax.mailroute.net (Postfix) with ESMTPSA id 4XHXWZ3lBlz6ClY9Y; Mon, 30 Sep 2024 20:20:42 +0000 (UTC) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Damien Le Moal , Jason Gunthorpe , Leon Romanovsky , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Steffen Maier , Benjamin Block , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Adam Radford , "James E.J. Bottomley" , Khalid Aziz , Adaptec OEM Raid Solutions , Matthew Wilcox , Hannes Reinecke , Anil Gurumurthy , Sudarsana Kalluru , Saurav Kashyap , Javed Hasan , GR-QLogic-Storage-Upstream@marvell.com, Don Brace , Tyrel Datwyler , Michael Ellerman , James Smart , Dick Kennedy , Geoff Levand , Nilesh Javali , Karan Tilak Kumar , Sesidhar Baddela , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Juergen Gross , Stefano Stabellini , Greg Kroah-Hartman , ching Huang , Bjorn Helgaas , Johannes Thumshirn , Soumya Negi Subject: [PATCH 2/4] scsi: Convert SCSI drivers to .device_configure() Date: Mon, 30 Sep 2024 13:18:48 -0700 Message-ID: <20240930201937.2020129-3-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930201937.2020129-1-bvanassche@acm.org> References: <20240930201937.2020129-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is agreement that the word "slave" should not be used in Linux kernel source code. Hence this patch that converts all SCSI drivers from .slave_configure() to .device_configure(). No functionality has been changed. Cc: Damien Le Moal Signed-off-by: Bart Van Assche --- drivers/infiniband/ulp/srp/ib_srp.c | 5 +++-- drivers/message/fusion/mptfc.c | 2 +- drivers/message/fusion/mptsas.c | 6 +++--- drivers/message/fusion/mptscsih.c | 4 ++-- drivers/message/fusion/mptscsih.h | 3 ++- drivers/message/fusion/mptspi.c | 7 ++++--- drivers/net/ethernet/allwinner/sun4i-emac.c | 4 ++-- drivers/s390/scsi/zfcp_scsi.c | 5 +++-- drivers/scsi/3w-9xxx.c | 7 ++++--- drivers/scsi/3w-sas.c | 7 ++++--- drivers/scsi/3w-xxxx.c | 9 ++++---- drivers/scsi/53c700.c | 7 ++++--- drivers/scsi/BusLogic.c | 7 ++++--- drivers/scsi/BusLogic.h | 3 ++- drivers/scsi/aacraid/linit.c | 8 ++++--- drivers/scsi/advansys.c | 23 +++++++++++---------- drivers/scsi/aic7xxx/aic79xx_osm.c | 4 ++-- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ++-- drivers/scsi/arcmsr/arcmsr_hba.c | 8 ++++--- drivers/scsi/bfa/bfad_im.c | 6 +++--- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 +++-- drivers/scsi/csiostor/csio_scsi.c | 6 +++--- drivers/scsi/esp_scsi.c | 7 ++++--- drivers/scsi/hpsa.c | 8 ++++--- drivers/scsi/ibmvscsi/ibmvfc.c | 7 ++++--- drivers/scsi/ibmvscsi/ibmvscsi.c | 8 ++++--- drivers/scsi/ips.c | 6 +++--- drivers/scsi/ips.h | 3 ++- drivers/scsi/lpfc/lpfc_scsi.c | 21 ++++++++++++------- drivers/scsi/mvumi.c | 5 +++-- drivers/scsi/myrb.c | 5 +++-- drivers/scsi/myrs.c | 5 +++-- drivers/scsi/ncr53c8xx.c | 5 +++-- drivers/scsi/ps3rom.c | 5 +++-- drivers/scsi/qedf/qedf_main.c | 5 +++-- drivers/scsi/qla1280.c | 6 +++--- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- drivers/scsi/qlogicpti.c | 5 +++-- drivers/scsi/scsi_debug.c | 7 ++++--- drivers/scsi/scsi_scan.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 5 +++-- drivers/scsi/snic/snic_main.c | 6 +++--- drivers/scsi/stex.c | 4 ++-- drivers/scsi/storvsc_drv.c | 5 +++-- drivers/scsi/sym53c8xx_2/sym_glue.c | 5 +++-- drivers/scsi/xen-scsifront.c | 7 ++++--- drivers/staging/rts5208/rtsx.c | 4 ++-- 47 files changed, 166 insertions(+), 124 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 2916e77f589b..853130f9052f 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2844,7 +2844,8 @@ static int srp_target_alloc(struct scsi_target *starget) return 0; } -static int srp_slave_configure(struct scsi_device *sdev) +static int srp_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct Scsi_Host *shost = sdev->host; struct srp_target_port *target = host_to_target(shost); @@ -3067,7 +3068,7 @@ static const struct scsi_host_template srp_template = { .name = "InfiniBand SRP initiator", .proc_name = DRV_NAME, .target_alloc = srp_target_alloc, - .slave_configure = srp_slave_configure, + .device_configure = srp_device_configure, .info = srp_target_info, .init_cmd_priv = srp_init_cmd_priv, .exit_cmd_priv = srp_exit_cmd_priv, diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 1b43fba24af1..b53a2ad26459 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -114,7 +114,7 @@ static const struct scsi_host_template mptfc_driver_template = { .queuecommand = mptfc_qcmd, .target_alloc = mptfc_target_alloc, .device_alloc = mptfc_device_alloc, - .slave_configure = mptscsih_slave_configure, + .device_configure = mptscsih_device_configure, .target_destroy = mptfc_target_destroy, .device_destroy = mptscsih_device_destroy, .change_queue_depth = mptscsih_change_queue_depth, diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 848c45d141e3..22d2debe617b 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -1710,7 +1710,7 @@ mptsas_firmware_event_work(struct work_struct *work) static int -mptsas_slave_configure(struct scsi_device *sdev) +mptsas_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { struct Scsi_Host *host = sdev->host; MPT_SCSI_HOST *hd = shost_priv(host); @@ -1736,7 +1736,7 @@ mptsas_slave_configure(struct scsi_device *sdev) mptsas_add_device_component_starget(ioc, scsi_target(sdev)); out: - return mptscsih_slave_configure(sdev); + return mptscsih_device_configure(sdev, lim); } static int @@ -2006,7 +2006,7 @@ static const struct scsi_host_template mptsas_driver_template = { .queuecommand = mptsas_qcmd, .target_alloc = mptsas_target_alloc, .device_alloc = mptsas_device_alloc, - .slave_configure = mptsas_slave_configure, + .device_configure = mptsas_device_configure, .target_destroy = mptsas_target_destroy, .device_destroy = mptscsih_device_destroy, .change_queue_depth = mptscsih_change_queue_depth, diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 18664bbe8db5..cd7fd178413a 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -2399,7 +2399,7 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) * Return non-zero if fails. */ int -mptscsih_slave_configure(struct scsi_device *sdev) +mptscsih_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { struct Scsi_Host *sh = sdev->host; VirtTarget *vtarget; @@ -3303,7 +3303,7 @@ EXPORT_SYMBOL(mptscsih_show_info); EXPORT_SYMBOL(mptscsih_info); EXPORT_SYMBOL(mptscsih_qcmd); EXPORT_SYMBOL(mptscsih_device_destroy); -EXPORT_SYMBOL(mptscsih_slave_configure); +EXPORT_SYMBOL(mptscsih_device_configure); EXPORT_SYMBOL(mptscsih_abort); EXPORT_SYMBOL(mptscsih_dev_reset); EXPORT_SYMBOL(mptscsih_target_reset); diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index e3b7368264d7..e4e014d17424 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h @@ -117,7 +117,8 @@ 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_device_destroy(struct scsi_device *device); -extern int mptscsih_slave_configure(struct scsi_device *device); +extern int mptscsih_device_configure(struct scsi_device *device, + struct queue_limits *lim); extern int mptscsih_abort(struct scsi_cmnd * SCpnt); extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt); extern int mptscsih_target_reset(struct scsi_cmnd * SCpnt); diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 744487585a78..0bf33b5f7100 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -746,7 +746,8 @@ static int mptspi_device_alloc(struct scsi_device *sdev) return 0; } -static int mptspi_slave_configure(struct scsi_device *sdev) +static int mptspi_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host); VirtTarget *vtarget = scsi_target(sdev)->hostdata; @@ -754,7 +755,7 @@ static int mptspi_slave_configure(struct scsi_device *sdev) mptspi_initTarget(hd, vtarget, sdev); - ret = mptscsih_slave_configure(sdev); + ret = mptscsih_device_configure(sdev, lim); if (ret) return ret; @@ -829,7 +830,7 @@ static const struct scsi_host_template mptspi_driver_template = { .queuecommand = mptspi_qcmd, .target_alloc = mptspi_target_alloc, .device_alloc = mptspi_device_alloc, - .slave_configure = mptspi_slave_configure, + .device_configure = mptspi_device_configure, .target_destroy = mptspi_target_destroy, .device_destroy = mptspi_device_destroy, .change_queue_depth = mptscsih_change_queue_depth, diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c index d761c08fe5c1..511264cbf060 100644 --- a/drivers/net/ethernet/allwinner/sun4i-emac.c +++ b/drivers/net/ethernet/allwinner/sun4i-emac.c @@ -947,12 +947,12 @@ static int emac_configure_dma(struct emac_board_info *db) if (err) { netdev_err(ndev, "config dma slave failed\n"); err = -EINVAL; - goto out_slave_configure_err; + goto out_device_configure_err; } return err; -out_slave_configure_err: +out_device_configure_err: dma_release_channel(db->rx_chan); out_clear_chan: diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 355b99fa8c0f..58ccf8b967b9 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -49,7 +49,8 @@ static void zfcp_scsi_device_destroy(struct scsi_device *sdev) put_device(&zfcp_sdev->port->dev); } -static int zfcp_scsi_slave_configure(struct scsi_device *sdp) +static int zfcp_scsi_device_configure(struct scsi_device *sdp, + struct queue_limits *lim) { if (sdp->tagged_supported) scsi_change_queue_depth(sdp, default_depth); @@ -428,7 +429,7 @@ static const struct scsi_host_template zfcp_scsi_host_template = { .eh_target_reset_handler = zfcp_scsi_eh_target_reset_handler, .eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler, .device_alloc = zfcp_scsi_device_alloc, - .slave_configure = zfcp_scsi_slave_configure, + .device_configure = zfcp_scsi_device_configure, .device_destroy = zfcp_scsi_device_destroy, .change_queue_depth = scsi_change_queue_depth, .host_reset = zfcp_scsi_sysfs_host_reset, diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 6fb61c88ea11..3455c7bedacf 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -1968,13 +1968,14 @@ static char *twa_string_lookup(twa_message_type *table, unsigned int code) } /* End twa_string_lookup() */ /* This function gets called when a disk is coming on-line */ -static int twa_slave_configure(struct scsi_device *sdev) +static int twa_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { /* Force 60 second timeout */ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); return 0; -} /* End twa_slave_configure() */ +} /* End twa_device_configure() */ static const struct scsi_host_template driver_template = { .module = THIS_MODULE, @@ -1984,7 +1985,7 @@ static const struct scsi_host_template driver_template = { .bios_param = twa_scsi_biosparam, .change_queue_depth = scsi_change_queue_depth, .can_queue = TW_Q_LENGTH-2, - .slave_configure = twa_slave_configure, + .device_configure = twa_device_configure, .this_id = -1, .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index caa6713a62a4..1731e3bd527d 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c @@ -1523,13 +1523,14 @@ static void twl_shutdown(struct pci_dev *pdev) } /* End twl_shutdown() */ /* This function configures unit settings when a unit is coming on-line */ -static int twl_slave_configure(struct scsi_device *sdev) +static int twl_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { /* Force 60 second timeout */ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); return 0; -} /* End twl_slave_configure() */ +} /* End twl_device_configure() */ static const struct scsi_host_template driver_template = { .module = THIS_MODULE, @@ -1539,7 +1540,7 @@ static const struct scsi_host_template driver_template = { .bios_param = twl_scsi_biosparam, .change_queue_depth = scsi_change_queue_depth, .can_queue = TW_Q_LENGTH-2, - .slave_configure = twl_slave_configure, + .device_configure = twl_device_configure, .this_id = -1, .sg_tablesize = TW_LIBERATOR_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 2c0fb6da0e60..b92d826bd158 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -172,7 +172,7 @@ Initialize queues correctly when loading with no valid units. 1.02.00.034 - Fix tw_decode_bits() to handle multiple errors. Add support for user configurable cmd_per_lun. - Add support for sht->slave_configure(). + Add support for sht->device_configure(). 1.02.00.035 - Improve tw_allocate_memory() memory allocation. Fix tw_chrdev_ioctl() to sleep correctly. 1.02.00.036 - Increase character ioctl timeout to 60 seconds. @@ -2221,13 +2221,14 @@ static void tw_shutdown(struct pci_dev *pdev) } /* End tw_shutdown() */ /* This function gets called when a disk is coming online */ -static int tw_slave_configure(struct scsi_device *sdev) +static int tw_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { /* Force 60 second timeout */ blk_queue_rq_timeout(sdev->request_queue, 60 * HZ); return 0; -} /* End tw_slave_configure() */ +} /* End tw_device_configure() */ static const struct scsi_host_template driver_template = { .module = THIS_MODULE, @@ -2237,7 +2238,7 @@ static const struct scsi_host_template driver_template = { .bios_param = tw_scsi_biosparam, .change_queue_depth = scsi_change_queue_depth, .can_queue = TW_Q_LENGTH-2, - .slave_configure = tw_slave_configure, + .device_configure = tw_device_configure, .this_id = -1, .sg_tablesize = TW_MAX_SGL_LENGTH, .max_sectors = TW_MAX_SECTORS, diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 5498417604fc..b2352a4a9266 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -159,7 +159,8 @@ 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_device_alloc(struct scsi_device *SDpnt); -STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); +STATIC int NCR_700_device_configure(struct scsi_device *SDpnt, + struct queue_limits *lim); STATIC void NCR_700_device_destroy(struct scsi_device *SDpnt); static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); @@ -330,7 +331,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST; tpnt->sg_tablesize = NCR_700_SG_SEGMENTS; tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN; - tpnt->slave_configure = NCR_700_slave_configure; + tpnt->device_configure = NCR_700_device_configure; tpnt->device_destroy = NCR_700_device_destroy; tpnt->device_alloc = NCR_700_device_alloc; tpnt->change_queue_depth = NCR_700_change_queue_depth; @@ -2029,7 +2030,7 @@ NCR_700_device_alloc(struct scsi_device *SDp) } STATIC int -NCR_700_slave_configure(struct scsi_device *SDp) +NCR_700_device_configure(struct scsi_device *SDp, struct queue_limits *lim) { struct NCR_700_Host_Parameters *hostdata = (struct NCR_700_Host_Parameters *)SDp->host->hostdata[0]; diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 2135a2b3e2d0..88839c81db97 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -2153,14 +2153,15 @@ static void __init blogic_inithoststruct(struct blogic_adapter *adapter, } /* - blogic_slaveconfig will actually set the queue depth on individual + blogic_device_configure will actually set the queue depth on individual scsi devices as they are permanently added to the device chain. We shamelessly rip off the SelectQueueDepths code to make this work mostly like it used to. Since we don't get called once at the end of the scan but instead get called for each device, we have to do things a bit differently. */ -static int blogic_slaveconfig(struct scsi_device *dev) +static int blogic_device_configure(struct scsi_device *dev, + struct queue_limits *lim) { struct blogic_adapter *adapter = (struct blogic_adapter *) dev->host->hostdata; @@ -3672,7 +3673,7 @@ static const struct scsi_host_template blogic_template = { .name = "BusLogic", .info = blogic_drvr_info, .queuecommand = blogic_qcmd, - .slave_configure = blogic_slaveconfig, + .device_configure = blogic_device_configure, .bios_param = blogic_diskparam, .eh_host_reset_handler = blogic_hostreset, #if 0 diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h index 7d1ec10f2430..1eb61e886ee3 100644 --- a/drivers/scsi/BusLogic.h +++ b/drivers/scsi/BusLogic.h @@ -1274,7 +1274,8 @@ static inline void blogic_incszbucket(unsigned int *cmdsz_buckets, static const char *blogic_drvr_info(struct Scsi_Host *); static int blogic_qcmd(struct Scsi_Host *h, struct scsi_cmnd *); static int blogic_diskparam(struct scsi_device *, struct block_device *, sector_t, int *); -static int blogic_slaveconfig(struct scsi_device *); +static int blogic_device_configure(struct scsi_device *, + struct queue_limits *lim); static void blogic_qcompleted_ccb(struct blogic_ccb *); static irqreturn_t blogic_inthandler(int, void *); static int blogic_resetadapter(struct blogic_adapter *, bool hard_reset); diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 68f4dbcfff49..5de6b553400e 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -377,15 +377,17 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, } /** - * aac_slave_configure - compute queue depths + * aac_device_configure - compute queue depths * @sdev: SCSI device we are considering + * @lim: Request queue limits * * Selects queue depths for each target device based on the host adapter's * total capacity and the queue depth supported by the target device. * A queue depth of one automatically disables tagged queueing. */ -static int aac_slave_configure(struct scsi_device *sdev) +static int aac_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; int chn, tid; @@ -1487,7 +1489,7 @@ static const struct scsi_host_template aac_driver_template = { .queuecommand = aac_queuecommand, .bios_param = aac_biosparm, .shost_groups = aac_host_groups, - .slave_configure = aac_slave_configure, + .device_configure = aac_device_configure, .change_queue_depth = aac_change_queue_depth, .sdev_groups = aac_dev_groups, .eh_abort_handler = aac_eh_abort, diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index fd4fcb37863d..9f4f4719021a 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -4496,7 +4496,7 @@ static int AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc) /* * Microcode operating variables for WDTR, SDTR, and command tag - * queuing will be set in slave_configure() based on what a + * queuing will be set in device_configure() based on what a * device reports it is capable of in Inquiry byte 7. * * If SCSI Bus Resets have been disabled, then directly set @@ -5013,7 +5013,7 @@ static int AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc) /* * Microcode operating variables for WDTR, SDTR, and command tag - * queuing will be set in slave_configure() based on what a + * queuing will be set in device_configure() based on what a * device reports it is capable of in Inquiry byte 7. * * If SCSI Bus Resets have been disabled, then directly set @@ -5508,7 +5508,7 @@ static int AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc) /* * Microcode operating variables for WDTR, SDTR, and command tag - * queuing will be set in slave_configure() based on what a + * queuing will be set in device_configure() based on what a * device reports it is capable of in Inquiry byte 7. * * If SCSI Bus Resets have been disabled, then directly set @@ -7219,7 +7219,7 @@ static void AscAsyncFix(ASC_DVC_VAR *asc_dvc, struct scsi_device *sdev) } static void -advansys_narrow_slave_configure(struct scsi_device *sdev, ASC_DVC_VAR *asc_dvc) +advansys_narrow_device_configure(struct scsi_device *sdev, ASC_DVC_VAR *asc_dvc) { ASC_SCSI_BIT_ID_TYPE tid_bit = 1 << sdev->id; ASC_SCSI_BIT_ID_TYPE orig_use_tagged_qng = asc_dvc->use_tagged_qng; @@ -7345,7 +7345,7 @@ static void advansys_wide_enable_ppr(ADV_DVC_VAR *adv_dvc, } static void -advansys_wide_slave_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc) +advansys_wide_device_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc) { AdvPortAddr iop_base = adv_dvc->iop_base; unsigned short tidmask = 1 << sdev->id; @@ -7391,16 +7391,17 @@ advansys_wide_slave_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc) * Set the number of commands to queue per device for the * specified host adapter. */ -static int advansys_slave_configure(struct scsi_device *sdev) +static int advansys_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct asc_board *boardp = shost_priv(sdev->host); if (ASC_NARROW_BOARD(boardp)) - advansys_narrow_slave_configure(sdev, - &boardp->dvc_var.asc_dvc_var); + advansys_narrow_device_configure(sdev, + &boardp->dvc_var.asc_dvc_var); else - advansys_wide_slave_configure(sdev, - &boardp->dvc_var.adv_dvc_var); + advansys_wide_device_configure(sdev, + &boardp->dvc_var.adv_dvc_var); return 0; } @@ -10612,7 +10613,7 @@ static const struct scsi_host_template advansys_template = { .queuecommand = advansys_queuecommand, .eh_host_reset_handler = advansys_reset, .bios_param = advansys_biosparam, - .slave_configure = advansys_slave_configure, + .device_configure = advansys_device_configure, .cmd_size = sizeof(struct advansys_cmd), }; diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 1bf60a8d01cf..997796bbe350 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -701,7 +701,7 @@ ahd_linux_device_alloc(struct scsi_device *sdev) } static int -ahd_linux_slave_configure(struct scsi_device *sdev) +ahd_linux_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { if (bootverbose) sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); @@ -907,7 +907,7 @@ struct scsi_host_template aic79xx_driver_template = { .max_sectors = 8192, .cmd_per_lun = 2, .device_alloc = ahd_linux_device_alloc, - .slave_configure = ahd_linux_slave_configure, + .device_configure = ahd_linux_device_configure, .target_alloc = ahd_linux_target_alloc, .target_destroy = ahd_linux_target_destroy, }; diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 5724e8940ea8..15ab6c2131fc 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -664,7 +664,7 @@ ahc_linux_device_alloc(struct scsi_device *sdev) } static int -ahc_linux_slave_configure(struct scsi_device *sdev) +ahc_linux_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { if (bootverbose) sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); @@ -792,7 +792,7 @@ struct scsi_host_template aic7xxx_driver_template = { .max_sectors = 8192, .cmd_per_lun = 2, .device_alloc = ahc_linux_device_alloc, - .slave_configure = ahc_linux_slave_configure, + .device_configure = ahc_linux_device_configure, .target_alloc = ahc_linux_target_alloc, .target_destroy = ahc_linux_target_destroy, }; diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 35860c61468b..b48464dfa278 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -143,7 +143,8 @@ static irqreturn_t arcmsr_interrupt(struct AdapterControlBlock *acb); static void arcmsr_free_irq(struct pci_dev *, struct AdapterControlBlock *); static void arcmsr_wait_firmware_ready(struct AdapterControlBlock *acb); static void arcmsr_set_iop_datetime(struct timer_list *); -static int arcmsr_slave_config(struct scsi_device *sdev); +static int arcmsr_device_configure(struct scsi_device *sdev, + struct queue_limits *lim); static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, int queue_depth) { if (queue_depth > ARCMSR_MAX_CMD_PERLUN) @@ -160,7 +161,7 @@ static const struct scsi_host_template arcmsr_scsi_host_template = { .eh_abort_handler = arcmsr_abort, .eh_bus_reset_handler = arcmsr_bus_reset, .bios_param = arcmsr_bios_param, - .slave_configure = arcmsr_slave_config, + .device_configure = arcmsr_device_configure, .change_queue_depth = arcmsr_adjust_disk_queue_depth, .can_queue = ARCMSR_DEFAULT_OUTSTANDING_CMD, .this_id = ARCMSR_SCSI_INITIATOR_ID, @@ -3344,7 +3345,8 @@ static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd) static DEF_SCSI_QCMD(arcmsr_queue_command) -static int arcmsr_slave_config(struct scsi_device *sdev) +static int arcmsr_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { unsigned int dev_timeout; diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index b749715cd49c..493005c791cf 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -783,7 +783,7 @@ bfad_thread_workq(struct bfad_s *bfad) * Return non-zero if fails. */ static int -bfad_im_slave_configure(struct scsi_device *sdev) +bfad_im_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { scsi_change_queue_depth(sdev, bfa_lun_queue_depth); return 0; @@ -801,7 +801,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { .eh_target_reset_handler = bfad_im_reset_target_handler, .device_alloc = bfad_im_device_alloc, - .slave_configure = bfad_im_slave_configure, + .device_configure = bfad_im_device_configure, .device_destroy = bfad_im_device_destroy, .this_id = -1, @@ -824,7 +824,7 @@ struct scsi_host_template bfad_im_vport_template = { .eh_target_reset_handler = bfad_im_reset_target_handler, .device_alloc = bfad_im_device_alloc, - .slave_configure = bfad_im_slave_configure, + .device_configure = bfad_im_device_configure, .device_destroy = bfad_im_device_destroy, .this_id = -1, diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index b2d6947cffc4..1ee5d4346eca 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2652,7 +2652,8 @@ static int bnx2fc_cpu_offline(unsigned int cpu) return 0; } -static int bnx2fc_slave_configure(struct scsi_device *sdev) +static int bnx2fc_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { if (!bnx2fc_queue_depth) return 0; @@ -2959,7 +2960,7 @@ static struct scsi_host_template bnx2fc_shost_template = { .dma_boundary = 0x7fff, .max_sectors = 0x3fbf, .track_queue_depth = 1, - .slave_configure = bnx2fc_slave_configure, + .device_configure = bnx2fc_device_configure, .shost_groups = bnx2fc_host_groups, .cmd_size = sizeof(struct bnx2fc_priv), }; diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 68c6c8651b76..9ddba85acdb5 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -2237,7 +2237,7 @@ csio_device_alloc(struct scsi_device *sdev) } static int -csio_slave_configure(struct scsi_device *sdev) +csio_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { scsi_change_queue_depth(sdev, csio_lun_qdepth); return 0; @@ -2277,7 +2277,7 @@ struct scsi_host_template csio_fcoe_shost_template = { .eh_abort_handler = csio_eh_abort_handler, .eh_device_reset_handler = csio_eh_lun_reset_handler, .device_alloc = csio_device_alloc, - .slave_configure = csio_slave_configure, + .device_configure = csio_device_configure, .device_destroy = csio_device_destroy, .scan_finished = csio_scan_finished, .this_id = -1, @@ -2296,7 +2296,7 @@ struct scsi_host_template csio_fcoe_shost_vport_template = { .eh_abort_handler = csio_eh_abort_handler, .eh_device_reset_handler = csio_eh_lun_reset_handler, .device_alloc = csio_device_alloc, - .slave_configure = csio_slave_configure, + .device_configure = csio_device_configure, .device_destroy = csio_device_destroy, .scan_finished = csio_scan_finished, .this_id = -1, diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index a754318eca70..889e8e6cab2c 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -2261,7 +2261,7 @@ static void esp_init_swstate(struct esp *esp) INIT_LIST_HEAD(&esp->active_cmds); INIT_LIST_HEAD(&esp->esp_cmd_pool); - /* Start with a clear state, domain validation (via ->slave_configure, + /* Start with a clear state, domain validation (via ->device_configure, * spi_dv_device()) will attempt to enable SYNC, WIDE, and tagged * commands. */ @@ -2463,7 +2463,8 @@ static int esp_device_alloc(struct scsi_device *dev) return 0; } -static int esp_slave_configure(struct scsi_device *dev) +static int esp_device_configure(struct scsi_device *dev, + struct queue_limits *lim) { struct esp *esp = shost_priv(dev->host); struct esp_target_data *tp = &esp->target[dev->id]; @@ -2668,7 +2669,7 @@ const struct scsi_host_template scsi_esp_template = { .target_alloc = esp_target_alloc, .target_destroy = esp_target_destroy, .device_alloc = esp_device_alloc, - .slave_configure = esp_slave_configure, + .device_configure = esp_device_configure, .device_destroy = esp_device_destroy, .eh_abort_handler = esp_eh_abort_handler, .eh_bus_reset_handler = esp_eh_bus_reset_handler, diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index ba0a85ddb7fe..16e0f8fae04b 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -284,7 +284,8 @@ 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_device_alloc(struct scsi_device *sdev); -static int hpsa_slave_configure(struct scsi_device *sdev); +static int hpsa_device_configure(struct scsi_device *sdev, + struct queue_limits *lim); static void hpsa_device_destroy(struct scsi_device *sdev); static void hpsa_update_scsi_devices(struct ctlr_info *h); @@ -979,7 +980,7 @@ static const struct scsi_host_template hpsa_driver_template = { .eh_device_reset_handler = hpsa_eh_device_reset_handler, .ioctl = hpsa_ioctl, .device_alloc = hpsa_device_alloc, - .slave_configure = hpsa_slave_configure, + .device_configure = hpsa_device_configure, .device_destroy = hpsa_device_destroy, #ifdef CONFIG_COMPAT .compat_ioctl = hpsa_compat_ioctl, @@ -2142,7 +2143,8 @@ static int hpsa_device_alloc(struct scsi_device *sdev) /* configure scsi device based on internal per-device structure */ #define CTLR_TIMEOUT (120 * HZ) -static int hpsa_slave_configure(struct scsi_device *sdev) +static int hpsa_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct hpsa_scsi_dev_t *sd; int queue_depth; diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 689c45e08d28..7308e2cb347f 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -3441,7 +3441,7 @@ static int ibmvfc_target_alloc(struct scsi_target *starget) } /** - * ibmvfc_slave_configure - Configure the device + * ibmvfc_device_configure - Configure the device * @sdev: struct scsi_device device to configure * * Enable allow_restart for a device if it is a disk. Adjust the @@ -3450,7 +3450,8 @@ static int ibmvfc_target_alloc(struct scsi_target *starget) * Returns: * 0 **/ -static int ibmvfc_slave_configure(struct scsi_device *sdev) +static int ibmvfc_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct Scsi_Host *shost = sdev->host; unsigned long flags = 0; @@ -3697,7 +3698,7 @@ static const struct scsi_host_template driver_template = { .eh_target_reset_handler = ibmvfc_eh_target_reset_handler, .eh_host_reset_handler = ibmvfc_eh_host_reset_handler, .device_alloc = ibmvfc_device_alloc, - .slave_configure = ibmvfc_slave_configure, + .device_configure = ibmvfc_device_configure, .target_alloc = ibmvfc_target_alloc, .scan_finished = ibmvfc_scan_finished, .change_queue_depth = ibmvfc_change_queue_depth, diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 71f3e9563520..64f368a59c55 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -1860,14 +1860,16 @@ static void ibmvscsi_handle_crq(struct viosrp_crq *crq, } /** - * ibmvscsi_slave_configure: Set the "allow_restart" flag for each disk. + * ibmvscsi_device_configure: Set the "allow_restart" flag for each disk. * @sdev: struct scsi_device device to configure + * @lim: Request queue limits * * Enable allow_restart for a device if it is a disk. Adjust the * queue_depth here also as is required by the documentation for * struct scsi_host_template. */ -static int ibmvscsi_slave_configure(struct scsi_device *sdev) +static int ibmvscsi_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct Scsi_Host *shost = sdev->host; unsigned long lock_flags = 0; @@ -2091,7 +2093,7 @@ static struct scsi_host_template driver_template = { .eh_abort_handler = ibmvscsi_eh_abort_handler, .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler, .eh_host_reset_handler = ibmvscsi_eh_host_reset_handler, - .slave_configure = ibmvscsi_slave_configure, + .device_configure = ibmvscsi_device_configure, .change_queue_depth = ibmvscsi_change_queue_depth, .host_reset = ibmvscsi_host_reset, .cmd_per_lun = IBMVSCSI_CMDS_PER_LUN_DEFAULT, diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 10cf5775a939..549b9198513d 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -364,7 +364,7 @@ static struct scsi_host_template ips_driver_template = { .proc_name = "ips", .show_info = ips_show_info, .write_info = ips_write_info, - .slave_configure = ips_slave_configure, + .device_configure = ips_device_configure, .bios_param = ips_biosparam, .this_id = -1, .sg_tablesize = IPS_MAX_SG, @@ -1166,7 +1166,7 @@ static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, /****************************************************************************/ /* */ -/* Routine Name: ips_slave_configure */ +/* Routine Name: ips_device_configure */ /* */ /* Routine Description: */ /* */ @@ -1174,7 +1174,7 @@ static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, /* */ /****************************************************************************/ static int -ips_slave_configure(struct scsi_device * SDptr) +ips_device_configure(struct scsi_device *SDptr, struct queue_limits *lim) { ips_ha_t *ha; int min; diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h index 65edf000e447..1c7c61c66671 100644 --- a/drivers/scsi/ips.h +++ b/drivers/scsi/ips.h @@ -400,7 +400,8 @@ */ static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]); - static int ips_slave_configure(struct scsi_device *SDptr); + static int ips_device_configure(struct scsi_device *SDptr, + struct queue_limits *lim); /* * Raid Command Formats diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index f0d6b6bbaae1..4f29be625a89 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -6342,8 +6342,9 @@ lpfc_device_alloc(struct scsi_device *sdev) } /** - * lpfc_slave_configure - scsi_host_template slave_configure entry point + * lpfc_device_configure - scsi_host_template device_configure entry point * @sdev: Pointer to scsi_device. + * @lim: Request queue limits. * * This routine configures following items * - Tag command queuing support for @sdev if supported. @@ -6353,7 +6354,7 @@ lpfc_device_alloc(struct scsi_device *sdev) * 0 - Success **/ static int -lpfc_slave_configure(struct scsi_device *sdev) +lpfc_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; struct lpfc_hba *phba = vport->phba; @@ -6737,7 +6738,13 @@ lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) } static int -lpfc_no_device(struct scsi_device *sdev) +lpfc_alloc_no_device(struct scsi_device *sdev) +{ + return -ENODEV; +} + +static int +lpfc_config_no_device(struct scsi_device *sdev, struct queue_limits *lim) { return -ENODEV; } @@ -6748,8 +6755,8 @@ struct scsi_host_template lpfc_template_nvme = { .proc_name = LPFC_DRIVER_NAME, .info = lpfc_info, .queuecommand = lpfc_no_command, - .device_alloc = lpfc_no_device, - .slave_configure = lpfc_no_device, + .device_alloc = lpfc_alloc_no_device, + .device_configure = lpfc_config_no_device, .scan_finished = lpfc_scan_finished, .this_id = -1, .sg_tablesize = 1, @@ -6773,7 +6780,7 @@ struct scsi_host_template lpfc_template = { .eh_target_reset_handler = lpfc_target_reset_handler, .eh_host_reset_handler = lpfc_host_reset_handler, .device_alloc = lpfc_device_alloc, - .slave_configure = lpfc_slave_configure, + .device_configure = lpfc_device_configure, .device_destroy = lpfc_device_destroy, .scan_finished = lpfc_scan_finished, .this_id = -1, @@ -6800,7 +6807,7 @@ struct scsi_host_template lpfc_vport_template = { .eh_bus_reset_handler = NULL, .eh_host_reset_handler = NULL, .device_alloc = lpfc_device_alloc, - .slave_configure = lpfc_slave_configure, + .device_configure = lpfc_device_configure, .device_destroy = lpfc_device_destroy, .scan_finished = lpfc_scan_finished, .this_id = -1, diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index d9d366ec17dc..52d56b8d708c 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2000,7 +2000,8 @@ static struct mvumi_instance_template mvumi_instance_9580 = { .reset_host = mvumi_reset_host_9580, }; -static int mvumi_slave_configure(struct scsi_device *sdev) +static int mvumi_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct mvumi_hba *mhba; unsigned char bitcount = sizeof(unsigned char) * 8; @@ -2172,7 +2173,7 @@ static const struct scsi_host_template mvumi_template = { .module = THIS_MODULE, .name = "Marvell Storage Controller", - .slave_configure = mvumi_slave_configure, + .device_configure = mvumi_device_configure, .queuecommand = mvumi_queue_command, .eh_timed_out = mvumi_timed_out, .eh_host_reset_handler = mvumi_host_reset, diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index fe39d95d0bdd..24d6b22e3627 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -1715,7 +1715,8 @@ static int myrb_device_alloc(struct scsi_device *sdev) return myrb_pdev_device_alloc(sdev); } -static int myrb_slave_configure(struct scsi_device *sdev) +static int myrb_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct myrb_ldev_info *ldev_info; @@ -2209,7 +2210,7 @@ static const struct scsi_host_template myrb_template = { .queuecommand = myrb_queuecommand, .eh_host_reset_handler = myrb_host_reset, .device_alloc = myrb_device_alloc, - .slave_configure = myrb_slave_configure, + .device_configure = myrb_device_configure, .device_destroy = myrb_device_destroy, .bios_param = myrb_biosparam, .cmd_size = sizeof(struct myrb_cmdblk), diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 56557addbcca..352f34e14195 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1882,7 +1882,8 @@ static int myrs_device_alloc(struct scsi_device *sdev) return 0; } -static int myrs_slave_configure(struct scsi_device *sdev) +static int myrs_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct myrs_hba *cs = shost_priv(sdev->host); struct myrs_ldev_info *ldev_info; @@ -1922,7 +1923,7 @@ static const struct scsi_host_template myrs_template = { .queuecommand = myrs_queuecommand, .eh_host_reset_handler = myrs_host_reset, .device_alloc = myrs_device_alloc, - .slave_configure = myrs_slave_configure, + .device_configure = myrs_device_configure, .device_destroy = myrs_device_destroy, .cmd_size = sizeof(struct myrs_cmdblk), .shost_groups = myrs_shost_groups, diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 59821966d54d..3e4bdd212644 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -7796,7 +7796,8 @@ static int ncr53c8xx_device_alloc(struct scsi_device *device) return 0; } -static int ncr53c8xx_slave_configure(struct scsi_device *device) +static int ncr53c8xx_device_configure(struct scsi_device *device, + struct queue_limits *lim) { struct Scsi_Host *host = device->host; struct ncb *np = ((struct host_data *) host->hostdata)->ncb; @@ -8093,7 +8094,7 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt, tpnt->shost_groups = ncr53c8xx_host_groups; tpnt->queuecommand = ncr53c8xx_queue_command; - tpnt->slave_configure = ncr53c8xx_slave_configure; + tpnt->device_configure = ncr53c8xx_device_configure; tpnt->device_alloc = ncr53c8xx_device_alloc; tpnt->eh_bus_reset_handler = ncr53c8xx_bus_reset; tpnt->can_queue = SCSI_NCR_CAN_QUEUE; diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index 90495a832f34..dcf911d68cf8 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c @@ -61,7 +61,8 @@ enum lv1_atapi_in_out { }; -static int ps3rom_slave_configure(struct scsi_device *scsi_dev) +static int ps3rom_device_configure(struct scsi_device *scsi_dev, + struct queue_limits *lim) { struct ps3rom_private *priv = shost_priv(scsi_dev->host); struct ps3_storage_device *dev = priv->dev; @@ -325,7 +326,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data) static const struct scsi_host_template ps3rom_host_template = { .name = DEVICE_NAME, - .slave_configure = ps3rom_slave_configure, + .device_configure = ps3rom_device_configure, .queuecommand = ps3rom_queuecommand, .can_queue = 1, .this_id = 7, diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index cf13148ba281..ff2acaebf0be 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -982,7 +982,8 @@ static int qedf_eh_host_reset(struct scsi_cmnd *sc_cmd) return SUCCESS; } -static int qedf_slave_configure(struct scsi_device *sdev) +static int qedf_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { if (qedf_queue_depth) { scsi_change_queue_depth(sdev, qedf_queue_depth); @@ -1003,7 +1004,7 @@ static const struct scsi_host_template qedf_host_template = { .eh_device_reset_handler = qedf_eh_device_reset, /* lun reset */ .eh_target_reset_handler = qedf_eh_target_reset, /* target reset */ .eh_host_reset_handler = qedf_eh_host_reset, - .slave_configure = qedf_slave_configure, + .device_configure = qedf_device_configure, .dma_boundary = QED_HW_DMA_BOUNDARY, .sg_tablesize = QEDF_MAX_BDS_PER_CMD, .can_queue = FCOE_PARAMS_NUM_TASKS, diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 8958547ac111..2eed63f6faf6 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -1159,7 +1159,7 @@ qla1280_set_target_parameters(struct scsi_qla_host *ha, int bus, int target) /************************************************************************** - * qla1280_slave_configure + * qla1280_device_configure * * Description: * Determines the queue depth for a given device. There are two ways @@ -1170,7 +1170,7 @@ qla1280_set_target_parameters(struct scsi_qla_host *ha, int bus, int target) * default queue depth (dependent on the number of hardware SCBs). **************************************************************************/ static int -qla1280_slave_configure(struct scsi_device *device) +qla1280_device_configure(struct scsi_device *device, struct queue_limits *lim) { struct scsi_qla_host *ha; int default_depth = 3; @@ -4121,7 +4121,7 @@ static const struct scsi_host_template qla1280_driver_template = { .proc_name = "qla1280", .name = "Qlogic ISP 1280/12160", .info = qla1280_info, - .slave_configure = qla1280_slave_configure, + .device_configure = qla1280_device_configure, .queuecommand = qla1280_queuecommand, .eh_abort_handler = qla1280_eh_abort, .eh_device_reset_handler= qla1280_eh_device_reset, diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 47d7faf9b4d5..1d0e7b38c6b3 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1947,7 +1947,7 @@ qla2xxx_device_alloc(struct scsi_device *sdev) } static int -qla2xxx_slave_configure(struct scsi_device *sdev) +qla2xxx_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { scsi_qla_host_t *vha = shost_priv(sdev->host); struct req_que *req = vha->req; @@ -8086,7 +8086,7 @@ struct scsi_host_template qla2xxx_driver_template = { .eh_bus_reset_handler = qla2xxx_eh_bus_reset, .eh_host_reset_handler = qla2xxx_eh_host_reset, - .slave_configure = qla2xxx_slave_configure, + .device_configure = qla2xxx_device_configure, .device_alloc = qla2xxx_device_alloc, .device_destroy = qla2xxx_device_destroy, diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 6177f4798f3a..304ef95587e2 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -975,7 +975,8 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int host->sg_tablesize = QLOGICPTI_MAX_SG(num_free); } -static int qlogicpti_slave_configure(struct scsi_device *sdev) +static int qlogicpti_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct qlogicpti *qpti = shost_priv(sdev->host); int tgt = sdev->id; @@ -1292,7 +1293,7 @@ static const struct scsi_host_template qpti_template = { .name = "qlogicpti", .info = qlogicpti_info, .queuecommand = qlogicpti_queuecommand, - .slave_configure = qlogicpti_slave_configure, + .device_configure = qlogicpti_device_configure, .eh_abort_handler = qlogicpti_abort, .eh_host_reset_handler = qlogicpti_reset, .can_queue = QLOGICPTI_REQ_QUEUE_LEN, diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 59782c2d8053..ae4841a97619 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5890,14 +5890,15 @@ static int scsi_debug_device_alloc(struct scsi_device *sdp) return 0; } -static int scsi_debug_slave_configure(struct scsi_device *sdp) +static int scsi_debug_device_configure(struct scsi_device *sdp, + struct queue_limits *lim) { struct sdebug_dev_info *devip = (struct sdebug_dev_info *)sdp->hostdata; struct dentry *dentry; if (sdebug_verbose) - pr_info("slave_configure <%u %u %u %llu>\n", + pr_info("device_configure <%u %u %u %llu>\n", sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); if (sdp->host->max_cmd_len != SDEBUG_MAX_CMD_LEN) sdp->host->max_cmd_len = SDEBUG_MAX_CMD_LEN; @@ -8715,7 +8716,7 @@ static struct scsi_host_template sdebug_driver_template = { .name = "SCSI DEBUG", .info = scsi_debug_info, .device_alloc = scsi_debug_device_alloc, - .slave_configure = scsi_debug_slave_configure, + .device_configure = scsi_debug_device_configure, .device_destroy = scsi_debug_device_destroy, .ioctl = scsi_debug_ioctl, .queuecommand = scsi_debug_queuecommand, diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 88b8acfdacd4..05ea1e781d21 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -316,7 +316,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, sdev->hostdata = hostdata; /* if the device needs this changing, it may do so in the - * slave_configure function */ + * device_configure function */ sdev->max_device_blocked = SCSI_DEFAULT_DEVICE_BLOCKED; /* diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 2535138544ed..41cbf8784a20 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6558,7 +6558,8 @@ static inline bool pqi_is_tape_changer_device(struct pqi_scsi_dev *device) return device->devtype == TYPE_TAPE || device->devtype == TYPE_MEDIUM_CHANGER; } -static int pqi_slave_configure(struct scsi_device *sdev) +static int pqi_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { int rc = 0; struct pqi_scsi_dev *device; @@ -7550,7 +7551,7 @@ static const struct scsi_host_template pqi_driver_template = { .eh_abort_handler = pqi_eh_abort_handler, .ioctl = pqi_ioctl, .device_alloc = pqi_device_alloc, - .slave_configure = pqi_slave_configure, + .device_configure = pqi_device_configure, .device_destroy = pqi_device_destroy, .map_queues = pqi_map_queues, .sdev_groups = pqi_sdev_groups, diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index a5dd3deaec26..f69075b9951c 100644 --- a/drivers/scsi/snic/snic_main.c +++ b/drivers/scsi/snic/snic_main.c @@ -57,11 +57,11 @@ snic_device_alloc(struct scsi_device *sdev) } /* - * snic_slave_configure : callback function to SCSI Mid Layer, called on + * snic_device_configure : callback function to SCSI Mid Layer, called on * scsi device initialization. */ static int -snic_slave_configure(struct scsi_device *sdev) +snic_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { struct snic *snic = shost_priv(sdev->host); u32 qdepth = 0, max_ios = 0; @@ -108,7 +108,7 @@ static const struct scsi_host_template snic_host_template = { .eh_device_reset_handler = snic_device_reset, .eh_host_reset_handler = snic_host_reset, .device_alloc = snic_device_alloc, - .slave_configure = snic_slave_configure, + .device_configure = snic_device_configure, .change_queue_depth = snic_change_queue_depth, .this_id = -1, .cmd_per_lun = SNIC_DFLT_QUEUE_DEPTH, diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 0e81125df8c7..3c4050617ea2 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -584,7 +584,7 @@ static void return_abnormal_state(struct st_hba *hba, int status) spin_unlock_irqrestore(hba->host->host_lock, flags); } static int -stex_slave_config(struct scsi_device *sdev) +stex_device_configure(struct scsi_device *sdev, struct queue_limits *lim) { sdev->use_10_for_rw = 1; sdev->use_10_for_ms = 1; @@ -1481,7 +1481,7 @@ static const struct scsi_host_template driver_template = { .proc_name = DRV_NAME, .bios_param = stex_biosparam, .queuecommand = stex_queuecommand, - .slave_configure = stex_slave_config, + .device_configure = stex_device_configure, .eh_abort_handler = stex_abort, .eh_host_reset_handler = stex_reset, .this_id = -1, diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 6487b029ca9f..bfbb330d69c8 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1574,7 +1574,8 @@ static int storvsc_device_alloc(struct scsi_device *sdevice) return 0; } -static int storvsc_device_configure(struct scsi_device *sdevice) +static int storvsc_device_configure(struct scsi_device *sdevice, + struct queue_limits *lim) { blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ)); @@ -1876,7 +1877,7 @@ static struct scsi_host_template scsi_driver = { .proc_name = "storvsc_host", .eh_timed_out = storvsc_eh_timed_out, .device_alloc = storvsc_device_alloc, - .slave_configure = storvsc_device_configure, + .device_configure = storvsc_device_configure, .cmd_per_lun = 2048, .this_id = -1, /* Ensure there are no gaps in presented sgls */ diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 606196ff90f9..7c319f06c898 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -825,7 +825,8 @@ static int sym53c8xx_device_alloc(struct scsi_device *sdev) /* * Linux entry point for device queue sizing. */ -static int sym53c8xx_slave_configure(struct scsi_device *sdev) +static int sym53c8xx_device_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct sym_hcb *np = sym_get_hcb(sdev->host); struct sym_tcb *tp = &np->target[sdev->id]; @@ -1685,7 +1686,7 @@ static const struct scsi_host_template sym2_template = { .cmd_size = sizeof(struct sym_ucmd), .queuecommand = sym53c8xx_queue_command, .device_alloc = sym53c8xx_device_alloc, - .slave_configure = sym53c8xx_slave_configure, + .device_configure = sym53c8xx_device_configure, .device_destroy = sym53c8xx_device_destroy, .eh_abort_handler = sym53c8xx_eh_abort_handler, .eh_target_reset_handler = sym53c8xx_eh_target_reset_handler, diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 068267c16cf6..6bf09b1dbff5 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -735,7 +735,8 @@ static int scsifront_dev_reset_handler(struct scsi_cmnd *sc) return scsifront_action_handler(sc, VSCSIIF_ACT_SCSI_RESET); } -static int scsifront_sdev_configure(struct scsi_device *sdev) +static int scsifront_sdev_configure(struct scsi_device *sdev, + struct queue_limits *lim) { struct vscsifrnt_info *info = shost_priv(sdev->host); int err; @@ -776,7 +777,7 @@ static const struct scsi_host_template scsifront_sht = { .queuecommand = scsifront_queuecommand, .eh_abort_handler = scsifront_eh_abort_handler, .eh_device_reset_handler = scsifront_dev_reset_handler, - .slave_configure = scsifront_sdev_configure, + .device_configure = scsifront_sdev_configure, .device_destroy = scsifront_sdev_destroy, .cmd_per_lun = VSCSIIF_DEFAULT_CMD_PER_LUN, .can_queue = VSCSIIF_MAX_REQS, @@ -1074,7 +1075,7 @@ static void scsifront_do_lun_hotplug(struct vscsifrnt_info *info, int op) continue; /* - * Front device state path, used in slave_configure called + * Front device state path, used in device_configure called * on successfull scsi_add_device, and in device_destroy called * on remove of a device. */ diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 5b481b4d835a..b7608d50458f 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -68,7 +68,7 @@ static int device_alloc(struct scsi_device *sdev) return 0; } -static int slave_configure(struct scsi_device *sdev) +static int device_configure(struct scsi_device *sdev, struct queue_limits *lim) { /* Set the SCSI level to at least 2. We'll leave it at 3 if that's * what is originally reported. We need this to avoid confusing @@ -199,7 +199,7 @@ static const struct scsi_host_template rtsx_host_template = { .this_id = -1, .device_alloc = device_alloc, - .slave_configure = slave_configure, + .device_configure = device_configure, /* lots of sg segments can be handled */ .sg_tablesize = SG_ALL, From patchwork Mon Sep 30 20:18:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 832674 Received: from 008.lax.mailroute.net (008.lax.mailroute.net [199.89.1.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE2401A2545 for ; Mon, 30 Sep 2024 20:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727723; cv=none; b=b5KpWY4NKDCBy2RDcL4SSkbbjdqND72/vEMEaiF7E49hSGm932CayDvcHHdTeLqNlNOK+PL5rvo0OAmHSYiNHKfGX6o0SMGOtd4Dm70uw3TUF9d7LJAn2yyKvLFriBrMJCjmlKy7DLbE5ct8seTy5Q4UxBGWzHKVyzVHes1bEUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727723; c=relaxed/simple; bh=1wyh8oZlX0eto5DWPsmLVQ5D6vPFj3cRdU/TSoP703I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fd+Pa6FWWdiaPbihMk+rshSYKnmvx/65nRz+4RMTU4oCrCrI0kyjWl8TXLH+j9G44BR9UcqIq+fkuq/GYarGlVnSVSNmRryjZfJ2TV1A9N2xOx5sKVIb6PHB9SaCAk/0jc8Bb45MuUanRraW0851tLuXVIAZ5PncoCRMqI7auL8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=pTpym/hA; arc=none smtp.client-ip=199.89.1.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="pTpym/hA" Received: from localhost (localhost [127.0.0.1]) by 008.lax.mailroute.net (Postfix) with ESMTP id 4XHXY542Bcz6ClY9Z; Mon, 30 Sep 2024 20:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727727718; x=1730319719; bh=CEN9T 7y/xsdW1CW/WDVfxJkfDKyspZNf/WEOqAX9WJA=; b=pTpym/hAzDzDuo2jH6rgf XPMTp6pRToBAEMN7jURNauE2QAFE+5dfE35V7hK9MUrOl6mi4q+rHFayz/Pi7lmD 65puijG7IPgsBFPCFjQgxvAQ4+nSstHV+fhUO5NvoDaeNaaTn3MC0fEwXTwsfIlc I5x6wXhwud5iXYReWR9V0iM+M+yGS9VteEBo3MzALOdiizch9SP9ErCeXPOM28Vm F7CgioqHhU/7RIkoF4KFfThelsXrhRTCtEK33qRdC/UWWXBS7BGf3BLzMRqugxmj xyaXtEvbnqVwZAHD2an8VrXt9nI8KpIcZdRoQ+QMaGnRkCSU7ME/c1WLxvZQ8z+T Q== X-Virus-Scanned: by MailRoute Received: from 008.lax.mailroute.net ([127.0.0.1]) by localhost (008.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id ONrqsrc2ecy3; Mon, 30 Sep 2024 20:21:58 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 008.lax.mailroute.net (Postfix) with ESMTPSA id 4XHXWq3Lffz6ClY9b; Mon, 30 Sep 2024 20:20:55 +0000 (UTC) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Damien Le Moal , "James E.J. Bottomley" Subject: [PATCH 3/4] scsi: core: Remove .slave_configure() Date: Mon, 30 Sep 2024 13:18:49 -0700 Message-ID: <20240930201937.2020129-4-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930201937.2020129-1-bvanassche@acm.org> References: <20240930201937.2020129-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Now that all SCSI drivers have been converted from .slave_configure() to .device_configure(), remove support for .slave_configure() from the SCSI core. Change all references to .slave_configure() in the SCSI documentation into references to .device_configure(). Cc: Damien Le Moal Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_scan.c | 4 +--- include/scsi/scsi_host.h | 10 +++------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 05ea1e781d21..bb4ebb744b69 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1076,8 +1076,6 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, if (hostt->device_configure) ret = hostt->device_configure(sdev, &lim); - else if (hostt->slave_configure) - ret = hostt->slave_configure(sdev); if (ret) { queue_limits_cancel_update(sdev->request_queue); /* @@ -1102,7 +1100,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, * Set up budget map again since memory consumption of the map depends * on actual queue depth. */ - if (hostt->device_configure || hostt->slave_configure) + if (hostt->device_configure) scsi_realloc_sdev_budget_map(sdev, sdev->queue_depth); if (sdev->scsi_level >= SCSI_3) diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 934aae4254c3..28df2bd7af46 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -169,11 +169,11 @@ struct scsi_host_template { * * Deallocation: If we didn't find any devices at this ID, you will * get an immediate call to device_destroy(). If we find something - * here then you will get a call to slave_configure(), then the + * here then you will get a call to device_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 device_destroy(). This is - * assuming you implement slave_configure and device_destroy. + * assuming you implement device_configure and device_destroy. * However, if you allocate memory and hang it off the device struct, * then you must implement the device_destroy() routine at a minimum * in order to avoid leaking memory @@ -211,19 +211,15 @@ struct scsi_host_template { * up after yourself before returning non-0 * * Status: OPTIONAL - * - * Note: slave_configure is the legacy version, use device_configure for - * all new code. A driver must never define both. */ int (* device_configure)(struct scsi_device *, struct queue_limits *lim); - int (* slave_configure)(struct scsi_device *); /* * Immediately prior to deallocating the device and after all activity * has ceased the mid layer calls this point so that the low level * driver may completely detach itself from the scsi device and vice * versa. The low level driver is responsible for freeing any memory - * it allocated in the device_alloc or slave_configure calls. + * it allocated in the device_alloc or device_configure calls. * * Status: OPTIONAL */ From patchwork Mon Sep 30 20:18:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 831803 Received: from 008.lax.mailroute.net (008.lax.mailroute.net [199.89.1.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC7B419882F for ; Mon, 30 Sep 2024 20:22:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727729; cv=none; b=YWZ2l/+0+/YFJ6RcR2Bs00kiF/YvFcytAM+UFD7GHSfLcbQN2L1u+LEpOy40+j8jFIoJqQeAUUc6VC3NTa8EGQOi1aust9TzZ7UJ68Eg9HVfYfPpbeD6I957smDUUMA0Zz16PIaMwQ8tAw1ywvXRvybSk/Cb5gHR+TmSt0bUKaw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727727729; c=relaxed/simple; bh=eJGS2yvMsnBP+meJId+lEaJ2YG786w9cnACvRadZ3ns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nJBGn9Y6TSY/fT3MdH+Aoy8bdL0nrOwd2Sy7ZtEMrV/td6V4CLy04EDBvdCB04O1hCk69syX5xwggUdnpAbwkYAppFvqprwkEzL5AxIohTbZ/gmeXewMCdL6rNLq9dtfg4nQxuqjQ12FqoZR2SyPztTL/9EmS2iZo2HzEVhAtys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=FykeiS0H; arc=none smtp.client-ip=199.89.1.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="FykeiS0H" Received: from localhost (localhost [127.0.0.1]) by 008.lax.mailroute.net (Postfix) with ESMTP id 4XHXYC1sXVz6ClY9b; Mon, 30 Sep 2024 20:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1727727721; x=1730319722; bh=0n58H +y/iSJLf/sPPt/9kbMzNFx9UeTCbAE4TMsiU4s=; b=FykeiS0HfRvcFgsoIP44J F4NiJJAOUL5HPj7Zj8FPf+LGGKQvTidKyK5GI8hMKOx9mi5PYAKqol4z1RWhbL4c pSuunlrz8LEXeuyjD6jPT4OBByr6ck0/f2+mOQ5C4TyhStYhjzV55UXMGXndv3eW bjjeFbDsjof7YKI3y6vVPkJIk2HHpOugWJG8GF/Ei9RxeS9Rrg98dORYEM2D4ZwM IuBWz5qrBEhmKF+zF+UqLH5kYBxC9zZ0JUiD3ZjbBS8ekn5LhMaw3GrvyQim0oKR AMY7ZXrqlnjRjo3nTPLNgskUiitfzhL7RIHtpott5NFD5m5sNN7AXBK7F9R+zlDZ A== X-Virus-Scanned: by MailRoute Received: from 008.lax.mailroute.net ([127.0.0.1]) by localhost (008.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id wTQu0jhWeqtd; Mon, 30 Sep 2024 20:22:01 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.204.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 008.lax.mailroute.net (Postfix) with ESMTPSA id 4XHXWw4L4cz6ClY9c; Mon, 30 Sep 2024 20:21:00 +0000 (UTC) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Damien Le Moal , Jonathan Corbet , Randy Dunlap Subject: [PATCH 4/4] scsi: core: Update .slave_configure() references in the documentation Date: Mon, 30 Sep 2024 13:18:50 -0700 Message-ID: <20240930201937.2020129-5-bvanassche@acm.org> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog In-Reply-To: <20240930201937.2020129-1-bvanassche@acm.org> References: <20240930201937.2020129-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Now that .slave_configure() support has been removed, change all references to .slave_configure() into .device_configure() in the SCSI documentation. Cc: Damien Le Moal Signed-off-by: Bart Van Assche --- Documentation/scsi/scsi_mid_low_api.rst | 31 +++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst index 3507c10164b4..12c00e91cc0f 100644 --- a/Documentation/scsi/scsi_mid_low_api.rst +++ b/Documentation/scsi/scsi_mid_low_api.rst @@ -150,10 +150,10 @@ scsi devices of which only the first 2 respond:: scsi_scan_host() -------+ | device_alloc() - slave_configure() --> scsi_change_queue_depth() + device_configure() --> scsi_change_queue_depth() | device_alloc() - slave_configure() + device_configure() | device_alloc() *** device_destroy() *** @@ -163,7 +163,7 @@ scsi devices of which only the first 2 respond:: respond, a device_alloc(), device_destroy() pair is called. If the LLD wants to adjust the default queue settings, it can invoke -scsi_change_queue_depth() in its slave_configure() routine. +scsi_change_queue_depth() in its device_configure() routine. When an HBA is being removed it could be as part of an orderly shutdown associated with the LLD module being unloaded (e.g. with the "rmmod" @@ -203,7 +203,7 @@ An LLD can use this sequence to make the mid level aware of a SCSI device:: scsi_add_device() ------+ | device_alloc() - slave_configure() [--> scsi_change_queue_depth()] + device_configure() [--> scsi_change_queue_depth()] In a similar fashion, an LLD may become aware that a SCSI device has been removed (unplugged) or the connection to it has been interrupted. Some @@ -222,7 +222,7 @@ upper layers with this sequence:: It may be useful for an LLD to keep track of struct scsi_device instances (a pointer is passed as the parameter to device_alloc() and -slave_configure() callbacks). Such instances are "owned" by the mid-level. +device_configure() callbacks). Such instances are "owned" by the mid-level. struct scsi_device instances are freed after device_destroy(). @@ -331,7 +331,7 @@ Details:: * bus scan when an HBA is added (i.e. scsi_scan_host()). So it * should only be called if the HBA becomes aware of a new scsi * device (lu) after scsi_scan_host() has completed. If successful - * this call can lead to device_alloc() and slave_configure() callbacks + * this call can lead to device_alloc() and device_configure() callbacks * into the LLD. * * Defined in: drivers/scsi/scsi_scan.c @@ -374,7 +374,7 @@ Details:: * Might block: no * * Notes: Can be invoked any time on a SCSI device controlled by this - * LLD. [Specifically during and after slave_configure() and prior to + * LLD. [Specifically during and after device_configure() and prior to * device_destroy().] Can safely be invoked from interrupt code. * * Defined in: drivers/scsi/scsi.c [see source code for more notes] @@ -627,14 +627,15 @@ Interface functions are supplied (defined) by LLDs and their function pointers are placed in an instance of struct scsi_host_template which is passed to scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()]. Some are mandatory. Interface functions should be declared static. The -accepted convention is that driver "xyz" will declare its slave_configure() +accepted convention is that driver "xyz" will declare its device_configure() function as:: - static int xyz_slave_configure(struct scsi_device * sdev); + static int xyz_device_configure(struct scsi_device * sdev, + struct queue_limits *lim); and so forth for all interface functions listed below. -A pointer to this function should be placed in the 'slave_configure' member +A pointer to this function should be placed in the 'device_configure' member of a "struct scsi_host_template" instance. A pointer to such an instance should be passed to the mid level's scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()]. @@ -658,7 +659,7 @@ Summary: - proc_info - supports /proc/scsi/{driver_name}/{host_no} - queuecommand - queue scsi command, invoke 'done' on completion - device_alloc - prior to any commands being sent to a new device - - slave_configure - driver fine tuning for given device after attach + - device_configure - driver fine tuning for given device after attach - device_destroy - given device is about to be shut down @@ -975,7 +976,7 @@ Details:: * prior to its initial scan. The corresponding scsi device may not * exist but the mid level is just about to scan for it (i.e. send * and INQUIRY command plus ...). If a device is found then - * slave_configure() will be called while if a device is not found + * device_configure() will be called while if a device is not found * device_destroy() is called. * For more details see the include/scsi/scsi_host.h file. * @@ -985,7 +986,7 @@ Details:: /** - * slave_configure - driver fine tuning for given device just after it + * device_configure - driver fine tuning for given device just after it * has been first scanned (i.e. it responded to an * INQUIRY) * @sdp: device that has just been attached @@ -1004,7 +1005,7 @@ Details:: * * Optionally defined in: LLD **/ - int slave_configure(struct scsi_device *sdp) + int device_configure(struct scsi_device *sdp, struct queue_limits *lim) /** @@ -1024,7 +1025,7 @@ Details:: * commands will be sent for this sdp instance. [However the device * could be re-attached in the future in which case a new instance * of struct scsi_device would be supplied by future device_alloc() - * and slave_configure() calls.] + * and device_configure() calls.] * * Optionally defined in: LLD **/