patch-2.2.13 linux/drivers/isdn/hisax/avm_pci.c
Next file: linux/drivers/isdn/hisax/bkm_a4t.c
Previous file: linux/drivers/isdn/hisax/avm_a1p.c
Back to the patch index
Back to the overall index
- Lines: 115
- Date:
Tue Oct 19 17:14:00 1999
- Orig file:
v2.2.12/linux/drivers/isdn/hisax/avm_pci.c
- Orig date:
Tue Oct 19 17:10:37 1999
diff -u --recursive --new-file v2.2.12/linux/drivers/isdn/hisax/avm_pci.c linux/drivers/isdn/hisax/avm_pci.c
@@ -1,4 +1,4 @@
-/* $Id: avm_pci.c,v 1.11 1999/08/11 21:01:18 keil Exp $
+/* $Id: avm_pci.c,v 1.12 1999/09/04 06:20:05 keil Exp $
* avm_pci.c low level stuff for AVM Fritz!PCI and ISA PnP isdn cards
* Thanks to AVM, Berlin for informations
@@ -7,6 +7,9 @@
*
*
* $Log: avm_pci.c,v $
+ * Revision 1.12 1999/09/04 06:20:05 keil
+ * Changes from kernel set_current_state()
+ *
* Revision 1.11 1999/08/11 21:01:18 keil
* new PCI codefix
*
@@ -50,13 +53,10 @@
#include "isac.h"
#include "isdnl1.h"
#include <linux/pci.h>
-#ifndef COMPAT_HAS_NEW_PCI
-#include <linux/bios32.h>
-#endif
#include <linux/interrupt.h>
extern const char *CardType[];
-static const char *avm_pci_rev = "$Revision: 1.11 $";
+static const char *avm_pci_rev = "$Revision: 1.12 $";
#define AVM_FRITZ_PCI 1
#define AVM_FRITZ_PNP 2
@@ -482,7 +482,7 @@
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.hdlc.count);
- idev_kfree_skb(bcs->tx_skb, FREE_WRITE);
+ dev_kfree_skb(bcs->tx_skb);
bcs->hw.hdlc.count = 0;
bcs->tx_skb = NULL;
}
@@ -609,7 +609,7 @@
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- idev_kfree_skb(bcs->tx_skb, FREE_WRITE);
+ dev_kfree_skb(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
@@ -773,11 +773,7 @@
return(0);
}
-#ifdef COMPAT_HAS_NEW_PCI
static struct pci_dev *dev_avm __initdata = NULL;
-#else
-static int pci_index __initdata = 0;
-#endif
__initfunc(int
setup_avm_pcipnp(struct IsdnCard *card))
@@ -796,7 +792,6 @@
cs->subtyp = AVM_FRITZ_PNP;
} else {
#if CONFIG_PCI
-#ifdef COMPAT_HAS_NEW_PCI
if (!pci_present()) {
printk(KERN_ERR "FritzPCI: no PCI bus present\n");
return(0);
@@ -808,7 +803,7 @@
printk(KERN_WARNING "FritzPCI: No IRQ for PCI card found\n");
return(0);
}
- cs->hw.avm.cfg_reg = get_pcibase(dev_avm, 1) &
+ cs->hw.avm.cfg_reg = dev_avm->base_address[ 1] &
PCI_BASE_ADDRESS_IO_MASK;
if (!cs->hw.avm.cfg_reg) {
printk(KERN_WARNING "FritzPCI: No IO-Adr for PCI card found\n");
@@ -819,36 +814,6 @@
printk(KERN_WARNING "FritzPCI: No PCI card found\n");
return(0);
}
-#else
- for (; pci_index < 255; pci_index++) {
- unsigned char pci_bus, pci_device_fn;
- unsigned int ioaddr;
- unsigned char irq;
-
- if (pcibios_find_device (PCI_VENDOR_AVM,
- PCI_FRITZPCI_ID, pci_index,
- &pci_bus, &pci_device_fn) != 0) {
- continue;
- }
- pcibios_read_config_byte(pci_bus, pci_device_fn,
- PCI_INTERRUPT_LINE, &irq);
- pcibios_read_config_dword(pci_bus, pci_device_fn,
- PCI_BASE_ADDRESS_1, &ioaddr);
- cs->irq = irq;
- cs->hw.avm.cfg_reg = ioaddr & PCI_BASE_ADDRESS_IO_MASK;
- if (!cs->hw.avm.cfg_reg) {
- printk(KERN_WARNING "FritzPCI: No IO-Adr for PCI card found\n");
- return(0);
- }
- cs->subtyp = AVM_FRITZ_PCI;
- break;
- }
- if (pci_index == 255) {
- printk(KERN_WARNING "FritzPCI: No PCI card found\n");
- return(0);
- }
- pci_index++;
-#endif /* COMPAT_HAS_NEW_PCI */
cs->irq_flags |= SA_SHIRQ;
#else
printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)