ƒ·U228184 149 245 1316 143 157 157 917 917 256 488 633 376 184 297 99 222 133 436 770 173 285 258 143 240 419 181 442 99 449 148 147 146 137 149 874 261 197 179 202 395 142 156 169 217 219 201 450 133 177 173 233 233 264 296 521 521 144 400 413 228 400 310 558 310 558 138 223 223 217 217 570 153 397 254 1151 333 758 604 266 711 324 215 280 184 210 211 148 210 238 265 244 261 122 1786 165 197 157 161 640 160 350 207 108 301 687 682 233 826 181 172 540 101 126 160 318 419 145 177 1831 232 199 171 210 585 353 135 138 238 157 528 225 397 141 142 379 193 260 133 191 778 146 132 3876 1256 418 745 203 384 1831 235 K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-12-01T15:33:58.159257Z K 7 svn:log V 152 Add Pedro Giffuni (pfg) as a new src committer. I will be mentoring him. Pedro will be working on ext2fs changes among other tasks. Approved by: core END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-12-01T18:46:28.849896Z K 7 svn:log V 1222 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. - Use a prime number for the size of the heuristic table (1017 is not prime). - Move the logic to locate a heuristic entry from the table and compute the sequential count out of VOP_READ() and into a separate routine. - Use the logic from sequential_heuristic() in vfs_vnops.c to update the seqcount when a sequential access is performed rather than just increasing seqcount by 1. This lets the clustering count ramp up faster. - Allow for some reordering of RPCs and if it is detected leave the current seqcount as-is rather than dropping back to a seqcount of 1. Also, when out of order access is encountered, cut seqcount in half rather than dropping it all the way back to 1 to further aid with reordering. - Fix the new NFS server to properly update the next offset after a successful VOP_READ() so that the readahead actually works. Some of these changes came from an earlier patch by Bjorn Gronwall that was forwarded to me by bde@. Discussed with: bde, rmacklem, fs@ Submitted by: Bjorn Gronwall (1, 4) MFC after: 2 weeks END K 10 svn:author V 6 sbruno K 8 svn:date V 27 2011-12-01T19:57:13.658042Z K 7 svn:log V 48 Open the device before calling detect_recv_fn() END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-12-01T20:38:52.461139Z K 7 svn:log V 65 MFC 227389: Remove some debugging printfs. Approved by: re (bz) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-12-01T20:39:18.036663Z K 7 svn:log V 65 MFC 227389: Remove some debugging printfs. Approved by: re (bz) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2011-12-01T21:13:41.445509Z K 7 svn:log V 822 Upgrade to BIND 9.8.1-P1 to address the following DDOS bug: Recursive name servers are failing with an assertion: INSIST(! dns_rdataset_isassociated(sigrdataset)) At this time it is not thought that authoritative-only servers are affected, but information about this bug is evolving rapidly. Because it may be possible to trigger this bug even on networks that do not allow untrusted users to access the recursive name servers (perhaps via specially crafted e-mail messages, and/or malicious web sites) it is recommended that ALL operators of recursive name servers upgrade immediately. For more information see: https://www.isc.org/software/bind/advisories/cve-2011-4313 which will be updated as more information becomes available. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313 Approved by: re (kib) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2011-12-01T21:17:59.668728Z K 7 svn:log V 822 Upgrade to BIND 9.8.1-P1 to address the following DDOS bug: Recursive name servers are failing with an assertion: INSIST(! dns_rdataset_isassociated(sigrdataset)) At this time it is not thought that authoritative-only servers are affected, but information about this bug is evolving rapidly. Because it may be possible to trigger this bug even on networks that do not allow untrusted users to access the recursive name servers (perhaps via specially crafted e-mail messages, and/or malicious web sites) it is recommended that ALL operators of recursive name servers upgrade immediately. For more information see: https://www.isc.org/software/bind/advisories/cve-2011-4313 which will be updated as more information becomes available. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313 Approved by: re (kib) END K 10 svn:author V 6 obrien K 8 svn:date V 27 2011-12-01T22:50:10.820218Z K 7 svn:log V 160 Ensure kldxref is run first. Currently both 'kldxref' and 'kld' depend on "FILESYSTEMS" and 'kld' is being run 8 scripts ahead of 'kldxref'. Reported by: dhw END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2011-12-02T00:38:47.818988Z K 7 svn:log V 390 Add a screen that asks if the user would like to enable crash dumps, giving them a very brief description of the trade-offs. Whether the user opts in or out add an entry to what will become /etc/rc.conf explaining what dumpdev is and how to turn on/off crash dumps. The folks who handle interacting with users submitting PRs have asked for this. Reviewed by: nwhitehorn MFC after: 1 day END K 10 svn:author V 6 obrien K 8 svn:date V 27 2011-12-02T01:06:33.522083Z K 7 svn:log V 537 Tweak the r137233 fix to r136283 -- Code was making two send() attempts vs. the comment documented "If we are working with a privileged socket, then take only one attempt". Make the code match. Furthermore, critical privileged applications that [over] log a vast amount can look like a DoS to this code. Given it's unlikely the single reattempted send() will succeeded, avoid usurping the scheduler in a library API for a single non-critical facility in critical applications. Obtained from: Juniper Networks Discussed with: glebius END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-12-02T02:05:26.388273Z K 7 svn:log V 275 Prevent user astonishment by providing the shell option at the end, after any installer-provided configuration files have been copied. This allows users to edit their fstab, if desired, and to see what the installer has placed in rc.conf. Requested by: phk MFC after: 1 day END K 10 svn:author V 5 kevlo K 8 svn:date V 27 2011-12-02T02:19:03.757253Z K 7 svn:log V 90 Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list(). END K 10 svn:author V 4 fjoe K 8 svn:date V 27 2011-12-02T09:09:54.322496Z K 7 svn:log V 203 Revert to conservative defaults. WITH_PROFILE is a default now. NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact so that the reversal to the WITHOUT_PROFILE will be easier in future. END K 10 svn:author V 4 fjoe K 8 svn:date V 27 2011-12-02T09:28:19.798561Z K 7 svn:log V 7 Regen. END K 10 svn:author V 7 fabient K 8 svn:date V 27 2011-12-02T10:02:49.139337Z K 7 svn:log V 125 Update Westmere uncore event exception list. Submitted by: Davide Italiano MFC after: 1 week END K 10 svn:author V 6 obrien K 8 svn:date V 27 2011-12-02T11:55:09.940056Z K 7 svn:log V 38 Split sentences at period boundaries. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-12-02T12:52:33.176116Z K 7 svn:log V 343 Add hw.ahci.force tunable to control whether AHCI drivers should attach to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation. Enabled by default to get additional performance and functionality of AHCI when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if needed for some reason. MFC after: 1 month END K 10 svn:author V 8 jchandra K 8 svn:date V 27 2011-12-02T15:24:39.154704Z K 7 svn:log V 672 Fix OF_finddevice error return value in case of FDT. According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error. This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well. Reported by: nwhitehorn Reviewed by: raj Approved by: raj, nwhitehorn END K 10 svn:author V 6 eadler K 8 svn:date V 27 2011-12-02T15:41:09.621722Z K 7 svn:log V 78 Revert r227812 and r227808 per discussion Reviewed by: many Approved by: des END K 10 svn:author V 6 emaste K 8 svn:date V 27 2011-12-02T15:47:05.475427Z K 7 svn:log V 189 Restore comment with credit to Marc Frajola. fwdownload.c is derived from Andre Albsmeier's fwdownload.c, which was written from scratch but was inspired by Marc's original idea and code. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-12-02T17:09:48.892347Z K 7 svn:log V 165 Close race between geom destruction on g_vfs_close() when softc destroyed and g_vfs_orphan() call that tries to access softc, intruced at r227015. PR: kern/162997 END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-02T19:01:26.862644Z K 7 svn:log V 47 Add more controllers that support jumbo frame. END K 10 svn:author V 2 mm K 8 svn:date V 27 2011-12-02T19:56:46.784518Z K 7 svn:log V 148 Remove unnecesary "Ns" macros and add missing command example to zpool(8). Reported by: Nobuyuki Koganemaru MFC after: 3 days END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-12-02T19:59:46.021197Z K 7 svn:log V 326 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. MFC after: 2 weeks END K 10 svn:author V 8 ambrisko K 8 svn:date V 27 2011-12-02T20:28:45.891614Z K 7 svn:log V 84 Fix botched merge of Skinny support and enhanced handling in the call back routine. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-12-02T21:19:14.135963Z K 7 svn:log V 346 - In device_probe_child(9) check the return value of device_set_driver(9) when actually setting a driver as especially ENOMEM is fatal in these cases. - Annotate other calls to device_set_devclass(9) and device_set_driver(9) without the return value being checked and that are okay to fail. Reviewed by: yongari (slightly earlier version) END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-12-02T21:45:46.035890Z K 7 svn:log V 4 MFC END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-12-02T22:03:27.518656Z K 7 svn:log V 353 It doesn't make much sense to check whether child is NULL after already having dereferenced it. We either should generally check the device_t's supplied to bus functions before using them (which we seem to virtually never do) or just assume that they are not NULL. While at it make this code fit 78 columns. Found with: Coverity Prevent(tm) CID: 4230 END K 10 svn:author V 4 bapt K 8 svn:date V 27 2011-12-02T22:37:02.116198Z K 7 svn:log V 55 Flatten gperf Reviewed by: cognet Approved by: cognet END K 10 svn:author V 4 bapt K 8 svn:date V 27 2011-12-02T22:39:31.135008Z K 7 svn:log V 54 Perform the post flatten cleanup Approved by: cognet END K 10 svn:author V 4 bapt K 8 svn:date V 27 2011-12-02T22:46:53.565254Z K 7 svn:log V 53 import gperf 3.0.3 latest GPLv2 Approved by: cognet END K 10 svn:author V 4 bapt K 8 svn:date V 27 2011-12-02T22:48:15.430109Z K 7 svn:log V 44 tag gperf 3.0.3 import Approved by: cognet END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-12-02T23:21:59.079363Z K 7 svn:log V 53 Revert a change that sneaked in during the last MFC. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-12-03T02:27:26.775074Z K 7 svn:log V 776 Post r223774, the NFSv4 client no longer has multiple instances of the same lock_owner4 string. As such, the handling of cleanup of lock_owners could be simplified. This simplification permitted the client to do a ReleaseLockOwner operation when the process that the lock_owner4 string represents, has exited. This permits the server to release any storage related to the lock_owner4 string before the associated open is closed. Without this change, it is possible to exhaust a server's storage when a long running process opens a file and then many child processes do locking on the file, because the open doesn't get closed. A similar patch was applied to the Linux NFSv4 client recently so that it wouldn't exhaust a server's storage. Reviewed by: zack MFC after: 2 weeks END K 10 svn:author V 3 pho K 8 svn:date V 27 2011-12-03T12:28:33.777192Z K 7 svn:log V 168 Rename copyin_timeout32 to umtx_copyin_timeout32 and move parameter check here. Include check for negative seconds value. In collaboration with: kib MFC after: 1 week END K 10 svn:author V 3 pho K 8 svn:date V 27 2011-12-03T12:30:58.777188Z K 7 svn:log V 104 Add umtx_copyin_timeout() and move parameter checks here. In collaboration with: kib MFC after: 1 week END K 10 svn:author V 3 pho K 8 svn:date V 27 2011-12-03T12:33:17.494944Z K 7 svn:log V 87 Add declaration of umtx_copyin_timeout() In collaboration with: kib MFC after: 1 week END K 10 svn:author V 3 pho K 8 svn:date V 27 2011-12-03T12:35:13.245844Z K 7 svn:log V 109 Use umtx_copyin_timeout() to copy and check timeout parameter. In collaboration with: kib MFC after: 1 week END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-12-03T13:51:57.336106Z K 7 svn:log V 299 Revert r225889 a bit. While it's correct that in total store order there's no need to additionally add CPU memory barriers to the acquire variants of atomic(9), these are documented to also include compiler memory barriers. So add the latter, which were previously included by using membar(), back. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T13:54:54.642854Z K 7 svn:log V 45 MFC r227404: Add USB 3.0 descriptor support. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:02:25.210068Z K 7 svn:log V 59 MFC r227610 and r227781: Add new USB IDs. PR: usb/162712 END K 10 svn:author V 8 jhibbits K 8 svn:date V 27 2011-12-03T14:03:53.768949Z K 7 svn:log V 72 Add myself to the relevant doc files. Approved by: nwhitehorn (mentor) END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:11:47.098925Z K 7 svn:log V 119 MFC r227108, r227383 and r227463: Add support for modem control lines and GPIO pins to USLCOM driver. PR: usb/162307 END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:29:14.921400Z K 7 svn:log V 121 MFC r227541, r227654, r226803, r227396 and r227401: Fix for XHCI attach failure and some USB 3.0 descriptor corrections. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:32:10.394700Z K 7 svn:log V 103 MFC r228195: Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list(). END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:38:54.093897Z K 7 svn:log V 352 MFC r227461: Style change. - Make it easier to port the USB code to other platforms by only using one set of memory functions for clearing and copying memory. None of the memory copies are overlapping. This means using bcopy() is not required. - Fix a compile warning when USB_HAVE_BUSDMA=0 - Add missing semicolon in avr32dci. - Update some comments. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:40:56.437198Z K 7 svn:log V 36 MFC r215254: Fix compiler warnings. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:44:34.887554Z K 7 svn:log V 80 MFC 226479: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T14:54:44.769262Z K 7 svn:log V 76 Fix a compile warning with clang. Reported by: arundel @ MFC after: 3 days END K 10 svn:author V 6 eadler K 8 svn:date V 27 2011-12-03T15:41:37.892232Z K 7 svn:log V 137 - Fix typos s/(more|less) then|\1 than/ Submitted by: Davide Italiano Approved by: brucec MFC after: 3 days END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T15:51:15.256753Z K 7 svn:log V 135 Make sure the description of pause() is equivalent to its implementation. No code change. Suggested by: Bruce Evans MFC after: 3 days END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T16:19:07.770108Z K 7 svn:log V 166 libusb_open() sets the given device handle to NULL if it fails, so there is no need to do it again after returning. Submitted by: Christoph Mallon MFC after: 3 days END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-03T16:30:47.987034Z K 7 svn:log V 198 Simplify libusb_open_device_with_vid_pid(): Only set pdev to non-NULL on success instead of unconditonally setting it and maybe resetting it later. Submitted by: Christoph Mallon MFC after: 3 days END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2011-12-03T16:58:55.959740Z K 7 svn:log V 423 MFC r228192: > Add a screen that asks if the user would like to enable crash dumps, > giving them a very brief description of the trade-offs. Whether the > user opts in or out add an entry to what will become /etc/rc.conf > explaining what dumpdev is and how to turn on/off crash dumps. The folks > who handle interacting with users submitting PRs have asked for this. > > Reviewed by: nwhitehorn Approved by: re (kib) END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2011-12-03T17:02:51.759899Z K 7 svn:log V 423 MFC r228237: > Add a screen that asks if the user would like to enable crash dumps, > giving them a very brief description of the trade-offs. Whether the > user opts in or out add an entry to what will become /etc/rc.conf > explaining what dumpdev is and how to turn on/off crash dumps. The folks > who handle interacting with users submitting PRs have asked for this. > > Reviewed by: nwhitehorn Approved by: re (kib) END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2011-12-03T17:03:48.529181Z K 7 svn:log V 47 Ready for 9.0-RC3. Approved by: re (implicit) END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-12-03T17:15:16.709610Z K 7 svn:log V 299 MFC r228194: Prevent user astonishment by providing the shell option at the end, after any installer-provided configuration files have been copied. This allows users to edit their fstab, if desired, and to see what the installer has placed in rc.conf. Requested by: phk Approved by: re (kensmith) END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-12-03T17:17:32.382836Z K 7 svn:log V 312 MFC r228194, MF9 r228240: Prevent user astonishment by providing the shell option at the end, after any installer-provided configuration files have been copied. This allows users to edit their fstab, if desired, and to see what the installer has placed in rc.conf. Requested by: phk Approved by: re (kensmith) END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-03T17:29:38.918183Z K 7 svn:log V 135 MFC r226740 Speed up vm_page_cache() and vm_page_remove() by checking for a few common cases that can be handled in constant time. END K 10 svn:author V 6 emaste K 8 svn:date V 27 2011-12-03T19:56:52.951131Z K 7 svn:log V 304 Add quirk for Micron RealSSD eUSB failing on unsupported SCSI command It appears this device fails if sent a SYNCHRONIZE_CACHE command, so add quirk to avoid sending it. I will follow up with Micron on this issue, and will adjust the quirk if necessary based on their feedback. Reviewed by: hselasky@ END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-12-03T22:12:57.879591Z K 7 svn:log V 217 MFC r226446: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address. Approved by: re (bz) END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-12-03T22:14:15.984525Z K 7 svn:log V 465 MFC r226649, 226651, 226652, 226653: - Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty. - Add description that IPv6 configuration will be ignored if $ifconfig_IF_ipv6 is empty. - Move a configuration example "inet6 accept_rtadv" to just after the manual GUA configuration. - Add an example of $ipv6_prefix_IF. - Add support for removing addresses added by ipv6_prefix_hostid_addr_up() upon rc.d/netif stop. Approved by: re (bz) END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-12-03T22:15:42.742754Z K 7 svn:log V 217 MFC r226446: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address. Approved by: re (bz) END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-12-03T22:16:36.554811Z K 7 svn:log V 465 MFC r226649, 226651, 226652, 226653: - Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty. - Add description that IPv6 configuration will be ignored if $ifconfig_IF_ipv6 is empty. - Move a configuration example "inet6 accept_rtadv" to just after the manual GUA configuration. - Add an example of $ipv6_prefix_IF. - Add support for removing addresses added by ipv6_prefix_hostid_addr_up() upon rc.d/netif stop. Approved by: re (bz) END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-03T23:36:36.079487Z K 7 svn:log V 46 MFC r215597 Optimize vm_object_terminate(). END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T01:15:52.118595Z K 7 svn:log V 130 MFC r218863 tmpfs_remove() isn't modifying the file's data, so it shouldn't set TMPFS_NODE_MODIFIED on the node. PR: 152488 END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T01:22:22.576416Z K 7 svn:log V 130 MFC r218863 tmpfs_remove() isn't modifying the file's data, so it shouldn't set TMPFS_NODE_MODIFIED on the node. PR: 152488 END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T02:06:12.142853Z K 7 svn:log V 124 MFC r224689 Fix an error in kmem_alloc_attr(). Unless "tries" is updated, kmem_alloc_attr() could get stuck in a loop. END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T02:13:54.270486Z K 7 svn:log V 124 MFC r224689 Fix an error in kmem_alloc_attr(). Unless "tries" is updated, kmem_alloc_attr() could get stuck in a loop. END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T06:09:02.391124Z K 7 svn:log V 477 MFC r214425,214954 [1] According to the x86 architectural specifications, no virtual-to- physical page mapping should span two or more MTRRs of different types. Add a pmap function, pmap_demote_DMAP(), by which the MTRR module can ensure that the direct map region doesn't have such a mapping. [2] Fix a couple of nearby style errors in amd64_mrset(). [3] Re-enable the use of 1GB page mappings for implementing the direct map. (See also r197580 and r213897.) END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T06:55:27.627950Z K 7 svn:log V 61 MFC r214563,214576 Add safety belts to pmap_demote_DMAP(). END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T07:18:54.475706Z K 7 svn:log V 304 MFC r213897 Update pmap_extract() to handle 1GB page mappings. Some device drivers use pmap_extract() rather than pmap_kextract() on direct map addresses. Thus, pmap_extract() needs to be able to deal with 1GB page mappings if we are to use 1GB page mappings for the direct map. (See r197580.) END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T07:28:50.365002Z K 7 svn:log V 161 MFC r223732 When iterating over a paging queue, explicitly check for PG_MARKER, instead of relying on zeroed memory being interpreted as an empty PV list. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-12-04T11:55:33.312194Z K 7 svn:log V 1054 Allow the i2c node requirements to be slightly relaxed. These realtek switch PHYs speak a variant of i2c with some slightly modified handling. From the submitter, slightly modified now that some further digging has been done: The I2C framework makes a assumption that the read/not-write bit of the first byte (the address) indicates whether reads or writes are to follow. The RTL8366 family uses the bus: after sending the address+read/not-write byte, two register address bytes are sent, then the 16-bit register value is sent or received. While the register write access can be performed as a 4-byte write, the read access requires the read bit to be set, but the first two bytes for the register address then need to be transmitted. This patch maintains the i2c protocol behaviour but allows it to be relaxed (for these kinds of switch PHYs, and whatever else Realtek may do with this almost-but-not-quite i2c bus) - by setting the "strict" hint to 0. The "strict" hint defaults to 1. Submitted by: Stefan Bethke END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-12-04T12:10:24.663116Z K 7 svn:log V 237 Modify the GPIO i2c bus code to allow for arbitrary data/clock pins, rather than defaulting to 0 and 1. This way the pin order can be reversed. It is reversed with the TP-Link TL-WR1043nd. Submitted by: Stefan Bethke END K 10 svn:author V 8 dumbbell K 8 svn:date V 27 2011-12-04T14:44:31.948893Z K 7 svn:log V 660 Support domain-search in dhclient(8) The "domain-search" option (option 119) allows a DHCP server to publish a list of implicit domain suffixes used during name lookup. This option is described in RFC 3397. For instance, if the domain-search option says: ".example.org .example.com" and one wants to resolve "foobar", the resolver will try: 1. "foobar.example.org" 2. "foobar.example.com" The file /etc/resolv.conf is updated with a "search" directive if the DHCP server provides "domain-search". A regression test suite is included in this patch under tools/regression/sbin/dhclient. PR: bin/151940 Sponsored by Yakaz (http://www.yakaz.com) END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-12-04T16:33:04.646300Z K 7 svn:log V 506 This patch adds a sysctl to the NFSv4 server which optionally disables the check for a UTF-8 compliant file name. Enabling this sysctl results in an NFSv4 server that is non-RFC3530 compliant, therefore it is not enabled by default. However, enabling this sysctl results in NFSv3 compatible behaviour and fixes the problem reported by "dan at sunsaturn.com" to freebsd-current@ on Nov. 14, 2011 under the subject "NFSV4 readlink_stat". Tested by: dan at sunsaturn.com Reviewed by: zack MFC after: 2 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2011-12-04T18:43:09.257791Z K 7 svn:log V 173 Use explicit information from the kernel to detect the traps due to syscall entry and leave. Based on submision by: Dan Nelson MFC after: 1 month END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-04T18:55:19.389434Z K 7 svn:log V 618 MFC r219157 Make a change to the implementation of the direct map to improve performance on processors that support 1 GB pages. Specifically, if the end of physical memory is not aligned to a 1 GB page boundary, then map the residual physical memory with multiple 2 MB page mappings rather than a single 1 GB page mapping. When a 1 GB page mapping is used for this residual memory, access to the memory is slower than when multiple 2 MB page mappings are used. (I suspect that the reason for this slowdown is that the TLB is actually being loaded with 4 KB page mappings for the residual memory.) END K 10 svn:author V 3 kib K 8 svn:date V 27 2011-12-04T19:25:49.403157Z K 7 svn:log V 231 Initialize fifoinfo fi_wgen field on open. The only important is the difference between fi_wgen and f_seqcount, so the change is purely cosmetic, but it makes the code easier to understand. Submitted by: gianni MFC after: 2 weeks END K 10 svn:author V 7 trociny K 8 svn:date V 27 2011-12-04T21:24:01.075119Z K 7 svn:log V 118 In sysctl_kern_proc_ps_strings() there is no much sense in checking for P_WEXIT and P_SYSTEM flags. Reviewed by: kib END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-12-04T21:27:41.163436Z K 7 svn:log V 187 critical_exit: ignore td_owepreempt if kdb_active is set calling mi_switch in such a context results in a recursion via kdb_switch Suggested by: jhb Reviewed by: jhb MFC after: 5 weeks END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-12-04T21:29:56.470103Z K 7 svn:log V 92 zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest) MFC after: 1 week END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-12-04T21:32:18.166571Z K 7 svn:log V 117 zfsboot: print boot.config contents before parsing it as parsing can be a destructive operation MFC after: 2 weeks END K 10 svn:author V 7 trociny K 8 svn:date V 27 2011-12-04T21:43:13.161124Z K 7 svn:log V 114 Protect process environment variables with p_candebug(). Discussed with: jilles, kib, rwatson MFC after: 2 weeks END K 10 svn:author V 6 jilles K 8 svn:date V 27 2011-12-05T00:00:47.933498Z K 7 svn:log V 53 libc: Eliminate 13 relative relocations in wctype(). END K 10 svn:author V 8 jhibbits K 8 svn:date V 27 2011-12-05T00:12:10.026878Z K 7 svn:log V 112 Add a devd notification for closing/opening the lid on PowerBooks and iBooks. Approved by: nwhitehorn (mentor) END K 10 svn:author V 8 jchandra K 8 svn:date V 27 2011-12-05T02:56:08.741490Z K 7 svn:log V 140 Fix XLP compilation. Add definitions of LSU_DEBUG_ADDR and LSU_DEBUG_DATA0, the code that uses it was added in r227799 Reported by: gonzo END K 10 svn:author V 8 jchandra K 8 svn:date V 27 2011-12-05T03:10:01.732789Z K 7 svn:log V 167 Fix N32 compilation again for XLP. Disable DDB/KDB related options for N32, and add back a cast that was lost during the last set of updates. Reported by: gonzo, bz END K 10 svn:author V 8 jchandra K 8 svn:date V 27 2011-12-05T03:18:40.706770Z K 7 svn:log V 146 Disable KDB/DDB options for XLP N32 compile. n32 abi is not supported in KDB/DDB yet, disable the option in XLPN32 conf. Reported by: gonzo, bz END K 10 svn:author V 6 eadler K 8 svn:date V 27 2011-12-05T04:20:13.654983Z K 7 svn:log V 165 Fix some uninitialized variables in pipe regression tests that result in failure. PR: misc/161175 Submitted by: gianni@ Approved by: nwhitehorn@ MFC after: 1 week END K 10 svn:author V 5 kevlo K 8 svn:date V 27 2011-12-05T10:34:52.708849Z K 7 svn:log V 28 Add a missing curly bracket END K 10 svn:author V 5 luigi K 8 svn:date V 27 2011-12-05T12:06:53.116499Z K 7 svn:log V 1690 1. Fix the handling of link reset while in netmap more. A link reset now is completely transparent for the netmap client: even if the NIC resets its own ring (e.g. restarting from 0), the client will not see any change in the current rx/tx positions, because the driver will keep track of the offset between the two. 2. make the device-specific code more uniform across different drivers There were some inconsistencies in the implementation of the netmap support routines, now drivers have been aligned to a common code structure. 3. import netmap support for ixgbe . This is implemented as a very small patch for ixgbe.c (233 lines, 11 chunks, mostly comments: in total the patch has only 54 lines of new code) , as most of the code is in an external file sys/dev/netmap/ixgbe_netmap.h , following some initial comments from Jack Vogel about making changes less intrusive. (Note, i have emailed Jack multiple times asking if he had comments on this structure of the code; i got no reply so i assume he is fine with it). Support for other drivers (em, lem, re, igb) will come later. "ixgbe" is now the reference driver for netmap support. Both the external file (sys/dev/netmap/ixgbe_netmap.h) and the device-specific patches (in sys/dev/ixgbe/ixgbe.c) are heavily commented and should serve as a reference for other device drivers. Tested on i386 and amd64 with the pkt-gen program in tools/tools/netmap, the sender does 14.88 Mpps at 1050 Mhz and 14.2 Mpps at 900 MHz on an i7-860 with 4 cores and 82599 card. Haven't tried yet more aggressive optimizations such as adding 'prefetch' instructions in the time-critical parts of the code. END K 10 svn:author V 8 jhibbits K 8 svn:date V 27 2011-12-05T14:13:21.618689Z K 7 svn:log V 68 Fix style(9) issues from r228270. Approved by: nwhitehorn (mentor) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-12-05T15:11:35.034044Z K 7 svn:log V 104 Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP arguments. MFC after: 2 weeks END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-12-05T15:16:47.444919Z K 7 svn:log V 65 Remove superfluous !TAILQ_EMPTY() checks before TAILQ_FOREACH(). END K 10 svn:author V 5 luigi K 8 svn:date V 27 2011-12-05T15:21:21.809921Z K 7 svn:log V 67 revise the implementation of the rings connected to the host stack END K 10 svn:author V 5 luigi K 8 svn:date V 27 2011-12-05T15:33:13.702968Z K 7 svn:log V 545 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. END K 10 svn:author V 8 andreast K 8 svn:date V 27 2011-12-05T16:06:12.671896Z K 7 svn:log V 63 Fix compilation issue on 32-bit targets. Reviewed by: attilio END K 10 svn:author V 2 ed K 8 svn:date V 27 2011-12-05T16:08:18.101156Z K 7 svn:log V 258 Get rid of kludgy per-descriptor state handling in acpi_apm. Where i386/bios/apm.c requires no per-descriptor state, the ACPI version of these device do. Instead of using hackish clone lists that leave stale device nodes lying around, use the cdevpriv API. END K 10 svn:author V 3 ume K 8 svn:date V 27 2011-12-05T16:38:52.397758Z K 7 svn:log V 114 - Make heimdal buildable with WITH_OPENLDAP defined, again. - Our heimdal uses the deprecated OpenLDAP functions. END K 10 svn:author V 3 lev K 8 svn:date V 27 2011-12-05T17:44:12.628382Z K 7 svn:log V 16 Merge from head END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-05T18:10:43.074112Z K 7 svn:log V 204 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 alc K 8 svn:date V 27 2011-12-05T18:29:25.074445Z K 7 svn:log V 594 Introduce vm_reserv_alloc_contig() and teach vm_page_alloc_contig() how to use superpage reservations. So, for the first time, kernel virtual memory that is allocated by contigmalloc(), kmem_alloc_attr(), and kmem_alloc_contig() can be promoted to superpages. In fact, even a series of small contigmalloc() allocations may collectively result in a promoted superpage. Eliminate some duplication of code in vm_reserv_alloc_page(). Change the type of vm_reserv_reclaim_contig()'s first parameter in order that it be consistent with other vm_*_contig() functions. Tested by: marius (sparc64) END K 10 svn:author V 7 trociny K 8 svn:date V 27 2011-12-05T19:34:02.885348Z K 7 svn:log V 585 Protect kern.proc.auxv and kern.proc.ps_strings sysctls with p_candebug(). Citing jilles: If we are ever going to do ASLR, the AUXV information tells an attacker where the stack, executable and RTLD are located, which defeats much of the point of randomizing the addresses in the first place. Given that the AUXV information seems to be used by debuggers only anyway, I think it would be good to move it to p_candebug() now. The full virtual memory maps (KERN_PROC_VMMAP, procstat -v) are already under p_candebug(). Suggested by: jilles Discussed with: rwatson MFC after: 1 week END K 10 svn:author V 7 trociny K 8 svn:date V 27 2011-12-05T19:39:15.063572Z K 7 svn:log V 136 Don't output a warning if kern.proc.auxv sysctl has returned EPERM. After r228288 this is rather a normal situation. MFC after: 1 week END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-12-05T21:38:45.450626Z K 7 svn:log V 730 - In mii_attach(9) just set the driver for a newly added miibus(4) instance before calling bus_enumerate_hinted_children(9) (which is the minimum for this to work) instead of fully probing it so later on we can just call bus_generic_attach(9) on the parent of the miibus(4) instance. The latter is necessary in order to work around what seems to be a bzzarre race in newbus affecting a few machines since r227687, causing no driver being probed for the newly added miibus(4) instance. Presumably this is the same race that was the motivation for the work around done in r215348. Reported and tested by: yongari - Revert the removal of a static in r221913 in order to help compilers to produce more optimal code. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-05T22:09:07.494305Z K 7 svn:log V 85 Remove NetBSD license. r199548 removed all bit macros that were derived from NetBSD. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-05T22:22:39.221089Z K 7 svn:log V 76 Implement suspend/resume methods. Driver has no issue with suspend/resume. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-05T22:55:52.180499Z K 7 svn:log V 443 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. END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2011-12-05T23:29:27.339308Z K 7 svn:log V 8 Unbreak END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2011-12-06T00:05:12.408472Z K 7 svn:log V 32 Unbreak build: add missing coma END K 10 svn:author V 5 gonzo K 8 svn:date V 27 2011-12-06T00:13:40.569063Z K 7 svn:log V 66 Unbreak mips64 build by MFCing r202031 that fixes _ALIGN macros END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-06T00:18:37.646112Z K 7 svn:log V 221 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. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-06T00:58:42.923893Z K 7 svn:log V 322 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 6 brooks K 8 svn:date V 27 2011-12-06T03:32:37.248865Z K 7 svn:log V 50 Actually hook the varsym command up to the build. END K 10 svn:author V 6 brooks K 8 svn:date V 27 2011-12-06T03:35:23.641123Z K 7 svn:log V 82 Knobs work better if you ever define the associated values: include opt_varsym.h. END K 10 svn:author V 6 grehan K 8 svn:date V 27 2011-12-06T06:28:32.715601Z K 7 svn:log V 1734 Catch up with Bryan Venteicher's virtio Hg repo: c162516 Remove vtblk_sector_size c162515 Wrap long license lines c162514 Remove vtblk_unit c162513 Wrap long lines in the license. c162512 Remove verbose messages when link goes up/down. A similar message is printed elsewhere as a result of if_link_state_change(). c162511 Explicity compare pointer to NULL c162510 Allocate the mac filter table at attach time. c162509 Add real BSD licenses to the header files copied from Linux. The chases upstream changes made in Linux awhile ago. c162508 Only notify if we actually dequeued something. c162507 Change a couple of if () { KASSERT(...) } to just KASSERTs. In non-debug kernels, the if() { } probably get optomized away, but I guess this is clearer. c162506 Remove VIRTIO_BLK_F_TOPOLOGY fields in the config. TOPOLOGY has since been removed from the spec, and the FreeBSD didn't really do anything with the fields anyways. c162505 Move vtblk_enqueue_request() outside the locks when getting the ident. c162504 Remove soon to be uneeded trylock during dump [1]. http://lists.freebsd.org/pipermail/freebsd-current/2011-November/029226.html c162503 Remove emtpy line c162502 Drop frame if cannot allocate a vtnet_tx_header. If we don't, we set OACTIVE, but if there are no other frames in flight, vtnet_txeof() will never be called to unset OACTIVE. The interface would have to be down/up'ed in order to become usable. We could be cuter here and only do this if the virtqueue is emtpy, but its probably not worth the complication. c162501 Start mbuf replacement loop at 1 for clarity Obtained from: Bryan Venteicher bryanv at daemoninthecloset dot org END K 10 svn:author V 7 trociny K 8 svn:date V 27 2011-12-06T06:40:14.991208Z K 7 svn:log V 135 Really protect kern.proc.ps_strings sysctls with p_candebug(). This was intended to be in r228288. Spotted by: many MFC after: 1 week END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-06T07:55:25.184328Z K 7 svn:log V 101 Fix compile warning when using clang to compile the code. Submitted by: arundel @ MFC after: 3 days END K 10 svn:author V 8 hselasky K 8 svn:date V 27 2011-12-06T08:08:52.183906Z K 7 svn:log V 74 Correct some bInterval USB template descriptor values. MFC after: 3 days END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-12-06T09:12:11.632863Z K 7 svn:log V 117 Mention that Cold Presence Detection feature used for hot-plug detection when interface power management is enabled. END K 10 svn:author V 3 kib K 8 svn:date V 27 2011-12-06T11:24:03.884777Z K 7 svn:log V 492 Most users of pipe(2) do not call fstat(2) on the returned pipe descriptors. Optimize for the case, by lazily allocating the pipe inode number at the fstat(2) time. If alloc_unr(9) returns failure, do not fail fstat(2), since uses of inode numbers are even rare then fstat(2), but provide zero inode forever. Note that alloc_unr() failure is unlikely due to total number of pipes in the system limited by the number of file descriptors. Based on the submission by: gianni MFC after: 2 weeks END K 10 svn:author V 3 kib K 8 svn:date V 27 2011-12-06T11:28:17.150265Z K 7 svn:log V 260 Force linker error when created shared library contains a relocation against text. Provide the override switch to turn off the strict behaviour. Apparently, openssl libcrypto needs it due to assembler code not being PIC. Discussed with: bf MFC after: 2 weeks END K 10 svn:author V 3 ume K 8 svn:date V 27 2011-12-06T12:03:01.987914Z K 7 svn:log V 43 Don't support OpenLDAP during lib32 build. END K 10 svn:author V 6 brooks K 8 svn:date V 27 2011-12-06T17:30:15.537605Z K 7 svn:log V 43 Add audit support for varsym_*() syscalls. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-12-06T17:54:59.818743Z K 7 svn:log V 145 Move mfi_decode_evt() call from interrupt thread to the taskqueue. Call from the interrupt thread leads to panic on attempt to sleep on SX lock. END K 10 svn:author V 4 fjoe K 8 svn:date V 27 2011-12-06T18:01:09.376826Z K 7 svn:log V 64 MK_CTF is not defined when kmod.mk is used with old bsd.own.mk. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-12-06T19:04:45.593476Z K 7 svn:log V 431 - Make rn_count 32-bits as it will naturally pad for 32-bit arches - Avoid to use atomic to manipulate it at level0 because it seems unneeded and introduces a bug on big-endian architectures where only the top half (2 bits) of the double-words are written (as sparc64, for example, doesn't support atomics at 16-bits) heading to a wrong handling of rn_count. Reported by: flo, andreast Found by: marius No answer by: jeff END K 10 svn:author V 7 glebius K 8 svn:date V 27 2011-12-06T20:55:20.039844Z K 7 svn:log V 128 Fix a very special case when SIOCAIFADDR supplies mask of 0.0.0.0, don't overwrite the mask with autoguessing based on classes. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-12-06T22:57:48.753853Z K 7 svn:log V 300 Use atomics for rn_count on leaf node because RED operations happen without the VM_OBJECT_LOCK held, thus can be concurrent with BLACK ones. However, also use a write memory barrier in order to not reorder the operation of decrementing rn_count in respect fetching the pointer. Discussed with: jeff END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-12-07T00:07:57.159851Z K 7 svn:log V 45 Fix tmpfs to build with vmcontention branch. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-12-07T00:22:34.050071Z K 7 svn:log V 46 Fix ZFS for compiling on vmcontention branch. END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-07T07:03:14.267563Z K 7 svn:log V 286 Eliminate the possibility of 32-bit arithmetic overflow in the calculation of vm_kmem_size that may occur if the system administrator has specified a vm.vm_kmem_size tunable value that exceeds the hard cap. PR: 162741 Submitted by: Adam McDougall Reviewed by: bde@ MFC after: 3 weeks END K 10 svn:author V 2 ru K 8 svn:date V 27 2011-12-07T11:06:18.433690Z K 7 svn:log V 101 The NOTE_COPY should have been named NOTE_FFCOPY from the very beginning. Submitted by: Igor Sysoev END K 10 svn:author V 5 gabor K 8 svn:date V 27 2011-12-07T12:25:28.728796Z K 7 svn:log V 165 - Match GNU behavior of exit code - Rename variable that has a different meaning now PR: bin/162930 Submitted by: Jan Beich MFC after: 1 week END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-12-07T12:48:11.494401Z K 7 svn:log V 41 Implement MFI_DEBUG for 64bit S/G lists. END K 10 svn:author V 7 glebius K 8 svn:date V 27 2011-12-07T13:37:42.849960Z K 7 svn:log V 95 Fix double free. PR: kern/163089 Submitted by: Herbie Robinson END K 10 svn:author V 8 theraven K 8 svn:date V 27 2011-12-07T15:25:48.561007Z K 7 svn:log V 680 Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a __noreturn macro and modify the other exiting functions to use it. The __noreturn macro, unlike __dead2, must be used BEFORE the function. This is in line with the C and C++ specifications that place _Noreturn (c1x) and [[noreturn]] (C++11) in front of the functions. As with __dead2, this macro falls back to using the GCC attribute. Unfortunately, clang currently sets the same value for the C version macro in C99 and C1x modes, so these functions are hidden by default. At some point before 10.0, I need to go through the headers and clean up the C1x / C++11 visibility. Reviewed by: brooks (mentor) END K 10 svn:author V 8 theraven K 8 svn:date V 27 2011-12-07T16:12:54.002363Z K 7 svn:log V 49 style(9) cleanups. Approved by: brooks (mentor) END K 10 svn:author V 3 alc K 8 svn:date V 27 2011-12-07T16:27:23.710814Z K 7 svn:log V 40 Eliminate stale numbers from a comment. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-07T18:17:09.012007Z K 7 svn:log V 3778 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 2011-12-07T19:08:54.321088Z K 7 svn:log V 1158 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. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-07T19:43:04.966585Z K 7 svn:log V 321 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. END K 10 svn:author V 3 dim K 8 svn:date V 27 2011-12-07T21:00:33.589211Z K 7 svn:log V 652 Make it possible to use the debug versions of std::map and std::multimap with clang, by removing two unneeded using declarations. Otherwise, you would get errors similar to: /usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename' using _Base::value_compare; ^ N.B.: Take care when you actually use the debug versions of any libstdc++ header. They are more likely to contain problems, because they are exercised far less often, and since the standard library complexity guarantees don't always apply anymore, compile times can drastically increase. MFC after: 2 weeks END K 10 svn:author V 8 theraven K 8 svn:date V 27 2011-12-07T21:02:35.923194Z K 7 svn:log V 105 Some fixes to the man pages for [at_]quick_exit(3) Reviewed by: pluknet Approved by: dim (mentor) END K 10 svn:author V 8 theraven K 8 svn:date V 27 2011-12-07T21:17:50.628337Z K 7 svn:log V 286 As per das@'s suggestion, s/__noreturn/_Noreturn/, since the latter is an identifier reserved for the implementation in C99 and earlier so there is no sensible reason for introducing yet another reserved identifier when we could just use the one C1x uses. Approved by: brooks (mentor) END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-07T21:29:51.767006Z K 7 svn:log V 1733 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. END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-12-07T21:46:09.194121Z K 7 svn:log V 138 Implement hardware MAC statistics counter. Counters could be queried with dev.et.%d.stats sysctl node where %d is an instance of device. END