Skip to content

Commit

Permalink
[SCSI] Add SATA support to libsas
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darrick J. Wong authored and James Bottomley committed Jul 18, 2007
1 parent 8b4a408 commit fa1c1e8
Show file tree
Hide file tree
Showing 4 changed files with 366 additions and 2 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/aic94xx/aic94xx_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ static struct scsi_host_template aic94xx_sht = {
.use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_handler,
.eh_bus_reset_handler = sas_eh_bus_reset_handler,
.slave_alloc = sas_slave_alloc,
.target_destroy = sas_target_destroy,
.ioctl = sas_ioctl,
};

static int __devinit asd_map_memio(struct asd_ha_struct *asd_ha)
Expand Down
11 changes: 9 additions & 2 deletions drivers/scsi/libsas/sas_discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down Expand Up @@ -480,7 +480,14 @@ static int sas_discover_sata_dev(struct domain_device *dev)
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;
Expand Down
Loading

0 comments on commit fa1c1e8

Please sign in to comment.