CVS log for src/sys/dev/re/if_re.c
Up to [FreeBSD] / src / sys / dev / re
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.160.2.34: download - view: text, markup, annotated - select for diffs
Sun Jan 29 01:22:48 2012 UTC (11 days, 15 hours ago) by marius
Branches: RELENG_8
Diff to: previous 1.160.2.33: preferred, colored; branchpoint 1.160: preferred, colored; next MAIN 1.161: preferred, colored
Changes since revision 1.160.2.33: +1 -5 lines
SVN rev 230714 on 2012-01-29 01:22:48Z by marius MFC: r227843 (partial) - There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
Revision 1.160.2.33: download - view: text, markup, annotated - select for diffs
Sun Jan 29 00:49:14 2012 UTC (11 days, 16 hours ago) by marius
Branches: RELENG_8
Diff to: previous 1.160.2.32: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.32: +6 -6 lines
SVN rev 230704 on 2012-01-29 00:49:14Z by marius MFC: r227043 Sprinkle some const.
Revision 1.198.2.6: download - view: text, markup, annotated - select for diffs
Sun Jan 29 00:49:12 2012 UTC (11 days, 16 hours ago) by marius
Branches: RELENG_9
Diff to: previous 1.198.2.5: preferred, colored; branchpoint 1.198: preferred, colored; next MAIN 1.199: preferred, colored
Changes since revision 1.198.2.5: +6 -6 lines
SVN rev 230703 on 2012-01-29 00:49:12Z by marius MFC: r227043 Sprinkle some const.
Revision 1.216: download - view: text, markup, annotated - select for diffs
Thu Jan 19 20:13:16 2012 UTC (2 weeks, 6 days ago) by yongari
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +1 -1 lines
SVN rev 230336 on 2012-01-19 20:13:16Z by yongari Fix a logic error which resulted in putting PHY into sleep when WOL is active. If WOL is active driver should not put PHY into sleep. This change makes WOL work on RTL8168E.
Revision 1.215: download - view: text, markup, annotated - select for diffs
Tue Jan 17 19:36:53 2012 UTC (3 weeks, 1 day ago) by yongari
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +14 -2 lines
SVN rev 230276 on 2012-01-17 19:36:53Z by yongari Free allocated jumbo buffers when controller is stopped.
Revision 1.214: download - view: text, markup, annotated - select for diffs
Tue Jan 17 19:31:03 2012 UTC (3 weeks, 1 day ago) by yongari
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +1 -1 lines
SVN rev 230275 on 2012-01-17 19:31:03Z by yongari Use a RX DMA tag to free loaded RX DMA maps. Previously it used a TX DMA tag.
Revision 1.95.2.81: download - view: text, markup, annotated - select for diffs
Wed Jan 4 23:32:50 2012 UTC (5 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.80: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.2.80: +134 -17 lines
SVN rev 229536 on 2012-01-04 23:32:50Z by yongari MFC r227850-227851,227854,227914,227916: r227850: Writing access to RL_CFG5 register also requires EEPROM write access. While I'm here, enable WOL through magic packet but disable waking up system via unicast, multicast and broadcast frames. Otherwise, multicast or unicast frame(e.g. ICMP echo request) can wake up system which is not probably wanted behavior on most environments. This was not known as problem because RL_CFG5 register access had not effect until this change. The capability to wake up system with unicast/multicast frames are still set in driver, default off, so users who need that feature can still activate it with ifconfig(8). r227851: Perform media change after setting IFF_DRV_RUNNING flag. Without it, driver would ignore the first link state update if controller already established a link such that it would have to take additional link state handling in re_tick(). r227854: Disable accepting frames in re_stop() to put RX MAC into idle state. Because there is no reliable way to know whether RX MAC is in stopped state, rejecting all frames would be the only way to minimize possible races. Otherwise it's possible to receive frames while stop command execution is in progress and controller can DMA the frame to freed RX buffer during that period. This was observed on recent PCIe controllers(i.e. RTL8111F). While this change may not be required on old controllers it wouldn't make negative effects on old controllers. One side effect of this change is disabling receive so driver reprograms RL_RXCFG to receive WOL frames when it is put into suspend or shutdown. This should address occasional 'memory modified free' errors seen on recent RealTek controllers. r227914: Make sure to stop TX MAC before freeing queued TX frames. For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART register. For RTL8402/8168E-VL/8168F/8411, wait until TX queue is empty. r227916: To save more power, switch to 10/100Mbps link when controller is put into suspend/shutdown. Old PCI controllers performed that operation in firmware but for RTL8111C or newer controllers, it's responsibility of driver. It's not clear whether the firmware of RTL8111B still downgrades its speed to 10/100Mbps so leave it as it was.
Revision 1.160.2.32: download - view: text, markup, annotated - select for diffs
Wed Jan 4 23:31:43 2012 UTC (5 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.31: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.31: +134 -17 lines
SVN rev 229535 on 2012-01-04 23:31:43Z by yongari MFC r227850-227851,227854,227914,227916: r227850: Writing access to RL_CFG5 register also requires EEPROM write access. While I'm here, enable WOL through magic packet but disable waking up system via unicast, multicast and broadcast frames. Otherwise, multicast or unicast frame(e.g. ICMP echo request) can wake up system which is not probably wanted behavior on most environments. This was not known as problem because RL_CFG5 register access had not effect until this change. The capability to wake up system with unicast/multicast frames are still set in driver, default off, so users who need that feature can still activate it with ifconfig(8). r227851: Perform media change after setting IFF_DRV_RUNNING flag. Without it, driver would ignore the first link state update if controller already established a link such that it would have to take additional link state handling in re_tick(). r227854: Disable accepting frames in re_stop() to put RX MAC into idle state. Because there is no reliable way to know whether RX MAC is in stopped state, rejecting all frames would be the only way to minimize possible races. Otherwise it's possible to receive frames while stop command execution is in progress and controller can DMA the frame to freed RX buffer during that period. This was observed on recent PCIe controllers(i.e. RTL8111F). While this change may not be required on old controllers it wouldn't make negative effects on old controllers. One side effect of this change is disabling receive so driver reprograms RL_RXCFG to receive WOL frames when it is put into suspend or shutdown. This should address occasional 'memory modified free' errors seen on recent RealTek controllers. r227914: Make sure to stop TX MAC before freeing queued TX frames. For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART register. For RTL8402/8168E-VL/8168F/8411, wait until TX queue is empty. r227916: To save more power, switch to 10/100Mbps link when controller is put into suspend/shutdown. Old PCI controllers performed that operation in firmware but for RTL8111C or newer controllers, it's responsibility of driver. It's not clear whether the firmware of RTL8111B still downgrades its speed to 10/100Mbps so leave it as it was.
Revision 1.198.2.5: download - view: text, markup, annotated - select for diffs
Wed Jan 4 23:29:57 2012 UTC (5 weeks ago) by yongari
Branches: RELENG_9
Diff to: previous 1.198.2.4: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.4: +134 -17 lines
SVN rev 229534 on 2012-01-04 23:29:57Z by yongari MFC r227850-227851,227854,227914,227916: r227850: Writing access to RL_CFG5 register also requires EEPROM write access. While I'm here, enable WOL through magic packet but disable waking up system via unicast, multicast and broadcast frames. Otherwise, multicast or unicast frame(e.g. ICMP echo request) can wake up system which is not probably wanted behavior on most environments. This was not known as problem because RL_CFG5 register access had not effect until this change. The capability to wake up system with unicast/multicast frames are still set in driver, default off, so users who need that feature can still activate it with ifconfig(8). r227851: Perform media change after setting IFF_DRV_RUNNING flag. Without it, driver would ignore the first link state update if controller already established a link such that it would have to take additional link state handling in re_tick(). r227854: Disable accepting frames in re_stop() to put RX MAC into idle state. Because there is no reliable way to know whether RX MAC is in stopped state, rejecting all frames would be the only way to minimize possible races. Otherwise it's possible to receive frames while stop command execution is in progress and controller can DMA the frame to freed RX buffer during that period. This was observed on recent PCIe controllers(i.e. RTL8111F). While this change may not be required on old controllers it wouldn't make negative effects on old controllers. One side effect of this change is disabling receive so driver reprograms RL_RXCFG to receive WOL frames when it is put into suspend or shutdown. This should address occasional 'memory modified free' errors seen on recent RealTek controllers. r227914: Make sure to stop TX MAC before freeing queued TX frames. For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART register. For RTL8402/8168E-VL/8168F/8411, wait until TX queue is empty. r227916: To save more power, switch to 10/100Mbps link when controller is put into suspend/shutdown. Old PCI controllers performed that operation in firmware but for RTL8111C or newer controllers, it's responsibility of driver. It's not clear whether the firmware of RTL8111B still downgrades its speed to 10/100Mbps so leave it as it was.
Revision 1.95.2.80: download - view: text, markup, annotated - select for diffs
Wed Jan 4 22:57:04 2012 UTC (5 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.79: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.79: +33 -3 lines
SVN rev 229531 on 2012-01-04 22:57:04Z by yongari MFC r227587,227590-227591,227593,227638-227639: r227587: Add preliminary support for RTL8402 PCIe FastEthernet with integrated card reader. r227590: Add preliminary support for RTL8411 PCIe Gigabit ethernet with integrated card reader. r227591: Add missing driver lock in SIOCSIFCAP handler. r227593: Disable PCIe ASPM (Active State Power Management) for all controllers. More and more RealTek controllers started to implement EEE feature. Vendor driver seems to load a kind of firmware for EEE with additional PHY fixups. It is known that the EEE feature may need ASPM support. Unfortunately there is no documentation for EEE of the controller so enabling ASPM may cause more problems. r227638: Add preliminary support for second generation RTL8105E PCIe FastEthernet. r227639: Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.
Revision 1.160.2.31: download - view: text, markup, annotated - select for diffs
Wed Jan 4 22:55:15 2012 UTC (5 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.30: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.30: +33 -3 lines
SVN rev 229530 on 2012-01-04 22:55:15Z by yongari MFC r227587,227590-227591,227593,227638-227639: r227587: Add preliminary support for RTL8402 PCIe FastEthernet with integrated card reader. r227590: Add preliminary support for RTL8411 PCIe Gigabit ethernet with integrated card reader. r227591: Add missing driver lock in SIOCSIFCAP handler. r227593: Disable PCIe ASPM (Active State Power Management) for all controllers. More and more RealTek controllers started to implement EEE feature. Vendor driver seems to load a kind of firmware for EEE with additional PHY fixups. It is known that the EEE feature may need ASPM support. Unfortunately there is no documentation for EEE of the controller so enabling ASPM may cause more problems. r227638: Add preliminary support for second generation RTL8105E PCIe FastEthernet. r227639: Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.
Revision 1.198.2.4: download - view: text, markup, annotated - select for diffs
Wed Jan 4 22:53:18 2012 UTC (5 weeks ago) by yongari
Branches: RELENG_9
Diff to: previous 1.198.2.3: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.3: +33 -3 lines
SVN rev 229529 on 2012-01-04 22:53:18Z by yongari MFC r227587,227590-227591,227593,227638-227639: r227587: Add preliminary support for RTL8402 PCIe FastEthernet with integrated card reader. r227590: Add preliminary support for RTL8411 PCIe Gigabit ethernet with integrated card reader. r227591: Add missing driver lock in SIOCSIFCAP handler. r227593: Disable PCIe ASPM (Active State Power Management) for all controllers. More and more RealTek controllers started to implement EEE feature. Vendor driver seems to load a kind of firmware for EEE with additional PHY fixups. It is known that the EEE feature may need ASPM support. Unfortunately there is no documentation for EEE of the controller so enabling ASPM may cause more problems. r227638: Add preliminary support for second generation RTL8105E PCIe FastEthernet. r227639: Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet.
Revision 1.198.2.3: download - view: text, markup, annotated - select for diffs
Sat Dec 31 14:12:12 2011 UTC (5 weeks, 5 days ago) by hselasky
Branches: RELENG_9
Diff to: previous 1.198.2.2: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.2: +1 -5 lines
SVN rev 229093 on 2011-12-31 14:12:12Z by hselasky MFC r226173, r227843, r227848 and r227908: Use DEVMETHOD_END to mark end of device methods. Remove superfluous device methods. Add some missing __FBSBID() macros.
Revision 1.95.2.79: download - view: text, markup, annotated - select for diffs
Sat Dec 31 01:10:29 2011 UTC (5 weeks, 5 days ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.78: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.78: +1 -1 lines
SVN rev 229059 on 2011-12-31 01:10:29Z by yongari MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com)
Revision 1.160.2.30: download - view: text, markup, annotated - select for diffs
Sat Dec 31 01:08:31 2011 UTC (5 weeks, 5 days ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.29: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.29: +1 -1 lines
SVN rev 229058 on 2011-12-31 01:08:31Z by yongari MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com)
Revision 1.198.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 31 01:07:01 2011 UTC (5 weeks, 5 days ago) by yongari
Branches: RELENG_9
Diff to: previous 1.198.2.1: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.1: +1 -1 lines
SVN rev 229057 on 2011-12-31 01:07:01Z by yongari MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com)
Revision 1.213: download - view: text, markup, annotated - select for diffs
Mon Dec 5 15:33:13 2011 UTC (2 months ago) by luigi
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +43 -0 lines
SVN rev 228281 on 2011-12-05 15:33:13Z by luigi add netmap support for "em", "lem", "igb" and "re". On my hardware, "em" in netmap mode does about 1.388 Mpps on one card (on an Asus motherboard), and 1.1 Mpps on another card (PCIe bus). Both seem to be NIC-limited, because i have the same rate even with the CPU running at 150 MHz. On the "re" driver the tx throughput is around 420-450 Kpps on various (8111C and the like) chipsets. On the Rx side performance seems much better, and i can receive the full load generated by the "em" cards. "igb" is untested as i don't have the hardware.
Revision 1.212: download - view: text, markup, annotated - select for diffs
Wed Nov 23 23:29:18 2011 UTC (2 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +76 -4 lines
SVN rev 227916 on 2011-11-23 23:29:18Z by yongari To save more power, switch to 10/100Mbps link when controller is put into suspend/shutdown. Old PCI controllers performed that operation in firmware but for RTL8111C or newer controllers, it's responsibility of driver. It's not clear whether the firmware of RTL8111B still downgrades its speed to 10/100Mbps so leave it as it was.
Revision 1.211: download - view: text, markup, annotated - select for diffs
Wed Nov 23 22:07:13 2011 UTC (2 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +37 -5 lines
SVN rev 227914 on 2011-11-23 22:07:13Z by yongari Make sure to stop TX MAC before freeing queued TX frames. For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART register. For RTL8402/8168E-VL/8168F/8411, wait until TX queue is empty.
Revision 1.210: download - view: text, markup, annotated - select for diffs
Wed Nov 23 02:08:05 2011 UTC (2 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +15 -3 lines
SVN rev 227854 on 2011-11-23 02:08:05Z by yongari Disable accepting frames in re_stop() to put RX MAC into idle state. Because there is no reliable way to know whether RX MAC is in stopped state, rejecting all frames would be the only way to minimize possible races. Otherwise it's possible to receive frames while stop command execution is in progress and controller can DMA the frame to freed RX buffer during that period. This was observed on recent PCIe controllers(i.e. RTL8111F). While this change may not be required on old controllers it wouldn't make negative effects on old controllers. One side effect of this change is disabling receive so driver reprograms RL_RXCFG to receive WOL frames when it is put into suspend or shutdown. This should address occasional 'memory modified free' errors seen on recent RealTek controllers.
Revision 1.209: download - view: text, markup, annotated - select for diffs
Tue Nov 22 23:27:59 2011 UTC (2 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +2 -2 lines
SVN rev 227851 on 2011-11-22 23:27:59Z by yongari Perform media change after setting IFF_DRV_RUNNING flag. Without it, driver would ignore the first link state update if controller already established a link such that it would have to take additional link state handling in re_tick().
Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Nov 22 23:19:49 2011 UTC (2 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +6 -5 lines
SVN rev 227850 on 2011-11-22 23:19:49Z by yongari Writing access to RL_CFG5 register also requires EEPROM write access. While I'm here, enable WOL through magic packet but disable waking up system via unicast, multicast and broadcast frames. Otherwise, multicast or unicast frame(e.g. ICMP echo request) can wake up system which is not probably wanted behavior on most environments. This was not known as problem because RL_CFG5 register access had not effect until this change. The capability to wake up system with unicast/multicast frames are still set in driver, default off, so users who need that feature can still activate it with ifconfig(8).
Revision 1.207: download - view: text, markup, annotated - select for diffs
Tue Nov 22 21:28:20 2011 UTC (2 months, 2 weeks ago) by marius
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +1 -5 lines
SVN rev 227843 on 2011-11-22 21:28:20Z by marius - There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
Revision 1.206: download - view: text, markup, annotated - select for diffs
Thu Nov 17 22:07:50 2011 UTC (2 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +3 -1 lines
SVN rev 227639 on 2011-11-17 22:07:50Z by yongari Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet. H/W donated by: RealTek Semiconductor Corp.
Revision 1.205: download - view: text, markup, annotated - select for diffs
Thu Nov 17 21:24:56 2011 UTC (2 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +2 -0 lines
SVN rev 227638 on 2011-11-17 21:24:56Z by yongari Add preliminary support for second generation RTL8105E PCIe FastEthernet. H/W donated by: RealTek Semiconductor Corp.
Revision 1.204: download - view: text, markup, annotated - select for diffs
Wed Nov 16 23:29:27 2011 UTC (2 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +21 -1 lines
SVN rev 227593 on 2011-11-16 23:29:27Z by yongari Disable PCIe ASPM (Active State Power Management) for all controllers. More and more RealTek controllers started to implement EEE feature. Vendor driver seems to load a kind of firmware for EEE with additional PHY fixups. It is known that the EEE feature may need ASPM support. Unfortunately there is no documentation for EEE of the controller so enabling ASPM may cause more problems.
Revision 1.203: download - view: text, markup, annotated - select for diffs
Wed Nov 16 22:09:14 2011 UTC (2 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +3 -1 lines
SVN rev 227591 on 2011-11-16 22:09:14Z by yongari Add missing driver lock in SIOCSIFCAP handler.
Revision 1.202: download - view: text, markup, annotated - select for diffs
Wed Nov 16 22:05:38 2011 UTC (2 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +2 -0 lines
SVN rev 227590 on 2011-11-16 22:05:38Z by yongari Add preliminary support for RTL8411 PCIe Gigabit ethernet with integrated card reader. H/W donated by: RealTek Semiconductor Corp.
Revision 1.201: download - view: text, markup, annotated - select for diffs
Wed Nov 16 21:37:45 2011 UTC (2 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +2 -0 lines
SVN rev 227587 on 2011-11-16 21:37:45Z by yongari Add preliminary support for RTL8402 PCIe FastEthernet with integrated card reader. H/W donated by: RealTek Semiconductor Corp.
Revision 1.198.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.198.2.1: preferred, colored; next MAIN 1.198.2.2: preferred, colored
Changes since revision 1.198.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.200: download - view: text, markup, annotated - select for diffs
Wed Nov 2 23:23:19 2011 UTC (3 months, 1 week ago) by marius
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +6 -6 lines
SVN rev 227043 on 2011-11-02 23:23:19Z by marius Sprinkle some const.
Revision 1.199: download - view: text, markup, annotated - select for diffs
Mon Oct 17 19:49:00 2011 UTC (3 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +1 -1 lines
SVN rev 226478 on 2011-10-17 19:49:00Z by yongari Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com)
Revision 1.198.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.95.2.78: download - view: text, markup, annotated - select for diffs
Mon Aug 15 17:10:23 2011 UTC (5 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.77: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.77: +2 -0 lines
SVN rev 224892 on 2011-08-15 17:10:23Z by yongari MFC r224506: Add new device id of D-Link DGE-530T Rev. C controller. DGE-503T Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C controller is re-branded RealTek 8169 controller. PR: kern/159116
Revision 1.160.2.29: download - view: text, markup, annotated - select for diffs
Mon Aug 15 17:08:54 2011 UTC (5 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.28: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.28: +2 -0 lines
SVN rev 224891 on 2011-08-15 17:08:54Z by yongari MFC r224506: Add new device id of D-Link DGE-530T Rev. C controller. DGE-503T Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C controller is re-branded RealTek 8169 controller. PR: kern/159116
Revision 1.198: download - view: text, markup, annotated - select for diffs
Sat Jul 30 01:06:12 2011 UTC (6 months, 1 week ago) by yongari
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +2 -0 lines
SVN rev 224506 on 2011-07-30 01:06:12Z by yongari Add new device id of D-Link DGE-530T Rev. C controller. DGE-503T Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C controller is re-branded RealTek 8169 controller. PR: kern/159116 Approved by: re (kib)
Revision 1.197: download - view: text, markup, annotated - select for diffs
Wed Mar 23 13:10:15 2011 UTC (10 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +4 -4 lines
SVN rev 219902 on 2011-03-23 13:10:15Z by jhb Do a sweep of the tree replacing calls to pci_find_extcap() with calls to pci_find_cap() instead.
Revision 1.95.2.77: download - view: text, markup, annotated - select for diffs
Tue Mar 1 00:08:49 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.76: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.76: +6 -1 lines
SVN rev 219117 on 2011-03-01 00:08:49Z by yongari MFC r218760: Add initial support for RTL8401E PCIe Fast Ethernet. PR: 154789
Revision 1.160.2.28: download - view: text, markup, annotated - select for diffs
Tue Mar 1 00:07:38 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.27: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.27: +6 -1 lines
SVN rev 219116 on 2011-03-01 00:07:38Z by yongari MFC r218760: Add initial support for RTL8401E PCIe Fast Ethernet. PR: 154789
Revision 1.95.2.76: download - view: text, markup, annotated - select for diffs
Tue Mar 1 00:05:46 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.75: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.75: +19 -4 lines
SVN rev 219115 on 2011-03-01 00:05:46Z by yongari MFC r218289: Disable TX IP checksum offloading for RTL8168C controllers. The controller in question generates frames with bad IP checksum value if packets contain IP options. For instance, packets generated by ping(8) with record route option have wrong IP checksum value. The controller correctly computes checksum for normal TCP/UDP packets though. There are two known RTL8168/8111C variants in market and the issue I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure RL_HWREV_8168C also has the same issue but it would be better to assume it has the same issue since they shall share same core. RTL8102E which is supposed to be released at the time of RTL8168/8111C announcement does not have the issue. Tested by: Konstantin V. Krotov ( kkv <> insysnet dot ru )
Revision 1.160.2.27: download - view: text, markup, annotated - select for diffs
Tue Mar 1 00:04:34 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.26: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.26: +19 -4 lines
SVN rev 219114 on 2011-03-01 00:04:34Z by yongari MFC r218289: Disable TX IP checksum offloading for RTL8168C controllers. The controller in question generates frames with bad IP checksum value if packets contain IP options. For instance, packets generated by ping(8) with record route option have wrong IP checksum value. The controller correctly computes checksum for normal TCP/UDP packets though. There are two known RTL8168/8111C variants in market and the issue I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure RL_HWREV_8168C also has the same issue but it would be better to assume it has the same issue since they shall share same core. RTL8102E which is supposed to be released at the time of RTL8168/8111C announcement does not have the issue. Tested by: Konstantin V. Krotov ( kkv <> insysnet dot ru )
Revision 1.95.2.75: download - view: text, markup, annotated - select for diffs
Tue Mar 1 00:02:46 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.74: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.74: +7 -1 lines
SVN rev 219113 on 2011-03-01 00:02:46Z by yongari MFC r217911: Add support for RTL8105E PCIe Fast Ethernet controller. It seems the controller has a kind of embedded controller/memory and vendor applies a large set of magic code via undocumented PHY registers in device initialization stage. I guess it's a firmware image for the embedded controller in RTL8105E since the code is too big compared to other DSP fixups. However I have no idea what that magic code does and what's purpose of the embedded controller. Fortunately driver seems to still work without loading the firmware. While I'm here change device description of RTL810xE controller. H/W donated by: Realtek Semiconductor Corp.
Revision 1.160.2.26: download - view: text, markup, annotated - select for diffs
Tue Mar 1 00:01:34 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.25: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.25: +7 -1 lines
SVN rev 219112 on 2011-03-01 00:01:34Z by yongari MFC r217911: Add support for RTL8105E PCIe Fast Ethernet controller. It seems the controller has a kind of embedded controller/memory and vendor applies a large set of magic code via undocumented PHY registers in device initialization stage. I guess it's a firmware image for the embedded controller in RTL8105E since the code is too big compared to other DSP fixups. However I have no idea what that magic code does and what's purpose of the embedded controller. Fortunately driver seems to still work without loading the firmware. While I'm here change device description of RTL810xE controller. H/W donated by: Realtek Semiconductor Corp.
Revision 1.95.2.74: download - view: text, markup, annotated - select for diffs
Mon Feb 28 23:46:59 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.73: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.73: +175 -32 lines
SVN rev 219111 on 2011-02-28 23:46:59Z by yongari MFC r217902: Do not use interrupt taskqueue on controllers with MSI/MSI-X capability. One of reason using interrupt taskqueue in re(4) was to reduce number of TX/RX interrupts under load because re(4) controllers have no good TX/RX interrupt moderation mechanism. Basic TX interrupt moderation is done by hardware for most controllers but RX interrupt moderation through undocumented register showed poor RX performance so it was disabled in r215025. Using taskqueue to handle RX interrupt greatly reduced number of interrupts but re(4) consumed all available CPU cycles to run the taskqueue under high TX/RX network load. This can happen even with RTL810x fast ethernet controller and I believe this is not acceptable for most systems. To mitigate the issue, use one-shot timer register to moderate RX interrupts. The timer register provides programmable one-shot timer and can be used to suppress interrupt generation. The timer runs at 125MHZ on PCIe controllers so the minimum time allowed for the timer is 8ns. Data sheet says the register is 32 bits but experimentation shows only lower 13 bits are valid so maximum time that can be programmed is 65.528us. This yields theoretical maximum number of RX interrupts that could be generated per second is about 15260. Combined with TX completion interrupts re(4) shall generate less than 20k interrupts. This number is still slightly high compared to other intelligent ethernet controllers but system is very responsive even under high network load. Introduce sysctl variable dev.re.%d.int_rx_mod that controls amount of time to delay RX interrupt processing in units of us. Value 0 completely disables RX interrupt moderation. To provide old behavior for controllers that have MSI/MSI-X capability, introduce a new tunable hw.re.intr_filter. If the tunable is set to non-zero value, driver will use interrupt taskqueue. The default value of the tunable is 0. This tunable has no effect on controllers that has no MSI/MSI-X capability or if MSI/MSI-X is explicitly disabled by administrator. While I'm here cleanup interrupt setup/teardown since re(4) uses single MSI/MSI-X message at this moment.
Revision 1.160.2.25: download - view: text, markup, annotated - select for diffs
Mon Feb 28 23:41:27 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.24: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.24: +175 -32 lines
SVN rev 219110 on 2011-02-28 23:41:27Z by yongari MFC r217902: Do not use interrupt taskqueue on controllers with MSI/MSI-X capability. One of reason using interrupt taskqueue in re(4) was to reduce number of TX/RX interrupts under load because re(4) controllers have no good TX/RX interrupt moderation mechanism. Basic TX interrupt moderation is done by hardware for most controllers but RX interrupt moderation through undocumented register showed poor RX performance so it was disabled in r215025. Using taskqueue to handle RX interrupt greatly reduced number of interrupts but re(4) consumed all available CPU cycles to run the taskqueue under high TX/RX network load. This can happen even with RTL810x fast ethernet controller and I believe this is not acceptable for most systems. To mitigate the issue, use one-shot timer register to moderate RX interrupts. The timer register provides programmable one-shot timer and can be used to suppress interrupt generation. The timer runs at 125MHZ on PCIe controllers so the minimum time allowed for the timer is 8ns. Data sheet says the register is 32 bits but experimentation shows only lower 13 bits are valid so maximum time that can be programmed is 65.528us. This yields theoretical maximum number of RX interrupts that could be generated per second is about 15260. Combined with TX completion interrupts re(4) shall generate less than 20k interrupts. This number is still slightly high compared to other intelligent ethernet controllers but system is very responsive even under high network load. Introduce sysctl variable dev.re.%d.int_rx_mod that controls amount of time to delay RX interrupt processing in units of us. Value 0 completely disables RX interrupt moderation. To provide old behavior for controllers that have MSI/MSI-X capability, introduce a new tunable hw.re.intr_filter. If the tunable is set to non-zero value, driver will use interrupt taskqueue. The default value of the tunable is 0. This tunable has no effect on controllers that has no MSI/MSI-X capability or if MSI/MSI-X is explicitly disabled by administrator. While I'm here cleanup interrupt setup/teardown since re(4) uses single MSI/MSI-X message at this moment.
Revision 1.95.2.73: download - view: text, markup, annotated - select for diffs
Mon Feb 28 23:37:38 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.72: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.72: +13 -20 lines
SVN rev 219109 on 2011-02-28 23:37:38Z by yongari MFC r217868: Remove TX taskqueue and directly invoke re_start in interrupt task.
Revision 1.160.2.24: download - view: text, markup, annotated - select for diffs
Mon Feb 28 23:36:03 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.23: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.23: +13 -20 lines
SVN rev 219108 on 2011-02-28 23:36:03Z by yongari MFC r217868: Remove TX taskqueue and directly invoke re_start in interrupt task.
Revision 1.95.2.72: download - view: text, markup, annotated - select for diffs
Mon Feb 28 21:25:35 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.71: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.71: +52 -11 lines
SVN rev 219105 on 2011-02-28 21:25:35Z by yongari MFC r217857: Prefer MSI-X to MSI on controllers that support MSI-X. All recent PCIe controllers(RTL8102E or later and RTL8168/8111C or later) supports either 2 or 4 MSI-X messages. Unfortunately vendor did not publicly release RSS related information yet. However switching to MSI-X is one-step forward to support RSS.
Revision 1.160.2.23: download - view: text, markup, annotated - select for diffs
Mon Feb 28 21:21:24 2011 UTC (11 months, 1 week ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.22: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.22: +52 -11 lines
SVN rev 219104 on 2011-02-28 21:21:24Z by yongari MFC r217857: Prefer MSI-X to MSI on controllers that support MSI-X. All recent PCIe controllers(RTL8102E or later and RTL8168/8111C or later) supports either 2 or 4 MSI-X messages. Unfortunately vendor did not publicly release RSS related information yet. However switching to MSI-X is one-step forward to support RSS.
Revision 1.95.2.71: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:20:56 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.70: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.70: +8 -20 lines
SVN rev 218906 on 2011-02-21 01:20:56Z by yongari MFC r217524,217766: r217524: Change model names of controller RTL_HWREV_8168_SPIN[123] to real ones. s/RL_HWREV_8168_SPIN1/RL_HWREV_8168B_SPIN1/g s/RL_HWREV_8168_SPIN2/RL_HWREV_8168B_SPIN2/g s/RL_HWREV_8168_SPIN3/RL_HWREV_8168B_SPIN3/g No functional changes. r217766: Apply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet controllers. Experimentation with RTL8102E, RTL8103E and RTL8105E showed dramatic decrement of TX completion interrupts under high TX load(e.g. from 147k interrupts/second to 10k interrupts/second) With this change, TX interrupt moderation is applied to all controllers except RTL8139C+.
Revision 1.160.2.22: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:19:09 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.21: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.21: +8 -20 lines
SVN rev 218905 on 2011-02-21 01:19:09Z by yongari MFC r217524,217766: Change model names of controller RTL_HWREV_8168_SPIN[123] to real ones. s/RL_HWREV_8168_SPIN1/RL_HWREV_8168B_SPIN1/g s/RL_HWREV_8168_SPIN2/RL_HWREV_8168B_SPIN2/g s/RL_HWREV_8168_SPIN3/RL_HWREV_8168B_SPIN3/g No functional changes. r217766: Apply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet controllers. Experimentation with RTL8102E, RTL8103E and RTL8105E showed dramatic decrement of TX completion interrupts under high TX load(e.g. from 147k interrupts/second to 10k interrupts/second) With this change, TX interrupt moderation is applied to all controllers except RTL8139C+.
Revision 1.95.2.70: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:15:11 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.69: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.69: +347 -111 lines
SVN rev 218904 on 2011-02-21 01:15:11Z by yongari
MFC r217499:
Implement initial jumbo frame support for RTL8168/8111 C/D/E PCIe
GbE controllers. It seems these controllers no longer support
multi-fragmented RX buffers such that driver have to allocate
physically contiguous buffers.
o Retire RL_FLAG_NOJUMBO flag and introduce RL_FLAG_JUMBOV2 to
mark controllers that use new jumbo frame scheme.
o Configure PCIe max read request size to 4096 for standard frames
and reduce it to 512 for jumbo frames.
o TSO/checksum offloading is not supported for jumbo frames on
these controllers. Reflect it to ioctl handler and driver
initialization.
o Remove unused rl_stats_no_timeout in softc.
o Embed a pointer to structure rl_hwrev into softc to keep track
of controller MTU limitation and remove rl_hwrev in softc since
that information is available through a pointer to structure
rl_hwrev.
Special thanks to Realtek for donating sample hardwares which made
this possible.
H/W donated by: Realtek Semiconductor Corp.
Revision 1.160.2.21: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:08:13 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.20: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.20: +347 -111 lines
SVN rev 218903 on 2011-02-21 01:08:13Z by yongari
MFC r217499:
Implement initial jumbo frame support for RTL8168/8111 C/D/E PCIe
GbE controllers. It seems these controllers no longer support
multi-fragmented RX buffers such that driver have to allocate
physically contiguous buffers.
o Retire RL_FLAG_NOJUMBO flag and introduce RL_FLAG_JUMBOV2 to
mark controllers that use new jumbo frame scheme.
o Configure PCIe max read request size to 4096 for standard frames
and reduce it to 512 for jumbo frames.
o TSO/checksum offloading is not supported for jumbo frames on
these controllers. Reflect it to ioctl handler and driver
initialization.
o Remove unused rl_stats_no_timeout in softc.
o Embed a pointer to structure rl_hwrev into softc to keep track
of controller MTU limitation and remove rl_hwrev in softc since
that information is available through a pointer to structure
rl_hwrev.
Special thanks to Realtek for donating sample hardwares which made
this possible.
H/W donated by: Realtek Semiconductor Corp.
Revision 1.95.2.69: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:05:23 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.68: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.68: +6 -0 lines
SVN rev 218902 on 2011-02-21 01:05:23Z by yongari MFC r217498: Add initial support for RTL8168E/8111E-VL PCIe GbE.
Revision 1.160.2.20: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:04:16 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.19: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.19: +6 -0 lines
SVN rev 218901 on 2011-02-21 01:04:16Z by yongari MFC r217498: Add initial support for RTL8168E/8111E-VL PCIe GbE.
Revision 1.95.2.68: download - view: text, markup, annotated - select for diffs
Mon Feb 21 01:01:26 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.67: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.67: +39 -20 lines
SVN rev 218900 on 2011-02-21 01:01:26Z by yongari MFC r217247,217381-217382,217384-217385: r217247: When driver is not running, do not send DUMP command to controller and just show old (cached) values. Controller will not respond to the command unless MAC is enabled so DUMP request for down interface caused request timeout. r217381: Allow TX/RX checksum offloading to be configured independently. r217382: re_reset() should be called only after setting device specific features. r217384: Make sure to check validity of dma maps before destroying. r217385: If driver is not able to allocate RX buffer, do not start driver. While I'm here move RX buffer allocation and descriptor initialization up to not touch hardware registers in case of RX buffer allocation failure.
Revision 1.160.2.19: download - view: text, markup, annotated - select for diffs
Mon Feb 21 00:58:50 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.18: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.18: +39 -20 lines
SVN rev 218899 on 2011-02-21 00:58:50Z by yongari MFC r217247,217381-217382,217384-217385: r217247: When driver is not running, do not send DUMP command to controller and just show old (cached) values. Controller will not respond to the command unless MAC is enabled so DUMP request for down interface caused request timeout. r217381: Allow TX/RX checksum offloading to be configured independently. r217382: re_reset() should be called only after setting device specific features. r217384: Make sure to check validity of dma maps before destroying. r217385: If driver is not able to allocate RX buffer, do not start driver. While I'm here move RX buffer allocation and descriptor initialization up to not touch hardware registers in case of RX buffer allocation failure.
Revision 1.95.2.67: download - view: text, markup, annotated - select for diffs
Mon Feb 21 00:50:48 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.66: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.66: +16 -20 lines
SVN rev 218898 on 2011-02-21 00:50:48Z by yongari MFC r217246,217832: r217246: Implement TSO on RealTek RTL8168/8111 C or later controllers. RealTek changed TX descriptor format for later controllers so these controllers require MSS configuration in different location of TX descriptor. TSO is enabled by default for controllers that use new descriptor format. For old controllers, TSO is still disabled by default due to broken frames under certain conditions but users can enable it. Special thanks to Hayes Wang at RealTek. r217832: Disable TSO for all Realtek controllers. Experimentation showed RTL8111C generated corrupted frames where TCP option header was broken. All other sample controllers I have did not show such problem so it could be RTL8111C specific issue. Because there are too many variants it's hard to tell how many controllers have such issue. Just disable TSO by default but have user override it.
Revision 1.160.2.18: download - view: text, markup, annotated - select for diffs
Mon Feb 21 00:47:39 2011 UTC (11 months, 2 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.17: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.17: +16 -20 lines
SVN rev 218897 on 2011-02-21 00:47:39Z by yongari MFC r217246,217832: r217246: Implement TSO on RealTek RTL8168/8111 C or later controllers. RealTek changed TX descriptor format for later controllers so these controllers require MSS configuration in different location of TX descriptor. TSO is enabled by default for controllers that use new descriptor format. For old controllers, TSO is still disabled by default due to broken frames under certain conditions but users can enable it. Special thanks to Hayes Wang at RealTek. r217832: Disable TSO for all Realtek controllers. Experimentation showed RTL8111C generated corrupted frames where TCP option header was broken. All other sample controllers I have did not show such problem so it could be RTL8111C specific issue. Because there are too many variants it's hard to tell how many controllers have such issue. Just disable TSO by default but have user override it.
Revision 1.196: download - view: text, markup, annotated - select for diffs
Wed Feb 16 21:59:42 2011 UTC (11 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +6 -1 lines
SVN rev 218760 on 2011-02-16 21:59:42Z by yongari Add initial support for RTL8401E PCIe Fast Ethernet. PR: 154789
Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Feb 4 17:49:55 2011 UTC (12 months ago) by yongari
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +19 -4 lines
SVN rev 218289 on 2011-02-04 17:49:55Z by yongari Disable TX IP checksum offloading for RTL8168C controllers. The controller in question generates frames with bad IP checksum value if packets contain IP options. For instance, packets generated by ping(8) with record route option have wrong IP checksum value. The controller correctly computes checksum for normal TCP/UDP packets though. There are two known RTL8168/8111C variants in market and the issue I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure RL_HWREV_8168C also has the same issue but it would be better to assume it has the same issue since they shall share same core. RTL8102E which is supposed to be released at the time of RTL8168/8111C announcement does not have the issue. Tested by: Konstantin V. Krotov ( kkv <> insysnet dot ru )
Revision 1.194: download - view: text, markup, annotated - select for diffs
Wed Jan 26 21:14:20 2011 UTC (12 months, 1 week ago) by yongari
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +7 -1 lines
SVN rev 217911 on 2011-01-26 21:14:20Z by yongari Add support for RTL8105E PCIe Fast Ethernet controller. It seems the controller has a kind of embedded controller/memory and vendor applies a large set of magic code via undocumented PHY registers in device initialization stage. I guess it's a firmware image for the embedded controller in RTL8105E since the code is too big compared to other DSP fixups. However I have no idea what that magic code does and what's purpose of the embedded controller. Fortunately driver seems to still work without loading the firmware. While I'm here change device description of RTL810xE controller. H/W donated by: Realtek Semiconductor Corp.
Revision 1.193: download - view: text, markup, annotated - select for diffs
Wed Jan 26 20:25:40 2011 UTC (12 months, 1 week ago) by yongari
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +175 -32 lines
SVN rev 217902 on 2011-01-26 20:25:40Z by yongari Do not use interrupt taskqueue on controllers with MSI/MSI-X capability. One of reason using interrupt taskqueue in re(4) was to reduce number of TX/RX interrupts under load because re(4) controllers have no good TX/RX interrupt moderation mechanism. Basic TX interrupt moderation is done by hardware for most controllers but RX interrupt moderation through undocumented register showed poor RX performance so it was disabled in r215025. Using taskqueue to handle RX interrupt greatly reduced number of interrupts but re(4) consumed all available CPU cycles to run the taskqueue under high TX/RX network load. This can happen even with RTL810x fast ethernet controller and I believe this is not acceptable for most systems. To mitigate the issue, use one-shot timer register to moderate RX interrupts. The timer register provides programmable one-shot timer and can be used to suppress interrupt generation. The timer runs at 125MHZ on PCIe controllers so the minimum time allowed for the timer is 8ns. Data sheet says the register is 32 bits but experimentation shows only lower 13 bits are valid so maximum time that can be programmed is 65.528us. This yields theoretical maximum number of RX interrupts that could be generated per second is about 15260. Combined with TX completion interrupts re(4) shall generate less than 20k interrupts. This number is still slightly high compared to other intelligent ethernet controllers but system is very responsive even under high network load. Introduce sysctl variable dev.re.%d.int_rx_mod that controls amount of time to delay RX interrupt processing in units of us. Value 0 completely disables RX interrupt moderation. To provide old behavior for controllers that have MSI/MSI-X capability, introduce a new tunable hw.re.intr_filter. If the tunable is set to non-zero value, driver will use interrupt taskqueue. The default value of the tunable is 0. This tunable has no effect on controllers that has no MSI/MSI-X capability or if MSI/MSI-X is explicitly disabled by administrator. While I'm here cleanup interrupt setup/teardown since re(4) uses single MSI/MSI-X message at this moment.
Revision 1.192: download - view: text, markup, annotated - select for diffs
Tue Jan 25 23:27:28 2011 UTC (12 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +13 -20 lines
SVN rev 217868 on 2011-01-25 23:27:28Z by yongari Remove TX taskqueue and directly invoke re_start in interrupt task.
Revision 1.191: download - view: text, markup, annotated - select for diffs
Tue Jan 25 22:18:00 2011 UTC (12 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +52 -11 lines
SVN rev 217857 on 2011-01-25 22:18:00Z by yongari Prefer MSI-X to MSI on controllers that support MSI-X. All recent PCIe controllers(RTL8102E or later and RTL8168/8111C or later) supports either 2 or 4 MSI-X messages. Unfortunately vendor did not publicly release RSS related information yet. However switching to MSI-X is one-step forward to support RSS.
Revision 1.190: download - view: text, markup, annotated - select for diffs
Tue Jan 25 19:05:46 2011 UTC (12 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +5 -7 lines
SVN rev 217832 on 2011-01-25 19:05:46Z by yongari Disable TSO for all Realtek controllers. Experimentation showed RTL8111C generated corrupted frames where TCP option header was broken. All other sample controllers I have did not show such problem so it could be RTL8111C specific issue. Because there are too many variants it's hard to tell how many controllers have such issue. Just disable TSO by default but have user override it.
Revision 1.189: download - view: text, markup, annotated - select for diffs
Mon Jan 24 00:01:06 2011 UTC (12 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +2 -14 lines
SVN rev 217766 on 2011-01-24 00:01:06Z by yongari Apply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet controllers. Experimentation with RTL8102E, RTL8103E and RTL8105E showed dramatic decrement of TX completion interrupts under high TX load(e.g. from 147k interrupts/second to 10k interrupts/second) With this change, TX interrupt moderation is applied to all controllers except RTL8139C+.
Revision 1.95.2.65.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 20 17:42:42 2011 UTC (12 months, 2 weeks ago) by yongari
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.95.2.65.2.1: preferred, colored; branchpoint 1.95.2.65: preferred, colored; next MAIN 1.95.2.66: preferred, colored
Changes since revision 1.95.2.65.2.1: +7 -2 lines
SVN rev 217648 on 2011-01-20 17:42:42Z by yongari MFC r217296: For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E), limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of blindly configuring it to 16KB. Due to lack of documentation, re(4) didn't allow jumbo frame on these controllers. However it seems controller is confused with jumbo frame such that it can DMA the received frame to wrong address instead of splitting it into multiple RX buffers. Of course, this caused panic. Since re(4) does not support jumbo frames on these controllers, make controller drop frame that is longer than RE_RX_DESC_BUFLEN sized frame. Fortunately RTL810x controllers, which do not support jumbo frame, have no such issues but this change also limited maximum RX buffer size allowed to RTL810x controllers. Allowing 16KB RX buffer for controllers that have no such capability is meaningless. Approved by: re (bz)
Revision 1.160.2.16.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 20 17:41:24 2011 UTC (12 months, 2 weeks ago) by yongari
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.160.2.16.2.1: preferred, colored; branchpoint 1.160.2.16: preferred, colored; next MAIN 1.160.2.17: preferred, colored
Changes since revision 1.160.2.16.2.1: +7 -2 lines
SVN rev 217647 on 2011-01-20 17:41:24Z by yongari MFC r217296: For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E), limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of blindly configuring it to 16KB. Due to lack of documentation, re(4) didn't allow jumbo frame on these controllers. However it seems controller is confused with jumbo frame such that it can DMA the received frame to wrong address instead of splitting it into multiple RX buffers. Of course, this caused panic. Since re(4) does not support jumbo frames on these controllers, make controller drop frame that is longer than RE_RX_DESC_BUFLEN sized frame. Fortunately RTL810x controllers, which do not support jumbo frame, have no such issues but this change also limited maximum RX buffer size allowed to RTL810x controllers. Allowing 16KB RX buffer for controllers that have no such capability is meaningless. Approved by: re (bz)
Revision 1.188: download - view: text, markup, annotated - select for diffs
Tue Jan 18 00:46:10 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +6 -6 lines
SVN rev 217524 on 2011-01-18 00:46:10Z by yongari Change model names of controller RTL_HWREV_8168_SPIN[123] to real ones. s/RL_HWREV_8168_SPIN1/RL_HWREV_8168B_SPIN1/g s/RL_HWREV_8168_SPIN2/RL_HWREV_8168B_SPIN2/g s/RL_HWREV_8168_SPIN3/RL_HWREV_8168B_SPIN3/g No functional changes.
Revision 1.187: download - view: text, markup, annotated - select for diffs
Mon Jan 17 03:24:33 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +347 -111 lines
SVN rev 217499 on 2011-01-17 03:24:33Z by yongari Implement initial jumbo frame support for RTL8168/8111 C/D/E PCIe GbE controllers. It seems these controllers no longer support multi-fragmented RX buffers such that driver have to allocate physically contiguous buffers. o Retire RL_FLAG_NOJUMBO flag and introduce RL_FLAG_JUMBOV2 to mark controllers that use new jumbo frame scheme. o Configure PCIe max read request size to 4096 for standard frames and reduce it to 512 for jumbo frames. o TSO/checksum offloading is not supported for jumbo frames on these controllers. Reflect it to ioctl handler and driver initialization. o Remove unused rl_stats_no_timeout in softc. o Embed a pointer to structure rl_hwrev into softc to keep track of controller MTU limitation and remove rl_hwrev in softc since that information is available through a pointer to structure rl_hwrev. Special thanks to Realtek for donating sample hardwares which made this possible. H/W donated by: Realtek Semiconductor Corp.
Revision 1.186: download - view: text, markup, annotated - select for diffs
Mon Jan 17 02:23:50 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +6 -0 lines
SVN rev 217498 on 2011-01-17 02:23:50Z by yongari Add initial support for RTL8168E/8111E-VL PCIe GbE. H/W donated by: Realtek Semiconductor Corp.
Revision 1.95.2.66: download - view: text, markup, annotated - select for diffs
Sat Jan 15 00:34:50 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.65: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.65: +7 -2 lines
SVN rev 217436 on 2011-01-15 00:34:50Z by yongari MFC r217296: For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E), limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of blindly configuring it to 16KB. Due to lack of documentation, re(4) didn't allow jumbo frame on these controllers. However it seems controller is confused with jumbo frame such that it can DMA the received frame to wrong address instead of splitting it into multiple RX buffers. Of course, this caused panic. Since re(4) does not support jumbo frames on these controllers, make controller drop frame that is longer than RE_RX_DESC_BUFLEN sized frame. Fortunately RTL810x controllers, which do not support jumbo frame, have no such issues but this change also limited maximum RX buffer size allowed to RTL810x controllers. Allowing 16KB RX buffer for controllers that have no such capability is meaningless.
Revision 1.160.2.17: download - view: text, markup, annotated - select for diffs
Sat Jan 15 00:32:15 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.16: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.16: +7 -2 lines
SVN rev 217435 on 2011-01-15 00:32:15Z by yongari MFC r217296: For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E), limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of blindly configuring it to 16KB. Due to lack of documentation, re(4) didn't allow jumbo frame on these controllers. However it seems controller is confused with jumbo frame such that it can DMA the received frame to wrong address instead of splitting it into multiple RX buffers. Of course, this caused panic. Since re(4) does not support jumbo frames on these controllers, make controller drop frame that is longer than RE_RX_DESC_BUFLEN sized frame. Fortunately RTL810x controllers, which do not support jumbo frame, have no such issues but this change also limited maximum RX buffer size allowed to RTL810x controllers. Allowing 16KB RX buffer for controllers that have no such capability is meaningless.
Revision 1.185: download - view: text, markup, annotated - select for diffs
Thu Jan 13 23:15:09 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +10 -6 lines
SVN rev 217385 on 2011-01-13 23:15:09Z by yongari If driver is not able to allocate RX buffer, do not start driver. While I'm here move RX buffer allocation and descriptor initialization up to not touch hardware registers in case of RX buffer allocation failure.
Revision 1.184: download - view: text, markup, annotated - select for diffs
Thu Jan 13 23:00:28 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +10 -6 lines
SVN rev 217384 on 2011-01-13 23:00:28Z by yongari Make sure to check validity of dma maps before destroying.
Revision 1.183: download - view: text, markup, annotated - select for diffs
Thu Jan 13 22:52:57 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +5 -5 lines
SVN rev 217382 on 2011-01-13 22:52:57Z by yongari re_reset() should be called only after setting device specific features.
Revision 1.182: download - view: text, markup, annotated - select for diffs
Thu Jan 13 22:49:10 2011 UTC (12 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +9 -3 lines
SVN rev 217381 on 2011-01-13 22:49:10Z by yongari Allow TX/RX checksum offloading to be configured independently.
Revision 1.181: download - view: text, markup, annotated - select for diffs
Wed Jan 12 03:43:47 2011 UTC (12 months, 4 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +7 -2 lines
SVN rev 217296 on 2011-01-12 03:43:47Z by yongari For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E), limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of blindly configuring it to 16KB. Due to lack of documentation, re(4) didn't allow jumbo frame on these controllers. However it seems controller is confused with jumbo frame such that it can DMA the received frame to wrong address instead of splitting it into multiple RX buffers. Of course, this caused panic. Since re(4) does not support jumbo frames on these controllers, make controller drop frame that is longer than RE_RX_DESC_BUFLEN sized frame. Fortunately RTL810x controllers, which do not support jumbo frame, have no such issues but this change also limited maximum RX buffer size allowed to RTL810x controllers. Allowing 16KB RX buffer for controllers that have no such capability is meaningless. MFC after: 3 days
Revision 1.180: download - view: text, markup, annotated - select for diffs
Mon Jan 10 23:47:11 2011 UTC (12 months, 4 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +5 -0 lines
SVN rev 217247 on 2011-01-10 23:47:11Z by yongari When driver is not running, do not send DUMP command to controller and just show old (cached) values. Controller will not respond to the command unless MAC is enabled so DUMP request for down interface caused request timeout.
Revision 1.179: download - view: text, markup, annotated - select for diffs
Mon Jan 10 23:28:46 2011 UTC (12 months, 4 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +19 -21 lines
SVN rev 217246 on 2011-01-10 23:28:46Z by yongari Implement TSO on RealTek RTL8168/8111 C or later controllers. RealTek changed TX descriptor format for later controllers so these controllers require MSS configuration in different location of TX descriptor. TSO is enabled by default for controllers that use new descriptor format. For old controllers, TSO is still disabled by default due to broken frames under certain conditions but users can enable it. Special thanks to Hayes Wang at RealTek. MFC after: 2 weeks
Revision 1.95.2.65.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
Diff to: previous 1.95.2.65: preferred, colored
Changes since revision 1.95.2.65: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.160.2.16.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
Diff to: previous 1.160.2.16: preferred, colored
Changes since revision 1.160.2.16: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.95.2.65: download - view: text, markup, annotated - select for diffs
Mon Nov 29 01:43:17 2010 UTC (14 months, 1 week ago) by yongari
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.95.2.64: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.64: +1 -1 lines
SVN rev 216032 on 2010-11-29 01:43:17Z by yongari MFC r215329: Add flow control for all re(4) controllers. re(4) controllers do not provide any MAC configuration interface for resolved flow control parameters. There is even no register that configures water mark which will control generation of pause frames. However enabling flow control surely enhanced performance a lot.
Revision 1.160.2.16: download - view: text, markup, annotated - select for diffs
Mon Nov 29 01:41:56 2010 UTC (14 months, 1 week ago) by yongari
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.160.2.15: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.15: +1 -1 lines
SVN rev 216031 on 2010-11-29 01:41:56Z by yongari MFC r215329: Add flow control for all re(4) controllers. re(4) controllers do not provide any MAC configuration interface for resolved flow control parameters. There is even no register that configures water mark which will control generation of pause frames. However enabling flow control surely enhanced performance a lot.
Revision 1.95.2.64: download - view: text, markup, annotated - select for diffs
Tue Nov 16 20:34:00 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.63: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.63: +18 -0 lines
SVN rev 215406 on 2010-11-16 20:34:00Z by yongari MFC r215017,215025: Follow the lead of vendor's interrupt moderation mechanism. It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt moderation mechanism but it is not documented at all. The magic value dramatically reduced number of interrupts without noticeable performance drops so apply it to all RTL8169/RTL8169 controllers. Vendor's FreeBSD driver also applies it to RTL810xE controllers but their Linux driver explicitly cleared the register, so do not enable interrupt moderation for RTL810xE controllers. While I'm here sort 8169 specific registers. Obtained from: RealTek FreeBSD driver MFC r215025: Only moderate TX completion interrupts. Relying on taskqueue to suppress RX interrupts seems to give better RX performance than RX interrupt moderation.
Revision 1.160.2.15: download - view: text, markup, annotated - select for diffs
Tue Nov 16 20:32:09 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.14: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.14: +18 -0 lines
SVN rev 215405 on 2010-11-16 20:32:09Z by yongari MFC r215017,215025: Follow the lead of vendor's interrupt moderation mechanism. It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt moderation mechanism but it is not documented at all. The magic value dramatically reduced number of interrupts without noticeable performance drops so apply it to all RTL8169/RTL8169 controllers. Vendor's FreeBSD driver also applies it to RTL810xE controllers but their Linux driver explicitly cleared the register, so do not enable interrupt moderation for RTL810xE controllers. While I'm here sort 8169 specific registers. Obtained from: RealTek FreeBSD driver MFC r215025: Only moderate TX completion interrupts. Relying on taskqueue to suppress RX interrupts seems to give better RX performance than RX interrupt moderation.
Revision 1.95.2.63: download - view: text, markup, annotated - select for diffs
Tue Nov 16 20:27:01 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.62: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.62: +12 -4 lines
SVN rev 215404 on 2010-11-16 20:27:01Z by yongari MFC r214992: Reduce spin wait time consumed in GMII register access routine. There were a couple of attempts in the past to reduce it since it took more than 1ms. Because mii_tick() periodically polls link status, waiting more than 1ms for each GMII register access was overkill. Unfortunately all previous attempts were failed with various ways on different controllers. This time, add additional 20us dealy at the end of GMII register access which seems to requirement of all RealTek controllers to issue next GMII register access request. This is the same way what Linux does.
Revision 1.160.2.14: download - view: text, markup, annotated - select for diffs
Tue Nov 16 20:21:53 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.13: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.13: +12 -4 lines
SVN rev 215403 on 2010-11-16 20:21:53Z by yongari MFC r214992: Reduce spin wait time consumed in GMII register access routine. There were a couple of attempts in the past to reduce it since it took more than 1ms. Because mii_tick() periodically polls link status, waiting more than 1ms for each GMII register access was overkill. Unfortunately all previous attempts were failed with various ways on different controllers. This time, add additional 20us dealy at the end of GMII register access which seems to requirement of all RealTek controllers to issue next GMII register access request. This is the same way what Linux does.
Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Nov 15 00:06:19 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +1 -1 lines
SVN rev 215329 on 2010-11-15 00:06:19Z by yongari Add flow control for all re(4) controllers. re(4) controllers do not provide any MAC configuration interface for resolved flow control parameters. There is even no register that configures water mark which will control generation of pause frames. However enabling flow control surely enhanced performance a lot.
Revision 1.95.2.62: download - view: text, markup, annotated - select for diffs
Sat Nov 13 01:11:13 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.61: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.61: +139 -15 lines
SVN rev 215223 on 2010-11-13 01:11:13Z by yongari MFC r214844: Add simple MAC statistics counter reading support. Unfortunately useful counters like rl_missed_pkts is 16 bits quantity which is too small to hold meaningful information happened in a second. This means driver should frequently read these counters in order not to lose accuracy and that approach is too inefficient in driver's view. Moreover it seems there is no way to trigger an interrupt to detect counter near-full or wraparound event as well as lacking clearing the MAC counters. Another limitation of reading the counters from RealTek controllers is lack of interrupt firing at the end of DMA cycle of MAC counter read request such that driver have to poll the end of the DMA which is a time consuming process as well as inefficient. The more severe issue of the MAC counter read request is it takes too long to complete the DMA. All these limitation made maintaining MAC counters in driver impractical. For now, just provide simple sysctl interface to trigger reading the MAC counters. These counters could be used to track down driver issues. Users can read MAC counters maintained in controller with the following command. #sysctl dev.re.0.stats=1 While I'm here add check for validity of dma map and allocated memory before unloading/freeing them. Tested by: rmacklem
Revision 1.160.2.13: download - view: text, markup, annotated - select for diffs
Sat Nov 13 01:09:44 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.12: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.12: +139 -15 lines
SVN rev 215222 on 2010-11-13 01:09:44Z by yongari MFC r214844: Add simple MAC statistics counter reading support. Unfortunately useful counters like rl_missed_pkts is 16 bits quantity which is too small to hold meaningful information happened in a second. This means driver should frequently read these counters in order not to lose accuracy and that approach is too inefficient in driver's view. Moreover it seems there is no way to trigger an interrupt to detect counter near-full or wraparound event as well as lacking clearing the MAC counters. Another limitation of reading the counters from RealTek controllers is lack of interrupt firing at the end of DMA cycle of MAC counter read request such that driver have to poll the end of the DMA which is a time consuming process as well as inefficient. The more severe issue of the MAC counter read request is it takes too long to complete the DMA. All these limitation made maintaining MAC counters in driver impractical. For now, just provide simple sysctl interface to trigger reading the MAC counters. These counters could be used to track down driver issues. Users can read MAC counters maintained in controller with the following command. #sysctl dev.re.0.stats=1 While I'm here add check for validity of dma map and allocated memory before unloading/freeing them. Tested by: rmacklem
Revision 1.95.2.61: download - view: text, markup, annotated - select for diffs
Sat Nov 13 01:07:45 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.60: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.60: +6 -6 lines
SVN rev 215221 on 2010-11-13 01:07:45Z by yongari MFC r214841-214842: r214841: Remove extra white spaces. r214842: style(9).
Revision 1.160.2.12: download - view: text, markup, annotated - select for diffs
Sat Nov 13 01:05:47 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.11: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.11: +6 -6 lines
SVN rev 215220 on 2010-11-13 01:05:47Z by yongari MFC r214841-214842: r214841: Remove extra white spaces. r214842: style(9).
Revision 1.95.2.60: download - view: text, markup, annotated - select for diffs
Sat Nov 13 01:03:33 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.59: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.59: +6 -2 lines
SVN rev 215219 on 2010-11-13 01:03:33Z by yongari MFC r214840: Enable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe controllers. Some old PCI controllers may work with DAC but it was known to be buggy so 64bit DMA addressing is used only on PCIe controllers.
Revision 1.160.2.11: download - view: text, markup, annotated - select for diffs
Sat Nov 13 01:02:09 2010 UTC (14 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.10: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.10: +6 -2 lines
SVN rev 215218 on 2010-11-13 01:02:09Z by yongari MFC r214840: Enable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe controllers. Some old PCI controllers may work with DAC but it was known to be buggy so 64bit DMA addressing is used only on PCIe controllers.
Revision 1.177: download - view: text, markup, annotated - select for diffs
Tue Nov 9 01:52:09 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +1 -1 lines
SVN rev 215025 on 2010-11-09 01:52:09Z by yongari Only moderate TX completion interrupts. Relying on taskqueue to suppress RX interrupts seems to give better RX performance than RX interrupt moderation.
Revision 1.176: download - view: text, markup, annotated - select for diffs
Mon Nov 8 21:50:50 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +18 -0 lines
SVN rev 215017 on 2010-11-08 21:50:50Z by yongari Follow the lead of vendor's interrupt moderation mechanism. It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt moderation mechanism but it is not documented at all. The magic value dramatically reduced number of interrupts without noticeable performance drops so apply it to all RTL8169/RTL8169 controllers. Vendor's FreeBSD driver also applies it to RTL810xE controllers but their Linux driver explicitly cleared the register, so do not enable interrupt moderation for RTL810xE controllers. While I'm here sort 8169 specific registers. Obtained from: RealTek FreeBSD driver
Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Nov 8 19:15:31 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +12 -4 lines
SVN rev 214992 on 2010-11-08 19:15:31Z by yongari Reduce spin wait time consumed in GMII register access routine. There were a couple of attempts in the past to reduce it since it took more than 1ms. Because mii_tick() periodically polls link status, waiting more than 1ms for each GMII register access was overkill. Unfortunately all previous attempts were failed with various ways on different controllers. This time, add additional 20us dealy at the end of GMII register access which seems to requirement of all RealTek controllers to issue next GMII register access request. This is the same way what Linux does.
Revision 1.95.2.59: download - view: text, markup, annotated - select for diffs
Sun Nov 7 11:12:30 2010 UTC (15 months ago) by marius
Branches: RELENG_7
Diff to: previous 1.95.2.58: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.58: +11 -17 lines
SVN rev 214910 on 2010-11-07 11:12:30Z by marius
MFC: r213893, r213908, r214566, r214605, r214846
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
Revision 1.160.2.10: download - view: text, markup, annotated - select for diffs
Sun Nov 7 11:12:29 2010 UTC (15 months ago) by marius
Branches: RELENG_8
Diff to: previous 1.160.2.9: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.9: +11 -17 lines
SVN rev 214909 on 2010-11-07 11:12:29Z by marius
MFC: r213893, r213908, r214566, r214605, r214846
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 r214684) 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
Revision 1.174: download - view: text, markup, annotated - select for diffs
Fri Nov 5 19:28:00 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +139 -15 lines
SVN rev 214844 on 2010-11-05 19:28:00Z by yongari Add simple MAC statistics counter reading support. Unfortunately useful counters like rl_missed_pkts is 16 bits quantity which is too small to hold meaningful information happened in a second. This means driver should frequently read these counters in order not to lose accuracy and that approach is too inefficient in driver's view. Moreover it seems there is no way to trigger an interrupt to detect counter near-full or wraparound event as well as lacking clearing the MAC counters. Another limitation of reading the counters from RealTek controllers is lack of interrupt firing at the end of DMA cycle of MAC counter read request such that driver have to poll the end of the DMA which is a time consuming process as well as inefficient. The more severe issue of the MAC counter read request is it takes too long to complete the DMA. All these limitation made maintaining MAC counters in driver impractical. For now, just provide simple sysctl interface to trigger reading the MAC counters. These counters could be used to track down driver issues. Users can read MAC counters maintained in controller with the following command. #sysctl dev.re.0.stats=1 While I'm here add check for validity of dma map and allocated memory before unloading/freeing them. Tested by: rmacklem
Revision 1.173: download - view: text, markup, annotated - select for diffs
Fri Nov 5 18:24:50 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +3 -3 lines
SVN rev 214842 on 2010-11-05 18:24:50Z by yongari style(9).
Revision 1.172: download - view: text, markup, annotated - select for diffs
Fri Nov 5 18:23:43 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +3 -3 lines
SVN rev 214841 on 2010-11-05 18:23:43Z by yongari Remove extra white spaces.
Revision 1.171: download - view: text, markup, annotated - select for diffs
Fri Nov 5 18:19:54 2010 UTC (15 months ago) by yongari
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +6 -2 lines
SVN rev 214840 on 2010-11-05 18:19:54Z by yongari Enable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe controllers. Some old PCI controllers may work with DAC but it was known to be buggy so 64bit DMA addressing is used only on PCIe controllers.
Revision 1.170: download - view: text, markup, annotated - select for diffs
Fri Oct 15 14:52:11 2010 UTC (15 months, 3 weeks ago) by marius
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +11 -17 lines
SVN rev 213893 on 2010-10-15 14:52:11Z by marius
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 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
Revision 1.160.2.9.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.160.2.9: preferred, colored; next MAIN 1.160.2.10: preferred, colored
Changes since revision 1.160.2.9: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.95.2.58: download - view: text, markup, annotated - select for diffs
Wed May 12 17:34:51 2010 UTC (20 months, 4 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.57: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.57: +5 -3 lines
SVN rev 207980 on 2010-05-12 17:34:51Z by yongari MFC r207763: Don't change PCIe maximum read request size to 2048 on RTL810x controllers. It caused device timeouts. Reported by: McLone < mclone <> gmail dot com > Tested by: McLone < mclone <> gmail dot com >
Revision 1.160.2.9: download - view: text, markup, annotated - select for diffs
Wed May 12 17:18:07 2010 UTC (20 months, 4 weeks ago) by yongari
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.160.2.8: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.8: +5 -3 lines
SVN rev 207977 on 2010-05-12 17:18:07Z by yongari MFC r207763: Don't change PCIe maximum read request size to 2048 on RTL810x controllers. It caused device timeouts. Reported by: McLone < mclone <> gmail dot com > Tested by: McLone < mclone <> gmail dot com >
Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri May 7 23:05:27 2010 UTC (21 months ago) by yongari
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +5 -3 lines
SVN rev 207763 on 2010-05-07 23:05:27Z by yongari Don't change PCIe maximum read request size to 2048 on RTL810x controllers. It caused device timeouts. Reported by: McLone < mclone <> gmail dot com > Tested by: McLone < mclone <> gmail dot com > MFC after: 5 days
Revision 1.95.2.57: download - view: text, markup, annotated - select for diffs
Wed Apr 14 01:14:40 2010 UTC (21 months, 3 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.56: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.56: +12 -2 lines
SVN rev 206578 on 2010-04-14 01:14:40Z by yongari MFC r206433: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de >
Revision 1.160.2.8: download - view: text, markup, annotated - select for diffs
Wed Apr 14 01:12:24 2010 UTC (21 months, 3 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.7: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.7: +12 -2 lines
SVN rev 206577 on 2010-04-14 01:12:24Z by yongari MFC r206433: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de >
Revision 1.168: download - view: text, markup, annotated - select for diffs
Fri Apr 9 22:50:28 2010 UTC (22 months ago) by yongari
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +12 -2 lines
SVN rev 206433 on 2010-04-09 22:50:28Z by yongari Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de > MFC after: 5 days
Revision 1.95.2.56: download - view: text, markup, annotated - select for diffs
Tue Mar 23 19:34:34 2010 UTC (22 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.55: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.55: +20 -9 lines
SVN rev 205528 on 2010-03-23 19:34:34Z by yongari MFC r204155,204219: r204155: Increase PCIe maximuim read request size to 2048. Because re(4) uses Tx DMA burst size 2048, I beleive PCIe maximum read request size also should match to the value of Tx DMA burst size. With this change I can get more than 800Mbps for TCP bulk transfers. Previously I was not able to get more than 700Mbps. If I enable TSO it now shows 927Mbps. r204219: Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo frame, make sure to update VLAN capabilities whenever jumbo frame is configured. While I'm here rearrange interface capabilities configuration. The controller requires VLAN hardware tagging to make TSO work on VLANs so explicitly check this requirement.
Revision 1.160.2.7: download - view: text, markup, annotated - select for diffs
Tue Mar 23 19:30:15 2010 UTC (22 months, 2 weeks ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.6: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.6: +20 -9 lines
SVN rev 205526 on 2010-03-23 19:30:15Z by yongari MFC r204155,204219: r204155: Increase PCIe maximuim read request size to 2048. Because re(4) uses Tx DMA burst size 2048, I beleive PCIe maximum read request size also should match to the value of Tx DMA burst size. With this change I can get more than 800Mbps for TCP bulk transfers. Previously I was not able to get more than 700Mbps. If I enable TSO it now shows 927Mbps. r204219: Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo frame, make sure to update VLAN capabilities whenever jumbo frame is configured. While I'm here rearrange interface capabilities configuration. The controller requires VLAN hardware tagging to make TSO work on VLANs so explicitly check this requirement.
Revision 1.167: download - view: text, markup, annotated - select for diffs
Mon Feb 22 18:51:14 2010 UTC (23 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +17 -9 lines
SVN rev 204219 on 2010-02-22 18:51:14Z by yongari Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo frame, make sure to update VLAN capabilities whenever jumbo frame is configured. While I'm here rearrange interface capabilities configuration. The controller requires VLAN hardware tagging to make TSO work on VLANs so explicitly check this requirement.
Revision 1.166: download - view: text, markup, annotated - select for diffs
Sun Feb 21 00:00:55 2010 UTC (23 months, 2 weeks ago) by yongari
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +3 -0 lines
SVN rev 204155 on 2010-02-21 00:00:55Z by yongari Increase PCIe maximuim read request size to 2048. Because re(4) uses Tx DMA burst size 2048, I beleive PCIe maximum read request size also should match to the value of Tx DMA burst size. With this change I can get more than 800Mbps for TCP bulk transfers. Previously I was not able to get more than 700Mbps. If I enable TSO it now shows 927Mbps.
Revision 1.95.2.55.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.95.2.55: preferred, colored; next MAIN 1.95.2.56: preferred, colored
Changes since revision 1.95.2.55: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.95.2.55: download - view: text, markup, annotated - select for diffs
Tue Feb 2 17:28:50 2010 UTC (2 years ago) by yongari
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.95.2.54: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.54: +8 -1 lines
SVN rev 203383 on 2010-02-02 17:28:50Z by yongari MFC r203082: Add initial support for RTL8103E PCIe fastethernet. PR: kern/142974 Approved by: re (kensmith)
Revision 1.160.2.6: download - view: text, markup, annotated - select for diffs
Mon Feb 1 23:57:42 2010 UTC (2 years ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.5: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.5: +8 -1 lines
SVN rev 203364 on 2010-02-01 23:57:42Z by yongari MFC r203082: Add initial support for RTL8103E PCIe fastethernet. PR: kern/142974
Revision 1.165: download - view: text, markup, annotated - select for diffs
Wed Jan 27 17:49:27 2010 UTC (2 years ago) by yongari
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +8 -1 lines
SVN rev 203082 on 2010-01-27 17:49:27Z by yongari Add initial support for RTL8103E PCIe fastethernet. PR: kern/142974
Revision 1.95.2.54: download - view: text, markup, annotated - select for diffs
Thu Dec 3 18:50:04 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.53: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.53: +5 -4 lines
SVN rev 200075 on 2009-12-03 18:50:04Z by yongari MFC r199565: Move interface reinitialization down after disabling WOL in resume path.
Revision 1.160.2.5: download - view: text, markup, annotated - select for diffs
Thu Dec 3 18:48:32 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.4: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.4: +5 -4 lines
SVN rev 200074 on 2009-12-03 18:48:32Z by yongari MFC r199565: Move interface reinitialization down after disabling WOL in resume path.
Revision 1.95.2.53: download - view: text, markup, annotated - select for diffs
Thu Dec 3 18:45:01 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.52: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.52: +16 -4 lines
SVN rev 200073 on 2009-12-03 18:45:01Z by yongari MFC r199564: Minimize interface reinitialization by checking IFF_DRV_RUNNING flag. This fixes unnecessary interface UP/DOWNs during getting an IP address via DHCP.
Revision 1.160.2.4: download - view: text, markup, annotated - select for diffs
Thu Dec 3 18:42:19 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.3: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.3: +16 -4 lines
SVN rev 200072 on 2009-12-03 18:42:19Z by yongari MFC r199564: Minimize interface reinitialization by checking IFF_DRV_RUNNING flag. This fixes unnecessary interface UP/DOWNs during getting an IP address via DHCP.
Revision 1.95.2.52: download - view: text, markup, annotated - select for diffs
Sun Nov 29 20:34:41 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.51: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.51: +6 -4 lines
SVN rev 199945 on 2009-11-29 20:34:41Z by yongari MFC r191301: For RTL8139C+ controllers, have controller handle padding short checksum offload frames. Software workaround used for broken controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog timeouts on RTL8139C+. Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding feature of controller and set it for RTL8139C+ and controllers that use new descriptor format. This fixes watchdog timeouts seen on RTL8139C+. Reported by: Dimitri Rodis < DimitriR <> integritasystems dot com > Tested by: Dimitri Rodis < DimitriR <> integritasystems dot com >
Revision 1.95.2.51: download - view: text, markup, annotated - select for diffs
Sun Nov 29 20:31:09 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.50: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.50: +2 -0 lines
SVN rev 199944 on 2009-11-29 20:31:09Z by yongari MFC r195675: Adding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX.
Revision 1.95.2.50: download - view: text, markup, annotated - select for diffs
Sun Nov 29 19:50:39 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.49: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.49: +2 -0 lines
SVN rev 199931 on 2009-11-29 19:50:39Z by yongari MFC 198814. Add a check to know whether driver is still running after reacquiring driver lock in Rx handler. re(4) drops a driver lock before passing received frame to upper stack and reacquire the lock. During the time window ioctl calls could be executed and if the ioctl was interface down request, driver will stop the controller and free allocated mbufs. After that when driver comes back to Rx handler again it does not know what was happend so it could access free mbufs which in turn cause panic. Reported by: Norbert Papke < npapk <> acm dot org > Tested by: Norbert Papke < npapk <> acm dot org >
Revision 1.160.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 29 19:49:21 2009 UTC (2 years, 2 months ago) by yongari
Branches: RELENG_8
Diff to: previous 1.160.2.2: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.2: +2 -0 lines
SVN rev 199930 on 2009-11-29 19:49:21Z by yongari MFC 198814. Add a check to know whether driver is still running after reacquiring driver lock in Rx handler. re(4) drops a driver lock before passing received frame to upper stack and reacquire the lock. During the time window ioctl calls could be executed and if the ioctl was interface down request, driver will stop the controller and free allocated mbufs. After that when driver comes back to Rx handler again it does not know what was happend so it could access free mbufs which in turn cause panic. Reported by: Norbert Papke < npapk <> acm dot org > Tested by: Norbert Papke < npapk <> acm dot org >
Revision 1.164: download - view: text, markup, annotated - select for diffs
Thu Nov 19 23:14:40 2009 UTC (2 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +5 -4 lines
SVN rev 199565 on 2009-11-19 23:14:40Z by yongari Move interface reinitialization down after disabling WOL in resume path.
Revision 1.163: download - view: text, markup, annotated - select for diffs
Thu Nov 19 23:12:44 2009 UTC (2 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +16 -4 lines
SVN rev 199564 on 2009-11-19 23:12:44Z by yongari Minimize interface reinitialization by checking IFF_DRV_RUNNING flag. This fixes unnecessary interface UP/DOWNs during getting an IP address via DHCP. Tested by: Warren Block ( wblock<> wonkity dot com )
Revision 1.162: download - view: text, markup, annotated - select for diffs
Mon Nov 2 18:35:05 2009 UTC (2 years, 3 months ago) by yongari
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +2 -0 lines
SVN rev 198814 on 2009-11-02 18:35:05Z by yongari Add a check to know whether driver is still running after reacquiring driver lock in Rx handler. re(4) drops a driver lock before passing received frame to upper stack and reacquire the lock. During the time window ioctl calls could be executed and if the ioctl was interface down request, driver will stop the controller and free allocated mbufs. After that when driver comes back to Rx handler again it does not know what was happend so it could access free mbufs which in turn cause panic. Reported by: Norbert Papke < npapk <> acm dot org > Tested by: Norbert Papke < npapk <> acm dot org >
Revision 1.160.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.160.2.2: preferred, colored; next MAIN 1.160.2.3: preferred, colored
Changes since revision 1.160.2.2: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.95.2.49: download - view: text, markup, annotated - select for diffs
Fri Sep 11 17:15:18 2009 UTC (2 years, 4 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.48: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.48: +5 -3 lines
SVN rev 197095 on 2009-09-11 17:15:18Z by yongari MFC r196516: Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to the description of RTL8168D as RL_HWREV_8168D can be either RTL8168D or RTL8111D. PR: kern/137672
Revision 1.160.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 28 17:34:22 2009 UTC (2 years, 5 months ago) by yongari
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.160.2.1: preferred, colored; branchpoint 1.160: preferred, colored
Changes since revision 1.160.2.1: +5 -3 lines
SVN rev 196618 on 2009-08-28 17:34:22Z by yongari MFC r196516: Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to the description of RTL8168D as RL_HWREV_8168D can be either RTL8168D or RTL8111D. PR: kern/137672 Approved by: re (kib)
Revision 1.161: download - view: text, markup, annotated - select for diffs
Mon Aug 24 18:58:13 2009 UTC (2 years, 5 months ago) by yongari
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +5 -3 lines
SVN rev 196516 on 2009-08-24 18:58:13Z by yongari Add RTL8168DP/RTL8111DP device id. While I'm here append "8111D" to the description of RTL8168D as RL_HWREV_8168D can be either RTL8168D or RTL8111D. PR: kern/137672 MFC after: 3 days
Revision 1.160.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.160: download - view: text, markup, annotated - select for diffs
Tue Jul 14 04:35:13 2009 UTC (2 years, 6 months ago) by avatar
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +2 -0 lines
SVN rev 195675 on 2009-07-14 04:35:13Z by avatar Adding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX. Reviewed by: yongari Approved by: re (kib, kensmith)
Revision 1.159: download - view: text, markup, annotated - select for diffs
Fri Jun 26 11:45:06 2009 UTC (2 years, 7 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +2 -2 lines
SVN rev 195049 on 2009-06-26 11:45:06Z by rwatson 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
Revision 1.158: download - view: text, markup, annotated - select for diffs
Sat May 30 15:14:44 2009 UTC (2 years, 8 months ago) by attilio
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +19 -12 lines
SVN rev 193096 on 2009-05-30 15:14:44Z by attilio When user_frac in the polling subsystem is low it is going to busy the CPU for too long period than necessary. Additively, interfaces are kept polled (in the tick) even if no more packets are available. In order to avoid such situations a new generic mechanism can be implemented in proactive way, keeping track of the time spent on any packet and fragmenting the time for any tick, stopping the processing as soon as possible. In order to implement such mechanism, the polling handler needs to change, returning the number of packets processed. While the intended logic is not part of this patch, the polling KPI is broken by this commit, adding an int return value and the new flag IFCAP_POLLING_NOCOUNT (which will signal that the return value is meaningless for the installed handler and checking should be skipped). Bump __FreeBSD_version in order to signal such situation. Reviewed by: emaste Sponsored by: Sandvine Incorporated
Revision 1.157: download - view: text, markup, annotated - select for diffs
Mon Apr 20 07:13:04 2009 UTC (2 years, 9 months ago) by yongari
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +6 -4 lines
SVN rev 191301 on 2009-04-20 07:13:04Z by yongari For RTL8139C+ controllers, have controller handle padding short checksum offload frames. Software workaround used for broken controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog timeouts on RTL8139C+. Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding feature of controller and set it for RTL8139C+ and controllers that use new descriptor format. This fixes watchdog timeouts seen on RTL8139C+. Reported by: Dimitri Rodis < DimitriR <> integritasystems dot com > Tested by: Dimitri Rodis < DimitriR <> integritasystems dot com >
Revision 1.95.2.48.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.95.2.48: preferred, colored; next MAIN 1.95.2.49: preferred, colored
Changes since revision 1.95.2.48: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.95.2.48: download - view: text, markup, annotated - select for diffs
Fri Apr 3 00:12:14 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.95.2.47: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.47: +2 -0 lines
SVN rev 190663 on 2009-04-03 00:12:14Z by yongari
MFC r190587:
It seems that RTL8168D and RTL8102EL requires additional settle
time to complete RL_PHYAR register write. Accessing RL_PHYAR
register right after the write causes errors for subsequent PHY
register accesses.
Tested by: george at luckytele dot com,
Steve Wills < STEVE at stevenwills dot com >
Approved by: re (Kostik Belousov)
Revision 1.156: download - view: text, markup, annotated - select for diffs
Tue Mar 31 03:29:05 2009 UTC (2 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +2 -0 lines
SVN rev 190587 on 2009-03-31 03:29:05Z by yongari Partial revert r185756. It seems that RTL8168D and RTL8102EL requires additional settle time to complete RL_PHYAR register write. Accessing RL_PHYAR register right after the write causes errors for subsequent PHY register accesses. Tested by: george at luckytele dot com, Steve Wills < STEVE at stevenwills dot com >
Revision 1.95.2.47: download - view: text, markup, annotated - select for diffs
Wed Mar 18 02:12:33 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.46: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.46: +25 -13 lines
SVN rev 189947 on 2009-03-18 02:12:33Z by yongari MFC r189555: Add a new tunable hw.re.prefer_iomap which disables memory register mapping. The tunable is OFF for all controllers except RTL8169SC family. RTL8169SC seems to require more magic to use memory register mapping. r187483 added a fix for RTL8169SCe controller but it does not looke like fix other variants of RTL8169SC. Tested by: Gavin Stone-Tolcher g.stone-tolcher <> its dot uq dot edu dot au
Revision 1.95.2.46: download - view: text, markup, annotated - select for diffs
Wed Mar 18 02:10:01 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.45: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.45: +2 -1 lines
SVN rev 189946 on 2009-03-18 02:10:01Z by yongari MFC r188474: Allocating 2 MSI messages do not seem to work on certain controllers so use just 1 MSI message. This fixes regression introduced in r188381.
Revision 1.95.2.45: download - view: text, markup, annotated - select for diffs
Wed Mar 18 02:07:07 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.44: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.44: +8 -1 lines
SVN rev 189945 on 2009-03-18 02:07:07Z by yongari MFC r188381: Reclaim transmitted frames in re_tick(). This is for PCIe controllers that lose Tx completion interrupts under certain conditions. With this change it's safe to use MSI on PCIe controllers so enable MSI on these controllers.
Revision 1.95.2.44: download - view: text, markup, annotated - select for diffs
Wed Mar 18 02:03:16 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.43: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.43: +39 -19 lines
SVN rev 189944 on 2009-03-18 02:03:16Z by yongari MFC r187483: - Add support for 8110SCe part. Some magic registers were taken from Linux driver. - Swap hardware revisions for 8110S and 8169S as Linux driver claims.
Revision 1.95.2.43: download - view: text, markup, annotated - select for diffs
Wed Mar 18 02:00:23 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.42: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.42: +9 -11 lines
SVN rev 189943 on 2009-03-18 02:00:23Z by yongari MFC r187482: Retire RL_FLAG_INVMAR bit to match its comment and reality.
Revision 1.95.2.42: download - view: text, markup, annotated - select for diffs
Wed Mar 18 01:57:26 2009 UTC (2 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.41: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.41: +31 -66 lines
SVN rev 189941 on 2009-03-18 01:57:26Z by yongari MFC r187481: - Do not read and write RX configuration register multiple times. - Always program RX configuration register from scratch instead of doing read/modify/write. - Rename re_setmulti() to re_set_rxmode() to be reflect reality. - Simplify hash filter logic a little while I am here.
Revision 1.155: download - view: text, markup, annotated - select for diffs
Mon Mar 9 13:25:34 2009 UTC (2 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +0 -1 lines
SVN rev 189576 on 2009-03-09 13:25:34Z by imp remove now-redunant cardbus attachment lines.
Revision 1.154: download - view: text, markup, annotated - select for diffs
Mon Mar 9 06:02:55 2009 UTC (2 years, 11 months ago) by yongari
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +25 -13 lines
SVN rev 189555 on 2009-03-09 06:02:55Z by yongari Add a new tunable hw.re.prefer_iomap which disables memory register mapping. The tunable is OFF for all controllers except RTL8169SC family. RTL8169SC seems to require more magic to use memory register mapping. r187483 added a fix for RTL8169SCe controller but it does not looke like fix other variants of RTL8169SC. Tested by: Gavin Stone-Tolcher g.stone-tolcher <> its dot uq dot edu dot au
Revision 1.153: download - view: text, markup, annotated - select for diffs
Wed Feb 11 00:23:56 2009 UTC (2 years, 11 months ago) by yongari
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +2 -1 lines
SVN rev 188474 on 2009-02-11 00:23:56Z by yongari Allocating 2 MSI messages do not seem to work on certain controllers so use just 1 MSI message. This fixes regression introduced in r188381. Tested by: many
Revision 1.152: download - view: text, markup, annotated - select for diffs
Mon Feb 9 04:59:13 2009 UTC (3 years ago) by yongari
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +8 -1 lines
SVN rev 188381 on 2009-02-09 04:59:13Z by yongari Reclaim transmitted frames in re_tick(). This is for PCIe controllers that lose Tx completion interrupts under certain conditions. With this change it's safe to use MSI on PCIe controllers so enable MSI on these controllers.
Revision 1.95.2.41: download - view: text, markup, annotated - select for diffs
Mon Feb 9 01:38:01 2009 UTC (3 years ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.40: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.40: +21 -14 lines
SVN rev 188359 on 2009-02-09 01:38:01Z by yongari MFC r186214,186389,187417 r186214: It seems that RealTek PCIe controllers require an explicit Tx poll command whenever Tx completion interrupt is raised. The Tx poll bit is cleared when all packets waiting to be transferred have been processed. This means the second Tx poll command can be silently ignored as the Tx poll bit could be still active while processing of previous Tx poll command is in progress. To address the issue re(4) used to invoke the Tx poll command in Tx completion handler whenever it detects there are pending packets in TxQ. However that still does not seem to completely eliminate watchdog timeouts seen on RealTek PCIe controllers. To fix the issue kick Tx poll command only after Tx completion interrupt is raised as this would indicate Tx is now idle state such that it can accept new Tx poll command again. While here apply this workaround for PCIe based controllers as other controllers does not seem to have this limitation. r186389: Since we don't request reset for rlphy(4), the link state 'UP' event from mii(4) may not be delivered if valid link was already established. To address the issue, check current link state after driving MII_TICK. This should fix a regression introduced in r185753 on fast ethernet controllers. r187417: Sometimes RTL8168B seems to take long time to access GMII registers in device attach phase. Double GMII register access timeout value to fix the issue.
Revision 1.95.2.40: download - view: text, markup, annotated - select for diffs
Mon Feb 9 01:30:14 2009 UTC (3 years ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.39: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.39: +28 -1 lines
SVN rev 188358 on 2009-02-09 01:30:14Z by yongari MFC r186210: For RTL8168C SPIN2 controllers, make sure to take the controller out of sleep mode prior to accessing to PHY. This should fix device attach failure seen on these controllers. Also enable the sleep mode when device is put into sleep state. PR: kern/123123, kern/123053
Revision 1.95.2.39: download - view: text, markup, annotated - select for diffs
Mon Feb 9 01:26:31 2009 UTC (3 years ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.38: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.38: +33 -12 lines
SVN rev 188357 on 2009-02-09 01:26:31Z by yongari MFC: r185897,185900-185901,185903 r185897: Always put controller into known state before device intialization. While here remove re_reset calls invoked in system error case as controller reset is always done in device initialization. r185900: Newer RealTek controllers requires setting stop request bit to terminate active Tx/Rx operation. r185901: Don't access undocumented register 0x82 on controllers that have no such register. While here clear undocumented PHY register 0x0B for RTL8110S. r185903: Make WOL work on RTL8168B. This controller seems to require explicit command to enable Rx MAC prior to entering D3.
Revision 1.95.2.38: download - view: text, markup, annotated - select for diffs
Mon Feb 9 01:16:36 2009 UTC (3 years ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.37: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.37: +54 -32 lines
SVN rev 188356 on 2009-02-09 01:16:36Z by yongari MFC: r185752-185753,185756,185896 r185752: Make sure to return the result of meida change request. Previously it used to return success regardless of the result. r185753: o Implemented miibus_statchg handler. It detects whether re(4) established a valid link or not. In miibus_statchg handler add a check for established link is valid one for the controller(e.g. 1000baseT is not a valid link for fastethernet controllers.) o Added a flag RE_FLAG_FASTETHER to mark fastethernet controllers. o Added additional check to know whether we've really encountered watchdog timeouts or missed Tx completion interrupts. This change may help to track down the cause of watchdog timeouts. o In interrupt handler, removed a check for link state change interrupt. Not all controllers have the bit and re(4) did not rely on the event for a long time. In addition, re(4) didn't request the interrupt in RL_IMR register. r185756: Reduce spin wait time consumed in GMII register access routines. Waiting for 1ms for each GMII register access looks overkill and it may also decrease overall performance of driver because re(4) invokes mii_tick for every hz. r185896: Partly revert r185756. RTL8169SC doesn't like reduced delays in GMII access while Tx/Rx is in progress.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue Jan 20 20:22:28 2009 UTC (3 years ago) by jkim
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +39 -19 lines
SVN rev 187483 on 2009-01-20 20:22:28Z by jkim - Add support for 8110SCe part. Some magic registers were taken from Linux driver. - Swap hardware revisions for 8110S and 8169S as Linux driver claims. Reviewed by: yongari (early version)
Revision 1.150: download - view: text, markup, annotated - select for diffs
Tue Jan 20 20:04:09 2009 UTC (3 years ago) by jkim
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +9 -11 lines
SVN rev 187482 on 2009-01-20 20:04:09Z by jkim Retire RL_FLAG_INVMAR bit to match its comment and reality.
Revision 1.149: download - view: text, markup, annotated - select for diffs
Tue Jan 20 19:58:01 2009 UTC (3 years ago) by jkim
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +31 -66 lines
SVN rev 187481 on 2009-01-20 19:58:01Z by jkim - Do not read and write RX configuration register multiple times. - Always program RX configuration register from scratch instead of doing read/modify/write. - Rename re_setmulti() to re_set_rxmode() to be reflect reality. - Simplify hash filter logic a little while I am here. Reviewed by: yongari (early version)
Revision 1.148: download - view: text, markup, annotated - select for diffs
Mon Jan 19 02:31:27 2009 UTC (3 years ago) by yongari
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +4 -4 lines
SVN rev 187417 on 2009-01-19 02:31:27Z by yongari Sometimes RTL8168B seems to take long time to access GMII registers in device attach phase. Double GMII register access timeout value to fix the issue. Reported by: wkoszek Tested by: wkoszek
Revision 1.147: download - view: text, markup, annotated - select for diffs
Mon Dec 22 00:46:22 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +2 -0 lines
SVN rev 186389 on 2008-12-22 00:46:22Z by yongari Since we don't request reset for rlphy(4), the link state 'UP' event from mii(4) may not be delivered if valid link was already established. To address the issue, check current link state after driving MII_TICK. This should fix a regression introduced in r185753 on fast ethernet controllers. Reported by: csjp, Bruce Cran < bruce <> cran DOT org DOT uk > Tested by: csjp, Bruce Cran (initial version)
Revision 1.146: download - view: text, markup, annotated - select for diffs
Wed Dec 17 08:18:11 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +15 -10 lines
SVN rev 186214 on 2008-12-17 08:18:11Z by yongari It seems that RealTek PCIe controllers require an explicit Tx poll command whenever Tx completion interrupt is raised. The Tx poll bit is cleared when all packets waiting to be transferred have been processed. This means the second Tx poll command can be silently ignored as the Tx poll bit could be still active while processing of previous Tx poll command is in progress. To address the issue re(4) used to invoke the Tx poll command in Tx completion handler whenever it detects there are pending packets in TxQ. However that still does not seem to completely eliminate watchdog timeouts seen on RealTek PCIe controllers. To fix the issue kick Tx poll command only after Tx completion interrupt is raised as this would indicate Tx is now idle state such that it can accept new Tx poll command again. While here apply this workaround for PCIe based controllers as other controllers does not seem to have this limitation. Tested by: Victor Balada Diaz < victor <> bsdes DOT net >
Revision 1.145: download - view: text, markup, annotated - select for diffs
Wed Dec 17 06:01:03 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +28 -1 lines
SVN rev 186210 on 2008-12-17 06:01:03Z by yongari For RTL8168C SPIN2 controllers, make sure to take the controller out of sleep mode prior to accessing to PHY. This should fix device attach failure seen on these controllers. Also enable the sleep mode when device is put into sleep state. PR: kern/123123, kern/123053
Revision 1.144: download - view: text, markup, annotated - select for diffs
Thu Dec 11 02:24:11 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +5 -0 lines
SVN rev 185903 on 2008-12-11 02:24:11Z by yongari Make WOL work on RTL8168B. This controller seems to require explicit command to enable Rx MAC prior to entering D3. Tested by: Cyrus Rahman <crahman <> gmail DOT com>
Revision 1.143: download - view: text, markup, annotated - select for diffs
Thu Dec 11 01:41:38 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +14 -2 lines
SVN rev 185901 on 2008-12-11 01:41:38Z by yongari Don't access undocumented register 0x82 on controllers that have no such register. While here clear undocumented PHY register 0x0B for RTL8110S. Obtained from: RealTek FreeBSD driver
Revision 1.142: download - view: text, markup, annotated - select for diffs
Thu Dec 11 01:26:18 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +9 -3 lines
SVN rev 185900 on 2008-12-11 01:26:18Z by yongari Newer RealTek controllers requires setting stop request bit to terminate active Tx/Rx operation.
Revision 1.141: download - view: text, markup, annotated - select for diffs
Thu Dec 11 00:46:07 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +5 -7 lines
SVN rev 185897 on 2008-12-11 00:46:07Z by yongari Always put controller into known state before device intialization. While here remove re_reset calls invoked in system error case as controller reset is always done in device initialization.
Revision 1.140: download - view: text, markup, annotated - select for diffs
Thu Dec 11 00:30:26 2008 UTC (3 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +2 -2 lines
SVN rev 185896 on 2008-12-11 00:30:26Z by yongari Partly revert r185756. RTL8169SC doesn't like reduced delays in GMII access while Tx/Rx is in progress. Reported by: Jaakko Heinonen <jh <> saunalahti DOT fi>, Anton Yuzhaninov <citrin <> citrin DOT ru> Tested by: Jaakko Heinonen <jh <> saunalahti DOT fi>
Revision 1.95.2.36.2.2: download - view: text, markup, annotated - select for diffs
Tue Dec 9 11:05:59 2008 UTC (3 years, 2 months ago) by yongari
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.95.2.36.2.1: preferred, colored; branchpoint 1.95.2.36: preferred, colored; next MAIN 1.95.2.37: preferred, colored
Changes since revision 1.95.2.36.2.1: +3 -1 lines
SVN rev 185793 on 2008-12-09 11:05:59Z by yongari MFC r185542: Add 8168D support. Submitted by: Andrew < andrewwtulloch <> gmail DOT com > Approved by: re (kib)
Revision 1.95.2.37: download - view: text, markup, annotated - select for diffs
Tue Dec 9 11:01:17 2008 UTC (3 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.36: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.36: +3 -1 lines
SVN rev 185792 on 2008-12-09 11:01:17Z by yongari MFC r185542: Add 8168D support. Submitted by: Andrew < andrewwtulloch <> gmail DOT com > Approved by: re (kib)
Revision 1.139: download - view: text, markup, annotated - select for diffs
Mon Dec 8 02:48:41 2008 UTC (3 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -4 lines
SVN rev 185756 on 2008-12-08 02:48:41Z by yongari Reduce spin wait time consumed in GMII register access routines. Waiting for 1ms for each GMII register access looks overkill and it may also decrease overall performance of driver because re(4) invokes mii_tick for every hz. Tested by: rpaulo
Revision 1.138: download - view: text, markup, annotated - select for diffs
Mon Dec 8 02:34:13 2008 UTC (3 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +51 -28 lines
SVN rev 185753 on 2008-12-08 02:34:13Z by yongari o Implemented miibus_statchg handler. It detects whether re(4) established a valid link or not. In miibus_statchg handler add a check for established link is valid one for the controller(e.g. 1000baseT is not a valid link for fastethernet controllers.) o Added a flag RE_FLAG_FASTETHER to mark fastethernet controllers. o Added additional check to know whether we've really encountered watchdog timeouts or missed Tx completion interrupts. This change may help to track down the cause of watchdog timeouts. o In interrupt handler, removed a check for link state change interrupt. Not all controllers have the bit and re(4) did not rely on the event for a long time. In addition, re(4) didn't request the interrupt in RL_IMR register. Tested by: rpaulo
Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Dec 8 01:44:18 2008 UTC (3 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +3 -2 lines
SVN rev 185752 on 2008-12-08 01:44:18Z by yongari Make sure to return the result of meida change request. Previously it used to return success regardless of the result.
Revision 1.136: download - view: text, markup, annotated - select for diffs
Tue Dec 2 03:39:34 2008 UTC (3 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +3 -1 lines
SVN rev 185542 on 2008-12-02 03:39:34Z by yongari Add 8168D support. Submitted by: Andrew < andrewwtulloch <> gmail DOT com >
Revision 1.95.2.36.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
Diff to: previous 1.95.2.36: preferred, colored
Changes since revision 1.95.2.36: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.46.2.39.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.46.2.39: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.39: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.95.2.36: download - view: text, markup, annotated - select for diffs
Fri Sep 19 03:36:53 2008 UTC (3 years, 4 months ago) by yongari
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.95.2.35: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.35: +2 -1 lines
SVN rev 183171 on 2008-09-19 03:36:53Z by yongari MFC r182808: Read ethernet address from ID registers for RTL8102E/RTL8102EL as reading from EEPROM doesn't seem to work on these controllers. Reported by: Milan Obuch ( freebsd-net at dino dot sk ) Tested by: Milan Obuch ( freebsd-net at dino dot sk ) Approved by: re (kensmith)
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sat Sep 6 00:25:16 2008 UTC (3 years, 5 months ago) by yongari
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -1 lines
SVN rev 182808 on 2008-09-06 00:25:16Z by yongari Read ethernet address from ID registers for RTL8102E/RTL8102EL as reading from EEPROM doesn't seem to work on these controllers. Reported by: Milan Obuch ( freebsd-net at dino dot sk ) Tested by: Milan Obuch ( freebsd-net at dino dot sk )
Revision 1.95.2.35: download - view: text, markup, annotated - select for diffs
Wed Aug 20 04:55:40 2008 UTC (3 years, 5 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.34: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.34: +2 -2 lines
SVN rev 181899 on 2008-08-20 04:55:40Z by yongari MFC r181655: Fix VLAN hardware tag insertion/stripping on big-endian architectures. Reported by: naddy Tested on: sparc64
Revision 1.134: download - view: text, markup, annotated - select for diffs
Wed Aug 13 03:40:08 2008 UTC (3 years, 5 months ago) by yongari
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +2 -2 lines
SVN rev 181655 on 2008-08-13 03:40:08Z by yongari Fix VLAN hardware tag insertion/stripping on big-endian architectures. Reported by: naddy Tested on: sparc64 MFC after: 1 week
Revision 1.95.2.34: download - view: text, markup, annotated - select for diffs
Sat Aug 9 02:26:07 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.33: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.33: +48 -124 lines
SVN rev 181450 on 2008-08-09 02:26:07Z by yongari MFC r181272-r181275. r181272: Use ANSI C declarations for all functions. r181273: Remove register keyword. r181274: Remove return keyword at the end of functions that return void. r181275: Rearrange conditional compilation directives. This makes syntax highlighting work in vim.
Revision 1.95.2.33: download - view: text, markup, annotated - select for diffs
Sat Aug 9 02:11:59 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.32: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.32: +7 -0 lines
SVN rev 181449 on 2008-08-09 02:11:59Z by yongari MFC r181271. Don't enable TSO by default. Users of RTL8169/8110 reported watchdog timeout issues and the root cause seems to stem from silicon bug of controller. Personally I couldn't reproduce it on RTL8169 controller but it seems it's dependent on usage pattern. For newer PCIe based controllers I have no TSO complaints but turning off TSO would be more safe. Users who are sure that their controller works with TSO can still reenable the TSO with ifconfig(8).
Revision 1.95.2.32: download - view: text, markup, annotated - select for diffs
Sat Aug 9 02:07:30 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.31: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.31: +18 -0 lines
SVN rev 181448 on 2008-08-09 02:07:30Z by yongari MFC r181270. The number of bits reserved for MSS in RealTek controllers is 11bits. This limits the maximum interface MTU size in TSO case as upper stack should not generate TCP segments with MSS greater than the limit. Armed with this information, disable TSO if interface MTU is greater than the limit.
Revision 1.133: download - view: text, markup, annotated - select for diffs
Mon Aug 4 04:00:10 2008 UTC (3 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +3 -2 lines
SVN rev 181275 on 2008-08-04 04:00:10Z by yongari Rearrange conditional compilation directives. This makes syntax highlighting work in vim.
Revision 1.132: download - view: text, markup, annotated - select for diffs
Mon Aug 4 03:51:20 2008 UTC (3 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +0 -14 lines
SVN rev 181274 on 2008-08-04 03:51:20Z by yongari Remove return keyword at the end of functions that return void.
Revision 1.131: download - view: text, markup, annotated - select for diffs
Mon Aug 4 03:47:29 2008 UTC (3 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +4 -4 lines
SVN rev 181273 on 2008-08-04 03:47:29Z by yongari Remove register keyword.
Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Aug 4 03:45:07 2008 UTC (3 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +41 -104 lines
SVN rev 181272 on 2008-08-04 03:45:07Z by yongari Use ANSI C declarations for all functions.
Revision 1.129: download - view: text, markup, annotated - select for diffs
Mon Aug 4 02:34:40 2008 UTC (3 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +7 -0 lines
SVN rev 181271 on 2008-08-04 02:34:40Z by yongari Don't enable TSO by default. Users of RTL8169/8110 reported watchdog timeout issues and the root cause seems to stem from silicon bug of controller. Personally I couldn't reproduce it on RTL8169 controller but it seems it's dependent on usage pattern. For newer PCIe based controllers I have no TSO complaints but turning off TSO would be more safe. Users who are sure that their controller works with TSO can still reenable the TSO with ifconfig(8). Reported by: Oliver Lehmann (lehmann at ans-netz dot de), Eugene Butusov (ebutusov at gmail dot com)
Revision 1.128: download - view: text, markup, annotated - select for diffs
Mon Aug 4 02:05:09 2008 UTC (3 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +18 -0 lines
SVN rev 181270 on 2008-08-04 02:05:09Z by yongari The number of bits reserved for MSS in RealTek controllers is 11bits. This limits the maximum interface MTU size in TSO case as upper stack should not generate TCP segments with MSS greater than the limit. Armed with this information, disable TSO if interface MTU is greater than the limit.
Revision 1.95.2.31: download - view: text, markup, annotated - select for diffs
Tue Jul 15 02:10:23 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.30: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.30: +8 -1 lines
SVN rev 180531 on 2008-07-15 02:10:23Z by yongari MFC r180377. Add driver support for RTL8102E and RTL8102EL which is the second generation of RTL810x PCIe fast ethernet controller. Note, Tx/Rx descriptor format is different from that of first generation of RTL8101E series. Jumbo frame is not supported for RTL810x family.
Revision 1.95.2.30: download - view: text, markup, annotated - select for diffs
Tue Jul 15 02:07:17 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.29: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.29: +2 -1 lines
SVN rev 180530 on 2008-07-15 02:07:17Z by yongari MFC r180376. Disable jumbo frame support for RTL810x fast ethernet controllers.
Revision 1.95.2.29: download - view: text, markup, annotated - select for diffs
Tue Jul 15 02:01:03 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.28: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.28: +3 -1 lines
SVN rev 180528 on 2008-07-15 02:01:03Z by yongari MFC r180177. Add a new RTL8169 variant, 8169SB(L)/8110SB(L).
Revision 1.95.2.28: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:58:17 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.27: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.27: +134 -43 lines
SVN rev 180527 on 2008-07-15 01:58:17Z by yongari MFC r180176. Add basic support for RTL8168C, RTL8168CP, RTL8111C and RTL8111CP. ATM Tx/Rx checksum offload is supported but TSO and jumbo frame is not yet supported. Because these newer controllers use different descriptor formats, a flag RL_FLAG_DESCV2 flag was introduced to handle that case in Tx/Rx handler. Also newer controllers seems to require to not touch 'enable Tx/Rx bit' in RL_CPLUS_CMD register so don't blindly try to set that bits. Note, it seems that there is still power-saving related issue where driver fails to attach PHY. Rebooting seems to fix that issue but number of required reboots varys. Many thanks to users that helped during developement. I really appreciate their patient and test/feedbacks.
Revision 1.95.2.27: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:54:53 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.26: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.26: +5 -2 lines
SVN rev 180526 on 2008-07-15 01:54:53Z by yongari MFC r180175. Display detected chip revision in device attach. This will help to diagnose revision specific issues in future. Also add 0x to notify that the revision number is in hex form.
Revision 1.95.2.26: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:51:30 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.25: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.25: +11 -0 lines
SVN rev 180525 on 2008-07-15 01:51:30Z by yongari MFC r180174. If MSI is not active make sure to disable MSI in EEPROM.
Revision 1.95.2.25: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:48:19 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.24: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.24: +4 -4 lines
SVN rev 180524 on 2008-07-15 01:48:19Z by yongari MFC r180173. In device detach don't access ifnet structure unless device is attached. This fixes NULL pointer dereference when polling(9) is active and unsupported hardware is detected in device attach.
Revision 1.95.2.24: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:38:41 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.23: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.23: +1 -1 lines
SVN rev 180523 on 2008-07-15 01:38:41Z by yongari MFC r180172. Toggling IFF_ALLMULTI flag does not require full interface reintialization.
Revision 1.95.2.23: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:23:02 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.22: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.22: +41 -47 lines
SVN rev 180520 on 2008-07-15 01:23:02Z by yongari MFC r180171. Instead of allocating variables for each events/hardware flags, use a dedicated flag that represents controller capabilities/events. This will simplify many part of code that requires different workaround for each controller revisions and will enhance readability. While I'm here move PHY wakeup code up before mii_phy_probe() which seems to help to wake PHY in some cases.
Revision 1.95.2.22: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:18:15 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.21: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.21: +21 -21 lines
SVN rev 180519 on 2008-07-15 01:18:15Z by yongari MFC r180169. Switch to memory space register mapping over IO space. If that mapping fails fall back to traditional IO space access.
Revision 1.95.2.21: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:14:36 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.20: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.20: +3 -3 lines
SVN rev 180518 on 2008-07-15 01:14:36Z by yongari MFC r180168. While accessing EEPROM command register use pre-defined constant instead of hardcoded value.
Revision 1.95.2.20: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:11:08 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.19: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.19: +18 -32 lines
SVN rev 180517 on 2008-07-15 01:11:08Z by yongari MFC r180167. After the change of r176757 re(4) no longer relys on reading RL_TXCFG register to identify a device in device probe. Reflect the fact by modifing device description with general ethernet controller family. Note, rl_basetype in struct rl_type is not used and the more detailed information is provided with rl_hwrev structure.
Revision 1.95.2.19: download - view: text, markup, annotated - select for diffs
Tue Jul 15 01:07:08 2008 UTC (3 years, 6 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.18: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.18: +0 -5 lines
SVN rev 180516 on 2008-07-15 01:07:08Z by yongari MFC r180166. Remove duplicated H/W revision check.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Jul 9 01:58:18 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +8 -1 lines
SVN rev 180377 on 2008-07-09 01:58:18Z by yongari Add driver support for RTL8102E and RTL8102EL which is the second generation of RTL810x PCIe fast ethernet controller. Note, Tx/Rx descriptor format is different from that of first generation of RTL8101E series. Jumbo frame is not supported for RTL810x family. Tested by: NAGATA Shinya ( maya AT negeta DOT com )
Revision 1.126: download - view: text, markup, annotated - select for diffs
Wed Jul 9 01:44:06 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +2 -1 lines
SVN rev 180376 on 2008-07-09 01:44:06Z by yongari Disable jumbo frame support for RTL810x fast ethernet controllers.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Wed Jul 2 08:00:14 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +3 -1 lines
SVN rev 180177 on 2008-07-02 08:00:14Z by yongari Add a new RTL8169 variant, 8169SB(L)/8110SB(L). Reported by: nork Tested by: nork
Revision 1.124: download - view: text, markup, annotated - select for diffs
Wed Jul 2 07:54:53 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +134 -43 lines
SVN rev 180176 on 2008-07-02 07:54:53Z by yongari Add basic support for RTL8168C, RTL8168CP, RTL8111C and RTL8111CP. ATM Tx/Rx checksum offload is supported but TSO and jumbo frame is not yet supported. Because these newer controllers use different descriptor formats, a flag RL_FLAG_DESCV2 flag was introduced to handle that case in Tx/Rx handler. Also newer controllers seems to require to not touch 'enable Tx/Rx bit' in RL_CPLUS_CMD register so don't blindly try to set that bits. Note, it seems that there is still power-saving related issue where driver fails to attach PHY. Rebooting seems to fix that issue but number of required reboots varys. Many thanks to users that helped during developement. I really appreciate their patient and test/feedbacks.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Jul 2 06:55:03 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +5 -2 lines
SVN rev 180175 on 2008-07-02 06:55:03Z by yongari Display detected chip revision in device attach. This will help to diagnose revision specific issues in future. Also add 0x to notify that the revision number is in hex form.
Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Jul 2 06:45:59 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +11 -0 lines
SVN rev 180174 on 2008-07-02 06:45:59Z by yongari If MSI is not active make sure to disable MSI in EEPROM.
Revision 1.121: download - view: text, markup, annotated - select for diffs
Wed Jul 2 06:41:46 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +4 -4 lines
SVN rev 180173 on 2008-07-02 06:41:46Z by yongari In device detach don't access ifnet structure unless device is attached. This fixes NULL pointer dereference when polling(9) is active and unsupported hardware is detected in device attach.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Wed Jul 2 06:34:02 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +1 -1 lines
SVN rev 180172 on 2008-07-02 06:34:02Z by yongari Toggling IFF_ALLMULTI flag does not require full interface reintialization.
Revision 1.119: download - view: text, markup, annotated - select for diffs
Wed Jul 2 06:29:43 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +41 -47 lines
SVN rev 180171 on 2008-07-02 06:29:43Z by yongari Instead of allocating variables for each events/hardware flags, use a dedicated flag that represents controller capabilities/events. This will simplify many part of code that requires different workaround for each controller revisions and will enhance readability. While I'm here move PHY wakeup code up before mii_phy_probe() which seems to help to wake PHY in some cases.
Revision 1.118: download - view: text, markup, annotated - select for diffs
Wed Jul 2 05:21:09 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +21 -21 lines
SVN rev 180169 on 2008-07-02 05:21:09Z by yongari Switch to memory space register mapping over IO space. If that mapping fails fall back to traditional IO space access.
Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed Jul 2 05:01:19 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -3 lines
SVN rev 180168 on 2008-07-02 05:01:19Z by yongari While accessing EEPROM command register use pre-defined constant instead of hardcoded value.
Revision 1.116: download - view: text, markup, annotated - select for diffs
Wed Jul 2 04:55:39 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +18 -32 lines
SVN rev 180167 on 2008-07-02 04:55:39Z by yongari After the change of r176757 re(4) no longer relys on reading RL_TXCFG register to identify a device in device probe. Reflect the fact by modifing device description with general ethernet controller family. Note, rl_basetype in struct rl_type is not used and the more detailed information is provided with rl_hwrev structure.
Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Jul 2 04:27:36 2008 UTC (3 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +0 -5 lines
SVN rev 180166 on 2008-07-02 04:27:36Z by yongari Remove duplicated H/W revision check.
Revision 1.95.2.18: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:14:56 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.17: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.17: +6 -12 lines
MFC if_re.c 1.114 to RELENG_7. Don't touch MSI enable bit in RL_CFG2 register. For unknown reason clearing MSI enable bit for MSI capable hardwares resulted in Tx problems. MSI enable bit is set only when MSI is requested from user.
Revision 1.95.2.17: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:13:05 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.16: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.16: +1 -1 lines
MFC if_re.c 1.113, if_rlreg.h 1.74 to RELENG_7. Padding more bytes than necessary one broke another variants of PCIe RealTek chips. Only pad IP packets if the payload is less than 28 bytes.
Revision 1.95.2.16: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:09:57 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.15: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.15: +15 -13 lines
MFC if_re.c 1.112 to RELENG_7. In revision 1.70, 1.71 and 1.84 re(4) tried to workaround checksum offload bugs by manual padding for short IP/UDP frames. Unfortunately it seems that these workaround does not work reliably on newer PCIe variants of RealTek chips. To workaround the hardware bug, always pad short frames if Tx IP checksum offload is requested. It seems that the hardware has a bug in IP checksum offload handling. NetBSD manually pads short frames only when the length of IP frame is less than 28 bytes but I chose 60 bytes to safety. Also unconditionally set IP checksum offload bit in Tx descriptor if any TCP or UDP checksum offload is requested. This is the same way as Linux does but it's not mentioned in data sheet.
Revision 1.95.2.15: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:07:59 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.14: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.14: +1 -1 lines
MFC if_re.c 1.111 to RELENG_7. MSI handling on some RealTek chips are broken so disable it by default.
Revision 1.95.2.14: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:05:46 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.13: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.13: +13 -0 lines
MFC if_re.c 1.110, if_rlreg.h 1.73 to RELENG_7. For MSI capable hardwares, enable MSI enable bit in RL_CFG2 register. If MSI was disabled by hw.re.msi_disable tunable expliclty clear the MSI enable bit.
Revision 1.95.2.13: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:02:20 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.12: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.12: +6 -1 lines
MFC if_re.c 1.109 to RELENG_7. Some RealTek chips are known to be buggy on DAC handling, so disable DAC by default.
Revision 1.95.2.12: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:00:34 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.11: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.11: +13 -11 lines
MFC if_re.c 1.108 to RELENG_7. VLAN hardware tag information should be set for all desciptors of a multi-descriptor transmission attempt. Datasheet said nothing about this requirements. This should fix a long-standing VLAN hardware tagging issues with re(4).
Revision 1.95.2.11: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:58:44 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.10: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.10: +8 -3 lines
MFC if_re.c 1.107 to RELENG_7. Always honor configured VLAN/checksum offload capabilities. Previously re(4) used to blindly enable VLAN hardware tag stripping and Rx checksum offload regardless of enabled optional features of interface.
Revision 1.95.2.10: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:56:15 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.9: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.9: +32 -41 lines
MFC if_re.c 1.106, if_rl.c 1.173 to RELENG_7. Don't map memory/IO resource in device probe and just use PCI vendor/revision/sub device id of the hardware to probe it. This is the same way as NetBSD does and it enhances readabilty a lot.
Revision 1.95.2.9: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:51:40 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.8: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.8: +11 -3 lines
MFC if_re.c 1.105, if_rlreg.h 1.72 to RELENG_7. Don't allow jumbo frame on 8139C+ controller. While I'm here add a check for minimal MTU length.
Revision 1.95.2.8: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:49:11 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.7: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.7: +108 -0 lines
MFC if_re.c 1.104, if_rlreg.h 1.71 to RELENG_7. Implement WOL.
Revision 1.95.2.7: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:44:51 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.6: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.6: +1 -91 lines
MFC if_re.c 1.103 to RELENG_7. - Retire re_defrag() and use m_collapse() instead.
Revision 1.95.2.6: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:41:29 2008 UTC (3 years, 9 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.5: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.5: +483 -359 lines
MFC if_re.c 1.101, if_re.c 1.102, if_rlreg.h 1.70 to RELENG_7. Overhaul re(4). o Increased number of Rx/Tx descriptors to 256 for 8169 GigEs because it's hard to push the hardware to the limit with default 64 descriptors. TSO requires large number of Tx descriptors to pass a full sized TCP segment(65535 bytes IP packet) to hardware. Previously it consumed 32 Tx descriptors, assuming MCLBYTES DMA segment size, to send the TCP segment which means re(4) couldn't queue more than two full sized IP packets. For 8139C+ it still uses 64 Rx/Tx descriptors due to its hardware limitations. With this changes there are (very) small waste of memory for 8139C+ users but I don't think it would affect 8139C+ users for most cases. o Various bus_dma(9) fixes. - The hardware supports DAC so allow 64bit DMA operations. - Removed BUS_DMA_ALLOC_NOW flag. - Increased DMA segment size to 4096 from MCLBYTES because TSO consumes too many descriptors with MCLBYTES DMA segment size. - Tx/Rx side bus_dmamap_load_mbuf_sg(9) support. With these changes the code is more readable than previous one and got a (slightly) better performance as it doesn't need to pass/ decode arguments to/from callback function. - Removed unnecessary callback function re_dmamap_desc() and nuked rl_dmaload_arg structure which was used in the callback. - Additional protection for DMA map load failure. In case of failure reuse current map instead of returning a bogus DMA map. - Deferred DMA map unloading/sync operation for maximum performance until we really need to load new DMA map. If we happen to reuse current map(e.g. input error) there is no need to sync/unload/load again. - The number of allowable Tx DMA segments for a mbuf chains are now 32 instead of magic nseg value. If the number of available Tx descriptors are short enough to send highly fragmented mbuf chains an optimized re_defrag() is called to collapse mbuf chains which is supposed to be much faster than m_defrag(9). re_defrag() was borrowed from ath(4). - Separated Rx/Tx DMA tag from a common DMA tag such that Rx DMA tag correctly uses DMA maps that were created with DMA alignment restriction(8bytes alignments). Tx DMA tag does not have such alignment limitation. - Added additional sanity checks for DMA ring map load failure. - Added additional spare Rx DMA map for graceful handling of Rx DMA map load failure. - Fixed misused bus_dmamap_sync(9) and added missing bus_dmamap_sync(9) in re_encap()/re_txeof()/re_rxeof(). o Enabled TSO again as re(4) have reasonable number of Tx descriptors. o Don't touch DMA address of a Tx descriptor in re_txeof(). It's not needed. o Fix incorrect update of if_ierrors counter. For Rx buffer shortage it should update if_qdrops as the buffer is reused. o Added checks for unsupported H/W revisions and return ENXIO for these hardwares. This is required to remove resource allocation code in re_probe as other drivers do in device probe routine. o Modified descriptor index manipulation macros as it's now possible to have different number of descriptors for Rx/Tx. o In re_start, to save a lock operation, use IFQ_DRV_IS_EMPTY before trying to invoke IFQ_DRV_DEQUEUE. Also don't blindly call re_encap since we already know the number of available Tx descriptors in advance. o Removed RL_TX_DESC_THLD which was used to reserve RL_TX_DESC_THLD descriptors in Tx path. There is no such a limitation mentioned in 8139C+/8169/8110/8168/8101/8111 datasheet and it seems to work ok without reserving RL_TX_DESC_THLD descriptors. o Fix a comment for RL_GTXSTART. The register is 8bits register. o Added comments for 8169/8139C+ hardware restrictions on descriptors. o Removed forward declaration for "struct rl_softc", it's not needed. o Added a new structure rl_txdesc for Tx descriptor managements and a structure rl_rxdesc for Rx descriptor managements. o Removed unused member variable rl_intlock in driver softc. There are still several unused member variables which are supposed to be used to access hardware statistics counters. But it seems that accessing hardware counters were not implemented yet.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Tue Apr 15 00:46:15 2008 UTC (3 years, 9 months ago) by yongari
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +6 -12 lines
Don't touch MSI enable bit in RL_CFG2 register. For unknown reason clearing MSI enable bit for MSI capable hardwares resulted in Tx problems. MSI enable bit is set only when MSI is requested from user. Tested by: remko
Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Mar 31 04:03:14 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +1 -1 lines
Padding more bytes than necessary one broke another variants of PCIe RealTek chips. Only pad IP packets if the payload is less than 28 bytes. Obtained from: NetBSD PR: kern/122221
Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Mar 28 01:21:21 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +15 -13 lines
In revision 1.70, 1.71 and 1.84 re(4) tried to workaround checksum offload bugs by manual padding for short IP/UDP frames. Unfortunately it seems that these workaround does not work reliably on newer PCIe variants of RealTek chips. To workaround the hardware bug, always pad short frames if Tx IP checksum offload is requested. It seems that the hardware has a bug in IP checksum offload handling. NetBSD manually pads short frames only when the length of IP frame is less than 28 bytes but I chose 60 bytes to safety. Also unconditionally set IP checksum offload bit in Tx descriptor if any TCP or UDP checksum offload is requested. This is the same way as Linux does but it's not mentioned in data sheet. Obtained from: NetBSD Tested by: remko, danger
Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Mar 23 05:35:18 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +1 -1 lines
MSI handling on some RealTek chips are broken so disable it by default. Reported by: Giulio Ferro ( auryn AT zirakzigil DOT org ) Tested by: Giulio Ferro ( auryn AT zirakzigil DOT org )
Revision 1.110: download - view: text, markup, annotated - select for diffs
Sun Mar 23 05:31:35 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +13 -0 lines
For MSI capable hardwares, enable MSI enable bit in RL_CFG2 register. If MSI was disabled by hw.re.msi_disable tunable expliclty clear the MSI enable bit.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Sun Mar 23 05:13:45 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +6 -1 lines
Some RealTek chips are known to be buggy on DAC handling, so disable DAC by default.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Mar 23 05:06:16 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +13 -11 lines
VLAN hardware tag information should be set for all desciptors of a multi-descriptor transmission attempt. Datasheet said nothing about this requirements. This should fix a long-standing VLAN hardware tagging issues with re(4). Reported by: Giulio Ferro ( auryn AT zirakzigil DOT org ) Tested by: Giulio Ferro ( auryn AT zirakzigil DOT org )
Revision 1.107: download - view: text, markup, annotated - select for diffs
Sun Mar 23 04:59:13 2008 UTC (3 years, 10 months ago) by yongari
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +8 -3 lines
Always honor configured VLAN/checksum offload capabilities. Previously re(4) used to blindly enable VLAN hardware tag stripping and Rx checksum offload regardless of enabled optional features of interface.
Revision 1.95.2.5: download - view: text, markup, annotated - select for diffs
Thu Mar 13 07:50:47 2008 UTC (3 years, 10 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.4: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.4: +4 -2 lines
MFC: Fix function prototype for device_shutdown method.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Mon Mar 3 04:15:07 2008 UTC (3 years, 11 months ago) by yongari
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +32 -41 lines
Don't map memory/IO resource in device probe and just use PCI vendor/revision/sub device id of the hardware to probe it. This is the same way as NetBSD does and it enhances readabilty a lot.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Mon Mar 3 03:41:06 2008 UTC (3 years, 11 months ago) by yongari
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +11 -3 lines
Don't allow jumbo frame on 8139C+ controller. While I'm here add a check for minimal MTU length.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Mon Mar 3 03:33:57 2008 UTC (3 years, 11 months ago) by yongari
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +108 -0 lines
Implement WOL. Tested by: Fabian Keil ( freebsd-listen AT fabienkeli DOT de )
Revision 1.46.2.39: download - view: text, markup, annotated - select for diffs
Sun Mar 2 14:54:48 2008 UTC (3 years, 11 months ago) by rwatson
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.46.2.38: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.38: +6 -0 lines
Conditionally acquire Giant based on debug.mpsafenet around entry points from if_re taskqueue and other potentially Giant-free spots. If we don't do this, Giant may not be held entering KAME IPSEC, etc. This problem appeared in FreeBSD 6.2 as a result of a move to fast interrupts, and does not exist in 7.x due to not having debug.mpsafenet. PR: 118719 Reported by: Dan Lukes <dan at obluda dot cz> Reviwed by: yongari
Revision 1.46.2.38: download - view: text, markup, annotated - select for diffs
Sun Feb 3 05:20:26 2008 UTC (4 years ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.37: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.37: +6 -2 lines
MFC if_re.c, rev 1.100 to RELENG_6 By definition promiscuous mode should see all unicast frames as well as multicast/broadcast frames. Previously re(4) ignored multicast frames in promiscuous mode. The RTL8169 datasheet was not clear how it handles multicast frames in promiscuous mode. PR: kern/118572
Revision 1.95.2.4: download - view: text, markup, annotated - select for diffs
Sun Feb 3 05:18:14 2008 UTC (4 years ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.3: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.3: +6 -2 lines
MFC if_re.c, rev 1.100 to RELENG_7 By definition promiscuous mode should see all unicast frames as well as multicast/broadcast frames. Previously re(4) ignored multicast frames in promiscuous mode. The RTL8169 datasheet was not clear how it handles multicast frames in promiscuous mode. PR: kern/118572
Revision 1.46.2.37: download - view: text, markup, annotated - select for diffs
Sun Feb 3 05:13:40 2008 UTC (4 years ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.36: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.36: +13 -3 lines
MFC if_re.c rev 1.99, if_rlreg.h rev 1.69 to RELENG_6. Add another RTL8168 revision 3 which is found on RTL8111-GR Gigabit Ethernet Controller.
Revision 1.103: download - view: text, markup, annotated - select for diffs
Thu Jan 17 23:37:47 2008 UTC (4 years ago) by jhb
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +1 -91 lines
- Retire npe_defrag(), gem_defrag(), msk_defrag(), nfe_defrag(), and re_defrag() and use m_collapse() instead. - Replace a reference to ath_defrag() in a comment in if_wpi.c with m_collapse().
Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Jan 15 03:47:24 2008 UTC (4 years ago) by yongari
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +1 -1 lines
Fix build.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Tue Jan 15 01:10:31 2008 UTC (4 years ago) by yongari
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +483 -359 lines
Overhaul re(4). o Increased number of Rx/Tx descriptors to 256 for 8169 GigEs because it's hard to push the hardware to the limit with default 64 descriptors. TSO requires large number of Tx descriptors to pass a full sized TCP segment(65535 bytes IP packet) to hardware. Previously it consumed 32 Tx descriptors, assuming MCLBYTES DMA segment size, to send the TCP segment which means re(4) couldn't queue more than two full sized IP packets. For 8139C+ it still uses 64 Rx/Tx descriptors due to its hardware limitations. With this changes there are (very) small waste of memory for 8139C+ users but I don't think it would affect 8139C+ users for most cases. o Various bus_dma(9) fixes. - The hardware supports DAC so allow 64bit DMA operations. - Removed BUS_DMA_ALLOC_NOW flag. - Increased DMA segment size to 4096 from MCLBYTES because TSO consumes too many descriptors with MCLBYTES DMA segment size. - Tx/Rx side bus_dmamap_load_mbuf_sg(9) support. With these changes the code is more readable than previous one and got a (slightly) better performance as it doesn't need to pass/ decode arguments to/from callback function. - Removed unnecessary callback function re_dmamap_desc() and nuked rl_dmaload_arg structure which was used in the callback. - Additional protection for DMA map load failure. In case of failure reuse current map instead of returning a bogus DMA map. - Deferred DMA map unloading/sync operation for maximum performance until we really need to load new DMA map. If we happen to reuse current map(e.g. input error) there is no need to sync/unload/load again. - The number of allowable Tx DMA segments for a mbuf chains are now 32 instead of magic nseg value. If the number of available Tx descriptors are short enough to send highly fragmented mbuf chains an optimized re_defrag() is called to collapse mbuf chains which is supposed to be much faster than m_defrag(9). re_defrag() was borrowed from ath(4). - Separated Rx/Tx DMA tag from a common DMA tag such that Rx DMA tag correctly uses DMA maps that were created with DMA alignment restriction(8bytes alignments). Tx DMA tag does not have such alignment limitation. - Added additional sanity checks for DMA ring map load failure. - Added additional spare Rx DMA map for graceful handling of Rx DMA map load failure. - Fixed misused bus_dmamap_sync(9) and added missing bus_dmamap_sync(9) in re_encap()/re_txeof()/re_rxeof(). o Enabled TSO again as re(4) have reasonable number of Tx descriptors. o Don't touch DMA address of a Tx descriptor in re_txeof(). It's not needed. o Fix incorrect update of if_ierrors counter. For Rx buffer shortage it should update if_qdrops as the buffer is reused. o Added checks for unsupported H/W revisions and return ENXIO for these hardwares. This is required to remove resource allocation code in re_probe as other drivers do in device probe routine. o Modified descriptor index manipulation macros as it's now possible to have different number of descriptors for Rx/Tx. o In re_start, to save a lock operation, use IFQ_DRV_IS_EMPTY before trying to invoke IFQ_DRV_DEQUEUE. Also don't blindly call re_encap since we already know the number of available Tx descriptors in advance. o Removed RL_TX_DESC_THLD which was used to reserve RL_TX_DESC_THLD descriptors in Tx path. There is no such a limitation mentioned in 8139C+/8169/8110/8168/8101/8111 datasheet and it seems to work ok without reserving RL_TX_DESC_THLD descriptors. o Fix a comment for RL_GTXSTART. The register is 8bits register. o Added comments for 8169/8139C+ hardware restrictions on descriptors. o Removed forward declaration for "struct rl_softc", it's not needed. o Added a new structure rl_txdesc for Tx descriptor managements and a structure rl_rxdesc for Rx descriptor managements. o Removed unused member variable rl_intlock in driver softc. There are still several unused member variables which are supposed to be used to access hardware statistics counters. But it seems that accessing hardware counters were not implemented yet.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Thu Dec 20 07:26:20 2007 UTC (4 years, 1 month ago) by yongari
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +6 -2 lines
By definition promiscuous mode should see all unicast frames as well as multicast/broadcast frames. Previously re(4) ignored multicast frames in promiscuous mode. The RTL8169 datasheet was not clear how it handles multicast frames in promiscuous mode. PR: kern/118572 MFC after: 3 days
Revision 1.95.2.3: download - view: text, markup, annotated - select for diffs
Sat Dec 15 02:57:18 2007 UTC (4 years, 1 month ago) by yongari
Branches: RELENG_7
CVS tags: RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Diff to: previous 1.95.2.2: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.2: +13 -3 lines
MFC if_re.c rev 1.99, if_rlreg.h rev 1.69 to RELENG_7 Add another RTL8168 revision 3 which is found on RTL8111-GR Gigabit Ethernet Controller. Requested by: delphij Approved by: re (kensmith)
Revision 1.99: download - view: text, markup, annotated - select for diffs
Sat Dec 8 00:14:09 2007 UTC (4 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +13 -3 lines
Add another RTL8168 revision 3 which is found on RTL8111-GR Gigabit Ethernet Controller. Multicast filtering wasn't tested and needs more expore. While I'm here change complex if statements with switch statement which would improve readability. Reported by: Abdullah Ibn Hamad Al-Marri < wearabnet AT yahoo DOT ca > Tested by: Abdullah Ibn Hamad Al-Marri < wearabnet AT yahoo DOT ca >
Revision 1.46.2.35.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 6 06:02:43 2007 UTC (4 years, 2 months ago) by yongari
Branches: RELENG_6_3
CVS tags: RELENG_6_3_0_RELEASE
Diff to: previous 1.46.2.35: preferred, colored; next MAIN 1.46.2.36: preferred, colored
Changes since revision 1.46.2.35: +6 -2 lines
MFC if_re.c, rev 1.98 to RELENG_6_3 Always honor promiscuous flag prior to programming Rx multicast filter. This fixes a regression introduced in rev 1.89. PR: 114632 Approved by: re (kensmith)
Revision 1.46.2.36: download - view: text, markup, annotated - select for diffs
Thu Dec 6 06:01:47 2007 UTC (4 years, 2 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.35: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.35: +6 -2 lines
MFC if_re.c, rev 1.98 to RELENG_6 Always honor promiscuous flag prior to programming Rx multicast filter. This fixes a regression introduced in rev 1.89. PR: 114632
Revision 1.95.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 6 06:00:58 2007 UTC (4 years, 2 months ago) by yongari
Branches: RELENG_7
Diff to: previous 1.95.2.1: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.2.1: +6 -2 lines
MFC if_re.c, rev 1.98 to RELENG_7 Always honor promiscuous flag prior to programming Rx multicast filter. This fixes a regression introduced in rev 1.89. PR: 114632 Approved by: re (kensmith)
Revision 1.98: download - view: text, markup, annotated - select for diffs
Mon Dec 3 01:28:08 2007 UTC (4 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +6 -2 lines
Always honor promiscuous flag prior to programming Rx multicast filter. This fixes a regression introduced in rev 1.89. PR: 114632 MFC after: 3 days
Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Nov 22 02:44:59 2007 UTC (4 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +4 -2 lines
Fix function prototype for device_shutdown method.
Revision 1.95.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 15 17:45:46 2007 UTC (4 years, 2 months ago) by remko
Branches: RELENG_7
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +2 -0 lines
MFC rev 1.96 if_re.c Add support for D-Link DGE-528(T) Rev.B1 PR: 112774 Submitted by: Denis Fortin <fortin at acm dot org> Approved by: imp (mentor), yongari MFC After: 3 days Approved by: imp (mentor, implicit) Approved by: re (kensmith)
Revision 1.46.2.35: download - view: text, markup, annotated - select for diffs
Thu Nov 15 07:10:04 2007 UTC (4 years, 2 months ago) by remko
Branches: RELENG_6
CVS tags: RELENG_6_3_BP
Branch point for: RELENG_6_3
Diff to: previous 1.46.2.34: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.34: +2 -0 lines
MFC rev 1.96 if_re.c Add support for D-Link DGE-528(T) Rev.B1 PR: 112774 Submitted by: Denis Fortin <fortin at acm dot org> Approved by: imp (mentor), yongari MFC After: 3 days Approved by: imp (mentor, implicit)
Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon Nov 12 15:44:00 2007 UTC (4 years, 2 months ago) by remko
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +2 -0 lines
Add support for D-Link DGE-528(T) Rev.B1 PR: 112774 Submitted by: Denis Fortin <fortin at acm dot org> Approved by: imp (mentor), yongari MFC After: 3 days
Revision 1.46.2.34: download - view: text, markup, annotated - select for diffs
Thu Oct 4 11:28:25 2007 UTC (4 years, 4 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.33: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.33: +22 -0 lines
MFC if_re.c rev. 1.95 to RELENG_6. Make sure to take PHY out of power down mode in device attach. Without this the PHY wouldn't work as expected. This should fix dual-boot Windows XP machine where RealTek Windows drivers put the PHY in power down mode during shutdown. The magic PHY register accesses come from RealTek driver. No datasheets mention the magic PHY registers. In general, the PHY wakeup code should go into PHY driver. However it seems that it only apply to RTL8169S single chip and it would be another hack if we have rgephy(4) check what parent driver/chip model is attached.
Revision 1.46.2.33: download - view: text, markup, annotated - select for diffs
Sat Sep 15 09:52:19 2007 UTC (4 years, 4 months ago) by marius
Branches: RELENG_6
Diff to: previous 1.46.2.32: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.32: +24 -9 lines
MFC: if_re.c 1.77, 1.86, 1.94 - Correctly set IFCAP_VLAN_HWCSUM as re(4) can do VLAN tagging/checksum offloading in hardware. - Correctly set media header length for VLAN. - Use taskqueue_drain() to wait for any pending tasks to complete rather than just pausing for a second. - Initialize the rl_vlanctl field of the descriptors to zero (in order to clear RL_TDESC_VLANCTL_TAG).
Revision 1.95: download - view: text, markup, annotated - select for diffs
Tue Aug 14 02:00:04 2007 UTC (4 years, 5 months ago) by yongari
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +22 -0 lines
Make sure to take PHY out of power down mode in device attach. Without this the PHY wouldn't work as expected. This should fix dual-boot Windows XP machine where RealTek Windows drivers put the PHY in power down mode during shutdown. The magic PHY register accesses come from RealTek driver. No datasheets mention the magic PHY registers. In general, the PHY wakeup code should go into PHY driver. However it seems that it only apply to RTL8169S single chip and it would be another hack if we have rgephy(4) check what parent driver/chip model is attached. Reported by: lofi, Laurens Timmermans ( laurens AT timkapel DOT nl ) Tested by: lofi Obtained from: RealTek FreeBSD driver Approved by: re (Ken Smith)
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Aug 5 11:20:33 2007 UTC (4 years, 6 months ago) by marius
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +1 -0 lines
Initialize the rl_vlanctl field of the descriptors to zero (in order to clear RL_TDESC_VLANCTL_TAG). This fixes sending packets in the native VLAN when running both tagged and an untagged VLAN over the same trunk and descriptors are recycled. Approved by: re (kensmith) MFC after: 1 week
Revision 1.93: download - view: text, markup, annotated - select for diffs
Fri Jul 27 00:43:12 2007 UTC (4 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +2 -2 lines
style(9) Pointed out by: cnst Approved by: re (kensmith)
Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue Jul 24 01:24:02 2007 UTC (4 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +80 -15 lines
Add MSI support. Ever since switching to adaptive polling re(4) occasionally spews watchdog timeouts on systems with MSI capability. This change is minimal one for supporting MSI and re(4) also needs MSIX support for RTL8111C in future. Because softc structure of re(4) is shared with rl(4), rl(4) was touched to use the modified softc. Reported by: cnst Tested by: cnst Approved by: re (kensmith)
Revision 1.46.2.32: download - view: text, markup, annotated - select for diffs
Sat Jul 14 20:25:20 2007 UTC (4 years, 6 months ago) by csjp
Branches: RELENG_6
Diff to: previous 1.46.2.31: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.31: +0 -0 lines
Doh.. This is a forced commit to note the actual commit for the previous commits: MFC 1.29 +1 -1 src/sys/dev/bce/if_bce.c MFC 1.22 +1 -1 src/sys/dev/ixgb/if_ixgb.c MFC 1.91 +1 -1 src/sys/dev/nge/if_nge.c MFC 1.87 +1 -1 src/sys/dev/re/if_re.c MFC 1.6 +1 -1 src/sys/dev/stge/if_stge.c MFC 1.44 +1 -1 src/sys/dev/txp/if_txp.c MFC 1.31 +1 -1 src/sys/dev/vge/if_vge.c Un-break processing of 802.1Q VLAN tags in the presence of hardware offload of VLAN tags.
Revision 1.46.2.31: download - view: text, markup, annotated - select for diffs
Sat Jul 14 20:22:17 2007 UTC (4 years, 6 months ago) by csjp
Branches: RELENG_6
Diff to: previous 1.46.2.30: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.30: +1 -1 lines
commit.log
Revision 1.46.2.30: download - view: text, markup, annotated - select for diffs
Fri Jul 13 04:46:33 2007 UTC (4 years, 6 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.29: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.29: +2 -2 lines
MFC if_re.c rev. 1.91, if_rlreg.h rev. 1.66 to RELENG_6. re(4) devices requires an external EEPROM. Depending on models it would be 93C46(1Kbit) or 93C56(2Kbit). One of differences between them is number of address lines required to access the EEPROM. For example, 93C56 EEPROM needs 8 address lines to read/write data. If 93C56 recevied premature end of required number of serial clock(CLK) to set OP code/address of EEPROM, the result would be unexpected behavior. Previously it tried to detect 93C46, which requires 6 address lines, and then assumed it would be 93C56 if read data was not expected value. However, this approach didn't work in some models/situations as 93C56 requries 8 address lines to access its data. In order to fix it, change EEPROM probing order such that 93C56 is detected reliably. While I'm here change hard-coded address line numbers with defined constant to enhance readability. PR: 112710
Revision 1.91: download - view: text, markup, annotated - select for diffs
Fri Jul 6 00:05:11 2007 UTC (4 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +2 -2 lines
re(4) devices requires an external EEPROM. Depending on models it would be 93C46(1Kbit) or 93C56(2Kbit). One of differences between them is number of address lines required to access the EEPROM. For example, 93C56 EEPROM needs 8 address lines to read/write data. If 93C56 recevied premature end of required number of serial clock(CLK) to set OP code/address of EEPROM, the result would be unexpected behavior. Previously it tried to detect 93C46, which requires 6 address lines, and then assumed it would be 93C56 if read data was not expected value. However, this approach didn't work in some models/situations as 93C56 requries 8 address lines to access its data. In order to fix it, change EEPROM probing order such that 93C56 is detected reliably. While I'm here change hard-coded address line numbers with defined constant to enhance readability. PR: 112710 Approved by: re (mux)
Revision 1.90: download - view: text, markup, annotated - select for diffs
Sat Jun 16 02:54:19 2007 UTC (4 years, 7 months ago) by yongari
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -2 lines
Disable TSO support. Without bus_dma clean up and increment of number of Tx descriptors it's hard to guarantee correct Tx operation in TSO case. The TSO support would be enabled again when I get more feeback from re(4) patch posted to current.
Revision 1.46.2.29: download - view: text, markup, annotated - select for diffs
Sun Jun 3 07:47:40 2007 UTC (4 years, 8 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.28: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.28: +6 -1 lines
MFC if_re.c, 1.84 to RELENG_6 The TCP checksum offload handling in the 8111B/8168B and 8101E PCIe can apparently be confused by short TCP segments that have been manually padded to the minimum ethernet frame size. The driver does short frame padding in software as a workaround for a bug in the 8169 PCI devices that causes short IP fragments to be corrupted due to an apparent conflict between the hardware autopadding and hardware IP checksumming. To fix this, we avoid software padding for short TCP segments, since the hardware seems to autopad and checksum these correctly (even the older 8169 NICs get these right). Short UDP packets appear to be handled correctly in all cases. This should work around the IP header checksum bug in the 8169 while not tripping the TCP checksum bug in the 8111B/8168B and 8101E. PR: 112089
Revision 1.46.2.28: download - view: text, markup, annotated - select for diffs
Sun Jun 3 07:43:15 2007 UTC (4 years, 8 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.27: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.27: +19 -2 lines
MFC if_re.c, 1.81 to RELENG_6 Fix re_setmulti() so that it works correctly for PCIe chips where the multicast hash table are in reverse order compared to older devices. PR: 112089
Revision 1.46.2.27: download - view: text, markup, annotated - select for diffs
Thu Apr 26 00:29:46 2007 UTC (4 years, 9 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.26: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.26: +12 -4 lines
MFC if_re.c, rev. 1.89 if_rlreg.h, rev 1.65 to RELENG_6. Don't reinitialize the hardware if only PROMISC flag was changed. Previously whenever PROMISC mode turned on/off link renegotiation occurs and it could resulted in network unavailability for serveral seconds.(Depending on switch STP settings it could last several tens seconds.)
Revision 1.89: download - view: text, markup, annotated - select for diffs
Wed Apr 18 00:40:43 2007 UTC (4 years, 9 months ago) by yongari
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +12 -4 lines
Don't reinitialize the hardware if only PROMISC flag was changed. Previously whenever PROMISC mode turned on/off link renegotiation occurs and it could resulted in network unavailability for serveral seconds.(Depending on switch STP settings it could last several tens seconds.) Reported by: Prokofiev S.P. < proks AT logos DOT uptel DOT net > Tested by: Prokofiev S.P. < proks AT logos DOT uptel DOT net >
Revision 1.46.2.26: download - view: text, markup, annotated - select for diffs
Wed Apr 11 17:12:38 2007 UTC (4 years, 10 months ago) by remko
Branches: RELENG_6
Diff to: previous 1.46.2.25: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.25: +2 -0 lines
MFC if_re.c rev 1.88 Add support for the RTL8110SC driver. PR: 110804 Submitted by: Daan Vreeken Sponsored by: Vitsch Electronics (patch) Approved by: imp (mentor) MFC After: 3 days Approved by: imp (mentor, implicit)
Revision 1.88: download - view: text, markup, annotated - select for diffs
Wed Mar 28 18:07:12 2007 UTC (4 years, 10 months ago) by remko
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +2 -0 lines
Add support for the RTL8110SC driver. PR: 110804 Submitted by: Daan Vreeken Sponsored by: Vitsch Electronics (patch) Approved by: imp (mentor) MFC After: 3 days
Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Mar 4 03:38:07 2007 UTC (4 years, 11 months ago) by csjp
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +1 -1 lines
Catch up the rest of the drivers with the ether_vlan_mtap modifications. If these drivers are setting M_VLANTAG because they are stripping the layer 2 802.1Q headers, then they need to be re-inserting them so any bpf(4) peers can properly decode them. It should be noted that this is compiled tested only. MFC after: 3 weeks
Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Feb 27 18:45:37 2007 UTC (4 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +2 -4 lines
Use taskqueue_drain() to wait for any pending tasks to complete rather than just pausing for a second.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri Feb 23 12:18:52 2007 UTC (4 years, 11 months ago) by piso
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -6 lines
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
Revision 1.46.2.25: download - view: text, markup, annotated - select for diffs
Fri Feb 2 00:48:55 2007 UTC (5 years ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.24: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.24: +1 -1 lines
MFC if_re.c rev 1.76 to RELENG_6. Don't set RL_CFG1_FULLDUPLEX bit. The RL_CFG1_FULLDUPLEX bit in config register 1 is only valid on 8129.
Revision 1.46.2.24: download - view: text, markup, annotated - select for diffs
Wed Jan 31 00:24:11 2007 UTC (5 years ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.23: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.23: +17 -15 lines
MFC if_re.c rev 1.83 to RELENG_6. It seems that enabling Tx and Rx before setting descriptor DMA addresses shall access invalid descriptor DMA addresses on PCIe hardwares and then panicked the system. To fix it set descriptor DMA addresses before enabling Tx and Rx such that hardware can see valid descriptor DMA addresses. Also set RL_EARLY_TX_THRESH before starting Tx and Rx.
Revision 1.46.2.23: download - view: text, markup, annotated - select for diffs
Tue Jan 30 14:16:24 2007 UTC (5 years ago) by marius
Branches: RELENG_6
Diff to: previous 1.46.2.22: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.22: +43 -47 lines
MFC: if_re.c 1.82, if_rlreg.h 1.64
o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
operation as it ran out of free descriptors or if there are too many
segments in the first place, call bus_dmamap_unload() in order to
unload the already loaded segments.
For trying to map the defragmented mbuf (chain) in re_encap() this
introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new
failure mode. Previously we just ignored this case, corrupting our
view of the TX ring.
o In re_txeof():
- Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX
descriptors. Further down the road re_encap() will bail if there
aren't at least 4 free TX descriptors, causing re_start() to
abort and prepend the dequeued mbuf again so it makes no sense
to pretend we could process mbufs again when in fact we won't.
While at it replace this magic 4 with a macro RL_TX_DESC_THLD
throughout this driver.
- Don't cancel the watchdog timeout as soon as there's at least one
free TX descriptor but instead only if all descriptors have been
handled. It's perfectly normal, especially in the DEVICE_POLLING
case, that re_txeof() is called when only a part of the enqueued
TX descriptors have been handled, causing the watchdog to be
disarmed prematurely.
o In re_encap():
- If m_defrag() fails just drop the packet like other NIC drivers
do. This should only happen when there's a mbuf shortage, in which
case it was possible to end up with an IFQ full of packets which
couldn't be processed as they couldn't be defragmented as they
were taking up all the mbufs themselves. This includes adjusting
re_start() to not trying to prepend the mbuf (chain) if re_encap()
has freed it.
- Remove dupe initialization of members of struct rl_dmaload_arg to
values that didn't change since trying to process the fragmented
mbuf chain.
While at it remove an unused member from struct rl_dmaload_arg.
o In re_start() remove a abandoned, banal comment. The corresponding
code was moved to re_attach() some time ago.
Revision 1.46.2.22: download - view: text, markup, annotated - select for diffs
Tue Jan 30 14:00:59 2007 UTC (5 years ago) by marius
Branches: RELENG_6
Diff to: previous 1.46.2.21: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.21: +23 -35 lines
MFC: if_re.c 1.80, if_rlreg.h 1.63 - Use the re_tick() callout instead of if_slowtimo() for driving re_watchdog() in order to avoid races accessing if_timer. - Use bus_get_dma_tag() so re(4) works on platforms requiring it; though for RELENG_6 this is a NOOP so far and just MFC'ed for diff reduction. - Remove invalid BUS_DMA_ALLOCNOW when creating the parent DMA tag and the tags that are used for static memory allocations. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. - Remove an unused variable in re_intr().
Revision 1.46.2.21: download - view: text, markup, annotated - select for diffs
Tue Jan 30 10:55:32 2007 UTC (5 years ago) by marius
Branches: RELENG_6
Diff to: previous 1.46.2.20: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.20: +23 -20 lines
MFC: 1.70 (partial), 1.74
- Sync descriptions of RL_HWREV_8168_SPIN{1,2} with HEAD (merge botch
of rev. 1.70 in rev. 1.46.2.17).
- Consistently use if_printf() only in interface methods: if_start(),
if_watchdog, etc., or in functions used only in these methods.
In all other functions in the driver use device_printf().
Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Jan 25 17:30:30 2007 UTC (5 years ago) by wpaul
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +6 -1 lines
The TCP checksum offload handling in the 8111B/8168B and 8101E PCIe can apparently be confused by short TCP segments that have been manually padded to the minimum ethernet frame size. The driver does short frame padding in software as a workaround for a bug in the 8169 PCI devices that causes short IP fragments to be corrupted due to an apparent conflict between the hardware autopadding and hardware IP checksumming. To fix this, we avoid software padding for short TCP segments, since the hardware seems to autopad and checksum these correctly (even the older 8169 NICs get these right). Short UDP packets appear to be handled correctly in all cases. This should work around the IP header checksum bug in the 8169 while not tripping the TCP checksum bug in the 8111B/8168B and 8101E.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Jan 23 00:44:12 2007 UTC (5 years ago) by yongari
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +17 -15 lines
It seems that enabling Tx and Rx before setting descriptor DMA addresses shall access invalid descriptor DMA addresses on PCIe hardwares and then panicked the system. To fix it set descriptor DMA addresses before enabling Tx and Rx such that hardware can see valid descriptor DMA addresses. Also set RL_EARLY_TX_THRESH before starting Tx and Rx. Reported by: steve.tell AT crashmail DOT de Tested by: steve.tell AT crashmail DOT de Obtained from: NetBSD MFC after: 1 week
Revision 1.82: download - view: text, markup, annotated - select for diffs
Tue Jan 16 20:35:23 2007 UTC (5 years ago) by marius
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +43 -47 lines
o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
operation as it ran out of free descriptors or if there are too many
segments in the first place, call bus_dmamap_unload() in order to
unload the already loaded segments.
For trying to map the defragmented mbuf (chain) in re_encap() this
introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new
failure mode. Previously we just ignored this case, corrupting our
view of the TX ring.
o In re_txeof():
- Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX
descriptors. Further down the road re_encap() will bail if there
aren't at least 4 free TX descriptors, causing re_start() to
abort and prepend the dequeued mbuf again so it makes no sense
to pretend we could process mbufs again when in fact we won't.
While at it replace this magic 4 with a macro RL_TX_DESC_THLD
throughout this driver.
- Don't cancel the watchdog timeout as soon as there's at least one
free TX descriptor but instead only if all descriptors have been
handled. It's perfectly normal, especially in the DEVICE_POLLING
case, that re_txeof() is called when only a part of the enqueued
TX descriptors have been handled, causing the watchdog to be
disarmed prematurely.
o In re_encap():
- If m_defrag() fails just drop the packet like other NIC drivers
do. This should only happen when there's a mbuf shortage, in which
case it was possible to end up with an IFQ full of packets which
couldn't be processed as they couldn't be defragmented as they
were taking up all the mbufs themselves. This includes adjusting
re_start() to not trying to prepend the mbuf (chain) if re_encap()
has freed it.
- Remove dupe initialization of members of struct rl_dmaload_arg to
values that didn't change since trying to process the fragmented
mbuf chain.
While at it remove an unused member from struct rl_dmaload_arg.
o In re_start() remove a abandoned, banal comment. The corresponding
code was moved to re_attach() some time ago.
With these changes re(4) now survives one day (until stopped) of
hammering out packets here.
Reviewed by: yongari
MFC after: 2 weeks
Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Jan 11 20:31:35 2007 UTC (5 years ago) by wpaul
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +19 -2 lines
Fix re_setmulti() so that it works correctly for PCIe chips where the multicast hash table are in reverse order compared to older devices.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Dec 20 02:13:59 2006 UTC (5 years, 1 month ago) by marius
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +23 -35 lines
- Use the re_tick() callout instead of if_slowtimo() for driving re_watchdog() in order to avoid races accessing if_timer. - Use bus_get_dma_tag() so re(4) works on platforms requiring it. - Remove invalid BUS_DMA_ALLOCNOW when creating the parent DMA tag and the tags that are used for static memory allocations. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. - Remove an unused variable in re_intr().
Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Nov 21 05:41:11 2006 UTC (5 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +1 -1 lines
Fix typo.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Tue Nov 21 04:40:30 2006 UTC (5 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +24 -10 lines
Add TSO support. Tested by: wilko, Pieter de Goeje < pieter AT degoeje DOT nl >
Revision 1.77: download - view: text, markup, annotated - select for diffs
Tue Nov 21 04:23:52 2006 UTC (5 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +17 -5 lines
o Correctly set IFCAP_VLAN_HWCSUM as re(4) can do VLAN tagging/checksum offloading in hardware. o Correctly set media header length for VLAN.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Nov 21 04:14:44 2006 UTC (5 years, 2 months ago) by yongari
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +1 -1 lines
Don't set RL_CFG1_FULLDUPLEX bit. The RL_CFG1_FULLDUPLEX bit in config register 1 is only valid on 8129.
Revision 1.46.2.20: download - view: text, markup, annotated - select for diffs
Thu Sep 21 11:08:28 2006 UTC (5 years, 4 months ago) by yongari
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.46.2.19: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.19: +8 -0 lines
MFC if_re.c 1.73 to RELENG_6. Make 8139C+ work again which was broken since rev 1.68. Ever since rev 1.68 re(4) checks the validity of link in re_start. But rlphy(4) got a garbled data due to a different bit layout used on 8139C+ and it couldn't report correct link state. To fix it, ignore BMCR_LOOP and BMCR_ISO bits which have different meanings on 8139C+. I think this also make dhclient(8) work on 8139C+. Approved by: re (mux)
Revision 1.75: download - view: text, markup, annotated - select for diffs
Sun Sep 17 13:33:28 2006 UTC (5 years, 4 months ago) by andre
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +6 -9 lines
Move ethernet VLAN tags from mtags to its own mbuf packet header field
m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf
signifies the presence and validity of its content.
Drivers that support hardware VLAN tag stripping fill in the received
VLAN tag (containing both vlan and priority information) into the
ether_vtag mbuf packet header field:
m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */
m->m_flags |= M_VLANTAG;
to mark the packet m with the specified VLAN tag.
On output the driver should check the mbuf for the M_VLANTAG flag to
see if a VLAN tag is present and valid:
if (m->m_flags & M_VLANTAG) {
... = m->m_pkthdr.ether_vtag; /* htons()? */
... pass tag to hardware ...
}
VLAN tags are stored in host byte order. Byte swapping may be necessary.
(Note: This driver conversion was mechanic and did not add or remove any
byte swapping in the drivers.)
Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag
memory allocation have to be done.
Reviewed by: thompsa, yar
Sponsored by: TCP/IP Optimization Fundraise 2005
Revision 1.74: download - view: text, markup, annotated - select for diffs
Fri Sep 15 15:16:12 2006 UTC (5 years, 4 months ago) by glebius
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +21 -18 lines
- Consistently use if_printf() only in interface methods: if_start(), if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name. Submitted by: Alex Lyashkov <umka sevcity.net>
Revision 1.73: download - view: text, markup, annotated - select for diffs
Fri Sep 8 00:58:02 2006 UTC (5 years, 5 months ago) by yongari
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +8 -0 lines
Make 8139C+ work again which was broken since rev 1.68. Ever since rev 1.68 re(4) checks the validity of link in re_start. But rlphy(4) got a garbled data due to a different bit layout used on 8139C+ and it couldn't report correct link state. To fix it, ignore BMCR_LOOP and BMCR_ISO bits which have different meanings on 8139C+. I think this also make dhclient(8) work on 8139C+. Reported by: Gerrit Kuehn <gerrit AT pmp DOT uni-hannover DOT de> Tested by: Gerrit Kuehn <gerrit AT pmp DOT uni-hannover DOT de>
Revision 1.46.2.19: download - view: text, markup, annotated - select for diffs
Mon Aug 7 02:38:07 2006 UTC (5 years, 6 months ago) by yongari
Branches: RELENG_6
Diff to: previous 1.46.2.18: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.18: +5 -6 lines
MFC if_re.c, 1.72 to RELENG_6 Fix re(4) breakage introduced in tree from rev 1.68. This should fix incorrect configuration of station address on big-endian architectures.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu Aug 3 00:15:19 2006 UTC (5 years, 6 months ago) by yongari
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +5 -6 lines
Fix re(4) breakge introduced in tree from rev 1.68. This should fix incorrect configuration of station address on big-endian architectures. Reviewed by: wpaul Tested on: sparc64
Revision 1.46.2.18: download - view: text, markup, annotated - select for diffs
Tue Aug 1 17:36:50 2006 UTC (5 years, 6 months ago) by wpaul
Branches: RELENG_6
Diff to: previous 1.46.2.17: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.17: +52 -23 lines
MFC: fix padding of short checksum offload frames, fix TX DMA channel stall, add USR NIC PCI ID, add tsleep() to re_detach() to avoid possible crash when unloading module
Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Aug 1 17:18:25 2006 UTC (5 years, 6 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +52 -23 lines
Another small update to the re(4) driver: - Change the workaround for the autopad/checksum offload bug so that instead of lying about the map size, we actually create a properly padded mbuf and map it as usual. The other trick works, but is ugly. This approach also gives us a chance to zero the pad space to avoid possibly leaking data. - With the PCIe devices, it looks issuing a TX command while there's already a transmission in progress doesn't have any effect. In other words, if you send two packets in rapid succession, the second one may end up sitting in the TX DMA ring until another transmit command is issued later in the future. Basically, if re_txeof() sees that there are still descriptors outstanding, it needs to manually resume the TX DMA channel by issuing another TX command to make sure all transmissions are flushed out. (The PCI devices seem to keep the TX channel moving until all descriptors have been consumed. I'm not sure why the PCIe devices behave differently.) (You can see this issue if you do the following test: plug an re(4) interface into another host via crossover cable, and from the other host do 'ping -c 2 <host with re(4) NIC>' to prime the ARP cache, then do 'ping -c 1 -s 1473 <host with re(4) NIC>'. You're supposed to see two packets sent in response, but you may only see one. If you do 'ping -c 1 -s 1473 <host with re(4) NIC>' again, you'll see two packets, but one will be the missing fragment from the last ping, followed by one of the fragments from this ping.) - Add the PCI ID for the US Robotics 997902 NIC, which is based on the RTL8169S. - Add a tsleep() of 1 second in re_detach() after the interrupt handler is disconnected. This should allow any tasks queued up by the ISR to drain. Now, I know you're supposed to use taskqueue_drain() for this, but something about the way taskqueue_drain() works with taskqueue_fast queues doesn't seem quite right, and I refuse to be tricked into fixing it.
Revision 1.46.2.17: download - view: text, markup, annotated - select for diffs
Sun Jul 30 23:32:20 2006 UTC (5 years, 6 months ago) by wpaul
Branches: RELENG_6
Diff to: previous 1.46.2.16: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.16: +32 -21 lines
MFC: correct PCI ID for 8169SC/8110SC, remove spinlock, work around checksum offload bugs, correct device descriptions
Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Jul 30 23:25:21 2006 UTC (5 years, 6 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +32 -21 lines
Fix the following bugs in re(4) - Correct the PCI ID for the 8169SC/8110SC in the device list (I added the macro for it to if_rlreg.h before, but forgot to use it.) - Remove the extra interrupt spinlock I added previously. After giving it some more thought, it's not really needed. - Work around a hardware bug in some versions of the 8169. When sending very small IP datagrams with checksum offload enabled, a conflict can occur between the TX autopadding feature and the hardware checksumming that can corrupt the outbound packet. This is the reason that checksum offload sometimes breaks NFS: if you're using NFS over UDP, and you're very unlucky, you might find yourself doing a fragmented NFS write where the last fragment is smaller than the minimum ethernet frame size (60 bytes). (It's rare, but if you keep NFS running long enough it'll happen.) If checksum offload is enabled, the chip will have to both autopad the fragment and calculate its checksum header. This confuses some revs of the 8169, causing the packet that appears on the wire to be corrupted. (The IP addresses and the checksum field are mangled.) This will cause the NFS write to fail. Unfortunately, when NFS retries, it sends the same write request over and over again, and it keeps failing, so NFS stays wedged. (A simple way to provoke the failure is to connect the failing system to a network with a known good machine and do "ping -s 1473 <badhost>" from the good system. The ping will fail.) Someone had previously worked around this using the heavy-handed approahch of just disabling checksum offload. The correct fix is to manually pad short frames where the TCP/IP stack has requested checksum offloading. This allows us to have checksum offload turned on by default but still let NFS work right. - Not a bug, but change the ID strings for devices with hardware rev 0x30000000 and 0x38000000 to both be 8168B/8111B. According to RealTek, they're both the same device, but 0x30000000 is an earlier silicon spin.
Revision 1.46.2.16: download - view: text, markup, annotated - select for diffs
Wed Jun 28 16:06:10 2006 UTC (5 years, 7 months ago) by wpaul
Branches: RELENG_6
Diff to: previous 1.46.2.15: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.15: +4 -1 lines
MFC: fix detection of 8168, detect 8111 separately
Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Jun 28 16:04:54 2006 UTC (5 years, 7 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +4 -1 lines
Properly detect the RTL8168(B?) again. RealTek sent me a bunch of sample cards: the chips are all marked "RTL8111B", but they put stickers on the back that say "RTL8168B/8111B". The manual says there's only one HWREV code for both the 8111B and 8168B devices, which is 0x30000000, but the cards they sent me actually report HWREV of 0x38000000. Deciding to trust the hardware in front of me rather than a possibly incorrect manual (it wouldn't be the first time the HWREVs were incorrectly documented), I changed the 8168 revision code. It turns out this was a mistake though: 0x30000000 really is a valid for the 8168. There are two possible reasons for there to be two different HWREVs: 1) 0x30000000 is used only for the 8168B and 0x38000000 is only for the 8111B. 2) There were 8111/8168 rev A devices which both used code 0x30000000, and the 8111B/8168B both use 0x38000000. The product list on the RealTek website doesn't mention the existence of any 8168/8111 rev A chips being in production though, and I've never seen one, so until I get clarification from RealTek, I'm going to assume that 0x30000000 is just for the 8168B and 0x38000000 is for the 8111B only. So, the HWREV code for the 8168 has been put back to 0x30000000, a new 8111 HWREV code has been added, and there are now separate entries for recognizing both devices in the device list. This will allow all devices to work, though if it turns out I'm wrong I may need to change the ID strings
Revision 1.46.2.15: download - view: text, markup, annotated - select for diffs
Mon Jun 26 20:44:33 2006 UTC (5 years, 7 months ago) by wpaul
Branches: RELENG_6
Diff to: previous 1.46.2.14: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.14: +261 -137 lines
MFC updates to the re(4) driver from -current
Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Jun 26 20:31:31 2006 UTC (5 years, 7 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +253 -138 lines
Add support for the RealTek 8169SC/8110SC and RTL8101E devices. The latter is a PCIe 10/100 chip. Finally fix the EEPROM reading code so that we can access the EEPROMs on all devices. In order to access the EEPROM, we must select 'EEPROM programming' mode, and then set the EEPROM chip select bit. Previously, we were setting both bits simultaneously, which doesn't work: they must be set in the right sequence. Always obtain the station address from the EEPROM, now that EEPROM reading works correctly. Make the TX interrupt moderation code based on the internal timer optional and turned off by default. Make the re_diag() routine conditional and off by default. When it is on, only use it for the original 8169, which was the only device that that really needed it. Modify interrupt handling to use a fast interrupt handler and fast taskqeueue. Correct the rgephy driver so that it only applies the DSP fixup for PHY revs 0 and 1. Later chips are fixed and don't need the fixup. Make the rgephy driver advertise both 1000_FD and 1000_HD bits in autoneg mode. A couple of the devices don't autoneg correctly unless configured this way.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed May 24 11:55:25 2006 UTC (5 years, 8 months ago) by glebius
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -3 lines
Rename device name in the last commit. According to PR, the ID is more likely to belong to chips of 8168 family. PR: kern/96734 Submitted by: Sven Petai <hadara bsd.ee>
Revision 1.66: download - view: text, markup, annotated - select for diffs
Wed Mar 22 07:33:02 2006 UTC (5 years, 10 months ago) by glebius
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -0 lines
Add support for RTL8111B chip, that can be found on some mainboards, for example ASUS P5PL2. Tested by: Vadim Frolov <vadim uch.net>
Revision 1.46.2.14: download - view: text, markup, annotated - select for diffs
Fri Mar 17 21:30:55 2006 UTC (5 years, 10 months ago) by glebius
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.46.2.13: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.13: +0 -4 lines
MFC: Do not touch ifp->if_baudrate in miibus aware drivers. Approved by: re (scottl)
Revision 1.46.2.13: download - view: text, markup, annotated - select for diffs
Fri Mar 10 07:34:21 2006 UTC (5 years, 11 months ago) by glebius
Branches: RELENG_6
Diff to: previous 1.46.2.12: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.12: +12 -6 lines
MFC 1.65: Correctly switch IFCAP_VLAN_HWTAGGING on and off. Approved by: re (mux)
Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Mar 3 12:32:51 2006 UTC (5 years, 11 months ago) by glebius
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +12 -6 lines
Correctly switch IFCAP_VLAN_HWTAGGING on and off. Reported & tested by: Peter Blok <pblok bsd4all.org>
Revision 1.64: download - view: text, markup, annotated - select for diffs
Mon Feb 20 10:29:40 2006 UTC (5 years, 11 months ago) by ticso
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +8 -2 lines
Copy MAC address to fix alignment problems. Tested on alpha (AS600) with RTL8169S Suggested by: jhb
Revision 1.63: download - view: text, markup, annotated - select for diffs
Tue Feb 14 12:44:55 2006 UTC (5 years, 11 months ago) by glebius
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +0 -4 lines
Do not touch ifp->if_baudrate in miibus aware drivers.
Revision 1.28.2.13: download - view: text, markup, annotated - select for diffs
Sun Jan 29 15:39:06 2006 UTC (6 years ago) by emaste
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.28.2.12: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.12: +2 -0 lines
Merge IP multicast address list locking from HEAD to RELENG_5. if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255 if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32 if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40 if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11 pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20 if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58 if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182 if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70 if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85 if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193: Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Note that with these changes, these drivers now depend on locking the global if_addr_mtx, so binary modules of these drivers will not work on 5.4 or earlier releases. Approved by: rwatson (mentor)
Revision 1.46.2.12: download - view: text, markup, annotated - select for diffs
Fri Jan 13 19:21:44 2006 UTC (6 years ago) by glebius
Branches: RELENG_6
Diff to: previous 1.46.2.11: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.11: +1 -1 lines
- Restore VLAN_INPUT_TAG() macro to preserve API compatibility for third party drivers. - Fix bugs destribed in previous revision using macro with another name.
Revision 1.46.2.11: download - view: text, markup, annotated - select for diffs
Fri Jan 13 11:51:10 2006 UTC (6 years ago) by glebius
Branches: RELENG_6
Diff to: previous 1.46.2.10: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.10: +5 -2 lines
MFC:
- Use VLAN_TAG_VALUE() not only to read a dot1q tag
value from an m_tag, but also to set it. This reduces
complex code duplication and improves its readability.
- Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in
case if memory allocation failed.
- Remove fourth argument from VLAN_INPUT_TAG(), that was used
incorrectly in almost all drivers. Indicate failure with
mbuf value of NULL.
Revision 1.46.2.10: download - view: text, markup, annotated - select for diffs
Thu Dec 29 05:25:40 2005 UTC (6 years, 1 month ago) by sobomax
Branches: RELENG_6
Diff to: previous 1.46.2.9: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.9: +7 -0 lines
MFC: in the re_shutdown() mark interface as down since otherwise we will panic if interrupt comes in later on, which can happen in some uncommon cases.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Dec 18 18:24:26 2005 UTC (6 years, 1 month ago) by glebius
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +5 -2 lines
- Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL. In collaboration with: yongari, ru, sam
Revision 1.46.2.9: download - view: text, markup, annotated - select for diffs
Sun Nov 27 02:56:42 2005 UTC (6 years, 2 months ago) by glebius
Branches: RELENG_6
Diff to: previous 1.46.2.8: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.8: +6 -4 lines
MFC 1.61: Check IFF_DRV_RUNNING in the re_intr() loop. It can disappear, since re_rxeof() drops the lock for some time. Reported & tested by: XueFeng Deng <dsnofe yahoo.com.cn>
Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Nov 22 12:46:15 2005 UTC (6 years, 2 months ago) by glebius
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +6 -4 lines
Check IFF_DRV_RUNNING in the re_intr() loop. It can disappear, since re_rxeof() drops the lock for some time. Reported & tested by: XueFeng Deng <dsnofe yahoo.com.cn>
Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Nov 11 16:04:54 2005 UTC (6 years, 2 months ago) by ru
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -2 lines
- Store pointer to the link-level address right in "struct ifnet" rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
Revision 1.46.2.8: download - view: text, markup, annotated - select for diffs
Sun Nov 6 16:00:54 2005 UTC (6 years, 3 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.46.2.7: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.7: +13 -0 lines
MFC: Only allow the sk(4) driver to attach to revision 2 of the LinkSys EG1032 cards and teach the re(4) driver to attach to revision 3 cards.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Oct 22 05:01:11 2005 UTC (6 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -1 lines
The controller -> device switch happened in 4.0, fix comment
Revision 1.58: download - view: text, markup, annotated - select for diffs
Fri Oct 14 18:51:29 2005 UTC (6 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +13 -0 lines
Only allow the sk(4) driver to attach to revision 2 of the LinkSys EG1032 cards and teach the re(4) driver to attach to revision 3 cards. Submitted by: Fredrik Lindberg fli+freebsd-current at shapeshifter dot se MFC after: 2 weeks Reviewed by: imp, mdodd
Revision 1.46.2.7: download - view: text, markup, annotated - select for diffs
Sat Oct 8 07:35:10 2005 UTC (6 years, 4 months ago) by glebius
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.46.2.6: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.6: +0 -1 lines
This line fell out of the merge, too. Approved by: re (implicitly)
Revision 1.46.2.6: download - view: text, markup, annotated - select for diffs
Sat Oct 8 05:29:27 2005 UTC (6 years, 4 months ago) by scottl
Branches: RELENG_6
Diff to: previous 1.46.2.5: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.5: +1 -1 lines
Outwit gcc. Submitted by: glebius, kensmith Approved by: re
Revision 1.46.2.5: download - view: text, markup, annotated - select for diffs
Fri Oct 7 14:00:04 2005 UTC (6 years, 4 months ago) by glebius
Branches: RELENG_6
Diff to: previous 1.46.2.4: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.4: +51 -38 lines
Big overall MFC of polling(4) cleanup: o First attempt on removing Giant from polling. Details: http://lists.freebsd.org/pipermail/cvs-src/2005-September/051848.html o Second attempt, and big polling cleanup including: - Functinal approach to turning polling on/off - Deprecating of poll_in_trap - Removal of ifnet knowledge from kern_poll.c Details: http://lists.freebsd.org/pipermail/cvs-src/2005-October/053267.html o Improved checking of user configurable sysctls. Details: http://lists.freebsd.org/pipermail/cvs-src/2005-October/053351.html o Moving DEVICE_POLLING from opt_global.h to opt_device_polling.h: http://lists.freebsd.org/pipermail/cvs-src/2005-October/053479.html o All related documentation fixes. Approved by: re (kensmith) Thanks to: everyone, who helped with testing
Revision 1.46.2.4: download - view: text, markup, annotated - select for diffs
Thu Oct 6 20:17:17 2005 UTC (6 years, 4 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.46.2.3: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.3: +56 -69 lines
MFC: Fixup locking in rl(4) and re(4). Approved by: re (scottl)
Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Oct 5 10:09:15 2005 UTC (6 years, 4 months ago) by glebius
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -0 lines
- Don't pollute opt_global.h with DEVICE_POLLING and introduce opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that can be compiled as loadable modules. Reviewed by: bde
Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Oct 1 18:56:17 2005 UTC (6 years, 4 months ago) by glebius
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +49 -40 lines
Big polling(4) cleanup. o Axe poll in trap. o Axe IFF_POLLING flag from if_flags. o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling. o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt. o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig. Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed. Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts. Reviewed by: ru, sam, jhb
Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Sep 29 16:52:19 2005 UTC (6 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +49 -54 lines
- Use if_printf() and device_printf() in re(4) and remove rl_unit from the softc. - Use callout_init_mtx() and rather than timeout/untimeout in both rl(4) and re(4). - Fix locking for ifmedia by locking the driver in the ifmedia handlers rather than in the miibus functions. (re(4) didn't lock the mii stuff at all!) - Fix some locking in re_ioctl(). Note: the two drivers share the same softc declared in if_rlreg.h, so they had to be change simultaneously. MFC after: 1 week Tested by: several on rl(4), none on re(4)
Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Sep 19 03:10:19 2005 UTC (6 years, 4 months ago) by imp
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -2 lines
Make sure that we call if_free(ifp) after bus_teardown_intr. Since we could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Thu Sep 15 19:07:10 2005 UTC (6 years, 4 months ago) by ru
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +1 -2 lines
Don't recommend re_detach() (like in vr(4)) as another possible method to prevent panicing in interrupt handler after re_shutdown(), sometimes seen on SMP systems. This would work here only because re_detach() clears IFF_UP (to prevent another race) and it was demonstrated that it's not enough to call vr_detach() in vr_shutdown() to prevent a panic.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Sep 15 18:59:34 2005 UTC (6 years, 4 months ago) by ru
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +7 -15 lines
re_detach() fixes: - Fixed if_free() logic screw-up that can either result in freeing a NULL pointer or leaking "struct ifnet". - Move if_free() after re_stop(); the latter accesses "struct ifnet". This bug was masked by a previous bug. - Restore the fix for a panic on detach caused by racing with BPF detach code by Bill by moving ether_ifdetach() after re_stop() and resetting IFF_UP; this got screwed up in revs. 1.30 and 1.36.
Revision 1.46.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 25 05:01:14 2005 UTC (6 years, 5 months ago) by rwatson
Branches: RELENG_6
Diff to: previous 1.46.2.2: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.2: +7 -7 lines
Merge linux_ioctl.c:1.128 svr4_sockio.c:1.17 altq_cbq.c:1.3 if_oltr.c:1.38 if_pflog.c:1.14 if_pfsync.c:1.21 if_an.c:1.70 if_ar.c:1.72 if_arl.c:1.11 amrr.c:1.10 onoe.c:1.10 if_ath.c:1.101 awi.c:1.41 if_bfe.c:1.27 if_bge.c:1.93 if_cm_isa.c:1.7 smc90cx6.c:1.16 if_cnw.c:1.20 if_cp.c:1.25 if_cs.c:1.42 if_ct.c:1.26 if_cx.c:1.46 if_ed.c:1.256 if_em.c:1.68 if_en_pci.c:1.37 midway.c:1.66 if_ep.c:1.143 if_ex.c:1.58 if_fatm.c:1.20 if_fe.c:1.93 if_fwe.c:1.38 if_fwip.c:1.8 if_fxp.c:1.244 if_gem.c:1.33 if_hatm.c:1.25 if_hatm_intr.c:1.20 if_hatm_ioctl.c:1.13 if_hatm_rx.c:1.10 if_hatm_tx.c:1.14 if_hme.c:1.39 if_ie.c:1.104 if_ndis.c:1.101 if_ic.c:1.24 if_ipw.c:1.10 if_iwi.c:1.10 if_ixgb.c:1.13 if_lge.c:1.41 if_lnc.c:1.113 if_my.c:1.31 if_nge.c:1.77 if_nve.c:1.10 if_owi.c:1.12 if_patm.c:1.9 if_patm_intr.c:1.6 if_patm_ioctl.c:1.10 if_patm_tx.c:1.10 pdq_ifsubr.c:1.28 if_plip.c:1.38 if_ral.c:1.12 if_ral_pci.c:1.2 if_ray.c:1.81 if_rayvar.h:1.22 if_re.c:1.49 if_sbni.c:1.21 if_sbsh.c:1.14 if_sn.c:1.48 dp83932.c:1.21 if_snc_pccard.c:1.9 if_sr.c:1.70 if_tx.c:1.91 if_txp.c:1.33 if_aue.c:1.92 if_axe.c:1.32 if_cdce.c:1.8 if_cue.c:1.59 if_kue.c:1.66 if_rue.c:1.23 if_udav.c:1.16 if_ural.c:1.12 if_vge.c:1.16 if_vx.c:1.58 if_wi.c:1.185 if_wi_pci.c:1.26 if_wl.c:1.68 if_xe.c:1.60 if_xe_pccard.c:1.30 if_el.c:1.68 i4b_ipr.c:1.35 i4b_isppp.c:1.31 kern_poll.c:1.20 bridge.c:1.94 bridgestp.c:1.4 if_arcsubr.c:1.27 if_atm.h:1.24 if_atmsubr.c:1.40 if_bridge.c:1.16 if_ef.c:1.35 if_ethersubr.c:1.196 if_faith.c:1.37 if_fddisubr.c:1.100 if_fwsubr.c:1.14 if_gif.c:1.54 if_gre.c:1.34 if_iso88025subr.c:1.70 if_loop.c:1.107 if_ppp.c:1.106 if_spppsubr.c:1.121 if_tap.c:1.57 if_tun.c:1.154 if_vlan.c:1.80 ppp_tty.c:1.67 ieee80211_ioctl.c:1.32 atm_if.c:1.31 ng_eiface.c:1.33 ng_ether.c:1.50 ng_fec.c:1.19 ng_iface.c:1.44 ng_sppp.c:1.9 ip_carp.c:1.30 ip_fastfwd.c:1.30 in6.c:1.53 nd6_nbr.c:1.31 natm.c:1.40 if_dc.c:1.162 if_de.c:1.168 if_pcn.c:1.72 if_rl.c:1.154 if_sf.c:1.84 if_sis.c:1.135 if_sk.c:1.108 if_ste.c:1.86 if_ti.c:1.109 if_tl.c:1.101 if_vr.c:1.106 if_wb.c:1.81 if_xl.c:1.194 from HEAD to RELENG_6: Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz Approved by: re (scottl)
Revision 1.46.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 24 16:50:41 2005 UTC (6 years, 5 months ago) by rwatson
Branches: RELENG_6
Diff to: previous 1.46.2.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.1: +2 -0 lines
Merge if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255 if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32 if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40 if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11 pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20 if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58 if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182 if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70 if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85 if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193 from HEAD to RELENG_6: Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> Approved by: re (scottl)
Revision 1.28.2.12: download - view: text, markup, annotated - select for diffs
Wed Aug 24 07:03:35 2005 UTC (6 years, 5 months ago) by yongari
Branches: RELENG_5
Diff to: previous 1.28.2.11: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.11: +1 -1 lines
Merge if_re.c:1.46 from HEAD to RELENG_5: Use correct pointer type. This should fix non-functional re(4) driver on 64bit architectures.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Aug 18 18:36:39 2005 UTC (6 years, 5 months ago) by sobomax
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +0 -0 lines
(forced) Previous commit was related to kern/85005, not a kern/80005. Pointed out by: jhb
Revision 1.50: download - view: text, markup, annotated - select for diffs
Thu Aug 18 14:29:01 2005 UTC (6 years, 5 months ago) by sobomax
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +7 -0 lines
In re_shutdown() mark interface as down since otherwise we will panic if interrupt comes in later on, which can happen in some uncommon cases. Another possible fix is to call re_detach() instead of re_stop(), like ve(4) does, but I am not sure if the latter is really RTTD, so that stick with this one-liner for now. PR: kern/80005 Approved by: silence on -arch, no reply from selected network gurus
Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 15 14:02:37 2005 UTC (6 years, 5 months ago) by tobez
Branches: RELENG_6
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -0 lines
MFC: Recognize D-Link DGE-528(T) Gigabit as an re(4) device. Approved by: re (kensmith)
Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue Aug 9 10:19:53 2005 UTC (6 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +7 -7 lines
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Aug 5 08:19:12 2005 UTC (6 years, 6 months ago) by tobez
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -0 lines
Recognize D-Link DGE-528(T) Gigabit as an re(4) device. Submitted by: Andrus Nomm <andrus@members.ee> PR: 76780 MFC After: 1 week
Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Aug 3 00:18:32 2005 UTC (6 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -0 lines
Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Jul 1 04:12:42 2005 UTC (6 years, 7 months ago) by yongari
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -1 lines
Use correct pointer type. This should fix non-functional re(4) driver on 64bit architectures. Approved by: re (scottl)
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Jun 11 01:37:46 2005 UTC (6 years, 8 months ago) by brooks
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +7 -6 lines
Move if_alloc() up so it's before mii_phy_probe().
Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Jun 10 16:49:14 2005 UTC (6 years, 8 months ago) by brooks
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +23 -14 lines
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun May 29 04:42:24 2005 UTC (6 years, 8 months ago) by nyan
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +0 -2 lines
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
Revision 1.28.2.11: download - view: text, markup, annotated - select for diffs
Thu Mar 31 17:38:39 2005 UTC (6 years, 10 months ago) by cognet
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.28.2.10: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.10: +2 -2 lines
MFC rev 1.37: date: 2005/01/05 00:06:15; author: cognet; state: Exp; lines: +2 -2 Disable checksum offloading by default. It seems to produce corrupted packets with some revisions of the chip (particularly when using multiple TX descriptors). Approved by: re
Revision 1.28.2.10: download - view: text, markup, annotated - select for diffs
Mon Mar 28 19:03:41 2005 UTC (6 years, 10 months ago) by scottl
Branches: RELENG_5
Diff to: previous 1.28.2.9: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.9: +1 -1 lines
Fix compile error from last commit. Approved by: re
Revision 1.28.2.9: download - view: text, markup, annotated - select for diffs
Mon Mar 28 16:05:33 2005 UTC (6 years, 10 months ago) by mlaier
Branches: RELENG_5
Diff to: previous 1.28.2.8: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.8: +14 -6 lines
MFC, if_re.c, rev. 1.41: ALTQ support for re(4). Submitted by: Chris Dionissopoulos, Theo Schlossnagle PR: kern/78681 Approved by: re (kensmith)
Revision 1.28.2.8: download - view: text, markup, annotated - select for diffs
Thu Mar 24 16:42:52 2005 UTC (6 years, 10 months ago) by des
Branches: RELENG_5
Diff to: previous 1.28.2.7: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.7: +3 -0 lines
MFC: (1.39) add 8169SB to list of supported chipsets. Approved by: re (kensmith)
Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun Mar 13 01:54:41 2005 UTC (6 years, 11 months ago) by mlaier
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -1 lines
Unbreak build with POLLING. I should really listen and test with NOTES instead of the module build.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Mar 12 17:35:37 2005 UTC (6 years, 11 months ago) by mlaier
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +14 -6 lines
ALTQ support for re(4). Submitted by: Chris Dionissopoulos, Theo Schlossnagle PR: kern/78681 MFC after: 2 weeks
Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Mar 1 08:58:04 2005 UTC (6 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -1 lines
Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in preference to some random negative number to allow other drivers a bite at the apple.
Revision 1.28.2.7: download - view: text, markup, annotated - select for diffs
Sun Jan 30 01:00:00 2005 UTC (7 years ago) by imp
Branches: RELENG_5
Diff to: previous 1.28.2.6: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.6: +1 -1 lines
MFC: /*- and my license changes for sys/[a-d]*
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Jan 22 22:40:53 2005 UTC (7 years ago) by imp
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -0 lines
Bring in support for SUGOI LAN GIGA NIC made by System TALKS, Inc from a RealTek 8169SB. PR: 74262 Submitted by: Yoshikazu GOTO-san # Submitter notes that he's unsure of the revision string for 8169SB
Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Jan 6 01:43:10 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +1 -1 lines
Start each of the license/copyright comments with /*-, minor shuffle of lines
Revision 1.28.2.6: download - view: text, markup, annotated - select for diffs
Wed Jan 5 00:07:37 2005 UTC (7 years, 1 month ago) by cognet
Branches: RELENG_5
Diff to: previous 1.28.2.5: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.5: +0 -1 lines
MFC rev 1.36: In re_detach(), remove an extra call to ether_ifdetach(). This fixes a panic that occurs when unloading the kernel module.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Jan 5 00:06:15 2005 UTC (7 years, 1 month ago) by cognet
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2 lines
Disable checksum offloading by default. It seems to produce corrupted packets with some revisions of the chip (particularly when using multiple TX descriptors). MFC after: 1 week
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Jan 2 01:37:21 2005 UTC (7 years, 1 month ago) by cognet
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +0 -1 lines
In re_detach(), remove an extra call to ether_ifdetach(). This fixes a panic that occurs when unloading the kernel module. MFC after: 3 days
Revision 1.28.2.5: download - view: text, markup, annotated - select for diffs
Tue Oct 12 21:51:20 2004 UTC (7 years, 3 months ago) by jmg
Branches: RELENG_5
CVS tags: RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Diff to: previous 1.28.2.4: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.4: +54 -16 lines
MFC: if_re.c v1.35, if_rlreg.h v1.48: > fix jumbo frames as much as they can be fixed for re. We now cap the MTU > to 7422 since it appears that the 8169S can't transmit anything larger.. > The 8169S can receive full jumbo frames, but we don't have an mru to let > the upper layers know this... > > add fixup so that this driver should work on alignment constrained > platforms > (!i386 && !amd64) re.4 v1.9 & v1.10: > document the limit on jumbo frame size.. and bump document date Approved by: re (scottl)
Revision 1.28.2.4: download - view: text, markup, annotated - select for diffs
Fri Oct 1 02:33:58 2004 UTC (7 years, 4 months ago) by jmg
Branches: RELENG_5
Diff to: previous 1.28.2.3: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.3: +25 -31 lines
MFC: if_rlreg.h: v1.46 > comment requirement that rx/tx descriptor counts must be equal due to > shared code... > define rx descriptor count in terms of tx > align defines v1.47: > fix misspelling of TX... MFC: if_re.c: v1.32 > pass in pointer to m_head to re_encap because m_defrag could free the > original mbuf causing a free'd mbuf passed to bpf later and panic'ing the > system.. This should only effect jumbo frames. v1.33: > spell RX correctly > don't call re_rxeof a second time when we've already done the work > pull common code out from if and else clauses v1.34: > trim trailing white space.. > call the re mutex by it's name.. Approved by: re (scottl)
Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Sep 28 18:22:24 2004 UTC (7 years, 4 months ago) by jmg
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +54 -16 lines
fix jumbo frames as much as they can be fixed for re. We now cap the MTU to 7422 since it appears that the 8169S can't transmit anything larger.. The 8169S can receive full jumbo frames, but we don't have an mru to let the upper layers know this... add fixup so that this driver should work on alignment constrained platforms (!i386 && !amd64) MFC after: 5 days
Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Sep 20 06:33:37 2004 UTC (7 years, 4 months ago) by jmg
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
trim trailing white space.. call the re mutex by it's name.. MFC after: 3 days
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Sep 19 17:51:41 2004 UTC (7 years, 4 months ago) by jmg
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +10 -16 lines
spell RX correctly don't call re_rxeof a second time when we've already done the work pull common code out from if and else clauses MFC after: 3 days
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Sep 18 18:08:28 2004 UTC (7 years, 4 months ago) by jmg
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +13 -13 lines
pass in pointer to m_head to re_encap because m_defrag could free the original mbuf causing a free'd mbuf passed to bpf later and panic'ing the system.. This should only effect jumbo frames. MFC after: 5 days
Revision 1.28.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 14 05:47:14 2004 UTC (7 years, 4 months ago) by scottl
Branches: RELENG_5
Diff to: previous 1.28.2.2: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.2: +2 -2 lines
Add missing semicolons. Approved by: re (implicit)
Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 14 03:30:47 2004 UTC (7 years, 4 months ago) by jmg
Branches: RELENG_5
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.1: +135 -84 lines
MFC: v1.30 > merge in if_rl locking because if_re was originally based upon if_rl. > This essentially merges revs 1.143-1.1445 of sys/pci/if_rl.c. > This now marks the interrupt MPSAFE along with making the mutex > non-recursive. Approved by: re (kensmith)
Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 4 22:32:32 2004 UTC (7 years, 5 months ago) by sanpei
Branches: RELENG_5
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -0 lines
MFC if_re.c 1.29, if_rlreg.h 1.45, re.4 1.7: Add support Corega CG-LAPCIGT Gigabit Ethernet(8169S) Approved by: re (scott)
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Sep 4 07:54:05 2004 UTC (7 years, 5 months ago) by ru
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
Fixed build with DEVICE_POLLING defined.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Sep 3 16:41:41 2004 UTC (7 years, 5 months ago) by jmg
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +135 -84 lines
merge in if_rl locking because if_re was originally based upon if_rl. This essentially merges revs 1.143-1.1445 of sys/pci/if_rl.c. This now marks the interrupt MPSAFE along with making the mutex non-recursive. Looked over by: bms
Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Aug 28 10:59:02 2004 UTC (7 years, 5 months ago) by sanpei
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -0 lines
Add support Corega CG-LAPCIGT Gigabit Ethernet(8169S) PR: [FreeBSD-users-jp 80667] Submitted by: FUJIMOTO Kou <fujimoto@j.dendai.ac.jp> MFC after: 1 week
Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Jul 6 02:48:29 2004 UTC (7 years, 7 months ago) by bms
Branches: MAIN
CVS tags: RELENG_5_BP
Branch point for: RELENG_5
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +1 -34 lines
Eliminate unneeded return keywords.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jul 6 02:46:53 2004 UTC (7 years, 7 months ago) by bms
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +54 -54 lines
Whitespace pass
Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Jun 28 20:09:02 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +0 -56 lines
Remove code to slam the config space on transition to d0.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jun 9 14:34:01 2004 UTC (7 years, 8 months ago) by naddy
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -29 lines
Replace handrolled CRC calculation with ether_crc32_[lb]e().
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun May 30 20:08:39 2004 UTC (7 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +1 -0 lines
Add missing <sys/module.h> includes
Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon May 24 19:39:23 2004 UTC (7 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +8 -0 lines
Wrap the code to save/restore PCI config registers on suspend/resume in #ifndef BURN_BRIDGES. Noticed by: phk
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun May 23 21:05:08 2004 UTC (7 years, 8 months ago) by yar
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -1 lines
A handler for ioctl(SIOCSIFCAP) should not alter a bit in if_capenable unless the interface driver is actually able to toggle the respective capability on and off. Reviewed by: ru
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun May 23 16:11:50 2004 UTC (7 years, 8 months ago) by mux
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +0 -1 lines
We don't need to initialize if_output, ether_ifattach() does it for us.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Apr 11 20:34:08 2004 UTC (7 years, 10 months ago) by ru
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +9 -1 lines
Implemented per-interface polling(4) control.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Mar 17 17:50:40 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +5 -5 lines
Convert callers to the new bus_alloc_resource_any(9) API. Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Mar 14 07:12:22 2004 UTC (7 years, 10 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +0 -5 lines
Announce ethernet MAC addresss in ether_ifattach().
Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Dec 8 07:54:13 2003 UTC (8 years, 2 months ago) by obrien
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +6 -6 lines
Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. Requested by: bde,imp
Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Nov 28 05:28:28 2003 UTC (8 years, 2 months ago) by imp
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1 -0 lines
Sometimes cardbus attachments don't attach, so while we track down this problem put these lines back in. While they should be unnecessary, they appear to be sometimes necessary. Reviewed in concept: dfr Approved by: re (scottl@)
Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Nov 14 19:00:31 2003 UTC (8 years, 2 months ago) by sam
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -0 lines
Drop the driver lock around calls to if_input to avoid a LOR when the packets are immediately returned for sending (e.g. when bridging or packet forwarding). There are more efficient ways to do this but for now use the least intrusive approach. Reviewed by: imp, rwatson
Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Nov 14 17:16:57 2003 UTC (8 years, 2 months ago) by obrien
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
Remove duplicate FBSDID's, move others to their right place.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Nov 13 20:55:50 2003 UTC (8 years, 2 months ago) by obrien
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +11 -13 lines
Try to create some sort of consistency in how the routings to find the multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Nov 3 09:22:17 2003 UTC (8 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +0 -1 lines
Remove explicit cardbus attachments from drivers where this is identical to the pci attachment. Cardbus is a derived class of pci so all pci drivers are automatically available for matching against cardbus devices. Reviewed by: imp
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Oct 31 18:32:04 2003 UTC (8 years, 3 months ago) by brooks
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +1 -2 lines
Replace the if_name and if_unit members of struct ifnet with new members if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Sep 20 21:18:27 2003 UTC (8 years, 4 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -4 lines
Remove the dual-address cycle stuff. DAC is used to allow a bus master device to access 64-bit addresses from a 32-bit PCI bus. While the RealTek manual says you can set this bit and the chip will perform DAC only if you give it a DMA address with any of the upper 32 bits set, this appears not to be the case. If I turn on the DAC bit, the chip sets the 'system error' bit in the status register when I to do a DMA on my Athlon test box with 32-bit PCI bus (VIA chipset) even though I only have 128MB of physical memory, and thus can never give the chip a 64-bit address. Obviously, I can't just set it and forget it, so until I figure out the right rule for when it's safe/necessary to enable it, keep it turned off.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Sep 19 02:35:03 2003 UTC (8 years, 4 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -1 lines
Remove jumbo buffer #defines that I ended up not needing.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Sep 18 18:32:15 2003 UTC (8 years, 4 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -4 lines
In re_diag(), there's no need for us to call re_start() ourselves: IF_HANDOFF() does it for us behind the scenes. Remove the extra call to re_start() otherwise we try to transmit twice. In re_encap(), fix the code that guards against consuming too many descriptors in the TX ring so that it actually works. With the new 8169S chip, I was able to hit a corner case that drained the free descriptor count all the way to 0. This is not supposed to be possible.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Sep 13 23:51:35 2003 UTC (8 years, 4 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +14 -7 lines
Teach the re(4) driver about the CFG2 register, which tells us whether we're on a 32-bit/64-bit bus or not. Use this to decide if we should set the PCI dual-address cycle enable bit in the C+ command register. (Enabling DAC on a 32-bit bus seems to do bad things.) Also, initialize the C+ command register early in the re_init() routine. The documentation says this register should be configured first.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Sep 11 07:54:16 2003 UTC (8 years, 5 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -0 lines
Toggle the interface on and off before starting the diag test. This seems to be necessary for the 8139C+ under certain circumstances, and doesn't appear to hurt the other chips. (In the failure case, the packet would be sent through the TX DMA ring but not get echoed back. I suspect this has something to do with the link state changing unexpectedly.)
Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Sep 11 06:56:46 2003 UTC (8 years, 5 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +59 -27 lines
- For the 8169 chips, read the station address by forcing an EEPROM autoload and then copying the contends of the station address registers. For some reason, reading the EEPROM on the 8169S doesn't work right. This gets around the problem, and allows us to read the station address correctly on the 8169S. - Insert a delay after initiating packet transmition in re_diag() to allow lots of time for the frame to echo back to the host, and wait for both the 'RX complete' and 'timeout expired' bits in the ISR register to be set. - Deal more intelligently with the fact that the frame length field in the RX descriptor is a different width on the 8139C+ than it is on the 8169/8169S/8110S - For the 8169, you have to set bit 17 in the TX config register to enter digital loopback mode, but for the 8139C+, you have to set both bits 17 and 18. Take this into account so that re_diag() works properly for both types of chips.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Sep 11 03:53:46 2003 UTC (8 years, 5 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +16 -1 lines
Add a PHY driver to support the built-in gigE PHY in the 8169S/8110S ethernet chips. This driver is pretty simple, however it contains special DSP initialization code which is needed in order to get the chip to negotiate a gigE link. (This special initialization may not be needed in subsequent chip revs.) Also: - Fix typo in if_rlreg.h (RL_GMEDIASTAT_1000MPS -> RL_GMEDIASTAT_1000MBPS) - Deal with shared interrupts in re_intr(): if interface isn't up, return. - Fix another bug in re_gmii_writereg() (properly apply data field mask) - Allow PHY driver to read the RL_GMEDIASTAT register via the re_gmii_readreg() register (this is register needed to determine real time link/media status).
Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Sep 10 15:14:46 2003 UTC (8 years, 5 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +0 -3 lines
Fix bug in re_gmii_writewreg(): we don't need to be screening out certain PHY addresses here. (The chip will only let you talk to one PHY anyway.)
Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Sep 10 07:21:43 2003 UTC (8 years, 5 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -3 lines
Update hardware revision table. 0x04000000 appears to be the revision for the 8169S, according to my sample board. The RealTek Linux driver mentions 0x00800000. I'm assigning this to the 8110S until I get more info on it. (The (preliminary) RealTek docs only say that 8169S/8110S chips will have some combination of those two bits set, but doesn't say exactly what bit combination goes with which chip variant.)
Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Sep 8 02:11:24 2003 UTC (8 years, 5 months ago) by wpaul
Branches: MAIN
Take the support for the 8139C+/8169/8169S/8110S chips out of the rl(4) driver and put it in a new re(4) driver. The re(4) driver shares the if_rlreg.h file with rl(4) but is a separate module. (Ultimately I may change this. For now, it's convenient.) rl(4) has been modified so that it will never attach to an 8139C+ chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to match the 8169/8169S/8110S gigE chips. if_re.c contains the same basic code that was originally bolted onto if_rl.c, with the following updates: - Added support for jumbo frames. Currently, there seems to be a limit of approximately 6200 bytes for jumbo frames on transmit. (This was determined via experimentation.) The 8169S/8110S chips apparently are limited to 7.5K frames on transmit. This may require some more work, though the framework to handle jumbo frames on RX is in place: the re_rxeof() routine will gather up frames than span multiple 2K clusters into a single mbuf list. - Fixed bug in re_txeof(): if we reap some of the TX buffers, but there are still some pending, re-arm the timer before exiting re_txeof() so that another timeout interrupt will be generated, just in case re_start() doesn't do it for us. - Handle the 'link state changed' interrupt - Fix a detach bug. If re(4) is loaded as a module, and you do tcpdump -i re0, then you do 'kldunload if_re,' the system will panic after a few seconds. This happens because ether_ifdetach() ends up calling the BPF detach code, which notices the interface is in promiscuous mode and tries to switch promisc mode off while detaching the BPF listner. This ultimately results in a call to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init() to handle the IFF_PROMISC flag change. Unfortunately, calling re_init() here turns the chip back on and restarts the 1-second timeout loop that drives re_tick(). By the time the timeout fires, if_re.ko has been unloaded, which results in a call to invalid code and blows up the system. To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(), which stops the ioctl routine from trying to reset the chip. - Modified comments in re_rxeof() relating to the difference in RX descriptor status bit layout between the 8139C+ and the gigE chips. The layout is different because the frame length field was expanded from 12 bits to 13, and they got rid of one of the status bits to make room. - Add diagnostic code (re_diag()) to test for the case where a user has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some NICs have the REQ64# and ACK64# lines connected even though the board is 32-bit only (in this case, they should be pulled high). This fools the chip into doing 64-bit DMA transfers even though there is no 64-bit data path. To detect this, re_diag() puts the chip into digital loopback mode and sets the receiver to promiscuous mode, then initiates a single 64-byte packet transmission. The frame is echoed back to the host, and if the frame contents are intact, we know DMA is working correctly, otherwise we complain loudly on the console and abort the device attach. (At the moment, I don't know of any way to work around the problem other than physically modifying the board, so until/unless I can think of a software workaround, this will have do to.) - Created re(4) man page - Modified rlphy.c to allow re(4) to attach as well as rl(4). Note that this code works for the sample 8169/Marvell 88E1000 NIC that I have, but probably won't work for the 8169S/8110S chips. RealTek has sent me some sample NICs, but they haven't arrived yet. I will probably need to add an rlgphy driver to handle the on-board PHY in the 8169S/8110S (it needs special DSP initialization).
