aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAnand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>2013-09-17 05:02:20 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 04:58:15 -0400
commit06f12f22cefdc2737b54fc986d9b82ec358cdbb8 (patch)
tree94a25592f91adaa9168125c39d08ea4b5d68facf /drivers/scsi
parentcb269c26ed027bea67f5961619ae43f480a4dd3d (diff)
[SCSI] pm80xx: IButton security feature support for motherboard controllers.
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')
-rw-r--r--drivers/scsi/pm8001/pm80xx_hwi.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 0a2dc56ed9f6..c8a4465b74a5 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -967,6 +967,7 @@ pm80xx_chip_soft_rst(struct pm8001_hba_info *pm8001_ha)
967{ 967{
968 u32 regval; 968 u32 regval;
969 u32 bootloader_state; 969 u32 bootloader_state;
970 u32 ibutton0, ibutton1;
970 971
971 /* Check if MPI is in ready state to reset */ 972 /* Check if MPI is in ready state to reset */
972 if (mpi_uninit_check(pm8001_ha) != 0) { 973 if (mpi_uninit_check(pm8001_ha) != 0) {
@@ -1025,7 +1026,27 @@ pm80xx_chip_soft_rst(struct pm8001_hba_info *pm8001_ha)
1025 if (-1 == check_fw_ready(pm8001_ha)) { 1026 if (-1 == check_fw_ready(pm8001_ha)) {
1026 PM8001_FAIL_DBG(pm8001_ha, 1027 PM8001_FAIL_DBG(pm8001_ha,
1027 pm8001_printk("Firmware is not ready!\n")); 1028 pm8001_printk("Firmware is not ready!\n"));
1028 return -EBUSY; 1029 /* check iButton feature support for motherboard controller */
1030 if (pm8001_ha->pdev->subsystem_vendor !=
1031 PCI_VENDOR_ID_ADAPTEC2 &&
1032 pm8001_ha->pdev->subsystem_vendor != 0) {
1033 ibutton0 = pm8001_cr32(pm8001_ha, 0,
1034 MSGU_HOST_SCRATCH_PAD_6);
1035 ibutton1 = pm8001_cr32(pm8001_ha, 0,
1036 MSGU_HOST_SCRATCH_PAD_7);
1037 if (!ibutton0 && !ibutton1) {
1038 PM8001_FAIL_DBG(pm8001_ha,
1039 pm8001_printk("iButton Feature is"
1040 " not Available!!!\n"));
1041 return -EBUSY;
1042 }
1043 if (ibutton0 == 0xdeadbeef && ibutton1 == 0xdeadbeef) {
1044 PM8001_FAIL_DBG(pm8001_ha,
1045 pm8001_printk("CRC Check for iButton"
1046 " Feature Failed!!!\n"));
1047 return -EBUSY;
1048 }
1049 }
1029 } 1050 }
1030 PM8001_INIT_DBG(pm8001_ha, 1051 PM8001_INIT_DBG(pm8001_ha,
1031 pm8001_printk("SPCv soft reset Complete\n")); 1052 pm8001_printk("SPCv soft reset Complete\n"));