aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_init.c
diff options
context:
space:
mode:
authorAnand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>2013-09-18 03:32:44 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 04:58:16 -0400
commit279094079a442c19ff7e7c0fd9511d9404cb2518 (patch)
tree58a509a4ecb9160ddb5793db4200f9a6f7f5af68 /drivers/scsi/pm8001/pm8001_init.c
parent06f12f22cefdc2737b54fc986d9b82ec358cdbb8 (diff)
[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>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_init.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 93e2d9e9d2b3..92a18c4d2ebb 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -667,6 +667,31 @@ static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha)
667#endif 667#endif
668} 668}
669 669
670/*
671 * pm8001_get_phy_settings_info : Read phy setting values.
672 * @pm8001_ha : our hba.
673 */
674void pm8001_get_phy_settings_info(struct pm8001_hba_info *pm8001_ha)
675{
676
677#ifdef PM8001_READ_VPD
678 /*OPTION ROM FLASH read for the SPC cards */
679 DECLARE_COMPLETION_ONSTACK(completion);
680 struct pm8001_ioctl_payload payload;
681
682 pm8001_ha->nvmd_completion = &completion;
683 /* SAS ADDRESS read from flash / EEPROM */
684 payload.minor_function = 6;
685 payload.offset = 0;
686 payload.length = 4096;
687 payload.func_specific = kzalloc(4096, GFP_KERNEL);
688 /* Read phy setting values from flash */
689 PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload);
690 wait_for_completion(&completion);
691 pm8001_set_phy_profile(pm8001_ha, sizeof(u8), payload.func_specific);
692#endif
693}
694
670#ifdef PM8001_USE_MSIX 695#ifdef PM8001_USE_MSIX
671/** 696/**
672 * pm8001_setup_msix - enable MSI-X interrupt 697 * pm8001_setup_msix - enable MSI-X interrupt
@@ -847,6 +872,10 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
847 } 872 }
848 873
849 pm8001_init_sas_add(pm8001_ha); 874 pm8001_init_sas_add(pm8001_ha);
875 /* phy setting support for motherboard controller */
876 if (pdev->subsystem_vendor != PCI_VENDOR_ID_ADAPTEC2 &&
877 pdev->subsystem_vendor != 0)
878 pm8001_get_phy_settings_info(pm8001_ha);
850 pm8001_post_sas_ha_init(shost, chip); 879 pm8001_post_sas_ha_init(shost, chip);
851 rc = sas_register_ha(SHOST_TO_SAS_HA(shost)); 880 rc = sas_register_ha(SHOST_TO_SAS_HA(shost));
852 if (rc) 881 if (rc)