Bug 9422 - Direct manipulation of PCI ROM in drivers/scsi/qla2xxx/qla_init.c
Summary: Direct manipulation of PCI ROM in drivers/scsi/qla2xxx/qla_init.c
Status: CLOSED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: SCSI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: io_scsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-20 11:22 UTC by Jon Smirl
Modified: 2012-05-17 15:09 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.27-rc7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Jon Smirl 2007-11-20 11:22:43 UTC
Code in drivers/scsi/qla2xxx/qla_init.c is directly manipulating the PCI ROMs. There is a kernel API for accessing these ROMs in drivers/pci/rom.c. This driver should be converted to use the common API.

drivers/scsi/qla2xxx/qla_init.c:        pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
drivers/scsi/qla2xxx/qla_init.c:        d &= ~PCI_ROM_ADDRESS_ENABLE;
drivers/scsi/qla2xxx/qla_init.c:        pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
drivers/scsi/qla2xxx/qla_init.c:        pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
drivers/scsi/qla2xxx/qla_init.c:        d &= ~PCI_ROM_ADDRESS_ENABLE;
drivers/scsi/qla2xxx/qla_init.c:        pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
drivers/scsi/qla2xxx/qla_init.c:        pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
drivers/scsi/qla2xxx/qla_init.c:        d &= ~PCI_ROM_ADDRESS_ENABLE;
drivers/scsi/qla2xxx/qla_init.c:        pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
drivers/scsi/qla2xxx/qla_init.c:        pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
drivers/scsi/qla2xxx/qla_init.c:        d &= ~PCI_ROM_ADDRESS_ENABLE;
drivers/scsi/qla2xxx/qla_init.c:        pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
Comment 1 Andrew Vasquez 2008-09-22 14:10:51 UTC
Sure.  We can queue patches which use pci_disable_rom() for
the next merge window. 
Comment 2 Alan 2008-09-23 08:11:20 UTC
Patch queued

Note You need to log in before you can comment on or make changes to this bug.