Commit Graph

30 Commits

Author SHA1 Message Date
christos 05f07448b6 Another possibly uninitialized lasttx 2003-10-26 19:11:33 +00:00
christos 93af726cde Don't return random garbage in the default case; return the smallest ring
descriptor instead.
2003-10-26 18:20:43 +00:00
chs f217b85c1f make this build with GEM_DEBUG. fix rxhist counters. 2003-08-24 18:07:03 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
matt 65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
matt 4630a8e7f3 Add a MIIF_FORCEANEG flag to be passed to mii_attach. This forces an
autonegotiation to take place if IFM_AUTO is selected in mii_media_set.
Make the gem driver use it.  (XXX hme probably should use it but I can't
test that).
2003-02-20 00:55:21 +00:00
thorpej 749715f6ee Use aprint_*(). 2003-01-31 00:26:25 +00:00
fair 96b8b890ed Change the "dontcare bits" argument to ifmedia_init() to IFM_IMASK
so that it is possible select PHY instances other than the first
one (instance zero), if there is more than one PHY attached.
2002-10-22 00:01:55 +00:00
matt e25f13dfbe From OpenBSD:
- Fix one typo (instead of two disable_rx, one disable_rx and one disable_tx)
[The other bug fix isn't appropriate since the was OACTIVE is dealt with
has been changed in NetBSD.]
2002-08-28 17:46:58 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
matt 496a3cb868 Let's put a s = splnet(); to match the splx(s); already in the routine.
(yes, we were doing an splx with an uninitialized variable).
2002-05-15 23:51:49 +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 d6f9a400fe Fix initialization of GEM_RX_MAC_INTR. 1 means mask. 2002-05-14 23:33:41 +00:00
matt 3b2e959dfc Supress RX_MAC interrupts regarding the FRAME_COUNT register. 2002-05-11 20:53:52 +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
matt 8a30192c27 Correct a comment and cleanup slightly how the local ethernet is programmed
into the chip.
2002-03-29 00:00:10 +00:00
eeh 160abd5faf Remove some obsolete code. 2002-01-19 03:16:38 +00:00
thorpej 1466b9ca1d Back out the last two changes I made to this driver -- some people
have reported lossage.
2001-11-17 00:56:04 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
thorpej d1e191d848 Reserve one descriptor at the end of the ring as a termination point,
to prevent the producer index from getting confused.
2001-10-21 20:45:15 +00:00
thorpej 8f0b837cd4 gem_init(): Don't call gem_mii_statchg() directly. Instead, call
gem_mediachange().  This will cause gem_mii_statchg() to be called
by the MII layer with the correct MII media state, so that speed
duplex parameters will be set properly.
2001-10-20 18:25:52 +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
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 a0265b2599 Remove some debug messages. 2001-10-01 23:55:00 +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