Skip to content

Commit

Permalink
[SCSI] qla2xxx: Use pci_disable_rom() to manipulate PCI config space.
Browse files Browse the repository at this point in the history
http://bugzilla.kernel.org/show_bug.cgi?id=9422

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Nov 5, 2008
1 parent 821b399 commit 737faec
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ int
qla2100_pci_config(scsi_qla_host_t *ha)
{
uint16_t w;
uint32_t d;
unsigned long flags;
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;

Expand All @@ -151,10 +150,7 @@ qla2100_pci_config(scsi_qla_host_t *ha)
w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
pci_write_config_word(ha->pdev, PCI_COMMAND, w);

/* Reset expansion ROM address decode enable */
pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
d &= ~PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
pci_disable_rom(ha->pdev);

/* Get PCI bus information. */
spin_lock_irqsave(&ha->hardware_lock, flags);
Expand All @@ -174,7 +170,6 @@ int
qla2300_pci_config(scsi_qla_host_t *ha)
{
uint16_t w;
uint32_t d;
unsigned long flags = 0;
uint32_t cnt;
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
Expand Down Expand Up @@ -236,10 +231,7 @@ qla2300_pci_config(scsi_qla_host_t *ha)

pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80);

/* Reset expansion ROM address decode enable */
pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
d &= ~PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
pci_disable_rom(ha->pdev);

/* Get PCI bus information. */
spin_lock_irqsave(&ha->hardware_lock, flags);
Expand All @@ -259,7 +251,6 @@ int
qla24xx_pci_config(scsi_qla_host_t *ha)
{
uint16_t w;
uint32_t d;
unsigned long flags = 0;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;

Expand All @@ -281,10 +272,7 @@ qla24xx_pci_config(scsi_qla_host_t *ha)
if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP))
pcie_set_readrq(ha->pdev, 2048);

/* Reset expansion ROM address decode enable */
pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
d &= ~PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
pci_disable_rom(ha->pdev);

ha->chip_revision = ha->pdev->revision;

Expand All @@ -306,7 +294,6 @@ int
qla25xx_pci_config(scsi_qla_host_t *ha)
{
uint16_t w;
uint32_t d;

pci_set_master(ha->pdev);
pci_try_set_mwi(ha->pdev);
Expand All @@ -320,10 +307,7 @@ qla25xx_pci_config(scsi_qla_host_t *ha)
if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP))
pcie_set_readrq(ha->pdev, 2048);

/* Reset expansion ROM address decode enable */
pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
d &= ~PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
pci_disable_rom(ha->pdev);

ha->chip_revision = ha->pdev->revision;

Expand Down

0 comments on commit 737faec

Please sign in to comment.