patch-2.3.99-pre7 linux/drivers/char/sx.c
Next file: linux/drivers/char/synclink.c
Previous file: linux/drivers/char/stradis.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Fri Apr 28 23:00:06 2000
- Orig file:
v2.3.99-pre6/linux/drivers/char/sx.c
- Orig date:
Wed Apr 26 16:34:07 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/char/sx.c linux/drivers/char/sx.c
@@ -2472,6 +2472,8 @@
while ((pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX,
PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8,
pdev))) {
+ if (pci_enable_device(pdev))
+ continue;
#else
for (i=0;i< SX_NBOARDS;i++) {
if (pcibios_find_device (PCI_VENDOR_ID_SPECIALIX,
@@ -2503,14 +2505,16 @@
/* CF boards use base address 3.... */
if (IS_CF_BOARD (board))
- pci_read_config_dword(pdev, PCI_BASE_ADDRESS_3,
- &tint);
+ board->hw_base = pci_resource_start (pdev, 3);
else
- pci_read_config_dword(pdev, PCI_BASE_ADDRESS_2,
- &tint);
- board->hw_base = tint & PCI_BASE_ADDRESS_MEM_MASK;
+ board->hw_base = pci_resource_start (pdev, 2);
board->base2 =
board->base = (ulong) ioremap(board->hw_base, WINDOW_LEN (board));
+ if (!board->base) {
+ printk(KERN_ERR "ioremap failed\n");
+ /* XXX handle error */
+ }
+
/* Most of the stuff on the CF board is offset by
0x18000 .... */
if (IS_CF_BOARD (board)) board->base += 0x18000;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)