summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r197558Andrew Thompson2009-10-291-1/+3
| | | | | | | | | Fix NULL-pointer dereference in usb_endpoint_foreach(). PR: usb/138389 Notes: svn path=/stable/8/; revision=198644
* MFC r197556Andrew Thompson2009-10-291-2/+2
| | | | | | | Clear all interrupts rather than just SETUP packet. Notes: svn path=/stable/8/; revision=198643
* MFC r197555Andrew Thompson2009-10-291-19/+15
| | | | | | | | Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0) statements to zero. Notes: svn path=/stable/8/; revision=198642
* MFC r197554Andrew Thompson2009-10-291-0/+70
| | | | | | | | | | Import two PCI quirks from Linux - Add quirk for ATI SB600 and SB700 to free SMB controller - Correct schedule sleep time to 10us on the VIA ehci controller Notes: svn path=/stable/8/; revision=198641
* MFC r197553Andrew Thompson2009-10-295-47/+59
| | | | | | | | - clean up USB detach logic. There seems to be some problems detaching multiple USB HUBs connected in series from the root. Notes: svn path=/stable/8/; revision=198640
* MFC r196826Andrew Thompson2009-10-291-0/+46
| | | | | | | | Make umass(4) pass device USB serial number to CAM, making it possible to e.g. retrieve it using camcontrol(8). Notes: svn path=/stable/8/; revision=198639
* MFC r196497Andrew Thompson2009-10-291-2/+0
| | | | | | | Remove redundant locking. Notes: svn path=/stable/8/; revision=198638
* MFC r196496Andrew Thompson2009-10-291-0/+6
| | | | | | | Add a reminder comment to optimize bus_dmamap_sync calls. Notes: svn path=/stable/8/; revision=198637
* MFC r196495Andrew Thompson2009-10-292-0/+30
| | | | | | | | | Add mass storage quirks. PR: usb/137138,usb/137226,usb/137789,usb/135372 Notes: svn path=/stable/8/; revision=198636
* MFC r196494Andrew Thompson2009-10-291-11/+35
| | | | | | | | - fix uvisor support, mostly correct buffer sizes used. - correct device info flag for SONY Cli NR70V Notes: svn path=/stable/8/; revision=198635
* MFC r196493Andrew Thompson2009-10-292-0/+6
| | | | | | | - Fix false positive uipaq probe Notes: svn path=/stable/8/; revision=198634
* MFC r196492Andrew Thompson2009-10-291-3/+3
| | | | | | | - fix CDC ethernet matching order so that the match flags get correct. Notes: svn path=/stable/8/; revision=198633
* MFC r196491Andrew Thompson2009-10-291-5/+8
| | | | | | | | | | | We used force all of the GPIO pins low first and then enable the ones we want. This has been changed to better match the ADMtek's reference design to avoid setting the power-down configuration line of the PHY at the same time it is reset. Notes: svn path=/stable/8/; revision=198632
* MFC r196490Andrew Thompson2009-10-292-14/+4
| | | | | | | | | - FIFO's are always opened separately in read and write direction even if the actual device is opened for read and write. Fix fflags check so that the UFM and URIO drivers work. Notes: svn path=/stable/8/; revision=198631
* MFC r196488Andrew Thompson2009-10-291-73/+29
| | | | | | | | - allow disabling "root_mount_hold()" by setting a sysctl/tunable at boot - remove some redundant initial explore code Notes: svn path=/stable/8/; revision=198630
* MFC r197930:Konstantin Belousov2009-10-291-3/+3
| | | | | | | | Postpone dropping fp till both kq_global and kqueue mutexes are unlocked. Notes: svn path=/stable/8/; revision=198614
* MFC r197389:Konstantin Belousov2009-10-292-0/+10
| | | | | | | Do panic regardeless of execution mode at the moment of T_RESERVED trap. Notes: svn path=/stable/8/; revision=198613
* MFC r197428:Konstantin Belousov2009-10-295-1/+75
| | | | | | | | Add per-process osrel node to the procfs, to allow read and set p_osrel value for the process. Notes: svn path=/stable/8/; revision=198611
* MFC 197439:John Baldwin2009-10-298-445/+537
| | | | | | | | | | | | | Extract the code to find and map the MADT ACPI table during early kernel startup and genericize it so it can be reused to map other tables as well: - Add a routine to walk a list of ACPI subtables such as those used in the APIC and SRAT tables in the MI acpi(4) driver. - Move the routines for mapping and unmapping an ACPI table as well as mapping the RSDT or XSDT and searching for a table with a given signature out into acpica_machdep.c for both amd64 and i386. Notes: svn path=/stable/8/; revision=198610
* MFC 197649:John Baldwin2009-10-291-2/+3
| | | | | | | Do not hold the ACPI A/C adapter lock when changing the power profile. Notes: svn path=/stable/8/; revision=198602
* MFC 197648:John Baldwin2009-10-291-10/+26
| | | | | | | | | | | | Split the 'video' ACPI lock up into two locks to resolve a LOR with the sysctl lock. The 'video' lock now protects the 'bus' of video output devices attached to a graphics adapter. It is used when iterating over the list of outputs, etc. The 'video_output' lock is used to lock the output-specific data similar to a driver lock for the individual video outputs. Notes: svn path=/stable/8/; revision=198600
* MFC 196840:John Baldwin2009-10-291-0/+3
| | | | | | | | Fill the reverse RSS map with 0xff's so that the subsequent loop to calculate the values will work properly. Notes: svn path=/stable/8/; revision=198598
* MFC 197460:John Baldwin2009-10-291-4/+0
| | | | | | | | Remove unnecessary locking from attach(). This fixes a LOR between the acpi_ibm lock and the sysctl lock. Notes: svn path=/stable/8/; revision=198596
* MFC 196615:John Baldwin2009-10-295-16/+41
| | | | | | | | | | | | | | | | Extend the device pager to support different memory attributes on different pages in an object. - Add a new variant of d_mmap() currently called d_mmap2() which accepts an additional in/out parameter that is the memory attribute to use for the requested page. - A driver either uses d_mmap() or d_mmap2() for all requests but not both. The current implementation uses a flag in the cdevsw (D_MMAP2) to indicate that the driver provides a d_mmap2() handler instead of d_mmap(). This is done to make the change ABI compatible with existing drivers and MFC'able to 7 and 8. Notes: svn path=/stable/8/; revision=198594
* MFC rev. 198487:Alexander Motin2009-10-291-2/+2
| | | | | | | Round timeout up when converting CAM milliseconds to ATA seconds. Notes: svn path=/stable/8/; revision=198578
* MFC rev. 198488:Alexander Motin2009-10-291-0/+6
| | | | | | | Report SATA speeds to CAM, to not confuse users with low numbers logged. Notes: svn path=/stable/8/; revision=198577
* MFC rev. 198481, 198482:Alexander Motin2009-10-292-0/+6
| | | | | | | | | Add two more VIA SATA chip IDs. PR: kern/135057 Notes: svn path=/stable/8/; revision=198576
* MFC rev. 198480, 198483:Alexander Motin2009-10-291-0/+37
| | | | | | | | | Document new modularised ATA kernel modules and options. PR: kern/133162, amd64/139859 Notes: svn path=/stable/8/; revision=198574
* Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)Alexander Motin2009-10-291-1/+2
| | | | | | | | | memory access. PR: amd64/128686, amd64/132372, amd64/139156 Notes: svn path=/stable/8/; revision=198572
* MFC r198418Qing Li2009-10-283-5/+5
| | | | | | | | | | Use the correct option name in the preprocessor command to enable or disable diagnostic messages. Reviewed by: ru Notes: svn path=/stable/8/; revision=198567
* MFC r198353Qing Li2009-10-281-6/+10
| | | | | | | | | | Verify "smp_started" is true before calling sched_bind() and sched_unbind(). Reviewed by: kmacy Notes: svn path=/stable/8/; revision=198566
* Prepare for 8.0-RC2 builds.Ken Smith2009-10-251-1/+1
| | | | | | | Approved by: re (implicit) Notes: svn path=/stable/8/; revision=198456
* MFC r198295:Ruslan Ermilov2009-10-243-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Random number generator initialization cleanup: - Introduce new SI_SUB_RANDOM point in boot sequence to make it clear from where one may start using random(9). It should be as early as possible, so place it just after SI_SUB_CPU where we have some randomness on most platforms via get_cyclecount(). - Move stack protector initialization to be after SI_SUB_RANDOM as before this point we have no randomness at all. This fixes stack protector to actually protect stack with some random guard value instead of a well-known one. Note that this patch doesn't try to address arc4random(9) issues. With current code, it will be implicitly seeded by stack protector and hence will get the same entropy as random(9). It will be securely reseeded once /dev/random is feeded by some entropy from userland. Submitted by: Maxim Dounin <mdounin@mdounin.ru> Approved by: re (kib) Notes: svn path=/stable/8/; revision=198434
* MFC 198174:John Baldwin2009-10-231-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Close a race with caching of -ve name lookups in the NFS client. Specifically, clients only trust -ve cache entries while the directory remains unchanged and discard any -ve cache entries for a directory when they notice that the modification time of a directory entry changes. The race involves two concurrent lookups as follows: - Thread A does a lookup for file 'foo' which sends a lookup RPC to the server. The lookup fails and the server replies. - The 'foo' file is created (either by the same client or a different client) updating the modification time on the parent directory of 'foo'. - Thread B does a lookup for a different file 'bar' which updates the cached attributes of the parent directory of 'foo' to reflect the new modification time after 'foo' was created. - Thread A finally resumes execution to parse the reply from the NFS server. It adds a -ve cache entry and sets the cached value of the directory's modification time that is used for invalidating -ve cached lookups to the new modification time set by thread B. At this point, future lookups of 'foo' will honor the -ve cached entry until the cached entry is pushed out of the name cache's LRU or the modification time of the parent directory is changed again by some other change. The fix is to read the directory's modification time before sending the lookup RPC and use that cached modification time when setting the directory's cached modification time. Also, we do not add a -ve cache entry if another thread has added -ve cache entry that set the directory's cached modification time to a newer value than the value we read before sending the lookup RPC. Approved by: re (kib) Notes: svn path=/stable/8/; revision=198424
* MFC 198306Qing Li2009-10-221-7/+11
| | | | | | | | | | | | | | The flow-table function flowtable_route_flush() may be called during system initialization time. Since the flow-table is designed to maintain per CPU flow cache, the existing code did not check whether "smp_started" is true before calling sched_bind() and sched_unbind(), which triggers a page fault. Reviewed by: jeff Approved by: re Notes: svn path=/stable/8/; revision=198371
* MFC r196863:Edward Tomasz Napierala2009-10-221-4/+8
| | | | | | | | | | | | | Improve wording. MFC r196941: Prevent the line from wrapping. Approved by: re (kib) Notes: svn path=/stable/8/; revision=198368
* MFC r198307Andrew Thompson2009-10-211-2/+3
| | | | | | | | | | | | | | Change from CAM_TID_INVALID to CAM_SEL_TIMEOUT error code when the usb device has been yanked, this works around a cam recounting bug when CAM_DEV_UNCONFIGURED is set late in the detach. In certain conditions the reference to the XPT device would not be released which would cause the usb explore thread to sleep forever on "simfree", preventing any new usb devices to be found/ejected on the bus. Approved by: re (kib) Notes: svn path=/stable/8/; revision=198348
* MFC r198201:Konstantin Belousov2009-10-211-6/+4
| | | | | | | | | | | Remove spurious call to priv_check(PRIV_VM_SWAP_NOQUOTA). Call priv_check(PRIV_VM_SWAP_NORLIMIT) only when per-uid limit is actually exceed. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198330
* Merge r198233 from head to stable/8:Robert Watson2009-10-211-19/+15
| | | | | | | | | | Clean up comments, white space, and style in pfil.c (VNET changes not MFC'd) Approved by: re (kib) Notes: svn path=/stable/8/; revision=198326
* Merge r198198 from head to stable/8:Robert Watson2009-10-211-6/+10
| | | | | | | | | Line-wrap pfil.c so that it prints more nicely. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198324
* Merge r198219 from head to stable/8:Robert Watson2009-10-211-1/+0
| | | | | | | | | Remove unused pfil_flags field in packet_filter_hook. Approved by: re (kib) Notes: svn path=/stable/8/; revision=198315
* MFC 198301Qing Li2009-10-201-9/+9
| | | | | | | | | | | | | | | | | In the ARP callout timer expiration function, the current time_second is compared against the entry expiration time value (that was set based on time_second) to check if the current time is larger than the set expiration time. Due to the +/- timer granularity value, the comparison returns false, causing the alternative code to be executed. The alternative code path freed the memory without removing that entry from the table list, causing a use-after-free bug. Reviewed by: discussed with kmacy Approved by: re Verified by: rnoland, yongari Notes: svn path=/stable/8/; revision=198308
* Merge r198218 from head to stable/8:Robert Watson2009-10-201-6/+6
| | | | | | | | | | Sort function prototypes in pfil.h, clean up white space, and better align fields for printing. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198302
* MFC r198098:Weongyo Jeong2009-10-206-4/+31
| | | | | | | | | | | | | | | | | fixes a TX hang bug that it could happen when if_start callback didn't be restarted by full of the output queue. Tested by: bsduser <bsd at acd.homelinux.org> MFC r198099: fixes a TX hang that could be possible to happen when the trasfers are in the high speed that some drivers don't call if_start callback after marking ~IFF_DRV_OACTIVE. Approved by: re (kib) Notes: svn path=/stable/8/; revision=198300
* MFC r198111Qing Li2009-10-202-10/+18
| | | | | | | | | | | | | | | | | | | | This patch fixes the following issues in the ARP operation: 1. There is a regression issue in the ARP code. The incomplete ARP entry was timing out too quickly (1 second timeout), as such, a new entry is created each time arpresolve() is called. Therefore the maximum attempts made is always 1. Consequently the error code returned to the application is always 0. 2. Set the expiration of each incomplete entry to a 20-second lifetime. 3. Return "incomplete" entries to the application. 4. The return error code was incorrect. Reviewed by: kmacy Approved by: re Notes: svn path=/stable/8/; revision=198298
* - Disable ASF by default in STABLE_8. This causes a lotStanislav Sedov2009-10-201-1/+1
| | | | | | | | | | | | of problems on non-DELL branded machines with IPMI support. The proposed fix was committed to HEAD but has not received much test coverage yet. Discussed with: bz Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198296
* Merge r198196 from head to stable/8:Robert Watson2009-10-201-3/+3
| | | | | | | | | Rewrap ip_input() comment so that it prints more nicely. Approved by: re (kib) Notes: svn path=/stable/8/; revision=198293
* MFC r197934:Konstantin Belousov2009-10-201-13/+32
| | | | | | | | | | | | | Map PIE binaries at non-zero base address. MFC r198202: Honour non-zero mapbase for PIE binaries. Inform interpreter-less PIE binary about its relocbase. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198284
* MFC r197933:Konstantin Belousov2009-10-208-0/+21
| | | | | | | | | | | | Define architectural load bases for PIE binaries. MFC r198203 (by marius): Change load base for sparc to match default gcc memory layout model. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198283
* MFC r197932:Konstantin Belousov2009-10-201-1/+4
| | | | | | | | | Do not map elf segments of zero length. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=198281