From: Douglas Gilbert <dougg@torque.net>
To: James.Smart@Emulex.Com
Cc: matthew@wil.cx, James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_mid_low_api doesn't mention scsi_scan_host
Date: Thu, 24 Mar 2005 18:45:40 +1000 [thread overview]
Message-ID: <42427E34.6060308@torque.net> (raw)
In-Reply-To: <9BB4DECD4CFE6D43AA8EA8D768ED51C201AF54@xbl3.ad.emulex.com>
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
James.Smart@Emulex.Com wrote:
>>Thanks for the correction. How does this look?
>>
>> * Notes: Only required in "hotplug initialization model" after a
>> * successful call to scsi_host_alloc(). This function does not
>> * scan the bus; this can be done by calling scsi_scan_host() or
>> * in some other transport-specific way. The LLD must set up
>> * the transport template before calling this function
>>and may only
>> * access the transport class data after this function
>>has been called.
>
>
> a work of art :)
So attached is Matthew's patch plus the above change
diffed against lk 2.6.11
Signed-off-by: Douglas Gilbert <dougg@torque.net>
[-- Attachment #2: scsi_mid_low_api2611mw.diff --]
[-- Type: text/x-patch, Size: 4654 bytes --]
--- linux/Documentation/scsi/scsi_mid_low_api.txt 2005-03-03 07:48:09.000000000 +1000
+++ linux/Documentation/scsi/scsi_mid_low_api.txt2611mw 2005-03-24 18:41:43.000000000 +1000
@@ -150,7 +150,8 @@
LLD mid level LLD
===-------------------=========--------------------===------
scsi_host_alloc() -->
-scsi_add_host() --------+
+scsi_add_host() ---->
+scsi_scan_host() -------+
|
slave_alloc()
slave_configure() --> scsi_adjust_queue_depth()
@@ -196,7 +197,7 @@
The hotplug concept may be extended to SCSI devices. Currently, when an
-HBA is added, the scsi_add_host() function causes a scan for SCSI devices
+HBA is added, the scsi_scan_host() function causes a scan for SCSI devices
attached to the HBA's SCSI transport. On newer SCSI transports the HBA
may become aware of a new SCSI device _after_ the scan has completed.
An LLD can use this sequence to make the mid level aware of a SCSI device:
@@ -372,7 +373,7 @@
Summary:
scsi_activate_tcq - turn on tag command queueing
scsi_add_device - creates new scsi device (lu) instance
- scsi_add_host - perform sysfs registration and SCSI bus scan.
+ scsi_add_host - perform sysfs registration and set up transport class
scsi_add_timer - (re-)start timer on a SCSI command.
scsi_adjust_queue_depth - change the queue depth on a SCSI device
scsi_assign_lock - replace default host_lock with given lock
@@ -388,6 +389,7 @@
scsi_remove_device - detach and remove a SCSI device
scsi_remove_host - detach and remove all SCSI devices owned by host
scsi_report_bus_reset - report scsi _bus_ reset observed
+ scsi_scan_host - scan SCSI bus
scsi_set_device - place device reference in host structure
scsi_to_pci_dma_dir - convert SCSI subsystem direction flag to PCI
scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS
@@ -430,10 +432,10 @@
* Might block: yes
*
* Notes: This call is usually performed internally during a scsi
- * bus scan when an HBA is added (i.e. scsi_add_host()). So it
+ * 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_add_host() has completed. If successful
- * this call we lead to slave_alloc() and slave_configure() callbacks
+ * device (lu) after scsi_scan_host() has completed. If successful
+ * this call can lead to slave_alloc() and slave_configure() callbacks
* into the LLD.
*
* Defined in: drivers/scsi/scsi_scan.c
@@ -444,7 +446,7 @@
/**
- * scsi_add_host - perform sysfs registration and SCSI bus scan.
+ * scsi_add_host - perform sysfs registration and set up transport class
* @shost: pointer to scsi host instance
* @dev: pointer to struct device of type scsi class
*
@@ -453,7 +455,11 @@
* Might block: no
*
* Notes: Only required in "hotplug initialization model" after a
- * successful call to scsi_host_alloc().
+ * successful call to scsi_host_alloc(). This function does not
+ * scan the bus; this can be done by calling scsi_scan_host() or
+ * in some other transport-specific way. The LLD must set up
+ * the transport template before calling this function and may only
+ * access the transport class data after this function has been called.
*
* Defined in: drivers/scsi/hosts.c
**/
@@ -603,7 +609,7 @@
* area for the LLD's exclusive use.
* Both associated refcounting objects have their refcount set to 1.
* Full registration (in sysfs) and a bus scan are performed later when
- * scsi_add_host() is called.
+ * scsi_add_host() and scsi_scan_host() are called.
*
* Defined in: drivers/scsi/hosts.c .
**/
@@ -743,6 +749,19 @@
/**
+ * scsi_scan_host - scan SCSI bus
+ * @shost: a pointer to a scsi host instance
+ *
+ * Might block: yes
+ *
+ * Notes: Should be called after scsi_add_host()
+ *
+ * Defined in: drivers/scsi/scsi_scan.c
+ **/
+void scsi_scan_host(struct Scsi_Host *shost)
+
+
+/**
* scsi_set_device - place device reference in host structure
* @shost: a pointer to a scsi host instance
* @pdev: pointer to device instance to assign
@@ -1539,8 +1558,9 @@
Andries Brouwer <Andries dot Brouwer at cwi dot nl>
Randy Dunlap <rddunlap at osdl dot org>
Alan Stern <stern at rowland dot harvard dot edu>
+ Matthew Wilcox <matthew at wil dot cx>
Douglas Gilbert
dgilbert at interlog dot com
-21st September 2004
+24th March 2005
next prev parent reply other threads:[~2005-03-24 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 22:52 [PATCH] scsi_mid_low_api doesn't mention scsi_scan_host James.Smart
2005-03-24 8:45 ` Douglas Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-03-21 14:50 James.Smart
2005-03-21 15:59 ` Matthew Wilcox
2005-03-21 13:43 Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42427E34.6060308@torque.net \
--to=dougg@torque.net \
--cc=James.Bottomley@SteelEye.com \
--cc=James.Smart@Emulex.Com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.