Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271093
b: refs/heads/master
c: ac013ed
h: refs/heads/master
i:
  271091: 5c48e3d
v: v3
  • Loading branch information
Dan Williams authored and James Bottomley committed Oct 2, 2011
1 parent e320e4a commit b1912e1
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdd05f05b4adefccfa9fce7d0e10c50f38f8a4bd
refs/heads/master: ac013ed1cb7b1b36113548ce83881a1b5f757b58
1 change: 1 addition & 0 deletions trunk/drivers/scsi/aic94xx/aic94xx_scb.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ int asd_control_phy(struct asd_sas_phy *phy, enum phy_func func, void *arg)

switch (func) {
case PHY_FUNC_CLEAR_ERROR_LOG:
case PHY_FUNC_GET_EVENTS:
return -ENOSYS;
case PHY_FUNC_SET_LINK_RATE:
rates = arg;
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/scsi/isci/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,17 @@ int isci_phy_control(struct asd_sas_phy *sas_phy,
ret = isci_port_perform_hard_reset(ihost, iport, iphy);

break;
case PHY_FUNC_GET_EVENTS: {
struct scu_link_layer_registers __iomem *r;
struct sas_phy *phy = sas_phy->phy;

r = iphy->link_layer_registers;
phy->running_disparity_error_count = readl(&r->running_disparity_error_count);
phy->loss_of_dword_sync_count = readl(&r->loss_of_sync_error_count);
phy->phy_reset_problem_count = readl(&r->phy_reset_problem_count);
phy->invalid_dword_count = readl(&r->invalid_dword_counter);
break;
}

default:
dev_dbg(&ihost->pdev->dev,
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/scsi/libsas/sas_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,15 @@ int sas_unregister_ha(struct sas_ha_struct *sas_ha)

static int sas_get_linkerrors(struct sas_phy *phy)
{
if (scsi_is_sas_phy_local(phy))
/* FIXME: we have no local phy stats
* gathering at this time */
return -EINVAL;
if (scsi_is_sas_phy_local(phy)) {
struct Scsi_Host *shost = dev_to_shost(phy->dev.parent);
struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost);
struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number];
struct sas_internal *i =
to_sas_internal(sas_ha->core.shost->transportt);

return i->dft->lldd_control_phy(asd_phy, PHY_FUNC_GET_EVENTS, NULL);
}

return sas_smp_get_phy_events(phy);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/mvsas/mv_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
break;
case PHY_FUNC_RELEASE_SPINUP_HOLD:
default:
rc = -EOPNOTSUPP;
rc = -ENOSYS;
}
msleep(200);
return rc;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/pm8001/pm8001_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
PM8001_CHIP_DISP->phy_stop_req(pm8001_ha, phy_id);
break;
default:
rc = -EOPNOTSUPP;
rc = -ENOSYS;
}
msleep(300);
return rc;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/scsi/sas.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ enum phy_func {
PHY_FUNC_TX_SATA_PS_SIGNAL,
PHY_FUNC_RELEASE_SPINUP_HOLD = 0x10, /* LOCAL PORT ONLY! */
PHY_FUNC_SET_LINK_RATE,
PHY_FUNC_GET_EVENTS,
};

/* SAS LLDD would need to report only _very_few_ of those, like BROADCAST.
Expand Down

0 comments on commit b1912e1

Please sign in to comment.