2 eepro100.c - gPXE driver for the eepro100 8255x series.
13 #include <gpxe/errfile.h>
14 #include <gpxe/if_ether.h>
15 #include <gpxe/ethernet.h>
16 #include <gpxe/iobuf.h>
17 #include <gpxe/netdevice.h>
18 #include <gpxe/spi_bit.h>
19 #include <gpxe/threewire.h>
23 #define TX_RING_SIZE 4
25 #define RX_BUF_SIZE 1528
26 #define CONFIG_DATA_SIZE 22
31 u32 link; /* void * */
32 u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */
33 s32 count; /* # of TBD (=2), Tx start thresh., etc. */
34 /* This constitutes two "TBD" entries: hdr and data */
35 u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */
36 s32 tx_buf_size0; /* Length of Tx hdr. */
37 u32 tx_buf_addr1; /* void *, data to be transmitted. */
38 s32 tx_buf_size1; /* Length of Tx data. */
44 u32 link; /* struct RxFD * */
45 u32 rx_buf_addr; /* void * */
48 char packet[RX_BUF_SIZE];
51 struct speedo_private {
52 unsigned short ioaddr;
53 unsigned short tx_cur;
54 unsigned short tx_dirty;
55 unsigned short rx_cur;
56 struct speedo_tx txfd[TX_RING_SIZE];
57 struct speedo_rx *rxfd;
59 /* netdev_tx_complete needs pointer to the iobuf of the data so as to free
62 struct io_buffer *tx_iobuf[TX_RING_SIZE];
63 struct spi_bit_basher spibit;
64 struct spi_device eeprom;
69 SCBStatus = 0, /* Rx/Command Unit status */
70 SCBCmd = 2, /* Rx/Command Unit command */
71 SCBPointer = 4, /* General purpose pointer. */
72 SCBPort = 8, /* Misc. commands and operands. */
74 SCBeeprom = 14, /* EEPROM and flash memory control. */
75 SCBCtrlMDI = 16, /* MDI interface control. */
76 SCBEarlyRx = 20, /* Early receive byte count. */
80 SCBMaskCmdDone=0x8000, SCBMaskRxDone=0x4000, SCBMaskCmdIdle=0x2000,
81 SCBMaskRxSuspend=0x1000, SCBMaskEarlyRx=0x0800, SCBMaskFlowCtl=0x0400,
82 SCBTriggerIntr=0x0200, SCBMaskAll=0x0100,
83 /* The rest are Rx and Tx commands. */
84 CUStart=0x0010, CUResume=0x0020, CUStatsAddr=0x0040, CUShowStats=0x0050,
85 CUCmdBase=0x0060, /* CU Base address (set to zero) . */
86 CUDumpStats=0x0070, /* Dump then reset stats counters. */
87 RxStart=0x0001, RxResume=0x0002, RxAbort=0x0004, RxAddrLoad=0x0006,
88 RxResumeNoResources=0x0007,
91 static const char i82558_config_cmd[CONFIG_DATA_SIZE] = {
92 22, 0x08, 0, 1, 0, 0, 0x22, 0x03, 1, /* 1=Use MII 0=Use AUI */
93 0, 0x2E, 0, 0x60, 0x08, 0x88,
94 0x68, 0, 0x40, 0xf2, 0x84, /* Disable FC */
97 unsigned short eeprom[16];
98 /* Serial EEPROM section.
99 A "bit" grungy, but we work our way through bit-by-bit :->. */
100 /* EEPROM_Ctrl bits. */
101 #define EE_SHIFT_CLK 0x01 /* EEPROM shift clock. */
102 #define EE_CS 0x02 /* EEPROM chip select. */
103 #define EE_DATA_WRITE 0x04 /* EEPROM chip data in. */
104 #define EE_DATA_READ 0x08 /* EEPROM chip data out. */
105 #define EE_WRITE_0 0x4802
106 #define EE_WRITE_1 0x4806
107 #define EE_ENB (0x4800 | EE_CS)
109 /* The EEPROM commands include the alway-set leading bit. */
110 #define EE_READ_CMD 6
113 /* The SCB accepts the following controls for the Tx and Rx units: */
114 #define CU_START 0x0010
115 #define CU_RESUME 0x0020
116 #define CU_STATSADDR 0x0040
117 #define CU_SHOWSTATS 0x0050 /* Dump statistics counters. */
118 #define CU_CMD_BASE 0x0060 /* Base address to add to add CU commands. */
119 #define CU_DUMPSTATS 0x0070 /* Dump then reset stats counters. */
121 #define RX_START 0x0001
122 #define RX_RESUME 0x0002
123 #define RX_ABORT 0x0004
124 #define RX_ADDR_LOAD 0x0006
125 #define RX_RESUMENR 0x0007
126 #define INT_MASK 0x0100
127 #define DRVR_INT 0x0200 /* Driver generated interrupt. */
129 enum phy_chips { NonSuchPhy=0, I82553AB, I82553C, I82503, DP83840, S80C240,
130 S80C24, PhyUndefined, DP83840A=10, };
132 /* Commands that can be put in a command list entry. */
137 CmdMulticastList = 3,
142 /* And some extra flags: */
143 CmdSuspend = 0x4000, /* Suspend after completion. */
144 CmdIntr = 0x2000, /* Interrupt after completion. */
145 CmdTxFlex = 0x0008, /* Use "Flexible mode" for CmdTx command. */
148 /* Selected elements of the Tx/RxFD.status word. */
150 RxComplete=0x8000, RxOK=0x2000,
151 RxErrCRC=0x0800, RxErrAlign=0x0400, RxErrTooBig=0x0200, RxErrSymbol=0x0010,
152 RxEth2Type=0x0020, RxNoMatch=0x0004, RxNoIAMatch=0x0002,
153 TxUnderrun=0x1000, StatusComplete=0x8000,
156 static int congenb = 0; /* Enable congestion control in the DP83840. */
157 static int txfifo = 8; /* Tx FIFO threshold in 4 byte units, 0-15 */
158 static int rxfifo = 8; /* Rx FIFO threshold, default 32 bytes. */
159 static int txdmacount = 0; /* Tx DMA burst length, 0-127, default 0. */
160 static int rxdmacount = 0; /* Rx DMA length, 0 means no preemption. */
162 /* Function Prototypes: */
163 static int speedo_open ( struct net_device *netdev );
164 static int speedo_transmit ( struct net_device *netdev, struct io_buffer *iobuf );
165 static void speedo_poll ( struct net_device *netdev );
166 static void speedo_disable ( struct net_device *netdev );
167 static void speedo_close ( struct net_device *netdev );
168 static void speedo_irq ( struct net_device *netdev, int enable );
170 /** speedo net device operations */
171 static struct net_device_operations speedo_operations = {
173 .close = speedo_close,
174 .transmit = speedo_transmit,
179 /* How to wait for the command unit to accept a command.
180 Typically this takes 0 ticks. */
181 static inline void wait_for_cmd_done ( int cmd_ioaddr ) {
186 if ( inb ( cmd_ioaddr ) == 0 )
188 while ( ++wait <= 100 );
189 delayed_cmd = inb ( cmd_ioaddr );
191 if ( inb ( cmd_ioaddr ) == 0 )
193 while ( ++wait <= 10000 );
194 DBG ( "Command %2.2x was not immediately accepted, %d ticks!\n",
198 /* Support function: mdio_write
200 * This probably writes to the "physical media interface chip".
203 static int mdio_write ( struct net_device *netdev, int phy_id, int location, int value ) {
204 struct speedo_private *sp = netdev->priv;
205 int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */
207 outl ( 0x04000000 | (location<<16) | (phy_id<<21) | value,
208 sp->ioaddr + SCBCtrlMDI );
211 val = inl ( sp->ioaddr + SCBCtrlMDI );
212 if ( --boguscnt < 0 ) {
213 DBG ( "mdio_write() timed out with val = %X.\n", val );
216 } while ( ! ( val & 0x10000000 ));
220 /* Support function: mdio_read
222 * This probably reads a register in the "physical media interface chip".
225 static int mdio_read ( struct net_device *netdev,int phy_id, int location ) {
226 struct speedo_private *sp = netdev->priv;
227 int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */
229 outl ( 0x08000000 | (location<<16) | (phy_id<<21), sp->ioaddr + SCBCtrlMDI );
232 val = inl ( sp->ioaddr + SCBCtrlMDI );
233 if ( --boguscnt < 0 ) {
234 DBG ( " mdio_read() timed out with val = %X.\n", val );
237 } while ( ! ( val & 0x10000000 ));
241 /* The fixes for the code were kindly provided by Dragan Stancevic
242 <visitor@valinux.com> to strictly follow Intel specifications of EEPROM
244 The publicly available sheet 64486302 (sec. 3.1) specifies 1us access
245 interval for serial EEPROM. However, it looks like that there is an
246 additional requirement dictating larger udelay's in the code below.
248 static int do_eeprom_cmd ( struct net_device *netdev,int cmd, int cmd_len ) {
249 struct speedo_private *sp = netdev->priv;
251 long ee_addr = sp->ioaddr + SCBeeprom;
253 outw(EE_ENB, ee_addr); udelay(2);
254 outw(EE_ENB | EE_SHIFT_CLK, ee_addr); udelay(2);
255 /* Shift the command bits out. */
257 short dataval = ( cmd & ( 1 << cmd_len )) ? EE_WRITE_1 : EE_WRITE_0;
258 outw ( dataval, ee_addr );
260 outw ( dataval | EE_SHIFT_CLK, ee_addr );
262 retval = ( retval << 1 ) | (( inw ( ee_addr ) & EE_DATA_READ ) ? 1 : 0);
263 } while ( --cmd_len >= 0 );
264 outw ( EE_ENB, ee_addr );
266 /* Terminate the EEPROM access.
268 outw ( EE_ENB & ~EE_CS, ee_addr );
272 static void speedo_irq ( struct net_device *netdev, int enable ) {
273 struct speedo_private *sp = netdev->priv;
274 uint16_t enabled_mask = ( SCBMaskCmdDone | SCBMaskCmdIdle |
275 SCBMaskEarlyRx | SCBMaskFlowCtl );
279 outw ( SCBMaskAll, sp->ioaddr + SCBCmd );
282 outw ( enabled_mask, sp->ioaddr + SCBCmd );
287 /* function: eepro100_disable
288 * resets the card. This is used to allow Etherboot or Linux
289 * to probe the card again from a "virginal" state....
294 static void speedo_disable ( struct net_device *netdev ) {
295 struct speedo_private *sp = netdev->priv;
296 /* from eepro100_reset
298 outl ( 0, sp->ioaddr + SCBPort );
299 /* from eepro100_disable
301 /* See if this PartialReset solves the problem with interfering with
302 kernel operation after Etherboot hands over. - Ken 20001102
304 outl ( 2, sp->ioaddr + SCBPort );
305 /* The following is from the Intel e100 driver.
306 * This hopefully solves the problem with hanging hard DOS images.
308 /* wait for the reset to take effect
311 /* Mask off our interrupt line -- it is unmasked after reset
315 /* Disable interrupts on our PCI board by setting the mask bit
317 outw ( INT_MASK, sp->ioaddr + SCBCmd );
318 intr_status = inw ( sp->ioaddr + SCBStatus );
319 /* ack and clear intrs
321 outw ( intr_status, sp->ioaddr + SCBStatus );
322 inw ( sp->ioaddr + SCBStatus );
331 * @ret rc Return status code
333 static int speedo_probe ( struct pci_device *pci,
334 const struct pci_device_id *id __unused ) {
335 struct net_device *netdev;
336 struct speedo_private *sp = NULL;
338 int read_cmd, ee_size;
341 /* Allocate net device
343 DBG("In probe routine \n");
344 netdev = alloc_etherdev ( sizeof ( *sp ) );
348 netdev_init ( netdev, &speedo_operations );
350 pci_set_drvdata ( pci, netdev );
351 netdev->dev = &pci->dev;
352 memset ( sp, 0, sizeof ( *sp ) );
353 sp->ioaddr = pci->ioaddr;
354 adjust_pci_device ( pci );
355 /* read the MAC Address
357 if ( ( do_eeprom_cmd ( netdev, EE_READ_CMD << 24, 27 ) & 0xffe0000 )
360 read_cmd = EE_READ_CMD << 24;
363 read_cmd = EE_READ_CMD << 22;
366 for (i = 0, sum = 0; i < ee_size; i++) {
367 unsigned short value = do_eeprom_cmd(netdev,read_cmd | (i << 16), 27);
368 if (i < (int) ( sizeof ( eeprom ) / sizeof ( eeprom[0] ) ) )
373 for (i = 0; i < ETH_ALEN; i++) {
374 netdev->ll_addr[i] = ( eeprom[i/2] >> ( 8* ( i & 1 ) ) ) & 0xff;
378 if ( (rc = register_netdev ( netdev ) ) != 0)
379 goto err_register_netdev;
385 speedo_disable ( netdev );
386 netdev_put ( netdev );
393 * @v netdev Net device
395 static void speedo_close (struct net_device *netdev) {
396 struct speedo_private *sp = netdev->priv;
397 /* from eepro100_reset
399 outl ( 0, sp->ioaddr + SCBPort );
407 * @v netdev Net device
408 * @ret rc Return status code
410 static int speedo_open ( struct net_device *netdev ) {
411 struct speedo_private *sp = netdev->priv;
418 outl ( 0, sp->ioaddr + SCBPointer );
419 outw ( INT_MASK | RX_ADDR_LOAD, sp->ioaddr + SCBCmd );
420 wait_for_cmd_done ( sp->ioaddr + SCBCmd );
422 sp->rxfd=malloc((sizeof(struct speedo_rx))*NUM_RX_DESC);
424 DBG("No memory for RxFD\n");
429 for ( i = 0 ; i < NUM_RX_DESC ; i++ ) {
430 sp->rxfd[i].status = 0x0000;
431 sp->rxfd[i].command = 0x0000;
432 sp->rxfd[i].rx_buf_addr = 0xFFFFFFFF;
433 sp->rxfd[i].count = 0;
434 sp->rxfd[i].size = RX_BUF_SIZE;
435 sp->rxfd[i].link = virt_to_bus ( &sp->rxfd[i+1] );
438 sp->rxfd[NUM_RX_DESC -1].status = 0x0000;
439 sp->rxfd[NUM_RX_DESC -1].command = 0xC000;
440 sp->rxfd[NUM_RX_DESC -1].link = virt_to_bus( &sp->rxfd[0] );
442 outl ( virt_to_bus ( &sp->rxfd[0] ), sp->ioaddr + SCBPointer );
443 outb ( RX_START, sp->ioaddr + SCBCmd );
444 wait_for_cmd_done ( sp->ioaddr + SCBCmd );
449 outl ( 0, sp->ioaddr + SCBPointer );
450 outb ( CU_CMD_BASE, sp->ioaddr + SCBCmd );
451 wait_for_cmd_done ( sp->ioaddr + SCBCmd );
454 for ( i = 0 ; i < TX_RING_SIZE ; i++ ) {
455 sp->txfd[i].link = virt_to_bus ( ( i + 1 < TX_RING_SIZE ) ? &
456 sp->txfd[i + 1] : &sp->txfd[0] );
457 sp->txfd[i].command = ( CmdSuspend );
458 sp->txfd[i].status = 0;
459 sp->txfd[i].tx_desc_addr = virt_to_bus ( &sp->txfd[i].tx_buf_addr0 );
462 /* Setting up the RX mode */
463 /* Set or clear the multicast filter for this adaptor.
464 This is very ugly with Intel chips -- we usually have to execute an
465 entire configuration command, plus process a multicast command.
466 This is complicated. We must put a large configuration command and
467 an arbitrarily-sized multicast command in the transmit list.
468 To minimize the disruption -- the previous command might have already
469 loaded the link -- we convert the current command block, normally a Tx
470 command, into a no-op and link it to the new command.
473 if ( ( ( eeprom[6] >> 8 ) & 0x3f ) == DP83840
474 || ( ( eeprom[6] >> 8 ) & 0x3f ) == DP83840A) {
475 int mdi_reg23 = mdio_read ( netdev,eeprom[6] & 0x1f, 23 ) | 0x0422;
478 DBG ( "DP83840 specific setup, setting register 23 to %hX.\n",
480 mdio_write ( netdev,eeprom[6] & 0x1f, 23, mdi_reg23 );
482 DBG ( "Done DP8340 special setup.\n" );
483 if ( options != 0 ) {
484 mdio_write ( netdev,eeprom[6] & 0x1f, 0,
485 ( ( options & 0x20 ) ? 0x2000 : 0) | /* 100mbps? */
486 ( ( options & 0x10 ) ? 0x0100 : 0)); /* Full duplex? */
487 DBG ( "set mdio_register.\n" );
492 sp->txfd[0].status = ( CmdSuspend | CmdConfigure );
493 uint8_t * config_cmd_data;
494 config_cmd_data = (void *)&sp->txfd[0].tx_desc_addr;
495 /* Construct a full CmdConfig frame.
497 memcpy ( config_cmd_data, i82558_config_cmd, CONFIG_DATA_SIZE );
498 config_cmd_data[1] = ( txfifo << 4 ) | rxfifo;
499 config_cmd_data[4] = rxdmacount;
500 config_cmd_data[5] = txdmacount + 0x80;
501 config_cmd_data[15] = ( rx_mode & 2 ) ? 0x49: 0x48;
502 config_cmd_data[19] = ( options & 0x10 ) ? 0xC0 : 0x80;
503 config_cmd_data[21] = ( rx_mode & 1 ) ? 0x0D: 0x05;
505 outl ( virt_to_bus ( &sp->txfd[0] ), sp->ioaddr + SCBPointer );
506 outb ( CU_START, sp->ioaddr + SCBCmd );
507 wait_for_cmd_done ( sp->ioaddr + SCBCmd );
509 /* Read the status register once to disgard stale data
511 mdio_read ( netdev,eeprom[6] & 0x1f, 1 );
512 /* Check to see if the network cable is plugged in.
513 * This allows for faster failure if there is nothing
516 if (!( mdio_read ( netdev,eeprom[6] & 0x1f, 1 ) & ( 1 << 2 ))) {
517 DBG ( "Valid link not established\n" );
518 speedo_disable ( netdev );
527 * @v netdev Network device
528 * @v iobuf I/O buffer
529 * @ret rc Return status code
531 static int speedo_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
532 struct speedo_private *sp = netdev->priv;
534 if ( ( sp->tx_cur + 1 ) % TX_RING_SIZE == sp->tx_dirty ) {
535 DBG ( "TX overflow\n" );
538 /* Used by netdev_tx_complete ()
540 sp->tx_iobuf[sp->tx_cur] = iobuf;
541 /* Pad and align packet has not been used because its not required
543 * iob_pad (iobuf, ETH_ZLEN);
544 * can be used to achieve it, if required
546 /* Add the packet to TX ring
549 sp->txfd[sp->tx_cur].status = 0;
550 sp->txfd[sp->tx_cur].command = CmdSuspend | CmdTx | CmdTxFlex;
551 sp->txfd[sp->tx_cur].count = 0x02208000;
552 sp->txfd[sp->tx_cur].tx_buf_addr0 = virt_to_bus ( iobuf->data );
553 sp->txfd[sp->tx_cur].tx_buf_size0 = iob_len ( iobuf );
555 DBG ("TX id %d at %#08lx + %#08x\n", sp->tx_cur,
556 virt_to_bus ( &iobuf->data ), iob_len ( iobuf ) );
558 /* start the transmitter
560 * Removing suspend from the command of previous packet.
561 * As linx driver does
563 sp->txfd[(( sp->tx_cur - 1 ) < 0 ? TX_RING_SIZE -1 : sp->tx_cur - 1 )].command
565 /* We want the time window between clearing suspend flag on the previous
566 command and resuming CU to be as small as possible.
567 Interrupts in between are very undesired. --SAW */
568 outb ( CUResume, sp->ioaddr + SCBCmd );
570 /* increment the circular buffer pointer to the next buffer location
572 sp->tx_cur = ( sp->tx_cur + 1 ) % TX_RING_SIZE;
578 * Sometimes the receiver stops making progress. This routine knows how to
579 * get it going again, without losing packets or being otherwise nasty like
580 * a chip reset would be. Previously the driver had a whole sequence
581 * of if RxSuspended, if it's no buffers do one thing, if it's no resources,
582 * do another, etc. But those things don't really matter. Separate logic
583 * in the ISR provides for allocating buffers--the other half of operation
584 * is just making sure the receiver is active. speedo_rx_soft_reset does that.
585 * This problem with the old, more involved algorithm is shown up under
586 * ping floods on the order of 60K packets/second on a 100Mbps fdx network.
588 static void speedo_rx_soft_reset ( struct net_device *netdev ) {
589 struct speedo_private *sp = netdev->priv;
593 wait_for_cmd_done ( sp->ioaddr + SCBCmd );
595 * Put the hardware into a known state.
597 outb ( RX_ABORT, sp->ioaddr + SCBCmd );
599 for ( i = 0; i < NUM_RX_DESC; i++ ) {
600 sp->rxfd[i].status = 0;
601 sp->rxfd[i].rx_buf_addr = 0xffffffff;
602 sp->rxfd[i].count = 0;
603 sp->rxfd[i].size = RX_BUF_SIZE;
606 wait_for_cmd_done ( sp->ioaddr + SCBCmd );
608 outl ( virt_to_bus ( &sp->rxfd[sp->rx_cur] ), sp->ioaddr + SCBPointer );
609 outb ( RX_START, sp->ioaddr + SCBCmd );
613 * Poll for received packets
615 * @v netdev Network device
617 static void speedo_poll (struct net_device *netdev) {
618 struct speedo_private *sp = netdev->priv;
620 unsigned int rx_status;
621 unsigned int intr_status;
623 struct io_buffer *rx_iob;
626 intr_status = inw ( sp->ioaddr + SCBStatus );
627 /* Acknowledge all of the current interrupt sources ASAP. */
628 outw ( intr_status & 0xfc00, sp->ioaddr + SCBStatus );
632 /* Check status of transmitted packets
635 while (i != sp->tx_cur ) {
636 tx_status = sp->txfd[sp->tx_dirty].status;
637 DBG ( "tx_dirty = %d tx_cur=%d tx_status=%#08x\n",
638 sp->tx_dirty, sp->tx_cur, tx_status );
639 if (( tx_status & StatusComplete ) == 0)
641 netdev_tx_complete ( netdev, sp->tx_iobuf[sp->tx_dirty] );
642 DBG ( "Success transmitting packet\n" );
644 sp->tx_dirty = ( sp->tx_dirty + 1) % TX_RING_SIZE;
645 i = ( i + 1 ) % TX_RING_SIZE;
647 /* Process received packets
649 rx_status = sp->rxfd[sp->rx_cur].status;
650 while ( rx_status ) {
651 rx_len = sp->rxfd[sp->rx_cur].count & 0x3fff;
653 DBG ( "Received packet, rx_curr = %d, rx_status = %#08x, rx_len = %d\n",
654 sp->rx_cur, rx_status, rx_len );
655 /* If unable allocate space for this packet,
656 * try again next poll
658 rx_iob = alloc_iob ( rx_len );
661 memcpy ( iob_put (rx_iob, rx_len ),
662 sp->rxfd[sp->rx_cur].packet, rx_len );
663 /* Add this packet to the receive queue.
665 netdev_rx ( netdev, rx_iob );
667 sp->rxfd[sp->rx_cur].status = 0;
668 sp->rxfd[sp->rx_cur].command = 0xc000;
669 sp->rxfd[sp->rx_cur].rx_buf_addr = 0xFFFFFFFF;
670 sp->rxfd[sp->rx_cur].count = 0;
671 sp->rxfd[sp->rx_cur].size = RX_BUF_SIZE;
672 sp->rxfd[( sp->rx_cur - 1 )% NUM_RX_DESC].command = 0;
673 sp->rx_cur = ( sp->rx_cur + 1 ) % NUM_RX_DESC;
674 rx_status = sp->rxfd[sp->rx_cur].status;
675 /* Acknowledge all interrupts */
676 outw ( 0xff00,sp->ioaddr + SCBStatus );
679 * The chip may have suspended reception for various reasons.
680 * Check for that, and re-prime it should this be the case.
682 switch (( inw ( sp->ioaddr + SCBStatus ) >> 2) & 0xf) {
685 case 1: /* Suspended */
686 case 2: /* No resources (RxFDs) */
687 case 9: /* Suspended with no more RBDs */
688 case 10: /* No resources due to no RBDs */
689 case 12: /* Ready with no RBDs */
690 speedo_rx_soft_reset ( netdev );
693 /* reserved values */
703 static void speedo_remove (struct pci_device *pci) {
704 struct net_device *netdev = pci_get_drvdata (pci);
706 unregister_netdev ( netdev );
707 speedo_disable ( netdev );
708 netdev_put ( netdev );
712 static struct pci_device_id speedo_nics[] = {
713 PCI_ROM(0x8086, 0x1029, "id1029", "Intel EtherExpressPro100 ID1029"),
714 PCI_ROM(0x8086, 0x1030, "id1030", "Intel EtherExpressPro100 ID1030"),
715 PCI_ROM(0x8086, 0x1031, "82801cam", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"),
716 PCI_ROM(0x8086, 0x1032, "eepro100-1032", "Intel PRO/100 VE Network Connection"),
717 PCI_ROM(0x8086, 0x1033, "eepro100-1033", "Intel PRO/100 VM Network Connection"),
718 PCI_ROM(0x8086, 0x1034, "eepro100-1034", "Intel PRO/100 VM Network Connection"),
719 PCI_ROM(0x8086, 0x1035, "eepro100-1035", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"),
720 PCI_ROM(0x8086, 0x1036, "eepro100-1036", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"),
721 PCI_ROM(0x8086, 0x1037, "eepro100-1037", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"),
722 PCI_ROM(0x8086, 0x1038, "id1038", "Intel PRO/100 VM Network Connection"),
723 PCI_ROM(0x8086, 0x1039, "82562et", "Intel PRO100 VE 82562ET"),
724 PCI_ROM(0x8086, 0x103a, "id103a", "Intel Corporation 82559 InBusiness 10/100"),
725 PCI_ROM(0x8086, 0x103b, "82562etb", "Intel PRO100 VE 82562ETB"),
726 PCI_ROM(0x8086, 0x103c, "eepro100-103c", "Intel PRO/100 VM Network Connection"),
727 PCI_ROM(0x8086, 0x103d, "eepro100-103d", "Intel PRO/100 VE Network Connection"),
728 PCI_ROM(0x8086, 0x103e, "eepro100-103e", "Intel PRO/100 VM Network Connection"),
729 PCI_ROM(0x8086, 0x1051, "prove", "Intel PRO/100 VE Network Connection"),
730 PCI_ROM(0x8086, 0x1059, "82551qm", "Intel PRO/100 M Mobile Connection"),
731 PCI_ROM(0x8086, 0x1209, "82559er", "Intel EtherExpressPro100 82559ER"),
732 PCI_ROM(0x8086, 0x1227, "82865", "Intel 82865 EtherExpress PRO/100A"),
733 PCI_ROM(0x8086, 0x1228, "82556", "Intel 82556 EtherExpress PRO/100 Smart"),
734 PCI_ROM(0x8086, 0x1229, "eepro100", "Intel EtherExpressPro100"),
735 PCI_ROM(0x8086, 0x2449, "82562em", "Intel EtherExpressPro100 82562EM"),
736 PCI_ROM(0x8086, 0x2459, "82562-1", "Intel 82562 based Fast Ethernet Connection"),
737 PCI_ROM(0x8086, 0x245d, "82562-2", "Intel 82562 based Fast Ethernet Connection"),
738 PCI_ROM(0x8086, 0x1050, "82562ez", "Intel 82562EZ Network Connection"),
739 PCI_ROM(0x8086, 0x1051, "eepro100-1051", "Intel 82801EB/ER (ICH5/ICH5R) Chipset Ethernet Controller"),
740 PCI_ROM(0x8086, 0x5200, "eepro100-5200", "Intel EtherExpress PRO/100 Intelligent Server"),
741 PCI_ROM(0x8086, 0x5201, "eepro100-5201", "Intel EtherExpress PRO/100 Intelligent Server"),
744 struct pci_driver epro100_driver __pci_driver = {
746 .id_count = ( sizeof ( speedo_nics ) / sizeof ( speedo_nics[0] )),
747 .probe = speedo_probe,
748 .remove = speedo_remove,