Skip to content

Commit

Permalink
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/shemminger/netdev-2.6

* 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
  [PATCH] bcm43xx: Fix access to non-existent PHY registers
  [PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_init
  [PATCH] bcm43xx: check for valid MAC address in SPROM
  [PATCH] ieee80211: Fix A band channel count (resent)
  [PATCH] bcm43xx: fix iwmode crash when down
  [PATCH] softmac: make non-operational after being stopped
  [PATCH] softmac: don't reassociate if user asked for deauthentication
  spidernet: enable support for bcm5461 ethernet phy
  spidernet: introduce new setting
  Fix RTL8019AS init for Toshiba RBTX49xx boards
  au1000_eth.c: use ether_crc() from <linux/crc32.h>
  sky2: version 1.3
  Add more support for the Yukon Ultra chip found in dual core centino laptops.
  sky2: synchronize irq on remove
  sky2: dont write status ring
  sky2: edge triggered workaround enhancement
  sky2: use mask instead of modulo operation
  sky2: tx ring index mask fix
  sky2: status irq hang fix
  sky2: backout NAPI reschedule
  • Loading branch information
Linus Torvalds committed May 9, 2006
2 parents c51e078 + 23aee82 commit 3cd73ee
Show file tree
Hide file tree
Showing 19 changed files with 283 additions and 178 deletions.
18 changes: 1 addition & 17 deletions drivers/net/au1000_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <linux/mii.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/crc32.h>
#include <asm/mipsregs.h>
#include <asm/irq.h>
#include <asm/io.h>
Expand Down Expand Up @@ -2070,23 +2071,6 @@ static void au1000_tx_timeout(struct net_device *dev)
netif_wake_queue(dev);
}


static unsigned const ethernet_polynomial = 0x04c11db7U;
static inline u32 ether_crc(int length, unsigned char *data)
{
int crc = -1;

while(--length >= 0) {
unsigned char current_octet = *data++;
int bit;
for (bit = 0; bit < 8; bit++, current_octet >>= 1)
crc = (crc << 1) ^
((crc < 0) ^ (current_octet & 1) ?
ethernet_polynomial : 0);
}
return crc;
}

static void set_rx_mode(struct net_device *dev)
{
struct au1000_private *aup = (struct au1000_private *) dev->priv;
Expand Down
31 changes: 19 additions & 12 deletions drivers/net/ne.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ bad_clone_list[] __initdata = {

#if defined(CONFIG_PLAT_MAPPI)
# define DCR_VAL 0x4b
#elif defined(CONFIG_PLAT_OAKS32R)
# define DCR_VAL 0x48
#elif defined(CONFIG_PLAT_OAKS32R) || \
defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938)
# define DCR_VAL 0x48 /* 8-bit mode */
#else
# define DCR_VAL 0x49
#endif
Expand Down Expand Up @@ -396,10 +397,22 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
/* We must set the 8390 for word mode. */
outb_p(DCR_VAL, ioaddr + EN0_DCFG);
start_page = NESM_START_PG;
stop_page = NESM_STOP_PG;

/*
* Realtek RTL8019AS datasheet says that the PSTOP register
* shouldn't exceed 0x60 in 8-bit mode.
* This chip can be identified by reading the signature from
* the remote byte count registers (otherwise write-only)...
*/
if ((DCR_VAL & 0x01) == 0 && /* 8-bit mode */
inb(ioaddr + EN0_RCNTLO) == 0x50 &&
inb(ioaddr + EN0_RCNTHI) == 0x70)
stop_page = 0x60;
else
stop_page = NESM_STOP_PG;
} else {
start_page = NE1SM_START_PG;
stop_page = NE1SM_STOP_PG;
stop_page = NE1SM_STOP_PG;
}

#if defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R)
Expand Down Expand Up @@ -509,15 +522,9 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
ei_status.name = name;
ei_status.tx_start_page = start_page;
ei_status.stop_page = stop_page;
#if defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938)
wordlength = 1;
#endif

#ifdef CONFIG_PLAT_OAKS32R
ei_status.word16 = 0;
#else
ei_status.word16 = (wordlength == 2);
#endif
/* Use 16-bit mode only if this wasn't overridden by DCR_VAL */
ei_status.word16 = (wordlength == 2 && (DCR_VAL & 0x01));

ei_status.rx_start_page = start_page + TX_PAGES;
#ifdef PACKETBUF_MEMSIZE
Expand Down
Loading

0 comments on commit 3cd73ee

Please sign in to comment.