aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-06-16 14:51:25 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:01:57 -0400
commit12d2cd4711b9e3ddcf911281ec4fe511b5cfff63 (patch)
tree9dc42cc31bc15a6e09fb0a2240c5d42e0b224ad6 /drivers
parent6798cc0a4964ceabc27de762c41929f8a875e3fd (diff)
[SCSI] hpsa: make hpsa_find_memory_BAR not require the per HBA structure.
Rationale for this is that in order to fix the hard reset code used by kdump, we need to use this function before we even have the per HBA structure. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/hpsa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 25faaae324a3..f5305a4b8b32 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3313,20 +3313,20 @@ static inline bool hpsa_board_disabled(struct pci_dev *pdev)
3313 return ((command & PCI_COMMAND_MEMORY) == 0); 3313 return ((command & PCI_COMMAND_MEMORY) == 0);
3314} 3314}
3315 3315
3316static int __devinit hpsa_pci_find_memory_BAR(struct ctlr_info *h, 3316static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev,
3317 unsigned long *memory_bar) 3317 unsigned long *memory_bar)
3318{ 3318{
3319 int i; 3319 int i;
3320 3320
3321 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) 3321 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++)
3322 if (pci_resource_flags(h->pdev, i) & IORESOURCE_MEM) { 3322 if (pci_resource_flags(pdev, i) & IORESOURCE_MEM) {
3323 /* addressing mode bits already removed */ 3323 /* addressing mode bits already removed */
3324 *memory_bar = pci_resource_start(h->pdev, i); 3324 *memory_bar = pci_resource_start(pdev, i);
3325 dev_dbg(&h->pdev->dev, "memory BAR = %lx\n", 3325 dev_dbg(&pdev->dev, "memory BAR = %lx\n",
3326 *memory_bar); 3326 *memory_bar);
3327 return 0; 3327 return 0;
3328 } 3328 }
3329 dev_warn(&h->pdev->dev, "no memory BAR found\n"); 3329 dev_warn(&pdev->dev, "no memory BAR found\n");
3330 return -ENODEV; 3330 return -ENODEV;
3331} 3331}
3332 3332
@@ -3503,7 +3503,7 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h)
3503 return err; 3503 return err;
3504 } 3504 }
3505 hpsa_interrupt_mode(h); 3505 hpsa_interrupt_mode(h);
3506 err = hpsa_pci_find_memory_BAR(h, &h->paddr); 3506 err = hpsa_pci_find_memory_BAR(h->pdev, &h->paddr);
3507 if (err) 3507 if (err)
3508 goto err_out_free_res; 3508 goto err_out_free_res;
3509 h->vaddr = remap_pci_mem(h->paddr, 0x250); 3509 h->vaddr = remap_pci_mem(h->paddr, 0x250);