Commit Graph

8 Commits

Author SHA1 Message Date
Brooks Davis
fc74a9f93a Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
 - Struct arpcom is no longer referenced in normal interface code.
   Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
   To enforce this ac_enaddr has been renamed to _ac_enaddr.
 - The second argument to ether_ifattach is now always the mac address
   from driver private storage rather than sometimes being ac_enaddr.

Reviewed by:	sobomax, sam
2005-06-10 16:49:24 +00:00
Maxim Sobolev
d521dc21e7 Move Rx/Tx lists management routines into central location. 2005-03-25 12:42:30 +00:00
Maxim Sobolev
710fa1d820 GC unused fields. 2005-03-25 10:39:23 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Scott Mitchell
d49a36b1d5 Diff-reduction before merging if_axe to RELENG_4.
Approved by:	imp (mentor)
MFC after:	1 week
2004-12-08 22:02:58 +00:00
Ian Dowse
eadf519a78 Replace the static "qdat" structure with a per-instance softc field
in all USB ethernet drivers. The qdat structure contains a pointer
to the interface's struct ifnet and is used to process incoming
packets, so simultaneous use of two similar devices caused crashes
and confusion.

The if_udav driver appeared in the tree since Daan's PR, so I made
similar changes to that driver too.

PR:		kern/59290
Submitted by:	Daan Vreeken <Danovitsch@Vitsch.net>
2004-05-23 12:35:25 +00:00
Bill Paul
20ea6dd580 In the device attach routine, don't depend on uaa->iface being
populated. Apparently, if you use an ehci controller, it's not.
Use usbd_device2interface_handle() to retrieve the interface handle.
NOTE: uaa->iface is populated in the probe routine, so I suspect the
fact that it's NULL in the attach routine is a bug in the ehci driver.

Also, don't depend on the PHY addresses returned by the AXE_CMD_READ_PHYID
command. The address is correct for my LinkSys NIC, but a user has
reported that with a D-Link NIC, the PHYID command returns address 4
while the attached Broadcom PHY is in fact strapped for address 0.
Instead, latch onto the first PHY address that returns valid data
during a readreg operation.
2003-06-15 21:45:43 +00:00
Bill Paul
87b4a25958 Add device driver support for the ASIX Electronics AX88172 USB 2.0
ethernet controller. The driver has been tested with the LinkSys
USB200M adapter. I know for a fact that there are other devices out
there with this chip but don't have all the USB vendor/device IDs.

Note: I'm not sure if this will force the driver to end up in the
install kernel image or not. Special magic needs to be done to exclude
it to keep the boot floppies from bloating again, someone please
advise.
2003-04-20 19:05:33 +00:00