patch-2.3.99-pre7 linux/drivers/block/cpqarray.c
Next file: linux/drivers/block/floppy.c
Previous file: linux/drivers/block/amiflop.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Wed May 3 01:45:18 2000
- Orig file:
v2.3.99-pre6/linux/drivers/block/cpqarray.c
- Orig date:
Wed Feb 16 17:03:51 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
@@ -312,7 +312,6 @@
/* This is a bit of a hack... */
int __init init_module(void)
{
- int i, j;
cpqarray_init();
if (nr_ctlr == 0)
return -EIO;
@@ -627,16 +626,15 @@
for(i=0; i<6; i++)
addr[i] = pdev->resource[i].flags;
- (void) pcibios_read_config_word(bus, device_fn,
- PCI_COMMAND,&command);
- (void) pcibios_read_config_byte(bus, device_fn,
- PCI_CLASS_REVISION,&revision);
- (void) pcibios_read_config_byte(bus, device_fn,
- PCI_CACHE_LINE_SIZE, &cache_line_size);
- (void) pcibios_read_config_byte(bus, device_fn,
- PCI_LATENCY_TIMER, &latency_timer);
+ if (pci_enable_device(pdev))
+ return -1;
- (void) pcibios_read_config_dword(bus, device_fn, 0x2c, &board_id);
+ pci_read_config_word(pdev, PCI_COMMAND, &command);
+ pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
+ pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &cache_line_size);
+ pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &latency_timer);
+
+ pci_read_config_dword(pdev, 0x2c, &board_id);
DBGINFO(
printk("vendor_id = %x\n", vendor_id);
@@ -659,7 +657,7 @@
*/
for(i=0; i<6; i++)
if (!(addr[i] & 0x1)) {
- c->paddr = pdev->resource[i].start;
+ c->paddr = pci_resource_start (pdev, i);
break;
}
c->vaddr = remap_pci_mem(c->paddr, 128);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)