aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_hwi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_hwi.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_hwi.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index c486fe868e37..eea0c3a291ec 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -640,6 +640,18 @@ static void init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha)
640static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha) 640static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha)
641{ 641{
642 u8 i = 0; 642 u8 i = 0;
643 u16 deviceid;
644 pci_read_config_word(pm8001_ha->pdev, PCI_DEVICE_ID, &deviceid);
645 /* 8081 controllers need BAR shift to access MPI space
646 * as this is shared with BIOS data */
647 if (deviceid == 0x8081) {
648 if (-1 == pm8001_bar4_shift(pm8001_ha, GSM_SM_BASE)) {
649 PM8001_FAIL_DBG(pm8001_ha,
650 pm8001_printk("Shift Bar4 to 0x%x failed\n",
651 GSM_SM_BASE));
652 return -1;
653 }
654 }
643 /* check the firmware status */ 655 /* check the firmware status */
644 if (-1 == check_fw_ready(pm8001_ha)) { 656 if (-1 == check_fw_ready(pm8001_ha)) {
645 PM8001_FAIL_DBG(pm8001_ha, 657 PM8001_FAIL_DBG(pm8001_ha,
@@ -660,9 +672,12 @@ static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha)
660 update_inbnd_queue_table(pm8001_ha, i); 672 update_inbnd_queue_table(pm8001_ha, i);
661 for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) 673 for (i = 0; i < PM8001_MAX_OUTB_NUM; i++)
662 update_outbnd_queue_table(pm8001_ha, i); 674 update_outbnd_queue_table(pm8001_ha, i);
663 mpi_set_phys_g3_with_ssc(pm8001_ha, 0); 675 /* 8081 controller donot require these operations */
664 /* 7->130ms, 34->500ms, 119->1.5s */ 676 if (deviceid != 0x8081) {
665 mpi_set_open_retry_interval_reg(pm8001_ha, 119); 677 mpi_set_phys_g3_with_ssc(pm8001_ha, 0);
678 /* 7->130ms, 34->500ms, 119->1.5s */
679 mpi_set_open_retry_interval_reg(pm8001_ha, 119);
680 }
666 /* notify firmware update finished and check initialization status */ 681 /* notify firmware update finished and check initialization status */
667 if (0 == mpi_init_check(pm8001_ha)) { 682 if (0 == mpi_init_check(pm8001_ha)) {
668 PM8001_INIT_DBG(pm8001_ha, 683 PM8001_INIT_DBG(pm8001_ha,
@@ -684,6 +699,16 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)
684 u32 max_wait_count; 699 u32 max_wait_count;
685 u32 value; 700 u32 value;
686 u32 gst_len_mpistate; 701 u32 gst_len_mpistate;
702 u16 deviceid;
703 pci_read_config_word(pm8001_ha->pdev, PCI_DEVICE_ID, &deviceid);
704 if (deviceid == 0x8081) {
705 if (-1 == pm8001_bar4_shift(pm8001_ha, GSM_SM_BASE)) {
706 PM8001_FAIL_DBG(pm8001_ha,
707 pm8001_printk("Shift Bar4 to 0x%x failed\n",
708 GSM_SM_BASE));
709 return -1;
710 }
711 }
687 init_pci_device_addresses(pm8001_ha); 712 init_pci_device_addresses(pm8001_ha);
688 /* Write bit1=1 to Inbound DoorBell Register to tell the SPC FW the 713 /* Write bit1=1 to Inbound DoorBell Register to tell the SPC FW the
689 table is stop */ 714 table is stop */