aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/phy.c
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/isci/phy.c
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/isci/phy.c')
-rw-r--r--drivers/scsi/isci/phy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 430fc8ff014..ab48bb11eab 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -1313,6 +1313,17 @@ int isci_phy_control(struct asd_sas_phy *sas_phy,
1313 ret = isci_port_perform_hard_reset(ihost, iport, iphy); 1313 ret = isci_port_perform_hard_reset(ihost, iport, iphy);
1314 1314
1315 break; 1315 break;
1316 case PHY_FUNC_GET_EVENTS: {
1317 struct scu_link_layer_registers __iomem *r;
1318 struct sas_phy *phy = sas_phy->phy;
1319
1320 r = iphy->link_layer_registers;
1321 phy->running_disparity_error_count = readl(&r->running_disparity_error_count);
1322 phy->loss_of_dword_sync_count = readl(&r->loss_of_sync_error_count);
1323 phy->phy_reset_problem_count = readl(&r->phy_reset_problem_count);
1324 phy->invalid_dword_count = readl(&r->invalid_dword_counter);
1325 break;
1326 }
1316 1327
1317 default: 1328 default:
1318 dev_dbg(&ihost->pdev->dev, 1329 dev_dbg(&ihost->pdev->dev,