aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_init.c
diff options
context:
space:
mode:
authorSakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>2013-02-27 09:57:43 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-05-10 10:47:46 -0400
commitf74cf271e692848833b3845b4036a87e5b683fa8 (patch)
tree8dd2b125d56a5d0e3d188ddea4fe1276cad6fb38 /drivers/scsi/pm8001/pm8001_init.c
parente590adfd2b35aecb3ea5e7cf3fe4e322b75f348d (diff)
[SCSI] pm80xx: Updated common functions common for SPC and SPCv/ve
Update of function prototype for common function to SPC and SPCv/ve. Multiple queues implementation for IO. 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.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 98686b982302..19fbd03b4190 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -165,7 +165,7 @@ static void pm8001_tasklet(unsigned long opaque)
165 pm8001_ha = (struct pm8001_hba_info *)opaque; 165 pm8001_ha = (struct pm8001_hba_info *)opaque;
166 if (unlikely(!pm8001_ha)) 166 if (unlikely(!pm8001_ha))
167 BUG_ON(1); 167 BUG_ON(1);
168 PM8001_CHIP_DISP->isr(pm8001_ha); 168 PM8001_CHIP_DISP->isr(pm8001_ha, 0);
169} 169}
170#endif 170#endif
171 171
@@ -189,7 +189,7 @@ static irqreturn_t pm8001_interrupt(int irq, void *opaque)
189#ifdef PM8001_USE_TASKLET 189#ifdef PM8001_USE_TASKLET
190 tasklet_schedule(&pm8001_ha->tasklet); 190 tasklet_schedule(&pm8001_ha->tasklet);
191#else 191#else
192 ret = PM8001_CHIP_DISP->isr(pm8001_ha); 192 ret = PM8001_CHIP_DISP->isr(pm8001_ha, 0);
193#endif 193#endif
194 return ret; 194 return ret;
195} 195}
@@ -420,6 +420,12 @@ static struct pm8001_hba_info *pm8001_pci_alloc(struct pci_dev *pdev,
420 pm8001_ha->id = pm8001_id++; 420 pm8001_ha->id = pm8001_id++;
421 pm8001_ha->logging_level = 0x01; 421 pm8001_ha->logging_level = 0x01;
422 sprintf(pm8001_ha->name, "%s%d", DRV_NAME, pm8001_ha->id); 422 sprintf(pm8001_ha->name, "%s%d", DRV_NAME, pm8001_ha->id);
423 /* IOMB size is 128 for 8088/89 controllers */
424 if (pm8001_ha->chip_id != chip_8001)
425 pm8001_ha->iomb_size = IOMB_SIZE_SPCV;
426 else
427 pm8001_ha->iomb_size = IOMB_SIZE_SPC;
428
423#ifdef PM8001_USE_TASKLET 429#ifdef PM8001_USE_TASKLET
424 tasklet_init(&pm8001_ha->tasklet, pm8001_tasklet, 430 tasklet_init(&pm8001_ha->tasklet, pm8001_tasklet,
425 (unsigned long)pm8001_ha); 431 (unsigned long)pm8001_ha);
@@ -722,7 +728,7 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
722 if (rc) 728 if (rc)
723 goto err_out_shost; 729 goto err_out_shost;
724 730
725 PM8001_CHIP_DISP->interrupt_enable(pm8001_ha); 731 PM8001_CHIP_DISP->interrupt_enable(pm8001_ha, 0);
726 pm8001_init_sas_add(pm8001_ha); 732 pm8001_init_sas_add(pm8001_ha);
727 pm8001_post_sas_ha_init(shost, chip); 733 pm8001_post_sas_ha_init(shost, chip);
728 rc = sas_register_ha(SHOST_TO_SAS_HA(shost)); 734 rc = sas_register_ha(SHOST_TO_SAS_HA(shost));
@@ -758,7 +764,7 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
758 sas_remove_host(pm8001_ha->shost); 764 sas_remove_host(pm8001_ha->shost);
759 list_del(&pm8001_ha->list); 765 list_del(&pm8001_ha->list);
760 scsi_remove_host(pm8001_ha->shost); 766 scsi_remove_host(pm8001_ha->shost);
761 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha); 767 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0);
762 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd); 768 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd);
763 769
764#ifdef PM8001_USE_MSIX 770#ifdef PM8001_USE_MSIX
@@ -802,7 +808,7 @@ static int pm8001_pci_suspend(struct pci_dev *pdev, pm_message_t state)
802 printk(KERN_ERR " PCI PM not supported\n"); 808 printk(KERN_ERR " PCI PM not supported\n");
803 return -ENODEV; 809 return -ENODEV;
804 } 810 }
805 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha); 811 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0);
806 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd); 812 PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha, 0x252acbcd);
807#ifdef PM8001_USE_MSIX 813#ifdef PM8001_USE_MSIX
808 for (i = 0; i < pm8001_ha->number_of_intr; i++) 814 for (i = 0; i < pm8001_ha->number_of_intr; i++)
@@ -863,7 +869,7 @@ static int pm8001_pci_resume(struct pci_dev *pdev)
863 rc = PM8001_CHIP_DISP->chip_init(pm8001_ha); 869 rc = PM8001_CHIP_DISP->chip_init(pm8001_ha);
864 if (rc) 870 if (rc)
865 goto err_out_disable; 871 goto err_out_disable;
866 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha); 872 PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0);
867 rc = pm8001_request_irq(pm8001_ha); 873 rc = pm8001_request_irq(pm8001_ha);
868 if (rc) 874 if (rc)
869 goto err_out_disable; 875 goto err_out_disable;
@@ -871,7 +877,7 @@ static int pm8001_pci_resume(struct pci_dev *pdev)
871 tasklet_init(&pm8001_ha->tasklet, pm8001_tasklet, 877 tasklet_init(&pm8001_ha->tasklet, pm8001_tasklet,
872 (unsigned long)pm8001_ha); 878 (unsigned long)pm8001_ha);
873 #endif 879 #endif
874 PM8001_CHIP_DISP->interrupt_enable(pm8001_ha); 880 PM8001_CHIP_DISP->interrupt_enable(pm8001_ha, 0);
875 scsi_unblock_requests(pm8001_ha->shost); 881 scsi_unblock_requests(pm8001_ha->shost);
876 return 0; 882 return 0;
877 883