#
80782fbf |
| 16-Jun-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Mind-o in last commit: s/==/>=/ when checking MTU size. *blush*
|
#
cb2f755c |
| 16-Jun-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Fix the last serious bug I've been chasing:
The DP83820/83821 has an undocumented limitation concerning jumbo frames and TX checksum offload. In order for TX checksum offload to work, the outgoing f
Fix the last serious bug I've been chasing:
The DP83820/83821 has an undocumented limitation concerning jumbo frames and TX checksum offload. In order for TX checksum offload to work, the outgoing frame must fit entirely within the TX FIFO, which is 8192 bytes in size. This isn't a problem, until you try to send a 9000-byte frame, at which point the TX DMA engine goes to sleep. It turns out that if you want to send a jumbo frame larger than 8170 bytes (8192 - 64), you have to turn off the TX checksum support.
As a workaround, I changed nge_ioctl() so that if the user selects an MTU larger than 8152 bytes, we clear the if_hwassist flags. The flags will be set again once the MTU is reduced to a smaller value.
show more ...
|
#
c9215605 |
| 15-Jun-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Turn TCP and UDP hardware RX checksumming back on. jlemon pointed out where I'd gone wrong before: we have to set csum_data to 0xffff, not 0.
|
#
1bacd83a |
| 15-Jun-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip we want the checksums calculated on a per-packet basis using control bits in the extsts field of the DMA descriptor structure. F
Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip we want the checksums calculated on a per-packet basis using control bits in the extsts field of the DMA descriptor structure. For TX, the chip seems to want these bits set in the field of the first descriptor in a fragment chain, not the last.
show more ...
|
#
23d3a203 |
| 07-Jun-2001 |
Bill Paul <wpaul@FreeBSD.org> |
- Remember to set the 'extsts enable' bit in the CFG register to enable the use of the extsts field in DMA descriptors. We need this to tell the chip to calculate TCP/IP checksums in hardware on
- Remember to set the 'extsts enable' bit in the CFG register to enable the use of the extsts field in DMA descriptors. We need this to tell the chip to calculate TCP/IP checksums in hardware on a per-packet basis.
- Fix the unions in DMA descriptor structures. Breakage on alpha led me to realize I'd done it wrong the first time.
show more ...
|
#
765a54f4 |
| 06-Jun-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Disable extra TCP/UCP checksum checking in nge_rxeof() for now.
|
#
2195de46 |
| 30-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Per jlemon: add code to nge_rxeof() to allow verification of TCP and UDP checksums too, not just IP. The chip only tells us if the checksum is ok, it does not give us a copy of the partial checksum f
Per jlemon: add code to nge_rxeof() to allow verification of TCP and UDP checksums too, not just IP. The chip only tells us if the checksum is ok, it does not give us a copy of the partial checksum for later processing. We have to deal with this the right way, but we can deal with it.
show more ...
|
#
01702579 |
| 29-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Fix mind-o in nge_rxeof(): I used CSUM_IP_CHECKED twice instead of CSUM_IP_CHECKED|CSUM_IP_VALID.
|
#
065a7922 |
| 16-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Fix instance of (struct ti_softc *) that should have been (struct nge_softc *), which the compiler never complained about. I guess it doesn't matter, a pointer is a pointer, but looked weird to me.
|
#
5da751e4 |
| 12-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Unbreak release. *sigh*
|
#
e39cd3b2 |
| 11-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
It's vlan.h, not opt_vlan.h.
|
#
ce4946da |
| 11-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Add support for gigabit ethernet cards based on the NatSemi DP83820 and DP83821 gigabit ethernet MAC chips and the NatSemi DP83861 10/100/1000 copper PHY. There are a whole bunch of very low cost car
Add support for gigabit ethernet cards based on the NatSemi DP83820 and DP83821 gigabit ethernet MAC chips and the NatSemi DP83861 10/100/1000 copper PHY. There are a whole bunch of very low cost cards available with this chipset selling for $150USD or less. This includes the SMC9462TX, D-Link DGE-500T, Asante GigaNIX 1000TA and 1000TPC, and a couple cards from Addtron.
This chip supports TCP/IP checksum offload, VLAN tagging/insertion. 2048-bit multicast filter, jumbograms and has 8K TX and 32K RX FIFOs. I have not done serious performance testing with this driver. I know it works, and I want it under CVS control so I can keep tabs on it. Note that there's no serious mutex stuff in here yet either: I need to talk more with jhb to figure out the right way to do this. That said, I don't think there will be any problems.
This driver should also work on the alpha. It's not turned on in GENERIC.
show more ...
|
#
09c817ba |
| 03-Jul-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- MFC
|
#
eb956cd0 |
| 26-Jun-2009 |
Robert Watson <rwatson@FreeBSD.org> |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will a
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list.
Approved by: re (kib) MFC after: 6 weeks
show more ...
|
#
7e857dd1 |
| 12-Jun-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
56e13f2a |
| 30-May-2009 |
Attilio Rao <attilio@FreeBSD.org> |
Unbreak build.
Pointy hat to: attilio
|
#
2e370a5c |
| 26-May-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
Merge from HEAD
|
#
f6bc9430 |
| 21-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
bus_dma(9) conversion and make nge(4) work on all architectures. o Header file cleanup. o bus_dma(9) conversion. - Removed all consumers of vtophys(9) and converted to use bus_dma(9). - 64bit
bus_dma(9) conversion and make nge(4) work on all architectures. o Header file cleanup. o bus_dma(9) conversion. - Removed all consumers of vtophys(9) and converted to use bus_dma(9). - 64bit DMA support was disabled because DP83821 is not capable of handling the DMA request. 64bit DMA request on DP83820 requires different descriptor structures and it's hard to dynamically change descriptor format at run time so I disabled it. Note, this is the same behavior as previous one but previously nge(4) didn't explicitly disable 64bit mode on DP83820. - Added Tx/Rx descriptor ring alignment requirements(8 bytes alignment). - Limit maximum number of Tx DMA segments to 16. In fact, controller does not seem to have limitations on number of Tx DMA segments but 16 should be enough for most cases and m_collapse(9) will handle highly fragmented frames without consuming a lot of CPU cycles. - Added Rx buffer alignment requirements(8 bytes alignment). This means driver should fixup received frames to align on 16bits boundary on strict-alignment architectures. - Nuked driver private data structure in descriptor ring. - Added endianness support code in Tx/Rx descriptor access. o Prefer faster memory mapped register access to I/O mapped access. Added fall-back mechanism to use alternative register access. The hardware supports both memory and I/O mapped access. o Added suspend/resume methods but it wasn't tested as controller I have does not support PCI PME. o Removed swap argument in nge_read_eeprom() since endianness should be handled after reading EEPROM. o Implemented experimental 802.3x full-duplex flow-control. ATM it was commented out but will be activated after we have generic flow-control framework in mii(4) layer. o Rearranged promiscuous mode settings and simplified logic. o Always disable Rx filter prior to changing Rx filter functions as indicated in DP83820/DP83821 datasheet. o Added an explicit DELAY in timeout loop of nge_reset(). o Added a sysctl variable dev.nge.%d.int_holdoff to control interrupt moderation. Valid ranges are 1 to 255(default 1) in units of 100us. The actual delivery of interrupt would be delayed based on the sysctl value. The interface has to be brought down and up again before a change takes effect. With proper tuning value, users do not need to resort to polling(4) anymore. o Added ALTQ(4) support. o Added missing IFCAP_VLAN_HWCSUM as nge(4) can offload Tx/Rx checksum calculation on VLAN tagged frames as well as VLAN tag insertion/stripping. Also add IFCAP_VLAN_MTU capability as nge(4) can handle VLAN tagged oversized frames. o Fixed media header length for VLAN. o Rearranged nge_detach routine such that it's now used for general clean-up routine. o Enabled MWI. o Accessing EEPROM takes very long time so read 6 bytes ethernet address with one call instead of 3 separate accesses. o Don't set if_mtu in device attach, it's already set in ether_ifattach(). o Don't do any special things for TBI interface. Remove TBI specific media handling in the driver and have gentbi(4) handle it. Add glue code to read/write TBI PHY registers in miibus method. This change removes a lot of PHY handling code in driver and now its functionality is handled by mii(4). o Alignment fixup code is now applied only for strict-alignment architectures. Previously the code was applied for all architectures except i386. With this change amd64 will get instant Rx performance boost. o When driver fails to allocate a new mbuf, update if_qdrops so users can see what was wrong in Rx path. o Added a workaround for a hardware bug which resulted in short VLAN tagged frames(e.g. ARP) was rejected as if runt frame was received. With this workaround nge(4) now accepts the short VLAN tagged frame and nge(4) can take full advantage of hardware VLAN tag stripping. I have no idea how this bug wasn't known so far, without the workaround nge(4) may never work on VLAN environments. o Fixed Rx checksum offload logic such that it now honors active interface capability configured with ifconfig(8). o In nge_start()/nge_txencap(), always leave at least one free descriptor as indicated in datasheet. Without this the hardware would be confused with ring descriptor structure(e.g. no clue for the end of descriptor ring). o Removed dead-code that checks interrupts on PHY hardware. The code was designed to detect link state changes but it was disabled as driving nge_tick clock would break auto-negotiation timer. This code is no longer needed as nge(4) now uses mii(4) and link state change handling is done with mii callback. o Rearranged ethernet address programming logic such that it works on strict-alignment architectures. o Added IFCAP_VLAN_HWTAGGING/IFCAP_VLAN_HWCSUM handler in nge_ioctl() such that the functionality is configurable with ifconfig(8). DP83820/DP83821 can do checksum offload for VLAN tagged frames so enable Tx/Rx checksum offload for VLAN interfaces. o Simplified IFCAP_POLLING selection logic in nge_ioctl(). o Fixed module unload panic when bpf listeners are active. o Tx/Rx descriptor ring address uses 64bit DMA address for readability. High address part of DMA would be 0 as nge(4) disabled 64bit DMA transfers so it's ok for DP83821. o Removed volatile keyword in softc as bus_dmamap_sync(9) should take care of this. o Removed extra driver private structures in descriptor ring. These extra elements are not part of descriptor structure. Embedding private driver structure into descriptor ring is not good idea as its size may be different on 32bit/64bit architectures. o Added miibus_linkchg method handler to catch link state changes. o Removed unneeded nge_ifmedia in softc. All TBI access is handled in gentbi(4). There is no difference between TBI and non-TBI case now. o Removed "gigabit link up" message handling in nge_tick. Link state change notification is already performed by mii(4) and checking link state by accessing PHY registers in periodic timer handler of driver is wrong. All link state and speed/duplex monitoring should be handled in PHY driver. o Use our own timer for watchdog instead of if_watchdog/if_timer interface. o Added hardware MAC statistics counter, users canget current MAC statistics from dev.nge.%d.stats sysctl node(%d is unit number of a device). o Removed unused macros, NGE_LASTDESC, NGE_MODE, NGE_OWNDESC, NGE_RXBYTES. o Increased number of Tx/Rx descriptors from 128 to 256. From my experience on gigabit ethernet controllers, number of descriptors should be 256 or higher to get an optimal performance on gigabit link. o Increased jumbo frame length to 9022 bytes to cope with other gigabit ethernet drivers. Experimentation shows no problems with 9022 bytes. o Removed unused member variables in softc. o Switched from bus_space_{read|write}_4 to bus_{read|write}_4. o Added support for WOL.
show more ...
|
#
056e0442 |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Consistently use tab characters instead of spaces.
|
#
6f94c0fd |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
style(9)
|
#
3929ff51 |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
s/u_int8_t/uint8_t/g s/u_int16_t/uint16_t/g s/u_int32_t/uint32_t/g
|
#
25d7155f |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
style(9) - space after keyword.
|
#
2da9a170 |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove return statement at the end of functions that return void.
|
#
a13d3502 |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove trailling whitespaces.
|
#
2cf2d799 |
| 18-May-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove register keyword.
|