Ļ229606 116 426 388 388 388 160 354 354 328 393 220 220 275 275 411 411 236 218 188 188 280 280 427 427 123 135 122 122 293 293 303 303 188 188 148 106 533 533 533 158 158 158 426 322 322 322 337 423 365 215 208 364 120 302 347 146 165 165 256 1547 859 279 368 227 272 99 208 128 204 325 813 325 299 253 253 210 210 210 183 132 153 169 148 179 201 287 157 237 148 621 184 184 128 142 130 166 222 107 296 395 147 147 302 327 327 295 1372 1372 1372 172 160 631 4023 4023 4023 3637 3637 K 10 svn:author V 7 rwatson K 8 svn:date V 27 2012-01-05T17:30:15.845350Z K 7 svn:log V 329 When extracting the VLAN tag from if_em and if_lem receive descriptor rings, copy the whole VLAN tag, not just the VLAN ID. This fixes a problem in which VLAN priority information was dropped when using offloaded VLAN processing with these drivers. Discussed with: jfv, rrs Sponsored by: ADARA Networks, Inc. MFC after: 3 days END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T18:21:17.652391Z K 7 svn:log V 291 MFC r228084: Reuse flag variable to represent driver internal states rather than using member variables in softc. While I'm here change media after setting IFF_DRV_RUNNING. This will remove unnecessary link state handling in vr_tick() if controller established a link immediately. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T18:22:48.658337Z K 7 svn:log V 291 MFC r228084: Reuse flag variable to represent driver internal states rather than using member variables in softc. While I'm here change media after setting IFF_DRV_RUNNING. This will remove unnecessary link state handling in vr_tick() if controller established a link immediately. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T18:24:02.625069Z K 7 svn:log V 291 MFC r228084: Reuse flag variable to represent driver internal states rather than using member variables in softc. While I'm here change media after setting IFF_DRV_RUNNING. This will remove unnecessary link state handling in vr_tick() if controller established a link immediately. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:26:44.093622Z K 7 svn:log V 68 MFC 227507: Finish making 'wcommitsize' an NFS client mount option. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:30:48.673705Z K 7 svn:log V 261 MFC 227562: Add single-message MSI support to mfi(4). It is disabled by default but can be enabled via the hw.mfi.msi tunable. Many mfi(4) controllers also support MSI-X, but in testing it seems that many adapters do not work with MSI-X but do work with MSI. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:31:08.420763Z K 7 svn:log V 261 MFC 227562: Add single-message MSI support to mfi(4). It is disabled by default but can be enabled via the hw.mfi.msi tunable. Many mfi(4) controllers also support MSI-X, but in testing it seems that many adapters do not work with MSI-X but do work with MSI. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:32:37.344612Z K 7 svn:log V 235 Update recently added drivers to use the if_*addr_r*lock() wrapper functions instead of using the IF_ADDR_LOCK directly. The wrapper functions are the supported interface for device drivers. Reviewed by: bz, philip MFC after: 1 week END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:35:49.260694Z K 7 svn:log V 300 Add new variants of the IF_ADDR_*LOCK*() macros used for protecting interface address lists that distinguish read locks from write locks. To preserve the KPI, the previous operations are mapped to the write lock macros. The lock is still kept as a mutex for now. Reviewed by: bz MFC after: 2 weeks END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:38:13.812862Z K 7 svn:log V 127 MFC 228181: If the -d flag is specified, ignore any new values specified and only display the descriptions of specified nodes. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:38:23.985259Z K 7 svn:log V 127 MFC 228181: If the -d flag is specified, ignore any new values specified and only display the descriptions of specified nodes. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:50:12.489268Z K 7 svn:log V 182 MFC 228185: Enhance the sequential access heuristic used to perform readahead in the NFS server and reuse it for writes as well to allow writes to the backing store to be clustered. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:50:37.283148Z K 7 svn:log V 182 MFC 228185: Enhance the sequential access heuristic used to perform readahead in the NFS server and reuse it for writes as well to allow writes to the backing store to be clustered. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:55:59.156752Z K 7 svn:log V 318 MFC 228207: When changing the user priority of a thread, change the real priority in addition to the user priority for threads whose current real priority is equal to the previous user priority or if the new priority is a real-time priority. This allows priority changes of other threads to have an immediate effect. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T18:56:23.388711Z K 7 svn:log V 318 MFC 228207: When changing the user priority of a thread, change the real priority in addition to the user priority for threads whose current real priority is equal to the previous user priority or if the new priority is a real-time priority. This allows priority changes of other threads to have an immediate effect. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:00:36.691973Z K 7 svn:log V 143 Convert all users of IF_ADDR_LOCK to use new locking macros that specify either a read lock or write lock. Reviewed by: bz MFC after: 2 weeks END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:02:52.994007Z K 7 svn:log V 125 Fix a logic bug in change 228207 in the check for a thread's new user priority being a realtime priority. MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:14:02.544505Z K 7 svn:log V 96 MFC 228278: Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP arguments. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:14:11.427335Z K 7 svn:log V 96 MFC 228278: Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP arguments. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:18:20.914145Z K 7 svn:log V 187 MFC 228496: Implement BUS_ADD_CHILD() for the isab(4) driver. It already calls bus_generic_probe() and bus_generic_attach() to handle drivers that add new children via identify methods. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:18:41.841418Z K 7 svn:log V 187 MFC 228496: Implement BUS_ADD_CHILD() for the isab(4) driver. It already calls bus_generic_probe() and bus_generic_attach() to handle drivers that add new children via identify methods. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:36:23.781158Z K 7 svn:log V 334 MFC 228361: Explicitly use curthread while manipulating td_fpop during last close of a devfs file descriptor in devfs_close_f(). The passed in td argument may be NULL if the close was invoked by garbage collection of open file descriptors in pending control messages in the socket buffer of a UNIX domain socket after it was closed. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:36:38.403340Z K 7 svn:log V 334 MFC 228361: Explicitly use curthread while manipulating td_fpop during last close of a devfs file descriptor in devfs_close_f(). The passed in td argument may be NULL if the close was invoked by garbage collection of open file descriptors in pending control messages in the socket buffer of a UNIX domain socket after it was closed. END K 10 svn:author V 3 wxs K 8 svn:date V 27 2012-01-05T19:44:44.303030Z K 7 svn:log V 31 Create libpcap-update project. END K 10 svn:author V 3 wxs K 8 svn:date V 27 2012-01-05T19:45:52.967451Z K 7 svn:log V 43 Bring tcpdump into libpcap-update project. END K 10 svn:author V 3 wxs K 8 svn:date V 27 2012-01-05T19:46:56.414421Z K 7 svn:log V 30 Bring libpcap build stuff in. END K 10 svn:author V 3 wxs K 8 svn:date V 27 2012-01-05T19:47:54.739958Z K 7 svn:log V 30 Bring tcpdump build stuff in. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:50:12.403098Z K 7 svn:log V 200 MFC 228089: Change the if_vlan driver to use if_transmit for forwarding packets to the parent interface. This avoids the overhead of queueing a packet to an IFQ only to immediately dequeue it again. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:50:47.196286Z K 7 svn:log V 200 MFC 228089: Change the if_vlan driver to use if_transmit for forwarding packets to the parent interface. This avoids the overhead of queueing a packet to an IFQ only to immediately dequeue it again. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:53:01.611210Z K 7 svn:log V 210 MFC 228593: Fire a kevent if necessary after seeking on a regular file. This fixes a case where a kevent would not fire on a regular file if an application read to EOF and then seeked backwards into the file. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:53:17.347219Z K 7 svn:log V 210 MFC 228593: Fire a kevent if necessary after seeking on a regular file. This fixes a case where a kevent would not fire on a regular file if an application read to EOF and then seeked backwards into the file. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:56:30.478898Z K 7 svn:log V 96 MFC 228866: Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the proper lock. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T19:56:54.205468Z K 7 svn:log V 96 MFC 228866: Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the proper lock. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-05T20:18:01.217279Z K 7 svn:log V 53 Add missing options so modules build/load correctly. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-05T20:19:33.650185Z K 7 svn:log V 11 Fix build. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:30:16.024552Z K 7 svn:log V 436 MFC r228086: Announce flow control capability to PHY drivers and enable flow control for all vr(4) controllers that support it. It's known that old vr(4) controllers(Rhine II) does not support TX pause but Rhine III supports both TX and RX pause. Make TX pause really work on Rhine III by letting controller know available RX buffers. While here, adjust XON/XOFF parameters to get better performance with flow control. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:31:58.202373Z K 7 svn:log V 436 MFC r228086: Announce flow control capability to PHY drivers and enable flow control for all vr(4) controllers that support it. It's known that old vr(4) controllers(Rhine II) does not support TX pause but Rhine III supports both TX and RX pause. Make TX pause really work on Rhine III by letting controller know available RX buffers. While here, adjust XON/XOFF parameters to get better performance with flow control. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:33:20.750451Z K 7 svn:log V 436 MFC r228086: Announce flow control capability to PHY drivers and enable flow control for all vr(4) controllers that support it. It's known that old vr(4) controllers(Rhine II) does not support TX pause but Rhine III supports both TX and RX pause. Make TX pause really work on Rhine III by letting controller know available RX buffers. While here, adjust XON/XOFF parameters to get better performance with flow control. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:37:13.412364Z K 7 svn:log V 62 MFC r228205: Add more controllers that support jumbo frame. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:37:28.733616Z K 7 svn:log V 62 MFC r228205: Add more controllers that support jumbo frame. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:37:42.476153Z K 7 svn:log V 62 MFC r228205: Add more controllers that support jumbo frame. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T20:41:40.707817Z K 7 svn:log V 333 MFC 224169 (gibbs): cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c: o Add zpool_pool_state_to_name() API to libzfs which converts a pool_state_t into a user consumable string. o While here, correct constness of make zpool_state_to_name() and zpool_label_disk(). END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T20:49:48.017431Z K 7 svn:log V 225 MFC r228286: Fix off by one error in mbuf access. Previously it caused panic. While I'm here use NULL to compare mbuf pointer and add additional check for zero length mbuf before accessing the mbuf. PR: kern/162932 END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T21:17:06.405346Z K 7 svn:log V 225 MFC r228286: Fix off by one error in mbuf access. Previously it caused panic. While I'm here use NULL to compare mbuf pointer and add additional check for zero length mbuf before accessing the mbuf. PR: kern/162932 END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-05T21:18:34.940062Z K 7 svn:log V 225 MFC r228286: Fix off by one error in mbuf access. Previously it caused panic. While I'm here use NULL to compare mbuf pointer and add additional check for zero length mbuf before accessing the mbuf. PR: kern/162932 END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:36:12.019757Z K 7 svn:log V 244 Pull up vendor changes to mdoc(7) This switches us to using -isoC-2011 as the symbol name which is used by groff and mdocml. It follows the change to 4 digit years as done with IEEE Std 1003 post-1999. MFC after: 2 weeks (groff changes only) END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:36:20.429970Z K 7 svn:log V 330 Document the detrimental effect of kern.cam.XX.retry_count for recoverdisk(1) recoverdisk(1) wants to know about read errors when doing the 1MB/64k reads as fast as possible so it can continue and retry them later with smaller reads (down to sector size). Any retries by lower layers will only slow it down. Prodded by: arundel END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:36:28.430134Z K 7 svn:log V 272 Partial backout of r228990, restore original MIB object name. It's too late to change this in 9.0 -- so we have a release with the misspelling in the wild and should not break users that depend on it. Deprecating/replacing it because of a one-char typo seems excessive. END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:36:36.149934Z K 7 svn:log V 122 Further fix a typo and spelling classic correctly in function names, too. Submitted by: Ben Kaduk END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:36:45.020584Z K 7 svn:log V 115 Touch up some more small typos missed in the previous round. Reported by: Ben Kaduk et al. END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:36:53.097789Z K 7 svn:log V 271 Convert files over to UTF-8. These files contained various combinations of Big5, eucJP and KOI8-U encoded strings. The byte representations of their respective encodings have been translated to $'...' escape sequences as understood by our sh(1). With help from: jilles END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-05T21:43:33.397613Z K 7 svn:log V 28 Apply Typo-B-Gone 2000 [TM] END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-05T21:49:43.330402Z K 7 svn:log V 206 Allow crunchgen binary link generation to be disabled. If CRUNCH_GENERATE_LINKS is set to "no", then no links will be generated. This defaults to "yes" so things like release crunch building still works. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-05T21:50:50.998245Z K 7 svn:log V 251 Allow extra directories to be added to the build-tools target. Things such as "sh" require local tools to be built before cross-compiling. This allows for extra software (that's built via LOCAL_DIRS) to also have a build-tools target where required. END K 10 svn:author V 8 andreast K 8 svn:date V 27 2012-01-05T22:06:01.156437Z K 7 svn:log V 49 Fix build on powerpc64 too. The same as r229640. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T22:14:18.438943Z K 7 svn:log V 73 MFC 227577: The sys/sysctl.h header is needed when MFI_DEBUG is defined. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T22:14:49.890236Z K 7 svn:log V 73 MFC 227577: The sys/sysctl.h header is needed when MFI_DEBUG is defined. END K 10 svn:author V 3 pjd K 8 svn:date V 27 2012-01-05T22:16:41.255549Z K 7 svn:log V 163 - Allow to change vfs.zfs.arc_meta_limit at runtime. - Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is not a tunable. MFC after: 3 days END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-01-05T22:28:40.847345Z K 7 svn:log V 1454 MFC ZFS userland to reduce diff with stable/9: r224170, r224526, r226583, r226613, r226615, r226616 MFC r224170 (gibbs): Correct reporting of missing leaf vdevs so that the GUID required to perform pool actions is always displayed. cddl/contrib/opensolaris/cmd/zpool/zpool_main.c: The "zpool status" command reports the "last seen at" device node path when the vdev name is being reported by GUID. Augment this code to assume a GUID is reported when a device goes missing after initial boot in addition to the previous behavior of doing this for devices that aren't seen at boot. cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c: In zpool_vdev_name(), report recently missing devices by GUID. There is no guarantee they will return at their previous location. MFC r224526 (mm, userland part only): Fix serious bug in ZIL that can lead to pool corruption in the case of a held dataset during remount. Detailed description is available at: https://www.illumos.org/issues/883 illumos-gate revision: 13380:161b964a0e10 MFC r226583 (pjd): Make all the lines align properly. MFC r226613 (pjd) [1]: libzpool task_alloc: pass only valid flags to kmem_alloc tqflags may contain other flags besided those that are suitable for kmem_alloc == umem_alloc MFC r226615 (pjd) [1]: thr_create: new_thread_ID may be NULL MFC r226616 (pjd) [1]: zdb: access dp_free_bpobj only if pool version is >= SPA_VERSION_DEADLISTS Submitted by: avg [1] END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-05T22:29:11.747743Z K 7 svn:log V 766 Remove the assertion from tcp_input() that rcv_nxt is always greater than or equal to rcv_adv and fix tcp_twstart() to handle this case by assuming the last window was zero rather than a negative value. The code in tcp_input() already safely handled this case. It can happen due to delayed ACKs along with a remote sender that sends data beyond the window we previously advertised. If we have room in our socket buffer for the extra data beyond the advertised window, we will accept it. However, if the ACK for that segment is delayed, then we will not effectively fixup rcv_adv to account for that extra data until the next segment arrives and forces out an ACK. When that next segment arrives, rcv_nxt will be beyond rcv_adv. Tested by: pjd MFC after: 1 week END K 10 svn:author V 2 mm K 8 svn:date V 27 2012-01-05T22:31:25.393906Z K 7 svn:log V 187 MFC r226617 (pjd): zfs vdev_file_io_start: validate vdev before using vdev_tsd vdev_tsd can be NULL for certain vdev states. At least in userland testing with ztest. Submitted by: avg END K 10 svn:author V 7 ghelmer K 8 svn:date V 27 2012-01-05T22:48:36.353131Z K 7 svn:log V 271 Allow daemon(8) to run pidfile_open() before relenquishing privileges so pid files can be written in /var/run when started as root. I do not expect this to cause any security issues, but if anyone objects it could be easily reverted. PR: bin/159568 MFC after: 4 weeks END K 10 svn:author V 7 ghelmer K 8 svn:date V 27 2012-01-05T23:08:11.571072Z K 7 svn:log V 130 Fix a memory leak in addgroup() by ensuring the allocated memory is freed if an error occurs. PR: bin/161510 MFC after: 4 weeks END K 10 svn:author V 7 rwatson K 8 svn:date V 27 2012-01-05T23:11:05.663290Z K 7 svn:log V 175 Replace an OpenBSDism with a FreeBSDism in the pfctl(8) man page: we put configuration file man pages in section 5, and we prefer rc.conf to rc.conf.local. MFC after: 3 days END K 10 svn:author V 7 attilio K 8 svn:date V 27 2012-01-05T23:12:19.662058Z K 7 svn:log V 4 MFC END K 10 svn:author V 9 jimharris K 8 svn:date V 27 2012-01-06T00:22:55.227405Z K 7 svn:log V 109 Add 0x2826 device ID for C600 (Patsburg) SATA controller in RAID mode. Reviewed by: mav Approved by: scottl END K 10 svn:author V 7 pluknet K 8 svn:date V 27 2012-01-06T00:23:17.221897Z K 7 svn:log V 32 Fix a typo. X-MFC-with: 229665 END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-06T00:34:27.236139Z K 7 svn:log V 108 Fix the broken non-cross compile build. Oops! Another pointy hat to: adrian, for stirring up more trouble. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2012-01-06T00:42:32.927578Z K 7 svn:log V 227 MFC: r227760 Add two arguments to the nfsrpc_rellockown() function in the NFSv4 client. This does not change the client's behaviour, but prepares the code so that nfsrpc_rellockown() can be called elsewhere in a future commit. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-06T00:56:31.396847Z K 7 svn:log V 717 Import the first cut of "bsdbox". This uses the existing crunchgen infrastructure to build a series of tools designed to replace the base and networking tools on an embedded system. It reuses 'bsd.crunchgen.mk' to drive the actual file creation. The rescue build system also uses this. Unlike busybox, it doesn't include its own source - instead, it just builds from the sources in /usr/src/ and leverages the existing BSD framework. Thie is still quite messy and could do with a whole lot of cleaning up. However it is proving to be very useful with my current build framework, allowing me to build binary root images that are about 30% less than simply cherrypicking files and libraries from an installworld. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2012-01-06T01:20:48.171083Z K 7 svn:log V 227 MFC: r227760 Add two arguments to the nfsrpc_rellockown() function in the NFSv4 client. This does not change the client's behaviour, but prepares the code so that nfsrpc_rellockown() can be called elsewhere in a future commit. END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2012-01-06T01:23:26.256298Z K 7 svn:log V 204 - Add better COP2 (crypto coprocessor) context handler for Octeon. Keep COP2 disabled and lazily allocate COP2 context structure in exception handler. Keep kernel and userland contexts separated. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2012-01-06T01:57:41.866912Z K 7 svn:log V 155 MFC: r227796 Clean up some cruft in the NFSv4 client left over from the OpenBSD port, so that it is more readable. No logic change is made by this commit. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2012-01-06T02:23:33.549761Z K 7 svn:log V 155 MFC: r227796 Clean up some cruft in the NFSv4 client left over from the OpenBSD port, so that it is more readable. No logic change is made by this commit. END K 10 svn:author V 6 eadler K 8 svn:date V 27 2012-01-06T02:24:29.493108Z K 7 svn:log V 114 MFC r227488: - add "check" option to MD5 and friends to compare files against known hash. Approved by: cperciva END K 10 svn:author V 6 eadler K 8 svn:date V 27 2012-01-06T02:27:43.322959Z K 7 svn:log V 114 MFC r227488: - add "check" option to MD5 and friends to compare files against known hash. Approved by: cperciva END K 10 svn:author V 6 eadler K 8 svn:date V 27 2012-01-06T02:28:21.512810Z K 7 svn:log V 114 MFC r227488: - add "check" option to MD5 and friends to compare files against known hash. Approved by: cperciva END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-01-06T05:03:22.794264Z K 7 svn:log V 91 - Update copyright year. - Add SA-11:0[12456789] and -11:10. - Update the upgrade section. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-01-06T05:08:51.525061Z K 7 svn:log V 40 Update entities and variables for 9.0R. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-01-06T05:12:57.473198Z K 7 svn:log V 61 - Update copyright year. - Add SA-11:0[12456789] and -11:10. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2012-01-06T05:17:43.498758Z K 7 svn:log V 77 - Update copyright year. - Remove a paragraph which describes sysinstall(8). END K 10 svn:author V 5 kevlo K 8 svn:date V 27 2012-01-06T05:45:23.551020Z K 7 svn:log V 54 MFC r229379: Add support for Intel EG20T serial ports END K 10 svn:author V 5 kevlo K 8 svn:date V 27 2012-01-06T05:48:52.317209Z K 7 svn:log V 85 MFC r228048: Plug memory leaks and fix open(2) error check. Reviewed by: nwhitehorn END K 10 svn:author V 5 kevlo K 8 svn:date V 27 2012-01-06T05:51:00.845407Z K 7 svn:log V 106 MFC r227871: Remove unused variable mii. This variable is initialized but not used. Reviewed by: yongari END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-01-06T08:46:26.776166Z K 7 svn:log V 190 Merge r226830 from head/: Add macro IF_DEQUEUE_ALL(ifq, m), that takes the entire mbuf chain off the queue. It can be utilized in queue processing to avoid multiple locking/unlocking. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2012-01-06T08:51:20.854262Z K 7 svn:log V 62 Flip these options on so the modules build correctly for now. END K 10 svn:author V 2 jh K 8 svn:date V 27 2012-01-06T09:17:34.078668Z K 7 svn:log V 145 Check the return value of sbuf_finish() in pfs_readlink() and return ENAMETOOLONG if the buffer overflowed. Approved by: des MFC after: 2 weeks END K 10 svn:author V 8 andreast K 8 svn:date V 27 2012-01-06T09:21:40.837567Z K 7 svn:log V 51 Use the macro WEAK_ALIAS. Tested on 32 and 64-bit. END K 10 svn:author V 2 jh K 8 svn:date V 27 2012-01-06T10:12:59.593467Z K 7 svn:log V 529 r222004 changed sbuf_finish() to not clear the buffer error status. As a consequence sbuf_len() will return -1 for buffers which had the error status set prior to sbuf_finish() call. This causes a problem in pfs_read() which purposely uses a fixed size sbuf to discard bytes which are not needed to fulfill the read request. Work around the problem by using the full buffer length when sbuf_finish() indicates an overflow. An overflowed sbuf with fixed size is always full. PR: kern/163076 Approved by: des MFC after: 2 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-01-06T11:06:15.606067Z K 7 svn:log V 92 MFC r228838: Optimize the common case of msyncing the whole file mapping with MS_SYNC flag. END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-01-06T11:06:48.369088Z K 7 svn:log V 92 MFC r228838: Optimize the common case of msyncing the whole file mapping with MS_SYNC flag. END K 10 svn:author V 3 uqs K 8 svn:date V 27 2012-01-06T11:42:03.022352Z K 7 svn:log V 36 Fix mdoc date from previous commit. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-01-06T12:05:43.547263Z K 7 svn:log V 46 Since r228571 CARP is no longer an interface. END K 10 svn:author V 3 pjd K 8 svn:date V 27 2012-01-06T12:27:17.884050Z K 7 svn:log V 38 Constify argument. MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-06T12:49:01.124160Z K 7 svn:log V 74 Tweak the last fix to match what was actually tested. Pointy hat to: jhb END K 10 svn:author V 3 pjd K 8 svn:date V 27 2012-01-06T14:00:31.909222Z K 7 svn:log V 129 Add 'nojail' keyword as auditd(8) can't really do anything useful when inside a jail. Discussed with: rwatson MFC after: 1 week END K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-01-06T15:01:05.769222Z K 7 svn:log V 11 Fix build. END K 10 svn:author V 3 kib K 8 svn:date V 27 2012-01-06T15:07:28.114251Z K 7 svn:log V 203 MFC r227697: Change the interface for VOP_VPTOCNP(), now the dvp must be referenced. Convert all in-tree implementations of VOP_VPTOCNP(). This fixes VOP_VPTOCNP bypass for nullfs. Approved by: re (bz) END K 10 svn:author V 2 ed K 8 svn:date V 27 2012-01-06T16:20:17.282731Z K 7 svn:log V 303 Add an even faster implementation of for the future. Instead of using an exponential number of cases with respect to the number of arguments, this version only uses a linear number. Unfortunately, it works with Clang, GCC 4.6 and GCC 4.7, but not GCC 4.2. Therefore, leave it commented out. END K 10 svn:author V 7 trociny K 8 svn:date V 27 2012-01-06T16:45:44.570585Z K 7 svn:log V 51 MFC r227954: Add const qualifier to rlimit_ident. END K 10 svn:author V 7 trociny K 8 svn:date V 27 2012-01-06T16:46:52.483283Z K 7 svn:log V 51 MFC r227954: Add const qualifier to rlimit_ident. END K 10 svn:author V 7 trociny K 8 svn:date V 27 2012-01-06T16:54:16.558606Z K 7 svn:log V 205 MFC r227316: Add KVME_FLAG_SUPER and use it in sysctl_kern_proc_vmmap for marking entries with superpages. Submitted by: Mel Flynn Reviewed by: alc, rwatson END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-06T16:56:09.470764Z K 7 svn:log V 234 MFC 228967: Update if_obytes and if_omcast after successful transmit. While I'm here update if_oerrors if parent interface of vlan is not up and running. Previously it updated collision counter and it was confusing to interprete it. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2012-01-06T16:57:29.420072Z K 7 svn:log V 234 MFC 228967: Update if_obytes and if_omcast after successful transmit. While I'm here update if_oerrors if parent interface of vlan is not up and running. Previously it updated collision counter and it was confusing to interprete it. END K 10 svn:author V 7 trociny K 8 svn:date V 27 2012-01-06T16:57:56.634807Z K 7 svn:log V 198 MFC r227317, r227355: When displaying process virtual memory mappings print superpage mapping flag. Submitted by: Mel Flynn Reviewed by: alc, rwatson END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T18:15:27.040723Z K 7 svn:log V 1274 MFC r228291-228293,228297-228298: r228291: Remove NetBSD license. r199548 removed all bit macros that were derived from NetBSD. r228292: Implement suspend/resume methods. Driver has no issue with suspend/resume. r228293: Fix alt(4) support. Also add check for number of available TX descriptors before trying to send frames. If we're not able to send a frame, make sure to prepend it to if_snd queue such that alt(4) should work. While I'm here prefer ETHER_BPF_MTAP to BPF_MTAP. ETHER_BPF_MTAP should be used for controllers that support VLAN hardware tag insertion. The controller supports VLAN tag insertion but lacks VLAN tag stripping in RX path though. r228297: et(4) supports VLAN oversized frame so correctly set header length. While I'm here remove initializing if_mtu, it is set by ether_ifattach(9). Also move callout_init_mtx(9) to the right below driver lock initialization. r228298: Make et_probe() return BUS_PROBE_DEFAULT such that allow other driver that has high precedence for the controller override et(4). Add missing callout_drain(9) in device detach and rework detach routine. While I'm here use rman_get_rid(9) instead of using cached resource id because bus methods are free to change the id. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T18:16:57.885032Z K 7 svn:log V 1274 MFC r228291-228293,228297-228298: r228291: Remove NetBSD license. r199548 removed all bit macros that were derived from NetBSD. r228292: Implement suspend/resume methods. Driver has no issue with suspend/resume. r228293: Fix alt(4) support. Also add check for number of available TX descriptors before trying to send frames. If we're not able to send a frame, make sure to prepend it to if_snd queue such that alt(4) should work. While I'm here prefer ETHER_BPF_MTAP to BPF_MTAP. ETHER_BPF_MTAP should be used for controllers that support VLAN hardware tag insertion. The controller supports VLAN tag insertion but lacks VLAN tag stripping in RX path though. r228297: et(4) supports VLAN oversized frame so correctly set header length. While I'm here remove initializing if_mtu, it is set by ether_ifattach(9). Also move callout_init_mtx(9) to the right below driver lock initialization. r228298: Make et_probe() return BUS_PROBE_DEFAULT such that allow other driver that has high precedence for the controller override et(4). Add missing callout_drain(9) in device detach and rework detach routine. While I'm here use rman_get_rid(9) instead of using cached resource id because bus methods are free to change the id. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T18:18:25.540888Z K 7 svn:log V 1274 MFC r228291-228293,228297-228298: r228291: Remove NetBSD license. r199548 removed all bit macros that were derived from NetBSD. r228292: Implement suspend/resume methods. Driver has no issue with suspend/resume. r228293: Fix alt(4) support. Also add check for number of available TX descriptors before trying to send frames. If we're not able to send a frame, make sure to prepend it to if_snd queue such that alt(4) should work. While I'm here prefer ETHER_BPF_MTAP to BPF_MTAP. ETHER_BPF_MTAP should be used for controllers that support VLAN hardware tag insertion. The controller supports VLAN tag insertion but lacks VLAN tag stripping in RX path though. r228297: et(4) supports VLAN oversized frame so correctly set header length. While I'm here remove initializing if_mtu, it is set by ether_ifattach(9). Also move callout_init_mtx(9) to the right below driver lock initialization. r228298: Make et_probe() return BUS_PROBE_DEFAULT such that allow other driver that has high precedence for the controller override et(4). Add missing callout_drain(9) in device detach and rework detach routine. While I'm here use rman_get_rid(9) instead of using cached resource id because bus methods are free to change the id. END K 10 svn:author V 2 np K 8 svn:date V 27 2012-01-06T18:29:40.773497Z K 7 svn:log V 81 Always release the inp lock before returning from tcp_detach. MFC after: 5 days END K 10 svn:author V 8 andreast K 8 svn:date V 27 2012-01-06T18:37:49.664404Z K 7 svn:log V 63 Silence a warning about redefinition of TARGET_ELF on powerpc. END K 10 svn:author V 2 ed K 8 svn:date V 27 2012-01-06T19:04:59.082562Z K 7 svn:log V 539 Last attempt at : do enable the new code for C11 compilers. I was thinking by myself, if the new code doesn't work with GCC 4.2, why not simply turn it into an efficient version for C11 compilers? By changing the code to use _Generic() directly in that case, I can build the tgmath regression test in a matter of milliseconds with Clang, instead of the 8 seconds it used to take. So by the time C11 becomes the default, it will pick up the new code automatically. And now I will refrain from making more changes to . END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T19:09:47.473307Z K 7 svn:log V 3925 MFC r228325: Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path. This change should make et(4) work on any architectures. o Remove m_getl inline function and replace it with stanard mbuf interfaces. Previous code tried to minimize code duplication but this came from incorrect use of common DMA tag. Driver may be still use a common RX allocation handler with additional structure changes but I don't see much point to do that it would make it hard to understand the code. o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use ETHER_VLAN_ENCAP_LEN instead. o Add bunch of new RX status definition. It seems controller supports RX checksum offloading but I was not able to make the feature work yet. Currently driver checks whether recevied frame is good one or not. o Avoid a typedef ending in '_t' as style(9) says. o Controller has no restriction on DMA address space, so there is no reason to limit the DMA address to 32bit. Descriptor rings, status blocks and TX/RX buffers now use full 64bit DMA addressing. o Allocate DMA memory shared between host and controller as coherent. o Create 3 separate DMA tags to be used as TX, mini RX ring and stanard RX ring. Previously it created a single DMA tag and it was used to all three rings. o et(4) does not support jumbo frame at this moment and I still don't quite understand how jumbo frame works on this controller so use two RX rings to handle small sized frame and normal sized frame respectively. The mini RX ring will be used to receive frames that are less than or equal to 127 bytes. The second RX ring is used to receive frames that are not handled by the first RX ring. If jumbo frame support is implemented, driver may have to choose better RX scheme by letting the second RX ring handle jumbo frames. This scheme will mimic Broadcom's efficient jumbo frame handling feature. However RAM buffer size(16KB) of the controller is too small to hold 2 jumbo frames, if 9KB jumbo frame is used, I'm not sure how good performance would it have. o In et_rxeof(), make sure to check whether controller received good frame or not. Passing corrupted frame to upper layer is bad idea. o If driver receives a bad frame or driver fails to allocate RX buffer due to resource shortage condition, reuse previously loaded DMA map for RX buffer instead of unloading/loading RX buffer again. o et_init_tx_ring() never fails so change return type to void. o In watchdog handler, show TX DMA write back status of errored frame which could be used as a clue to debug watchdog timeout. o Add missing bus_dmamap_sync() in various places such that et(4) should work with bounce buffers(e.g. PAE). o TX side bus_dmamap_load_mbuf_sg(9) support. o RX side bus_dmamap_load_mbuf_sg(9) support. o Controller has no DMA alignment limit in RX buffer so use m_adj(9) in RX buffer allocation to make IP header align on 2 bytes boundary. Otherwise it would trigger unaligned access error in upper layer on strict alignment architectures. One of down side of controller is it provides limited set of RX buffer length like most Intel controllers. This is not problem at this moment because driver does not support jumbo frame yet but it may require alignment fixup code to support jumbo frame on strict alignment architectures. o In et_txeof(), don't zero TX descriptors for transmitted frames. TX descriptors don't need write access after transmission. Driver sets IFF_DRV_OACTIVE when the number of available TX descriptors are less than or equal to ET_NSEG_SPARE. Make sure to clear IFF_DRV_OACTIVE only when the number of available TX descriptor is greater than ET_NSEG_SPARE. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T19:11:20.174722Z K 7 svn:log V 3925 MFC r228325: Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path. This change should make et(4) work on any architectures. o Remove m_getl inline function and replace it with stanard mbuf interfaces. Previous code tried to minimize code duplication but this came from incorrect use of common DMA tag. Driver may be still use a common RX allocation handler with additional structure changes but I don't see much point to do that it would make it hard to understand the code. o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use ETHER_VLAN_ENCAP_LEN instead. o Add bunch of new RX status definition. It seems controller supports RX checksum offloading but I was not able to make the feature work yet. Currently driver checks whether recevied frame is good one or not. o Avoid a typedef ending in '_t' as style(9) says. o Controller has no restriction on DMA address space, so there is no reason to limit the DMA address to 32bit. Descriptor rings, status blocks and TX/RX buffers now use full 64bit DMA addressing. o Allocate DMA memory shared between host and controller as coherent. o Create 3 separate DMA tags to be used as TX, mini RX ring and stanard RX ring. Previously it created a single DMA tag and it was used to all three rings. o et(4) does not support jumbo frame at this moment and I still don't quite understand how jumbo frame works on this controller so use two RX rings to handle small sized frame and normal sized frame respectively. The mini RX ring will be used to receive frames that are less than or equal to 127 bytes. The second RX ring is used to receive frames that are not handled by the first RX ring. If jumbo frame support is implemented, driver may have to choose better RX scheme by letting the second RX ring handle jumbo frames. This scheme will mimic Broadcom's efficient jumbo frame handling feature. However RAM buffer size(16KB) of the controller is too small to hold 2 jumbo frames, if 9KB jumbo frame is used, I'm not sure how good performance would it have. o In et_rxeof(), make sure to check whether controller received good frame or not. Passing corrupted frame to upper layer is bad idea. o If driver receives a bad frame or driver fails to allocate RX buffer due to resource shortage condition, reuse previously loaded DMA map for RX buffer instead of unloading/loading RX buffer again. o et_init_tx_ring() never fails so change return type to void. o In watchdog handler, show TX DMA write back status of errored frame which could be used as a clue to debug watchdog timeout. o Add missing bus_dmamap_sync() in various places such that et(4) should work with bounce buffers(e.g. PAE). o TX side bus_dmamap_load_mbuf_sg(9) support. o RX side bus_dmamap_load_mbuf_sg(9) support. o Controller has no DMA alignment limit in RX buffer so use m_adj(9) in RX buffer allocation to make IP header align on 2 bytes boundary. Otherwise it would trigger unaligned access error in upper layer on strict alignment architectures. One of down side of controller is it provides limited set of RX buffer length like most Intel controllers. This is not problem at this moment because driver does not support jumbo frame yet but it may require alignment fixup code to support jumbo frame on strict alignment architectures. o In et_txeof(), don't zero TX descriptors for transmitted frames. TX descriptors don't need write access after transmission. Driver sets IFF_DRV_OACTIVE when the number of available TX descriptors are less than or equal to ET_NSEG_SPARE. Make sure to clear IFF_DRV_OACTIVE only when the number of available TX descriptor is greater than ET_NSEG_SPARE. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T19:12:47.995332Z K 7 svn:log V 3925 MFC r228325: Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path. This change should make et(4) work on any architectures. o Remove m_getl inline function and replace it with stanard mbuf interfaces. Previous code tried to minimize code duplication but this came from incorrect use of common DMA tag. Driver may be still use a common RX allocation handler with additional structure changes but I don't see much point to do that it would make it hard to understand the code. o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use ETHER_VLAN_ENCAP_LEN instead. o Add bunch of new RX status definition. It seems controller supports RX checksum offloading but I was not able to make the feature work yet. Currently driver checks whether recevied frame is good one or not. o Avoid a typedef ending in '_t' as style(9) says. o Controller has no restriction on DMA address space, so there is no reason to limit the DMA address to 32bit. Descriptor rings, status blocks and TX/RX buffers now use full 64bit DMA addressing. o Allocate DMA memory shared between host and controller as coherent. o Create 3 separate DMA tags to be used as TX, mini RX ring and stanard RX ring. Previously it created a single DMA tag and it was used to all three rings. o et(4) does not support jumbo frame at this moment and I still don't quite understand how jumbo frame works on this controller so use two RX rings to handle small sized frame and normal sized frame respectively. The mini RX ring will be used to receive frames that are less than or equal to 127 bytes. The second RX ring is used to receive frames that are not handled by the first RX ring. If jumbo frame support is implemented, driver may have to choose better RX scheme by letting the second RX ring handle jumbo frames. This scheme will mimic Broadcom's efficient jumbo frame handling feature. However RAM buffer size(16KB) of the controller is too small to hold 2 jumbo frames, if 9KB jumbo frame is used, I'm not sure how good performance would it have. o In et_rxeof(), make sure to check whether controller received good frame or not. Passing corrupted frame to upper layer is bad idea. o If driver receives a bad frame or driver fails to allocate RX buffer due to resource shortage condition, reuse previously loaded DMA map for RX buffer instead of unloading/loading RX buffer again. o et_init_tx_ring() never fails so change return type to void. o In watchdog handler, show TX DMA write back status of errored frame which could be used as a clue to debug watchdog timeout. o Add missing bus_dmamap_sync() in various places such that et(4) should work with bounce buffers(e.g. PAE). o TX side bus_dmamap_load_mbuf_sg(9) support. o RX side bus_dmamap_load_mbuf_sg(9) support. o Controller has no DMA alignment limit in RX buffer so use m_adj(9) in RX buffer allocation to make IP header align on 2 bytes boundary. Otherwise it would trigger unaligned access error in upper layer on strict alignment architectures. One of down side of controller is it provides limited set of RX buffer length like most Intel controllers. This is not problem at this moment because driver does not support jumbo frame yet but it may require alignment fixup code to support jumbo frame on strict alignment architectures. o In et_txeof(), don't zero TX descriptors for transmitted frames. TX descriptors don't need write access after transmission. Driver sets IFF_DRV_OACTIVE when the number of available TX descriptors are less than or equal to ET_NSEG_SPARE. Make sure to clear IFF_DRV_OACTIVE only when the number of available TX descriptor is greater than ET_NSEG_SPARE. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T19:24:33.355995Z K 7 svn:log V 3539 MFC r228326-228327,228331-228332: r228326: Controller does not require TX start command for every frame. So send a single TX command after setting up all TX frames. This removes unnecessary register accesses and bus_dmamap_sync(9) calls. et(4) uses TX interrupt moderation so it's possible to have TX buffers that were already transmitted but waiting for TX completion interrupt. If the number of available TX descriptor is less then 1/3 of total TX descriptor, try reclaiming first to get enough free TX descriptors before setting up TX descriptors. After r228325, et_txeof() no longer tries to send frames after reclaiming TX buffers. That change was made to give more chance to transmit frames in main interrupt handler since we can still send frames in interrupt handler with RX interrupt. So right before exiting interrupt hander, after enabling interrupt, try to send more frames. This gives slightly better performance numbers. While I'm here reduce number of spare TX descriptors from 8 to 4. Controller does not require reserved TX descriptors, it was just to reduce TX overhead. After r228325, driver has much lower TX overhead so it does not make sense to reserve 8 TX descriptors. r228327: Remove et_enable_intrs(), et_disable_intrs() functions and manipulation of interrupt register access is done through CSR_WRITE_4 macro. Also add disabling interrupt into et_reset() because we want interrupt disabled state after controller reset. While I'm here slightly change interrupt handler to be more readable one. r228331: Rework link state tracking and TX/RX MAC configuration. o Do not report link status if driver is not running. o TX/RX MAC configuration should be done with resolved speed, duplex and flow control after establishing a link so it can't be done in driver initialization routine. Move the configuration to miibus_statchg callback which will be called whenever any link state change is detected. At this moment, flow-control is not enabled yet mainly because I was not able to set correct flow control parameters to generate TX pause frames. o Now TX/RX MAC is enabled only when a valid link is detected. Rearragnge hardware initialization routine a bit to leave enabling MAC to miibus_statchg callback. In order to that, TX/RX DMA engine is enabled in et_init_locked(). o Introduce ET_FLAG_LINK flag to track current link state. o Introduce ET_FLAG_FASTETHER flag to mark whether controller is fast ethernet. This flag is checked in miibus_statchg callback to know whether PHY established a valid link. o In et_stop(), TX/RX MAC is explicitly disabled instead of relying on et_reset(). And move et_reset() from et_stop() to controller initialization. Controler reset is not required here and it would also clear critial registers(i.e station address, RX filter configuration, WOL etc) that are required to make WOL work. o Switching to current media is done in et_init_locked() after setting IFF_DRV_RUNNING flag. This should ensure reliable auto-negotiation/manual link establishment. o In et_start_locked(), check whether driver got a valid link before trying to send frames. o Remove checking a link in et_tick() as this is done by miibus_statchg callback. r228332: Implement hardware MAC statistics counter. Counters could be queried with dev.et.%d.stats sysctl node where %d is an instance of device. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2012-01-06T19:26:31.183435Z K 7 svn:log V 3539 MFC r228326-228327,228331-228332: r228326: Controller does not require TX start command for every frame. So send a single TX command after setting up all TX frames. This removes unnecessary register accesses and bus_dmamap_sync(9) calls. et(4) uses TX interrupt moderation so it's possible to have TX buffers that were already transmitted but waiting for TX completion interrupt. If the number of available TX descriptor is less then 1/3 of total TX descriptor, try reclaiming first to get enough free TX descriptors before setting up TX descriptors. After r228325, et_txeof() no longer tries to send frames after reclaiming TX buffers. That change was made to give more chance to transmit frames in main interrupt handler since we can still send frames in interrupt handler with RX interrupt. So right before exiting interrupt hander, after enabling interrupt, try to send more frames. This gives slightly better performance numbers. While I'm here reduce number of spare TX descriptors from 8 to 4. Controller does not require reserved TX descriptors, it was just to reduce TX overhead. After r228325, driver has much lower TX overhead so it does not make sense to reserve 8 TX descriptors. r228327: Remove et_enable_intrs(), et_disable_intrs() functions and manipulation of interrupt register access is done through CSR_WRITE_4 macro. Also add disabling interrupt into et_reset() because we want interrupt disabled state after controller reset. While I'm here slightly change interrupt handler to be more readable one. r228331: Rework link state tracking and TX/RX MAC configuration. o Do not report link status if driver is not running. o TX/RX MAC configuration should be done with resolved speed, duplex and flow control after establishing a link so it can't be done in driver initialization routine. Move the configuration to miibus_statchg callback which will be called whenever any link state change is detected. At this moment, flow-control is not enabled yet mainly because I was not able to set correct flow control parameters to generate TX pause frames. o Now TX/RX MAC is enabled only when a valid link is detected. Rearragnge hardware initialization routine a bit to leave enabling MAC to miibus_statchg callback. In order to that, TX/RX DMA engine is enabled in et_init_locked(). o Introduce ET_FLAG_LINK flag to track current link state. o Introduce ET_FLAG_FASTETHER flag to mark whether controller is fast ethernet. This flag is checked in miibus_statchg callback to know whether PHY established a valid link. o In et_stop(), TX/RX MAC is explicitly disabled instead of relying on et_reset(). And move et_reset() from et_stop() to controller initialization. Controler reset is not required here and it would also clear critial registers(i.e station address, RX filter configuration, WOL etc) that are required to make WOL work. o Switching to current media is done in et_init_locked() after setting IFF_DRV_RUNNING flag. This should ensure reliable auto-negotiation/manual link establishment. o In et_start_locked(), check whether driver got a valid link before trying to send frames. o Remove checking a link in et_tick() as this is done by miibus_statchg callback. r228332: Implement hardware MAC statistics counter. Counters could be queried with dev.et.%d.stats sysctl node where %d is an instance of device. END