Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 3 → Rev 17

/shark/trunk/drivers/net/ne.c
227,12 → 227,12
}
if (!pdev)
continue;
printk(KERN_INFO "ne.c: PCI BIOS reports %s at i/o %#x, irq %d.\n",
printk(KERN_INFO "ne.c: PCI BIOS reports %s at i/o %x, irq %d.\n",
pci_clone_list[i].name,
pci_ioaddr, pci_irq_line);
printk("*\n* Use of the PCI-NE2000 driver with this card is recommended!\n*\n");
if (ne_probe1(dev, pci_ioaddr) != 0) { /* Shouldn't happen. */
printk(KERN_ERR "ne.c: Probe of PCI card at %#x failed.\n", pci_ioaddr);
printk(KERN_ERR "ne.c: Probe of PCI card at %x failed.\n", pci_ioaddr);
pci_irq_line = 0;
return -ENXIO;
}
285,7 → 285,7
if (ei_debug && version_printed++ == 0)
printk(version);
 
printk(KERN_INFO "NE*000 ethercard probe at %#3x:", ioaddr);
printk(KERN_INFO "NE*000 ethercard probe at %3x:", ioaddr);
 
/* A user with a poor card that fails to ack the reset, or that
does not have a valid 0x57,0x57 signature can still use this
473,7 → 473,7
dev->dev_addr[i] = SA_prom[i];
}
 
printk("\n%s: %s found at %#x, using IRQ %d.\n",
printk("\n%s: %s found at %x, using IRQ %d.\n",
dev->name, name, ioaddr, dev->irq);
 
ei_status.name = name;
638,7 → 638,7
} while (--tries > 0);
if (tries <= 0)
printk(KERN_WARNING "%s: RX transfer address mismatch,"
"%#4.4x (expected) vs. %#4.4x (actual).\n",
"%4.4x (expected) vs. %4.4x (actual).\n",
dev->name, ring_offset + xfer_count, addr);
}
#endif
/shark/trunk/drivers/net/eth.c
20,11 → 20,11
 
/**
------------
CVS : $Id: eth.c,v 1.1.1.1 2002-03-29 14:12:50 pj Exp $
CVS : $Id: eth.c,v 1.2 2002-10-28 08:01:36 pj Exp $
 
File: $File$
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:50 $
Revision: $Revision: 1.2 $
Last update: $Date: 2002-10-28 08:01:36 $
------------
**/
 
74,6 → 74,8
/*#include "lowlev.h"
//#include "3com.h" */
 
//#define DEBUG_ETH
 
#define ETH_PAGE 5
 
struct eth_service{
131,7 → 133,7
 
void dev_tint(struct device *dev)
{
cprintf("Warning!!!! dev_tint called!!! (Why???)\n");
printk(KERN_WARNING "Warning!!!! dev_tint called!!! (Why???)\n");
sys_abort(201);
}
145,7 → 147,7
{
//cprintf("DENTRO netif_rx, skbuf=%p\n",skb->data);
if (nettask_pid == NIL) {
cprintf("Net receives packets, but the driver doesn't exist!!!\n");
printk(KERN_CRIT "Net receives packets, but the driver doesn't exist!!!\n");
sys_abort(300);
}
200,7 → 202,7
/* formatted print of an ethernet header */
void eth_printHeader(struct eth_header *p)
{
cprintf("Dest : %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x \n",p->dest.ad[0],
cprintf("Dest : %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x \n",p->dest.ad[0],
p->dest.ad[1],
p->dest.ad[2],
p->dest.ad[3],
338,27 → 340,27
{
int p;
 
if (err != ETH_BUFFERS_FULL) cprintf("Ethernet : ");
if (err != ETH_BUFFERS_FULL) printk(KERN_ERR "Ethernet : ");
switch (err) {
case ETH_DRIVER_NOT_FOUND :
cprintf("NET PANIC --> Etherlink not found.\n");
printk(KERN_ERR "NET PANIC --> Etherlink not found.\n");
return 0;
case ETH_RXERROR :
cprintf("Receive error (vero dramma!!!).\n");
printk(KERN_ERR "Receive error (vero dramma!!!).\n");
return 0;
case ETH_TXERROR :
cprintf("Transimit error: N. Max Retry.\n");
printk(KERN_ERR "Transimit error: N. Max Retry.\n");
return 0;
case ETH_PROTOCOL_ERROR :
cprintf("Too much protocols.\n");
printk(KERN_ERR "Too much protocols.\n");
return 0;
case ETH_BUFFERS_FULL:
cprintf("Buffers full: frame lost!\n");
printk(KERN_ERR "Buffers full: frame lost!\n");
return 1;
case ETH_NULLPROTOCOL_EXC:
cprintf("Null protocol called!!!\n");
printk(KERN_ERR "Null protocol called!!!\n");
for (p = 0; p < ETH_MAX_PROTOCOLS; p++) {
cprintf("%d: %d\n", p, eth_table[p].type);
printk(KERN_ERR "%d: %d\n", p, eth_table[p].type);
}
return 0;
default :
377,7 → 379,7
int linux_found = 0;
 
if (!ethIsInstalled) {
cprintf(" Hartik Net lib\n\n");
printk(KERN_INFO "Hartik/Shark Net lib");
/* Scan the devices connected to the PCI bus */
cardtype = NONE;
 
396,19 → 398,25
 
nettask_pid = task_create("rxProc", net_extern_driver, m, NULL);
if (nettask_pid == NIL) {
cprintf("Can't create extern driver!!!\n");
return 0;
printk(KERN_ERR "Can't create extern driver!!!\n");
return 0;
}
task_activate(nettask_pid);
if (pci_init() == 1) {
linuxpci_init();
// pci_show();
cprintf("LF %d\n", linux_found);
#ifdef DEBUG_ETH
printk(KERN_DEBUG "LF %d\n", linux_found);
#endif
linux_found += (rtl8139_probe(&device0) == 0);
cprintf("LF %d\n", linux_found);
#ifdef DEBUG_ETH
printk(KERN_DEBUG "LF %d\n", linux_found);
#endif
linux_found += (tc59x_probe(&device0) == 0);
cprintf("LF %d\n", linux_found);
#ifdef DEBUG_ETH
printk(KERN_DEBUG "LF %d\n", linux_found);
#endif
#if 0
ndev = pci_scan_bus(pci_devs);
#ifdef __ETH_DBG__
434,7 → 442,7
} else {
lowlev_send = vortex_send_mem;
}
cprintf("PCI Ethlink card found:\n");
printk(KERN_INFO "PCI Ethlink card found:\n");
lowlev_info(r);
cardtype = VORTEX;
}
460,10 → 468,14
#else
}
if (linux_found == 0) {
linux_found += (el3_probe(&device0) == 0);
cprintf("LF %d\n", linux_found);
linux_found += (ne_probe(&device0) == 0);
cprintf("LF %d\n", linux_found);
linux_found += (el3_probe(&device0) == 0);
#ifdef DEBUG_ETH
printk(KERN_DEBUG "LF %d\n", linux_found);
#endif
linux_found += (ne_probe(&device0) == 0);
#ifdef DEBUG_ETH
printk(KERN_DEBUG "LF %d\n", linux_found);
#endif
}
 
/*
474,9 → 486,9
*/
if (linux_found) {
device0.open(&device0);
cprintf("Net card found!!!\n");
printk(KERN_INFO "Net card found!!!\n");
} else {
cprintf("No card found... \n");
printk(KERN_INFO "No card found... \n");
/* cprintf("No card found... Installing loopback device\n");
loopback_init(&device0);
device0.open(&device0);*/
497,7 → 509,7
sys_atrunlevel(eth_close,NULL,RUNLEVEL_BEFORE_EXIT);
 
} else {
cprintf("Ethernet already installed!!!\n");
printk(KERN_INFO "Ethernet already installed!!!\n");
return 0;
}
return 1;
505,10 → 517,12
 
void eth_close(void *a)
{
kern_printf("CLOSE!!!!\n");
if (ethIsInstalled == TRUE) {
device0.stop(&device0); /*This seems to break everithing...
// lowlev_close(eth_dev.BaseAddress);*/
ethIsInstalled = FALSE;
}
#ifdef DEBUG_ETH
printk(KERN_DEBUG "CLOSE!!!!\n");
#endif
if (ethIsInstalled == TRUE) {
device0.stop(&device0); /*This seems to break everithing...
// lowlev_close(eth_dev.BaseAddress);*/
ethIsInstalled = FALSE;
}
}
/shark/trunk/drivers/net/net.c
20,11 → 20,11
 
/**
------------
CVS : $Id: net.c,v 1.1.1.1 2002-03-29 14:12:50 pj Exp $
CVS : $Id: net.c,v 1.2 2002-10-28 08:01:36 pj Exp $
 
File: $File$
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:50 $
Revision: $Revision: 1.2 $
Last update: $Date: 2002-10-28 08:01:36 $
------------
**/
 
63,6 → 63,8
#include <drivers/net.h>
#include "eth_priv.h"
 
//#define DEBUG_NET
 
/* OKKIO!!!!! net_base must change if you change NET_MAX_PROTOCOLS!!!! */
struct net_model net_base = {0, 0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
88,8 → 90,10
}
/* Then, the high level layers */
for(i = 0; i < m->numprotocol; i++) {
cprintf("Protocol %d init \n", i);
m->protocol[i].initfun(m->protocol[i].initparms);
#ifdef DEBUG_NET
printk(KERN_DEBUG "Protocol %d init \n", i);
#endif
m->protocol[i].initfun(m->protocol[i].initparms);
}
 
return 1;