aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_discover.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2006-08-10 22:19:47 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 12:12:53 -0400
commitfa1c1e8f1ece48c7baa3ba529bfd0d10a0bdf4eb (patch)
tree8de54ce8b590c720f528c511c2434e71abd34f0c /drivers/scsi/libsas/sas_discover.c
parent8b4a40809e5330c9da5d20107d693d92d73b31dc (diff)
[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)
255 255
256 switch (dev->dev_type) { 256 switch (dev->dev_type) {
257 case SAS_END_DEV: 257 case SAS_END_DEV:
258 case SATA_DEV:
258 rphy = sas_end_device_alloc(port->port); 259 rphy = sas_end_device_alloc(port->port);
259 break; 260 break;
260 case EDGE_DEV: 261 case EDGE_DEV:
@@ -265,7 +266,6 @@ static int sas_get_port_device(struct asd_sas_port *port)
265 rphy = sas_expander_alloc(port->port, 266 rphy = sas_expander_alloc(port->port,
266 SAS_FANOUT_EXPANDER_DEVICE); 267 SAS_FANOUT_EXPANDER_DEVICE);
267 break; 268 break;
268 case SATA_DEV:
269 default: 269 default:
270 printk("ERROR: Unidentified device type %d\n", dev->dev_type); 270 printk("ERROR: Unidentified device type %d\n", dev->dev_type);
271 rphy = NULL; 271 rphy = NULL;
@@ -480,7 +480,14 @@ cont1:
480 present. 480 present.
481 sas_satl_register_dev(dev); 481 sas_satl_register_dev(dev);
482 */ 482 */
483 return 0; 483
484 sas_fill_in_rphy(dev, dev->rphy);
485
486 res = sas_rphy_add(dev->rphy);
487 if (res)
488 goto out_err;
489
490 return res;
484out_err: 491out_err:
485 dev->sata_dev.identify_packet_device = NULL; 492 dev->sata_dev.identify_packet_device = NULL;
486 dev->sata_dev.identify_device = NULL; 493 dev->sata_dev.identify_device = NULL;