aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/aic94xx/aic94xx_scb.c1
-rw-r--r--drivers/scsi/isci/phy.c11
-rw-r--r--drivers/scsi/libsas/sas_init.c13
-rw-r--r--drivers/scsi/mvsas/mv_sas.c2
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c2
-rw-r--r--include/scsi/sas.h1
6 files changed, 24 insertions, 6 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_scb.c b/drivers/scsi/aic94xx/aic94xx_scb.c
index 29593275201a..fdac7c2fef37 100644
--- a/drivers/scsi/aic94xx/aic94xx_scb.c
+++ b/drivers/scsi/aic94xx/aic94xx_scb.c
@@ -906,6 +906,7 @@ int asd_control_phy(struct asd_sas_phy *phy, enum phy_func func, void *arg)
906 906
907 switch (func) { 907 switch (func) {
908 case PHY_FUNC_CLEAR_ERROR_LOG: 908 case PHY_FUNC_CLEAR_ERROR_LOG:
909 case PHY_FUNC_GET_EVENTS:
909 return -ENOSYS; 910 return -ENOSYS;
910 case PHY_FUNC_SET_LINK_RATE: 911 case PHY_FUNC_SET_LINK_RATE:
911 rates = arg; 912 rates = arg;
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 430fc8ff014a..ab48bb11eab0 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,
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}
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index d4475d350847..a4884a57cf79 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -214,7 +214,7 @@ int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
214 break; 214 break;
215 case PHY_FUNC_RELEASE_SPINUP_HOLD: 215 case PHY_FUNC_RELEASE_SPINUP_HOLD:
216 default: 216 default:
217 rc = -EOPNOTSUPP; 217 rc = -ENOSYS;
218 } 218 }
219 msleep(200); 219 msleep(200);
220 return rc; 220 return rc;
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index 5ac90c3d4cc1..fb3dc9978861 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -210,7 +210,7 @@ int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
210 PM8001_CHIP_DISP->phy_stop_req(pm8001_ha, phy_id); 210 PM8001_CHIP_DISP->phy_stop_req(pm8001_ha, phy_id);
211 break; 211 break;
212 default: 212 default:
213 rc = -EOPNOTSUPP; 213 rc = -ENOSYS;
214 } 214 }
215 msleep(300); 215 msleep(300);
216 return rc; 216 return rc;
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index cfdbe9501593..3673d685e6ad 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -122,6 +122,7 @@ enum phy_func {
122 PHY_FUNC_TX_SATA_PS_SIGNAL, 122 PHY_FUNC_TX_SATA_PS_SIGNAL,
123 PHY_FUNC_RELEASE_SPINUP_HOLD = 0x10, /* LOCAL PORT ONLY! */ 123 PHY_FUNC_RELEASE_SPINUP_HOLD = 0x10, /* LOCAL PORT ONLY! */
124 PHY_FUNC_SET_LINK_RATE, 124 PHY_FUNC_SET_LINK_RATE,
125 PHY_FUNC_GET_EVENTS,
125}; 126};
126 127
127/* SAS LLDD would need to report only _very_few_ of those, like BROADCAST. 128/* SAS LLDD would need to report only _very_few_ of those, like BROADCAST.