summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2015-03-02athn(4) USB drops received frames larger than MCLBYTES.stsp1-1/+7
Count these dropped frames as input errors.
2015-03-02Fix re-associations with athn(4) USB devices in station mode.stsp1-6/+23
Sending the firmware a NODE_ADD command for our BSS doesn't seem to have the desired effect in station mode. It made a new association after ifconfig down/up impossible until the device was re-plugged. Leave the code in place but limit it to hostap mode, just in case it is needed there (hard to tell since hostap mode seems to be broken -- no beacons are sent by the device). Also, when leaving run state, reset the RX filer to allow all beacons again. ok mpi@
2015-03-02Rework ath(4) USB firmware command handling.stsp2-31/+55
The previous code was racy and could dead-lock the USB task thread when a firmware command timed out (e.g. because the user pulled out the device). Handle this condition by marking the device as dying as soon as the interrupt handler gets an IOERROR and making sleeping firmware command threads check for a dying device when waking up. Ensure that no thread will try to send a command before the previous one has completed. There is only a single xfer data structure for firmware command transfers and reusing an in-flight xfer will give the USB stack curly toenails ("xfer not free"). Allow up to ATHN_USB_HOST_CMD_RING_COUNT firmware commands to be enqueued on the command ring, rather than just one. Use standard usdb_wait_task() when waiting for command ring completion instead of hand-rolled tsleep()s. discussed with and ok mpi@
2015-03-02Correctly set lowest_present_ofdm in iwm_mvm_ack_rates().jsg1-3/+3
ok kettenis@
2015-03-02init error to 0 in iwm_send_cmd()jsg1-2/+2
ok stsp@ phessler@
2015-03-02match iwn and init txrate at lowest available bit-ratejsg1-2/+3
ok stsp@ phessler@
2015-03-02workaround for interrupt coalescing bug not needed on 7265jsg2-22/+32
ok kettenis@ stsp@ phessler@
2015-03-02Fix scanning with athn(4) USB devices.stsp2-6/+36
The driver artificially limited the number of slots for nodes in its net80211 node cache to 8, the rationale being the device firmware can only handle 8 associated nodes at a time. But that's not a good reason to only cache 8 of potentially many APs in the area. Instead of crippling upper layer data structures, impose the limit locally by raising an error if more than 8 nodes are trying to associate (which can only happen in hostap mode, and hostap mode seems to be broken anyway). This matches what Linux ath9k does. Also, use a USB-specific scan timeout callback to we can do USB refcounting while scanning. ok mpi@
2015-03-02load the correct firmware for 3160/7265jsg2-5/+19
ok kettenis@ stsp@ phessler@
2015-03-02In athn(4), set USB pipe pointers to NULL after closing pipes. Not reallystsp1-6/+14
required since this code runs during device detach but looks prettier. Also remove an unneeded call to usbd_abort_pipe() which is implied by usbd_close_pipe(). ok mpi@
2015-03-02Teach athn(4) about USB reference counting to prevent it from causing majorstsp1-2/+18
confusion in the USB stack. Also add some usbd_is_dying checks. suggested by + ok mpi@
2015-03-02Remove the mpsafe flag for mpii(4), it is a suspect in some kernel hangs I'vesthen1-2/+2
seen on MP kernels when doing bulk io transfers from a multithreaded program (bacula-fd). ok dlg@
2015-03-01Correctly set lowest_present_ofdm in iwm_mvm_ack_rates().kettenis1-3/+3
ok phessler@, stsp@
2015-02-28Remove duplicated defines for window 7 registers.miod1-13/+1
2015-02-28Prevent a race resulting in an infinite loop printing "ehci_idone" messages.mpi1-17/+15
As soon as a transfer is being cancelled, remove it from the list of pending xfers. This way the soft interrupt routine won't try to process it before ehci_abort() gives it back to the stack. Problem analysed by and ok stsp@
2015-02-28Fix uhidev_get_report_async() from David Higgs.mpi1-4/+7
2015-02-28unbreak pcmcia an(4) by adding back some lines removed in rev 1.21jsg1-1/+3
without this is won't attach. ok stsp@ millert@ miod@
2015-02-27Seems the Samsung SM951 PCIe SSD needs the same quirk as other Samsung SSDs.kettenis1-1/+3
ok guenther@, phessler@, jsing@
2015-02-27regenkettenis2-2/+7
2015-02-27Samsung SM951 PCIe SSD.kettenis1-1/+2
2015-02-27remove ^L characters. no binary change.dlg1-9/+9
2015-02-23Add support for the RTL8411B chipphessler1-1/+2
Verified working by Peter Hansteen OK deraadt@, millert@, stsp@
2015-02-23More iwm(4) whitespace fixes from NetBSD.stsp2-26/+26
2015-02-23Make iwm(4) re-read the firmware image from disk on if down/up like otherstsp2-30/+32
drivers do. While here remove unused fields from struct iwm_fw_info. test and ok brad@ phessler@
2015-02-22Correct PAGE_MASK usage in radeon_vm_map_gart(). Linux definesjsg1-2/+2
PAGE_MASK to be (~(PAGE_SIZE - 1)) where as our kernel defines it as (PAGE_SIZE - 1). It is possible to flag a CS as wanting to use GPU VM for cayman/aruba hardware though in practice Mesa won't submit a CS flagged with GPU VM for these unless overriden via RADEON_VA=true in the environment. For Southern Islands radeons on the other hand GPU VM is required and flagged by default.
2015-02-22Give RS* IGP radeons a better chance of working thanks to Imre Vadaszjsg2-5/+5
for debugging the problem on RS690 and coming up with an initial diff. Align the gart table allocation to the size of the allocation (rounded up to nearest page size by bus_dmamem_alloc). Matches the behaviour of the original Linux code's use of pci_alloc_consistent()/dma_alloc_coherent(). Correct PAGE_MASK usage in rs400_gart_set_page(). Linux defines PAGE_MASK to be (~(PAGE_SIZE - 1)) where as our kernel defines it as (PAGE_SIZE - 1). Most of the other occurances in the drm code have been adjusted accordingly but this one seems to have been missed.
2015-02-21In iwm(4), fix an inverted check for hardware-ready state. From NetBSD.stsp1-2/+2
Pointed out by brad.
2015-02-20Now that if_input() is a thing, use itchris1-11/+2
ok dlg@
2015-02-20Whitespace fixes for iwm(4) code. From NetBSD.stsp1-56/+56
2015-02-20Make the iwm(4) hardware receive filter pass multicast traffic.stsp1-1/+36
Fixes inet6 autoconf, for example. Reported and fix tested by matthieu and brad
2015-02-19regenjasper2-2/+52
2015-02-19add an id for the ahci controller on the SM A1SAM-2550F (atom c2550) from me,jasper1-1/+11
and a whole bunch of other id's jsg@ spotted in dmesglog ok jsg@
2015-02-19when reading the max packet size in the pcie device config anddlg1-2/+2
status register, correctly mask things so we're left with the mps field instead of everything but the mps field. tested by bcallah@ and jim smith
2015-02-18myri employees and their drivers for linux and solaris have repeatedlydlg2-10/+67
told me that if you're going to rx into buffers greater than 4k in size, they have to be aligned to a 4k boundary. the mru of this chip is 9k, but ive been using the 12k mcl pool to provide the alignment. however, if we move to putting 8 items on a pool page there'll be enough slack space in the mcl12k pool pages to allow item colouring, which in turn will break the chip requirement above. in practice the chips i have seem to work fine with unaligned buffers, but i dont want to risk breaking early revision chips. this moves myx to using a private pool for allocating clusters for the big rx ring. the item size is 9k, but we specify a 4k alignment so every item we get out of it will be correct for the chip.
2015-02-18we're not using these macrosdlg1-3/+1
2015-02-18enable pcie relaxed transaction ordering and bump the max payloaddlg1-1/+28
size up to 4k. found while reading someone elses driver.
2015-02-17the rnd event ringbuf calculations aren't correct, which may result intedu1-21/+8
failure to fire the collection timeout. discovered by markus. the order of events here doesn't actually matter, so switch to a simple stack, which is easier to understand. ok markus
2015-02-16Memory leak if copyin() or copyout() fails; found by Maxime Villardmiod1-8/+11
max@M00nBSD.net's code scanner; ok doug@ jca@
2015-02-16allow Arduino Leonardo to attach to umodem(4), from Gregor Beststhen1-1/+5
2015-02-16syncsthen2-4/+16
2015-02-16add Arduino Leonardo, from Gregor Best (plus typo+ordering fix)sthen1-1/+5
2015-02-14Define UPS_PORT_TEST as FreeBSD/NetBSD do.uebayasi1-1/+2
2015-02-14Handle (poll) HCD interrupt right after initialization to immediately markuebayasi1-1/+4
ports as enabled/connected.
2015-02-12Convert to if_input().mpi1-12/+8
ok dlg@
2015-02-12Fix typos.uebayasi2-8/+8
2015-02-12Provide interface for external DMA address configuration.uebayasi6-12/+53
2015-02-12switch back to IRQ_NONE/IRQ_HANDLEDjsg7-27/+27
2015-02-12Convert to if_input().mpi1-8/+4
ok dlg@
2015-02-12Convert to if_input().mpi1-10/+7
ok dlg@
2015-02-12Add and use macros for linux memory barriers. Fix the call injsg12-39/+46
i915_gem_object_flush_fence() to be mb() not wmb() while here.