Commit Graph

21 Commits

Author SHA1 Message Date
dyoung c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
dyoung cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
dyoung 1b6947b941 Do a complete device_t/softc split for the PCI attachment. I have
not finished the device_t/softc split for the SBus attachment
because I don't have an SBus gem(4) to test with.

Convert from legacy shutdownhooks to a PMF shutdown hook.  Add PMF
suspend/resume handlers.

Factor a detachment hook out of gem_attach().  During device
attachment, track which resources are reserved in sc_attach_state,
and release only those resources during detachment.

Tested on gem0 and gem1 at pci1 on a Sun Fire V120.
2009-07-27 18:10:53 +00:00
jdc 16d4e38d4d Add GEM_IS_SUN macro, and chip revision to the softc. 2008-02-01 10:53:25 +00:00
dyoung f049e8f385 Remove unused sc_media #define. 2008-01-19 22:20:42 +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
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
christos 17f31a8395 forgot to commit this. 2005-10-28 14:36:15 +00:00
bouyer 78b08b48da Pad small packets with a static buffer at the end of the S/G list.
Avoids leaking kernel memory when small packets are transmitted.
Tested on a ibook G4.
2005-05-16 15:56:38 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +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
matt a61a41b6b0 Only enable detailed evcnts if GEM_COUNTERS is defined. But always count
interrupts.
2002-05-15 21:05:23 +00:00
matt 486ad92d2a Add evcnt stuff for interrupts.
Fix receiver lockups.  When writing the RX Kick register, we need back up
on descriptor since we advanced one in the for loop.  That will be the
last descriptor we haven't processed which is what we should write.
2002-05-15 02:36:11 +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 5d51f988c6 Yet more cruft removal. 2001-10-18 15:19:21 +00:00
thorpej 62577b1c53 Remove more cruft left over from copying bits of other drivers. 2001-10-18 15:09:15 +00:00
thorpej c616253896 Remove some more stuff left over from copying bits of the HME driver. 2001-10-18 06:28:17 +00:00
eeh ef420318e0 Increase receive ring to 128 entries and handle both endian devices. 2001-10-01 23:39:57 +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