diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-10-24 18:13:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-11-05 12:41:28 -0500 |
commit | 737faece278ffec78612675bc378a4258d8293bb (patch) | |
tree | 352f6843950dc7e14f6afb16294701a2faa4c4b6 | |
parent | 821b3996001508e872582dcafc7575021f122728 (diff) |
[SCSI] qla2xxx: Use pci_disable_rom() to manipulate PCI config space.
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>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index a470f2d3270d..ecf91ad40272 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -140,7 +140,6 @@ int | |||
140 | qla2100_pci_config(scsi_qla_host_t *ha) | 140 | qla2100_pci_config(scsi_qla_host_t *ha) |
141 | { | 141 | { |
142 | uint16_t w; | 142 | uint16_t w; |
143 | uint32_t d; | ||
144 | unsigned long flags; | 143 | unsigned long flags; |
145 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 144 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
146 | 145 | ||
@@ -151,10 +150,7 @@ qla2100_pci_config(scsi_qla_host_t *ha) | |||
151 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | 150 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); |
152 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); | 151 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); |
153 | 152 | ||
154 | /* Reset expansion ROM address decode enable */ | 153 | pci_disable_rom(ha->pdev); |
155 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
156 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
157 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
158 | 154 | ||
159 | /* Get PCI bus information. */ | 155 | /* Get PCI bus information. */ |
160 | spin_lock_irqsave(&ha->hardware_lock, flags); | 156 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -174,7 +170,6 @@ int | |||
174 | qla2300_pci_config(scsi_qla_host_t *ha) | 170 | qla2300_pci_config(scsi_qla_host_t *ha) |
175 | { | 171 | { |
176 | uint16_t w; | 172 | uint16_t w; |
177 | uint32_t d; | ||
178 | unsigned long flags = 0; | 173 | unsigned long flags = 0; |
179 | uint32_t cnt; | 174 | uint32_t cnt; |
180 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 175 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -236,10 +231,7 @@ qla2300_pci_config(scsi_qla_host_t *ha) | |||
236 | 231 | ||
237 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); | 232 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); |
238 | 233 | ||
239 | /* Reset expansion ROM address decode enable */ | 234 | pci_disable_rom(ha->pdev); |
240 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
241 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
242 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
243 | 235 | ||
244 | /* Get PCI bus information. */ | 236 | /* Get PCI bus information. */ |
245 | spin_lock_irqsave(&ha->hardware_lock, flags); | 237 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -259,7 +251,6 @@ int | |||
259 | qla24xx_pci_config(scsi_qla_host_t *ha) | 251 | qla24xx_pci_config(scsi_qla_host_t *ha) |
260 | { | 252 | { |
261 | uint16_t w; | 253 | uint16_t w; |
262 | uint32_t d; | ||
263 | unsigned long flags = 0; | 254 | unsigned long flags = 0; |
264 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 255 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
265 | 256 | ||
@@ -281,10 +272,7 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
281 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | 272 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
282 | pcie_set_readrq(ha->pdev, 2048); | 273 | pcie_set_readrq(ha->pdev, 2048); |
283 | 274 | ||
284 | /* Reset expansion ROM address decode enable */ | 275 | pci_disable_rom(ha->pdev); |
285 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
286 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
287 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
288 | 276 | ||
289 | ha->chip_revision = ha->pdev->revision; | 277 | ha->chip_revision = ha->pdev->revision; |
290 | 278 | ||
@@ -306,7 +294,6 @@ int | |||
306 | qla25xx_pci_config(scsi_qla_host_t *ha) | 294 | qla25xx_pci_config(scsi_qla_host_t *ha) |
307 | { | 295 | { |
308 | uint16_t w; | 296 | uint16_t w; |
309 | uint32_t d; | ||
310 | 297 | ||
311 | pci_set_master(ha->pdev); | 298 | pci_set_master(ha->pdev); |
312 | pci_try_set_mwi(ha->pdev); | 299 | pci_try_set_mwi(ha->pdev); |
@@ -320,10 +307,7 @@ qla25xx_pci_config(scsi_qla_host_t *ha) | |||
320 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | 307 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
321 | pcie_set_readrq(ha->pdev, 2048); | 308 | pcie_set_readrq(ha->pdev, 2048); |
322 | 309 | ||
323 | /* Reset expansion ROM address decode enable */ | 310 | pci_disable_rom(ha->pdev); |
324 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
325 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
326 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
327 | 311 | ||
328 | ha->chip_revision = ha->pdev->revision; | 312 | ha->chip_revision = ha->pdev->revision; |
329 | 313 | ||