ƒ¸b222801 147 534 286 194 670 430 528 288 567 108 132 117 99 3066 144 905 150 224 99 354 326 167 304 410 137 222 696 225 554 199 205 151 394 330 165 231 186 529 529 956 453 156 371 111 164 179 584 149 239 178 226 150 379 1016 110 167 375 181 116 281 313 633 116 157 138 379 765 508 179 422 159 255 359 359 219 903 202 259 116 289 260 132 136 190 320 99 376 140 231 128 125 174 137 137 126 198 300 448 256 365 134 127 124 131 124 115 142 738 226 133 172 99 328 269 485 662 568 1086 913 139 274 478 389 175 245 214 183 435 370 201 199 823 529 265 1580 1580 654 654 681 681 235 235 2181 2181 292 292 363 307 K 10 svn:author V 6 marcel K 8 svn:date V 27 2011-06-07T01:28:12.609539Z K 7 svn:log V 438 Fix making kernel dumps from the debugger by creating a command for it. Do not not expect a developer to call doadump(). Calling doadump does not necessarily work when it's declared static. Nor does it necessarily do what was intended in the context of text dumps. The dump command always creates a core dump. Move printing of error messages from doadump to the dump command, now that we don't have to worry about being called from DDB. END K 10 svn:author V 7 davidxu K 8 svn:date V 27 2011-06-07T02:50:14.026914Z K 7 svn:log V 189 Use p4prio_to_tsprio to calculate TS priority instead of using p4prio_to_rtpprio which is for RT priority. PR: kern/157657 Submitted by: krivenok.dmitry at gmail dot com MFC after: 3 days END K 10 svn:author V 6 marcel K 8 svn:date V 27 2011-06-07T04:38:33.156742Z K 7 svn:log V 99 Lower WARNS level to 3 to eliminate alignment warnings related to casting inherent in CMSG_DATA(). END K 10 svn:author V 3 ken K 8 svn:date V 27 2011-06-07T05:04:37.642645Z K 7 svn:log V 577 Set pca.p_bufr to NULL when we haven't allocated a buffer. Otherwise, p_bufr is set to garbage on the stack, and if that garbage happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf() will get called and attempt to fill the non-existent buffer. This is really only relevant for tprintf() (and only when the priority is not -1), but set it in uprintf() and ttyprintf() for completeness. The next step, to avoid log buffer scrambling, would be to add the PRINTF_BUFR_SIZE code to tprintf(), but this should prevent panics. Submitted by: rmacklem Found by: pho END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-06-07T06:18:02.022653Z K 7 svn:log V 337 amdsbwd: update to support SB8xx southbridges Many thanks to Tino for drawing my attention to this, for doing a lot of testing and providing great feedback. Many thanks to AMD for continuing to release public specifications for their chipsets. PR: kern/157568 Tested by: Tino MFC after: 1 week END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-07T06:42:29.018540Z K 7 svn:log V 436 Make a behaviour of the libalias based in-kernel NAT a bit closer to how natd(8) does work. natd(8) drops packets only when libalias returns PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat always did drop packets that were not aliased, even if they should not be aliased and just are going through. PR: kern/122109, kern/129093, kern/157379 Submitted by: Alexander V. Chernikov (previous version) MFC after: 1 month END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-06-07T06:45:51.430206Z K 7 svn:log V 192 Break out ath_hx_handoff() into hardware and software varieties. The only software path at the moment is the mcastq which is then added to the CAB queue (HW) before the beacon is transmitted. END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-07T06:48:42.085743Z K 7 svn:log V 475 Sync ng_nat with recent (r222806) ipfw_nat changes: Make a behaviour of the libalias based in-kernel NAT a bit closer to how natd(8) does work. natd(8) drops packets only when libalias returns PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat always did drop packets that were not aliased, even if they should not be aliased and just are going through. Also add SCTP support: mark response packets to skip firewall processing. MFC after: 1 month END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-07T06:57:22.330560Z K 7 svn:log V 17 Fix indentation. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T08:05:23.410962Z K 7 svn:log V 36 Bring back the number of CPU to 32. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T08:07:41.612096Z K 7 svn:log V 21 Add an UPDATE entry. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T08:24:29.218050Z K 7 svn:log V 4 MFC END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T08:46:13.422082Z K 7 svn:log V 2968 etire the cpumask_t type and replace it with cpuset_t usage. This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being. Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES. Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64). Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC. People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately. Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development. (I really hope I didn't forget anyone, if it happened I apologize in advance). END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T09:02:25.931916Z K 7 svn:log V 48 After reintegration the branch must be removed. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-06-07T09:03:28.061739Z K 7 svn:log V 809 Flesh out a new HAL method to fetch the radar PHY error frame information. For the AR5211/AR5212, this is apparently a one byte pulse duration counter value. It is only coded up here for the AR5212 as I don't have any AR5211-series hardware to test it on. This information was extracted from the Madwifi DFS branch along with some local additions. Please note - all this does is extract out the radar event duration, it in no way reflects the presence of a radar. Further code is needed to take a set of radar events and filter them to extract out correct radar pulse trains (and ignore other events.) For further information, please see: http://wiki.freebsd.org/dev/ath_hal%284%29/RadarDetection This includes references to the relevant patents which describe what is going on. Obtained from: Madwifi END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T09:03:41.308113Z K 7 svn:log V 54 Regenerate the largeSMP branch for finishing the job. END K 10 svn:author V 8 jlaffaye K 8 svn:date V 27 2011-06-07T09:06:15.485815Z K 7 svn:log V 126 - Add myself to calendar.freebsd - Add the forgotten relation to mentors in committers-ports.dot Approved by: bapt@ (mentor) END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-07T09:37:08.415919Z K 7 svn:log V 4 MFC END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-07T11:11:11.677505Z K 7 svn:log V 262 Do not use LCM from stripesize and user specified alignment value. When user wants have specific alignment - do what user wants. Use stripesize as alignment value in case, when some of gpart's arguments are ommitted for automatic calculation. Suggested by: mav END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-07T12:00:29.455913Z K 7 svn:log V 233 - Use ELM_MALLOC() for struct rainfo. - Fix a missing back pointer assignment in struct prefix to struct rainfo when addr="" is specified. This caused SIGSEGV. - Insert a prefix element to a tail queue after setting parameters. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-06-07T14:00:47.185896Z K 7 svn:log V 72 Since HAL_PHYERR_* is used in the radar code, always include ah_desc.h. END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-06-07T14:35:18.357022Z K 7 svn:log V 203 MFC r222430: Require an error instead of a timeout to decide the new-style fan commands won't work. This prevents a busy system from making smu(4) suddenly decide its fans use the old-style command set. END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-06-07T14:36:13.407553Z K 7 svn:log V 309 MFC r222666: Fix a typo derived from a mismerge from mmu_oea that would cause pmap_sync_icache() to sync random (possibly uncached or nonexisting!) memory, causing kernel page faults or machine checks, most easily triggered by using GDB. While here, add an additional safeguard to only sync cacheable memory. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-07T15:40:17.973473Z K 7 svn:log V 45 Fix a bug that prevents tc=xxx from working. END K 10 svn:author V 2 jh K 8 svn:date V 27 2011-06-07T16:23:27.193466Z K 7 svn:log V 130 Remove a gratuitous newline. This should be a non-functional change. PR: bin/153667 Submitted by: Craig Leres MFC after: 1 week END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-07T17:01:52.115521Z K 7 svn:log V 603 Make automatic hw.snd.default_unit choice a bit more intelligent. Instead of just setting it to the first registered device, reevaluate it for each device registered, trying to choose best candidate, unless one was forced. For now use such preference order: play&rec, play, rec. As side effect, this should workaround the situation when HDMI audio output of the video card, usually not connected to anything, becomes default, that requires manual user intervention to make sound working. If at some point this won't be enough, we can try to fetch some additional priority flags from the device driver. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-06-07T17:19:14.066151Z K 7 svn:log V 129 Fix a problem with r222813; given that we may only operate on interrupt globals here but clobber %y save and restore the latter. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-06-07T17:33:39.294254Z K 7 svn:log V 458 Adapt CATR() to r222813. This is somewhat tricky as we can't afford using more than three temporary register in several places CATR() is used so this code trades instructions in for registers. Actually, this still isn't sufficient and CATR() has the side-effect of clobbering %y. Luckily, with the current uses of CATR() this either doesn't matter or we are able to (save and) restore it. Now that there's only one use of AND() and TEST() left inline these. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-07T17:40:33.659493Z K 7 svn:log V 106 Log the socket address passed as the destination to sendto() and sendmsg() via ktrace. MFC after: 1 week END K 10 svn:author V 6 grehan K 8 svn:date V 27 2011-06-07T18:35:45.353786Z K 7 svn:log V 109 Allow access to the device's config area with any size i/o access at any offset. This is now spec-compliant. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-07T18:43:02.608899Z K 7 svn:log V 55 MFC r219242: Print out shared flag for debug purpose. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-07T18:48:49.465451Z K 7 svn:log V 297 Add a special mount option "failok" to indicate that the administrator wants the system to proceed to boot without bailing out into single user mode, even when the file system can not be successfully mounted. This option is implemented in mount(8) and not passed into kernel. MFC after: 1 month END K 10 svn:author V 2 bz K 8 svn:date V 27 2011-06-07T19:39:34.143525Z K 7 svn:log V 238 For the moment document the possible problem introduced with dynamic address family detection in world, mostly noticed by ifconfig(8), when running with an old kernel. Reported by: Andrzej Tobola (ato iem.pw.edu.pl) Reported by: gcooper END K 10 svn:author V 3 zec K 8 svn:date V 27 2011-06-07T20:46:03.187830Z K 7 svn:log V 73 Set curvnet context in a callout-trigerred code path. MFC after: 3 days END K 10 svn:author V 2 mm K 8 svn:date V 27 2011-06-07T20:46:31.316935Z K 7 svn:log V 139 Silence notice on pool creation, import and access. Suggested by: Jeremy Chadwick (freebsd-stable@) Discussed with: pjd MFC after: 1 week END K 10 svn:author V 5 gibbs K 8 svn:date V 27 2011-06-07T20:49:29.064634Z K 7 svn:log V 92 Create a project branch for intergration of the ZFS fault monitoring and management daemon. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-07T21:15:43.657301Z K 7 svn:log V 436 MFC 221138: Only align MSI message groups based on the number of messages being allocated, not the maximum number of messages the device supports. The spec only requires the former, and I believe I implemented the latter due to misunderstanding an e-mail. In particular, this fixes an issue where having several devices that all support 16 messages can run out of IDT vectors on x86 even though the driver only uses a single message. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-07T21:16:02.664126Z K 7 svn:log V 436 MFC 221138: Only align MSI message groups based on the number of messages being allocated, not the maximum number of messages the device supports. The spec only requires the former, and I believe I implemented the latter due to misunderstanding an e-mail. In particular, this fixes an issue where having several devices that all support 16 messages can run out of IDT vectors on x86 even though the driver only uses a single message. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-07T21:48:36.760361Z K 7 svn:log V 863 MFC 219968: Fix some locking nits with the p_state field of struct proc: - Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL in fork to honor the locking requirements. While here, expand the scope of the PROC_LOCK() on the new process (p2) to avoid some LORs. Previously the code was locking the new child process (p2) after it had locked the parent process (p1). However, when locking two processes, the safe order is to lock the child first, then the parent. - Fix various places that were checking p_state against PRS_NEW without having the process locked to use PROC_LOCK(). Every place was already locking the process, just after the PRS_NEW check. - Remove or reduce the use of PROC_SLOCK() for places that were checking p_state against PRS_NEW. The PROC_LOCK() alone is sufficient for reading the current state. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-06-07T23:15:21.858340Z K 7 svn:log V 357 - For the case when tl1_align(_trap) is used to call rsf_fatal via RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just like tl1_data_excptn(_trap) does. This is more or less cosmetic because in case RSF_FATAL is called we're already heading south. - Correct an END(). - Read the window state from the correct register for a CATR(). END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-08T00:31:10.502897Z K 7 svn:log V 60 Use .Dq instead of hardcoding `` and ''. Suggested by: gjb END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-06-08T01:14:31.727892Z K 7 svn:log V 273 MFC: r222289 Fix the new NFS client so that it correctly sets the "must_commit" argument for a write RPC when it succeeds for the first one and fails for a subsequent RPC within the same call to the function. This makes it compatible with the old NFS client for this case. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-08T01:18:47.455240Z K 7 svn:log V 15 MFC less v443. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-06-08T01:28:46.493527Z K 7 svn:log V 67 MFC: r222291 Add some missing mutex locking to the new NFS client. END K 10 svn:author V 2 bz K 8 svn:date V 27 2011-06-08T03:02:11.567657Z K 7 svn:log V 88 Correct comments and debug logging in ipsec to better match reality. MFC after: 3 days END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-08T03:45:40.727216Z K 7 svn:log V 487 MFC r219405: Extend struct sysvec with new method sv_schedtail, which is used for an explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process. Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method. While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI. MFC r219421: Remove bogus since r219405 check of the Linux ABI. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-08T03:55:58.749411Z K 7 svn:log V 53 MFC r219558: Style(9) fixes. No functional changes. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-08T04:06:56.348296Z K 7 svn:log V 146 - Disable "resolvconf -d" temporarily to avoid extra invocations of the script under a certain condition. - Fix argv handling. Spotted by: ume END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-08T04:50:23.243379Z K 7 svn:log V 87 MFC r222559: Hide useless warning under debug macro. PR: kern/69963, kern/139226 END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-08T04:54:22.306349Z K 7 svn:log V 134 MFC r222559: Hide useless warning under debug macro. PR: kern/69963, kern/139226 This is direct commit to stable/7. END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-08T04:57:14.200237Z K 7 svn:log V 59 MFC r222560: Hide some debug messages under debug macro. END K 10 svn:author V 2 ru K 8 svn:date V 27 2011-06-08T08:08:42.478904Z K 7 svn:log V 287 Pull up all vendor changes to mdoc(7). This also replaces the local fix in r219209 that made .Ac emit ASCII angle quotes with an official fix. In the official fix, ASCII quotes are output when using the .Aq, .Ao and .Ac calls, but only when nested into the .An macro. PR: gnu/154822 END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-06-08T08:12:15.246138Z K 7 svn:log V 923 remove code for dynamic offlining/onlining of CPUs on x86 The code has definitely been broken for SCHED_ULE, which is a default scheduler. It may have been broken for SCHED_4BSD in more subtle ways, e.g. with manually configured CPU affinities and for interrupt devilery purposes. We still provide a way to disable individual CPUs or all hyperthreading "twin" CPUs before SMP startup. See the UPDATING entry for details. Interaction between building CPU topology and disabling CPUs still remains fuzzy: topology is first built using all availble CPUs and then the disabled CPUs should be "subtracted" from it. That doesn't work well if the resulting topology becomes non-uniform. This work is done in cooperation with Attilio Rao who in addition to reviewing also provided parts of code. PR: kern/145385 Discussed with: gcooper, ambrisko, mdf, sbruno Reviewed by: attilio Tested by: pho, pluknet X-MFC after: never END K 10 svn:author V 2 ru K 8 svn:date V 27 2011-06-08T08:16:32.178474Z K 7 svn:log V 19 Added FreeBSD 8.3. END K 10 svn:author V 2 ru K 8 svn:date V 27 2011-06-08T08:22:54.280442Z K 7 svn:log V 76 Sync Groff with what's in HEAD except for not re-enabling ANSI SGR support. END K 10 svn:author V 2 bz K 8 svn:date V 27 2011-06-08T10:59:36.184686Z K 7 svn:log V 283 Add the missing call to ip6_ipsec_filtertunnel() to be able to control whether decapsulated IPsec packets will be passed to pfil again depending on the setting of the net.ip6.ipsec6.filtertunnel sysctl. PR: kern/157670 Submitted by: Manuel Kasper (mk neon1.net) MFC after: 2 weeks END K 10 svn:author V 8 netchild K 8 svn:date V 27 2011-06-08T11:36:06.533701Z K 7 svn:log V 84 MFC r221430: Use proper return codes (valuable output, invalid config, problems). END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-08T12:03:34.365635Z K 7 svn:log V 24 Merge from HEAD@222848. END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-06-08T13:23:35.632615Z K 7 svn:log V 180 Compile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for GDB's ability to locate r_debug_state (which is actually the only function that need be compiled this way). END K 10 svn:author V 8 andreast K 8 svn:date V 27 2011-06-08T16:00:30.975419Z K 7 svn:log V 215 - Improve error handling. - Add retry loops in the i2c read/write functions. - Combied the ADC channel selection and readout of the value into one iicbus_transfer to avoid possible races. Reviewed by: nwhitehorn END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-08T16:03:29.408011Z K 7 svn:log V 540 - Accumulate RA options instead of replacing old ones when a new RA arrived. RFC 4861 6.3.4 clearly defines handling multiple RAs in this way. - RDNSS/DNSSL options from multiple RAs on a single link will be gathered and sent to resolvconf(8). - Call "resolvconf -d" only after at least one RDNSS or DNSSL option is received and then all of them are expired. - The rtsold.dump output now supports displaying a list of the RA options. - Use more human-readable expression for logging values of struct timeval. Discussed with: ume END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-08T16:06:27.453765Z K 7 svn:log V 24 Merge from HEAD@222861. END K 10 svn:author V 3 hrs K 8 svn:date V 27 2011-06-08T16:07:44.202357Z K 7 svn:log V 65 Revert bogus changes accidentally merged in the previous commit. END K 10 svn:author V 4 jkim K 8 svn:date V 27 2011-06-08T18:52:42.168656Z K 7 svn:log V 45 Remove a redundant assignment since r221703. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-08T19:28:59.370287Z K 7 svn:log V 282 In the current code, a double panic condition may lead to dumps interleaving. Signal dumping to happen only for the first panic which should be the most important. Sponsored by: Sandvine Incorporated Submitted by: Nima Misaghian (nmisaghian AT sandvine DOT com) MFC after: 2 weeks END K 10 svn:author V 4 jkim K 8 svn:date V 27 2011-06-08T19:38:31.975813Z K 7 svn:log V 671 Introduce low-resolution TSC timecounter "TSC-low". It replaces the normal TSC timecounter if TSC frequency is higher than ~4.29 MHz (or 2^32-1 Hz) or multiple CPUs are present. The "TSC-low" frequency is always lower than a preset maximum value and derived from TSC frequency (by being halved until it becomes lower than the maximum). Note the maximum value for SMP case is significantly lower than UP case because we want to reduce (rare but known) "temporal anomalies" caused by non-serialized RDTSC instruction. Normally, it is still higher than "ACPI-fast" timecounter frequency (which was default timecounter hardware for long time until r222222) to be useful. END K 10 svn:author V 2 mm K 8 svn:date V 27 2011-06-08T19:45:47.085232Z K 7 svn:log V 416 MFC r218056: Fix bug in the netfront driver that caused excessive packet drops during receive processing. Remove unnecessary restrictions on the mbuf chain length built during an LRO receive. This restriction was copied from the Linux netfront driver where the LRO implementation cannot handle more than 18 discontinuities. The FreeBSD implementation has no such restriction. Approved by: gibbs (private e-mail) END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T19:58:20.275193Z K 7 svn:log V 87 MFC 220390: Fix several places to ignore processes that are not yet fully constructed. END K 10 svn:author V 4 jkim K 8 svn:date V 27 2011-06-08T20:08:06.207802Z K 7 svn:log V 328 Increase quality of TSC (or TSC-low) timecounter to 1000 if it is P-state invariant. For SMP case (TSC-low), it also has to pass SMP synchronization test and the CPU vendor/model has to be white-listed explicitly. Currently, all Intel CPUs and single-socket AMD Family 15h processors are listed here. Discussed with: hackers END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T20:12:38.984684Z K 7 svn:log V 67 MFC 221179: Trim an additional unnecessary include. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T20:57:22.641497Z K 7 svn:log V 162 MFC 221182,222760: Add support for Oxford PCI Express Expresso family devices. For these devices, the number of supported ports is read from a register in BAR 0. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T21:10:44.795792Z K 7 svn:log V 266 MFC 221208: Add a 'show progress' command that shows a summary of all in-progress commands for a given adapter. Specifically, it shows the status of any drive or volume activities currently in progress similar to the 'drive process' and 'volume progress' commands. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T21:10:55.458384Z K 7 svn:log V 266 MFC 221208: Add a 'show progress' command that shows a summary of all in-progress commands for a given adapter. Specifically, it shows the status of any drive or volume activities currently in progress similar to the 'drive process' and 'volume progress' commands. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T21:14:04.394513Z K 7 svn:log V 126 MFC 221326: Add an entry for the Kuroutoshikou SERIAL4P-LPPCI2 which uses an Oxford 4 port chip but with a nonstandard clock. END K 10 svn:author V 7 davidch K 8 svn:date V 27 2011-06-08T21:18:14.736856Z K 7 svn:log V 806 - Major reorganization of mbuf handling throughout the driver to increase robustness (no more calls to panic(9)) and simplify code. - Allocate RX/TX data structures as a single buffer rather than an array of 4KB pages to simplify code. - Fixed LRO (aka TPA) code. Removed kernel module parameter and support enabling disabling LRO through ifconfig(8) command line. LRO is still disabled by default but should be enabled for best performance on an endpoint device. - Fixed statistcs code and removed kernel module parameter (stats should just work). - Added many software counters to help identify the cause of some performance issues. - Streamlined adapter internal init/stop code paths. - Fiddled with debug code (adding some here, removing some there). - Continued style(9) adjustments. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T21:23:18.809792Z K 7 svn:log V 109 MFC 221731: Add an entry for the SIIG Quartet Serial 850 which uses an Oxford chip with a non-default clock. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T21:29:12.621736Z K 7 svn:log V 166 MFC 222093: Add support for the SIIG Cyber 2S PCIe adapter. It is based on an Oxford Semiconductor OX16PCI954 but uses only two ports with a non-default clock rate. END K 10 svn:author V 6 obrien K 8 svn:date V 27 2011-06-08T21:29:33.442202Z K 7 svn:log V 21 Simply post r222273. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-08T21:32:14.799195Z K 7 svn:log V 196 MFC 222328: For Timedia multiport serial adapters, the first two ports use a SUN1889 which uses a non-standard clock (* 8) while any additional ports use SUN1699 chips which use a standard clock. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-08T21:36:36.265573Z K 7 svn:log V 163 MFC r215013 by mdf@: Whitespace and other aspects of style(9). No functional changes. MFC r220730: Remove malloc(9) return value checks when M_WAITOK is used. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-08T21:39:00.173176Z K 7 svn:log V 36 MFC r221784: Remove wrong comment. END K 10 svn:author V 6 jilles K 8 svn:date V 27 2011-06-08T21:58:19.074163Z K 7 svn:log V 41 sh: Add simple tests for set -x and PS4. END K 10 svn:author V 3 ken K 8 svn:date V 27 2011-06-08T21:59:07.232115Z K 7 svn:log V 98 Add dump.c to the rtsol build. It is needed now that sec2str is non-static and used in rtsold.c. END K 10 svn:author V 4 jkim K 8 svn:date V 27 2011-06-08T23:44:59.710826Z K 7 svn:log V 226 Tidy up r222866. - Re-add accidentally removed atomic op. for sysctl(9) handler. - Remove a period(`.') at the end of a debugging message. - Consistently spell "low" for "TSC-low" timecounter throughout. Pointed out by: bde END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-09T00:34:56.154382Z K 7 svn:log V 4 MFC END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-06-09T01:10:39.832863Z K 7 svn:log V 278 MFC: r222329 Add a check for MNTK_UNMOUNTF at the beginning of nfs_sync() in the new NFS client so that a forced dismount doesn't get stuck in the VFS_SYNC() call that happens before VFS_UNMOUNT() in dounmount(). Additional changes are needed before forced dismounts will work. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-09T05:21:08.147923Z K 7 svn:log V 44 MFC r219776: Remove a now unused variable. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-09T05:23:28.792997Z K 7 svn:log V 134 MFC r219783, r219786: A bit rearranged rtalloc1_fib() code. To avoid code duplication move the miss label to line up and jump on it. END K 10 svn:author V 7 dchagin K 8 svn:date V 27 2011-06-09T05:24:28.336560Z K 7 svn:log V 32 MFC r219791: Remove dead code. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2011-06-09T06:10:39.793026Z K 7 svn:log V 31 Minor typo, fix 2 attributions END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-06-09T08:25:56.987567Z K 7 svn:log V 82 MFC r221527: prepare code that does topology detection for amd cpus for bulldozer END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-06-09T08:30:46.076511Z K 7 svn:log V 45 MFC r222720,222721: corrections to amdsbwd.4 END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-06-09T08:33:42.987937Z K 7 svn:log V 45 MFC r222720,222721: corrections to amdsbwd.4 END K 10 svn:author V 2 mm K 8 svn:date V 27 2011-06-09T10:04:11.597626Z K 7 svn:log V 35 MFC r222757: Remove empty #ifndef END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-06-09T10:43:36.785405Z K 7 svn:log V 106 MFC r222603: Do not hide stripeoffset from libgeom(3), it may be useful even when stripesize is zero. END K 10 svn:author V 6 cognet K 8 svn:date V 27 2011-06-09T11:54:11.902504Z K 7 svn:log V 204 Please welcome Grzegorz Bernacki (gber@FreeBSD.org). Grzegorz has been doing stuff on arm and ppc for quite some time, and is working on some cool stuff, including SMP support for arm. Approved by: core END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-09T16:30:13.741782Z K 7 svn:log V 355 Intel NM10 chipset's SATA controller has same PCI ID and revision as ICH7's, but has only 2 SATA ports instead of 4. The worst part is that SStatus and SError registers for missing ports are not implemented and return wrong values (0xffffffff), that caused infinite reset loop. Just ignore that SError value while I found no better way to identify them. END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-06-09T19:47:30.982528Z K 7 svn:log V 155 Add -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using clang, which would otherwise complain about some 64-bit bridge mode instructions. END K 10 svn:author V 2 bz K 8 svn:date V 27 2011-06-09T19:52:28.927668Z K 7 svn:log V 273 Contrary to when returning in all-good cases at the end of functions we did not free memory (1) or close the file descriptor (2) in error cases. Reported by: Mark Johnston (1) Reported by: attilio (2) Reviewed by: jhb Sponsored by: Sandvine Incorporated MFC after: 1 week END K 10 svn:author V 2 np K 8 svn:date V 27 2011-06-09T20:21:45.961341Z K 7 svn:log V 43 cxgbetool: a tool for the cxgbe(4) driver. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2011-06-09T21:29:15.873461Z K 7 svn:log V 32 Bootstrap the llvm-ia64 branch. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2011-06-09T22:17:27.239428Z K 7 svn:log V 29 Add a skeletal IA64 backend. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2011-06-09T22:38:38.434130Z K 7 svn:log V 36 Add file missed in previous commit. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-09T22:50:10.097517Z K 7 svn:log V 28 Vendor import of less v444. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-09T22:51:05.279682Z K 7 svn:log V 19 Tag for less v444. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-09T22:52:57.312172Z K 7 svn:log V 46 MFV: Update to less v444. MFC after: 2 weeks END K 10 svn:author V 6 jilles K 8 svn:date V 27 2011-06-09T23:12:23.679196Z K 7 svn:log V 642 sh: Do parameter expansion before printing PS4 (set -x). The function name expandstr() and the general idea of doing this kind of expansion by treating the text as a here document without end marker is from dash. All variants of parameter expansion and arithmetic expansion also work (the latter is not required by POSIX but it does not take extra code and many other shells also allow it). Command substitution is prevented because I think it causes too much code to be re-entered (for example creating an unbounded recursion of trace lines). Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would be quite useful. END K 10 svn:author V 7 rodrigc K 8 svn:date V 27 2011-06-10T01:13:15.297170Z K 7 svn:log V 129 Obtain bswap64() function implementation from version 1.3 of src/common/lib/libc/gen/bswap64.c in NetBSD. Obtained from: NetBSD END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-06-10T01:15:23.584813Z K 7 svn:log V 37 MFC r221793: nc(1) from OpenBSD 4.9. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2011-06-10T02:07:21.523344Z K 7 svn:log V 77 Teach Clang about ia64. Should be about right for as much as it is complete. END K 10 svn:author V 7 attilio K 8 svn:date V 27 2011-06-10T02:40:01.309443Z K 7 svn:log V 4 MFC END K 10 svn:author V 6 emaste K 8 svn:date V 27 2011-06-10T03:27:25.162645Z K 7 svn:log V 232 MFC r222589: There are a couple of structs in mfireg.h with members named 'class'. These cause problems when trying to include the header in a C++ project. Rename them to 'evt_class', and track the change in mfi and mfiutil. END K 10 svn:author V 2 ru K 8 svn:date V 27 2011-06-10T06:11:33.151380Z K 7 svn:log V 177 MFC r222647: Don't pass -o1- to groff(1) by default. If ms(7) formatted document uses the .RP macro, a separate cover page is created as page 0 which is not otherwise output. END K 10 svn:author V 8 netchild K 8 svn:date V 27 2011-06-10T07:54:38.120294Z K 7 svn:log V 387 MFC r221423, r221424, r221426, r221428, r221434: This is v4l2 support for the linuxulator. This allows to access FreeBSD native devices which support the v4l2 API from processes running within the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd or multimedia/webcamd supplied drivers. MFC r221425: Fix typo in comment, improve comment. MFC tested by: nox END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T08:32:33.029182Z K 7 svn:log V 569 MFC r220929: According to ATA specifications, when ATAPI master is the only device, it should respond with all zeroes to any access to slave registers. Test with PATA devices confirmed such behavior. Unluckily, Intel SATA controllers in legacy emulation mode behave differently, not making any difference between ATA and ATAPI devices. It causes false positive slave device detection and, as result, command timeouts. To workaround this problem, mask result of legacy-emulated soft-reset with the device presence information received from the SATA-specific registers. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T08:49:38.541129Z K 7 svn:log V 475 MFC rr222039: Add support for "LED" enclosure management messages, defined by the AHCI. When supported by hardware, this allows to control per-port activity, locate and fault LEDs via the led(4) API for localization and status reporting purposes. Supporting AHCI controllers may transmit that information to the backplane controllers via SGPIO interface. Backplane controllers interpret received statuses in some way (IBPI standard) to report them using present indicators. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T08:54:52.640170Z K 7 svn:log V 993 MFC r222285: According to SATA specification, when Serial ATA Enclosure Management Bridge (SEMB) is unable to communicate to Storage Enclosure Processor (SEP), in response to hard and soft resets it should among other things return value 0x7F in Status register. The weird side is that it means DRQ bit set, which tells that reset request is not completed. It would be fine if SEMB was the only device on port. But if SEMB connected to PMP or built into it, it may block access to other devices sharing same SATA port. Make some tunings/fixes to soft-reset handling to workaround the issue: - ahci(4): request CLO on the port after soft reset to ignore DRQ bit; - siis(4): gracefully reinitialize port after soft reset timeout (hardware doesn't detect reset request completion in this case); - mvs(4): if PMP is used, send dummy soft-reset to the PMP port to make it clear DRQ bit for us. For now this makes quirks in ata_pmp.c, hiding SEMB ports of SiI3726/SiI4726 PMPs, less important. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T08:58:13.188878Z K 7 svn:log V 820 MFC r222304: Marvell 88SE91xx controllers are known to report soft-reset completion without waiting for device readiness (or at least not updating FIS receive area in time). To workaround that, special quirk was added earlier to wait for the FIS receive area update. But it was found that under same PCI ID 0x91231b4b and revision 0x11 there are two completely different chip versions (firmware?): HBA and RAID. The problem is that RAID version in some cases, such as hot-plug, does not update FIS receive area at all! To workaround that, differentiate the chip versions by their capabilities, and, if RAID version found, skip FIS receive area update waiting and read device signature from the PxSIG register instead. This method doesn't work for HBA version when PMP attached, so keep using previous workaround there. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T08:59:30.314618Z K 7 svn:log V 47 MFC r222306: Add Marvell 88SE9172 chip PCI ID. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T09:12:09.912788Z K 7 svn:log V 181 MFC r221101: Implement relaxed comparision for hardcoded provider names to make it ignore adX/adaY difference in both directions to simplify migration to the CAM-based ATA or back. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T09:18:43.740003Z K 7 svn:log V 385 MFC r222652: Update disk's stripesize and stripeoffset parameters on provider open. They are media-dependent and may change in run-time, same as sectorsize and/or mediasize. SCSI devices return physical sector size and offset via READ CAPACITY(16) command and so can not report it until media inserted or at least until probe sequence completed. UNMAP support is also reported there. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T09:51:15.911330Z K 7 svn:log V 296 MFC r206112, r208928 (by mjacob): Rearrange how things are done to avoid dereferencing stale pointers in the case of immediate unconfigure after configure. Hold the periph an extra count while we have the task to create sysctl context outstanding so that the periph doesn't go away unexpectedly. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T09:54:48.137300Z K 7 svn:log V 83 MFC r220644: Make CAM report devices with ATA/SATA transport to devstat(9) as IDE. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T09:57:48.928115Z K 7 svn:log V 152 MFC r220686 (by jh): Move TUNABLE_INT_FETCH() out of the SIM lock to avoid sleeping while holding the lock. The fix is analogous to r220618 for ada(4). END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T09:58:48.779501Z K 7 svn:log V 121 MFC r220690 (by jh): Move a comment to the right place. The rearrange done in r208928 left the comment to a wrong place. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T10:09:48.593104Z K 7 svn:log V 91 MFC r220778, r220785: Remove some unused variables. Found with: Clang Static Analyzer END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T10:13:40.016954Z K 7 svn:log V 342 MFC r222520: Add quirks to hint 4K physical sector (Advanced Format) for ATA disks not reporting it properly (none? of known disks now). Hitachi and WDC AF disks seem could be identified more or less formally. For Seagate and Samsung enumerate some found models/series. For other disks it can be forced with kern.cam.ada.X.quirks=1 tunable. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-06-10T10:43:49.869349Z K 7 svn:log V 277 MFC r208582 (by mjacob): Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning a whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN). It's less resource comsumptive than scanning a whole bus when the caller knows only one target has changes. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T12:30:16.673918Z K 7 svn:log V 108 Implement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the Host-PCI bridge drivers and nexus. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T13:24:56.771587Z K 7 svn:log V 106 Fix some off-by-one errors with the ending address of candidate regions when attempting to grow a window. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-06-10T13:28:14.102657Z K 7 svn:log V 725 MFC: r222389 Fix the new NFS client so that it handles NFSv4 state correctly during a forced dismount. This required that the exclusive and shared (refcnt) sleep lock functions check for MNTK_UMOUNTF before sleeping, so that they won't block while nfscl_umount() is getting rid of the state. As such, a "struct mount *" argument was added to the locking functions. I believe the only remaining case where a forced dismount can get hung in the kernel is when a thread is already attempting to do a TCP connect to a dead server when the krpc client structure called nr_client is NULL. This will only happen just after a "mount -u" with options that force a new TCP connection is done, so it shouldn't be a problem in practice. END K 10 svn:author V 6 jilles K 8 svn:date V 27 2011-06-10T13:47:11.511939Z K 7 svn:log V 433 skel/.shrc: Improve commented CDPATH example for POSIX requirements. POSIX says an empty entry in CDPATH shall not result in the new directory being printed, while any non-empty entry shall result in the new directory being printed, including ".". Therefore, the value of CDPATH should almost always start with a colon, not dot and colon. Our sh does not print the name for empty entries as well as "." entries. MFC after: 1 week END K 10 svn:author V 8 bschmidt K 8 svn:date V 27 2011-06-10T17:06:25.606289Z K 7 svn:log V 167 Make sure to drop the IEEE80211_RATE_BASIC flag even for MCS rates. Reported by: Maciej Milewski Tested by: Maciej Milewski END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:46:40.598337Z K 7 svn:log V 1486 MFC 221209: TCP reuses t_rxtshift to determine the backoff timer used for both the persist state and the retransmit timer. However, the code that implements "bad retransmit recovery" only checks t_rxtshift to see if an ACK has been received in during the first retransmit timeout window. As a result, if ticks has wrapped over to a negative value and a socket is in the persist state, it can incorrectly treat an ACK from the remote peer as a "bad retransmit recovery" and restore saved values such as snd_ssthresh and snd_cwnd. However, if the socket has never had a retransmit timeout, then these saved values will be zero, so snd_ssthresh and snd_cwnd will be set to 0. If the socket is in fast recovery (this can be caused by excessive duplicate ACKs such as those fixed by 220794), then each ACK that arrives triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd to be no larger than snd_ssthresh. In effect, the socket's send window is permamently stuck at 0 even though the remote peer is advertising a much larger window and pending data is only sent via TCP window probes (so one byte every few seconds). Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that the various snd_*_prev fields in the pcb are valid and only perform "bad retransmit recovery" if this flag is set in the pcb. The flag is set on the first retransmit timeout that occurs and is cleared on subsequent retransmit timeouts or when entering the persist state. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:47:10.206729Z K 7 svn:log V 1486 MFC 221209: TCP reuses t_rxtshift to determine the backoff timer used for both the persist state and the retransmit timer. However, the code that implements "bad retransmit recovery" only checks t_rxtshift to see if an ACK has been received in during the first retransmit timeout window. As a result, if ticks has wrapped over to a negative value and a socket is in the persist state, it can incorrectly treat an ACK from the remote peer as a "bad retransmit recovery" and restore saved values such as snd_ssthresh and snd_cwnd. However, if the socket has never had a retransmit timeout, then these saved values will be zero, so snd_ssthresh and snd_cwnd will be set to 0. If the socket is in fast recovery (this can be caused by excessive duplicate ACKs such as those fixed by 220794), then each ACK that arrives triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd to be no larger than snd_ssthresh. In effect, the socket's send window is permamently stuck at 0 even though the remote peer is advertising a much larger window and pending data is only sent via TCP window probes (so one byte every few seconds). Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that the various snd_*_prev fields in the pcb are valid and only perform "bad retransmit recovery" if this flag is set in the pcb. The flag is set on the first retransmit timeout that occurs and is cleared on subsequent retransmit timeouts or when entering the persist state. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:51:22.606212Z K 7 svn:log V 561 MFC 220794: When checking to see if a window update should be sent to the remote peer, don't force a window update if the window would not actually grow due to window scaling. Specifically, if the window scaling factor is larger than 2 * MSS, then after the local reader has drained 2 * MSS bytes from the socket, a window update can end up advertising the same window. If this happens, the supposed window update actually ends up being a duplicate ACK. This can result in an excessive number of duplicate ACKs when using a higher maximum socket buffer size. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:51:33.483952Z K 7 svn:log V 561 MFC 220794: When checking to see if a window update should be sent to the remote peer, don't force a window update if the window would not actually grow due to window scaling. Specifically, if the window scaling factor is larger than 2 * MSS, then after the local reader has drained 2 * MSS bytes from the socket, a window update can end up advertising the same window. If this happens, the supposed window update actually ends up being a duplicate ACK. This can result in an excessive number of duplicate ACKs when using a higher maximum socket buffer size. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:55:58.077511Z K 7 svn:log V 588 MFC 222032: Fix a race in the SMP rendezvous code. Specifically, the write by the last CPU to to finish the rendezvous action may become visible to different CPUs at different times. As a result, the CPU that initiated the rendezvous may exit the rendezvous and drop the lock allowing another rendezvous to be initiated on the same CPU or a different CPU. In that case the exit sentinel may be cleared before all CPUs have noticed causing those CPUs to hang forever. Workaround this by using a generation count to notice when this race occurs and to exit the rendezvous in that case. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:56:12.565975Z K 7 svn:log V 588 MFC 222032: Fix a race in the SMP rendezvous code. Specifically, the write by the last CPU to to finish the rendezvous action may become visible to different CPUs at different times. As a result, the CPU that initiated the rendezvous may exit the rendezvous and drop the lock allowing another rendezvous to be initiated on the same CPU or a different CPU. In that case the exit sentinel may be cleared before all CPUs have noticed causing those CPUs to hang forever. Workaround this by using a generation count to notice when this race occurs and to exit the rendezvous in that case. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:58:32.475143Z K 7 svn:log V 142 MFC 222252: Simplify a stale assertion. We have not called mi_switch() from a nested critical section during a preemption for several years. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T18:58:48.492697Z K 7 svn:log V 142 MFC 222252: Simplify a stale assertion. We have not called mi_switch() from a nested critical section during a preemption for several years. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T19:03:17.523224Z K 7 svn:log V 2087 MFC 222254: Fix an issue with critical sections and SMP rendezvous handlers. Specifically, a critical_exit() call that drops the nesting level to zero has a brief window where the pending preemption flag is set and the nesting level is set to zero. This is done purposefully to avoid races where a preemption scheduled by an interrupt could be lost otherwise (see revision 144777). However, this does mean that if an interrupt fires during this window and enters and exits a critical section, it may preempt from the interrupt context. This is generally fine as the interrupt code is careful to arrange critical sections so that they are not exited until it is safe to preempt (e.g. interrupts EOI'd and masked if necessary). However, the SMP rendezvous IPI handler does not quite follow this rule, and in general a rendezvous can never be preempted. Rendezvous handlers are also not permitted to schedule threads to execute, so they will not typically trigger preemptions. SMP rendezvous handlers may use spinlocks (carefully) such as the rm_cleanIPI() handler used in rmlocks, but using a spinlock also enters and exits a critical section. If the interrupted top-half code is in the brief window of critical_exit() where the nesting level is zero but a preemption is pending, then releasing the spinlock can trigger a preemption. Because we know that SMP rendezvous handlers can never schedule a thread, we know that a critical_exit() in an SMP rendezvous handler will only preempt in this edge case. We also know that the top-half thread will happily handle the deferred preemption once the SMP rendezvous has completed, so the preemption will not be lost. This makes it safe to employ a workaround where we use a nested critical section in the SMP rendezvous code itself around rendezvous action routines to prevent any preemptions during an SMP rendezvous. The workaround intentionally avoids checking for a deferred preemption when leaving the critical section on the assumption that if there is a pending preemption it will be handled by the interrupted top-half code. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T19:03:32.168764Z K 7 svn:log V 2087 MFC 222254: Fix an issue with critical sections and SMP rendezvous handlers. Specifically, a critical_exit() call that drops the nesting level to zero has a brief window where the pending preemption flag is set and the nesting level is set to zero. This is done purposefully to avoid races where a preemption scheduled by an interrupt could be lost otherwise (see revision 144777). However, this does mean that if an interrupt fires during this window and enters and exits a critical section, it may preempt from the interrupt context. This is generally fine as the interrupt code is careful to arrange critical sections so that they are not exited until it is safe to preempt (e.g. interrupts EOI'd and masked if necessary). However, the SMP rendezvous IPI handler does not quite follow this rule, and in general a rendezvous can never be preempted. Rendezvous handlers are also not permitted to schedule threads to execute, so they will not typically trigger preemptions. SMP rendezvous handlers may use spinlocks (carefully) such as the rm_cleanIPI() handler used in rmlocks, but using a spinlock also enters and exits a critical section. If the interrupted top-half code is in the brief window of critical_exit() where the nesting level is zero but a preemption is pending, then releasing the spinlock can trigger a preemption. Because we know that SMP rendezvous handlers can never schedule a thread, we know that a critical_exit() in an SMP rendezvous handler will only preempt in this edge case. We also know that the top-half thread will happily handle the deferred preemption once the SMP rendezvous has completed, so the preemption will not be lost. This makes it safe to employ a workaround where we use a nested critical section in the SMP rendezvous code itself around rendezvous action routines to prevent any preemptions during an SMP rendezvous. The workaround intentionally avoids checking for a deferred preemption when leaving the critical section on the assumption that if there is a pending preemption it will be handled by the interrupted top-half code. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T19:08:07.245424Z K 7 svn:log V 199 MFC 222651: Properly return an ENOBUFS error if a write to a tun(4) device fails due to m_uiotombuf() failing. While here, trim unneeded error handling related to tuninit() since it can never fail. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T19:08:17.686477Z K 7 svn:log V 199 MFC 222651: Properly return an ENOBUFS error if a write to a tun(4) device fails due to m_uiotombuf() failing. While here, trim unneeded error handling related to tuninit() since it can never fail. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T19:12:00.781326Z K 7 svn:log V 270 MFC 222660: - Rename the Cronyx Omega2-PCI entry to Exar XR17C158 since that is the real owner of the device ID. Also rename the associated config function while here. - Add support for the 2-port and 4-port Exar parts as well: Exar XR17C/D152 and Exar XR17C154. END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-06-10T19:13:22.929883Z K 7 svn:log V 214 MFC 221079: Generate the network byte order version of the window size structure in a temporary variable on the stack and then copy that into the output buffer so that the htons() conversions use aligned accesses. END