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 **/