patch-2.4.21 linux-2.4.21/drivers/net/sun3lance.c
Next file: linux-2.4.21/drivers/net/sunhme.c
Previous file: linux-2.4.21/drivers/net/sun3_82586.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
2003-06-13 07:51:35.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/sun3lance.c
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.20/drivers/net/sun3lance.c linux-2.4.21/drivers/net/sun3lance.c
@@ -280,7 +280,7 @@
static int __init lance_probe( struct net_device *dev)
{
- unsigned long ioaddr;
+ unsigned long ioaddr;
struct lance_private *lp;
int i;
static int did_version;
@@ -288,26 +288,7 @@
unsigned short tmp1, tmp2;
#ifdef CONFIG_SUN3
- unsigned long iopte;
- int found = 0;
-
- /* LANCE_OBIO can be found within the IO pmeg with some effort */
- for(ioaddr = 0xfe00000; ioaddr < (0xfe00000 +
- SUN3_PMEG_SIZE); ioaddr += SUN3_PTE_SIZE) {
-
- iopte = sun3_get_pte(ioaddr);
- if(!(iopte & SUN3_PAGE_TYPE_IO)) /* this an io page? */
- continue;
-
- if(((iopte & SUN3_PAGE_PGNUM_MASK) << PAGE_SHIFT) ==
- LANCE_OBIO) {
- found = 1;
- break;
- }
- }
-
- if(!found)
- return 0;
+ ioaddr = (unsigned long)ioremap(LANCE_OBIO, PAGE_SIZE);
#else
ioaddr = SUN3X_LANCE;
#endif
@@ -616,6 +597,9 @@
head->misc = 0;
memcpy( PKTBUF_ADDR(head), (void *)skb->data, skb->len );
+ if(len != skb->len)
+ memset(PKTBUF_ADDR(head) + skb->len, 0, len-skb->len);
+
head->flag = TMD1_OWN_CHIP | TMD1_ENP | TMD1_STP;
lp->new_tx = (lp->new_tx + 1) & TX_RING_MOD_MASK;
lp->stats.tx_bytes += skb->len;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)