Module Name: src Committed By: riz Date: Mon Sep 3 19:09:41 UTC 2012
Modified Files: src/sys/dev/pci [netbsd-6]: if_wm.c if_wmreg.h Log Message: Pull up following revision(s) (requested by bouyer in ticket #534): sys/dev/pci/if_wmreg.h: revision 1.48 sys/dev/pci/if_wm.c: revision 1.232 sys/dev/pci/if_wm.c: revision 1.233 sys/dev/pci/if_wm.c: revision 1.234 Make vlan and all ip/ip6 checksum offload work for the I350. On newer devices, when using the legacy TX descriptors, vlan-related flags that were set on the last descriptor of a packet have to be set on the first one. For tso/checksum offloads, a new "advanced" descriptor format has to be used. Change wcd_txdescs to a union defining all types of descriptors (they are all 16-bytes wide). Define a new tx function wm_nq_start(), which handle newer devices. There is some code duplication with wm_start(), but adding support to the existing wm_start() would make it a if () {} else {} maze. This also allows to get rid of some workaround for older chips that are not needed here. Use wm_nq_start() instead of wm_start() for the I350 (this should probably be for all WM_F_NEWQUEUE devices, but I have no hardware but the I350 to test). Call ifp->if_start() instead of wm_start() where is matters. Tested on a I350, and a i80003 (which use the old format), both with and without vlans, with and without checksum offloads. Enable VLAN hardware tagging on all chips that have the new queue mechanism. Tested with 82575{EB,GB}, 82576, 82580, I350 and ICH9. Shut up gcc about some uninitialized variables. To generate a diff of this commit: cvs rdiff -u -r1.227.2.2 -r1.227.2.3 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.46.2.1 -r1.46.2.2 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.