pm80xx: set PHY profiles for ATTO 12Gb SAS controllers
PHY profiles are not saved in NVRAM on ATTO 12Gb SAS controllers. Therefore, in order for the controller to function in a wide range of configurations, the PHY profiles must be statically set. This patch provides the necessary functionality to do so. Signed-off-by: Benjamin Rood <brood@attotech.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
此提交包含在:
@@ -4576,6 +4576,38 @@ void pm8001_set_phy_profile(struct pm8001_hba_info *pm8001_ha,
|
||||
}
|
||||
PM8001_INIT_DBG(pm8001_ha, pm8001_printk("phy settings completed\n"));
|
||||
}
|
||||
|
||||
void pm8001_set_phy_profile_single(struct pm8001_hba_info *pm8001_ha,
|
||||
u32 phy, u32 length, u32 *buf)
|
||||
{
|
||||
u32 tag, opc;
|
||||
int rc, i;
|
||||
struct set_phy_profile_req payload;
|
||||
struct inbound_queue_table *circularQ;
|
||||
|
||||
memset(&payload, 0, sizeof(payload));
|
||||
|
||||
rc = pm8001_tag_alloc(pm8001_ha, &tag);
|
||||
if (rc)
|
||||
PM8001_INIT_DBG(pm8001_ha, pm8001_printk("Invalid tag"));
|
||||
|
||||
circularQ = &pm8001_ha->inbnd_q_tbl[0];
|
||||
opc = OPC_INB_SET_PHY_PROFILE;
|
||||
|
||||
payload.tag = cpu_to_le32(tag);
|
||||
payload.ppc_phyid = (((SAS_PHY_ANALOG_SETTINGS_PAGE & 0xF) << 8)
|
||||
| (phy & 0xFF));
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
payload.reserved[i] = cpu_to_le32(*(buf + i));
|
||||
|
||||
rc = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0);
|
||||
if (rc)
|
||||
pm8001_tag_free(pm8001_ha, tag);
|
||||
|
||||
PM8001_INIT_DBG(pm8001_ha,
|
||||
pm8001_printk("PHY %d settings applied", phy));
|
||||
}
|
||||
const struct pm8001_dispatch pm8001_80xx_dispatch = {
|
||||
.name = "pmc80xx",
|
||||
.chip_init = pm80xx_chip_init,
|
||||
|
新增問題並參考
封鎖使用者