Bug 9422

Summary: Direct manipulation of PCI ROM in drivers/scsi/qla2xxx/qla_init.c
Product: IO/Storage Reporter: Jon Smirl (jonsmirl)
Component: SCSIAssignee: io_scsi
Status: CLOSED CODE_FIX    
Severity: normal CC: alan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-rc7 Subsystem:
Regression: No Bisected commit-id:

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