aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-09-28 21:48:02 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-02 14:24:26 -0400
commitac013ed1cb7b1b36113548ce83881a1b5f757b58 (patch)
treeb31bf468e86610642a954a83040bd0bf97981a0b /drivers/scsi/libsas
parentcdd05f05b4adefccfa9fce7d0e10c50f38f8a4bd (diff)
[SCSI] isci: export phy events via ->lldd_control_phy()
Allow the sas-transport-class to update events for local phys via a new PHY_FUNC_GET_EVENTS command to ->lldd_control_phy(). Fixup drivers that are not prepared for new enum phy_func values, and unify ->lldd_control_phy() error codes. These are the SAS defined phy events that are reported in a smp-report-phy-error-log command: * /sys/class/sas_phy/<phyX>/invalid_dword_count * /sys/class/sas_phy/<phyX>/running_disparity_error_count * /sys/class/sas_phy/<phyX>/loss_of_dword_sync_count * /sys/class/sas_phy/<phyX>/phy_reset_problem_count Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r--drivers/scsi/libsas/sas_init.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index dd56ea827665..d81c3b1989f7 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -177,10 +177,15 @@ int sas_unregister_ha(struct sas_ha_struct *sas_ha)
177 177
178static int sas_get_linkerrors(struct sas_phy *phy) 178static int sas_get_linkerrors(struct sas_phy *phy)
179{ 179{
180 if (scsi_is_sas_phy_local(phy)) 180 if (scsi_is_sas_phy_local(phy)) {
181 /* FIXME: we have no local phy stats 181 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent);
182 * gathering at this time */ 182 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost);
183 return -EINVAL; 183 struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number];
184 struct sas_internal *i =
185 to_sas_internal(sas_ha->core.shost->transportt);
186
187 return i->dft->lldd_control_phy(asd_phy, PHY_FUNC_GET_EVENTS, NULL);
188 }
184 189
185 return sas_smp_get_phy_events(phy); 190 return sas_smp_get_phy_events(phy);
186} 191}