Commit 5e5a291e authored by Steve Cameron's avatar Steve Cameron Committed by Linus Torvalds

[PATCH] cciss.c, use pdev->irq after pci_enable_device

Patch to cciss driver in 2.4.8-pre2 to use pdev->irq
and other pci_dev structure elements only after calling
pci_enable_device.

Morten Helgesen <admin@nextframe.net> sent me this.
parent 26186c58
......@@ -2034,13 +2034,6 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
int cfg_base_addr_index;
int i;
vendor_id = pdev->vendor;
device_id = pdev->device;
irq = pdev->irq;
for(i=0; i<6; i++)
addr[i] = pdev->resource[i].start;
if (pci_enable_device(pdev))
{
printk(KERN_ERR "cciss: Unable to Enable PCI device\n");
......@@ -2052,6 +2045,13 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
return(-1);
}
vendor_id = pdev->vendor;
device_id = pdev->device;
irq = pdev->irq;
for(i=0; i<6; i++)
addr[i] = pdev->resource[i].start;
(void) pci_read_config_word(pdev, PCI_COMMAND,&command);
(void) pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
(void) pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment