summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_discover.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2006-08-10 19:19:47 -0700
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 11:12:53 -0500
commitfa1c1e8f1ece48c7baa3ba529bfd0d10a0bdf4eb (patch)
tree8de54ce8b590c720f528c511c2434e71abd34f0c /drivers/scsi/libsas/sas_discover.c
parent8b4a40809e5330c9da5d20107d693d92d73b31dc (diff)
downloadtalos-op-linux-fa1c1e8f1ece48c7baa3ba529bfd0d10a0bdf4eb.tar.gz
talos-op-linux-fa1c1e8f1ece48c7baa3ba529bfd0d10a0bdf4eb.zip
[SCSI] Add SATA support to libsas
Hook the scsi_host_template functions in libsas to delegate functionality to libata when appropriate. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Misc code changes and merge fixes and update for libata->drivers/ata move Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_discover.c')
-rw-r--r--drivers/scsi/libsas/sas_discover.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index a65598b1e536..5252143b6297 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -255,6 +255,7 @@ static int sas_get_port_device(struct asd_sas_port *port)
switch (dev->dev_type) {
case SAS_END_DEV:
+ case SATA_DEV:
rphy = sas_end_device_alloc(port->port);
break;
case EDGE_DEV:
@@ -265,7 +266,6 @@ static int sas_get_port_device(struct asd_sas_port *port)
rphy = sas_expander_alloc(port->port,
SAS_FANOUT_EXPANDER_DEVICE);
break;
- case SATA_DEV:
default:
printk("ERROR: Unidentified device type %d\n", dev->dev_type);
rphy = NULL;
@@ -480,7 +480,14 @@ cont1:
present.
sas_satl_register_dev(dev);
*/
- return 0;
+
+ sas_fill_in_rphy(dev, dev->rphy);
+
+ res = sas_rphy_add(dev->rphy);
+ if (res)
+ goto out_err;
+
+ return res;
out_err:
dev->sata_dev.identify_packet_device = NULL;
dev->sata_dev.identify_device = NULL;
OpenPOWER on IntegriCloud