Commit 2b6165ae authored by Linus Torvalds's avatar Linus Torvalds

Merge http://gkernel.bkbits.net/net-drivers-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 130ca59d 60b22456
......@@ -221,6 +221,8 @@ typedef enum {
FE2000VX,
ALLIED8139,
RTL8129,
FNW3603TX,
FNW3800TX,
} board_t;
......@@ -240,6 +242,8 @@ static struct {
{ "AboCom FE2000VX (RealTek RTL8139)", RTL8139_CAPS },
{ "Allied Telesyn 8139 CardBus", RTL8139_CAPS },
{ "RealTek RTL8129", RTL8129_CAPS },
{ "Planex FNW-3603-TX 10/100 CardBus", RTL8139_CAPS },
{ "Planex FNW-3800-TX 10/100 CardBus", RTL8139_CAPS },
};
......@@ -254,6 +258,8 @@ static struct pci_device_id rtl8139_pci_tbl[] __devinitdata = {
{0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE690TXD },
{0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FE2000VX },
{0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ALLIED8139 },
{0x14ea, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FNW3603TX },
{0x14ea, 0xab07, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FNW3800TX },
#ifdef CONFIG_8139TOO_8129
{0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8129 },
......
......@@ -1108,7 +1108,6 @@ set_multicast (struct net_device *dev)
u16 rx_mode = 0;
int i;
int bit;
int index, crc;
struct dev_mc_list *mclist;
struct netdev_private *np = dev->priv;
......@@ -1130,13 +1129,14 @@ set_multicast (struct net_device *dev)
for (i=0, mclist = dev->mc_list; mclist && i < dev->mc_count;
i++, mclist=mclist->next) {
crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
int index = 0;
int crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
/* The inverted high significant 6 bits of CRC are
used as an index to hashtable */
for (index = 0, bit = 0; bit < 6; bit++)
if (test_bit(31 - bit, &crc))
set_bit(bit, &index);
for (bit = 0; bit < 6; bit++)
if (crc & (1 << (31 - bit)))
index |= (1 << bit);
hash_table[index / 32] |= (1 << (index % 32));
}
......@@ -1635,7 +1635,7 @@ rio_close (struct net_device *dev)
/* Stop Tx and Rx logics */
writel (TxDisable | RxDisable | StatsDisable, ioaddr + MACCtrl);
synchronize_irq ();
synchronize_irq (dev->irq);
free_irq (dev->irq, dev);
del_timer_sync (&np->timer);
......
......@@ -804,8 +804,6 @@ static struct pci_driver e100_driver = {
#ifdef CONFIG_PM
.suspend = e100_suspend,
.resume = e100_resume,
.save_state = e100_save_state,
.enable_wake = e100_enable_wake,
#endif
};
......
......@@ -23,6 +23,8 @@
This is a compatibility hardware problem.
Versions:
0.13a in memory shortage, drop packets also in board
(Michael Westermann <mw@microdata-pos.de>, 07/30/2002)
0.13 irq sharing, rewrote probe function, fixed a nasty bug in
hardware_send_packet and a major cleanup (aris, 11/08/2001)
0.12d fixing a problem with single card detected as eight eth devices
......@@ -665,37 +667,37 @@ static void eepro_print_info (struct net_device *dev)
i = inb(dev->base_addr + ID_REG);
printk(KERN_DEBUG " id: %#x ",i);
printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
printk(" io: %#x ", (unsigned)dev->base_addr);
switch (lp->eepro) {
case LAN595FX_10ISA:
printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595FX:
printk(KERN_INFO "%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595TX:
printk(KERN_INFO "%s: Intel EtherExpress Pro/10 ISA at %#x,",
printk("%s: Intel EtherExpress Pro/10 ISA at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595:
printk(KERN_INFO "%s: Intel 82595-based lan card at %#x,",
printk("%s: Intel 82595-based lan card at %#x,",
dev->name, (unsigned)dev->base_addr);
}
for (i=0; i < 6; i++)
printk(KERN_INFO "%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
if (net_debug > 3)
printk(KERN_DEBUG ", %dK RCV buffer",
(int)(lp->rcv_ram)/1024);
if (dev->irq > 2)
printk(KERN_INFO ", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
printk(", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
else
printk(KERN_INFO ", %s.\n", ifmap[dev->if_port]);
printk(", %s.\n", ifmap[dev->if_port]);
if (net_debug > 3) {
i = read_eeprom(dev->base_addr, 5, dev);
......@@ -1584,6 +1586,10 @@ eepro_rx(struct net_device *dev)
if (skb == NULL) {
printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name);
lp->stats.rx_dropped++;
rcv_car = lp->rx_start + RCV_HEADER + rcv_size;
lp->rx_start = rcv_next_frame;
outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);
break;
}
skb->dev = dev;
......
/* drivers/net/eepro100.c: An Intel i82557-559 Ethernet driver for Linux. */
/*
NOTICE: For use with late 2.3 kernels only.
May not compile for kernels 2.3.43-47.
Written 1996-1999 by Donald Becker.
The driver also contains updates by different kernel developers
......@@ -25,8 +23,8 @@
Disabled FC and ER, to avoid lockups when when we get FCP interrupts.
2000 Jul 17 Goutham Rao <goutham.rao@intel.com>
PCI DMA API fixes, adding pci_dma_sync_single calls where neccesary
2000 Aug 31 David Mosberger <davidm@hpl.hp.com>
RX_ALIGN support: enables rx DMA without causing unaligned accesses.
2000 Aug 31 David Mosberger <davidm@hpl.hp.com>
rx_align support: enables rx DMA without causing unaligned accesses.
*/
static const char *version =
......@@ -46,9 +44,10 @@ static int rxdmacount /* = 0 */;
#if defined(__ia64__) || defined(__alpha__) || defined(__sparc__) || defined(__mips__) || \
defined(__arm__)
/* align rx buffers to 2 bytes so that IP header is aligned */
# define RX_ALIGN
# define rx_align(skb) skb_reserve((skb), 2)
# define RxFD_ALIGNMENT __attribute__ ((aligned (2), packed))
#else
# define rx_align(skb)
# define RxFD_ALIGNMENT
#endif
......@@ -531,10 +530,6 @@ static int eepro100_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent);
static void eepro100_remove_one (struct pci_dev *pdev);
#ifdef CONFIG_PM
static int eepro100_suspend (struct pci_dev *pdev, u32 state);
static int eepro100_resume (struct pci_dev *pdev);
#endif
static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len);
static int mdio_read(long ioaddr, int phy_id, int location);
......@@ -1240,9 +1235,8 @@ speedo_init_rx_ring(struct net_device *dev)
for (i = 0; i < RX_RING_SIZE; i++) {
struct sk_buff *skb;
skb = dev_alloc_skb(PKT_BUF_SZ + sizeof(struct RxFD));
#ifdef RX_ALIGN
skb_reserve(skb, 2); /* Align IP on 16 byte boundary */
#endif
/* XXX: do we really want to call this before the NULL check? --hch */
rx_align(skb); /* Align IP on 16 byte boundary */
sp->rx_skbuff[i] = skb;
if (skb == NULL)
break; /* OK. Just initially short of Rx bufs. */
......@@ -1634,9 +1628,8 @@ static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry)
struct sk_buff *skb;
/* Get a fresh skbuff to replace the consumed one. */
skb = dev_alloc_skb(PKT_BUF_SZ + sizeof(struct RxFD));
#ifdef RX_ALIGN
skb_reserve(skb, 2); /* Align IP on 16 byte boundary */
#endif
/* XXX: do we really want to call this before the NULL check? --hch */
rx_align(skb); /* Align IP on 16 byte boundary */
sp->rx_skbuff[entry] = skb;
if (skb == NULL) {
sp->rx_ringp[entry] = NULL;
......@@ -2320,12 +2313,10 @@ static struct pci_driver eepro100_driver = {
.name = "eepro100",
.id_table = eepro100_pci_tbl,
.probe = eepro100_init_one,
# if defined(MODULE) || defined(CONFIG_HOTPLUG)
.remove = __devexit_p(eepro100_remove_one),
# endif
#ifdef CONFIG_PM
.suspend = eepro100_suspend,
.resume = eepro100_resume,
.resume = eepro100_resume,
#endif /* CONFIG_PM */
};
......
......@@ -63,12 +63,15 @@
LK1.1.13:
* revert version 1.1.12, power-up sequence "fix"
*/
LK1.1.14 (Kryzsztof Halasa):
* fix spurious bad initializations
* pound phy a la SMSC's app note on the subject
#define DRV_NAME "epic100"
#define DRV_VERSION "1.11+LK1.1.13"
#define DRV_RELDATE "Mar 20, 2002"
*/
#define DRV_NAME "epic100"
#define DRV_VERSION "1.11+LK1.1.14"
#define DRV_RELDATE "Aug 4, 2002"
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -457,7 +460,9 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
/* Bring the chip out of low-power mode. */
outl(0x4200, ioaddr + GENCTL);
/* Magic?! If we don't set this bit the MII interface won't work. */
outl(0x0008, ioaddr + TEST1);
/* This magic is documented in SMSC app note 7.15 */
for (i = 16; i > 0; i--)
outl(0x0008, ioaddr + TEST1);
/* Turn on the MII transceiver. */
outl(0x12, ioaddr + MIICfg);
......@@ -674,7 +679,8 @@ static int epic_open(struct net_device *dev)
outl(0x4000, ioaddr + GENCTL);
/* This magic is documented in SMSC app note 7.15 */
outl(0x0008, ioaddr + TEST1);
for (i = 16; i > 0; i--)
outl(0x0008, ioaddr + TEST1);
/* Pull the chip out of low-power mode, enable interrupts, and set for
PCI read multiple. The MIIcfg setting and strange write order are
......@@ -697,6 +703,8 @@ static int epic_open(struct net_device *dev)
outl(0x0412 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL);
#endif
udelay(20); /* Looks like EPII needs that if you want reliable RX init. FIXME: pci posting bug? */
for (i = 0; i < 3; i++)
outl(cpu_to_le16(((u16*)dev->dev_addr)[i]), ioaddr + LAN0 + i*4);
......
......@@ -755,7 +755,7 @@ static void ns83820_cleanup_rx(struct ns83820 *dev)
/* synchronize with the interrupt handler and kill it */
dev->rx_info.up = 0;
synchronize_irq();
synchronize_irq(dev->pci_dev->irq);
/* touch the pci bus... */
readl(dev->base + IMR);
......@@ -1296,11 +1296,11 @@ static int ns83820_stop(struct net_device *_dev)
readl(dev->base + IER);
dev->rx_info.up = 0;
synchronize_irq();
synchronize_irq(dev->pci_dev->irq);
ns83820_do_reset(dev, CR_RST);
synchronize_irq();
synchronize_irq(dev->pci_dev->irq);
dev->IMR_cache &= ~(ISR_TXURN | ISR_TXIDLE | ISR_TXERR | ISR_TXDESC | ISR_TXOK);
ns83820_cleanup_rx(dev);
......
......@@ -461,7 +461,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
}
static void __exit dmfe_remove_one (struct pci_dev *pdev)
static void __devexit dmfe_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct dmfe_board_info *db = dev->priv;
......
......@@ -218,6 +218,9 @@ static struct pci_device_id tulip_pci_tbl[] __devinitdata = {
{ 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 },
{ 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x14f1, 0x1803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CONEXANT },
{ 0x1186, 0x1561, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x1626, 0x8410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ 0x1737, 0xAB09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, tulip_pci_tbl);
......
......@@ -364,9 +364,7 @@ static struct pci_driver orinoco_pci_driver = {
.name = "orinoco_pci",
.id_table = orinoco_pci_pci_id_table,
.probe = orinoco_pci_init_one,
.remove = orinoco_pci_remove_one,
.suspend = 0,
.resume = 0
.remove = __devexit_p(orinoco_pci_remove_one),
};
static int __init orinoco_pci_init(void)
......
......@@ -363,6 +363,7 @@ static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev)
static struct pci_device_id orinoco_plx_pci_id_table[] __devinitdata = {
{0x10b7, 0x7770, PCI_ANY_ID, PCI_ANY_ID,}, /* 3ComAirConnect */
{0x111a, 0x1023, PCI_ANY_ID, PCI_ANY_ID,}, /* Siemens SpeedStream SS1023 */
{0x1385, 0x4100, PCI_ANY_ID, PCI_ANY_ID,}, /* Netgear MA301 */
{0x15e8, 0x0130, PCI_ANY_ID, PCI_ANY_ID,}, /* Correga - does this work? */
......@@ -385,9 +386,7 @@ static struct pci_driver orinoco_plx_driver = {
.name = "orinoco_plx",
.id_table = orinoco_plx_pci_id_table,
.probe = orinoco_plx_init_one,
.remove = orinoco_plx_remove_one,
.suspend = 0,
.resume = 0
.remove = __devexit_p(orinoco_plx_remove_one),
};
static int __init orinoco_plx_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment