summaryrefslogtreecommitdiff
path: root/sys/dev
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 197439:John Baldwin2009-10-292-0/+27
| | | | | | | | | | | | | 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 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
* 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 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 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
* - 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
* MFC change 197721:Marcel Moolenaar2009-10-103-27/+55
| | | | | | | | | | | | | Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY interface is fairly simple WRT dealing with flow control, but needed 2 new RX buffer functions with "get-char-from-buf" separated from "advance-buf-pointer" so that the pointer could be advanced only when ttydisc_rint() succeeded. Approved by: re (kib) Notes: svn path=/stable/8/; revision=197938
* MFC: r197403, r197644, r197654, and r197659Coleman Kane2009-10-061-10/+8
| | | | | | | | | | | | Fix some unexpected potential NULL de-references in kernel mode due to usage of pre-8.0 wifi operations with the ndis driver wrapping a Win32/64 wifi driver. Submitted by: Paul B Mahol <onemda@gmail.com> Approved by: re Notes: svn path=/stable/8/; revision=197806
* MFC r197461:Pyun YongHyeon2009-10-052-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply alignment fixup code for received frames on strict alignment architectures. MFC r197463: Consistently use bus_addr_t. MFC r197464: Destroy dmamap in dma cleanup. MFC r197465: Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE. Also align setup descriptor on 32 bytes boundary. Tx buffer have no alignment limitation so create dmamap without alignment restriction[1]. Rx buffer still seems to require 4 bytes alignment limitation but we can simply use MCLBYTES for size to map the buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated with m_getcl(9). de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers, increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES. While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore. This should fix de(4) breakage introduced after r176206. Submitted by: jhb [1] Reported by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp > Tested by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >, Takahashi Yoshihiro < nyan <> jp dot freebsd dot org > Approved by: re (kib) Notes: svn path=/stable/8/; revision=197787
* MFC:197645Andrew Gallatin2009-10-052-4/+14
| | | | | | | | | | | | | | | | | | | Two more mxge watchdog fixes 1) Restore the PCI Express control register after a watchdog reset. This is required because the device will come out of watchdog reset with the pectl reg at its default state, and important BIOS configuration (like max payload size) could be lost. 2) Call mxge_start_locked() for every tx queue before dropping the lock in the watchdog handler. This is required, as the queue's buf ring may have filled during the reset. Approved by: re (kib) Notes: svn path=/stable/8/; revision=197773
* MFC r197682Andrew Thompson2009-10-041-21/+57
| | | | | | | | | | | | | | | | | | | | | EHCI Hardware BUG workaround The EHCI HW can use the qtd_next field instead of qtd_altnext when a short packet is received. This contradicts what is stated in the EHCI datasheet. Also the total-bytes field in the status field of the following TD gets corrupted upon reception of a short packet! We work this around in software by not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been seen on multiple INTEL based EHCI chips. Other vendors have not been tested yet. - Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not applications using LibUSB v0.1, v1.2 and v2.0. - Mass Storage (umass) is affected. Approved by: re (kib) Notes: svn path=/stable/8/; revision=197751
* MFC 197395: Improve mxge watchdog routine's ability to reliably reset a ↵Andrew Gallatin2009-09-281-27/+72
| | | | | | | | | failed NIC Approved by: re (kib) Notes: svn path=/stable/8/; revision=197607
* MFC: r197401Marius Strobl2009-09-251-18/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - According to Linux, the ALi M5451 can do 31-bit DMA instead of just 30-bit like the reset of the controllers supported by this driver. Actually ALi M5451 can be setup up to generate 32-bit addresses by setting the 31st bit via the accompanying ISA bridge, which allows it to work in sparc64 machines whose IOMMU require at least 32-bit DMA. Even though other architectures would also benefit from 32-bit DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT results in a buffer in the 32-bit range. - According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of ALi M5451 is fixed to 64k and in fact using the default size of 4k causes the chip to overrun the mapping, triggering uncorrectable DMA errors on sparc64. - The 4DWAVE DX and NX require the recording buffer to be 8-byte aligned so adjust the bus_dma_tag_create(9) accordingly. - Unlike the rest of the controllers supported by this driver, the ALi M5451 only has 32 hardware channels instead of 64 so limit the loop in tr_intr() accordingly. [1] Submitted by: yongari [1] Reviewed by: yongari (superset of what is committed) Approved by: re (kib) Notes: svn path=/stable/8/; revision=197502
* Remove constraint, requiring request data to fulfill controller'sAlexander Motin2009-09-251-3/+3
| | | | | | | | | | | | | alignment requirements. It is busdma task, to manage proper alignment by loading data to bounce buffers. PR: kern/127316 Reviewed by: current@ Tested by: Ryan Rogers Approved by: re (kib) Notes: svn path=/stable/8/; revision=197495
* - Add missing bus_dmamap_sync(9) calls for the work DMA map. PreviouslyMarius Strobl2009-09-251-7/+18
| | | | | | | | | | | | | | | | | | | the work area was totally unsynchronized which means this driver only had a chance of working on x86 when no bounce buffers were involved, which isn't that likely given that support for 64-bit DMA is currently broken throughout ata(4). - Add necessary little-endian conversion of accesses to the work area, making this driver work on big-endian hosts. While at it, use the alignment-agnostic byte order encoders in order to be on the safe side. - Clear the reserved member of the SG list entries in order to be on the safe side. [1] Submitted by: yongari [1] Reviewed by: yongari Approved by: re (kib) Notes: svn path=/stable/8/; revision=197488
* MFC 197415:John Baldwin2009-09-251-18/+20
| | | | | | | | | | The elements in the component arrays may be direct Package objects rather than references to objects. In that case, simply use the Package directly. Approved by: re (kib) Notes: svn path=/stable/8/; revision=197486
* MFC 197406:John Baldwin2009-09-251-25/+1
| | | | | | | | | | | | Don't reread the command register to see if enabling I/O or memory decoding "took". Other OS's that I checked do not do this and it breaks some amdpm(4) devices. Prior to 7.2 we did not honor the error returned when this failed anyway, so this in effect restores previous behavior. Approved by: re (kib) Notes: svn path=/stable/8/; revision=197482
* MFC 197350:John Baldwin2009-09-231-1/+1
| | | | | | | | | | | Re-remove the IBM0057 ID used for PS/2 mouse controllers. The asl for the 61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar to other systems. Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=197440
* MFC 197190:Rui Paulo2009-09-222-3/+123
| | | | | | | | | | | | Make the sudden motion sensor work on older models and add a bit of debugging. Submitted by: Christoph Langguth <christoph at rosenkeller.org> Approved by: re (kib) Notes: svn path=/stable/8/; revision=197417
* MFC r197099: pci(4): don't perform maximum register number checkAndriy Gapon2009-09-191-2/+1
| | | | | | | | | | | | | | Different sub-kinds of PCI buses may have different rules and thus it is up for the bus backends to do proper input checks. For example, PCIe allows configuration register numbers < 0x1000, while for PCI proper the limit is 0x100. And, in fact, the buses already do the checks. Reviewed by: jhb Approved by: re (kib) Notes: svn path=/stable/8/; revision=197324
* MFC r197077: pci: remove definitions of duplicate constantsAndriy Gapon2009-09-172-12/+5
| | | | | | | | | Suggested by: jhb Reviewed by: jhb Approved by: re (kib) Notes: svn path=/stable/8/; revision=197270
* Merge rev 197263:Scott Long2009-09-173-74/+75
| | | | | | | | | | | - Enable MSI support (MSIX support was already present) - Performance improvements Approved by: re Obtained from: Yahoo! Notes: svn path=/stable/8/; revision=197265
* Merge r197260, r197261, r197262Scott Long2009-09-173-8/+23
| | | | | | | | | | | | | | | - Prevent a panic on modern controllers by increasing CISS_MAX_PHYSTGT to 256 - Fix MSI and PERFORMANT interrupt programming. Fixes hang on boot. - Fix locking bugs in ioctl handler Most of this has been soaking at Yahoo for several months, if not longer. The quick MFC is due to the impending 8.0-RC1 build. Approved by: re Obtained from: Yahoo! Notes: svn path=/stable/8/; revision=197264
* MFC r196531-196534,196536Rafal Jaworowski2009-09-161-4/+7
| | | | | | | | | | | | | | | | | | | | | Clean up Marvell platform code. Introduce SheevaPlug support. - The device is based on Marvell 88F6281 system on chip. - More info about the platform at http://www.plugcomputer.org - To build the FreeBSD kernel: make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG - Installation notes at: http://wiki.freebsd.org/FreeBSDMarvell Submitted by: Michal Hajduk Approved by: re (kib) Obtained from: Semihalf Notes: svn path=/stable/8/; revision=197251
* MFC r196822, r196823, r196824:Pawel Jakub Dawidek2009-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove 'ad:' prefix from disk serial number. We don't want serial number to change when we reconnect the disk in a way that it is accessible through CAM for example. Discussed with: trasz Simplify g_disk_ident_adjust() function and allow any printable character in serial number. Discussed with: trasz Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl) Make serial numbers of daX disks visible by GEOM. No objections from: scottl Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl) Approved by: re (kib) Notes: svn path=/stable/8/; revision=197217
* MFC 197062:John Baldwin2009-09-141-3/+15
| | | | | | | | | | | | Don't malloc a buffer while holding the prison0 mutex. Instead, use a loop where we figure out the hostname length under the lock, malloc the buffer with the lock dropped, then recheck the length under the lock and loop again if the buffer is now too small. Approved by: re (kib) Notes: svn path=/stable/8/; revision=197194
* MFC r196889:Norikatsu Shigemura2009-09-131-3/+5
| | | | | | | | | | | | Change 'dev.cpu.N.temperature', sysctl I (degC) to IK (Kelvin), to match acpi_thermal(4) and amdtemp(4). Approved by: re (rwatson) Reviewed by: rpaulo Suggested by: ume Notes: svn path=/stable/8/; revision=197149
* This fixes kern/138516, an mbuf leak in both the emJack F Vogel2009-09-112-11/+24
| | | | | | | | | | | and igb driver, when a transmit fails the packet/mbuf was not being requeued. Thanks to those that pointed this problem out. Approved by: re Notes: svn path=/stable/8/; revision=197093
* MFC r196717:Sam Leffler2009-09-071-1/+10
| | | | | | | | | fix beacon timers on resume in sta mode so raoming works Approved by: re (kensmith) Notes: svn path=/stable/8/; revision=196940