aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_expander.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2007-07-22 14:15:55 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-22 14:23:13 -0400
commitb91421749a1840148d8c81637c03c0ace3f35269 (patch)
treee3e2f59f9a14051c8277793f214db094380d3ebb /drivers/scsi/libsas/sas_expander.c
parent41e1703b9b88cf9b5e91cdd2f7dcded3ec3917cb (diff)
[SCSI] libsas: make ATA functions selectable by a config option
Not everyone wants libsas automatically to pull in libata. This patch makes the behaviour configurable, so you can build libsas with or without ATA support. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r--drivers/scsi/libsas/sas_expander.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index eca83e8d8c0d..b500f0c1449c 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -535,6 +535,8 @@ int sas_smp_get_phy_events(struct sas_phy *phy)
535 535
536} 536}
537 537
538#ifdef CONFIG_SCSI_SAS_ATA
539
538#define RPS_REQ_SIZE 16 540#define RPS_REQ_SIZE 16
539#define RPS_RESP_SIZE 60 541#define RPS_RESP_SIZE 60
540 542
@@ -578,6 +580,7 @@ static int sas_get_report_phy_sata(struct domain_device *dev,
578 kfree(rps_req); 580 kfree(rps_req);
579 return res; 581 return res;
580} 582}
583#endif
581 584
582static void sas_ex_get_linkrate(struct domain_device *parent, 585static void sas_ex_get_linkrate(struct domain_device *parent,
583 struct domain_device *child, 586 struct domain_device *child,
@@ -645,6 +648,7 @@ static struct domain_device *sas_ex_discover_end_dev(
645 } 648 }
646 sas_ex_get_linkrate(parent, child, phy); 649 sas_ex_get_linkrate(parent, child, phy);
647 650
651#ifdef CONFIG_SCSI_SAS_ATA
648 if ((phy->attached_tproto & SAS_PROTO_STP) || phy->attached_sata_dev) { 652 if ((phy->attached_tproto & SAS_PROTO_STP) || phy->attached_sata_dev) {
649 child->dev_type = SATA_DEV; 653 child->dev_type = SATA_DEV;
650 if (phy->attached_tproto & SAS_PROTO_STP) 654 if (phy->attached_tproto & SAS_PROTO_STP)
@@ -682,7 +686,9 @@ static struct domain_device *sas_ex_discover_end_dev(
682 SAS_ADDR(parent->sas_addr), phy_id, res); 686 SAS_ADDR(parent->sas_addr), phy_id, res);
683 goto out_list_del; 687 goto out_list_del;
684 } 688 }
685 } else if (phy->attached_tproto & SAS_PROTO_SSP) { 689 } else
690#endif
691 if (phy->attached_tproto & SAS_PROTO_SSP) {
686 child->dev_type = SAS_END_DEV; 692 child->dev_type = SAS_END_DEV;
687 rphy = sas_end_device_alloc(phy->port); 693 rphy = sas_end_device_alloc(phy->port);
688 /* FIXME: error handling */ 694 /* FIXME: error handling */
@@ -710,6 +716,7 @@ static struct domain_device *sas_ex_discover_end_dev(
710 SAS_DPRINTK("target proto 0x%x at %016llx:0x%x not handled\n", 716 SAS_DPRINTK("target proto 0x%x at %016llx:0x%x not handled\n",
711 phy->attached_tproto, SAS_ADDR(parent->sas_addr), 717 phy->attached_tproto, SAS_ADDR(parent->sas_addr),
712 phy_id); 718 phy_id);
719 goto out_free;
713 } 720 }
714 721
715 list_add_tail(&child->siblings, &parent_ex->children); 722 list_add_tail(&child->siblings, &parent_ex->children);