taglinefilesource code
adapter231drivers/net/3c505.c#define  GET_ASF()    (get_status(adapter)&ASF_PCB_MASK)
adapter232drivers/net/3c505.c#define  GET_STATUS()    (get_status(adapter))
adapter234drivers/net/3c505.cstatic int get_status (elp_device * adapter)
adapter240drivers/net/3c505.cstat1 = INB(adapter->io_addr+PORT_STATUS);
adapter241drivers/net/3c505.c} while (stat1 != INB(adapter->io_addr+PORT_STATUS) && jiffies < timeout);
adapter247drivers/net/3c505.c#define  SET_HSF(hsf)  (set_hsf(adapter,hsf))
adapter249drivers/net/3c505.cstatic void set_hsf (elp_device * adapter, int hsf)
adapter253drivers/net/3c505.cOUTB((INB(adapter->io_addr+PORT_CONTROL)&(~HSF_PCB_MASK))|hsf, adapter->io_addr+PORT_CONTROL); 
adapter257drivers/net/3c505.c#define  WAIT_HCRE(toval)  (wait_hcre(adapter,toval))
adapter259drivers/net/3c505.cstatic int wait_hcre(elp_device * adapter, int toval)
adapter263drivers/net/3c505.cwhile(((INB(adapter->io_addr+PORT_STATUS)&STATUS_HCRE)==0) &&
adapter288drivers/net/3c505.cstatic int send_pcb(elp_device * adapter, pcb_struct * pcb)
adapter297drivers/net/3c505.cCHECK_NULL(adapter);
adapter312drivers/net/3c505.cOUTB(pcb->command, (adapter->io_addr)+PORT_COMMAND);
adapter316drivers/net/3c505.cOUTB(pcb->length, (adapter->io_addr)+PORT_COMMAND);
adapter321drivers/net/3c505.cOUTB(pcb->data.raw[i], (adapter->io_addr)+PORT_COMMAND);
adapter330drivers/net/3c505.cOUTB(2+pcb->length, adapter->io_addr+PORT_COMMAND);
adapter347drivers/net/3c505.cprintk("%s: PCB send was NAKed\n", adapter->name);
adapter357drivers/net/3c505.cprintk("%s: NAK/timeout on send PCB\n", adapter->name);
adapter359drivers/net/3c505.cprintk("%s: retry #%i on send PCB\n", adapter->name, retry);
adapter378drivers/net/3c505.cstatic int receive_pcb(elp_device * adapter, pcb_struct * pcb)
adapter387drivers/net/3c505.cCHECK_NULL(adapter);
adapter397drivers/net/3c505.cpcb->command = INB(adapter->io_addr+PORT_COMMAND);
adapter406drivers/net/3c505.cpcb->length = INB(adapter->io_addr+PORT_COMMAND);
adapter419drivers/net/3c505.cpcb->data.raw[i++] = INB(adapter->io_addr+PORT_COMMAND);
adapter433drivers/net/3c505.cprintk("%s: mangled PCB received\n", adapter->name);
adapter449drivers/net/3c505.cstatic void adapter_hard_reset(elp_device * adapter)
adapter454drivers/net/3c505.cCHECK_NULL(adapter);
adapter459drivers/net/3c505.cOUTB(CONTROL_ATTN|CONTROL_FLSH, adapter->io_addr+PORT_CONTROL); 
adapter470drivers/net/3c505.cOUTB(0, adapter->io_addr+PORT_CONTROL); 
adapter488drivers/net/3c505.cstatic void adapter_reset(elp_device * adapter)
adapter492drivers/net/3c505.cCHECK_NULL(adapter);
adapter495drivers/net/3c505.cOUTB(CONTROL_ATTN|INB(adapter->io_addr+PORT_CONTROL), adapter->io_addr+PORT_CONTROL);
adapter505drivers/net/3c505.cOUTB(INB(adapter->io_addr+PORT_CONTROL)&~(CONTROL_ATTN), adapter->io_addr+PORT_CONTROL);
adapter517drivers/net/3c505.cstatic int start_receive(elp_device * adapter, pcb_struct * tx_pcb)
adapter520drivers/net/3c505.cCHECK_NULL(adapter);
adapter524drivers/net/3c505.cprintk("%s: restarting receiver\n", adapter->name);
adapter530drivers/net/3c505.creturn send_pcb(adapter, tx_pcb); 
adapter543drivers/net/3c505.celp_device * adapter,
adapter563drivers/net/3c505.cCHECK_NULL(adapter);
adapter580drivers/net/3c505.cOUTB(INB(adapter->io_addr+PORT_CONTROL)|CONTROL_DIR, adapter->io_addr+PORT_CONTROL); 
adapter588drivers/net/3c505.cwhile ((INB(adapter->io_addr+PORT_STATUS)&STATUS_HRDY) == 0 && 
adapter594drivers/net/3c505.cd = inw(adapter->io_addr+PORT_DATA);
adapter596drivers/net/3c505.cadapter->stats.rx_dropped++;
adapter617drivers/net/3c505.cwhile ((INB(adapter->io_addr+PORT_STATUS)&STATUS_HRDY) == 0 && 
adapter632drivers/net/3c505.c*ptr = inw(adapter->io_addr+PORT_DATA); 
adapter658drivers/net/3c505.cOUTB(INB(adapter->io_addr+PORT_CONTROL)&(~CONTROL_DIR), adapter->io_addr+PORT_CONTROL); 
adapter674drivers/net/3c505.celp_device * adapter;
adapter697drivers/net/3c505.cadapter = (elp_device *) dev->priv;
adapter699drivers/net/3c505.cCHECK_NULL(adapter);
adapter715drivers/net/3c505.cwhile ((INB(adapter->io_addr+PORT_STATUS)&STATUS_ACRF) != 0 &&
adapter718drivers/net/3c505.cif (receive_pcb(adapter, &adapter->irx_pcb)) {
adapter720drivers/net/3c505.cswitch (adapter->irx_pcb.command) {
adapter726drivers/net/3c505.cadapter->got[CMD_CONFIGURE_82586] = 1;
adapter735drivers/net/3c505.cadapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 1;
adapter738drivers/net/3c505.cadapter->irx_pcb.data.failed?"failed":"succeeded");
adapter745drivers/net/3c505.cadapter->got[CMD_LOAD_MULTICAST_LIST] = 1;
adapter748drivers/net/3c505.cadapter->irx_pcb.data.failed?"failed":"succeeded");
adapter755drivers/net/3c505.cadapter->got[CMD_SET_STATION_ADDRESS] = 1;
adapter758drivers/net/3c505.cadapter->irx_pcb.data.failed?"failed":"succeeded");
adapter766drivers/net/3c505.cadapter->stats.rx_packets += adapter->irx_pcb.data.netstat.tot_recv;
adapter767drivers/net/3c505.cadapter->stats.tx_packets += adapter->irx_pcb.data.netstat.tot_xmit;
adapter768drivers/net/3c505.cadapter->stats.rx_crc_errors += adapter->irx_pcb.data.netstat.err_CRC;
adapter769drivers/net/3c505.cadapter->stats.rx_frame_errors += adapter->irx_pcb.data.netstat.err_align;
adapter770drivers/net/3c505.cadapter->stats.rx_fifo_errors += adapter->irx_pcb.data.netstat.err_ovrrun;
adapter771drivers/net/3c505.cadapter->got[CMD_NETWORK_STATISTICS] = 1;
adapter783drivers/net/3c505.clen = adapter->irx_pcb.data.rcv_resp.pkt_len;
adapter784drivers/net/3c505.cdlen = adapter->irx_pcb.data.rcv_resp.buf_len;
adapter785drivers/net/3c505.cif (adapter->irx_pcb.data.rcv_resp.timeout != 0) {
adapter790drivers/net/3c505.creceive_packet(dev, adapter, dlen);
adapter794drivers/net/3c505.cif (dev->start && !start_receive(adapter, &adapter->itx_pcb)) 
adapter810drivers/net/3c505.cif (adapter->irx_pcb.data.xmit_resp.c_stat != 0)
adapter813drivers/net/3c505.cdev->name, adapter->irx_pcb.data.xmit_resp.c_stat);
adapter826drivers/net/3c505.cprintk("%s: unknown PCB received - %2.2x\n", dev->name, adapter->irx_pcb.command);
adapter851drivers/net/3c505.celp_device * adapter = (elp_device *) dev->priv;
adapter861drivers/net/3c505.cif (adapter == NULL) {
adapter869drivers/net/3c505.cOUTB(0x00, adapter->io_addr+PORT_CONTROL);
adapter874drivers/net/3c505.cINB(adapter->io_addr+PORT_COMMAND);
adapter900drivers/net/3c505.cOUTB(CONTROL_CMDE, adapter->io_addr+PORT_CONTROL);
adapter912drivers/net/3c505.cadapter->tx_pcb.command = CMD_CONFIGURE_ADAPTER_MEMORY;
adapter913drivers/net/3c505.cadapter->tx_pcb.data.memconf.cmd_q = 10;
adapter914drivers/net/3c505.cadapter->tx_pcb.data.memconf.rcv_q = 20;
adapter915drivers/net/3c505.cadapter->tx_pcb.data.memconf.mcast = 10;
adapter916drivers/net/3c505.cadapter->tx_pcb.data.memconf.frame = 20;
adapter917drivers/net/3c505.cadapter->tx_pcb.data.memconf.rcv_b = 20;
adapter918drivers/net/3c505.cadapter->tx_pcb.data.memconf.progs = 0;
adapter919drivers/net/3c505.cadapter->tx_pcb.length = sizeof(struct Memconf);
adapter920drivers/net/3c505.cadapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 0;
adapter921drivers/net/3c505.cif (!send_pcb(adapter, &adapter->tx_pcb))
adapter925drivers/net/3c505.cwhile (adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] == 0 && jiffies < timeout)
adapter937drivers/net/3c505.cadapter->tx_pcb.command = CMD_CONFIGURE_82586;
adapter938drivers/net/3c505.cadapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD;
adapter939drivers/net/3c505.cadapter->tx_pcb.length  = 2;
adapter940drivers/net/3c505.cadapter->got[CMD_CONFIGURE_82586] = 0;
adapter941drivers/net/3c505.cif (!send_pcb(adapter, &adapter->tx_pcb))
adapter945drivers/net/3c505.cwhile (adapter->got[CMD_CONFIGURE_82586] == 0 && jiffies < timeout)
adapter954drivers/net/3c505.cif (!start_receive(adapter, &adapter->tx_pcb))
adapter969drivers/net/3c505.cstatic int send_packet (elp_device * adapter, unsigned char * ptr, int len)
adapter979drivers/net/3c505.cCHECK_NULL(adapter);
adapter989drivers/net/3c505.cadapter->tx_pcb.command = CMD_TRANSMIT_PACKET;
adapter990drivers/net/3c505.cadapter->tx_pcb.length = sizeof(struct Xmit_pkt);
adapter991drivers/net/3c505.cadapter->tx_pcb.data.xmit_pkt.buf_ofs = adapter->tx_pcb.data.xmit_pkt.buf_seg = 0; /* Unused */
adapter992drivers/net/3c505.cadapter->tx_pcb.data.xmit_pkt.pkt_len = nlen;
adapter993drivers/net/3c505.cif (!send_pcb(adapter, &adapter->tx_pcb)) 
adapter1000drivers/net/3c505.cOUTB(INB(adapter->io_addr+PORT_CONTROL)&(~CONTROL_DIR), adapter->io_addr+PORT_CONTROL); 
adapter1008drivers/net/3c505.cwhile ((INB(adapter->io_addr+PORT_STATUS)&STATUS_HRDY) == 0 && jiffies < timeout)
adapter1016drivers/net/3c505.coutw(*(short *)ptr, adapter->io_addr+PORT_DATA);
adapter1033drivers/net/3c505.celp_device * adapter = (elp_device *) dev->priv;
adapter1076drivers/net/3c505.cif ((INB(adapter->io_addr+PORT_STATUS)&STATUS_ACRF) != 0) 
adapter1078drivers/net/3c505.cadapter_reset(adapter);
adapter1086drivers/net/3c505.cif (!send_packet(adapter, (unsigned char *)SKB_DATA, skb->len)) {
adapter1130drivers/net/3c505.celp_device *adapter = (elp_device *) dev->priv;
adapter1138drivers/net/3c505.creturn &adapter->stats;
adapter1141drivers/net/3c505.cadapter->tx_pcb.command = CMD_NETWORK_STATISTICS;
adapter1142drivers/net/3c505.cadapter->tx_pcb.length  = 0;
adapter1143drivers/net/3c505.cadapter->got[CMD_NETWORK_STATISTICS] = 0;
adapter1144drivers/net/3c505.cif (!send_pcb(adapter, &adapter->tx_pcb))
adapter1149drivers/net/3c505.cwhile (adapter->got[CMD_NETWORK_STATISTICS] == 0 && jiffies < timeout)
adapter1153drivers/net/3c505.creturn &adapter->stats;
adapter1158drivers/net/3c505.creturn &adapter->stats;
adapter1170drivers/net/3c505.celp_device * adapter = (elp_device *) dev->priv;
adapter1173drivers/net/3c505.cCHECK_NULL(adapter);
adapter1187drivers/net/3c505.cOUTB(0x00, adapter->io_addr+PORT_CONTROL);
adapter1224drivers/net/3c505.celp_device *adapter = (elp_device *) dev->priv;
adapter1233drivers/net/3c505.cadapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST;
adapter1234drivers/net/3c505.cadapter->tx_pcb.length  = 6*num_addrs;
adapter1236drivers/net/3c505.cmemcpy(adapter->tx_pcb.data.multicast[i], addrs+6*i,6);
adapter1237drivers/net/3c505.cadapter->got[CMD_LOAD_MULTICAST_LIST] = 0;
adapter1238drivers/net/3c505.cif (!send_pcb(adapter, &adapter->tx_pcb))
adapter1242drivers/net/3c505.cwhile (adapter->got[CMD_LOAD_MULTICAST_LIST] == 0 && jiffies < timeout)
adapter1249drivers/net/3c505.cadapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD | RECV_MULTI;
adapter1251drivers/net/3c505.cadapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD;
adapter1253drivers/net/3c505.cadapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_ALL;
adapter1260drivers/net/3c505.cadapter->tx_pcb.command = CMD_CONFIGURE_82586;
adapter1261drivers/net/3c505.cadapter->tx_pcb.length  = 2;
adapter1262drivers/net/3c505.cadapter->got[CMD_CONFIGURE_82586]  = 0;
adapter1263drivers/net/3c505.cif (!send_pcb(adapter, &adapter->tx_pcb))
adapter1267drivers/net/3c505.cwhile (adapter->got[CMD_CONFIGURE_82586] == 0 && jiffies < timeout)
adapter1283drivers/net/3c505.celp_device * adapter;
adapter1322drivers/net/3c505.cadapter = (elp_device *)(dev->priv = kmalloc(sizeof(elp_device), GFP_KERNEL));
adapter1323drivers/net/3c505.cCHECK_NULL(adapter);
adapter1324drivers/net/3c505.cadapter->io_addr = dev->base_addr;
adapter1325drivers/net/3c505.cadapter->name    = dev->name;
adapter1326drivers/net/3c505.cmemset(&(adapter->stats), 0, sizeof(struct enet_statistics));
adapter1361drivers/net/3c505.cadapter_hard_reset(adapter);
adapter1363drivers/net/3c505.cadapter_reset(adapter);
adapter1462drivers/net/3c505.celp_device adapter;
adapter1471drivers/net/3c505.cadapter.io_addr = dev->base_addr = elp_autodetect(dev);
adapter1472drivers/net/3c505.cif ( !adapter.io_addr )
adapter1487drivers/net/3c505.cadapter.tx_pcb.command = CMD_STATION_ADDRESS;
adapter1488drivers/net/3c505.cadapter.tx_pcb.length  = 0;
adapter1489drivers/net/3c505.cif (!send_pcb   (&adapter, &adapter.tx_pcb) ||
adapter1490drivers/net/3c505.c!receive_pcb(&adapter, &adapter.rx_pcb) ||
adapter1491drivers/net/3c505.c(adapter.rx_pcb.command != CMD_ADDRESS_RESPONSE) ||
adapter1492drivers/net/3c505.c(adapter.rx_pcb.length != 6)) {
adapter1528drivers/net/3c505.cdev->dev_addr[i] = adapter.rx_pcb.data.eth_addr[i];