Commit Graph

15 Commits

Author SHA1 Message Date
jdc
9f36442988 Apply lockup fixes from Havard Eidnes/OpenBSD in PR port-sparc64/46260:
- add an additional watchdog for RX overflow
  - re-initialise the chip on device timeout
Also alter the interrupt blanking rate to 8 packets, as per OpenSolaris.
2012-07-02 11:23:40 +00:00
jdc
4bd69c5b5b Minor corrections to the SBus definitions, from the `Sbus GEM Specification':
http://mediacast.sun.com/users/Barton808/media/gem_sbus-1.pdf
2008-09-15 19:43:24 +00:00
jdc
fd15456f57 Correct Sbus register definitions. 2008-05-07 06:36:48 +00:00
jdc
cde723377a Add some Sbus-specific definitions (more registers and more values in the
Sbus Config register).
2008-05-06 21:09:34 +00:00
jdc
196789ac55 Add support for Sun PCI X1141A (SX fibre) cards, based on the GEM
documentation, experimentation and a previous patch from John Heasley.

Add improvements to the driver based on the GEM documentation and
from FreeBSD if_gem.c (rev 1.45).
2008-01-05 20:27:44 +00:00
dyoung
b7dea03346 Make the members of the descriptors volatile, because the NIC and
the host share them.

Before breaking out of the loop over descriptors in gem_rint(),
DMA-resynchronize the first Rx descriptor we found that does not
belong to the host.  We must avoid a cached descriptor "covering"
a descriptor in RAM, because the cached descriptor may say that
the descriptor still belongs to the NIC, when that is not true,
and the driver will hang.

XXX I believe this driver only works by luck on hosts that both
XXX have a cacheline size greater than the size of a descriptor
XXX (16 bytes) and lack DMA/cache coherency.  I need to add some
XXX trickery to make sure that we don't scribble over the NIC's
XXX changes to a descriptor when we flush a cached descriptor to
XXX RAM with bus_dmamap_sync(9).
2007-04-12 06:14:40 +00:00
martin
bed31b2f32 In preparation for gem @ sbus: split the GEM registers into two halfs
and provide a bus_space_handle_t for each. While there, fix a typo
in gem_bitwait().
2006-11-24 13:01:07 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
heas
981782a1d9 Adjust/add a few comments, add a few bitmask_snprintf formats, and add
register definitions for hardware checksums and the PCS (the fiber interface
version of a MII).
2005-02-18 01:39:18 +00:00
heas
4cec10fd22 Adjust/add a few comments and add defines for PCS (aka GEM_MII) FSM and
interrupt registers.
drop some trailing WS.

no functional changes.
2004-10-17 21:49:08 +00:00
wiz
c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
matt
c1fc5d35dc Many fixes. Multicast hash filter works now. Autonegotiation with GigE
on Mac G4's now works.  XXX Checksum offload still needs to be done.
2002-05-11 00:36:02 +00:00
matt
2f836188fb If the detected media is gigabit, change the gem to use GMII mode otherwise
switch back to MII mode.  Keep a sliding window for TX segments and when it
gets > 2/3 full, request a TX interrupt (window gets reset when the h/w TX
queue is empty).  Add dv_xname to a few printfs.  With the above changes,
the gem driver will now work on Macintoshes, even in GigE mode.  On a 733
PowerMac G4 it gets ~355Mb/s TX and ~280Mb/s RX to/from an Alpha XP1000.

XXX mii autoselect is still flakey.
2002-05-08 02:12:55 +00:00
thorpej
bfda843574 Manipulate the Tx desc pointer as 2 32-bit values, just as
we do with the Rx desc pointer, both for consistency, and
for platforms which don't have bus_space_*_8().
2001-10-18 03:33:33 +00:00
eeh
345c4a7b0d Driver for Sun GEM gigabit ethernet, Sun ERI 10/100, and Apple GMAC. 2001-09-16 00:11:41 +00:00