Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 583 → Rev 584

/shark/trunk/drivers/newnet/eth.c
20,11 → 20,11
 
/**
------------
CVS : $Id: eth.c,v 1.1 2004-04-23 14:30:32 mauro Exp $
CVS : $Id: eth.c,v 1.2 2004-04-23 18:13:51 mauro Exp $
 
File: $File$
Revision: $Revision: 1.1 $
Last update: $Date: 2004-04-23 14:30:32 $
Revision: $Revision: 1.2 $
Last update: $Date: 2004-04-23 18:13:51 $
------------
**/
 
74,7 → 74,7
/*#include "lowlev.h"
//#include "3com.h" */
 
#define DEBUG_ETH
//#define DEBUG_ETH
 
#define ETH_PAGE 5
 
128,12 → 128,9
kern_raise(ETH_NULLPROTOCOL_EXC,NIL);
}
 
 
 
 
void dev_tint(struct device *dev)
{
printk(KERN_WARNING "Warning!!!! dev_tint called!!! (Why?)\n");
printk(KERN_WARNING "Warning! dev_tint called. (Why?)\n");
sys_abort(201);
}
 
145,7 → 142,7
 
void netif_rx(struct sk_buff *skb)
{
//cprintf("DENTRO netif_rx, skbuf=%p\n",skb->data);
// cprintf("DENTRO netif_rx, skbuf=%p\n",skb->data);
if (nettask_pid == NIL) {
printk(KERN_CRIT "Net receives packets, but the driver doesn't exist.\n");
sys_abort(300);
152,7 → 149,7
}
 
port_send(NetRxPort,skb,NON_BLOCK);
/* task_activate(nettask_pid);*/
// task_activate(nettask_pid);
}
 
TASK net_extern_driver(void)
190,7 → 187,7
/* debug... */
netlev = 20;
 
//cprintf("ETH: releasing %p\n", pkt);
// cprintf("ETH: releasing %p\n", pkt);
 
// NOTE changed by PJ because skb.data not always point to the
// buffer start!!!... it is skb.head that always points there!
243,7 → 240,7
len -= offset;
for (i = 0; i < len; i += 10) {
for (j = 0; j < 10; j++)
cprintf("%2.2x ",pkt[offset+i+j]);
cprintf("%2.2x ", pkt[offset+i+j]);
for (j = 0; j < 10; j++)
cputc(pkt[offset+i+j]);
cprintf("\n");
253,7 → 250,7
 
void eth_copy_and_sum(struct sk_buff *dest, unsigned char *src, int length, int base)
{
memcpy(dest->data,src,length);
memcpy(dest->data, src, length);
}
 
#if 0
361,7 → 358,7
printk(KERN_ERR "NET PANIC --> Etherlink not found.\n");
return 0;
case ETH_RXERROR :
printk(KERN_ERR "Receive error (vero dramma!!!).\n");
printk(KERN_ERR "Receive error.\n");
return 0;
case ETH_TXERROR :
printk(KERN_ERR "Transimit error: N. Max Retry.\n");
373,7 → 370,7
printk(KERN_ERR "Buffers full: frame lost!\n");
return 1;
case ETH_NULLPROTOCOL_EXC:
printk(KERN_ERR "Null protocol called!!!\n");
printk(KERN_ERR "Null protocol called!\n");
for (p = 0; p < ETH_MAX_PROTOCOLS; p++) {
printk(KERN_ERR "%d: %d\n", p, eth_table[p].type);
}
452,7 → 449,7
#if 0
ndev = pci_scan_bus(pci_devs);
#ifdef __ETH_DBG__
pci_show(pci_devs, ndev);
pci_show(pci_devs, ndev);
#endif
for (i = 0; i < ndev; i++) {
r = (struct pci_regs *) pci_devs[i].mem;
484,7 → 481,7
if ((cardtype == NONE) || (cardtype == UNKNOWN)) {
exc_raise(ETH_DRIVER_NOT_FOUND);
}
/*PUT HERE THE PFUN INIT!!!*/
/*PUT HERE THE PFUN INIT!!!*/
if (cardtype == VORTEX) {
}
/*
525,7 → 522,7
printk(KERN_INFO "Network card found.\n");
} else {
printk(KERN_INFO "No network card found.\n");
/* cprintf("No card found... Installing loopback device\n");
/* cprintf("No network card found. Installing loopback device.\n");
loopback_init(&device0);
device0.open(&device0);*/
return 0;
532,8 → 529,8
}
#endif
 
// netbuff_init(&rxbuff, ETH_RX_BUFFERS, ETH_MAX_LEN);
// netbuff_init(&txbuff, ETH_TX_BUFFERS, ETH_MAX_LEN);
//netbuff_init(&rxbuff, ETH_RX_BUFFERS, ETH_MAX_LEN);
//netbuff_init(&txbuff, ETH_TX_BUFFERS, ETH_MAX_LEN);
 
definedprotocols = 0;
for (i = 0; i < ETH_MAX_PROTOCOLS; i++) {