[SCSI] pm80xx: Phy settings support for motherboard controller.
Phy profile implementation to support phy settings feature for motherboard controllers. [jejb: checkpatch fixes] Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:

committed by
James Bottomley

parent
06f12f22ce
commit
279094079a
@@ -667,6 +667,31 @@ static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* pm8001_get_phy_settings_info : Read phy setting values.
|
||||
* @pm8001_ha : our hba.
|
||||
*/
|
||||
void pm8001_get_phy_settings_info(struct pm8001_hba_info *pm8001_ha)
|
||||
{
|
||||
|
||||
#ifdef PM8001_READ_VPD
|
||||
/*OPTION ROM FLASH read for the SPC cards */
|
||||
DECLARE_COMPLETION_ONSTACK(completion);
|
||||
struct pm8001_ioctl_payload payload;
|
||||
|
||||
pm8001_ha->nvmd_completion = &completion;
|
||||
/* SAS ADDRESS read from flash / EEPROM */
|
||||
payload.minor_function = 6;
|
||||
payload.offset = 0;
|
||||
payload.length = 4096;
|
||||
payload.func_specific = kzalloc(4096, GFP_KERNEL);
|
||||
/* Read phy setting values from flash */
|
||||
PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload);
|
||||
wait_for_completion(&completion);
|
||||
pm8001_set_phy_profile(pm8001_ha, sizeof(u8), payload.func_specific);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PM8001_USE_MSIX
|
||||
/**
|
||||
* pm8001_setup_msix - enable MSI-X interrupt
|
||||
@@ -847,6 +872,10 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
pm8001_init_sas_add(pm8001_ha);
|
||||
/* phy setting support for motherboard controller */
|
||||
if (pdev->subsystem_vendor != PCI_VENDOR_ID_ADAPTEC2 &&
|
||||
pdev->subsystem_vendor != 0)
|
||||
pm8001_get_phy_settings_info(pm8001_ha);
|
||||
pm8001_post_sas_ha_init(shost, chip);
|
||||
rc = sas_register_ha(SHOST_TO_SAS_HA(shost));
|
||||
if (rc)
|
||||
|
Reference in New Issue
Block a user