<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/misc/enclosure.c, branch v4.4.89</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.89</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.89'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-07-27T22:06:04+00:00</updated>
<entry>
<title>scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.</title>
<updated>2017-07-27T22:06:04+00:00</updated>
<author>
<name>Maurizio Lombardi</name>
<email>mlombard@redhat.com</email>
</author>
<published>2017-06-27T09:53:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8045fe0a208c8d2233a42465cb662b194c5740ab'/>
<id>urn:sha1:8045fe0a208c8d2233a42465cb662b194c5740ab</id>
<content type='text'>
commit 62e62ffd95539b9220894a7900a619e0f3ef4756 upstream.

The enclosure_add_device() function should fail if it can't create the
relevant sysfs links.

Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Tested-by: Douglas Miller &lt;dougmill@linux.vnet.ibm.com&gt;
Acked-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>enclosure: fix WARN_ON removing an adapter in multi-path devices</title>
<updated>2015-03-31T05:53:36+00:00</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2015-03-18T22:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11e52a699afff576606ceb6cf697270459f1a4aa'/>
<id>urn:sha1:11e52a699afff576606ceb6cf697270459f1a4aa</id>
<content type='text'>
We have peculiar problems with multi-path and enclosures: physically, we know
each bay can only be occupied by a single disk device.  However in multi-path,
it appears we have many (because each path to the device appears in Linux as a
different kernel device).  We try to fix this by only having the last seen
device show up in the bay.

Sysfs gets very annoyed if we try to manipulate links when the kobject sysfs
directory (kobj.sd) doesn't exist and drops a huge WARN_ON which most users
panic and report an oops for.  This happens on a few path removal situations
and IBM reports seeing it when one of their multi-path adapters is removed.

Add a check to enclosure device removal for the existence the sysfs directory
containing both the forward and back links so that the remnants (if any) get
removed in either direction but no scary warnings are dumped.

Reported-by: Wen Xiong &lt;wenxiong@linux.vnet.ibm.com&gt;
Tested-by: Wen Xiong &lt;wenxiong@linux.vnet.ibm.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>ses: Add power_status to SES device slot</title>
<updated>2015-01-09T14:44:19+00:00</updated>
<author>
<name>Song Liu</name>
<email>songliubraving@fb.com</email>
</author>
<published>2014-12-30T22:46:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08024885a2a3ed432716e9d50046a620a5b2df05'/>
<id>urn:sha1:08024885a2a3ed432716e9d50046a620a5b2df05</id>
<content type='text'>
Add power_status to SES device slot, so we can power on/off the
HDDs behind the enclosure.

Check firmware status in ses_set_* before sending control pages to
firmware.

Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>ses: add reliable slot attribute</title>
<updated>2015-01-09T14:44:19+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2014-12-30T22:46:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=921ce7f5786052749a22a75780f5ce1a456bcdc6'/>
<id>urn:sha1:921ce7f5786052749a22a75780f5ce1a456bcdc6</id>
<content type='text'>
The name provided by firmware is in a vendor specific format, publish
the slot number to have a reliable mechanism for identifying slots
across firmware implementations.  If the enclosure does not provide a
slot number fallback to the component number which is guaranteed unique,
and usually mirrors the slot number.

Cleaned up the unused ses_component.desc in the process.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>ses: add enclosure logical id</title>
<updated>2015-01-09T14:44:18+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2014-12-30T22:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=967f7bab0eaaa74d7d01a56d45aa309f78fb87dd'/>
<id>urn:sha1:967f7bab0eaaa74d7d01a56d45aa309f78fb87dd</id>
<content type='text'>
Export the NAA logical id for the enclosure.  This is optionally
available from the sas_transport_class, but it is really a property of
the enclosure.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>ses: close potential registration race</title>
<updated>2015-01-09T14:44:17+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2014-12-30T22:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed09dcc8bd7fe0991af7737e675996cbd022f38f'/>
<id>urn:sha1:ed09dcc8bd7fe0991af7737e675996cbd022f38f</id>
<content type='text'>
The slot and address fields have a small window of instability when
userspace can read them before initialization. Separate
enclosure_component
allocation from registration.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Reviewed-by: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>enclosure: handle non-unique element descriptors</title>
<updated>2014-11-12T10:15:55+00:00</updated>
<author>
<name>Markus Stockhausen</name>
<email>stockhausen@collogia.de</email>
</author>
<published>2014-10-04T13:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2fd76e6f60ce438e98512236138a3527ad6a736'/>
<id>urn:sha1:d2fd76e6f60ce438e98512236138a3527ad6a736</id>
<content type='text'>
Some SES devices give non-unique Element Descriptors as part of the
Element Descriptor diag page. Since we use these for creating sysfs
entries, they need to be unique. The specification doesn't require
these to be unique.

Eg:
$ sg_ses -p 7 /dev/sg0
  FTS CORP  TXS6_SAS20BPX12   0500
    enclosure services device
Element descriptor In diagnostic page:
  generation code: 0x0
  element descriptor by type list
    Element type: Array device, subenclosure id: 0
      Overall descriptor: ArrayDevicesInSubEnclsr0
      Element 1 descriptor: ArrayDevice00
      Element 2 descriptor: ArrayDevice01
      Element 3 descriptor: ArrayDevice02
      Element 4 descriptor: ArrayDevice03
      Element 5 descriptor: ArrayDevice03
      Element 6 descriptor: ArrayDevice03
      Element 7 descriptor: ArrayDevice03
      Element 8 descriptor: ArrayDevice03
      Element 9 descriptor: ArrayDevice03
      Element 10 descriptor: ArrayDevice03
      Element 11 descriptor: ArrayDevice03
      Element 12 descriptor: ArrayDevice03

Based on http://thread.gmane.org/gmane.linux.scsi/69289. This
version implements James' ideas about the naming convention

Signed-off-by: Markus Stockhausen &lt;stockhausen@collogia.de&gt;
Acked-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] enclosure: fix WARN_ON in dual path device removing</title>
<updated>2013-12-02T19:13:14+00:00</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2013-11-15T22:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1470c7bf3a4676e62e4c0fb204e339399eb5c59'/>
<id>urn:sha1:a1470c7bf3a4676e62e4c0fb204e339399eb5c59</id>
<content type='text'>
Bug report from: wenxiong@linux.vnet.ibm.com

The issue is happened in dual controller configuration. We got the
sysfs warnings when rmmod the ipr module.

enclosure_unregister() in drivers/msic/enclosure.c, call device_unregister()
for each componment deivce, device_unregister() -&gt;device_del()-&gt;kobject_del()
-&gt;sysfs_remove_dir(). In sysfs_remove_dir(), set kobj-&gt;sd = NULL.

For each componment device,
enclosure_component_release()-&gt;enclosure_remove_links()-&gt;sysfs_remove_link()
in which checking kobj-&gt;sd again, it has been set as NULL when doing
device_unregister. So we saw all these sysfs WARNING.

Tested-by: wenxiong@linux.vnet.ibm.com
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>enclosure: convert class code to use dev_groups</title>
<updated>2013-07-24T22:39:04+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-24T22:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=899826f16a034f1ab6d23cd5b60cd113eaefad19'/>
<id>urn:sha1:899826f16a034f1ab6d23cd5b60cd113eaefad19</id>
<content type='text'>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the enclosure class code to use
the correct field.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] enclosure: fix error path - actually return ERR_PTR() on error</title>
<updated>2010-07-27T17:03:48+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@suse.de</email>
</author>
<published>2010-03-12T22:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a91c1be21704113b023919826c6d531da46656ef'/>
<id>urn:sha1:a91c1be21704113b023919826c6d531da46656ef</id>
<content type='text'>
we also need to clean up and free the cdev.

Reported-by: Jani Nikula &lt;ext-jani.1.nikula@nokia.com&gt;
Cc: Stable Tree &lt;stable@kernel.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
</feed>
