Re: 2.1.110 compile problems

Krzysztof G. Baranowski (kgb@manjak.knm.org.pl)
Thu, 23 Jul 1998 15:02:15 +0200 (CEST)


On Wed, 22 Jul 1998, bryan sebastian kiechle wrote:
> if you remove the FREE_WRITE from any referance to dev_kfree_skb in the
> tlan.c file this problem goes away, most of the time. As in:
[...]
> As told to me by brian@goober.wireless.ucsc.edu
Try this patch.

Kris

-- 
Krzysztof G. Baranowski - President of the Harmless Manyacs' Club
"Smith & Wesson - The original point and click interface..."
http://www.knm.org.pl/                 <prezes@manjak.knm.org.pl>

--- tlan.c-orig Thu Jul 22 02:16:59 1998 +++ tlan.c Thu Jul 22 02:10:45 1998 @@ -32,7 +32,6 @@ #include "tlan.h" -#include <linux/bios32.h> #include <linux/ioport.h> #include <linux/pci.h> #include <linux/etherdevice.h> @@ -151,7 +150,7 @@ }; -static int TLan_PciProbe( u8 *, u8 *, u8 *, u8 *, u32 *, u32 * ); +static int TLan_PciProbe( u8 *, u8 *, int *, u8 *, u32 *, u32 * ); static int TLan_Init( struct device * ); static int TLan_Open(struct device *dev); static int TLan_StartTx(struct sk_buff *, struct device *); @@ -276,7 +275,7 @@ int failed; int found; u32 io_base; - u8 irq; + int irq; u8 rev; printk( "TLAN driver, v%d.%d, (C) 1997-8 Caldera, Inc.\n", @@ -416,7 +415,8 @@ TLanPrivateInfo *priv; static int pad_allocated = 0; int found; - u8 bus, dfn, irq, rev; + u8 bus, dfn, rev; + int irq; u32 io_base, index; found = TLan_PciProbe( &bus, &dfn, &irq, &rev, &io_base, &index ); @@ -436,7 +436,6 @@ if ( ! pad_allocated ) { TLanPadBuffer = (u8 *) kmalloc( TLAN_MIN_FRAME_SIZE, -// ( GFP_KERNEL | GFP_DMA ) ( GFP_KERNEL ) ); if ( TLanPadBuffer == NULL ) { @@ -521,7 +520,7 @@ * **************************************************************/ -int TLan_PciProbe( u8 *pci_bus, u8 *pci_dfn, u8 *pci_irq, u8 *pci_rev, u32 *pci_io_base, u32 *dl_ix ) +int TLan_PciProbe( u8 *pci_bus, u8 *pci_dfn, int *pci_irq, u8 *pci_rev, u32 *pci_io_base, u32 *dl_ix ) { static int dl_index = 0; static int pci_index = 0; @@ -532,7 +531,7 @@ int reg; - if ( ! pcibios_present() ) { + if ( ! pci_present() ) { printk( "TLAN: PCI Bios not present.\n" ); return 0; } @@ -548,6 +547,7 @@ ); if ( ! not_found ) { + struct pci_dev *pdev = pci_find_slot(*pci_bus, *pci_dfn); TLAN_DBG( TLAN_DEBUG_GNRL, @@ -556,19 +556,19 @@ TLanAdapterList[dl_index].deviceId ); - pcibios_read_config_byte ( *pci_bus, *pci_dfn, PCI_REVISION_ID, pci_rev); - pcibios_read_config_byte ( *pci_bus, *pci_dfn, PCI_INTERRUPT_LINE, pci_irq); - pcibios_read_config_word ( *pci_bus, *pci_dfn, PCI_COMMAND, &pci_command); - pcibios_read_config_dword( *pci_bus, *pci_dfn, PCI_BASE_ADDRESS_0, pci_io_base); - pcibios_read_config_byte ( *pci_bus, *pci_dfn, PCI_LATENCY_TIMER, &pci_latency); + pci_read_config_byte ( pdev, PCI_REVISION_ID, pci_rev); + *pci_irq = pdev->irq; + pci_read_config_word ( pdev, PCI_COMMAND, &pci_command); + pci_read_config_byte ( pdev, PCI_LATENCY_TIMER, &pci_latency); + if (pci_latency < 0x10) { - pcibios_write_config_byte( *pci_bus, *pci_dfn, PCI_LATENCY_TIMER, 0xff); + pci_write_config_byte( pdev, PCI_LATENCY_TIMER, 0xff); TLAN_DBG( TLAN_DEBUG_GNRL, "TLAN: Setting latency timer to max.\n"); } - for ( reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg +=4 ) { - pcibios_read_config_dword( *pci_bus, *pci_dfn, reg, pci_io_base); + for ( reg = 0; reg <= 5; reg ++ ) { + *pci_io_base = pdev->base_address[reg]; if ((pci_command & PCI_COMMAND_IO) && (*pci_io_base & 0x3)) { *pci_io_base &= PCI_BASE_ADDRESS_IO_MASK; TLAN_DBG( TLAN_DEBUG_GNRL, "TLAN: IO mapping is available at %x.\n", *pci_io_base); @@ -582,7 +582,7 @@ printk("TLAN: IO mapping not available, ignoring device.\n"); if ( ! ( pci_command & PCI_COMMAND_MASTER ) ) { - pcibios_write_config_word ( *pci_bus, *pci_dfn, PCI_COMMAND, pci_command | PCI_COMMAND_MASTER ); + pci_write_config_word ( pdev, PCI_COMMAND, pci_command | PCI_COMMAND_MASTER ); printk( "TLAN: Activating PCI bus mastering for this device.\n" ); } @@ -779,7 +779,7 @@ if ( ! priv->phyOnline ) { TLAN_DBG( TLAN_DEBUG_TX, "TLAN TRANSMIT: %s PHY is not ready\n", dev->name ); - dev_kfree_skb( skb, FREE_WRITE ); + dev_kfree_skb( skb ); return 0; } @@ -837,7 +837,7 @@ CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); if ( bbuf ) { - dev_kfree_skb( skb, FREE_WRITE ); + dev_kfree_skb( skb ); } dev->trans_start = jiffies; @@ -1126,7 +1126,7 @@ head_list = priv->txList + priv->txHead; if ( ! bbuf ) { - dev_kfree_skb( (struct sk_buff *) head_list->buffer[9].address, FREE_WRITE ); + dev_kfree_skb( (struct sk_buff *) head_list->buffer[9].address ); head_list->buffer[9].address = 0; } @@ -1692,7 +1692,7 @@ list = priv->txList + i; skb = (struct sk_buff *) list->buffer[9].address; if ( skb ) { - dev_kfree_skb( skb, FREE_WRITE ); + dev_kfree_skb( skb ); list->buffer[9].address = 0; } } @@ -1701,7 +1701,7 @@ list = priv->rxList + i; skb = (struct sk_buff *) list->buffer[9].address; if ( skb ) { - dev_kfree_skb( skb, FREE_READ ); + dev_kfree_skb( skb ); list->buffer[9].address = 0; } }

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html