All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix the problem of SATA devices within SAS enclosures
@ 2015-12-09 19:10 James Bottomley
  2015-12-09 19:12 ` [PATCH 1/3] scsi_transport_sas: add is_sas_attached() function James Bottomley
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: James Bottomley @ 2015-12-09 19:10 UTC (permalink / raw)
  To: linux-scsi

A big use of SAS enclosures is actually to hold SATA devices.  Right at
the moment, the ses enclosure system doesn't recognize SATA devices.
The reason for this is that SAS actually makes up an endpoint address
for a SATA device since SATA doesn't have an addressing scheme.  The
problem this causes is that the made up SAS address doesn't match the
SATA NAA identifier in VPD page 0x83, so the address for the device the
enclosure reports never matches.

We can fix this by using the SAS transport class to give us the actual
end point address instead of using the identity VPD page.  This ensures
SATA devices are always correctly matched at the expense of pulling in
all the SAS transport code.  Instead of making ses depend on the SAS
transport class, I've introduced an is_sas_attached() function that will
allow us to compile out the code if the kernel isn't built with SAS.  If
anyone ever gets around to doing FC enclosures, they should probably be
done in the same way.

James

---

James Bottomley (3):
  scsi_transport_sas: add is_sas_attached() function
  scsi_transport_sas: add function to get SAS endpoint address
  ses: fix discovery of SATA devices in SAS enclosures

 drivers/scsi/scsi_transport_sas.c |   30 ++++++++++++++++++++++++++++++
 drivers/scsi/ses.c                |   22 ++++------------------
 include/scsi/scsi_transport_sas.h |   10 ++++++++++
 3 files changed, 44 insertions(+), 18 deletions(-)



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-12-15 10:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09 19:10 [PATCH 0/3] Fix the problem of SATA devices within SAS enclosures James Bottomley
2015-12-09 19:12 ` [PATCH 1/3] scsi_transport_sas: add is_sas_attached() function James Bottomley
2015-12-15 10:16   ` Hannes Reinecke
2015-12-09 19:13 ` [PATCH 2/3] scsi_transport_sas: add function to get SAS endpoint address James Bottomley
2015-12-15 10:17   ` Hannes Reinecke
2015-12-09 19:14 ` [PATCH 3/3] ses: fix discovery of SATA devices in SAS enclosures James Bottomley
2015-12-09 20:38   ` kbuild test robot
2015-12-09 20:52     ` James Bottomley
2015-12-09 20:56   ` [PATCH v2 " James Bottomley
2015-12-15 10:17     ` Hannes Reinecke

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.