Commit Graph

10 Commits

Author SHA1 Message Date
John Baldwin
214b852cd9 Style(9) xe(4). The MD5 sums are different, but comparing the dissassemblies
the only changes are from gcc moving some global variables around slightly.
2008-06-04 20:26:57 +00:00
John Baldwin
d0b2ae8f20 - Split the interrupt handler up into separate subroutines for rx, tx, and
MAC events.
- Use bus_*() rather than bus_space_*() and remove the bus space tag and
  handle from the softc.
- Retire unused macros for examining CIS tuples.
2008-06-04 15:19:58 +00:00
John Baldwin
b307ca883c - Change the watchdog timer logic to match other drivers that use their own
timer by keeping a once-a-second timer running that decrements a counter
  similar to if_timer and reset the chip if it gets down to zero via the
  decrement.
- Use IFQ_SET_MAXLEN().
2008-06-03 20:40:33 +00:00
John Baldwin
9bd9b181ca Add locking and make xe(4) MPSAFE:
- Add a mutex to protect the softc and device hardware.
- Use a callout rather than a callout_handle for the media timer.
- Use a dedicated timer for managing the tx watchdog rather than if_timer.
- Fix some resource leaks if xe_attach() fails.
- Shutdown the device before detaching the driver.
- Setup the interrupt handler after ether_ifattach().

Tested by:	Ian FREISLICH  ianf of clue.co.za
2008-06-02 19:43:24 +00:00
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
Scott Mitchell
9d613ae626 Fix probe routine to use card IDs from pccarddevs for NEWCARD and OLDCARD.
Should now correctly probe and attach all supported cards in either mode.

Reviewed by:	imp (mentor)
2004-04-09 17:27:36 +00:00
Scott Mitchell
846b8315a2 Major update to xe driver:
- Make multicast work
- Fix (some of) the watchdog timeouts after card reset
- Add support for CE2, CEM28 and CEM33 cards
- General code cleanup

Any card that worked previously should still work, as well as a lot that
didn't.

The driver is not yet style(9) compliant; those changes are forthcoming,
once the functional changes are done.

PR:		kern/50644
Reviewed by:	imp
Approved by:	imp
2003-10-14 22:51:35 +00:00
Takeshi Shibagaki
16f27fa757 Update xe driver to probe and attach in a NEWCARD kernel.
And separate probe and attach routine for PC Card from if_xe.c
to if_xe_pccard.c.

Reviewed by: imp
2002-02-20 14:23:58 +00:00
Warner Losh
58af1c5edd First cut at adding CIS reading to xe driver. I don't have a card
that seems to be working (I have a MF card that has a 336 modem and
ethernet that the probe routine finds, but the attach fails on because
pccardd doesn't do what you'd like with MF cards all the time).
2000-04-25 06:09:54 +00:00
Warner Losh
90bba6bf72 Move xe driver from dev/pccard to dev/xe. Convert driver to newbus.
Driver is not functional yet, but does compile.  Tests with xe cards
indicates that it doesn't panic the machine when they are present, but
fail to probe.  Interface help in the pcic/pccard layers are needed to
complete this driver.
2000-01-10 08:05:53 +00:00