<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.scsi">
    <title>gmane.linux.scsi</title>
    <link>http://blog.gmane.org/gmane.linux.scsi</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75358"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75356"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75354"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75347"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75344"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75343"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75331"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75322"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75315"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75312"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75291"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75285"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75280"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75256"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75251"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75239"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75232"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75231"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75228"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.scsi/75226"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75358">
    <title>FROM MRS SUSAN SHABANGU(OPEN THE ATTACH FILES)</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75358</link>
    <description>&lt;pre&gt;&lt;/pre&gt;</description>
    <dc:creator>FROM MRS SUSAN SHABANGU</dc:creator>
    <dc:date>2012-05-26T10:56:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75356">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75356</link>
    <description>&lt;pre&gt;
 i am robothroli, Purchase manager from roli Merchant Ltd. We are
Import/export Company based in taiwan. We are interested in purchasing
your product and I would like to make an inquiry. Please inform me on:

Sample availability and price
Minimum order quantity
FOB Prices

Sincerely
Purchase Manager
robothroli



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>robothroli company</dc:creator>
    <dc:date>2012-05-25T13:45:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75354">
    <title>[Resend PATCH v2] scsi_lib: rate-limit the error message from failing commands</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75354</link>
    <description>&lt;pre&gt;From: Yi Zou &amp;lt;yi.zou&amp;lt; at &amp;gt;intel.com&amp;gt;

When performing a cable pull test w/ active stress I/O using fio over
a dual port Intel 82599 FCoE CNA, w/ 256LUNs on one port and about 32LUNs
on the other, it is observed that the system becomes not usable due to
scsi-ml being busy printing the error messages for all the failing commands.
I don't believe this problem is specific to FCoE and these commands are
anyway failing due to link being down (DID_NO_CONNECT), just rate-limit
the messages here to solve this issue.

v2-&amp;gt;v1: use __ratelimit() as Tomas Henzl mentioned as the proper way for
rate-limit per function. However, in this case, the failed i/o gets to
blk_end_request_err() and then blk_update_request(), which also has to
be rate-limited, as added in the v2 of this patch.

Signed-off-by: Yi Zou &amp;lt;yi.zou&amp;lt; at &amp;gt;intel.com&amp;gt;
Acked-by: Tomas Henzl &amp;lt;thenzl&amp;lt; at &amp;gt;redhat.com&amp;gt;
Signed-off-by: Robert Love &amp;lt;robert.w.love&amp;lt; at &amp;gt;intel.com&amp;gt;
---
 block/blk-core.c        |    8 +++++---
 drivers/scsi/scsi_lib.c |    5 ++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 1f61b74..c1f1c3a 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,6 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/fault-inject.h&amp;gt;
 #include &amp;lt;linux/list_sort.h&amp;gt;
 #include &amp;lt;linux/delay.h&amp;gt;
+#include &amp;lt;linux/ratelimit.h&amp;gt;
 
 #define CREATE_TRACE_POINTS
 #include &amp;lt;trace/events/block.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2133,9 +2134,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
 error_type = "I/O";
 break;
 }
-printk(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
-       error_type, req-&amp;gt;rq_disk ? req-&amp;gt;rq_disk-&amp;gt;disk_name : "?",
-       (unsigned long long)blk_rq_pos(req));
+printk_ratelimited(KERN_ERR "end_request: %s error, dev %s, "
+   "sector %llu\n", error_type, req-&amp;gt;rq_disk ?
+   req-&amp;gt;rq_disk-&amp;gt;disk_name : "?",
+   (unsigned long long)blk_rq_pos(req));
 }
 
 blk_account_io_completion(req, nr_bytes);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5dfd749..48ef90c 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,6 +20,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/delay.h&amp;gt;
 #include &amp;lt;linux/hardirq.h&amp;gt;
 #include &amp;lt;linux/scatterlist.h&amp;gt;
+#include &amp;lt;linux/ratelimit.h&amp;gt;
 
 #include &amp;lt;scsi/scsi.h&amp;gt;
 #include &amp;lt;scsi/scsi_cmnd.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -745,6 +746,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
 enum {ACTION_FAIL, ACTION_REPREP, ACTION_RETRY,
       ACTION_DELAYED_RETRY} action;
 char *description = NULL;
+static DEFINE_RATELIMIT_STATE(rs,  DEFAULT_RATELIMIT_INTERVAL,
+      DEFAULT_RATELIMIT_BURST);
 
 if (result) {
 sense_valid = scsi_command_normalize_sense(cmd, &amp;amp;sshdr);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -935,7 +938,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
 case ACTION_FAIL:
 /* Give up and fail the remainder of the request */
 scsi_release_buffers(cmd);
-if (!(req-&amp;gt;cmd_flags &amp;amp; REQ_QUIET)) {
+if (!(req-&amp;gt;cmd_flags &amp;amp; REQ_QUIET) &amp;amp;&amp;amp; __ratelimit(&amp;amp;rs)) {
 if (description)
 scmd_printk(KERN_INFO, cmd, "%s\n",
     description);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Robert Love</dc:creator>
    <dc:date>2012-05-25T21:29:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75347">
    <title>[PATCH 1/4] fc: adds some more FC specific stats to fc_host</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75347</link>
    <description>&lt;pre&gt;The libfc provides more flexibility and with that
we can monitor some more FC specific stats for
FC exches or FCP error cases, this patch add
such new FC stats.

The patch adds *only* FC specific new stats to
existing fc_host attribute container.

Added stats names are self explanatory as
existing FC stats already has, however anyway
still added commentary along their definition
to describe them.

CC: James Smart &amp;lt;james.smart&amp;lt; at &amp;gt;emulex.com&amp;gt;

Signed-off-by: Vasu Dev &amp;lt;vasu.dev&amp;lt; at &amp;gt;intel.com&amp;gt;
Acked-by : Robert Love &amp;lt;robert.w.love&amp;lt; at &amp;gt;intel.com&amp;gt;
Tested-by: Ross Brattain &amp;lt;ross.b.brattain&amp;lt; at &amp;gt;intel.com&amp;gt;
---

 drivers/scsi/scsi_transport_fc.c |   18 ++++++++++++++++++
 include/scsi/scsi_transport_fc.h |   12 ++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 5797604..2fded79 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1744,6 +1744,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fc_host_statistic(fcp_output_requests);
 fc_host_statistic(fcp_control_requests);
 fc_host_statistic(fcp_input_megabytes);
 fc_host_statistic(fcp_output_megabytes);
+fc_host_statistic(fcp_packet_alloc_failures);
+fc_host_statistic(fcp_packet_aborts);
+fc_host_statistic(fcp_frame_alloc_failures);
+fc_host_statistic(fc_no_free_exch);
+fc_host_statistic(fc_no_free_exch_xid);
+fc_host_statistic(fc_xid_not_found);
+fc_host_statistic(fc_xid_busy);
+fc_host_statistic(fc_seq_not_found);
+fc_host_statistic(fc_non_bls_resp);
 
 static ssize_t
 fc_reset_statistics(struct device *dev, struct device_attribute *attr,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1784,6 +1793,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct attribute *fc_statistics_attrs[] = {
 &amp;amp;device_attr_host_fcp_control_requests.attr,
 &amp;amp;device_attr_host_fcp_input_megabytes.attr,
 &amp;amp;device_attr_host_fcp_output_megabytes.attr,
+&amp;amp;device_attr_host_fcp_packet_alloc_failures.attr,
+&amp;amp;device_attr_host_fcp_packet_aborts.attr,
+&amp;amp;device_attr_host_fcp_frame_alloc_failures.attr,
+&amp;amp;device_attr_host_fc_no_free_exch.attr,
+&amp;amp;device_attr_host_fc_no_free_exch_xid.attr,
+&amp;amp;device_attr_host_fc_xid_not_found.attr,
+&amp;amp;device_attr_host_fc_xid_busy.attr,
+&amp;amp;device_attr_host_fc_seq_not_found.attr,
+&amp;amp;device_attr_host_fc_non_bls_resp.attr,
 &amp;amp;device_attr_host_reset_statistics.attr,
 NULL
 };
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index 719faf1..b797e8f 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -426,6 +426,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct fc_host_statistics {
 u64 fcp_control_requests;
 u64 fcp_input_megabytes;
 u64 fcp_output_megabytes;
+u64 fcp_packet_alloc_failures;/* fcp packet allocation failures */
+u64 fcp_packet_aborts;/* fcp packet aborted */
+u64 fcp_frame_alloc_failures;/* fcp frame allocation failures */
+
+/* fc exches statistics */
+u64 fc_no_free_exch;/* no free exch memory */
+u64 fc_no_free_exch_xid;/* no free exch id */
+u64 fc_xid_not_found;/* exch not found for a response */
+u64 fc_xid_busy;/* exch exist for new a request */
+u64 fc_seq_not_found;/* seq is not found for exchange */
+u64 fc_non_bls_resp;/* a non BLS response frame with
+   a sequence responder in new exch */
 };
 
 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Vasu Dev</dc:creator>
    <dc:date>2012-05-25T17:26:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75344">
    <title>Tercume edilecek metinleriniz hakkinda</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75344</link>
    <description>&lt;pre&gt;Sayin ilgili,
 
Biz 10 yili askin bir süredir internet üzerinden profesyonel olarak
CEVIRI / TERCUME HIZMETLERI veren bir kurulusuz. Kurulusumuzun 10. yili  
serefine firmalara ozel, sayfasi 12 TL+KDV'lik bir kampanya hazirladik.

Sadece INGILIZCE - TURKCE ve TURKCE - INGILIZCE cevirilerde gecerli olan ve 
kisa bir sure 
devam edecek bu cazip fiyat avantajindan yararlanmak icin
lutfen bizi hemen simdi arayiniz veya bir e-posta gonderiniz. Diger diller 
icin lutfen fiyat sorunuz.

Not: 1 sayfa = 1000 karakter veya 180 kelimelik dunya standardi 
esas alinmistir. Teknik metinlerde %25 fark alinacaktir. Diger diller icin 
lutfen fiyat aliniz.

Saygilarimizla,
 
Levent Turer,  
Genel Koordinator
Turer Ceviri Hizmetleri

e-posta: info&amp;lt; at &amp;gt;turerceviri.com 
web: www.turerceviri.com 
Tel: 0232 421 13 60
Faks: 0232 421 13 32

Bu e-mail size otomatik olarak, yani bir reklam amaciyla rastgele 
gonderilmemistir.  Eger bizden bu veya benzeri bir konuda 
bir daha e-posta almak istemiyorsaniz, lutfen bize bildiriniz. Size 
rahatsizlik 
verdiysek ozurlerimizi sunariz...

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>info&lt; at &gt;turerceviri.com</dc:creator>
    <dc:date>2012-05-23T13:14:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75343">
    <title>[PATCH] scsi: fix async probe regression</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75343</link>
    <description>&lt;pre&gt;Commit a7a20d1 "[SCSI] sd: limit the scope of the async probe domain"
moved sd probe work out of reach of wait_for_device_probe().  Allow it
to be synced via scsi_complete_async_scans().

Cc: David Miller &amp;lt;davem&amp;lt; at &amp;gt;davemloft.net&amp;gt;
Cc: Alan Stern &amp;lt;stern&amp;lt; at &amp;gt;rowland.harvard.edu&amp;gt;
Reported-by: Meelis Roos &amp;lt;mroos&amp;lt; at &amp;gt;linux.ee&amp;gt;
Tested-by: Meelis Roos &amp;lt;mroos&amp;lt; at &amp;gt;linux.ee&amp;gt;
Signed-off-by: Dan Williams &amp;lt;dan.j.williams&amp;lt; at &amp;gt;intel.com&amp;gt;
---

 So this is the stop gap that allows us to keep a7a20d1 as a fix for a
 resume deadlock, and gives us time to figure out how to clarify
 async_synchronize_full() properly in the 3.6 timeframe.

 drivers/scsi/scsi_scan.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 01b0374..41f9192 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -141,13 +141,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct async_scan_data {
  * started scanning after this function was called may or may not have
  * finished.
  */
-int scsi_complete_async_scans(void)
+static void __scsi_complete_async_scans(void)
 {
 struct async_scan_data *data;
 
 do {
 if (list_empty(&amp;amp;scanning_hosts))
-return 0;
+return;
 /* If we can't get memory immediately, that's OK.  Just
  * sleep a little.  Even if we never get memory, the async
  * scans will finish eventually.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -181,6 +181,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int scsi_complete_async_scans(void)
 spin_unlock(&amp;amp;async_scan_lock);
 
 kfree(data);
+}
+
+
+int scsi_complete_async_scans(void)
+{
+__scsi_complete_async_scans();
+async_synchronize_full_domain(&amp;amp;scsi_sd_probe_domain);
+
 return 0;
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Dan Williams</dc:creator>
    <dc:date>2012-05-25T16:39:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75331">
    <title>[RFC PATCH] scsi: fix hot unplug vs async scan race</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75331</link>
    <description>&lt;pre&gt;The following crash results from cases where the end_device has been
removed before scsi_sysfs_add_sdev has had a chance to run.

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
 IP: [&amp;lt;ffffffff8115e100&amp;gt;] sysfs_create_dir+0x32/0xb6
 ...
 Call Trace:
  [&amp;lt;ffffffff8125e4a8&amp;gt;] kobject_add_internal+0x120/0x1e3
  [&amp;lt;ffffffff81075149&amp;gt;] ? trace_hardirqs_on+0xd/0xf
  [&amp;lt;ffffffff8125e641&amp;gt;] kobject_add_varg+0x41/0x50
  [&amp;lt;ffffffff8125e70b&amp;gt;] kobject_add+0x64/0x66
  [&amp;lt;ffffffff8131122b&amp;gt;] device_add+0x12d/0x63a
  [&amp;lt;ffffffff814b65ea&amp;gt;] ? _raw_spin_unlock_irqrestore+0x47/0x56
  [&amp;lt;ffffffff8107de15&amp;gt;] ? module_refcount+0x89/0xa0
  [&amp;lt;ffffffff8132f348&amp;gt;] scsi_sysfs_add_sdev+0x4e/0x28a
  [&amp;lt;ffffffff8132dcbb&amp;gt;] do_scan_async+0x9c/0x145

...teach scsi_sysfs_add_devices to check for deleted device before
trying to add them.

This teaches scsi_transport_sas to bypass scsi_remove_target() since it
is unable to find the target from the end_device rphy since
device_for_each_child() relies on the target device having gone through
a device_add().

Cc: Mike Christie &amp;lt;michaelc&amp;lt; at &amp;gt;cs.wisc.edu&amp;gt;
Cc: Robert Love &amp;lt;robert.w.love&amp;lt; at &amp;gt;intel.com&amp;gt;
Cc: Nagalakshmi Nandigama &amp;lt;Nagalakshmi.Nandigama&amp;lt; at &amp;gt;lsi.com&amp;gt;
Cc: Kashyap Desai &amp;lt;kashyap.desai&amp;lt; at &amp;gt;lsi.com&amp;gt;
Cc: Matthew Wilcox &amp;lt;matthew&amp;lt; at &amp;gt;wil.cx&amp;gt;
Cc: &amp;lt;stable&amp;lt; at &amp;gt;vger.kernel.org&amp;gt;
[stable: v2.6.20+]
Reported-by: Dariusz Majchrzak &amp;lt;dariusz.majchrzak&amp;lt; at &amp;gt;intel.com&amp;gt;
Signed-off-by: Dan Williams &amp;lt;dan.j.williams&amp;lt; at &amp;gt;intel.com&amp;gt;
---

This is larger than I would like, but could not think of better way to
retrieve the starget from the transport device.  Other ideas?

--
Dan


 drivers/scsi/scsi_scan.c          |   24 ++++++++++++++++--------
 drivers/scsi/scsi_sysfs.c         |   15 ++++++++++++++-
 drivers/scsi/scsi_transport_sas.c |    5 +++--
 include/scsi/scsi_device.h        |    5 +++--
 include/scsi/scsi_transport_sas.h |    1 +
 5 files changed, 37 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 01b0374..5e00e09 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1562,8 +1562,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void scsi_rescan_device(struct device *dev)
 }
 EXPORT_SYMBOL(scsi_rescan_device);
 
-static void __scsi_scan_target(struct device *parent, unsigned int channel,
-unsigned int id, unsigned int lun, int rescan)
+static struct scsi_target *__scsi_scan_target(struct device *parent, unsigned int channel,
+      unsigned int id, unsigned int lun, int rescan)
 {
 struct Scsi_Host *shost = dev_to_shost(parent);
 int bflags = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1574,11 +1574,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __scsi_scan_target(struct device *parent, unsigned int channel,
 /*
  * Don't scan the host adapter
  */
-return;
+return NULL;
 
 starget = scsi_alloc_target(parent, channel, id);
 if (!starget)
-return;
+return NULL;
 scsi_autopm_get_target(starget);
 
 if (lun != SCAN_WILD_CARD) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1611,6 +1611,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __scsi_scan_target(struct device *parent, unsigned int channel,
 scsi_target_reap(starget);
 
 put_device(&amp;amp;starget-&amp;gt;dev);
+
+return starget;
 }
 
 /**
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1628,23 +1630,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __scsi_scan_target(struct device *parent, unsigned int channel,
  *     First try a REPORT LUN scan, if that does not scan the target, do a
  *     sequential scan of LUNs on the target id.
  **/
-void scsi_scan_target(struct device *parent, unsigned int channel,
-      unsigned int id, unsigned int lun, int rescan)
+struct scsi_target *scsi_scan_target(struct device *parent, unsigned int channel,
+     unsigned int id, unsigned int lun, int rescan)
 {
 struct Scsi_Host *shost = dev_to_shost(parent);
+struct scsi_target *starget = NULL;
 
 if (strncmp(scsi_scan_type, "none", 4) == 0)
-return;
+return NULL;
 
 mutex_lock(&amp;amp;shost-&amp;gt;scan_mutex);
 if (!shost-&amp;gt;async_scan)
 scsi_complete_async_scans();
 
 if (scsi_host_scan_allowed(shost) &amp;amp;&amp;amp; scsi_autopm_get_host(shost) == 0) {
-__scsi_scan_target(parent, channel, id, lun, rescan);
+starget = __scsi_scan_target(parent, channel, id, lun, rescan);
 scsi_autopm_put_host(shost);
 }
 mutex_unlock(&amp;amp;shost-&amp;gt;scan_mutex);
+
+return starget;
 }
 EXPORT_SYMBOL(scsi_scan_target);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1714,6 +1719,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void scsi_sysfs_add_devices(struct Scsi_Host *shost)
 {
 struct scsi_device *sdev;
 shost_for_each_device(sdev, shost) {
+/* target removed before the device could be added */
+if (sdev-&amp;gt;sdev_state == SDEV_DEL)
+continue;
 if (!scsi_host_scan_allowed(shost) ||
     scsi_sysfs_add_sdev(sdev) != 0)
 __scsi_remove_device(sdev);
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 04c2a27..d1293b6 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -993,12 +993,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void scsi_remove_device(struct scsi_device *sdev)
 }
 EXPORT_SYMBOL(scsi_remove_device);
 
-static void __scsi_remove_target(struct scsi_target *starget)
+/**
+ * __scsi_remove_target - explicitly remove a target
+ * &amp;lt; at &amp;gt;starget: specific target to be removed
+ *
+ * This allows a target to be removed regardless of whether it has been
+ * async scanned or not.  scsi_remove_target() depends on
+ * device_for_each_child() and will not enumerate children that have not
+ * been through device_add() yet.
+ */
+void __scsi_remove_target(struct scsi_target *starget)
 {
 struct Scsi_Host *shost = dev_to_shost(starget-&amp;gt;dev.parent);
 unsigned long flags;
 struct scsi_device *sdev;
 
+if (!starget)
+return;
+
 spin_lock_irqsave(shost-&amp;gt;host_lock, flags);
 starget-&amp;gt;reap_ref++;
  restart:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1016,6 +1028,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __scsi_remove_target(struct scsi_target *starget)
 spin_unlock_irqrestore(shost-&amp;gt;host_lock, flags);
 scsi_target_reap(starget);
 }
+EXPORT_SYMBOL_GPL(__scsi_remove_target);
 
 static int __remove_child (struct device * dev, void * data)
 {
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index f7565fc..3afb38d 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1592,7 +1592,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int sas_rphy_add(struct sas_rphy *rphy)
 else
 lun = 0;
 
-scsi_scan_target(&amp;amp;rphy-&amp;gt;dev, 0, rphy-&amp;gt;scsi_target_id, lun, 0);
+rphy-&amp;gt;starget = scsi_scan_target(&amp;amp;rphy-&amp;gt;dev, 0, rphy-&amp;gt;scsi_target_id, lun, 0);
 }
 
 return 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1669,7 +1669,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; sas_rphy_remove(struct sas_rphy *rphy)
 
 switch (rphy-&amp;gt;identify.device_type) {
 case SAS_END_DEVICE:
-scsi_remove_target(dev);
+__scsi_remove_target(rphy-&amp;gt;starget);
+rphy-&amp;gt;starget = NULL;
 break;
 case SAS_EDGE_EXPANDER_DEVICE:
 case SAS_FANOUT_EXPANDER_DEVICE:
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 6efb2e1..7cd0d75 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -368,12 +368,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern int scsi_device_quiesce(struct scsi_device *sdev);
 extern void scsi_device_resume(struct scsi_device *sdev);
 extern void scsi_target_quiesce(struct scsi_target *);
 extern void scsi_target_resume(struct scsi_target *);
-extern void scsi_scan_target(struct device *parent, unsigned int channel,
-     unsigned int id, unsigned int lun, int rescan);
+extern struct scsi_target *scsi_scan_target(struct device *parent, unsigned int channel,
+    unsigned int id, unsigned int lun, int rescan);
 extern void scsi_target_reap(struct scsi_target *);
 extern void scsi_target_block(struct device *);
 extern void scsi_target_unblock(struct device *);
 extern void scsi_remove_target(struct device *);
+extern void __scsi_remove_target(struct scsi_target *starget);
 extern void int_to_scsilun(unsigned int, struct scsi_lun *);
 extern int scsilun_to_int(struct scsi_lun *);
 extern const char *scsi_device_state_name(enum scsi_device_state);
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 98b3a20..d98dcef 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -93,6 +93,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct sas_rphy {
 struct list_headlist;
 struct request_queue*q;
 u32scsi_target_id;
+struct scsi_target*starget;
 };
 
 #define dev_to_rphy(d) \

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Dan Williams</dc:creator>
    <dc:date>2012-05-25T07:55:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75322">
    <title>HHS5877 {Verify Your Ownership}</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75322</link>
    <description>&lt;pre&gt;Your email just earn 1,000,000GBP in the  HEINEKEN STAR PRIZE Offer. 
Your reference code is: HHS5877. To proceed, please reply to verify 
you are the owner of this E-mail Address.

Info Dept.
Heineken Star prize

**SERVER**
THIS MESSAGE HAS BENN VERIFIED AND IT IS THEREFORE AUTHENTIC. If found 
in Junk/Spam folder please move to inbox before you reply, this is to 
avoid loss of relevant information regarding details of procedures 
from the sender.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>heinekenprize&lt; at &gt;ua.fm</dc:creator>
    <dc:date>2012-05-24T16:47:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75315">
    <title>[PATCH 1/1] be2iscsi: fix dma free size mismatch regression</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75315</link>
    <description>&lt;pre&gt;From: Mike Christie &amp;lt;michaelc&amp;lt; at &amp;gt;cs.wisc.edu&amp;gt;

This patch should go into 3.5 fixes. The bug was added in the
patches for the 3.5 feature window.

As you can see from the patch I made a mistake. During
development I switched from passing a struct to the size of
the struct, but left the sizeof. This results in us allocating
4 bytes (sizeof(int)) but then calling pci_free_consistent
with the size of the struct.

Signed-off-by: Mike Christie &amp;lt;michaelc&amp;lt; at &amp;gt;cs.wisc.edu&amp;gt;
---
 drivers/scsi/be2iscsi/be_mgmt.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 01bb04c..2a09679 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -571,13 +571,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; free_cmd:
 static int mgmt_alloc_cmd_data(struct beiscsi_hba *phba, struct be_dma_mem *cmd,
        int iscsi_cmd, int size)
 {
-cmd-&amp;gt;va = pci_alloc_consistent(phba-&amp;gt;ctrl.pdev, sizeof(size),
-       &amp;amp;cmd-&amp;gt;dma);
+cmd-&amp;gt;va = pci_alloc_consistent(phba-&amp;gt;ctrl.pdev, size, &amp;amp;cmd-&amp;gt;dma);
 if (!cmd-&amp;gt;va) {
 SE_DEBUG(DBG_LVL_1, "Failed to allocate memory for if info\n");
 return -ENOMEM;
 }
-memset(cmd-&amp;gt;va, 0, sizeof(size));
+memset(cmd-&amp;gt;va, 0, size);
 cmd-&amp;gt;size = size;
 be_cmd_hdr_prepare(cmd-&amp;gt;va, CMD_SUBSYSTEM_ISCSI, iscsi_cmd, size);
 return 0;
&lt;/pre&gt;</description>
    <dc:creator>michaelc&lt; at &gt;cs.wisc.edu</dc:creator>
    <dc:date>2012-05-24T01:40:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75312">
    <title>GET BACK TO ME ASAP.</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75312</link>
    <description>&lt;pre&gt;Good day my beloved friend,

How are you and your lovely family doing today,i hope all is well?if so glory 
be to God,i have an urgent purposal for you, if interested kindly contact me on 
this e-mail (anna_kennedy_hood&amp;lt; at &amp;gt;hotmail.co.uk)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Mrs Anna Kennedy</dc:creator>
    <dc:date>2012-05-23T18:58:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75291">
    <title>CONTACT DR.RUBEN LEE</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75291</link>
    <description>&lt;pre&gt;
KINDLY FIND ATTACHED MESSAGE AND GET BACK TO ME&lt;/pre&gt;</description>
    <dc:creator>UCCCON</dc:creator>
    <dc:date>2012-05-23T07:57:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75285">
    <title>[PATCH v6 0/4] FCoE Sysfs</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75285</link>
    <description>&lt;pre&gt;v6: Resend, v5 was missing patch 4/4

v5: Resend to apply on current misc branch of scsi.git

* checkpatch.pl complains about patch 3/4. The lack of a final
  argument is a trick I took from scsi_transport_fc.c. I think
  that it is fine.

  ERROR: space prohibited before that close parenthesis ')'
  #369: FILE: drivers/scsi/fcoe/fcoe_sysfs.c:196:
  +     fcoe_fcf_private_show_function(field, format_string, sz, )\

* checkpatch.pl complains about patch 3/4. I attempted to add
  parenthesis around these macros, but I created more problems
  than I resolved. I am not sure what to do about this. I belive
  these were WARNs when this series was initially submitted.

  ERROR: Macros with complex values should be enclosed in parenthesis
  #378: FILE: drivers/scsi/fcoe/fcoe_sysfs.c:205:
  +#define fcoe_fcf_private_rd_attr_cast(field, format_string, sz, cast)\
  + fcoe_fcf_private_show_function(field, format_string, sz, (cast)) \
  + static FCOE_DEVICE_ATTR(fcf, field, S_IRUGO,          \
  +            show_fcoe_fcf_device_##field, NULL)

* checkpatch.pl complains about patch 4/4. This is just a WARN.
  I would fix this if I knew how to, but I don't think it should
  be a problem.

  WARNING: quoted string split across lines
  #502: FILE: drivers/scsi/fcoe/fcoe_ctlr.c:1021:
  +printk(KERN_ERR "Failed to allocate sysfs instance "
  +       "for FCF, fab 16.16llx mac pM\n",

v4: Minor fixes and cleanups

* Changed device_initialize/device_add to device_register
  and device_del to device_unregister. There was an imbalance
  because device_initialize was getting a reference that
  was not being released. With this update both fcoe_fcfs
  as well as fcoe_ctlrs are correctly released/free'd when
  they are to be removed from the system.

* Minor updates to commit messages so there are no
  references to 'fcoe_ctlr_attrs' and 'fcoe_fcf_attrs'
  which were both renamed in v3 of this series.

v3: Addressed Greg KH's second set of review comments

* Created a 'fcoe bus' with the fcoe_ctlr and fcoe_fcf
  instances as devices on the bus. Created bus_type(s)
  for both device types, with default attribute group
  sets for each. Now sysfs core adds/removes attributes
  which allowed the removal of sysfs_create_group calls
  before device_add. Updated Documentation/ accordingly.
  
* Renamed structures and APIs to make them less confusing.

   structs:
    fcoe_ctlr_attrs -&amp;gt; fcoe_ctlr_device
    fcoe_fcf_attrs -&amp;gt; fcoe_fcf_device

   functions:
    fcoe_ctlr_attrs_add -&amp;gt; fcoe_ctlr_device_add
    fcoe_ctlr_attrs_delete -&amp;gt; fcoe_ctlr_device_delete
    fcoe_fcf_attrs_add -&amp;gt; fcoe_fcf_device_add
    fcoe_fcf_attrs_delete -&amp;gt; fcoe_fcf_device_delete

* Removed extra get_device(parent) for both the
  fcoe_ctlr_device and fcoe_fcf_device.

* fixed 'unused variable' compilation warning that
  existed in v2.

* API symbols now exported with EXPORT_SYMBOL_GPL

* NOT ADDRESSED - idr usage vs. atomic incremeting of
  fcoe_ctlr and fcoe_fcf id enumeration. It was indicated
  that idr has not traditionally been used in drivers/scsi/.
  I will re-examine this if there is still heartburn.

---

v2: Addressed Greg KH's review comments

* moved fcoe_ctlr_attrs and fcoe_fcf_attrs attribute
  helper macros from fcoe_sysfs.h to fcoe_sysfs.c so
  that they don't temp developers to use them. They're
  intended to be used in attribute show/store routine
  generating macros, but not by drivers.

* Removed unnecessary put_device calls on parent devices.
  Also removed unnecessary de-initialization of pointers
  to parent and removed unnecessary zero'ing of memory
  before freeing it.

* Added Documentation/ABI/testing/sysfs-class-fcoe
  document.

* Changed simple_strtoul usage to kstrtoul to avoid
  checkpatch.pl warning that I missed before. There's
  a bunch of noise in checkpatch.pl due to an odd macro
  usage, but I think any remaining checkpatch.pl warnings
  are OK.

---

This patch series adds a sysfs layer to libfcoe. It adds
a sysfs instance for FIP controllers (a SW entity) and
discovered Fibre Channel Forwarders (FCFs), which are
simply FCoE switches.

The new sysfs code is used by any driver that currently
uses libfcoe, namely fcoe.ko and bnx2fc_fcoe.ko. Any other
FCoE capable device that wishes to use the high-level APIs
defined in fcoe_syfs.h may, without having to use the
the protocol processing portions of libfcoe.

The code borrows heavily from the FC Transport, but is
less complicated because it does not need to interact
with the SCSI layer directly.

I think one thing to consider with this series is that
drivers, such as traditional HBAs, which wish to use
this infrastructure will now need to depend on libfcoe.ko.
It was either this or create a superfluous kernel module;
I think libfcoe is an appropriate place for this code.

This series was created against scsi-misc + 9 patches
mailed by me to linux-scsi on 03/09/12. (Note that 10
patches were mailed, but that patch 01/10 will be dropped)

I'm not sure if there's somewhere I should cross-post
this for general sysfs review. I don't think I'm doing
anything odd; I added Greg K-H to the CC list to try and
get some sysfs eyes on this code.

---

Robert Love (4):
      fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member
      bnx2fc: Allocate fcoe_ctlr with bnx2fc_interface, not as a member
      libfcoe: Add fcoe_sysfs
      fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs


 Documentation/ABI/testing/sysfs-bus-fcoe |   77 +++
 drivers/scsi/bnx2fc/bnx2fc.h             |    7 
 drivers/scsi/bnx2fc/bnx2fc_els.c         |    2 
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c        |  171 +++++-
 drivers/scsi/bnx2fc/bnx2fc_hwi.c         |   39 +
 drivers/scsi/fcoe/Makefile               |    2 
 drivers/scsi/fcoe/fcoe.c                 |  200 +++++--
 drivers/scsi/fcoe/fcoe.h                 |    8 
 drivers/scsi/fcoe/fcoe_ctlr.c            |  159 +++++-
 drivers/scsi/fcoe/fcoe_sysfs.c           |  832 ++++++++++++++++++++++++++++++
 drivers/scsi/fcoe/fcoe_transport.c       |   13 
 include/scsi/fcoe_sysfs.h                |  124 ++++
 include/scsi/libfcoe.h                   |   27 +
 13 files changed, 1526 insertions(+), 135 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-fcoe
 create mode 100644 drivers/scsi/fcoe/fcoe_sysfs.c
 create mode 100644 include/scsi/fcoe_sysfs.h

&lt;/pre&gt;</description>
    <dc:creator>Robert Love</dc:creator>
    <dc:date>2012-05-23T02:06:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75280">
    <title>[PATCH v5 0/3] FCoE Sysfs</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75280</link>
    <description>&lt;pre&gt;v5: Resend to apply on current misc branch of scsi.git

* checkpatch.pl complains about patch 3/4. The lack of a final
  argument is a trick I took from scsi_transport_fc.c. I think
  that it is fine.

  ERROR: space prohibited before that close parenthesis ')'
  #369: FILE: drivers/scsi/fcoe/fcoe_sysfs.c:196:
  +     fcoe_fcf_private_show_function(field, format_string, sz, )\

* checkpatch.pl complains about patch 3/4. I attempted to add
  parenthesis around these macros, but I created more problems
  than I resolved. I am not sure what to do about this. I belive
  these were WARNs when this series was initially submitted.

  ERROR: Macros with complex values should be enclosed in parenthesis
  #378: FILE: drivers/scsi/fcoe/fcoe_sysfs.c:205:
  +#define fcoe_fcf_private_rd_attr_cast(field, format_string, sz, cast)\
  + fcoe_fcf_private_show_function(field, format_string, sz, (cast)) \
  + static FCOE_DEVICE_ATTR(fcf, field, S_IRUGO,          \
  +            show_fcoe_fcf_device_##field, NULL)

* checkpatch.pl complains about patch 4/4. This is just a WARN.
  I would fix this if I knew how to, but I don't think it should
  be a problem.

  WARNING: quoted string split across lines
  #502: FILE: drivers/scsi/fcoe/fcoe_ctlr.c:1021:
  +printk(KERN_ERR "Failed to allocate sysfs instance "
  +       "for FCF, fab 16.16llx mac pM\n",

v4: Minor fixes and cleanups

* Changed device_initialize/device_add to device_register
  and device_del to device_unregister. There was an imbalance
  because device_initialize was getting a reference that
  was not being released. With this update both fcoe_fcfs
  as well as fcoe_ctlrs are correctly released/free'd when
  they are to be removed from the system.

* Minor updates to commit messages so there are no
  references to 'fcoe_ctlr_attrs' and 'fcoe_fcf_attrs'
  which were both renamed in v3 of this series.

v3: Addressed Greg KH's second set of review comments

* Created a 'fcoe bus' with the fcoe_ctlr and fcoe_fcf
  instances as devices on the bus. Created bus_type(s)
  for both device types, with default attribute group
  sets for each. Now sysfs core adds/removes attributes
  which allowed the removal of sysfs_create_group calls
  before device_add. Updated Documentation/ accordingly.
  
* Renamed structures and APIs to make them less confusing.

   structs:
    fcoe_ctlr_attrs -&amp;gt; fcoe_ctlr_device
    fcoe_fcf_attrs -&amp;gt; fcoe_fcf_device

   functions:
    fcoe_ctlr_attrs_add -&amp;gt; fcoe_ctlr_device_add
    fcoe_ctlr_attrs_delete -&amp;gt; fcoe_ctlr_device_delete
    fcoe_fcf_attrs_add -&amp;gt; fcoe_fcf_device_add
    fcoe_fcf_attrs_delete -&amp;gt; fcoe_fcf_device_delete

* Removed extra get_device(parent) for both the
  fcoe_ctlr_device and fcoe_fcf_device.

* fixed 'unused variable' compilation warning that
  existed in v2.

* API symbols now exported with EXPORT_SYMBOL_GPL

* NOT ADDRESSED - idr usage vs. atomic incremeting of
  fcoe_ctlr and fcoe_fcf id enumeration. It was indicated
  that idr has not traditionally been used in drivers/scsi/.
  I will re-examine this if there is still heartburn.

---

v2: Addressed Greg KH's review comments

* moved fcoe_ctlr_attrs and fcoe_fcf_attrs attribute
  helper macros from fcoe_sysfs.h to fcoe_sysfs.c so
  that they don't temp developers to use them. They're
  intended to be used in attribute show/store routine
  generating macros, but not by drivers.

* Removed unnecessary put_device calls on parent devices.
  Also removed unnecessary de-initialization of pointers
  to parent and removed unnecessary zero'ing of memory
  before freeing it.

* Added Documentation/ABI/testing/sysfs-class-fcoe
  document.

* Changed simple_strtoul usage to kstrtoul to avoid
  checkpatch.pl warning that I missed before. There's
  a bunch of noise in checkpatch.pl due to an odd macro
  usage, but I think any remaining checkpatch.pl warnings
  are OK.

---

This patch series adds a sysfs layer to libfcoe. It adds
a sysfs instance for FIP controllers (a SW entity) and
discovered Fibre Channel Forwarders (FCFs), which are
simply FCoE switches.

The new sysfs code is used by any driver that currently
uses libfcoe, namely fcoe.ko and bnx2fc_fcoe.ko. Any other
FCoE capable device that wishes to use the high-level APIs
defined in fcoe_syfs.h may, without having to use the
the protocol processing portions of libfcoe.

The code borrows heavily from the FC Transport, but is
less complicated because it does not need to interact
with the SCSI layer directly.

I think one thing to consider with this series is that
drivers, such as traditional HBAs, which wish to use
this infrastructure will now need to depend on libfcoe.ko.
It was either this or create a superfluous kernel module;
I think libfcoe is an appropriate place for this code.

This series was created against scsi-misc + 9 patches
mailed by me to linux-scsi on 03/09/12. (Note that 10
patches were mailed, but that patch 01/10 will be dropped)

I'm not sure if there's somewhere I should cross-post
this for general sysfs review. I don't think I'm doing
anything odd; I added Greg K-H to the CC list to try and
get some sysfs eyes on this code.

---

Robert Love (3):
      fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member
      bnx2fc: Allocate fcoe_ctlr with bnx2fc_interface, not as a member
      libfcoe: Add fcoe_sysfs


 Documentation/ABI/testing/sysfs-bus-fcoe |   77 +++
 drivers/scsi/bnx2fc/bnx2fc.h             |    7 
 drivers/scsi/bnx2fc/bnx2fc_els.c         |    2 
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c        |  116 +++-
 drivers/scsi/bnx2fc/bnx2fc_hwi.c         |   39 +
 drivers/scsi/fcoe/Makefile               |    2 
 drivers/scsi/fcoe/fcoe.c                 |  137 +++--
 drivers/scsi/fcoe/fcoe.h                 |    8 
 drivers/scsi/fcoe/fcoe_sysfs.c           |  832 ++++++++++++++++++++++++++++++
 drivers/scsi/fcoe/fcoe_transport.c       |   13 
 include/scsi/fcoe_sysfs.h                |  124 ++++
 include/scsi/libfcoe.h                   |   10 
 12 files changed, 1249 insertions(+), 118 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-fcoe
 create mode 100644 drivers/scsi/fcoe/fcoe_sysfs.c
 create mode 100644 include/scsi/fcoe_sysfs.h

&lt;/pre&gt;</description>
    <dc:creator>Robert Love</dc:creator>
    <dc:date>2012-05-23T02:04:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75256">
    <title>[RFC V4 0/2] Add support for pci/non-pci probing for UFS</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75256</link>
    <description>&lt;pre&gt;The existing UFS driver is tightly bound to only pci specific devices.
It cannot work for non-pci devices.

"SCSI: UFS: Create separate UFS core and pci modules" patch splits the
ufs driver into core driver and pci probe driver.

"SCSI: UFS: Add platform support for ufs host controller" patch adds
support for the platform probing for non-pci devices

changes in v4:
-Rebased to the latest linux-next/master branch.
-Removed the Copyright string from the module probe function and
deleted redundant code from ufshcd-pltfm.c suspend/resume functions.

changes in v3:
-Modified the ufshcd.c ufshcd-pci.c ufshcd0pltfm.c to follow the
driver module initialization standard. suggested by venkatraman.

changes in v2:
-Reduced the number of patches from 4 to 2. merged the core and
pci probing modules as single patch. suggested by Christoph Hellwig.

changes in v1:
-Changes suggested by Namjae to split the driver as 3 independent
modules and retain the author's name in the files created by me.

Girish K S (2):
  SCSI: UFS: Create separate UFS core and pci modules
  SCSI: UFS: Add platform support for ufs host controller

 drivers/scsi/ufs/Kconfig        |   32 +++-
 drivers/scsi/ufs/Makefile       |    2 +
 drivers/scsi/ufs/ufs.h          |  103 +++++++++++
 drivers/scsi/ufs/ufshcd-pci.c   |  206 ++++++++++++++++++++++
 drivers/scsi/ufs/ufshcd-pltfm.c |  176 +++++++++++++++++++
 drivers/scsi/ufs/ufshcd.c       |  367 ++++++++++-----------------------------
 6 files changed, 608 insertions(+), 278 deletions(-)
 create mode 100644 drivers/scsi/ufs/ufshcd-pci.c
 create mode 100644 drivers/scsi/ufs/ufshcd-pltfm.c

&lt;/pre&gt;</description>
    <dc:creator>Girish K S</dc:creator>
    <dc:date>2012-05-22T11:33:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75251">
    <title>[PATCH] scsi: Fix dm-multipath starvation when scsi host is busy</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75251</link>
    <description>&lt;pre&gt;When a scsi host is kept busy by a dm-mpath device, other dm-mpath device
on the same host could be starved. For example:
http://www.redhat.com/archives/dm-devel/2012-May/msg00123.html

It happens because dm-mpath delays request submission when the underlying
scsi host is busy even if sdev is not busy.

For case like this, it is better to send the request down and let scsi do
appropriate starvation control over the shared resource.

Though it might seem odd to change scsi's definition of a LLD being "busy",
it is reasonable because scsi_lld_busy (and blk_lld_busy) was introduced
to provide a hint for request-based stacking driver (i.e. dm-multipath)
and dm-multipath is the only user of this function.

Reported-by: Bernd Schubert &amp;lt;bernd.schubert&amp;lt; at &amp;gt;itwm.fraunhofer.de&amp;gt;
Tested-by: Bernd Schubert &amp;lt;bernd.schubert&amp;lt; at &amp;gt;itwm.fraunhofer.de&amp;gt;
Signed-off-by: Jun'ichi Nomura &amp;lt;j-nomura&amp;lt; at &amp;gt;ce.jp.nec.com&amp;gt;
Cc: James Bottomley &amp;lt;James.Bottomley&amp;lt; at &amp;gt;HansenPartnership.com&amp;gt;
Cc: Mike Snitzer &amp;lt;snitzer&amp;lt; at &amp;gt;redhat.com&amp;gt;
Cc: Alasdair G Kergon &amp;lt;agk&amp;lt; at &amp;gt;redhat.com&amp;gt;
Cc: &amp;lt;stable&amp;lt; at &amp;gt;vger.kernel.org&amp;gt;
---
 drivers/scsi/scsi_lib.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5dfd749..0eb4602 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1378,16 +1378,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int scsi_lld_busy(struct request_queue *q)
 {
 struct scsi_device *sdev = q-&amp;gt;queuedata;
 struct Scsi_Host *shost;
-struct scsi_target *starget;
 
 if (!sdev)
 return 0;
 
 shost = sdev-&amp;gt;host;
-starget = scsi_target(sdev);
 
-if (scsi_host_in_recovery(shost) || scsi_host_is_busy(shost) ||
-    scsi_target_is_busy(starget) || scsi_device_is_busy(sdev))
+if (scsi_host_in_recovery(shost) || scsi_device_is_busy(sdev)) 
 return 1;
 
 return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Jun'ichi Nomura</dc:creator>
    <dc:date>2012-05-22T08:59:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75239">
    <title>[RFC PATCH v3 0/4]: block layer runtime pm</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75239</link>
    <description>&lt;pre&gt;Hi,

In August 2010, Jens and Alan discussed about "Runtime PM and the block
layer". http://marc.info/?t=128259108400001&amp;amp;r=1&amp;amp;w=2

Here are the RFC v3 patches that try to implement the ideas discussed.
Welcome to give it a try.

git pull git://git.kernel.org/pub/scm/linux/kernel/git/mlin/linux.git block_pm

The test steps, for example

# ls -l /sys/block/sda
/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda

# echo auto &amp;gt; /sys/devices/pci0000:00/0000:00:1f.2/ata1/power/control
# echo auto &amp;gt; /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/power/control
# echo 10000 &amp;gt; /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/power/autosuspend_delay_ms

Then you'll see sda is suspended after 10secs idle.

# cat /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/power/runtime_status
suspended

And if you do some IO, it will resume immediately.

v3:
- remove block layer suspend/resume callbacks
- add block layer runtime pm helper functions

v2:
- remove queue idle timer, use runtime pm core's auto suspend

Lin Ming (4):
      block: add a flag to identify PM request
      block: add runtime pm helpers
      block: implement runtime pm strategy
      [SCSI] sd: change to auto suspend mode

 block/blk-core.c           |   71 ++++++++++++++++++++++++++++++++++++++++++++
 block/elevator.c           |    9 +++++
 drivers/scsi/scsi_lib.c    |   25 +++++++++++++--
 drivers/scsi/scsi_pm.c     |   27 ++++++++++++----
 drivers/scsi/scsi_sysfs.c  |    2 +
 drivers/scsi/sd.c          |   19 ++++--------
 include/linux/blk_types.h  |    2 +
 include/linux/blkdev.h     |   13 ++++++++
 include/scsi/scsi_device.h |    4 ++
 9 files changed, 149 insertions(+), 23 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Lin Ming</dc:creator>
    <dc:date>2012-05-22T07:21:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75232">
    <title>[PATCH v3 5/5] st: raise device limit</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75232</link>
    <description>&lt;pre&gt;From: Jeff Mahoney &amp;lt;jeffm&amp;lt; at &amp;gt;suse.com&amp;gt;

The device limit of 128 tape drives was established in 2003 as a
significant increase from the 8 tape drives allowed previously.

We're seeing customer sites that between a large number of drives
and multipath are discovering more than 128 devices and running
into problems.

Now that we're not stuck having to store a pointer in array
and aren't limited by kmalloc failing on higher order allocs we can
lift the limit to fill the entire minor range based on the number
of modes.

Based on the current code, that's 2^17 devices.

Signed-off-by: Jeff Mahoney &amp;lt;jeffm&amp;lt; at &amp;gt;suse.com&amp;gt;
Signed-off-by: Lee Duncan &amp;lt;lduncan&amp;lt; at &amp;gt;suse.com&amp;gt;
---
 drivers/scsi/st.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 4456735..2092f93 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -77,7 +77,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct st_modedef {
 #define ST_MODE_SHIFT (7 - ST_NBR_MODE_BITS)
 #define ST_MODE_MASK ((ST_NBR_MODES - 1) &amp;lt;&amp;lt; ST_MODE_SHIFT)
 
-#define ST_MAX_TAPES 128
+#define ST_MAX_TAPES (1 &amp;lt;&amp;lt; (20 - (ST_NBR_MODE_BITS + 1)))
 #define ST_MAX_TAPE_ENTRIES  (ST_MAX_TAPES &amp;lt;&amp;lt; (ST_NBR_MODE_BITS + 1))
 
 /* The status related to each partition */
&lt;/pre&gt;</description>
    <dc:creator>Lee Duncan</dc:creator>
    <dc:date>2012-05-21T23:16:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75231">
    <title>[PATCH v3 4/5] st: clean up device file creation and removal</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75231</link>
    <description>&lt;pre&gt;From: Jeff Mahoney &amp;lt;jeffm&amp;lt; at &amp;gt;suse.com&amp;gt;

This patch cleans up the st device file creation and removal.

Signed-off-by: Jeff Mahoney &amp;lt;jeffm&amp;lt; at &amp;gt;suse.com&amp;gt;
Signed-off-by: Lee Duncan &amp;lt;lduncan&amp;lt; at &amp;gt;suse.com&amp;gt;
---
 drivers/scsi/st.c |  197 +++++++++++++++++++++++++----------------------------
 1 file changed, 91 insertions(+), 106 deletions(-)

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index a3718a5..f5d452e 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -193,7 +193,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int st_remove(struct device *);
 
 static int do_create_sysfs_files(void);
 static void do_remove_sysfs_files(void);
-static int do_create_class_files(struct scsi_tape *, int, int);
 
 static struct scsi_driver st_template = {
 .owner= THIS_MODULE,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3990,16 +3989,99 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct file_operations st_fops =
 .llseek =noop_llseek,
 };
 
+static int create_one_cdev(struct scsi_tape *tape, int mode, int rew)
+{
+int i, error;
+dev_t cdev_devno;
+struct cdev *cdev;
+struct device *dev;
+struct st_modedef *STm = &amp;amp;(tape-&amp;gt;modes[mode]);
+char name[10];
+int dev_num = tape-&amp;gt;index;
+
+cdev_devno = MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, rew));
+
+cdev = cdev_alloc();
+if (!cdev) {
+printk(KERN_ERR "st%d: out of memory. Device not attached.\n",
+       dev_num);
+error = -ENOMEM;
+goto out;
+}
+cdev-&amp;gt;owner = THIS_MODULE;
+cdev-&amp;gt;ops = &amp;amp;st_fops;
+
+error = cdev_add(cdev, cdev_devno, 1);
+if (error) {
+printk(KERN_ERR "st%d: Can't add %s-rewind mode %d\n",
+       dev_num, rew ? "non" : "auto", mode);
+printk(KERN_ERR "st%d: Device not attached.\n", dev_num);
+goto out_free;
+}
+STm-&amp;gt;cdevs[rew] = cdev;
+
+i = mode &amp;lt;&amp;lt; (4 - ST_NBR_MODE_BITS);
+snprintf(name, 10, "%s%s%s", rew ? "n" : "",
+ tape-&amp;gt;disk-&amp;gt;disk_name, st_formats[i]);
+
+dev = device_create(&amp;amp;st_sysfs_class, &amp;amp;tape-&amp;gt;device-&amp;gt;sdev_gendev,
+    cdev_devno, &amp;amp;tape-&amp;gt;modes[mode], "%s", name);
+if (IS_ERR(dev)) {
+printk(KERN_WARNING "st%d: device_create failed\n", dev_num);
+error = PTR_ERR(dev);
+goto out_free;
+}
+
+return 0;
+out_free:
+cdev_del(STm-&amp;gt;cdevs[rew]);
+STm-&amp;gt;cdevs[rew] = NULL;
+out:
+return error;
+}
+
+static int create_cdevs(struct scsi_tape *tape)
+{
+int mode, error;
+for (mode = 0; mode &amp;lt; ST_NBR_MODES; ++mode) {
+error = create_one_cdev(tape, mode, 0);
+if (error)
+return error;
+error = create_one_cdev(tape, mode, 1);
+if (error)
+return error;
+}
+
+error = sysfs_create_link(&amp;amp;tape-&amp;gt;device-&amp;gt;sdev_gendev.kobj,
+  &amp;amp;tape-&amp;gt;modes[0].cdevs[0]-&amp;gt;kobj, "tape");
+return 0;
+}
+
+static void remove_cdevs(struct scsi_tape *tape)
+{
+int mode, rew;
+sysfs_remove_link(&amp;amp;tape-&amp;gt;device-&amp;gt;sdev_gendev.kobj, "tape");
+for (mode=0; mode &amp;lt; ST_NBR_MODES; mode++) {
+struct st_modedef *STm = &amp;amp;(tape-&amp;gt;modes[mode]);
+for (rew=0; rew &amp;lt; 2; rew++) {
+if (STm-&amp;gt;cdevs[rew]) {
+dev_t devno = STm-&amp;gt;cdevs[rew]-&amp;gt;dev;
+device_destroy(&amp;amp;st_sysfs_class, devno);
+cdev_del(STm-&amp;gt;cdevs[rew]);
+}
+}
+}
+}
+
 static int st_probe(struct device *dev)
 {
 struct scsi_device *SDp = to_scsi_device(dev);
 struct gendisk *disk = NULL;
-struct cdev *cdev = NULL;
 struct scsi_tape *tpnt = NULL;
 struct st_modedef *STm;
 struct st_partstat *STps;
 struct st_buffer *buffer;
-int i, j, mode, dev_num, error;
+int i, dev_num, error;
 char *stp;
 
 if (SDp-&amp;gt;type != TYPE_TAPE)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4126,36 +4208,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int st_probe(struct device *dev)
 
 dev_set_drvdata(dev, tpnt);
 
-for (mode = 0; mode &amp;lt; ST_NBR_MODES; ++mode) {
-STm = &amp;amp;(tpnt-&amp;gt;modes[mode]);
-for (j=0; j &amp;lt; 2; j++) {
-cdev = cdev_alloc();
-if (!cdev) {
-printk(KERN_ERR
-       "st%d: out of memory. Device not attached.\n",
-       dev_num);
-cdev_del(cdev);
-goto out_free_tape;
-}
-cdev-&amp;gt;owner = THIS_MODULE;
-cdev-&amp;gt;ops = &amp;amp;st_fops;
-
-error = cdev_add(cdev,
- MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, j)),
- 1);
-if (error) {
-printk(KERN_ERR "st%d: Can't add %s-rewind mode %d\n",
-       dev_num, j ? "non" : "auto", mode);
-printk(KERN_ERR "st%d: Device not attached.\n", dev_num);
-goto out_free_tape;
-}
-STm-&amp;gt;cdevs[j] = cdev;
-
-}
-error = do_create_class_files(tpnt, dev_num, mode);
-if (error)
-goto out_free_tape;
-}
+error = create_cdevs(tpnt);
+if (error)
+goto out_remove_devs;
 scsi_autopm_put_device(SDp);
 
 sdev_printk(KERN_NOTICE, SDp,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4166,20 +4221,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int st_probe(struct device *dev)
 
 return 0;
 
-out_free_tape:
-sysfs_remove_link(&amp;amp;tpnt-&amp;gt;device-&amp;gt;sdev_gendev.kobj,
-  "tape");
-for (mode=0; mode &amp;lt; ST_NBR_MODES; mode++) {
-STm = &amp;amp;(tpnt-&amp;gt;modes[mode]);
-for (j=0; j &amp;lt; 2; j++) {
-if (STm-&amp;gt;cdevs[j]) {
-device_destroy(&amp;amp;st_sysfs_class,
-       MKDEV(SCSI_TAPE_MAJOR,
-     TAPE_MINOR(i, mode, j)));
-cdev_del(STm-&amp;gt;cdevs[j]);
-}
-}
-}
+out_remove_devs:
+remove_cdevs(tpnt);
 out_put_index:
 idr_remove(&amp;amp;st_index_idr, dev_num);
 out_put_disk:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4195,24 +4238,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out:
 static int st_remove(struct device *dev)
 {
 struct scsi_tape *tpnt = dev_get_drvdata(dev);
-int rew, mode;
-dev_t cdev_devno;
-struct cdev *cdev;
 
 scsi_autopm_get_device(tpnt-&amp;gt;device);
 
-sysfs_remove_link(&amp;amp;tpnt-&amp;gt;device-&amp;gt;sdev_gendev.kobj, "tape");
-for (mode = 0; mode &amp;lt; ST_NBR_MODES; ++mode) {
-for (rew=0; rew &amp;lt; 2; rew++) {
-cdev = tpnt-&amp;gt;modes[mode].cdevs[rew];
-if (!cdev)
-continue;
-cdev_devno = cdev-&amp;gt;dev;
-device_destroy(&amp;amp;st_sysfs_class, cdev_devno);
-cdev_del(tpnt-&amp;gt;modes[mode].cdevs[rew]);
-tpnt-&amp;gt;modes[mode].cdevs[rew] = NULL;
-}
-}
+remove_cdevs(tpnt);
 
 mutex_lock(&amp;amp;st_ref_mutex);
 kref_put(&amp;amp;tpnt-&amp;gt;kref, scsi_tape_release);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4458,50 +4487,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct device_attribute st_dev_attrs[] = {
 __ATTR_NULL,
 };
 
-static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
-{
-int i, rew, error;
-char name[10];
-struct device *st_class_member;
-
-for (rew=0; rew &amp;lt; 2; rew++) {
-/* Make sure that the minor numbers corresponding to the four
-   first modes always get the same names */
-i = mode &amp;lt;&amp;lt; (4 - ST_NBR_MODE_BITS);
-snprintf(name, 10, "%s%s%s", rew ? "n" : "",
- STp-&amp;gt;disk-&amp;gt;disk_name, st_formats[i]);
-st_class_member =
-device_create(&amp;amp;st_sysfs_class,
-      &amp;amp;STp-&amp;gt;device-&amp;gt;sdev_gendev,
-      MKDEV(SCSI_TAPE_MAJOR,
-    TAPE_MINOR(dev_num, mode, rew)),
-      &amp;amp;STp-&amp;gt;modes[mode], "%s", name);
-if (IS_ERR(st_class_member)) {
-printk(KERN_WARNING "st%d: device_create failed\n",
-       dev_num);
-error = PTR_ERR(st_class_member);
-goto out;
-}
-
-if (mode == 0 &amp;amp;&amp;amp; rew == 0) {
-error = sysfs_create_link(&amp;amp;STp-&amp;gt;device-&amp;gt;sdev_gendev.kobj,
-  &amp;amp;st_class_member-&amp;gt;kobj,
-  "tape");
-if (error) {
-printk(KERN_ERR
-       "st%d: Can't create sysfs link from SCSI device.\n",
-       dev_num);
-goto out;
-}
-}
-}
-
-return 0;
-
-out:
-return error;
-}
-
 /* The following functions may be useful for a larger audience. */
 static int sgl_map_user_pages(struct st_buffer *STbp,
       const unsigned int max_pages, unsigned long uaddr,
&lt;/pre&gt;</description>
    <dc:creator>Lee Duncan</dc:creator>
    <dc:date>2012-05-21T23:15:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75228">
    <title>[PATCH v3 1/5] st: Use static class attributes</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75228</link>
    <description>&lt;pre&gt;From: Jeff Mahoney &amp;lt;jeffm&amp;lt; at &amp;gt;suse.com&amp;gt;

st currently sets up and tears down class attributes manually for
every tape drive in the system. This patch uses a statically defined
class with class attributes to let the device core do it for us.

Signed-off-by: Jeff Mahoney &amp;lt;jeffm&amp;lt; at &amp;gt;suse.com&amp;gt;
Signed-off-by: Lee Duncan &amp;lt;lduncan&amp;lt; at &amp;gt;suse.com&amp;gt;
---
 drivers/scsi/st.c |   74 ++++++++++++++++++++++++-----------------------------
 1 file changed, 33 insertions(+), 41 deletions(-)

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index e41998c..662f9a0 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -84,7 +84,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int try_wdio = 1;
 static int st_dev_max;
 static int st_nr_dev;
 
-static struct class *st_sysfs_class;
+static struct class st_sysfs_class;
+static struct device_attribute st_dev_attrs[];
 
 MODULE_AUTHOR("Kai Makisara");
 MODULE_DESCRIPTION("SCSI tape (st) driver");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4195,7 +4196,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out_free_tape:
 if (STm-&amp;gt;cdevs[j]) {
 if (cdev == STm-&amp;gt;cdevs[j])
 cdev = NULL;
-device_destroy(st_sysfs_class,
+device_destroy(&amp;amp;st_sysfs_class,
        MKDEV(SCSI_TAPE_MAJOR,
      TAPE_MINOR(i, mode, j)));
 cdev_del(STm-&amp;gt;cdevs[j]);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4236,7 +4237,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int st_remove(struct device *dev)
   "tape");
 for (mode = 0; mode &amp;lt; ST_NBR_MODES; ++mode) {
 for (j=0; j &amp;lt; 2; j++) {
-device_destroy(st_sysfs_class,
+device_destroy(&amp;amp;st_sysfs_class,
        MKDEV(SCSI_TAPE_MAJOR,
      TAPE_MINOR(i, mode, j)));
 cdev_del(tpnt-&amp;gt;modes[mode].cdevs[j]);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4283,6 +4284,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void scsi_tape_release(struct kref *kref)
 return;
 }
 
+static struct class st_sysfs_class = {
+.name = "scsi_tape",
+.dev_attrs = st_dev_attrs,
+};
+
 static int __init init_st(void)
 {
 int err;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4292,10 +4298,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init init_st(void)
 printk(KERN_INFO "st: Version %s, fixed bufsize %d, s/g segs %d\n",
 verstr, st_fixed_buffer_size, st_max_sg_segs);
 
-st_sysfs_class = class_create(THIS_MODULE, "scsi_tape");
-if (IS_ERR(st_sysfs_class)) {
-printk(KERN_ERR "Unable create sysfs class for SCSI tapes\n");
-return PTR_ERR(st_sysfs_class);
+err = class_register(&amp;amp;st_sysfs_class);
+if (err) {
+printk(KERN_ERR "Unable register sysfs class for SCSI tapes\n");
+return err;
 }
 
 err = register_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4322,7 +4328,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; err_chrdev:
 unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
  ST_MAX_TAPE_ENTRIES);
 err_class:
-class_destroy(st_sysfs_class);
+class_unregister(&amp;amp;st_sysfs_class);
 return err;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4332,7 +4338,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __exit exit_st(void)
 scsi_unregister_driver(&amp;amp;st_template.gendrv);
 unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
  ST_MAX_TAPE_ENTRIES);
-class_destroy(st_sysfs_class);
+class_unregister(&amp;amp;st_sysfs_class);
 kfree(scsi_tapes);
 printk(KERN_INFO "st: Unloaded.\n");
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4405,10 +4411,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void do_remove_sysfs_files(void)
 driver_remove_file(sysfs, &amp;amp;driver_attr_try_direct_io);
 }
 
-
 /* The sysfs simple class interface */
 static ssize_t
-st_defined_show(struct device *dev, struct device_attribute *attr, char *buf)
+defined_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
 struct st_modedef *STm = dev_get_drvdata(dev);
 ssize_t l = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4417,10 +4422,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_defined_show(struct device *dev, struct device_attribute *attr, char *buf)
 return l;
 }
 
-DEVICE_ATTR(defined, S_IRUGO, st_defined_show, NULL);
-
 static ssize_t
-st_defblk_show(struct device *dev, struct device_attribute *attr, char *buf)
+default_blksize_show(struct device *dev, struct device_attribute *attr,
+     char *buf)
 {
 struct st_modedef *STm = dev_get_drvdata(dev);
 ssize_t l = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4429,10 +4433,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_defblk_show(struct device *dev, struct device_attribute *attr, char *buf)
 return l;
 }
 
-DEVICE_ATTR(default_blksize, S_IRUGO, st_defblk_show, NULL);
 
 static ssize_t
-st_defdensity_show(struct device *dev, struct device_attribute *attr, char *buf)
+default_density_show(struct device *dev, struct device_attribute *attr,
+     char *buf)
 {
 struct st_modedef *STm = dev_get_drvdata(dev);
 ssize_t l = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4443,11 +4447,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_defdensity_show(struct device *dev, struct device_attribute *attr, char *buf)
 return l;
 }
 
-DEVICE_ATTR(default_density, S_IRUGO, st_defdensity_show, NULL);
-
 static ssize_t
-st_defcompression_show(struct device *dev, struct device_attribute *attr,
-       char *buf)
+default_compression_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
 {
 struct st_modedef *STm = dev_get_drvdata(dev);
 ssize_t l = 0;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4456,10 +4458,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_defcompression_show(struct device *dev, struct device_attribute *attr,
 return l;
 }
 
-DEVICE_ATTR(default_compression, S_IRUGO, st_defcompression_show, NULL);
-
 static ssize_t
-st_options_show(struct device *dev, struct device_attribute *attr, char *buf)
+options_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
 struct st_modedef *STm = dev_get_drvdata(dev);
 struct scsi_tape *STp;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4498,7 +4498,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_options_show(struct device *dev, struct device_attribute *attr, char *buf)
 return l;
 }
 
-DEVICE_ATTR(options, S_IRUGO, st_options_show, NULL);
+static struct device_attribute st_dev_attrs[] = {
+__ATTR_RO(defined),
+__ATTR_RO(default_blksize),
+__ATTR_RO(default_density),
+__ATTR_RO(default_compression),
+__ATTR_RO(options),
+__ATTR_NULL,
+};
 
 static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4513,7 +4520,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
 snprintf(name, 10, "%s%s%s", rew ? "n" : "",
  STp-&amp;gt;disk-&amp;gt;disk_name, st_formats[i]);
 st_class_member =
-device_create(st_sysfs_class, &amp;amp;STp-&amp;gt;device-&amp;gt;sdev_gendev,
+device_create(&amp;amp;st_sysfs_class,
+      &amp;amp;STp-&amp;gt;device-&amp;gt;sdev_gendev,
       MKDEV(SCSI_TAPE_MAJOR,
     TAPE_MINOR(dev_num, mode, rew)),
       &amp;amp;STp-&amp;gt;modes[mode], "%s", name);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4524,22 +4532,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
 goto out;
 }
 
-error = device_create_file(st_class_member,
-   &amp;amp;dev_attr_defined);
-if (error) goto out;
-error = device_create_file(st_class_member,
-   &amp;amp;dev_attr_default_blksize);
-if (error) goto out;
-error = device_create_file(st_class_member,
-   &amp;amp;dev_attr_default_density);
-if (error) goto out;
-error = device_create_file(st_class_member,
-   &amp;amp;dev_attr_default_compression);
-if (error) goto out;
-error = device_create_file(st_class_member,
-   &amp;amp;dev_attr_options);
-if (error) goto out;
-
 if (mode == 0 &amp;amp;&amp;amp; rew == 0) {
 error = sysfs_create_link(&amp;amp;STp-&amp;gt;device-&amp;gt;sdev_gendev.kobj,
   &amp;amp;st_class_member-&amp;gt;kobj,
&lt;/pre&gt;</description>
    <dc:creator>Lee Duncan</dc:creator>
    <dc:date>2012-05-21T23:14:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75226">
    <title>[GIT PULL] usb-gadget target merge for 3.5-rc1</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75226</link>
    <description>&lt;pre&gt;Hi Linus,

As promised, here is the pull request for Sebastian's usb-gadget target
UASP / BOT driver for v3.5-rc1.  This code has been in linux-next for a
number of weeks, and is now ready for an initial merge.

Please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git usb-target-merge

This fabric uses the target framework to provide a usb gadget
device.  This gadget supports the USB Attached SCSI Protocol (UASP)
and Bulk Only Transfers (BOT or BBB). BOT is the primary interface,
UAS is the alternative interface.

Note this series is dependent upon a single target core patch for adding
se_cmd-&amp;gt;unknown_data_length in target-pending/for-next, that went out in
the first pull request yesterday:

[GIT PULL] target for-next v3.5-rc1 updates + new drivers merge status
http://www.spinics.net/lists/target-devel/msg02529.html

Kudos to Sebastian for making this driver happen so easily, and for his
patches to improve usb-core and target core along the way to his goal.
Also thanks to Felipe + Greg-KH for their help in getting this driver
ready for mainline.

Thanks!

--nab

Signed-off-by: Sebastian Andrzej Siewior &amp;lt;bigeasy&amp;lt; at &amp;gt;linutronix.de&amp;gt;
Acked-by: Felipe Balbi &amp;lt;balbi&amp;lt; at &amp;gt;ti.com&amp;gt;
Cc: Alan Stern &amp;lt;stern&amp;lt; at &amp;gt;rowland.harvard.edu&amp;gt;
Cc: Christoph Hellwig &amp;lt;hch&amp;lt; at &amp;gt;lst.de&amp;gt;
Cc: Greg KH &amp;lt;gregkh&amp;lt; at &amp;gt;linuxfoundation.org&amp;gt;
Signed-off-by: Nicholas Bellinger &amp;lt;nab&amp;lt; at &amp;gt;linux-iscsi.org&amp;gt;

Sebastian Andrzej Siewior (1):
  usb-gadget: Initial merge of target module for UASP + BOT

 drivers/usb/gadget/Kconfig          |   10 +
 drivers/usb/gadget/Makefile         |    2 +
 drivers/usb/gadget/tcm_usb_gadget.c | 2480 +++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/tcm_usb_gadget.h |  146 ++
 4 files changed, 2638 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/gadget/tcm_usb_gadget.c
 create mode 100644 drivers/usb/gadget/tcm_usb_gadget.h


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Nicholas A. Bellinger</dc:creator>
    <dc:date>2012-05-21T23:08:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.scsi/75203">
    <title>[PATCH] [SCSI] ufs: fix potential NULL pointer dereferencing error in ufshcd_probe.</title>
    <link>http://comments.gmane.org/gmane.linux.scsi/75203</link>
    <description>&lt;pre&gt;Avoid dereferencing a NULL pointer if scsi_host_alloc is failed.

Signed-off-by: Namjae Jeon &amp;lt;linkinjeon&amp;lt; at &amp;gt;gmail.com&amp;gt;
Acked-by: Santosh Y &amp;lt;santoshsy&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 drivers/scsi/ufs/ufshcd.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index e47a0da..58f4ba6 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1838,7 +1838,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ufshcd_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 err = pci_request_regions(pdev, UFSHCD);
 if (err &amp;lt; 0) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "request regions failed\n");
-goto out_disable;
+goto out_host_put;
 }
 
 hba-&amp;gt;mmio_base = pci_ioremap_bar(pdev, 0);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1927,8 +1927,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out_iounmap:
 iounmap(hba-&amp;gt;mmio_base);
 out_release_regions:
 pci_release_regions(pdev);
-out_disable:
+out_host_put:
 scsi_host_put(host);
+out_disable:
 pci_clear_master(pdev);
 pci_disable_device(pdev);
 out_error:
&lt;/pre&gt;</description>
    <dc:creator>Namjae Jeon</dc:creator>
    <dc:date>2012-05-21T14:35:36</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.scsi">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.scsi</link>
  </textinput>
</rdf:RDF>

