aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ae
Commit message (Collapse)AuthorAgeFilesLines
* MFC r227452:Pyun YongHyeon2012-01-041-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To send a frame, controller requires a prepended TX header and the length of frame should be treated as multiple of 4. Actual frame length is set in the TX header. The TX header position should be aligned on 4 byte boundary and actual frame start position should be aligned on 4 byte boundary as well. This means we need 4(TX header length) + 3(frame length fixup) additional free space in TX buffer in addition to actual frame length. Make sure TX handler check these additional bytes. ae_tx_avail_size() returns actual free space in TX buffer to ease the calculation of available TX buffer space in caller. While I'm here, replace magic number to appropriate sizeof operator to enhance readability. This change should fix controller lockup issue happened under certain conditions but it still does not fix watchdog timeout. It seems the watchdog timeout is side-effect of TxS and TxD mismatches. The root cause of TxD/TxD mismatch is not known yet but it looks like silicon bug. I guess driver may have to reinitialize controller whenever it sees TxS and TxD mismatches but leave it as it was at this moment. PR: kern/145918 Notes: svn path=/stable/7/; revision=229523
* MFC: r221407 (partial)Marius Strobl2011-09-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Let mii_phy_add_media() also announce the support of IFM_NONE. - Add a PHY-specific reset routine is for lxtphy(4) which disables MII interrupts. - Remove redundant checks in NIC drivers for mii->mii_instance not being zero before calling the reset routines because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE. Obtained from: NetBSD (partially) Notes: svn path=/stable/7/; revision=225490
* MFC r216925,217331,217349,217542:Pyun YongHyeon2011-02-022-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | r216925: Add a 'locked' variant of the foo_start() routine and call it directly from interrupt handlers and watchdog routines instead of queueing a task to call foo_start(). r217331: Make sure to invoke unlocked foo_start since the taskqueue does not hold a driver lock. This should fix a regression introduced in r216925. r217349: Forgot to remove unlock of the driver lock from age_start_locked() when converting it to a locked variant. r217542: Fix some bugs in my last set of changes to ale(4): - Remove extra unlock from end of ale_start_locked(). - Expand scope of locking in interrupt handler. - Move ether_ifdetach() earlier and retire now-unneeded DETACH flag. Tested by: Aryeh Friedman Notes: svn path=/stable/7/; revision=218199
* MFC r207554:Maxim Sobolev2010-11-161-1/+1
| | | | | | | | | | | | Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. Notes: svn path=/stable/7/; revision=215368
* MFC: r213893, r213908, r214566, r214605, r214846Marius Strobl2010-11-072-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214685) to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari Notes: svn path=/stable/7/; revision=214910
* MFC r212968:Pyun YongHyeon2010-10-081-1/+9
| | | | | | | | | Remove unnecessary controller reinitialization. PR: kern/87506 Notes: svn path=/stable/7/; revision=213600
* Merge r202000 from head:Gavin Atkinson2010-03-101-0/+1
| | | | | | | Don't panic on attach if we can't allocate ifp Notes: svn path=/stable/7/; revision=204953
* MFC r200993: Small spelling fix, "Ethetnet" -> "Ethernet"Gavin Atkinson2010-01-021-1/+1
| | | | | | | Approved by: ed (mentor) Notes: svn path=/stable/7/; revision=201394
* MFC 197627.Pyun YongHyeon2009-11-291-1/+1
| | | | | | | | | | Fix multicast handling. All Atheros controllers use big-endian form in computing multicast hash. PR: kern/139137 Notes: svn path=/stable/7/; revision=199927
* MFC r183567:Bruce M Simpson2009-03-181-2/+40
| | | | | | | | | | | | | | Merge Wake-on-Lan (WOL) support for the Attansic/Atheros L2. This was left out of the backport to RELENG_7 as the WOL infrastructure had not yet been backported to RELENG_7 when the ae(4) driver was merged. Tested OK on an ASUS EeePC 701 using ports/net/wol. Submitted by: yongari Notes: svn path=/stable/7/; revision=189969
* - MFC r185707:Stanislav Sedov2009-01-181-5/+2
| | | | | | | | | | - Eliminate unused variable. [1] - Check for runt frames entering the stack. [2] Suggested by: ganbold[1], yongari[2] Notes: svn path=/stable/7/; revision=187383
* - MFC ae(4) Attansic FastEthernet controller driver.Stanislav Sedov2008-10-253-0/+2779
Approved by: re (kensmith), kib (mentor) Notes: svn path=/stable/7/; revision=184267