2005-01-07 02:29:27 +00:00
|
|
|
/*-
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
* Copyright (c) 1997, 1998
|
|
|
|
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by Bill Paul.
|
|
|
|
* 4. Neither the name of the author nor the names of any co-contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2003-11-14 17:16:58 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Texas Instruments ThunderLAN driver for FreeBSD 2.2.6 and 3.x.
|
|
|
|
* Supports many Compaq PCI NICs based on the ThunderLAN ethernet controller,
|
|
|
|
* the National Semiconductor DP83840A physical interface and the
|
|
|
|
* Microchip Technology 24Cxx series serial EEPROM.
|
|
|
|
*
|
1998-09-23 05:08:54 +00:00
|
|
|
* Written using the following four documents:
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*
|
|
|
|
* Texas Instruments ThunderLAN Programmer's Guide (www.ti.com)
|
|
|
|
* National Semiconductor DP83840A data sheet (www.national.com)
|
|
|
|
* Microchip Technology 24C02C data sheet (www.microchip.com)
|
1998-09-23 05:08:54 +00:00
|
|
|
* Micro Linear ML6692 100BaseTX only PHY data sheet (www.microlinear.com)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*
|
|
|
|
* Written by Bill Paul <wpaul@ctr.columbia.edu>
|
|
|
|
* Electrical Engineering Department
|
|
|
|
* Columbia University, New York City
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Some notes about the ThunderLAN:
|
|
|
|
*
|
|
|
|
* The ThunderLAN controller is a single chip containing PCI controller
|
|
|
|
* logic, approximately 3K of on-board SRAM, a LAN controller, and media
|
1998-09-23 05:08:54 +00:00
|
|
|
* independent interface (MII) bus. The MII allows the ThunderLAN chip to
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
* control up to 32 different physical interfaces (PHYs). The ThunderLAN
|
|
|
|
* also has a built-in 10baseT PHY, allowing a single ThunderLAN controller
|
|
|
|
* to act as a complete ethernet interface.
|
|
|
|
*
|
|
|
|
* Other PHYs may be attached to the ThunderLAN; the Compaq 10/100 cards
|
|
|
|
* use a National Semiconductor DP83840A PHY that supports 10 or 100Mb/sec
|
|
|
|
* in full or half duplex. Some of the Compaq Deskpro machines use a
|
1998-09-23 05:08:54 +00:00
|
|
|
* Level 1 LXT970 PHY with the same capabilities. Certain Olicom adapters
|
|
|
|
* use a Micro Linear ML6692 100BaseTX only PHY, which can be used in
|
|
|
|
* concert with the ThunderLAN's internal PHY to provide full 10/100
|
|
|
|
* support. This is cheaper than using a standalone external PHY for both
|
|
|
|
* 10/100 modes and letting the ThunderLAN's internal PHY go to waste.
|
|
|
|
* A serial EEPROM is also attached to the ThunderLAN chip to provide
|
|
|
|
* power-up default register settings and for storing the adapter's
|
|
|
|
* station address. Although not supported by this driver, the ThunderLAN
|
|
|
|
* chip can also be connected to token ring PHYs.
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*
|
|
|
|
* The ThunderLAN has a set of registers which can be used to issue
|
1998-09-23 05:08:54 +00:00
|
|
|
* commands, acknowledge interrupts, and to manipulate other internal
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
* registers on its DIO bus. The primary registers can be accessed
|
|
|
|
* using either programmed I/O (inb/outb) or via PCI memory mapping,
|
|
|
|
* depending on how the card is configured during the PCI probing
|
|
|
|
* phase. It is even possible to have both PIO and memory mapped
|
|
|
|
* access turned on at the same time.
|
|
|
|
*
|
|
|
|
* Frame reception and transmission with the ThunderLAN chip is done
|
|
|
|
* using frame 'lists.' A list structure looks more or less like this:
|
|
|
|
*
|
|
|
|
* struct tl_frag {
|
|
|
|
* u_int32_t fragment_address;
|
|
|
|
* u_int32_t fragment_size;
|
|
|
|
* };
|
|
|
|
* struct tl_list {
|
|
|
|
* u_int32_t forward_pointer;
|
|
|
|
* u_int16_t cstat;
|
|
|
|
* u_int16_t frame_size;
|
|
|
|
* struct tl_frag fragments[10];
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* The forward pointer in the list header can be either a 0 or the address
|
|
|
|
* of another list, which allows several lists to be linked together. Each
|
|
|
|
* list contains up to 10 fragment descriptors. This means the chip allows
|
|
|
|
* ethernet frames to be broken up into up to 10 chunks for transfer to
|
|
|
|
* and from the SRAM. Note that the forward pointer and fragment buffer
|
|
|
|
* addresses are physical memory addresses, not virtual. Note also that
|
|
|
|
* a single ethernet frame can not span lists: if the host wants to
|
|
|
|
* transmit a frame and the frame data is split up over more than 10
|
|
|
|
* buffers, the frame has to collapsed before it can be transmitted.
|
|
|
|
*
|
|
|
|
* To receive frames, the driver sets up a number of lists and populates
|
|
|
|
* the fragment descriptors, then it sends an RX GO command to the chip.
|
|
|
|
* When a frame is received, the chip will DMA it into the memory regions
|
|
|
|
* specified by the fragment descriptors and then trigger an RX 'end of
|
|
|
|
* frame interrupt' when done. The driver may choose to use only one
|
|
|
|
* fragment per list; this may result is slighltly less efficient use
|
|
|
|
* of memory in exchange for improving performance.
|
|
|
|
*
|
|
|
|
* To transmit frames, the driver again sets up lists and fragment
|
|
|
|
* descriptors, only this time the buffers contain frame data that
|
|
|
|
* is to be DMA'ed into the chip instead of out of it. Once the chip
|
2016-05-03 03:41:25 +00:00
|
|
|
* has transferred the data into its on-board SRAM, it will trigger a
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
* TX 'end of frame' interrupt. It will also generate an 'end of channel'
|
|
|
|
* interrupt when it reaches the end of the list.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Some notes about this driver:
|
|
|
|
*
|
|
|
|
* The ThunderLAN chip provides a couple of different ways to organize
|
|
|
|
* reception, transmission and interrupt handling. The simplest approach
|
|
|
|
* is to use one list each for transmission and reception. In this mode,
|
|
|
|
* the ThunderLAN will generate two interrupts for every received frame
|
|
|
|
* (one RX EOF and one RX EOC) and two for each transmitted frame (one
|
|
|
|
* TX EOF and one TX EOC). This may make the driver simpler but it hurts
|
|
|
|
* performance to have to handle so many interrupts.
|
|
|
|
*
|
|
|
|
* Initially I wanted to create a circular list of receive buffers so
|
|
|
|
* that the ThunderLAN chip would think there was an infinitely long
|
|
|
|
* receive channel and never deliver an RXEOC interrupt. However this
|
|
|
|
* doesn't work correctly under heavy load: while the manual says the
|
|
|
|
* chip will trigger an RXEOF interrupt each time a frame is copied into
|
|
|
|
* memory, you can't count on the chip waiting around for you to acknowledge
|
|
|
|
* the interrupt before it starts trying to DMA the next frame. The result
|
|
|
|
* is that the chip might traverse the entire circular list and then wrap
|
|
|
|
* around before you have a chance to do anything about it. Consequently,
|
|
|
|
* the receive list is terminated (with a 0 in the forward pointer in the
|
|
|
|
* last element). Each time an RXEOF interrupt arrives, the used list
|
|
|
|
* is shifted to the end of the list. This gives the appearance of an
|
|
|
|
* infinitely large RX chain so long as the driver doesn't fall behind
|
|
|
|
* the chip and allow all of the lists to be filled up.
|
|
|
|
*
|
|
|
|
* If all the lists are filled, the adapter will deliver an RX 'end of
|
|
|
|
* channel' interrupt when it hits the 0 forward pointer at the end of
|
|
|
|
* the chain. The RXEOC handler then cleans out the RX chain and resets
|
|
|
|
* the list head pointer in the ch_parm register and restarts the receiver.
|
|
|
|
*
|
|
|
|
* For frame transmission, it is possible to program the ThunderLAN's
|
|
|
|
* transmit interrupt threshold so that the chip can acknowledge multiple
|
|
|
|
* lists with only a single TX EOF interrupt. This allows the driver to
|
|
|
|
* queue several frames in one shot, and only have to handle a total
|
|
|
|
* two interrupts (one TX EOF and one TX EOC) no matter how many frames
|
|
|
|
* are transmitted. Frame transmission is done directly out of the
|
|
|
|
* mbufs passed to the tl_start() routine via the interface send queue.
|
|
|
|
* The driver simply sets up the fragment descriptors in the transmit
|
|
|
|
* lists to point to the mbuf data regions and sends a TX GO command.
|
|
|
|
*
|
|
|
|
* Note that since the RX and TX lists themselves are always used
|
|
|
|
* only by the driver, the are malloc()ed once at driver initialization
|
|
|
|
* time and never free()ed.
|
|
|
|
*
|
|
|
|
* Also, in order to remain as platform independent as possible, this
|
|
|
|
* driver uses memory mapped register access to manipulate the card
|
|
|
|
* as opposed to programmed I/O. This avoids the use of the inb/outb
|
|
|
|
* (and related) instructions which are specific to the i386 platform.
|
|
|
|
*
|
|
|
|
* Using these techniques, this driver achieves very high performance
|
|
|
|
* by minimizing the amount of interrupts generated during large
|
|
|
|
* transfers and by completely avoiding buffer copies. Frame transfer
|
|
|
|
* to and from the ThunderLAN chip is performed entirely by the chip
|
|
|
|
* itself thereby reducing the load on the host CPU.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/sockio.h>
|
|
|
|
#include <sys/mbuf.h>
|
|
|
|
#include <sys/malloc.h>
|
|
|
|
#include <sys/kernel.h>
|
2004-05-30 20:00:41 +00:00
|
|
|
#include <sys/module.h>
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
#include <net/if.h>
|
2013-10-26 17:58:36 +00:00
|
|
|
#include <net/if_var.h>
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
#include <net/if_arp.h>
|
|
|
|
#include <net/ethernet.h>
|
|
|
|
#include <net/if_dl.h>
|
|
|
|
#include <net/if_media.h>
|
2005-06-10 16:49:24 +00:00
|
|
|
#include <net/if_types.h>
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
#include <net/bpf.h>
|
|
|
|
|
|
|
|
#include <vm/vm.h> /* for vtophys */
|
|
|
|
#include <vm/pmap.h> /* for vtophys */
|
1999-03-30 17:07:20 +00:00
|
|
|
#include <machine/bus.h>
|
1999-07-22 17:00:38 +00:00
|
|
|
#include <machine/resource.h>
|
|
|
|
#include <sys/bus.h>
|
|
|
|
#include <sys/rman.h>
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
#include <dev/mii/mii.h>
|
2011-11-01 16:13:59 +00:00
|
|
|
#include <dev/mii/mii_bitbang.h>
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
#include <dev/mii/miivar.h>
|
|
|
|
|
2003-08-22 07:20:27 +00:00
|
|
|
#include <dev/pci/pcireg.h>
|
|
|
|
#include <dev/pci/pcivar.h>
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1998-10-04 18:47:38 +00:00
|
|
|
/*
|
|
|
|
* Default to using PIO register access mode to pacify certain
|
|
|
|
* laptop docking stations with built-in ThunderLAN chips that
|
|
|
|
* don't seem to handle memory mapped mode properly.
|
|
|
|
*/
|
|
|
|
#define TL_USEIOSPACE
|
|
|
|
|
2008-08-14 20:02:34 +00:00
|
|
|
#include <dev/tl/if_tlreg.h>
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2003-04-15 06:37:30 +00:00
|
|
|
MODULE_DEPEND(tl, pci, 1, 1, 1);
|
|
|
|
MODULE_DEPEND(tl, ether, 1, 1, 1);
|
2000-04-29 13:41:57 +00:00
|
|
|
MODULE_DEPEND(tl, miibus, 1, 1, 1);
|
|
|
|
|
2005-10-22 05:06:55 +00:00
|
|
|
/* "device miibus" required. See GENERIC if you get errors here. */
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
#include "miibus_if.h"
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Various supported device vendors/types and their names.
|
|
|
|
*/
|
|
|
|
|
2012-11-05 19:16:27 +00:00
|
|
|
static const struct tl_type tl_devs[] = {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{ TI_VENDORID, TI_DEVICEID_THUNDERLAN,
|
|
|
|
"Texas Instruments ThunderLAN" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10,
|
|
|
|
"Compaq Netelligent 10" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10_100,
|
|
|
|
"Compaq Netelligent 10/100" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10_100_PROLIANT,
|
|
|
|
"Compaq Netelligent 10/100 Proliant" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10_100_DUAL,
|
|
|
|
"Compaq Netelligent 10/100 Dual Port" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETFLEX_3P_INTEGRATED,
|
|
|
|
"Compaq NetFlex-3/P Integrated" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETFLEX_3P,
|
|
|
|
"Compaq NetFlex-3/P" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETFLEX_3P_BNC,
|
|
|
|
"Compaq NetFlex 3/P w/ BNC" },
|
1998-07-13 18:15:48 +00:00
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10_100_EMBEDDED,
|
|
|
|
"Compaq Netelligent 10/100 TX Embedded UTP" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10_T2_UTP_COAX,
|
|
|
|
"Compaq Netelligent 10 T/2 PCI UTP/Coax" },
|
|
|
|
{ COMPAQ_VENDORID, COMPAQ_DEVICEID_NETEL_10_100_TX_UTP,
|
|
|
|
"Compaq Netelligent 10/100 TX UTP" },
|
|
|
|
{ OLICOM_VENDORID, OLICOM_DEVICEID_OC2183,
|
|
|
|
"Olicom OC-2183/2185" },
|
|
|
|
{ OLICOM_VENDORID, OLICOM_DEVICEID_OC2325,
|
|
|
|
"Olicom OC-2325" },
|
|
|
|
{ OLICOM_VENDORID, OLICOM_DEVICEID_OC2326,
|
|
|
|
"Olicom OC-2326 10/100 TX UTP" },
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{ 0, 0, NULL }
|
|
|
|
};
|
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static int tl_probe(device_t);
|
|
|
|
static int tl_attach(device_t);
|
|
|
|
static int tl_detach(device_t);
|
|
|
|
static int tl_intvec_rxeoc(void *, u_int32_t);
|
|
|
|
static int tl_intvec_txeoc(void *, u_int32_t);
|
|
|
|
static int tl_intvec_txeof(void *, u_int32_t);
|
|
|
|
static int tl_intvec_rxeof(void *, u_int32_t);
|
|
|
|
static int tl_intvec_adchk(void *, u_int32_t);
|
|
|
|
static int tl_intvec_netsts(void *, u_int32_t);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static int tl_newbuf(struct tl_softc *, struct tl_chain_onefrag *);
|
|
|
|
static void tl_stats_update(void *);
|
|
|
|
static int tl_encap(struct tl_softc *, struct tl_chain *, struct mbuf *);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static void tl_intr(void *);
|
|
|
|
static void tl_start(struct ifnet *);
|
2005-09-15 17:12:29 +00:00
|
|
|
static void tl_start_locked(struct ifnet *);
|
2005-02-24 22:33:05 +00:00
|
|
|
static int tl_ioctl(struct ifnet *, u_long, caddr_t);
|
|
|
|
static void tl_init(void *);
|
2005-09-15 17:12:29 +00:00
|
|
|
static void tl_init_locked(struct tl_softc *);
|
2005-02-24 22:33:05 +00:00
|
|
|
static void tl_stop(struct tl_softc *);
|
2009-11-19 22:14:23 +00:00
|
|
|
static void tl_watchdog(struct tl_softc *);
|
2009-02-10 23:17:20 +00:00
|
|
|
static int tl_shutdown(device_t);
|
2005-02-24 22:33:05 +00:00
|
|
|
static int tl_ifmedia_upd(struct ifnet *);
|
|
|
|
static void tl_ifmedia_sts(struct ifnet *, struct ifmediareq *);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static u_int8_t tl_eeprom_putbyte(struct tl_softc *, int);
|
|
|
|
static u_int8_t tl_eeprom_getbyte(struct tl_softc *, int, u_int8_t *);
|
|
|
|
static int tl_read_eeprom(struct tl_softc *, caddr_t, int, int);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static int tl_miibus_readreg(device_t, int, int);
|
|
|
|
static int tl_miibus_writereg(device_t, int, int, int);
|
|
|
|
static void tl_miibus_statchg(device_t);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static void tl_setmode(struct tl_softc *, int);
|
|
|
|
static uint32_t tl_mchash(const uint8_t *);
|
|
|
|
static void tl_setmulti(struct tl_softc *);
|
|
|
|
static void tl_setfilt(struct tl_softc *, caddr_t, int);
|
|
|
|
static void tl_softreset(struct tl_softc *, int);
|
|
|
|
static void tl_hardreset(device_t);
|
|
|
|
static int tl_list_rx_init(struct tl_softc *);
|
|
|
|
static int tl_list_tx_init(struct tl_softc *);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-02-24 22:33:05 +00:00
|
|
|
static u_int8_t tl_dio_read8(struct tl_softc *, int);
|
|
|
|
static u_int16_t tl_dio_read16(struct tl_softc *, int);
|
|
|
|
static u_int32_t tl_dio_read32(struct tl_softc *, int);
|
|
|
|
static void tl_dio_write8(struct tl_softc *, int, int);
|
|
|
|
static void tl_dio_write16(struct tl_softc *, int, int);
|
|
|
|
static void tl_dio_write32(struct tl_softc *, int, int);
|
|
|
|
static void tl_dio_setbit(struct tl_softc *, int, int);
|
|
|
|
static void tl_dio_clrbit(struct tl_softc *, int, int);
|
|
|
|
static void tl_dio_setbit16(struct tl_softc *, int, int);
|
|
|
|
static void tl_dio_clrbit16(struct tl_softc *, int, int);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
/*
|
|
|
|
* MII bit-bang glue
|
|
|
|
*/
|
|
|
|
static uint32_t tl_mii_bitbang_read(device_t);
|
|
|
|
static void tl_mii_bitbang_write(device_t, uint32_t);
|
|
|
|
|
|
|
|
static const struct mii_bitbang_ops tl_mii_bitbang_ops = {
|
|
|
|
tl_mii_bitbang_read,
|
|
|
|
tl_mii_bitbang_write,
|
|
|
|
{
|
|
|
|
TL_SIO_MDATA, /* MII_BIT_MDO */
|
|
|
|
TL_SIO_MDATA, /* MII_BIT_MDI */
|
|
|
|
TL_SIO_MCLK, /* MII_BIT_MDC */
|
|
|
|
TL_SIO_MTXEN, /* MII_BIT_DIR_HOST_PHY */
|
|
|
|
0, /* MII_BIT_DIR_PHY_HOST */
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
1999-07-23 02:06:57 +00:00
|
|
|
#ifdef TL_USEIOSPACE
|
|
|
|
#define TL_RES SYS_RES_IOPORT
|
|
|
|
#define TL_RID TL_PCI_LOIO
|
|
|
|
#else
|
|
|
|
#define TL_RES SYS_RES_MEMORY
|
|
|
|
#define TL_RID TL_PCI_LOMEM
|
|
|
|
#endif
|
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
static device_method_t tl_methods[] = {
|
|
|
|
/* Device interface */
|
|
|
|
DEVMETHOD(device_probe, tl_probe),
|
|
|
|
DEVMETHOD(device_attach, tl_attach),
|
|
|
|
DEVMETHOD(device_detach, tl_detach),
|
|
|
|
DEVMETHOD(device_shutdown, tl_shutdown),
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
|
|
|
|
/* MII interface */
|
|
|
|
DEVMETHOD(miibus_readreg, tl_miibus_readreg),
|
|
|
|
DEVMETHOD(miibus_writereg, tl_miibus_writereg),
|
|
|
|
DEVMETHOD(miibus_statchg, tl_miibus_statchg),
|
|
|
|
|
2011-11-22 21:28:20 +00:00
|
|
|
DEVMETHOD_END
|
1999-07-22 17:00:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static driver_t tl_driver = {
|
1999-09-20 08:47:11 +00:00
|
|
|
"tl",
|
1999-07-22 17:00:38 +00:00
|
|
|
tl_methods,
|
|
|
|
sizeof(struct tl_softc)
|
|
|
|
};
|
|
|
|
|
|
|
|
static devclass_t tl_devclass;
|
|
|
|
|
2003-04-15 06:37:30 +00:00
|
|
|
DRIVER_MODULE(tl, pci, tl_driver, tl_devclass, 0, 0);
|
1999-09-20 19:06:45 +00:00
|
|
|
DRIVER_MODULE(miibus, tl, miibus_driver, miibus_devclass, 0, 0);
|
1999-07-22 17:00:38 +00:00
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
static u_int8_t tl_dio_read8(sc, reg)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
|
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
return(CSR_READ_1(sc, TL_DIO_DATA + (reg & 3)));
|
|
|
|
}
|
|
|
|
|
|
|
|
static u_int16_t tl_dio_read16(sc, reg)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
|
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
return(CSR_READ_2(sc, TL_DIO_DATA + (reg & 3)));
|
|
|
|
}
|
|
|
|
|
|
|
|
static u_int32_t tl_dio_read32(sc, reg)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
|
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
return(CSR_READ_4(sc, TL_DIO_DATA + (reg & 3)));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void tl_dio_write8(sc, reg, val)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int val;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
|
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_1(sc, TL_DIO_DATA + (reg & 3), val);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void tl_dio_write16(sc, reg, val)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int val;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
|
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_DATA + (reg & 3), val);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void tl_dio_write32(sc, reg, val)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int val;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
|
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_4(sc, TL_DIO_DATA + (reg & 3), val);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_dio_setbit(sc, reg, bit)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int bit;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
|
|
|
u_int8_t f;
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
f = CSR_READ_1(sc, TL_DIO_DATA + (reg & 3));
|
|
|
|
f |= bit;
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_DATA + (reg & 3), 1,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_1(sc, TL_DIO_DATA + (reg & 3), f);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_dio_clrbit(sc, reg, bit)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int bit;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
|
|
|
u_int8_t f;
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
f = CSR_READ_1(sc, TL_DIO_DATA + (reg & 3));
|
|
|
|
f &= ~bit;
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_DATA + (reg & 3), 1,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_1(sc, TL_DIO_DATA + (reg & 3), f);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void tl_dio_setbit16(sc, reg, bit)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int bit;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
|
|
|
u_int16_t f;
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
f = CSR_READ_2(sc, TL_DIO_DATA + (reg & 3));
|
|
|
|
f |= bit;
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_DATA + (reg & 3), 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_DATA + (reg & 3), f);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void tl_dio_clrbit16(sc, reg, bit)
|
1998-12-10 19:02:07 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int reg;
|
|
|
|
int bit;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
|
|
|
u_int16_t f;
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, reg);
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_ADDR, 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
f = CSR_READ_2(sc, TL_DIO_DATA + (reg & 3));
|
|
|
|
f &= ~bit;
|
2011-11-01 16:13:59 +00:00
|
|
|
CSR_BARRIER(sc, TL_DIO_DATA + (reg & 3), 2,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_DATA + (reg & 3), f);
|
|
|
|
}
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Send an instruction or address to the EEPROM, check for ACK.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
static u_int8_t tl_eeprom_putbyte(sc, byte)
|
|
|
|
struct tl_softc *sc;
|
1998-12-10 19:02:07 +00:00
|
|
|
int byte;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2017-05-17 00:34:34 +00:00
|
|
|
int i, ack = 0;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Make sure we're in TX mode.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_ETXEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Feed in each bit and stobe the clock.
|
|
|
|
*/
|
|
|
|
for (i = 0x80; i; i >>= 1) {
|
|
|
|
if (byte & i) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_EDATA);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
} else {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_EDATA);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
1998-09-23 05:08:54 +00:00
|
|
|
DELAY(1);
|
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_ECLOK);
|
|
|
|
DELAY(1);
|
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_ECLOK);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Turn off TX mode.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_ETXEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Check for ack.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_ECLOK);
|
|
|
|
ack = tl_dio_read8(sc, TL_NETSIO) & TL_SIO_EDATA;
|
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_ECLOK);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
return(ack);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Read a byte of data stored in the EEPROM at address 'addr.'
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
static u_int8_t tl_eeprom_getbyte(sc, addr, dest)
|
|
|
|
struct tl_softc *sc;
|
1998-12-10 19:02:07 +00:00
|
|
|
int addr;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
u_int8_t *dest;
|
|
|
|
{
|
2017-05-17 00:34:34 +00:00
|
|
|
int i;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
u_int8_t byte = 0;
|
2006-09-15 10:40:54 +00:00
|
|
|
device_t tl_dev = sc->tl_dev;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_write8(sc, TL_NETSIO, 0);
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
EEPROM_START;
|
1998-09-23 05:08:54 +00:00
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Send write control code to EEPROM.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
if (tl_eeprom_putbyte(sc, EEPROM_CTL_WRITE)) {
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(tl_dev, "failed to send write command, status: %x\n",
|
2002-10-21 02:54:50 +00:00
|
|
|
tl_dio_read8(sc, TL_NETSIO));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(1);
|
1998-09-23 05:08:54 +00:00
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Send address of byte we want to read.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
if (tl_eeprom_putbyte(sc, addr)) {
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(tl_dev, "failed to send address, status: %x\n",
|
2002-10-21 02:54:50 +00:00
|
|
|
tl_dio_read8(sc, TL_NETSIO));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(1);
|
1998-09-23 05:08:54 +00:00
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
EEPROM_STOP;
|
|
|
|
EEPROM_START;
|
|
|
|
/*
|
|
|
|
* Send read control code to EEPROM.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
if (tl_eeprom_putbyte(sc, EEPROM_CTL_READ)) {
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(tl_dev, "failed to send write command, status: %x\n",
|
2002-10-21 02:54:50 +00:00
|
|
|
tl_dio_read8(sc, TL_NETSIO));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(1);
|
1998-09-23 05:08:54 +00:00
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Start reading bits from EEPROM.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_ETXEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
for (i = 0x80; i; i >>= 1) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_ECLOK);
|
|
|
|
DELAY(1);
|
|
|
|
if (tl_dio_read8(sc, TL_NETSIO) & TL_SIO_EDATA)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
byte |= i;
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_ECLOK);
|
1998-05-31 16:59:39 +00:00
|
|
|
DELAY(1);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
EEPROM_STOP;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* No ACK generated for read, so just return byte.
|
|
|
|
*/
|
|
|
|
|
|
|
|
*dest = byte;
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
/*
|
|
|
|
* Read a sequence of bytes from the EEPROM.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_read_eeprom(sc, dest, off, cnt)
|
1998-09-23 05:08:54 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
caddr_t dest;
|
|
|
|
int off;
|
|
|
|
int cnt;
|
|
|
|
{
|
|
|
|
int err = 0, i;
|
|
|
|
u_int8_t byte = 0;
|
|
|
|
|
|
|
|
for (i = 0; i < cnt; i++) {
|
|
|
|
err = tl_eeprom_getbyte(sc, off + i, &byte);
|
|
|
|
if (err)
|
|
|
|
break;
|
|
|
|
*(dest + i) = byte;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(err ? 1 : 0);
|
|
|
|
}
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
#define TL_SIO_MII (TL_SIO_MCLK | TL_SIO_MDATA | TL_SIO_MTXEN)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Read the MII serial port for the MII bit-bang module.
|
|
|
|
*/
|
|
|
|
static uint32_t
|
|
|
|
tl_mii_bitbang_read(device_t dev)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
uint32_t val;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
sc = device_get_softc(dev);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
val = tl_dio_read8(sc, TL_NETSIO) & TL_SIO_MII;
|
|
|
|
CSR_BARRIER(sc, TL_NETSIO, 1,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
return (val);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
/*
|
|
|
|
* Write the MII serial port for the MII bit-bang module.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
2011-11-01 16:13:59 +00:00
|
|
|
tl_mii_bitbang_write(device_t dev, uint32_t val)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
struct tl_softc *sc;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
sc = device_get_softc(dev);
|
|
|
|
|
|
|
|
val = (tl_dio_read8(sc, TL_NETSIO) & ~TL_SIO_MII) | val;
|
|
|
|
CSR_BARRIER(sc, TL_NETSIO, 1,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
|
|
|
tl_dio_write8(sc, TL_NETSIO, val);
|
|
|
|
CSR_BARRIER(sc, TL_NETSIO, 1,
|
|
|
|
BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
2011-11-01 16:13:59 +00:00
|
|
|
tl_miibus_readreg(dev, phy, reg)
|
|
|
|
device_t dev;
|
|
|
|
int phy, reg;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int minten, val;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
sc = device_get_softc(dev);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Turn off MII interrupt by forcing MINTEN low.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
minten = tl_dio_read8(sc, TL_NETSIO) & TL_SIO_MINTEN;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (minten) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_MINTEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
val = mii_bitbang_readreg(dev, &tl_mii_bitbang_ops, phy, reg);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
/* Reenable interrupts. */
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (minten) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_MINTEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
return (val);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
2011-11-01 16:13:59 +00:00
|
|
|
tl_miibus_writereg(dev, phy, reg, data)
|
|
|
|
device_t dev;
|
|
|
|
int phy, reg, data;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
struct tl_softc *sc;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
int minten;
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
sc = device_get_softc(dev);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Turn off MII interrupt by forcing MINTEN low.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
minten = tl_dio_read8(sc, TL_NETSIO) & TL_SIO_MINTEN;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (minten) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETSIO, TL_SIO_MINTEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
mii_bitbang_writereg(dev, &tl_mii_bitbang_ops, phy, reg, data);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
/* Reenable interrupts. */
|
|
|
|
if (minten) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_MINTEN);
|
2011-11-01 16:13:59 +00:00
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
return(0);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_miibus_statchg(dev)
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
device_t dev;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
struct mii_data *mii;
|
1998-09-23 05:08:54 +00:00
|
|
|
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
sc = device_get_softc(dev);
|
|
|
|
mii = device_get_softc(sc->tl_miibus);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) {
|
|
|
|
tl_dio_setbit(sc, TL_NETCMD, TL_CMD_DUPLEX);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
} else {
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETCMD, TL_CMD_DUPLEX);
|
1998-07-13 18:15:48 +00:00
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
* Set modes for bitrate devices.
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_setmode(sc, media)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
int media;
|
|
|
|
{
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if (IFM_SUBTYPE(media) == IFM_10_5)
|
|
|
|
tl_dio_setbit(sc, TL_ACOMMIT, TL_AC_MTXD1);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (IFM_SUBTYPE(media) == IFM_10_T) {
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
tl_dio_clrbit(sc, TL_ACOMMIT, TL_AC_MTXD1);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if ((media & IFM_GMASK) == IFM_FDX) {
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
tl_dio_clrbit(sc, TL_ACOMMIT, TL_AC_MTXD3);
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETCMD, TL_CMD_DUPLEX);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
} else {
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
tl_dio_setbit(sc, TL_ACOMMIT, TL_AC_MTXD3);
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit(sc, TL_NETCMD, TL_CMD_DUPLEX);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1998-05-29 16:58:46 +00:00
|
|
|
/*
|
|
|
|
* Calculate the hash of a MAC address for programming the multicast hash
|
|
|
|
* table. This hash is simply the address split into 6-bit chunks
|
|
|
|
* XOR'd, e.g.
|
|
|
|
* byte: 000000|00 1111|1111 22|222222|333333|33 4444|4444 55|555555
|
|
|
|
* bit: 765432|10 7654|3210 76|543210|765432|10 7654|3210 76|543210
|
|
|
|
* Bytes 0-2 and 3-5 are symmetrical, so are folded together. Then
|
|
|
|
* the folded 24-bit value is split into 6-bit portions and XOR'd.
|
|
|
|
*/
|
2003-12-08 07:54:15 +00:00
|
|
|
static uint32_t
|
2003-11-13 20:55:53 +00:00
|
|
|
tl_mchash(addr)
|
2003-12-08 07:54:15 +00:00
|
|
|
const uint8_t *addr;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2003-12-08 07:54:15 +00:00
|
|
|
int t;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1998-05-29 16:58:46 +00:00
|
|
|
t = (addr[0] ^ addr[3]) << 16 | (addr[1] ^ addr[4]) << 8 |
|
|
|
|
(addr[2] ^ addr[5]);
|
|
|
|
return ((t >> 18) ^ (t >> 12) ^ (t >> 6) ^ t) & 0x3f;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
/*
|
|
|
|
* The ThunderLAN has a perfect MAC address filter in addition to
|
|
|
|
* the multicast hash filter. The perfect filter can be programmed
|
|
|
|
* with up to four MAC addresses. The first one is always used to
|
|
|
|
* hold the station address, which leaves us free to use the other
|
|
|
|
* three for multicast addresses.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_setfilt(sc, addr, slot)
|
1998-09-23 05:08:54 +00:00
|
|
|
struct tl_softc *sc;
|
1998-12-10 19:02:07 +00:00
|
|
|
caddr_t addr;
|
1998-09-23 05:08:54 +00:00
|
|
|
int slot;
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
u_int16_t regaddr;
|
|
|
|
|
|
|
|
regaddr = TL_AREG0_B5 + (slot * ETHER_ADDR_LEN);
|
|
|
|
|
|
|
|
for (i = 0; i < ETHER_ADDR_LEN; i++)
|
|
|
|
tl_dio_write8(sc, regaddr + i, *(addr + i));
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* XXX In FreeBSD 3.0, multicast addresses are managed using a doubly
|
|
|
|
* linked list. This is fine, except addresses are added from the head
|
|
|
|
* end of the list. We want to arrange for 224.0.0.1 (the "all hosts")
|
|
|
|
* group to always be in the perfect filter, but as more groups are added,
|
|
|
|
* the 224.0.0.1 entry (which is always added first) gets pushed down
|
|
|
|
* the list and ends up at the tail. So after 3 or 4 multicast groups
|
|
|
|
* are added, the all-hosts entry gets pushed out of the perfect filter
|
|
|
|
* and into the hash table.
|
|
|
|
*
|
|
|
|
* Because the multicast list is a doubly-linked list as opposed to a
|
|
|
|
* circular queue, we don't have the ability to just grab the tail of
|
|
|
|
* the list and traverse it backwards. Instead, we have to traverse
|
|
|
|
* the list once to find the tail, then traverse it again backwards to
|
|
|
|
* update the multicast filter.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_setmulti(sc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
{
|
|
|
|
struct ifnet *ifp;
|
|
|
|
u_int32_t hashes[2] = { 0, 0 };
|
1998-09-23 05:08:54 +00:00
|
|
|
int h, i;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct ifmultiaddr *ifma;
|
1998-09-23 05:08:54 +00:00
|
|
|
u_int8_t dummy[] = { 0, 0, 0, 0, 0 ,0 };
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
/* First, zot all the existing filters. */
|
|
|
|
for (i = 1; i < 4; i++)
|
1998-12-10 19:02:07 +00:00
|
|
|
tl_setfilt(sc, (caddr_t)&dummy, i);
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_write32(sc, TL_HASH1, 0);
|
|
|
|
tl_dio_write32(sc, TL_HASH2, 0);
|
|
|
|
|
|
|
|
/* Now program new ones. */
|
|
|
|
if (ifp->if_flags & IFF_ALLMULTI) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
hashes[0] = 0xFFFFFFFF;
|
|
|
|
hashes[1] = 0xFFFFFFFF;
|
|
|
|
} else {
|
1998-09-23 05:08:54 +00:00
|
|
|
i = 1;
|
2009-06-26 11:45:06 +00:00
|
|
|
if_maddr_rlock(ifp);
|
2001-02-06 10:12:15 +00:00
|
|
|
TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (ifma->ifma_addr->sa_family != AF_LINK)
|
|
|
|
continue;
|
1998-09-23 05:08:54 +00:00
|
|
|
/*
|
|
|
|
* Program the first three multicast groups
|
|
|
|
* into the perfect filter. For all others,
|
|
|
|
* use the hash table.
|
|
|
|
*/
|
|
|
|
if (i < 4) {
|
|
|
|
tl_setfilt(sc,
|
|
|
|
LLADDR((struct sockaddr_dl *)ifma->ifma_addr), i);
|
|
|
|
i++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2003-11-13 20:55:53 +00:00
|
|
|
h = tl_mchash(
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
|
|
|
|
if (h < 32)
|
|
|
|
hashes[0] |= (1 << h);
|
|
|
|
else
|
1998-05-24 00:56:49 +00:00
|
|
|
hashes[1] |= (1 << (h - 32));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
2009-06-26 11:45:06 +00:00
|
|
|
if_maddr_runlock(ifp);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_write32(sc, TL_HASH1, hashes[0]);
|
|
|
|
tl_dio_write32(sc, TL_HASH2, hashes[1]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This routine is recommended by the ThunderLAN manual to insure that
|
|
|
|
* the internal PHY is powered up correctly. It also recommends a one
|
|
|
|
* second pause at the end to 'wait for the clocks to start' but in my
|
|
|
|
* experience this isn't necessary.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_hardreset(dev)
|
1999-08-27 21:18:02 +00:00
|
|
|
device_t dev;
|
1998-09-23 05:08:54 +00:00
|
|
|
{
|
|
|
|
int i;
|
1999-08-27 21:18:02 +00:00
|
|
|
u_int16_t flags;
|
1998-09-23 05:08:54 +00:00
|
|
|
|
2011-11-01 16:13:59 +00:00
|
|
|
mii_bitbang_sync(dev, &tl_mii_bitbang_ops);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
1999-08-27 21:18:02 +00:00
|
|
|
flags = BMCR_LOOP|BMCR_ISO|BMCR_PDOWN;
|
1998-09-23 05:08:54 +00:00
|
|
|
|
1999-08-27 21:18:02 +00:00
|
|
|
for (i = 0; i < MII_NPHY; i++)
|
|
|
|
tl_miibus_writereg(dev, i, MII_BMCR, flags);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
1999-08-27 21:18:02 +00:00
|
|
|
tl_miibus_writereg(dev, 31, MII_BMCR, BMCR_ISO);
|
1998-09-23 05:08:54 +00:00
|
|
|
DELAY(50000);
|
1999-08-27 21:18:02 +00:00
|
|
|
tl_miibus_writereg(dev, 31, MII_BMCR, BMCR_LOOP|BMCR_ISO);
|
2011-11-01 16:13:59 +00:00
|
|
|
mii_bitbang_sync(dev, &tl_mii_bitbang_ops);
|
1999-08-27 21:18:02 +00:00
|
|
|
while(tl_miibus_readreg(dev, 31, MII_BMCR) & BMCR_RESET);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
1999-08-27 21:18:02 +00:00
|
|
|
DELAY(50000);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_softreset(sc, internal)
|
1998-09-23 05:08:54 +00:00
|
|
|
struct tl_softc *sc;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
int internal;
|
|
|
|
{
|
1998-09-23 05:08:54 +00:00
|
|
|
u_int32_t cmd, dummy, i;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Assert the adapter reset bit. */
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_SET(sc, TL_CMD_ADRST);
|
1999-08-27 21:18:02 +00:00
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/* Turn off interrupts */
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_SET(sc, TL_CMD_INTSOFF);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* First, clear the stats registers. */
|
1998-09-23 05:08:54 +00:00
|
|
|
for (i = 0; i < 5; i++)
|
|
|
|
dummy = tl_dio_read32(sc, TL_TXGOODFRAMES);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Clear Areg and Hash registers */
|
1998-09-23 05:08:54 +00:00
|
|
|
for (i = 0; i < 8; i++)
|
|
|
|
tl_dio_write32(sc, TL_AREG0_B5, 0x00000000);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set up Netconfig register. Enable one channel and
|
|
|
|
* one fragment mode.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit16(sc, TL_NETCONFIG, TL_CFG_ONECHAN|TL_CFG_ONEFRAG);
|
1999-03-30 17:07:20 +00:00
|
|
|
if (internal && !sc->tl_bitrate) {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit16(sc, TL_NETCONFIG, TL_CFG_PHYEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
} else {
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_clrbit16(sc, TL_NETCONFIG, TL_CFG_PHYEN);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
1999-03-30 17:07:20 +00:00
|
|
|
/* Handle cards with bitrate devices. */
|
|
|
|
if (sc->tl_bitrate)
|
|
|
|
tl_dio_setbit16(sc, TL_NETCONFIG, TL_CFG_BITRATE);
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Load adapter irq pacing timer and tx threshold.
|
|
|
|
* We make the transmit threshold 1 initially but we may
|
|
|
|
* change that later.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
cmd = CSR_READ_4(sc, TL_HOSTCMD);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
cmd |= TL_CMD_NES;
|
|
|
|
cmd &= ~(TL_CMD_RT|TL_CMD_EOC|TL_CMD_ACK_MASK|TL_CMD_CHSEL_MASK);
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_PUT(sc, cmd | (TL_CMD_LDTHR | TX_THR));
|
|
|
|
CMD_PUT(sc, cmd | (TL_CMD_LDTMR | 0x00000003));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Unreset the MII */
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETSIO, TL_SIO_NMRST);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Take the adapter out of reset */
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_dio_setbit(sc, TL_NETCMD, TL_CMD_NRESET|TL_CMD_NWRAP);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Wait for things to settle down a little. */
|
|
|
|
DELAY(500);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Probe for a ThunderLAN chip. Check the PCI vendor and device IDs
|
1998-09-23 05:08:54 +00:00
|
|
|
* against our list and return its name if we find a match.
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_probe(dev)
|
1999-07-22 17:00:38 +00:00
|
|
|
device_t dev;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
const struct tl_type *t;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
t = tl_devs;
|
|
|
|
|
|
|
|
while(t->tl_name != NULL) {
|
1999-07-22 17:00:38 +00:00
|
|
|
if ((pci_get_vendor(dev) == t->tl_vid) &&
|
|
|
|
(pci_get_device(dev) == t->tl_did)) {
|
|
|
|
device_set_desc(dev, t->tl_name);
|
2005-02-24 21:32:56 +00:00
|
|
|
return (BUS_PROBE_DEFAULT);
|
1999-07-22 17:00:38 +00:00
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
t++;
|
|
|
|
}
|
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
return(ENXIO);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_attach(dev)
|
1999-07-22 17:00:38 +00:00
|
|
|
device_t dev;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
1998-09-23 05:08:54 +00:00
|
|
|
u_int16_t did, vid;
|
2011-11-01 16:13:59 +00:00
|
|
|
const struct tl_type *t;
|
1998-09-23 05:08:54 +00:00
|
|
|
struct ifnet *ifp;
|
|
|
|
struct tl_softc *sc;
|
2010-10-24 12:51:02 +00:00
|
|
|
int error, flags, i, rid, unit;
|
2005-06-10 16:49:24 +00:00
|
|
|
u_char eaddr[6];
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
vid = pci_get_vendor(dev);
|
|
|
|
did = pci_get_device(dev);
|
|
|
|
sc = device_get_softc(dev);
|
2006-09-15 10:40:54 +00:00
|
|
|
sc->tl_dev = dev;
|
1999-07-22 17:00:38 +00:00
|
|
|
unit = device_get_unit(dev);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
|
|
|
t = tl_devs;
|
|
|
|
while(t->tl_name != NULL) {
|
|
|
|
if (vid == t->tl_vid && did == t->tl_did)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
1998-09-23 05:08:54 +00:00
|
|
|
t++;
|
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
if (t->tl_name == NULL) {
|
2002-10-21 02:54:50 +00:00
|
|
|
device_printf(dev, "unknown device!?\n");
|
2003-03-31 19:24:37 +00:00
|
|
|
return (ENXIO);
|
1998-09-23 05:08:54 +00:00
|
|
|
}
|
|
|
|
|
2002-04-04 21:03:38 +00:00
|
|
|
mtx_init(&sc->tl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
|
2005-09-15 17:12:29 +00:00
|
|
|
MTX_DEF);
|
2000-12-04 22:46:50 +00:00
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Map control/status registers.
|
|
|
|
*/
|
2001-02-21 20:54:22 +00:00
|
|
|
pci_enable_busmaster(dev);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
|
|
|
#ifdef TL_USEIOSPACE
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
rid = TL_PCI_LOIO;
|
2004-03-17 17:50:55 +00:00
|
|
|
sc->tl_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
|
|
|
|
RF_ACTIVE);
|
1999-07-22 17:00:38 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Some cards have the I/O and memory mapped address registers
|
|
|
|
* reversed. Try both combinations before giving up.
|
|
|
|
*/
|
|
|
|
if (sc->tl_res == NULL) {
|
|
|
|
rid = TL_PCI_LOMEM;
|
2004-03-17 17:50:55 +00:00
|
|
|
sc->tl_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
|
|
|
|
RF_ACTIVE);
|
1999-03-30 17:07:20 +00:00
|
|
|
}
|
1998-09-23 05:08:54 +00:00
|
|
|
#else
|
1999-07-22 17:00:38 +00:00
|
|
|
rid = TL_PCI_LOMEM;
|
2004-03-17 17:50:55 +00:00
|
|
|
sc->tl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
|
|
|
|
RF_ACTIVE);
|
1999-07-22 17:00:38 +00:00
|
|
|
if (sc->tl_res == NULL) {
|
|
|
|
rid = TL_PCI_LOIO;
|
2004-03-17 17:50:55 +00:00
|
|
|
sc->tl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
|
|
|
|
RF_ACTIVE);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
1998-09-23 05:08:54 +00:00
|
|
|
#endif
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
if (sc->tl_res == NULL) {
|
2002-10-21 02:54:50 +00:00
|
|
|
device_printf(dev, "couldn't map ports/memory\n");
|
1999-07-22 17:00:38 +00:00
|
|
|
error = ENXIO;
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
#ifdef notdef
|
|
|
|
/*
|
|
|
|
* The ThunderLAN manual suggests jacking the PCI latency
|
|
|
|
* timer all the way up to its maximum value. I'm not sure
|
|
|
|
* if this is really necessary, but what the manual wants,
|
|
|
|
* the manual gets.
|
|
|
|
*/
|
1999-07-22 17:00:38 +00:00
|
|
|
command = pci_read_config(dev, TL_PCI_LATENCY_TIMER, 4);
|
1998-09-23 05:08:54 +00:00
|
|
|
command |= 0x0000FF00;
|
1999-07-22 17:00:38 +00:00
|
|
|
pci_write_config(dev, TL_PCI_LATENCY_TIMER, command, 4);
|
1998-09-23 05:08:54 +00:00
|
|
|
#endif
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Allocate interrupt */
|
1999-07-22 17:00:38 +00:00
|
|
|
rid = 0;
|
2004-03-17 17:50:55 +00:00
|
|
|
sc->tl_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
|
1999-07-22 17:00:38 +00:00
|
|
|
RF_SHAREABLE | RF_ACTIVE);
|
|
|
|
|
|
|
|
if (sc->tl_irq == NULL) {
|
2002-10-21 02:54:50 +00:00
|
|
|
device_printf(dev, "couldn't map interrupt\n");
|
1999-07-22 17:00:38 +00:00
|
|
|
error = ENXIO;
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
1999-09-19 22:39:24 +00:00
|
|
|
* Now allocate memory for the TX and RX lists.
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*/
|
1999-09-19 22:39:24 +00:00
|
|
|
sc->tl_ldata = contigmalloc(sizeof(struct tl_list_data), M_DEVBUF,
|
1999-09-25 17:29:02 +00:00
|
|
|
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
1999-09-19 22:39:24 +00:00
|
|
|
if (sc->tl_ldata == NULL) {
|
2002-10-21 02:54:50 +00:00
|
|
|
device_printf(dev, "no memory for list buffers!\n");
|
1999-07-22 17:00:38 +00:00
|
|
|
error = ENXIO;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
bzero(sc->tl_ldata, sizeof(struct tl_list_data));
|
|
|
|
|
2010-10-24 12:51:02 +00:00
|
|
|
if (vid == COMPAQ_VENDORID || vid == TI_VENDORID)
|
1998-09-23 05:08:54 +00:00
|
|
|
sc->tl_eeaddr = TL_EEPROM_EADDR;
|
2010-10-24 12:51:02 +00:00
|
|
|
if (vid == OLICOM_VENDORID)
|
1998-09-23 05:08:54 +00:00
|
|
|
sc->tl_eeaddr = TL_EEPROM_EADDR_OC;
|
|
|
|
|
|
|
|
/* Reset the adapter. */
|
|
|
|
tl_softreset(sc, 1);
|
1999-08-27 21:18:02 +00:00
|
|
|
tl_hardreset(dev);
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_softreset(sc, 1);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get station address from the EEPROM.
|
|
|
|
*/
|
2005-06-10 16:49:24 +00:00
|
|
|
if (tl_read_eeprom(sc, eaddr, sc->tl_eeaddr, ETHER_ADDR_LEN)) {
|
2002-10-21 02:54:50 +00:00
|
|
|
device_printf(dev, "failed to read station address\n");
|
1999-07-22 17:00:38 +00:00
|
|
|
error = ENXIO;
|
1998-09-23 05:08:54 +00:00
|
|
|
goto fail;
|
Updates for the ThunderLAN driver:
- probe for PHYs by checking the BMSR (phy status) register instead
of the vendor ID register.
- fix the autonegotiation routine so that it figures out the autonegotiated
modes correctly.
- add tweaks to support the Olicom OC-2326 now that I've actually had
a chance to test one
o Olicom appears to encode the ethernet address in the EEPROM
in 16-bit chunks in network byte order. If we detect an
Olicom card (based on the PCI vendor ID), byte-swap the station
address accordingly.
XXX The Linux driver does not do this. I find this odd since
the README from the Linux driver indicates that patches to
support the Olicom cards came from somebody at Olicom; you'd
think if anyone would get that right, it'd be them. Regardless,
I accepted the word of the disgnoatic program that came bundled
with the card as gospel and fixed the attach routine to make
the station address match what it says.
o The version of the 2326 card that I got for testing is a
strange beast: the card does not look like the picture on
the box in which it was packed. For one thing, the picture
shows what looks like an external NS 83840A PHY, but the
actual card doesn't have one. The card has a TNETE100APCM
chip, which appears to have not only the usual internal
tlan 10Mbps PHY at MII address 32, but also a 10/100 PHY
at MII address 0. Curiously, this PHY's vendor and device ID
registers always return 0x0000. I suspect that this is
a mutant version of the ThunderLAN chip with 100Mbps support.
This combination behaves a little strangely and required the
following changes:
- The internal PHY has to be enabled in tl_softreset().
- The internal PHY doesn't seem to come to life after
detecting the 100Mbps PHY unless it's reset twice.
- If you want to use 100Mbps modes, you have to isolate
the internal PHY.
- If you want to use 10Mbps modes, you have to un-isolate
the internal PHY.
The latter two changes are handled at the end of tl_init(): if
the PHY vendor ID is 0x0000 (which should not be possible if we
have a real external PHY), then tl_init() forces the internal
PHY's BMCR register to the proper values.
1998-08-03 01:33:12 +00:00
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
/*
|
|
|
|
* XXX Olicom, in its desire to be different from the
|
|
|
|
* rest of the world, has done strange things with the
|
|
|
|
* encoding of the station address in the EEPROM. First
|
|
|
|
* of all, they store the address at offset 0xF8 rather
|
|
|
|
* than at 0x83 like the ThunderLAN manual suggests.
|
|
|
|
* Second, they store the address in three 16-bit words in
|
|
|
|
* network byte order, as opposed to storing it sequentially
|
|
|
|
* like all the other ThunderLAN cards. In order to get
|
|
|
|
* the station address in a form that matches what the Olicom
|
|
|
|
* diagnostic utility specifies, we have to byte-swap each
|
|
|
|
* word. To make things even more confusing, neither 00:00:28
|
|
|
|
* nor 00:00:24 appear in the IEEE OUI database.
|
|
|
|
*/
|
2010-10-24 12:51:02 +00:00
|
|
|
if (vid == OLICOM_VENDORID) {
|
1998-09-23 05:08:54 +00:00
|
|
|
for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
|
|
|
|
u_int16_t *p;
|
2005-06-10 16:49:24 +00:00
|
|
|
p = (u_int16_t *)&eaddr[i];
|
1998-09-23 05:08:54 +00:00
|
|
|
*p = ntohs(*p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp = if_alloc(IFT_ETHER);
|
|
|
|
if (ifp == NULL) {
|
|
|
|
device_printf(dev, "can not if_alloc()\n");
|
|
|
|
error = ENOSPC;
|
|
|
|
goto fail;
|
|
|
|
}
|
1998-09-23 05:08:54 +00:00
|
|
|
ifp->if_softc = sc;
|
2003-10-31 18:32:15 +00:00
|
|
|
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
2005-09-15 17:12:29 +00:00
|
|
|
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
1998-09-23 05:08:54 +00:00
|
|
|
ifp->if_ioctl = tl_ioctl;
|
|
|
|
ifp->if_start = tl_start;
|
|
|
|
ifp->if_init = tl_init;
|
1999-09-19 22:39:24 +00:00
|
|
|
ifp->if_snd.ifq_maxlen = TL_TX_LIST_CNT - 1;
|
2007-05-09 09:02:11 +00:00
|
|
|
ifp->if_capabilities |= IFCAP_VLAN_MTU;
|
|
|
|
ifp->if_capenable |= IFCAP_VLAN_MTU;
|
2005-09-15 17:12:29 +00:00
|
|
|
callout_init_mtx(&sc->tl_stat_callout, &sc->tl_mtx, 0);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
|
|
|
/* Reset the adapter again. */
|
|
|
|
tl_softreset(sc, 1);
|
1999-08-27 21:18:02 +00:00
|
|
|
tl_hardreset(dev);
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_softreset(sc, 1);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
* Do MII setup. If no PHYs are found, then this is a
|
|
|
|
* bitrate ThunderLAN chip that only supports 10baseT
|
|
|
|
* and AUI/BNC.
|
2010-10-15 15:00:30 +00:00
|
|
|
* XXX mii_attach() can fail for reason different than
|
|
|
|
* no PHYs found!
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
*/
|
2010-10-24 12:51:02 +00:00
|
|
|
flags = 0;
|
|
|
|
if (vid == COMPAQ_VENDORID) {
|
|
|
|
if (did == COMPAQ_DEVICEID_NETEL_10_100_PROLIANT ||
|
|
|
|
did == COMPAQ_DEVICEID_NETFLEX_3P_INTEGRATED ||
|
|
|
|
did == COMPAQ_DEVICEID_NETFLEX_3P_BNC ||
|
|
|
|
did == COMPAQ_DEVICEID_NETEL_10_T2_UTP_COAX)
|
|
|
|
flags |= MIIF_MACPRIV0;
|
|
|
|
if (did == COMPAQ_DEVICEID_NETEL_10 ||
|
|
|
|
did == COMPAQ_DEVICEID_NETEL_10_100_DUAL ||
|
|
|
|
did == COMPAQ_DEVICEID_NETFLEX_3P ||
|
|
|
|
did == COMPAQ_DEVICEID_NETEL_10_100_EMBEDDED)
|
|
|
|
flags |= MIIF_MACPRIV1;
|
|
|
|
} else if (vid == OLICOM_VENDORID && did == OLICOM_DEVICEID_OC2183)
|
|
|
|
flags |= MIIF_MACPRIV0 | MIIF_MACPRIV1;
|
2010-10-15 15:00:30 +00:00
|
|
|
if (mii_attach(dev, &sc->tl_miibus, ifp, tl_ifmedia_upd,
|
|
|
|
tl_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0)) {
|
1999-03-30 17:07:20 +00:00
|
|
|
struct ifmedia *ifm;
|
|
|
|
sc->tl_bitrate = 1;
|
|
|
|
ifmedia_init(&sc->ifmedia, 0, tl_ifmedia_upd, tl_ifmedia_sts);
|
|
|
|
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_10_T, 0, NULL);
|
|
|
|
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_10_T|IFM_HDX, 0, NULL);
|
|
|
|
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_10_T|IFM_FDX, 0, NULL);
|
|
|
|
ifmedia_add(&sc->ifmedia, IFM_ETHER|IFM_10_5, 0, NULL);
|
1999-03-31 04:04:14 +00:00
|
|
|
ifmedia_set(&sc->ifmedia, IFM_ETHER|IFM_10_T);
|
1999-03-30 17:07:20 +00:00
|
|
|
/* Reset again, this time setting bitrate mode. */
|
|
|
|
tl_softreset(sc, 1);
|
|
|
|
ifm = &sc->ifmedia;
|
|
|
|
ifm->ifm_media = ifm->ifm_cur->ifm_media;
|
|
|
|
tl_ifmedia_upd(ifp);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
/*
|
2000-07-13 22:54:34 +00:00
|
|
|
* Call MI attach routine.
|
1998-09-23 05:08:54 +00:00
|
|
|
*/
|
2005-06-10 16:49:24 +00:00
|
|
|
ether_ifattach(ifp, eaddr);
|
2003-03-31 17:29:43 +00:00
|
|
|
|
2003-04-17 20:32:06 +00:00
|
|
|
/* Hook interrupt last to avoid having to lock softc */
|
2005-09-15 17:12:29 +00:00
|
|
|
error = bus_setup_intr(dev, sc->tl_irq, INTR_TYPE_NET | INTR_MPSAFE,
|
2007-02-23 12:19:07 +00:00
|
|
|
NULL, tl_intr, sc, &sc->tl_intrhand);
|
2003-03-31 17:29:43 +00:00
|
|
|
|
|
|
|
if (error) {
|
|
|
|
device_printf(dev, "couldn't set up irq\n");
|
2003-04-17 20:32:06 +00:00
|
|
|
ether_ifdetach(ifp);
|
2003-03-31 17:29:43 +00:00
|
|
|
goto fail;
|
|
|
|
}
|
1998-09-23 05:08:54 +00:00
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
fail:
|
2003-03-31 17:29:43 +00:00
|
|
|
if (error)
|
|
|
|
tl_detach(dev);
|
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
return(error);
|
|
|
|
}
|
|
|
|
|
2003-04-17 20:32:06 +00:00
|
|
|
/*
|
|
|
|
* Shutdown hardware and free up resources. This can be called any
|
|
|
|
* time after the mutex has been initialized. It is called in both
|
|
|
|
* the error case in attach and the normal detach case so it needs
|
|
|
|
* to be careful about only freeing resources that have actually been
|
|
|
|
* allocated.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_detach(dev)
|
1999-07-22 17:00:38 +00:00
|
|
|
device_t dev;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
struct ifnet *ifp;
|
|
|
|
|
|
|
|
sc = device_get_softc(dev);
|
2003-03-31 20:22:00 +00:00
|
|
|
KASSERT(mtx_initialized(&sc->tl_mtx), ("tl mutex not initialized"));
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
1999-07-22 17:00:38 +00:00
|
|
|
|
2003-04-17 20:32:06 +00:00
|
|
|
/* These should only be active if attach succeeded */
|
2003-04-21 18:34:04 +00:00
|
|
|
if (device_is_attached(dev)) {
|
2009-11-19 22:14:23 +00:00
|
|
|
ether_ifdetach(ifp);
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK(sc);
|
2003-04-17 20:32:06 +00:00
|
|
|
tl_stop(sc);
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_UNLOCK(sc);
|
|
|
|
callout_drain(&sc->tl_stat_callout);
|
2003-03-31 17:29:43 +00:00
|
|
|
}
|
2003-04-17 20:32:06 +00:00
|
|
|
if (sc->tl_miibus)
|
|
|
|
device_delete_child(dev, sc->tl_miibus);
|
|
|
|
bus_generic_detach(dev);
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
|
2003-03-31 17:29:43 +00:00
|
|
|
if (sc->tl_ldata)
|
|
|
|
contigfree(sc->tl_ldata, sizeof(struct tl_list_data), M_DEVBUF);
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if (sc->tl_bitrate)
|
|
|
|
ifmedia_removeall(&sc->ifmedia);
|
1999-07-22 17:00:38 +00:00
|
|
|
|
2003-03-31 17:29:43 +00:00
|
|
|
if (sc->tl_intrhand)
|
|
|
|
bus_teardown_intr(dev, sc->tl_irq, sc->tl_intrhand);
|
|
|
|
if (sc->tl_irq)
|
|
|
|
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->tl_irq);
|
|
|
|
if (sc->tl_res)
|
|
|
|
bus_release_resource(dev, TL_RES, TL_RID, sc->tl_res);
|
1999-07-22 17:00:38 +00:00
|
|
|
|
2005-10-13 21:11:20 +00:00
|
|
|
if (ifp)
|
|
|
|
if_free(ifp);
|
|
|
|
|
2000-10-13 17:54:19 +00:00
|
|
|
mtx_destroy(&sc->tl_mtx);
|
1999-07-22 17:00:38 +00:00
|
|
|
|
|
|
|
return(0);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize the transmit lists.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_list_tx_init(sc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
{
|
|
|
|
struct tl_chain_data *cd;
|
|
|
|
struct tl_list_data *ld;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
cd = &sc->tl_cdata;
|
|
|
|
ld = sc->tl_ldata;
|
|
|
|
for (i = 0; i < TL_TX_LIST_CNT; i++) {
|
|
|
|
cd->tl_tx_chain[i].tl_ptr = &ld->tl_tx_list[i];
|
|
|
|
if (i == (TL_TX_LIST_CNT - 1))
|
|
|
|
cd->tl_tx_chain[i].tl_next = NULL;
|
|
|
|
else
|
|
|
|
cd->tl_tx_chain[i].tl_next = &cd->tl_tx_chain[i + 1];
|
|
|
|
}
|
|
|
|
|
|
|
|
cd->tl_tx_free = &cd->tl_tx_chain[0];
|
|
|
|
cd->tl_tx_tail = cd->tl_tx_head = NULL;
|
|
|
|
sc->tl_txeoc = 1;
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize the RX lists and allocate mbufs for them.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_list_rx_init(sc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
{
|
2011-11-01 16:13:59 +00:00
|
|
|
struct tl_chain_data *cd;
|
|
|
|
struct tl_list_data *ld;
|
|
|
|
int i;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
cd = &sc->tl_cdata;
|
|
|
|
ld = sc->tl_ldata;
|
|
|
|
|
1998-10-31 17:23:48 +00:00
|
|
|
for (i = 0; i < TL_RX_LIST_CNT; i++) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
cd->tl_rx_chain[i].tl_ptr =
|
1998-07-13 18:15:48 +00:00
|
|
|
(struct tl_list_onefrag *)&ld->tl_rx_list[i];
|
1998-09-23 05:08:54 +00:00
|
|
|
if (tl_newbuf(sc, &cd->tl_rx_chain[i]) == ENOBUFS)
|
|
|
|
return(ENOBUFS);
|
1998-10-31 17:23:48 +00:00
|
|
|
if (i == (TL_RX_LIST_CNT - 1)) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
cd->tl_rx_chain[i].tl_next = NULL;
|
|
|
|
ld->tl_rx_list[i].tlist_fptr = 0;
|
|
|
|
} else {
|
|
|
|
cd->tl_rx_chain[i].tl_next = &cd->tl_rx_chain[i + 1];
|
|
|
|
ld->tl_rx_list[i].tlist_fptr =
|
|
|
|
vtophys(&ld->tl_rx_list[i + 1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cd->tl_rx_head = &cd->tl_rx_chain[0];
|
|
|
|
cd->tl_rx_tail = &cd->tl_rx_chain[TL_RX_LIST_CNT - 1];
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_newbuf(sc, c)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
1998-07-13 18:15:48 +00:00
|
|
|
struct tl_chain_onefrag *c;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
|
|
|
struct mbuf *m_new = NULL;
|
|
|
|
|
2012-12-04 09:32:43 +00:00
|
|
|
m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
|
2001-12-14 05:56:35 +00:00
|
|
|
if (m_new == NULL)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(ENOBUFS);
|
|
|
|
|
|
|
|
c->tl_mbuf = m_new;
|
|
|
|
c->tl_next = NULL;
|
|
|
|
c->tl_ptr->tlist_frsize = MCLBYTES;
|
|
|
|
c->tl_ptr->tlist_fptr = 0;
|
1998-07-13 18:15:48 +00:00
|
|
|
c->tl_ptr->tl_frag.tlist_dadr = vtophys(mtod(m_new, caddr_t));
|
|
|
|
c->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES;
|
2000-01-15 20:14:49 +00:00
|
|
|
c->tl_ptr->tlist_cstat = TL_CSTAT_READY;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* Interrupt handler for RX 'end of frame' condition (EOF). This
|
|
|
|
* tells us that a full ethernet frame has been captured and we need
|
|
|
|
* to handle it.
|
|
|
|
*
|
|
|
|
* Reception is done using 'lists' which consist of a header and a
|
|
|
|
* series of 10 data count/data address pairs that point to buffers.
|
|
|
|
* Initially you're supposed to create a list, populate it with pointers
|
|
|
|
* to buffers, then load the physical address of the list into the
|
|
|
|
* ch_parm register. The adapter is then supposed to DMA the received
|
|
|
|
* frame into the buffers for you.
|
|
|
|
*
|
|
|
|
* To make things as fast as possible, we have the chip DMA directly
|
|
|
|
* into mbufs. This saves us from having to do a buffer copy: we can
|
|
|
|
* just hand the mbufs directly to ether_input(). Once the frame has
|
|
|
|
* been sent on its way, the 'list' structure is assigned a new buffer
|
|
|
|
* and moved to the end of the RX chain. As long we we stay ahead of
|
|
|
|
* the chip, it will always think it has an endless receive channel.
|
|
|
|
*
|
|
|
|
* If we happen to fall behind and the chip manages to fill up all of
|
|
|
|
* the buffers, it will generate an end of channel interrupt and wait
|
|
|
|
* for us to empty the chain and restart the receiver.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_intvec_rxeof(xsc, type)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
u_int32_t type;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
int r = 0, total_len = 0;
|
|
|
|
struct ether_header *eh;
|
|
|
|
struct mbuf *m;
|
|
|
|
struct ifnet *ifp;
|
1998-07-13 18:15:48 +00:00
|
|
|
struct tl_chain_onefrag *cur_rx;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
sc = xsc;
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2003-11-14 19:00:32 +00:00
|
|
|
TL_LOCK_ASSERT(sc);
|
|
|
|
|
2000-01-15 20:14:49 +00:00
|
|
|
while(sc->tl_cdata.tl_rx_head != NULL) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
cur_rx = sc->tl_cdata.tl_rx_head;
|
2000-01-15 20:14:49 +00:00
|
|
|
if (!(cur_rx->tl_ptr->tlist_cstat & TL_CSTAT_FRAMECMP))
|
|
|
|
break;
|
|
|
|
r++;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
sc->tl_cdata.tl_rx_head = cur_rx->tl_next;
|
|
|
|
m = cur_rx->tl_mbuf;
|
|
|
|
total_len = cur_rx->tl_ptr->tlist_frsize;
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
if (tl_newbuf(sc, cur_rx) == ENOBUFS) {
|
2014-09-18 20:03:45 +00:00
|
|
|
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
|
1998-09-23 05:08:54 +00:00
|
|
|
cur_rx->tl_ptr->tlist_frsize = MCLBYTES;
|
|
|
|
cur_rx->tl_ptr->tlist_cstat = TL_CSTAT_READY;
|
|
|
|
cur_rx->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES;
|
|
|
|
continue;
|
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
sc->tl_cdata.tl_rx_tail->tl_ptr->tlist_fptr =
|
|
|
|
vtophys(cur_rx->tl_ptr);
|
|
|
|
sc->tl_cdata.tl_rx_tail->tl_next = cur_rx;
|
|
|
|
sc->tl_cdata.tl_rx_tail = cur_rx;
|
|
|
|
|
1998-07-13 18:15:48 +00:00
|
|
|
/*
|
|
|
|
* Note: when the ThunderLAN chip is in 'capture all
|
|
|
|
* frames' mode, it will receive its own transmissions.
|
|
|
|
* We drop don't need to process our own transmissions,
|
|
|
|
* so we drop them here and continue.
|
|
|
|
*/
|
2002-11-14 23:49:09 +00:00
|
|
|
eh = mtod(m, struct ether_header *);
|
1998-09-23 05:08:54 +00:00
|
|
|
/*if (ifp->if_flags & IFF_PROMISC && */
|
2005-11-11 16:04:59 +00:00
|
|
|
if (!bcmp(eh->ether_shost, IF_LLADDR(sc->tl_ifp),
|
1998-07-13 18:15:48 +00:00
|
|
|
ETHER_ADDR_LEN)) {
|
|
|
|
m_freem(m);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2002-11-14 23:49:09 +00:00
|
|
|
m->m_pkthdr.rcvif = ifp;
|
|
|
|
m->m_pkthdr.len = m->m_len = total_len;
|
|
|
|
|
2003-11-14 19:00:32 +00:00
|
|
|
TL_UNLOCK(sc);
|
2002-11-14 23:49:09 +00:00
|
|
|
(*ifp->if_input)(ifp, m);
|
2003-11-14 19:00:32 +00:00
|
|
|
TL_LOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return(r);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The RX-EOC condition hits when the ch_parm address hasn't been
|
|
|
|
* initialized or the adapter reached a list with a forward pointer
|
|
|
|
* of 0 (which indicates the end of the chain). In our case, this means
|
|
|
|
* the card has hit the end of the receive buffer chain and we need to
|
|
|
|
* empty out the buffers and shift the pointer back to the beginning again.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_intvec_rxeoc(xsc, type)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
u_int32_t type;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
int r;
|
2000-01-15 20:14:49 +00:00
|
|
|
struct tl_chain_data *cd;
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
sc = xsc;
|
2000-01-15 20:14:49 +00:00
|
|
|
cd = &sc->tl_cdata;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Flush out the receive queue and ack RXEOF interrupts. */
|
|
|
|
r = tl_intvec_rxeof(xsc, type);
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_PUT(sc, TL_CMD_ACK | r | (type & ~(0x00100000)));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
r = 1;
|
2000-01-15 20:14:49 +00:00
|
|
|
cd->tl_rx_head = &cd->tl_rx_chain[0];
|
|
|
|
cd->tl_rx_tail = &cd->tl_rx_chain[TL_RX_LIST_CNT - 1];
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM, vtophys(sc->tl_cdata.tl_rx_head->tl_ptr));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
r |= (TL_CMD_GO|TL_CMD_RT);
|
|
|
|
return(r);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_intvec_txeof(xsc, type)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
u_int32_t type;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
int r = 0;
|
|
|
|
struct tl_chain *cur_tx;
|
|
|
|
|
|
|
|
sc = xsc;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Go through our tx list and free mbufs for those
|
|
|
|
* frames that have been sent.
|
|
|
|
*/
|
|
|
|
while (sc->tl_cdata.tl_tx_head != NULL) {
|
|
|
|
cur_tx = sc->tl_cdata.tl_tx_head;
|
|
|
|
if (!(cur_tx->tl_ptr->tlist_cstat & TL_CSTAT_FRAMECMP))
|
|
|
|
break;
|
|
|
|
sc->tl_cdata.tl_tx_head = cur_tx->tl_next;
|
|
|
|
|
|
|
|
r++;
|
|
|
|
m_freem(cur_tx->tl_mbuf);
|
|
|
|
cur_tx->tl_mbuf = NULL;
|
|
|
|
|
|
|
|
cur_tx->tl_next = sc->tl_cdata.tl_tx_free;
|
|
|
|
sc->tl_cdata.tl_tx_free = cur_tx;
|
1998-07-13 18:15:48 +00:00
|
|
|
if (!cur_tx->tl_ptr->tlist_fptr)
|
|
|
|
break;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return(r);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The transmit end of channel interrupt. The adapter triggers this
|
|
|
|
* interrupt to tell us it hit the end of the current transmit list.
|
|
|
|
*
|
|
|
|
* A note about this: it's possible for a condition to arise where
|
|
|
|
* tl_start() may try to send frames between TXEOF and TXEOC interrupts.
|
|
|
|
* You have to avoid this since the chip expects things to go in a
|
|
|
|
* particular order: transmit, acknowledge TXEOF, acknowledge TXEOC.
|
|
|
|
* When the TXEOF handler is called, it will free all of the transmitted
|
|
|
|
* frames and reset the tx_head pointer to NULL. However, a TXEOC
|
|
|
|
* interrupt should be received and acknowledged before any more frames
|
|
|
|
* are queued for transmission. If tl_statrt() is called after TXEOF
|
|
|
|
* resets the tx_head pointer but _before_ the TXEOC interrupt arrives,
|
|
|
|
* it could attempt to issue a transmit command prematurely.
|
|
|
|
*
|
|
|
|
* To guard against this, tl_start() will only issue transmit commands
|
|
|
|
* if the tl_txeoc flag is set, and only the TXEOC interrupt handler
|
|
|
|
* can set this flag once tl_start() has cleared it.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_intvec_txeoc(xsc, type)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
u_int32_t type;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
struct ifnet *ifp;
|
|
|
|
u_int32_t cmd;
|
|
|
|
|
|
|
|
sc = xsc;
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Clear the timeout timer. */
|
2009-11-19 22:14:23 +00:00
|
|
|
sc->tl_timer = 0;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
if (sc->tl_cdata.tl_tx_head == NULL) {
|
2005-08-09 10:20:02 +00:00
|
|
|
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
sc->tl_cdata.tl_tx_tail = NULL;
|
|
|
|
sc->tl_txeoc = 1;
|
|
|
|
} else {
|
|
|
|
sc->tl_txeoc = 0;
|
|
|
|
/* First we have to ack the EOC interrupt. */
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_PUT(sc, TL_CMD_ACK | 0x00000001 | type);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/* Then load the address of the next TX list. */
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM,
|
1999-09-19 22:39:24 +00:00
|
|
|
vtophys(sc->tl_cdata.tl_tx_head->tl_ptr));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/* Restart TX channel. */
|
1998-09-23 05:08:54 +00:00
|
|
|
cmd = CSR_READ_4(sc, TL_HOSTCMD);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
cmd &= ~TL_CMD_RT;
|
|
|
|
cmd |= TL_CMD_GO|TL_CMD_INTSON;
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_PUT(sc, cmd);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_intvec_adchk(xsc, type)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
u_int32_t type;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
|
|
|
|
sc = xsc;
|
|
|
|
|
1998-09-24 17:14:23 +00:00
|
|
|
if (type)
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev, "adapter check: %x\n",
|
1998-12-10 19:02:07 +00:00
|
|
|
(unsigned int)CSR_READ_4(sc, TL_CH_PARM));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_softreset(sc, 1);
|
1998-07-13 18:15:48 +00:00
|
|
|
tl_stop(sc);
|
2005-09-15 17:12:29 +00:00
|
|
|
tl_init_locked(sc);
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_SET(sc, TL_CMD_INTSON);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_intvec_netsts(xsc, type)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
u_int32_t type;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
u_int16_t netsts;
|
|
|
|
|
|
|
|
sc = xsc;
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
netsts = tl_dio_read16(sc, TL_NETSTS);
|
|
|
|
tl_dio_write16(sc, TL_NETSTS, netsts);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev, "network status: %x\n", netsts);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_intr(xsc)
|
1998-09-23 05:08:54 +00:00
|
|
|
void *xsc;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
struct ifnet *ifp;
|
|
|
|
int r = 0;
|
|
|
|
u_int32_t type = 0;
|
|
|
|
u_int16_t ints = 0;
|
|
|
|
u_int8_t ivec = 0;
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
sc = xsc;
|
2000-10-13 17:54:19 +00:00
|
|
|
TL_LOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Disable interrupts */
|
1998-09-23 05:08:54 +00:00
|
|
|
ints = CSR_READ_2(sc, TL_HOST_INT);
|
|
|
|
CSR_WRITE_2(sc, TL_HOST_INT, ints);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
type = (ints << 16) & 0xFFFF0000;
|
|
|
|
ivec = (ints & TL_VEC_MASK) >> 5;
|
|
|
|
ints = (ints & TL_INT_MASK) >> 2;
|
|
|
|
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
switch(ints) {
|
|
|
|
case (TL_INTR_INVALID):
|
1998-09-23 05:08:54 +00:00
|
|
|
#ifdef DIAGNOSTIC
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev, "got an invalid interrupt!\n");
|
1998-09-23 05:08:54 +00:00
|
|
|
#endif
|
|
|
|
/* Re-enable interrupts but don't ack this one. */
|
|
|
|
CMD_PUT(sc, type);
|
|
|
|
r = 0;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
|
|
|
case (TL_INTR_TXEOF):
|
|
|
|
r = tl_intvec_txeof((void *)sc, type);
|
|
|
|
break;
|
|
|
|
case (TL_INTR_TXEOC):
|
|
|
|
r = tl_intvec_txeoc((void *)sc, type);
|
|
|
|
break;
|
|
|
|
case (TL_INTR_STATOFLOW):
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_stats_update(sc);
|
|
|
|
r = 1;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
|
|
|
case (TL_INTR_RXEOF):
|
|
|
|
r = tl_intvec_rxeof((void *)sc, type);
|
|
|
|
break;
|
|
|
|
case (TL_INTR_DUMMY):
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev, "got a dummy interrupt\n");
|
1998-09-23 05:08:54 +00:00
|
|
|
r = 1;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
|
|
|
case (TL_INTR_ADCHK):
|
|
|
|
if (ivec)
|
|
|
|
r = tl_intvec_adchk((void *)sc, type);
|
|
|
|
else
|
|
|
|
r = tl_intvec_netsts((void *)sc, type);
|
|
|
|
break;
|
|
|
|
case (TL_INTR_RXEOC):
|
|
|
|
r = tl_intvec_rxeoc((void *)sc, type);
|
|
|
|
break;
|
|
|
|
default:
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev, "bogus interrupt type\n");
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Re-enable interrupts */
|
1998-07-13 18:15:48 +00:00
|
|
|
if (r) {
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_PUT(sc, TL_CMD_ACK | r | type);
|
1998-07-13 18:15:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (ifp->if_snd.ifq_head != NULL)
|
2005-09-15 17:12:29 +00:00
|
|
|
tl_start_locked(ifp);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2000-10-13 17:54:19 +00:00
|
|
|
TL_UNLOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_stats_update(xsc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
|
|
|
struct ifnet *ifp;
|
|
|
|
struct tl_stats tl_stats;
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
struct mii_data *mii;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
u_int32_t *p;
|
|
|
|
|
|
|
|
bzero((char *)&tl_stats, sizeof(struct tl_stats));
|
|
|
|
|
|
|
|
sc = xsc;
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK_ASSERT(sc);
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
p = (u_int32_t *)&tl_stats;
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_2(sc, TL_DIO_ADDR, TL_TXGOODFRAMES|TL_DIO_ADDR_INC);
|
|
|
|
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
|
|
|
|
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
|
|
|
|
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
|
|
|
|
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
|
|
|
|
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2014-09-18 20:03:45 +00:00
|
|
|
if_inc_counter(ifp, IFCOUNTER_OPACKETS, tl_tx_goodframes(tl_stats));
|
|
|
|
if_inc_counter(ifp, IFCOUNTER_COLLISIONS,
|
|
|
|
tl_stats.tl_tx_single_collision + tl_stats.tl_tx_multi_collision);
|
|
|
|
if_inc_counter(ifp, IFCOUNTER_IPACKETS, tl_rx_goodframes(tl_stats));
|
|
|
|
if_inc_counter(ifp, IFCOUNTER_IERRORS, tl_stats.tl_crc_errors +
|
|
|
|
tl_stats.tl_code_errors + tl_rx_overrun(tl_stats));
|
|
|
|
if_inc_counter(ifp, IFCOUNTER_OERRORS, tl_tx_underrun(tl_stats));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-09-19 22:39:24 +00:00
|
|
|
if (tl_tx_underrun(tl_stats)) {
|
|
|
|
u_int8_t tx_thresh;
|
|
|
|
tx_thresh = tl_dio_read8(sc, TL_ACOMMIT) & TL_AC_TXTHRESH;
|
|
|
|
if (tx_thresh != TL_AC_TXTHRESH_WHOLEPKT) {
|
|
|
|
tx_thresh >>= 4;
|
|
|
|
tx_thresh++;
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev, "tx underrun -- increasing "
|
2002-10-21 02:54:50 +00:00
|
|
|
"tx threshold to %d bytes\n",
|
1999-09-19 22:39:24 +00:00
|
|
|
(64 * (tx_thresh * 4)));
|
|
|
|
tl_dio_clrbit(sc, TL_ACOMMIT, TL_AC_TXTHRESH);
|
|
|
|
tl_dio_setbit(sc, TL_ACOMMIT, tx_thresh << 4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-11-19 22:14:23 +00:00
|
|
|
if (sc->tl_timer > 0 && --sc->tl_timer == 0)
|
|
|
|
tl_watchdog(sc);
|
|
|
|
|
2005-09-15 17:12:29 +00:00
|
|
|
callout_reset(&sc->tl_stat_callout, hz, tl_stats_update, sc);
|
1998-05-22 15:32:22 +00:00
|
|
|
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if (!sc->tl_bitrate) {
|
|
|
|
mii = device_get_softc(sc->tl_miibus);
|
|
|
|
mii_tick(mii);
|
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Encapsulate an mbuf chain in a list by coupling the mbuf data
|
|
|
|
* pointers to the fragment pointers.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_encap(sc, c, m_head)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
struct tl_chain *c;
|
|
|
|
struct mbuf *m_head;
|
|
|
|
{
|
|
|
|
int frag = 0;
|
|
|
|
struct tl_frag *f = NULL;
|
|
|
|
int total_len;
|
|
|
|
struct mbuf *m;
|
2005-06-10 16:49:24 +00:00
|
|
|
struct ifnet *ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Start packing the mbufs in this chain into
|
|
|
|
* the fragment pointers. Stop when we run out
|
|
|
|
* of fragments or hit the end of the mbuf chain.
|
|
|
|
*/
|
|
|
|
m = m_head;
|
|
|
|
total_len = 0;
|
|
|
|
|
|
|
|
for (m = m_head, frag = 0; m != NULL; m = m->m_next) {
|
|
|
|
if (m->m_len != 0) {
|
|
|
|
if (frag == TL_MAXFRAGS)
|
|
|
|
break;
|
|
|
|
total_len+= m->m_len;
|
|
|
|
c->tl_ptr->tl_frag[frag].tlist_dadr =
|
|
|
|
vtophys(mtod(m, vm_offset_t));
|
|
|
|
c->tl_ptr->tl_frag[frag].tlist_dcnt = m->m_len;
|
|
|
|
frag++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Handle special cases.
|
|
|
|
* Special case #1: we used up all 10 fragments, but
|
|
|
|
* we have more mbufs left in the chain. Copy the
|
|
|
|
* data into an mbuf cluster. Note that we don't
|
|
|
|
* bother clearing the values in the other fragment
|
|
|
|
* pointers/counters; it wouldn't gain us anything,
|
|
|
|
* and would waste cycles.
|
|
|
|
*/
|
|
|
|
if (m != NULL) {
|
|
|
|
struct mbuf *m_new = NULL;
|
|
|
|
|
2012-12-04 09:32:43 +00:00
|
|
|
MGETHDR(m_new, M_NOWAIT, MT_DATA);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (m_new == NULL) {
|
2002-10-21 02:54:50 +00:00
|
|
|
if_printf(ifp, "no memory for tx list\n");
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
if (m_head->m_pkthdr.len > MHLEN) {
|
2015-01-06 12:59:37 +00:00
|
|
|
if (!(MCLGET(m_new, M_NOWAIT))) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
m_freem(m_new);
|
2002-10-21 02:54:50 +00:00
|
|
|
if_printf(ifp, "no memory for tx list\n");
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_copydata(m_head, 0, m_head->m_pkthdr.len,
|
|
|
|
mtod(m_new, caddr_t));
|
|
|
|
m_new->m_pkthdr.len = m_new->m_len = m_head->m_pkthdr.len;
|
|
|
|
m_freem(m_head);
|
|
|
|
m_head = m_new;
|
|
|
|
f = &c->tl_ptr->tl_frag[0];
|
|
|
|
f->tlist_dadr = vtophys(mtod(m_new, caddr_t));
|
|
|
|
f->tlist_dcnt = total_len = m_new->m_len;
|
|
|
|
frag = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Special case #2: the frame is smaller than the minimum
|
|
|
|
* frame size. We have to pad it to make the chip happy.
|
|
|
|
*/
|
|
|
|
if (total_len < TL_MIN_FRAMELEN) {
|
|
|
|
if (frag == TL_MAXFRAGS)
|
2002-10-21 02:54:50 +00:00
|
|
|
if_printf(ifp,
|
|
|
|
"all frags filled but frame still to small!\n");
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
f = &c->tl_ptr->tl_frag[frag];
|
|
|
|
f->tlist_dcnt = TL_MIN_FRAMELEN - total_len;
|
|
|
|
f->tlist_dadr = vtophys(&sc->tl_ldata->tl_pad);
|
|
|
|
total_len += f->tlist_dcnt;
|
|
|
|
frag++;
|
|
|
|
}
|
|
|
|
|
|
|
|
c->tl_mbuf = m_head;
|
|
|
|
c->tl_ptr->tl_frag[frag - 1].tlist_dcnt |= TL_LAST_FRAG;
|
|
|
|
c->tl_ptr->tlist_frsize = total_len;
|
|
|
|
c->tl_ptr->tlist_cstat = TL_CSTAT_READY;
|
|
|
|
c->tl_ptr->tlist_fptr = 0;
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Main transmit routine. To avoid having to do mbuf copies, we put pointers
|
|
|
|
* to the mbuf data regions directly in the transmit lists. We also save a
|
|
|
|
* copy of the pointers since the transmit list fragment pointers are
|
|
|
|
* physical addresses.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_start(ifp)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct ifnet *ifp;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
2005-09-15 17:12:29 +00:00
|
|
|
|
|
|
|
sc = ifp->if_softc;
|
|
|
|
TL_LOCK(sc);
|
|
|
|
tl_start_locked(ifp);
|
|
|
|
TL_UNLOCK(sc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
tl_start_locked(ifp)
|
|
|
|
struct ifnet *ifp;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct mbuf *m_head = NULL;
|
|
|
|
u_int32_t cmd;
|
|
|
|
struct tl_chain *prev = NULL, *cur_tx = NULL, *start_tx;
|
|
|
|
|
|
|
|
sc = ifp->if_softc;
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK_ASSERT(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Check for an available queue slot. If there are none,
|
|
|
|
* punt.
|
|
|
|
*/
|
|
|
|
if (sc->tl_cdata.tl_tx_free == NULL) {
|
2005-08-09 10:20:02 +00:00
|
|
|
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
start_tx = sc->tl_cdata.tl_tx_free;
|
|
|
|
|
|
|
|
while(sc->tl_cdata.tl_tx_free != NULL) {
|
|
|
|
IF_DEQUEUE(&ifp->if_snd, m_head);
|
|
|
|
if (m_head == NULL)
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Pick a chain member off the free list. */
|
|
|
|
cur_tx = sc->tl_cdata.tl_tx_free;
|
|
|
|
sc->tl_cdata.tl_tx_free = cur_tx->tl_next;
|
|
|
|
|
|
|
|
cur_tx->tl_next = NULL;
|
|
|
|
|
|
|
|
/* Pack the data into the list. */
|
|
|
|
tl_encap(sc, cur_tx, m_head);
|
|
|
|
|
|
|
|
/* Chain it together */
|
|
|
|
if (prev != NULL) {
|
|
|
|
prev->tl_next = cur_tx;
|
|
|
|
prev->tl_ptr->tlist_fptr = vtophys(cur_tx->tl_ptr);
|
|
|
|
}
|
|
|
|
prev = cur_tx;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If there's a BPF listener, bounce a copy of this frame
|
|
|
|
* to him.
|
|
|
|
*/
|
2002-11-14 23:49:09 +00:00
|
|
|
BPF_MTAP(ifp, cur_tx->tl_mbuf);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
1998-12-05 02:21:44 +00:00
|
|
|
/*
|
|
|
|
* If there are no packets queued, bail.
|
|
|
|
*/
|
2005-09-15 17:12:29 +00:00
|
|
|
if (cur_tx == NULL)
|
1998-12-05 02:21:44 +00:00
|
|
|
return;
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* That's all we can stands, we can't stands no more.
|
|
|
|
* If there are no other transfers pending, then issue the
|
|
|
|
* TX GO command to the adapter to start things moving.
|
|
|
|
* Otherwise, just leave the data in the queue and let
|
|
|
|
* the EOF/EOC interrupt handler send.
|
|
|
|
*/
|
|
|
|
if (sc->tl_cdata.tl_tx_head == NULL) {
|
|
|
|
sc->tl_cdata.tl_tx_head = start_tx;
|
|
|
|
sc->tl_cdata.tl_tx_tail = cur_tx;
|
1998-09-23 05:08:54 +00:00
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (sc->tl_txeoc) {
|
|
|
|
sc->tl_txeoc = 0;
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM, vtophys(start_tx->tl_ptr));
|
|
|
|
cmd = CSR_READ_4(sc, TL_HOSTCMD);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
cmd &= ~TL_CMD_RT;
|
|
|
|
cmd |= TL_CMD_GO|TL_CMD_INTSON;
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_PUT(sc, cmd);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
sc->tl_cdata.tl_tx_tail->tl_next = start_tx;
|
1998-12-29 15:39:35 +00:00
|
|
|
sc->tl_cdata.tl_tx_tail = cur_tx;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set a timeout in case the chip goes out to lunch.
|
|
|
|
*/
|
2009-11-19 22:14:23 +00:00
|
|
|
sc->tl_timer = 5;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_init(xsc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
void *xsc;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc = xsc;
|
2005-09-15 17:12:29 +00:00
|
|
|
|
|
|
|
TL_LOCK(sc);
|
|
|
|
tl_init_locked(sc);
|
|
|
|
TL_UNLOCK(sc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
tl_init_locked(sc)
|
|
|
|
struct tl_softc *sc;
|
|
|
|
{
|
2005-06-10 16:49:24 +00:00
|
|
|
struct ifnet *ifp = sc->tl_ifp;
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
struct mii_data *mii;
|
1998-09-23 05:08:54 +00:00
|
|
|
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK_ASSERT(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Cancel pending I/O.
|
|
|
|
*/
|
|
|
|
tl_stop(sc);
|
|
|
|
|
1999-09-19 22:39:24 +00:00
|
|
|
/* Initialize TX FIFO threshold */
|
|
|
|
tl_dio_clrbit(sc, TL_ACOMMIT, TL_AC_TXTHRESH);
|
|
|
|
tl_dio_setbit(sc, TL_ACOMMIT, TL_AC_TXTHRESH_16LONG);
|
|
|
|
|
|
|
|
/* Set PCI burst size */
|
|
|
|
tl_dio_write8(sc, TL_BSIZEREG, TL_RXBURST_16LONG|TL_TXBURST_16LONG);
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/*
|
|
|
|
* Set 'capture all frames' bit for promiscuous mode.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
if (ifp->if_flags & IFF_PROMISC)
|
|
|
|
tl_dio_setbit(sc, TL_NETCMD, TL_CMD_CAF);
|
|
|
|
else
|
|
|
|
tl_dio_clrbit(sc, TL_NETCMD, TL_CMD_CAF);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set capture broadcast bit to capture broadcast frames.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
if (ifp->if_flags & IFF_BROADCAST)
|
|
|
|
tl_dio_clrbit(sc, TL_NETCMD, TL_CMD_NOBRX);
|
|
|
|
else
|
|
|
|
tl_dio_setbit(sc, TL_NETCMD, TL_CMD_NOBRX);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-08-27 21:18:02 +00:00
|
|
|
tl_dio_write16(sc, TL_MAXRX, MCLBYTES);
|
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/* Init our MAC address */
|
2005-11-11 16:04:59 +00:00
|
|
|
tl_setfilt(sc, IF_LLADDR(sc->tl_ifp), 0);
|
1998-09-23 05:08:54 +00:00
|
|
|
|
|
|
|
/* Init multicast filter, if needed. */
|
|
|
|
tl_setmulti(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Init circular RX list. */
|
1998-09-23 05:08:54 +00:00
|
|
|
if (tl_list_rx_init(sc) == ENOBUFS) {
|
2006-09-15 10:40:54 +00:00
|
|
|
device_printf(sc->tl_dev,
|
2002-10-21 02:54:50 +00:00
|
|
|
"initialization failed: no memory for rx buffers\n");
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_stop(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Init TX pointers. */
|
|
|
|
tl_list_tx_init(sc);
|
|
|
|
|
1998-09-23 05:08:54 +00:00
|
|
|
/* Enable PCI interrupts. */
|
|
|
|
CMD_SET(sc, TL_CMD_INTSON);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Load the address of the rx list */
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_SET(sc, TL_CMD_RT);
|
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM, vtophys(&sc->tl_ldata->tl_rx_list[0]));
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if (!sc->tl_bitrate) {
|
|
|
|
if (sc->tl_miibus != NULL) {
|
|
|
|
mii = device_get_softc(sc->tl_miibus);
|
|
|
|
mii_mediachg(mii);
|
|
|
|
}
|
2003-04-16 06:51:26 +00:00
|
|
|
} else {
|
|
|
|
tl_ifmedia_upd(ifp);
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
}
|
Updates for the ThunderLAN driver:
- probe for PHYs by checking the BMSR (phy status) register instead
of the vendor ID register.
- fix the autonegotiation routine so that it figures out the autonegotiated
modes correctly.
- add tweaks to support the Olicom OC-2326 now that I've actually had
a chance to test one
o Olicom appears to encode the ethernet address in the EEPROM
in 16-bit chunks in network byte order. If we detect an
Olicom card (based on the PCI vendor ID), byte-swap the station
address accordingly.
XXX The Linux driver does not do this. I find this odd since
the README from the Linux driver indicates that patches to
support the Olicom cards came from somebody at Olicom; you'd
think if anyone would get that right, it'd be them. Regardless,
I accepted the word of the disgnoatic program that came bundled
with the card as gospel and fixed the attach routine to make
the station address match what it says.
o The version of the 2326 card that I got for testing is a
strange beast: the card does not look like the picture on
the box in which it was packed. For one thing, the picture
shows what looks like an external NS 83840A PHY, but the
actual card doesn't have one. The card has a TNETE100APCM
chip, which appears to have not only the usual internal
tlan 10Mbps PHY at MII address 32, but also a 10/100 PHY
at MII address 0. Curiously, this PHY's vendor and device ID
registers always return 0x0000. I suspect that this is
a mutant version of the ThunderLAN chip with 100Mbps support.
This combination behaves a little strangely and required the
following changes:
- The internal PHY has to be enabled in tl_softreset().
- The internal PHY doesn't seem to come to life after
detecting the 100Mbps PHY unless it's reset twice.
- If you want to use 100Mbps modes, you have to isolate
the internal PHY.
- If you want to use 10Mbps modes, you have to un-isolate
the internal PHY.
The latter two changes are handled at the end of tl_init(): if
the PHY vendor ID is 0x0000 (which should not be possible if we
have a real external PHY), then tl_init() forces the internal
PHY's BMCR register to the proper values.
1998-08-03 01:33:12 +00:00
|
|
|
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
/* Send the RX go command */
|
1999-08-27 21:18:02 +00:00
|
|
|
CMD_SET(sc, TL_CMD_GO|TL_CMD_NES|TL_CMD_RT);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-08-09 10:20:02 +00:00
|
|
|
ifp->if_drv_flags |= IFF_DRV_RUNNING;
|
|
|
|
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Start the stats update counter */
|
2005-09-15 17:12:29 +00:00
|
|
|
callout_reset(&sc->tl_stat_callout, hz, tl_stats_update, sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set media options.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_ifmedia_upd(ifp)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct ifnet *ifp;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
struct mii_data *mii = NULL;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
sc = ifp->if_softc;
|
|
|
|
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK(sc);
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if (sc->tl_bitrate)
|
|
|
|
tl_setmode(sc, sc->ifmedia.ifm_media);
|
|
|
|
else {
|
|
|
|
mii = device_get_softc(sc->tl_miibus);
|
|
|
|
mii_mediachg(mii);
|
|
|
|
}
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_UNLOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Report current media status.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_ifmedia_sts(ifp, ifmr)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct ifnet *ifp;
|
|
|
|
struct ifmediareq *ifmr;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc;
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
struct mii_data *mii;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
sc = ifp->if_softc;
|
|
|
|
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
ifmr->ifm_active = IFM_ETHER;
|
|
|
|
|
1999-03-30 17:07:20 +00:00
|
|
|
if (sc->tl_bitrate) {
|
|
|
|
if (tl_dio_read8(sc, TL_ACOMMIT) & TL_AC_MTXD1)
|
|
|
|
ifmr->ifm_active = IFM_ETHER|IFM_10_5;
|
|
|
|
else
|
|
|
|
ifmr->ifm_active = IFM_ETHER|IFM_10_T;
|
|
|
|
if (tl_dio_read8(sc, TL_ACOMMIT) & TL_AC_MTXD3)
|
|
|
|
ifmr->ifm_active |= IFM_HDX;
|
|
|
|
else
|
|
|
|
ifmr->ifm_active |= IFM_FDX;
|
|
|
|
return;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
} else {
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
mii = device_get_softc(sc->tl_miibus);
|
|
|
|
mii_pollstat(mii);
|
|
|
|
ifmr->ifm_active = mii->mii_media_active;
|
|
|
|
ifmr->ifm_status = mii->mii_media_status;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_UNLOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static int
|
|
|
|
tl_ioctl(ifp, command, data)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct ifnet *ifp;
|
1998-06-07 17:13:14 +00:00
|
|
|
u_long command;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
caddr_t data;
|
|
|
|
{
|
|
|
|
struct tl_softc *sc = ifp->if_softc;
|
|
|
|
struct ifreq *ifr = (struct ifreq *) data;
|
2005-09-15 17:12:29 +00:00
|
|
|
int error = 0;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
switch(command) {
|
|
|
|
case SIOCSIFFLAGS:
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
if (ifp->if_flags & IFF_UP) {
|
2005-08-09 10:20:02 +00:00
|
|
|
if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
ifp->if_flags & IFF_PROMISC &&
|
|
|
|
!(sc->tl_if_flags & IFF_PROMISC)) {
|
|
|
|
tl_dio_setbit(sc, TL_NETCMD, TL_CMD_CAF);
|
|
|
|
tl_setmulti(sc);
|
2005-08-09 10:20:02 +00:00
|
|
|
} else if (ifp->if_drv_flags & IFF_DRV_RUNNING &&
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
!(ifp->if_flags & IFF_PROMISC) &&
|
|
|
|
sc->tl_if_flags & IFF_PROMISC) {
|
|
|
|
tl_dio_clrbit(sc, TL_NETCMD, TL_CMD_CAF);
|
|
|
|
tl_setmulti(sc);
|
|
|
|
} else
|
2005-09-15 17:12:29 +00:00
|
|
|
tl_init_locked(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
} else {
|
2005-08-09 10:20:02 +00:00
|
|
|
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
tl_stop(sc);
|
|
|
|
}
|
|
|
|
}
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
sc->tl_if_flags = ifp->if_flags;
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_UNLOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
error = 0;
|
|
|
|
break;
|
|
|
|
case SIOCADDMULTI:
|
|
|
|
case SIOCDELMULTI:
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
tl_setmulti(sc);
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_UNLOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
error = 0;
|
|
|
|
break;
|
|
|
|
case SIOCSIFMEDIA:
|
|
|
|
case SIOCGIFMEDIA:
|
Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:
- For devices with just the ThunderLAN, the internal PHY is used to
provide 10baseT, and 10base5/10baseT support. Autonegotiation will
work, but only with 10baseT links. The only thing that really gets
negotiated is whether the link is full or half duplex.
- For devices with the ThunderLAN and an external 10/100 PHY (like the
Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
100Mbps upgrade daughter card), the external PHY is used for 10baseT
and 100baseTX modes. The internal PHY is still used to support
10base5/10base2, though you have to select them manual with ifconfig.
- For devices with the ThunderLAN and the ML6692 PHY, both the internal
and external PHYs are used, though it will appear as though the 6692
PHY will be used to support 10baseT and 100baseTX modes. In reality,
the internal PHY will be used for 10baseT, but this fact will be hidden
from the user. The 10base5/10base2 modes can also be selected manually
as with above.
1999-08-27 18:58:27 +00:00
|
|
|
if (sc->tl_bitrate)
|
|
|
|
error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command);
|
|
|
|
else {
|
|
|
|
struct mii_data *mii;
|
|
|
|
mii = device_get_softc(sc->tl_miibus);
|
|
|
|
error = ifmedia_ioctl(ifp, ifr,
|
|
|
|
&mii->mii_media, command);
|
|
|
|
}
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
|
|
|
default:
|
2002-11-14 23:49:09 +00:00
|
|
|
error = ether_ioctl(ifp, command, data);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return(error);
|
|
|
|
}
|
|
|
|
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
2009-11-19 22:14:23 +00:00
|
|
|
tl_watchdog(sc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
2009-11-19 22:14:23 +00:00
|
|
|
{
|
|
|
|
struct ifnet *ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2009-11-19 22:14:23 +00:00
|
|
|
TL_LOCK_ASSERT(sc);
|
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2002-10-21 02:54:50 +00:00
|
|
|
if_printf(ifp, "device timeout\n");
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2014-09-18 20:03:45 +00:00
|
|
|
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-08-27 21:18:02 +00:00
|
|
|
tl_softreset(sc, 1);
|
2005-09-15 17:12:29 +00:00
|
|
|
tl_init_locked(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Stop the adapter and free any mbufs allocated to the
|
|
|
|
* RX and TX lists.
|
|
|
|
*/
|
2002-08-24 00:02:03 +00:00
|
|
|
static void
|
|
|
|
tl_stop(sc)
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct tl_softc *sc;
|
|
|
|
{
|
2017-05-17 00:34:34 +00:00
|
|
|
int i;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
struct ifnet *ifp;
|
|
|
|
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK_ASSERT(sc);
|
2000-10-13 17:54:19 +00:00
|
|
|
|
2005-06-10 16:49:24 +00:00
|
|
|
ifp = sc->tl_ifp;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Stop the stats updater. */
|
2005-09-15 17:12:29 +00:00
|
|
|
callout_stop(&sc->tl_stat_callout);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Stop the transmitter */
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_CLR(sc, TL_CMD_RT);
|
|
|
|
CMD_SET(sc, TL_CMD_STOP);
|
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM, 0);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/* Stop the receiver */
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_SET(sc, TL_CMD_RT);
|
|
|
|
CMD_SET(sc, TL_CMD_STOP);
|
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM, 0);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Disable host interrupts.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
CMD_SET(sc, TL_CMD_INTSOFF);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Clear list pointer.
|
|
|
|
*/
|
1998-09-23 05:08:54 +00:00
|
|
|
CSR_WRITE_4(sc, TL_CH_PARM, 0);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Free the RX lists.
|
|
|
|
*/
|
|
|
|
for (i = 0; i < TL_RX_LIST_CNT; i++) {
|
|
|
|
if (sc->tl_cdata.tl_rx_chain[i].tl_mbuf != NULL) {
|
|
|
|
m_freem(sc->tl_cdata.tl_rx_chain[i].tl_mbuf);
|
|
|
|
sc->tl_cdata.tl_rx_chain[i].tl_mbuf = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bzero((char *)&sc->tl_ldata->tl_rx_list,
|
|
|
|
sizeof(sc->tl_ldata->tl_rx_list));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Free the TX list buffers.
|
|
|
|
*/
|
|
|
|
for (i = 0; i < TL_TX_LIST_CNT; i++) {
|
|
|
|
if (sc->tl_cdata.tl_tx_chain[i].tl_mbuf != NULL) {
|
|
|
|
m_freem(sc->tl_cdata.tl_tx_chain[i].tl_mbuf);
|
|
|
|
sc->tl_cdata.tl_tx_chain[i].tl_mbuf = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bzero((char *)&sc->tl_ldata->tl_tx_list,
|
|
|
|
sizeof(sc->tl_ldata->tl_tx_list));
|
|
|
|
|
2005-08-09 10:20:02 +00:00
|
|
|
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Stop all chip I/O so that the kernel's probe routines don't
|
|
|
|
* get confused by errant DMAs when rebooting.
|
|
|
|
*/
|
2009-02-10 23:17:20 +00:00
|
|
|
static int
|
2002-08-24 00:02:03 +00:00
|
|
|
tl_shutdown(dev)
|
1999-07-22 17:00:38 +00:00
|
|
|
device_t dev;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
{
|
1998-09-23 05:08:54 +00:00
|
|
|
struct tl_softc *sc;
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
1999-07-22 17:00:38 +00:00
|
|
|
sc = device_get_softc(dev);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_LOCK(sc);
|
1998-09-23 05:08:54 +00:00
|
|
|
tl_stop(sc);
|
2005-09-15 17:12:29 +00:00
|
|
|
TL_UNLOCK(sc);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
|
2009-02-10 23:17:20 +00:00
|
|
|
return (0);
|
Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:
Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.
It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.
The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.
This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
|
|
|
}
|