aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_init.c
diff options
context:
space:
mode:
authorSakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>2013-04-17 07:07:02 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-05-10 10:47:47 -0400
commitf5860992db55c9e36b0f120dff73f0c34abe510d (patch)
tree16be1bcb6e60493ffcf77d13d9f50298e25adcc8 /drivers/scsi/pm8001/pm8001_init.c
parent1245ee5996a1270e4fd04f9c2e399521a656c930 (diff)
[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files
Implementation of SPCv/ve specific hardware functionality and macros. Changing common functionalities wrt SPCv/ve operations. Conditional checks for SPC specific operations. Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> 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.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 75270ee1a7f0..e522e5908bc0 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -50,6 +50,10 @@ static struct scsi_transport_template *pm8001_stt;
50 */ 50 */
51static const struct pm8001_chip_info pm8001_chips[] = { 51static const struct pm8001_chip_info pm8001_chips[] = {
52 [chip_8001] = {0, 8, &pm8001_8001_dispatch,}, 52 [chip_8001] = {0, 8, &pm8001_8001_dispatch,},
53 [chip_8008] = {0, 8, &pm8001_80xx_dispatch,},
54 [chip_8009] = {1, 8, &pm8001_80xx_dispatch,},
55 [chip_8018] = {0, 16, &pm8001_80xx_dispatch,},
56 [chip_8019] = {1, 16, &pm8001_80xx_dispatch,},
53}; 57};
54static int pm8001_id; 58static int pm8001_id;
55 59
@@ -780,7 +784,7 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
780 goto err_out_free; 784 goto err_out_free;
781 } 785 }
782 list_add_tail(&pm8001_ha->list, &hba_list); 786 list_add_tail(&pm8001_ha->list, &hba_list);
783 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd); 787 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);
784 rc = PM8001_CHIP_DISP->chip_init(pm8001_ha); 788 rc = PM8001_CHIP_DISP->chip_init(pm8001_ha);
785 if (rc) 789 if (rc)
786 goto err_out_ha_free; 790 goto err_out_ha_free;
@@ -834,7 +838,7 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
834 list_del(&pm8001_ha->list); 838 list_del(&pm8001_ha->list);
835 scsi_remove_host(pm8001_ha->shost); 839 scsi_remove_host(pm8001_ha->shost);
836 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0xFF); 840 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0xFF);
837 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd); 841 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);
838 842
839#ifdef PM8001_USE_MSIX 843#ifdef PM8001_USE_MSIX
840 for (i = 0; i < pm8001_ha->number_of_intr; i++) 844 for (i = 0; i < pm8001_ha->number_of_intr; i++)
@@ -879,7 +883,7 @@ static int pm8001_pci_suspend(struct pci_dev *pdev, pm_message_t state)
879 return -ENODEV; 883 return -ENODEV;
880 } 884 }
881 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0xFF); 885 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0xFF);
882 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd); 886 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);
883#ifdef PM8001_USE_MSIX 887#ifdef PM8001_USE_MSIX
884 for (i = 0; i < pm8001_ha->number_of_intr; i++) 888 for (i = 0; i < pm8001_ha->number_of_intr; i++)
885 synchronize_irq(pm8001_ha->msix_entries[i].vector); 889 synchronize_irq(pm8001_ha->msix_entries[i].vector);
@@ -937,7 +941,12 @@ static int pm8001_pci_resume(struct pci_dev *pdev)
937 if (rc) 941 if (rc)
938 goto err_out_disable; 942 goto err_out_disable;
939 943
940 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd); 944 /* chip soft rst only for spc */
945 if (pm8001_ha->chip_id == chip_8001) {
946 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);
947 PM8001_INIT_DBG(pm8001_ha,
948 pm8001_printk("chip soft reset successful\n"));
949 }
941 rc = PM8001_CHIP_DISP->chip_init(pm8001_ha); 950 rc = PM8001_CHIP_DISP->chip_init(pm8001_ha);
942 if (rc) 951 if (rc)
943 goto err_out_disable; 952 goto err_out_disable;