Ħ5224357 155 369 552 552 210 210 319 312 124 124 938 938 200 200 1181 1181 135 135 606 606 288 288 223 223 165 165 232 232 484 484 560 560 330 330 199 199 135 135 525 525 369 369 564 448 262 455 455 387 397 447 447 231 209 523 706 706 182 170 236 245 349 349 228 228 233 233 187 187 419 419 295 295 319 319 252 252 513 513 317 317 600 600 585 585 306 306 167 167 152 152 159 564 564 429 226 226 160 159 159 159 273 273 345 255 255 286 158 158 448 1011 201 727 727 166 328 251 297 687 553 312 278 232 166 140 153 162 218 300 129 156 127 379 286 140 468 250 250 360 1042 331 833 361 632 443 160 160 926 270 268 362 312 220 261 340 545 479 K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:17:12.751422Z K 7 svn:log V 273 MFC: r223126 (partial) Don't include curcpu in the mask which is used as the IPI cookie as we have to ignore it when sending the IPI anyway. Actually I can't think of a good reason why this ever was done that way in the first place as it's not even usefull for debugging. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:23:24.420172Z K 7 svn:log V 456 MFC: r223235 - As with stray vector interrupts limit the reporting of stray level interrupts. Bringup on additional machine models repeatedly reveals firmware that enables interrupts behind our back, causing the console to be flooded otherwise. - As with the regular interrupt counters using uint16_t instead of u_long for counting the stray vector interrupts should be more than sufficient. - Cache the interrupt vector in intr_stray_vector(). END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:24:17.506784Z K 7 svn:log V 456 MFC: r223235 - As with stray vector interrupts limit the reporting of stray level interrupts. Bringup on additional machine models repeatedly reveals firmware that enables interrupts behind our back, causing the console to be flooded otherwise. - As with the regular interrupt counters using uint16_t instead of u_long for counting the stray vector interrupts should be more than sufficient. - Cache the interrupt vector in intr_stray_vector(). END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:25:30.431186Z K 7 svn:log V 114 MFC: r223347 As astopgap minimize the sched_lock coverage in pmap_activate() in order to reduce lock contention. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:25:30.559742Z K 7 svn:log V 114 MFC: r223347 As astopgap minimize the sched_lock coverage in pmap_activate() in order to reduce lock contention. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:26:54.846053Z K 7 svn:log V 223 MFC: r223377 On machines where we don't need to lock the kernel TSB into the dTLB and thus may basically use the entire 64-bit kernel address space increase the kernel virtual memory to not be limited by VM_KMEM_SIZE_MAX. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:28:12.086924Z K 7 svn:log V 216 MFC: r223378 On machines where we don't need to lock the kernel TSB into the dTLB and thus may basically use the entire 64-bit kernel address space reduce VM_KMEM_SIZE_SCALE to 1 allowing kernel to use more memory. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:29:35.435512Z K 7 svn:log V 29 MFC: r223379 Fix whitespace END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:29:35.639780Z K 7 svn:log V 29 MFC: r223379 Fix whitespace END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:32:54.828885Z K 7 svn:log V 842 MFC: r223648, r223949 - In gem_reset_rx() also reset the RX MAC which is necessary in order to get it out of a stuck condition that can be caused by GEM_MAC_RX_OVERFLOW. - In gem_reset_rxdma() call gem_setladrf() in order to reprogram the RX filter and restore the previous content of GEM_MAC_RX_CONFIG. While at it consistently use the newly introduced sc_mac_rxcfg throughout the driver instead of reading the its old content. - Increment if_iqdrops instead of if_ierrors in case of RX buffer allocation failure. - According to the GEM datasheet the RX MAC should also be disabled in gem_setladrf() before changing its configuration. - Add error messages to gem_disable_{r,t}x() and take advantage of these throughout the driver instead of duplicating their functionality all over the place. In joint forces with: yongari END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:32:56.606731Z K 7 svn:log V 842 MFC: r223648, r223949 - In gem_reset_rx() also reset the RX MAC which is necessary in order to get it out of a stuck condition that can be caused by GEM_MAC_RX_OVERFLOW. - In gem_reset_rxdma() call gem_setladrf() in order to reprogram the RX filter and restore the previous content of GEM_MAC_RX_CONFIG. While at it consistently use the newly introduced sc_mac_rxcfg throughout the driver instead of reading the its old content. - Increment if_iqdrops instead of if_ierrors in case of RX buffer allocation failure. - According to the GEM datasheet the RX MAC should also be disabled in gem_setladrf() before changing its configuration. - Add error messages to gem_disable_{r,t}x() and take advantage of these throughout the driver instead of duplicating their functionality all over the place. In joint forces with: yongari END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:34:42.029411Z K 7 svn:log V 104 MFC: r223718 Using .comm to declare intrnames and eintrnames causes binutils 2.17.50 to merge the two. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:34:42.065912Z K 7 svn:log V 104 MFC: r223718 Using .comm to declare intrnames and eintrnames causes binutils 2.17.50 to merge the two. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:41:52.701534Z K 7 svn:log V 1084 MFC: r223719 - For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from the TLBs in order to get rid of the user mappings but instead traverse them an flush only the latter like we also do for the Spitfire-class. Also flushing the unlocked kernel entries can cause instant faults which when called from within cpu_switch() are handled with the scheduler lock held which in turn can cause timeouts on the acquisition of the lock by other CPUs. This was easily seen with a 16-core V890 but occasionally also happened with 2-way machines. While at it, move the SPARC64-V support code entirely to zeus.c. This causes a little bit of duplication but is less confusing than partially using Cheetah-class bits for these. - For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024- entry, 2-way set associative TLB. - In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back. Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V) END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:42:45.482354Z K 7 svn:log V 1084 MFC: r223719 - For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from the TLBs in order to get rid of the user mappings but instead traverse them an flush only the latter like we also do for the Spitfire-class. Also flushing the unlocked kernel entries can cause instant faults which when called from within cpu_switch() are handled with the scheduler lock held which in turn can cause timeouts on the acquisition of the lock by other CPUs. This was easily seen with a 16-core V890 but occasionally also happened with 2-way machines. While at it, move the SPARC64-V support code entirely to zeus.c. This causes a little bit of duplication but is less confusing than partially using Cheetah-class bits for these. - For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024- entry, 2-way set associative TLB. - In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back. Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V) END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:43:24.556955Z K 7 svn:log V 40 MFC: r223720 Don't waste a delay slot. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:43:25.410419Z K 7 svn:log V 40 MFC: r223720 Don't waste a delay slot. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:44:46.718222Z K 7 svn:log V 510 MFC: r223721 UltraSPARC-IV CPUs seem to be affected by a not publicly documented erratum causing them to trigger stray vector interrupts accompanied by a state in which they even fault on locked TLB entries. Just retrying the instruction in that case gets the CPU back on track though. OpenSolaris also just ignores a certain number of stray vector interrupts. While at it, implement the stray vector interrupt handling for SPARC64-VI which use these for indicating uncorrectable errors in interrupt packets. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:44:46.982124Z K 7 svn:log V 510 MFC: r223721 UltraSPARC-IV CPUs seem to be affected by a not publicly documented erratum causing them to trigger stray vector interrupts accompanied by a state in which they even fault on locked TLB entries. Just retrying the instruction in that case gets the CPU back on track though. OpenSolaris also just ignores a certain number of stray vector interrupts. While at it, implement the stray vector interrupt handling for SPARC64-VI which use these for indicating uncorrectable errors in interrupt packets. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:46:54.256079Z K 7 svn:log V 192 MFC: r223795 Call pmap_qremove() before freeing or unwiring the pages, otherwise there's a window during which a page can be re-used before its previous mapping is removed. Reviewed by: alc END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:46:56.118573Z K 7 svn:log V 192 MFC: r223795 Call pmap_qremove() before freeing or unwiring the pages, otherwise there's a window during which a page can be re-used before its previous mapping is removed. Reviewed by: alc END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:52:49.168084Z K 7 svn:log V 127 MFC: r223800 - pmap_cache_remove() and pmap_protect_tte() are only used within pmap.c so static'ize them. - Correct a typo. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:53:23.546226Z K 7 svn:log V 127 MFC: r223800 - pmap_cache_remove() and pmap_protect_tte() are only used within pmap.c so static'ize them. - Correct a typo. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:54:28.402654Z K 7 svn:log V 70 MFC: r223801 It can be useful to know which page still has mappings. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:54:29.715838Z K 7 svn:log V 70 MFC: r223801 It can be useful to know which page still has mappings. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:57:49.986433Z K 7 svn:log V 136 MFC: r223944 According to the OpenSolaris source the PCI latency and the cache line size should be set for Sun ERI. Tested by: yongari END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:57:50.750154Z K 7 svn:log V 136 MFC: r223944 According to the OpenSolaris source the PCI latency and the cache line size should be set for Sun ERI. Tested by: yongari END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:59:43.846147Z K 7 svn:log V 388 MFC: r223959 - Add a missing shift in schizo_get_timecount(). This happened to be non-fatal as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the second counter in the upper 32 bits this would be required though as the MI timecounter code doesn't support 64-bit counters/counter registers. - Remove a redundant NULL assignment from the timecounter initialization. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T18:59:45.246672Z K 7 svn:log V 388 MFC: r223959 - Add a missing shift in schizo_get_timecount(). This happened to be non-fatal as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the second counter in the upper 32 bits this would be required though as the MI timecounter code doesn't support 64-bit counters/counter registers. - Remove a redundant NULL assignment from the timecounter initialization. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:01:35.941814Z K 7 svn:log V 464 MFC: r223960 - Current testing shows that (ab)using the JBC performance counter in bus cycle mode as timecounter just works fine. My best guess is that a firmware update has fixed this, so check at run-time whether it advances and use a positive quality if it does. The latter will cause this timecounter to be used instead of the tick counter based one, which just sucks for SMP. - Remove a redundant NULL assignment from the timecounter initialization. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:01:36.292402Z K 7 svn:log V 464 MFC: r223960 - Current testing shows that (ab)using the JBC performance counter in bus cycle mode as timecounter just works fine. My best guess is that a firmware update has fixed this, so check at run-time whether it advances and use a positive quality if it does. The latter will cause this timecounter to be used instead of the tick counter based one, which just sucks for SMP. - Remove a redundant NULL assignment from the timecounter initialization. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:03:45.479217Z K 7 svn:log V 234 MFC: r223961 - Remove redundant timecounter masking from counter_get_timecount(). - Zero the timecounter when allocation so we don't need to initialize unused members and remove a now redundant NULL assignment. Submitted by: jkim END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:03:50.198651Z K 7 svn:log V 234 MFC: r223961 - Remove redundant timecounter masking from counter_get_timecount(). - Zero the timecounter when allocation so we don't need to initialize unused members and remove a now redundant NULL assignment. Submitted by: jkim END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:04:57.000749Z K 7 svn:log V 103 MFC: r223962 Remove NULL assignments which are redundant for static timecounters. Submitted by: jkim END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:04:57.036068Z K 7 svn:log V 103 MFC: r223962 Remove NULL assignments which are redundant for static timecounters. Submitted by: jkim END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:06:30.066862Z K 7 svn:log V 40 MFC: r223981 Remove extra empty lines. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:06:30.081327Z K 7 svn:log V 40 MFC: r223981 Remove extra empty lines. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:11:29.343467Z K 7 svn:log V 429 MFC: r223984 PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI bridge is blacklisted. In that case just return from pci_alloc_msix_method(), otherwise we continue without a single MSI-X resource, causing subsequent attempts to use the seemingly available resource to fail or when booting verbose to NULL-dereference rle->start when trying to print the IRQ in pci_alloc_msix_method(). Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:11:29.971395Z K 7 svn:log V 429 MFC: r223984 PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI bridge is blacklisted. In that case just return from pci_alloc_msix_method(), otherwise we continue without a single MSI-X resource, causing subsequent attempts to use the seemingly available resource to fail or when booting verbose to NULL-dereference rle->start when trying to print the IRQ in pci_alloc_msix_method(). Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:13:51.231989Z K 7 svn:log V 273 MFC: r223986 - Expand the scope of the lock in the interrupt routine to close races with checking IFF_DRV_RUNNING and simplify the code. This also involves holding the driver lock in the rx_ch callout. - Just use ifp instead of sc->sc_ifp. Submitted by: jhb (mostly) END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T19:13:51.254573Z K 7 svn:log V 273 MFC: r223986 - Expand the scope of the lock in the interrupt routine to close races with checking IFF_DRV_RUNNING and simplify the code. This also involves holding the driver lock in the rx_ch callout. - Just use ifp instead of sc->sc_ifp. Submitted by: jhb (mostly) END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-07-25T20:06:18.899389Z K 7 svn:log V 467 MFC r224020: Add initial support for AX88772B USB Fast Ethernet. AX88772B supports IPv4/IPv6 checksum offloading and VLAN tag insertion/ stripping as well as WOL. Because uether does not provide a way to announce driver specific offload capabilities to upper stack, checksum offloading support needs more work and will be done in future. Special thanks to ASIX for donating sample hardware. H/W donated by: ASIX Electronics Reviewed by: hselasky END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-07-25T20:09:09.391170Z K 7 svn:log V 351 MFC r224023,224060: Document AX88772B and AX88760. AX88760 is treated as AX88772A in driver. Mention all ASIX USB controllers that are supported by axe(4). Reword media types and explicly mention AX88178 is the only controller that supports gigabit link. While I'm here use shorten model instead of showing all controller model numbers. END K 10 svn:author V 8 andreast K 8 svn:date V 27 2011-07-25T20:10:01.180401Z K 7 svn:log V 164 This a follow up commit from r224216 for powerpc 32-bit. Increase the storage size for sintrcnt/sintrnames to .long. Reviewed by: nwhitehorn Approved by: re (kib) END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-07-25T20:12:31.579602Z K 7 svn:log V 358 MFC r224157: Revert r222135 by allowing controller reinitialization. Due to unknown reason Apple UniNorth2 gem(4) device required manual interface down/up operation after r222135. Even though this is not correct thing and I don't like to revert it but it would be better than breaking gem(4) on PPC. This should be revisited. PR: kern/157405 END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-07-25T20:13:35.454258Z K 7 svn:log V 358 MFC r224157: Revert r222135 by allowing controller reinitialization. Due to unknown reason Apple UniNorth2 gem(4) device required manual interface down/up operation after r222135. Even though this is not correct thing and I don't like to revert it but it would be better than breaking gem(4) on PPC. This should be revisited. PR: kern/157405 END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T21:37:52.638797Z K 7 svn:log V 291 MFC: r192972 (partial) Some of the boot loader code only works on a ufs file system, but it uses the generic struct dirent, which happens to look identical to UFS's struct direct. If BSD ever changes dirent then this will be a problem. Submitted by: matthew dot fleming at isilon dot com END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T21:39:09.101563Z K 7 svn:log V 301 MFC: r211747 Replace structure assignments with explicity memcpy calls. This allows Clang to compile this file: it was using the builtin memcpy and we want to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet). Submitted by: Dimitry Andric Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T21:41:46.081840Z K 7 svn:log V 351 MFC: r218713, r218716 Apply a few small optimizations to boot2's code, to make it shrink a little further. This gets us further on the way to be able to build it successfully with clang. Using in-tree gcc, this shrinks boot2.bin with 60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes. Submitted by: rdivacky Reviewed by: imp END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T21:44:35.688046Z K 7 svn:log V 351 MFC: r218713, r218716 Apply a few small optimizations to boot2's code, to make it shrink a little further. This gets us further on the way to be able to build it successfully with clang. Using in-tree gcc, this shrinks boot2.bin with 60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes. Submitted by: rdivacky Reviewed by: imp END K 10 svn:author V 5 gabor K 8 svn:date V 27 2011-07-25T21:47:56.317542Z K 7 svn:log V 136 - Save the pattern in SB/MB string form, as well, to speed up matching SB/MB input - Macroify repeating code to eliminate duplication END K 10 svn:author V 7 rodrigc K 8 svn:date V 27 2011-07-25T21:52:17.721004Z K 7 svn:log V 112 Document the tftp.blksize variable added in src/lib/libstand/tftp.c. Approved by: re (kib) Requested by: maxim END K 10 svn:author V 6 jilles K 8 svn:date V 27 2011-07-25T21:58:39.190675Z K 7 svn:log V 427 MFC r222932: 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. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T23:01:08.155727Z K 7 svn:log V 610 MFC: r223938 Since r219452 the alignment of __dmadat has changed, revealing that fsread() bogusly casts its contents around causing alignment faults on sparc64 and most likely also on at least powerpc. Fix this by copying the contents bytewise instead as partly already done here. Solving this the right way costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86 there are still some bytes left there though, and an acceptable hack which tricks the compiler into only using a 2-byte alignment instead of the native one when accessing the contents turned out to even take up more space that. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-25T23:01:08.764651Z K 7 svn:log V 610 MFC: r223938 Since r219452 the alignment of __dmadat has changed, revealing that fsread() bogusly casts its contents around causing alignment faults on sparc64 and most likely also on at least powerpc. Fix this by copying the contents bytewise instead as partly already done here. Solving this the right way costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86 there are still some bytes left there though, and an acceptable hack which tricks the compiler into only using a 2-byte alignment instead of the native one when accessing the contents turned out to even take up more space that. END K 10 svn:author V 5 gabor K 8 svn:date V 27 2011-07-26T01:06:44.031264Z K 7 svn:log V 88 - Defer converting to MBS pattern until it is sure that the compilation will succeed. END K 10 svn:author V 8 kensmith K 8 svn:date V 27 2011-07-26T04:00:00.495319Z K 7 svn:log V 73 Looks like we're ready for 9.0-BETA1 builds. Approved by: re (implicit) END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-07-26T04:33:00.748466Z K 7 svn:log V 144 MFC r223945: Add SIGINFO handler. Obtained from: NetBSD (partly) MFC r223946: Use NULL instead of 0 for third argument of sigaction(2). END K 10 svn:author V 8 jchandra K 8 svn:date V 27 2011-07-26T10:50:33.898227Z K 7 svn:log V 147 PCI - Support PCIe devices Add swapping bus space for PCIe devices, update xlp_pci.c to use it for PCIe devices. Also minor clean up in xlp_pci.c END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T12:57:22.239525Z K 7 svn:log V 253 MFC: r212064, r212098 Use a cleaner expression to retrieve the memory size in pc98's boot2.c, which also avoids NULL pointer arithmetic, as suggested by jhb. The available space goes from 11 bytes to 7. Reviewed by: nyan Approved by: rpaulo (mentor) END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T12:57:23.468663Z K 7 svn:log V 253 MFC: r212064, r212098 Use a cleaner expression to retrieve the memory size in pc98's boot2.c, which also avoids NULL pointer arithmetic, as suggested by jhb. The available space goes from 11 bytes to 7. Reviewed by: nyan Approved by: rpaulo (mentor) END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T12:58:29.901368Z K 7 svn:log V 132 MFC: r214257 MFi386: revision 214210 Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T12:58:29.944072Z K 7 svn:log V 132 MFC: r214257 MFi386: revision 214210 Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:01:14.020109Z K 7 svn:log V 137 MFC: r218737, r218946 MFi386: revision 218713 Apply a few small optimizations to boot2's code, to make it shrink a little further. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:01:14.366693Z K 7 svn:log V 137 MFC: r218737, r218946 MFi386: revision 218713 Apply a few small optimizations to boot2's code, to make it shrink a little further. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:04:43.486010Z K 7 svn:log V 92 MFC: r218842 MFi386: revision 218745 Remove reading of symbols from a.out loaded files. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:04:48.000857Z K 7 svn:log V 92 MFC: r218842 MFi386: revision 218745 Remove reading of symbols from a.out loaded files. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:06:20.336232Z K 7 svn:log V 323 MFC: r219225 MFi386: revision 219186 This patch shrinks boot2 a little. o It switches kname to be just a pointer instead of an array. o It changes ioctl to unsigned from uint8_t. o It changes the second keyhit limit to 3 seconds from 5. o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:06:21.909644Z K 7 svn:log V 323 MFC: r219225 MFi386: revision 219186 This patch shrinks boot2 a little. o It switches kname to be just a pointer instead of an array. o It changes ioctl to unsigned from uint8_t. o It changes the second keyhit limit to 3 seconds from 5. o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:12:08.182589Z K 7 svn:log V 199 MFC: r219960 MFi386: the part of 219452 - bunch of variables are turned into uint8_t. - the setting and reading of "fmt" in load() is removed. - buf in printf() is made static to save space. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:12:09.532809Z K 7 svn:log V 199 MFC: r219960 MFi386: the part of 219452 - bunch of variables are turned into uint8_t. - the setting and reading of "fmt" in load() is removed. - buf in printf() is made static to save space. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:13:31.471367Z K 7 svn:log V 223 MFC: r220685 MFi386: revisions 220389 and 220392 - Mark getc() as inline, this has no effect on gcc but helps clang. - Move getc() body before xgetc() so gcc does not emit a warning about function having no body. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:13:31.899788Z K 7 svn:log V 223 MFC: r220685 MFi386: revisions 220389 and 220392 - Mark getc() as inline, this has no effect on gcc but helps clang. - Move getc() body before xgetc() so gcc does not emit a warning about function having no body. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:19:57.053066Z K 7 svn:log V 156 MFC: r214210 Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little. Approved by: rpaulo (mentor) Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:19:57.167208Z K 7 svn:log V 156 MFC: r214210 Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little. Approved by: rpaulo (mentor) Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:22:12.502716Z K 7 svn:log V 417 MFC: r218745 Remove reading of symbols from a.out loaded files. Since we are tight on space for clang and a.out support is only needed for /boot/loader, they are excess bytes that serve no useful purpose other than to support really old kernels (FreeBSD < 3.2 or so). Prefer clang support over support for these old kernels and remove this code. We gain about 100 bytes of space this way. Reviewed by: rdivacky@ END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:22:13.196006Z K 7 svn:log V 417 MFC: r218745 Remove reading of symbols from a.out loaded files. Since we are tight on space for clang and a.out support is only needed for /boot/loader, they are excess bytes that serve no useful purpose other than to support really old kernels (FreeBSD < 3.2 or so). Prefer clang support over support for these old kernels and remove this code. We gain about 100 bytes of space this way. Reviewed by: rdivacky@ END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:23:25.736715Z K 7 svn:log V 221 MFC: r218926 In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable from uint16_t back to uint32_t. The actual option bitmasks (RB_* and RBX_*) assume at least a 32 bit variable. Submitted by: rdivacky END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:23:26.030471Z K 7 svn:log V 221 MFC: r218926 In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable from uint16_t back to uint32_t. The actual option bitmasks (RB_* and RBX_*) assume at least a 32 bit variable. Submitted by: rdivacky END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:24:52.145150Z K 7 svn:log V 504 MFC: r219186 This patch shrinks boot2 a little. o It switches kname to be just a pointer instead of an array thus avoiding a couple of memcpy()s. o It changes ioctl to unsigned from uint8_t. o It changes the second keyhit limit to 3 seconds from 5 so that constant propagation can take place. o It changes the ticks overflow computation as suggested by bde@. o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from bootinfo as it is unused. Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:24:52.237712Z K 7 svn:log V 504 MFC: r219186 This patch shrinks boot2 a little. o It switches kname to be just a pointer instead of an array thus avoiding a couple of memcpy()s. o It changes ioctl to unsigned from uint8_t. o It changes the second keyhit limit to 3 seconds from 5 so that constant propagation can take place. o It changes the ticks overflow computation as suggested by bde@. o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from bootinfo as it is unused. Reviewed by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:26:46.779438Z K 7 svn:log V 489 MFC: r219452 Some more shrinking. o bunch of variables are turned into uint8_t o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down o kname is explicitly initialized in main() as BSS in boot2 is not zeroed o the setting and reading of "fmt" in load() is removed o buf in printf() is made static to save space Reviewed by: jhb Tested by: me and Fabian Keil END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:26:51.356756Z K 7 svn:log V 489 MFC: r219452 Some more shrinking. o bunch of variables are turned into uint8_t o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down o kname is explicitly initialized in main() as BSS in boot2 is not zeroed o the setting and reading of "fmt" in load() is removed o buf in printf() is made static to save space Reviewed by: jhb Tested by: me and Fabian Keil END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:29:11.375174Z K 7 svn:log V 210 MFC: r220389, r220392 - Mark getc() as inline, this has no effect on gcc but helps clang. - Move getc() body before xgetc() so gcc does not emit a warning about function having no body. Approved by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:29:11.465705Z K 7 svn:log V 210 MFC: r220389, r220392 - Mark getc() as inline, this has no effect on gcc but helps clang. - Move getc() body before xgetc() so gcc does not emit a warning about function having no body. Approved by: jhb END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:58:08.102490Z K 7 svn:log V 72 MFC: r203059 Correct copy-paste typo from previous option description. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T13:58:09.695659Z K 7 svn:log V 72 MFC: r203059 Correct copy-paste typo from previous option description. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T14:03:50.461761Z K 7 svn:log V 57 MFC: r210933 (partial) Fix typos and spelling mistakes. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T14:03:52.925189Z K 7 svn:log V 57 MFC: r210933 (partial) Fix typos and spelling mistakes. END K 10 svn:author V 5 maxim K 8 svn:date V 27 2011-07-26T14:41:28.092296Z K 7 svn:log V 65 MFC rr215733,217577,219024,219308,221118,221319: sync with head. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T14:41:54.521638Z K 7 svn:log V 468 MFC: r214921, r219954, r219956, r221387, r221470, r221536, r222191 - Sync with the latest version from NetBSD. It notably addds ISO9660 support. - Add support for synthesizing an APM partition map to map Mac PowerPC bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's ability to mount the CD, while allowing us a way to provide HFS-ified bootstrap code for Open Firmware. - Add analogs to the -chrp-boot and -prep-boot options to mkisofs. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-26T14:41:54.643055Z K 7 svn:log V 468 MFC: r214921, r219954, r219956, r221387, r221470, r221536, r222191 - Sync with the latest version from NetBSD. It notably addds ISO9660 support. - Add support for synthesizing an APM partition map to map Mac PowerPC bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's ability to mount the CD, while allowing us a way to provide HFS-ified bootstrap code for Open Firmware. - Add analogs to the -chrp-boot and -prep-boot options to mkisofs. END K 10 svn:author V 2 jh K 8 svn:date V 27 2011-07-26T16:14:57.611890Z K 7 svn:log V 337 MFC r219925: Recognize "ro", "rdonly", "norw", "rw" and "noro" as equal options in vfs_equalopts(). This allows vfs_sanitizeopts() to filter redundant occurrences of these options. It was possible that for example both "ro" and "rw" options became active concurrently. PR: kern/133614 MFC r220040: Fix some style issues in r219925. END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:02:17.968494Z K 7 svn:log V 133 MFC 202386, 224284: 202386 (by ru): Use the newly brought %U macro. 224284: Fix various broken links in manual pages. PR: 159138 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:02:53.710928Z K 7 svn:log V 133 MFC 202386, 224284: 202386 (by ru): Use the newly brought %U macro. 224284: Fix various broken links in manual pages. PR: 159138 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:09:44.922955Z K 7 svn:log V 68 MFC 224284: Fix various broken links in manual pages. PR: 159137 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:10:25.586770Z K 7 svn:log V 67 MFC 224284: Fix various broken links in manual pages. PR: 159137 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:16:13.678015Z K 7 svn:log V 67 MFC 224284: Fix various broken links in manual pages. PR: 159136 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:16:55.902949Z K 7 svn:log V 67 MFC 224284: Fix various broken links in manual pages. PR: 159136 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:38:49.731162Z K 7 svn:log V 180 MFC 202386, 224284: 202386 (by ru): Use the newly brought %U macro. 224284: Fix various broken links in manual pages. PR: 159130 159131 159132 159133 PR: 159134 159135 159144 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T17:39:40.192058Z K 7 svn:log V 180 MFC 202386, 224284: 202386 (by ru): Use the newly brought %U macro. 224284: Fix various broken links in manual pages. PR: 159130 159131 159132 159133 PR: 159134 159135 159144 END K 10 svn:author V 2 jh K 8 svn:date V 27 2011-07-26T18:59:38.079866Z K 7 svn:log V 253 MFC r222216: In init_dynamic_kenv(), ignore environment strings exceeding the KENV_MNAMELEN + 1 + KENV_MVALLEN + 1 length limit to avoid buffer overflow in getenv(). Currenly loader(8) doesn't limit the length of environment strings. PR: kern/132104 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T19:05:10.247407Z K 7 svn:log V 162 MFC 223773: - General grammar and mdoc(7) fixes. - While here, remove a paragraph about userspace operation that has been outdated for some time. PR: 158623 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-26T19:05:59.689820Z K 7 svn:log V 162 MFC 223773: - General grammar and mdoc(7) fixes. - While here, remove a paragraph about userspace operation that has been outdated for some time. PR: 158623 END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-07-26T20:51:58.934597Z K 7 svn:log V 188 MFC: r223954 Try and fix the exports.5 man page so that it clarifies how NFSv4 exports are handled. Improved by comments from mckusick, kudak at mit.edu and bde. This is a content change. END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-27T01:56:52.652109Z K 7 svn:log V 66 MFC 224286: Document the potential for jail escape. PR: 142341 END K 10 svn:author V 3 gjb K 8 svn:date V 27 2011-07-27T01:57:24.541693Z K 7 svn:log V 66 MFC 224286: Document the potential for jail escape. PR: 142341 END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-07-27T04:10:32.896548Z K 7 svn:log V 356 MFC r223587: MS Windows NT+ uses 4 bytes at offset 0x1b8 in the MBR to identify disk drive. The boot0cfg(8) utility preserves these 4 bytes when it is writing bootcode to keep a multiboot ability. Change gpart's bootcode method to keep DSN if it is not zero. Also do not allow writing bootcode with size not equal to MBRSIZE. PR: kern/157819 END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-07-27T04:23:26.224744Z K 7 svn:log V 919 MFC r216754: Make EBR probe method less strictly to be able detect EBRs with small non fatal inconsistency. EBR may contain boot loader and sometimes it just has some garbage data. Now this does not prevent FreeBSD to use extended partitions. But since we do not support bootcode for EBR we mark tables which have non empty boot area as corrupt. This does make them readonly and we can not damage this data. MFC r223594: EBR could contain an early stage of boot code. But we do not support it. Remove message about non empty bootcode, we can not break something while GEOM_PART_EBR_COMPAT is defined. But without GEOM_PART_EBR_COMPAT any changes in EBR are allowed and we can accidentally wipe the boot code. To do not break anything save the first EBR chunk and keep it untouched each time when we are changing EBR. Note that we are still not support boot code for EBR. PR: kern/141235 END K 10 svn:author V 5 maxim K 8 svn:date V 27 2011-07-27T07:02:33.276926Z K 7 svn:log V 106 MFC r223846 by thompsa: grab the rlock before checking if our interface is enabled. Approved by: thompsa END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-27T11:21:49.866755Z K 7 svn:log V 631 MFC: r223228 Merge from r161730: o Set TP using inline assembly to avoid dead code elimination. o Eliminate _tcb. Merge from r161840: Stylize: avoid using a global register variable. Merge from r157461: Simplify _get_curthread() and _tcb_ctor because libc and rtld now already allocate thread pointer space in tls block for initial thread. Merge from r177853: Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-27T11:21:50.718460Z K 7 svn:log V 631 MFC: r223228 Merge from r161730: o Set TP using inline assembly to avoid dead code elimination. o Eliminate _tcb. Merge from r161840: Stylize: avoid using a global register variable. Merge from r157461: Simplify _get_curthread() and _tcb_ctor because libc and rtld now already allocate thread pointer space in tls block for initial thread. Merge from r177853: Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library. END K 10 svn:author V 5 gabor K 8 svn:date V 27 2011-07-27T22:54:40.692599Z K 7 svn:log V 72 - Add support for REG_ICASE - Eliminate code duplication by using macro END K 10 svn:author V 2 bz K 8 svn:date V 27 2011-07-28T03:01:22.223893Z K 7 svn:log V 236 To inet or not two inet. Unbreak static IPv4 configuration. If you tried you were stuck in an endless loop. Reported by: kensmith Approved by: re (kib) for BETA1 Pointy hat to: bz - wonder why I had not tested legacy IP thoroughly.. END K 10 svn:author V 5 dougb K 8 svn:date V 27 2011-07-28T03:11:12.964535Z K 7 svn:log V 156 If a user has non-standard FETCH_ARGS it could circumvent the intent of --always-fetch, so forcibly unlink the file before proceeding to the fetch routine. END K 10 svn:author V 6 andrew K 8 svn:date V 27 2011-07-28T09:27:01.785451Z K 7 svn:log V 201 Add support for an unsigned wchar_t required by the ARM EABI. To do this I have: * Moved the wchar_t typedef to machine/_types.h * Moved the definitions of WCHAR_MIN and WCHAR_MAX to machine/_wchar.h END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-07-28T10:10:39.760817Z K 7 svn:log V 595 MFC r223080: Implement "global" mode for ipfw nat. It is similar to natd(8) "globalport" option for multiple NAT instances. If ipfw rule contains "global" keyword instead of nat_number, then for each outgoing packet ipfw_nat looks up translation state in all configured nat instances. If an entry is found, packet aliased according to that entry, otherwise packet is passed unchanged. User can specify "skip_global" option in NAT configuration to exclude an instance from the lookup in global mode. PR: kern/157867 Submitted by: Alexander V. Chernikov (previous version) END K 10 svn:author V 2 ae K 8 svn:date V 27 2011-07-28T10:16:30.751569Z K 7 svn:log V 461 MFC r223437: Export AddLink() function from libalias. It can be used when custom alias address needs to be specified. Add inbound handler to the alias_ftp module. It helps handle active FTP transfer mode for the case with external clients and FTP server behind NAT. Fix passive FTP transfer case for server behind NAT using redirect with external IP address different from NAT ip address. PR: kern/157957 Submitted by: Alexander V. Chernikov END K 10 svn:author V 3 bcr K 8 svn:date V 27 2011-07-28T11:41:55.927975Z K 7 svn:log V 219 Add a section to the jail chapter that explains why it is not recommended to allow root users in the jail to access the host system. PR: docs/156853 Submitted by: crees Patch by: crees Approved by: re (kib) for BETA1 END K 10 svn:author V 8 jchandra K 8 svn:date V 27 2011-07-28T12:08:13.333733Z K 7 svn:log V 180 Create custom bus space for the SoC UART. The SoC uart needs to use 32bit access to its registers, use a custom bus space for this. Remove the hack in default bus space for this. END K 10 svn:author V 3 bcr K 8 svn:date V 27 2011-07-28T12:23:32.529028Z K 7 svn:log V 139 Revert my last change to this file, as BETA1 is not announced yet. Pointed out by: kib Pointy hat to: me Approved by: re (kib, implicit) END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T13:27:14.464113Z K 7 svn:log V 74 Create playground for my attempt to refactor/improve HID devices support. END K 10 svn:author V 5 gabor K 8 svn:date V 27 2011-07-28T13:41:50.824697Z K 7 svn:log V 46 - Eliminate more code duplication with macros END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T13:49:32.426402Z K 7 svn:log V 61 Add Report ID and Collection Type fields to the "-r" output. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T17:31:49.799905Z K 7 svn:log V 70 Make hid_report_size() handle negative id argument value as wildcard. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T17:45:59.701868Z K 7 svn:log V 125 - Make usbhidctl work with devices with multiple Report IDs. - Report Array items as such, and fix printing of their values. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T18:39:47.622806Z K 7 svn:log V 207 Do not return usage_minimum/usage_maximum fields for HIO_VARIABLE items. They are unrolled into usages inside hid_get_item(), and returning extra range may confuse applications, as it does for usbhidaction. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T18:42:10.134537Z K 7 svn:log V 37 Fix support for multiple Report IDs. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T19:24:33.940285Z K 7 svn:log V 64 Fix Array items support: check all reports, not only the first. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-28T20:30:55.598759Z K 7 svn:log V 35 This change wasn't needed. Revert. END K 10 svn:author V 8 rmacklem K 8 svn:date V 27 2011-07-28T21:00:46.790152Z K 7 svn:log V 281 MFC: r223971 r222389 introduced a case where the NFSv4 client could loop in nfscl_getcl() when a forced dismount is in progress, because nfsv4_lock() will return 0 without sleeping when MNTK_UNMOUNTF is set. This patch fixes it so it won't loop calling nfsv4_lock() for this case. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-07-29T06:15:18.618634Z K 7 svn:log V 189 MFC rr224004,224025: Add a -l option to show file system's corresponding /dev/ufsid path. This is useful for scripts that converts existing system's fstab to use their /dev/ufsid devices. END K 10 svn:author V 7 delphij K 8 svn:date V 27 2011-07-29T06:16:16.315804Z K 7 svn:log V 44 Use calloc() instead of an explicit memset. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T09:58:56.442149Z K 7 svn:log V 375 MFC r224270: - Use mutex to serialize index/data register pair usage, when accessing SATA registers. Unserialized access under heavy load caused wrong speed reporting and potentially could cause device loss. - To free memory and other resources (including above), allocated during chipinit() method call on attach, add new chipdeinit() method, called during driver detach. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T10:02:03.428579Z K 7 svn:log V 157 MFC r224250: Fix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB. Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array. END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T10:51:56.564045Z K 7 svn:log V 157 MFC r224250: Fix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB. Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array. END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-29T18:35:10.108218Z K 7 svn:log V 264 - Staticize functions as appropriate and comment out unused ones. - Sprinkle some const where appropriate. - Consistently use target_id_t for the target parameter of mpt_map_physdisk() and mpt_is_raid_volume(). - Fix some whitespace bugs. Approved by: re (kib) END K 10 svn:author V 6 marius K 8 svn:date V 27 2011-07-29T18:38:31.798452Z K 7 svn:log V 946 - Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using the right SIM in case the HBA is RAID-capable but the target in question is not a hot spare or member of a RAID volume. - Report the loss and addition of SAS and SATA targets detected via PHY link status changes and signalled by MPI_EVENT_SAS_DEVICE_STATUS_CHANGE to cam(4) as lost devices and trigger rescans as appropriate. Without this it can take quite some time until a lost device actually is no longer tried to be used, if it ever stops. [1] - Handle MPI_EVENT_IR2, MPI_EVENT_LOG_ENTRY_ADDED, MPI_EVENT_SAS_DISCOVERY and MPI_EVENT_SAS_PHY_LINK_STATUS silently as these serve no additional purpose beyond adding cryptic entries to logs. Thanks to Hans-Joerg Sirtl for providing one of the HBAs these changes were developed with and RIP to the mainboard that didn't survive testing them. PR: 157534 [1] Approved by: re (kib) MFC after: 2 weeks END K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-07-29T20:24:04.649089Z K 7 svn:log V 238 Properly initialize an error variable to avoid returning uninitialized data when 'show drives' succeeds, often resulting in a failing exit code even though the command worked fine. Reviewed by: bz Approved by: re (kib) MFC after: 3 days END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T20:30:28.117527Z K 7 svn:log V 740 In some cases failed SATA disks may report their presence, but don't respond to any commands. I've found that because of multiple command retries, each of which cause 30s timeout, bus reset and another retry or requeue for many commands, it may take ages to eventually drop the failed device. The odd thing is that those retries continue even after XPT considered device as dead and invalidated it. This patch makes cam_periph_error() to block any command retries after periph was marked as invalid. With that patch all activity completes in 1-2 minutes, just after several timeouts, required to consider device death. This should make ZFS, gmirror, graid, etc. operation more robust. Reviewed by: mjacob@ on scsi@ Approved by: re (kib) END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T20:32:27.701182Z K 7 svn:log V 268 Add control for ATA disk read-ahead, alike to the previously added write cache control. Some controller BIOS'es tend to disable read-ahead, that dramatically reduces read performance. Previously ata(4) always enabled read-ahead unconditionally. Approved by: re (kib) END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T20:35:23.929486Z K 7 svn:log V 539 In some cases, at least on Marvell 88SE912x controllers, Current Command Slot field of the PxCMD register may point to an empty command slot. That breaks command timeout detection logic, making impossible to find what command actually caused timeout, and leading to infinite wait. Workaround that by checking whether pointed command slot is really used and can timeout in its time. And if not, fallback to the dumb algorithm used with FBS -- let all commands to time out and then fail all of them. Approved by: re (kib) MFC after: 1 week END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-29T20:38:06.425526Z K 7 svn:log V 350 Make ums(4) driver more picky, not attaching to "mouses" with absolute coordinates, such as digitizers and touch-screens, leaving these devices to uhid(4) and user-level. Specially patched xf86-input-mouse driver can handle them, that isn't done and can't be done properly with ums(4) because of mouse(4) protocol limitations. Approved by: re (kib) END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-07-29T22:00:32.244804Z K 7 svn:log V 68 MFC r223663: add SNDCTL_DSP_HALT specified by OSS PR: kern/156874 END K 10 svn:author V 3 avg K 8 svn:date V 27 2011-07-29T22:11:05.862813Z K 7 svn:log V 68 MFC r223663: add SNDCTL_DSP_HALT specified by OSS PR: kern/156874 END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-07-29T23:55:17.515319Z K 7 svn:log V 830 Reset the NIC if ANI is enabled or disabled. Although this may not be what the original sysctl was designed to do, it feels a bit more "expected". Before, if ANI is disabled, the initial ANI parameters are still written to the hardware, even if they're not enabled. "ANI enabled" would then adjust the noise immunity parameters dynamically. Disabling ANI would simply leave the existing noise immunity parameters where they are, and disable the dynamic part. The problem is that disabling ANI doesn't leave the hardware in a consistent, predictable state - so asking a user to disable ANI wouldn't actually reset the NIC to a consistent set of PHY signal detection parameters, resulting in an unpredictable/unreliable outcome. This makes it difficult to get reliable debugging information from the user. Approved by: re (kib) END K 10 svn:author V 8 mckusick K 8 svn:date V 27 2011-07-30T00:43:18.410452Z K 7 svn:log V 172 Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP is set so that mount can revert back to using MNT_NOWAIT when doing getmntinfo. Approved by: re (kib) END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-07-30T00:51:36.627293Z K 7 svn:log V 167 Mount memsticks read-only by default to prevent them being filled by user modifications and subsequently preventing a functioning installation. Approved by: re (kib) END K 10 svn:author V 10 nwhitehorn K 8 svn:date V 27 2011-07-30T00:52:13.191198Z K 7 svn:log V 261 Fix an error that could cause sysctl -a to enter an infinite loop in the event of a broken or busy fan due to returning incorrect error codes from the FCU sysctl handler. Reported by: Path Mather 1 Approved by: re (kib) END K 10 svn:author V 7 yongari K 8 svn:date V 27 2011-07-30T01:06:12.252323Z K 7 svn:log V 215 Add new device id of D-Link DGE-530T Rev. C controller. DGE-503T Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C controller is re-branded RealTek 8169 controller. PR: kern/159116 Approved by: re (kib) END K 10 svn:author V 2 jh K 8 svn:date V 27 2011-07-30T08:31:18.626520Z K 7 svn:log V 128 MFC r216047 by kevlo: Fix fd leak in get_font MFC r222568: Don't try to close the stream if fopen(3) fails. PR: bin/155349 END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-30T09:38:52.397301Z K 7 svn:log V 168 r224283: Do not try to execute FLUSHCACHE on close and print extra messages for invalidated (considered lost) ada device. Exactly same already done for the da devices. END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-07-30T13:18:48.048094Z K 7 svn:log V 244 Fix the AR9280 initial AGC calibration code. It looks like this was mixed up with the AR9285 calibration code. This code is now more in line with what Linux ath9k and Atheros reference drivers do. Obtained from: Atheros Approved by: re (kib) END K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-07-30T13:21:33.504724Z K 7 svn:log V 449 I noticed that the Merlin NICs I had (AR9220, AR9280) never completed the ADC calibrations if the NIC is in 5ghz 11a or 5ghz HT/20 modes. I've been told that the dual-ADC is only engaged in turbo/40mhz modes. Since Sowl (AR9160) seems to return valid-looking calibration data in 5ghz 20MHz modes, I'm only disabling it for Merlin for now. It may turn out I can disable it for all chipsets and only enable it for 40MHz modes. Approved by: re (kib) END K 10 svn:author V 3 mav K 8 svn:date V 27 2011-07-30T13:22:44.070756Z K 7 svn:log V 386 MFprojects/hid: - Fix usbhidctl and usbhidaction to handle HID devices with multiple report ids, such as multimedia keyboards. - Add collection type and report id to the `usbhidctl -r` output. They are important for proper device understanding and debugging. - Fix usbhidaction tool to properly handle items having report_count more then 1. Approved by: re (kib) MFC after: 2 weeks END