diff options
| author | Steve Cameron <scameron@quandary.cca.cpqcorp.net> | 2002-04-09 23:29:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-04-09 23:29:29 -0700 |
| commit | 5e5a291ecb2efae6149bec1a4b601c9c495117aa (patch) | |
| tree | 533e6519d64dbc2f81c28312e272966c89f65e03 | |
| parent | 26186c58b4042b37d4e137b328d3b81887afc26f (diff) | |
[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.
| -rw-r--r-- | drivers/block/cciss.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 9e747ec0d6cf..ec79f89e251d 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -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, |
