diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 22:29:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 22:29:33 -0500 |
commit | 215e871aaa3d94540121a3809d80d0c5e5686e4f (patch) | |
tree | 0ed6469c5ad04db8cfa0edb58c676d5155df20cd /drivers/scsi | |
parent | b6cf160c4b788a31f6a4017a469b956ca77febf4 (diff) | |
parent | fd7d1ced29e5beb88c9068801da7a362606d8273 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (64 commits)
PCI: make pci_bus a struct device
PCI: fix codingstyle issues in include/linux/pci.h
PCI: fix codingstyle issues in drivers/pci/pci.h
PCI: PCIE ASPM support
PCI: Fix fakephp deadlock
PCI: modify SB700 SATA MSI quirk
PCI: Run ACPI _OSC method on root bridges only
PCI ACPI: AER driver should only register PCIe devices with _OSC
PCI ACPI: Added a function to register _OSC with only PCIe devices.
PCI: constify function pointer tables
PCI: Convert drivers/pci/proc.c to use unlocked_ioctl
pciehp: block new requests from the device before power off
pciehp: workaround against Bad DLLP during power off
pciehp: wait for 1000ms before LED operation after power off
PCI: Remove pci_enable_device_bars() from documentation
PCI: Remove pci_enable_device_bars()
PCI: Remove users of pci_enable_device_bars()
PCI: Add pci_enable_device_{io,mem} intefaces
PCI: avoid save the same type of cap multiple times
PCI: correctly initialize a structure for pcie_save_pcix_state()
...
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 21 |
3 files changed, 19 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 3205f7488d1c..29b4cf9e059b 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -2296,10 +2296,9 @@ static pci_ers_result_t lpfc_io_slot_reset(struct pci_dev *pdev) | |||
2296 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 2296 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
2297 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; | 2297 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; |
2298 | struct lpfc_sli *psli = &phba->sli; | 2298 | struct lpfc_sli *psli = &phba->sli; |
2299 | int bars = pci_select_bars(pdev, IORESOURCE_MEM); | ||
2300 | 2299 | ||
2301 | dev_printk(KERN_INFO, &pdev->dev, "recovering from a slot reset.\n"); | 2300 | dev_printk(KERN_INFO, &pdev->dev, "recovering from a slot reset.\n"); |
2302 | if (pci_enable_device_bars(pdev, bars)) { | 2301 | if (pci_enable_device_mem(pdev)) { |
2303 | printk(KERN_ERR "lpfc: Cannot re-enable " | 2302 | printk(KERN_ERR "lpfc: Cannot re-enable " |
2304 | "PCI device after reset.\n"); | 2303 | "PCI device after reset.\n"); |
2305 | return PCI_ERS_RESULT_DISCONNECT; | 2304 | return PCI_ERS_RESULT_DISCONNECT; |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 6f129da37589..b72c7f170854 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2268,6 +2268,7 @@ typedef struct scsi_qla_host { | |||
2268 | spinlock_t hardware_lock ____cacheline_aligned; | 2268 | spinlock_t hardware_lock ____cacheline_aligned; |
2269 | 2269 | ||
2270 | int bars; | 2270 | int bars; |
2271 | int mem_only; | ||
2271 | device_reg_t __iomem *iobase; /* Base I/O address */ | 2272 | device_reg_t __iomem *iobase; /* Base I/O address */ |
2272 | resource_size_t pio_address; | 2273 | resource_size_t pio_address; |
2273 | #define MIN_IOBASE_LEN 0x100 | 2274 | #define MIN_IOBASE_LEN 0x100 |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3954ed2d7b51..8f69caf83272 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1564,7 +1564,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1564 | char pci_info[30]; | 1564 | char pci_info[30]; |
1565 | char fw_str[30]; | 1565 | char fw_str[30]; |
1566 | struct scsi_host_template *sht; | 1566 | struct scsi_host_template *sht; |
1567 | int bars; | 1567 | int bars, mem_only = 0; |
1568 | 1568 | ||
1569 | bars = pci_select_bars(pdev, IORESOURCE_MEM | IORESOURCE_IO); | 1569 | bars = pci_select_bars(pdev, IORESOURCE_MEM | IORESOURCE_IO); |
1570 | sht = &qla2x00_driver_template; | 1570 | sht = &qla2x00_driver_template; |
@@ -1575,10 +1575,16 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1575 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2532) { | 1575 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2532) { |
1576 | bars = pci_select_bars(pdev, IORESOURCE_MEM); | 1576 | bars = pci_select_bars(pdev, IORESOURCE_MEM); |
1577 | sht = &qla24xx_driver_template; | 1577 | sht = &qla24xx_driver_template; |
1578 | mem_only = 1; | ||
1578 | } | 1579 | } |
1579 | 1580 | ||
1580 | if (pci_enable_device_bars(pdev, bars)) | 1581 | if (mem_only) { |
1581 | goto probe_out; | 1582 | if (pci_enable_device_mem(pdev)) |
1583 | goto probe_out; | ||
1584 | } else { | ||
1585 | if (pci_enable_device(pdev)) | ||
1586 | goto probe_out; | ||
1587 | } | ||
1582 | 1588 | ||
1583 | if (pci_find_aer_capability(pdev)) | 1589 | if (pci_find_aer_capability(pdev)) |
1584 | if (pci_enable_pcie_error_reporting(pdev)) | 1590 | if (pci_enable_pcie_error_reporting(pdev)) |
@@ -1601,6 +1607,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1601 | sprintf(ha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, ha->host_no); | 1607 | sprintf(ha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, ha->host_no); |
1602 | ha->parent = NULL; | 1608 | ha->parent = NULL; |
1603 | ha->bars = bars; | 1609 | ha->bars = bars; |
1610 | ha->mem_only = mem_only; | ||
1604 | 1611 | ||
1605 | /* Set ISP-type information. */ | 1612 | /* Set ISP-type information. */ |
1606 | qla2x00_set_isp_flags(ha); | 1613 | qla2x00_set_isp_flags(ha); |
@@ -2875,8 +2882,14 @@ qla2xxx_pci_slot_reset(struct pci_dev *pdev) | |||
2875 | { | 2882 | { |
2876 | pci_ers_result_t ret = PCI_ERS_RESULT_DISCONNECT; | 2883 | pci_ers_result_t ret = PCI_ERS_RESULT_DISCONNECT; |
2877 | scsi_qla_host_t *ha = pci_get_drvdata(pdev); | 2884 | scsi_qla_host_t *ha = pci_get_drvdata(pdev); |
2885 | int rc; | ||
2886 | |||
2887 | if (ha->mem_only) | ||
2888 | rc = pci_enable_device_mem(pdev); | ||
2889 | else | ||
2890 | rc = pci_enable_device(pdev); | ||
2878 | 2891 | ||
2879 | if (pci_enable_device_bars(pdev, ha->bars)) { | 2892 | if (rc) { |
2880 | qla_printk(KERN_WARNING, ha, | 2893 | qla_printk(KERN_WARNING, ha, |
2881 | "Can't re-enable PCI device after reset.\n"); | 2894 | "Can't re-enable PCI device after reset.\n"); |
2882 | 2895 | ||