diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 134c63ef6d38..99ff99e45bee 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -2501,7 +2501,9 @@ static int megasas_init_mfi(struct megasas_instance *instance) | |||
2501 | instance->base_addr = pci_resource_start(instance->pdev, 0); | 2501 | instance->base_addr = pci_resource_start(instance->pdev, 0); |
2502 | } | 2502 | } |
2503 | 2503 | ||
2504 | if (pci_request_regions(instance->pdev, "megasas: LSI")) { | 2504 | if (pci_request_selected_regions(instance->pdev, |
2505 | pci_select_bars(instance->pdev, IORESOURCE_MEM), | ||
2506 | "megasas: LSI")) { | ||
2505 | printk(KERN_DEBUG "megasas: IO memory region busy!\n"); | 2507 | printk(KERN_DEBUG "megasas: IO memory region busy!\n"); |
2506 | return -EBUSY; | 2508 | return -EBUSY; |
2507 | } | 2509 | } |
@@ -2642,7 +2644,8 @@ static int megasas_init_mfi(struct megasas_instance *instance) | |||
2642 | iounmap(instance->reg_set); | 2644 | iounmap(instance->reg_set); |
2643 | 2645 | ||
2644 | fail_ioremap: | 2646 | fail_ioremap: |
2645 | pci_release_regions(instance->pdev); | 2647 | pci_release_selected_regions(instance->pdev, |
2648 | pci_select_bars(instance->pdev, IORESOURCE_MEM)); | ||
2646 | 2649 | ||
2647 | return -EINVAL; | 2650 | return -EINVAL; |
2648 | } | 2651 | } |
@@ -2662,7 +2665,8 @@ static void megasas_release_mfi(struct megasas_instance *instance) | |||
2662 | 2665 | ||
2663 | iounmap(instance->reg_set); | 2666 | iounmap(instance->reg_set); |
2664 | 2667 | ||
2665 | pci_release_regions(instance->pdev); | 2668 | pci_release_selected_regions(instance->pdev, |
2669 | pci_select_bars(instance->pdev, IORESOURCE_MEM)); | ||
2666 | } | 2670 | } |
2667 | 2671 | ||
2668 | /** | 2672 | /** |
@@ -2971,7 +2975,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2971 | /* | 2975 | /* |
2972 | * PCI prepping: enable device set bus mastering and dma mask | 2976 | * PCI prepping: enable device set bus mastering and dma mask |
2973 | */ | 2977 | */ |
2974 | rval = pci_enable_device(pdev); | 2978 | rval = pci_enable_device_mem(pdev); |
2975 | 2979 | ||
2976 | if (rval) { | 2980 | if (rval) { |
2977 | return rval; | 2981 | return rval; |
@@ -3276,7 +3280,7 @@ megasas_resume(struct pci_dev *pdev) | |||
3276 | /* | 3280 | /* |
3277 | * PCI prepping: enable device set bus mastering and dma mask | 3281 | * PCI prepping: enable device set bus mastering and dma mask |
3278 | */ | 3282 | */ |
3279 | rval = pci_enable_device(pdev); | 3283 | rval = pci_enable_device_mem(pdev); |
3280 | 3284 | ||
3281 | if (rval) { | 3285 | if (rval) { |
3282 | printk(KERN_ERR "megasas: Enable device failed\n"); | 3286 | printk(KERN_ERR "megasas: Enable device failed\n"); |