summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
2017-07-17Make athn(4) send RTS frames at 2 Mbit/s again. I changed this to 1 Mbit/sStefan Sperling
in r1.38 of this file, however for some reason the hardware sends RTS frames at rates other than 1 Mbit/s which of course doesn't help. Not sure what is causing this problem, but the old behaviour worked better, so revert. ok krw@
2017-07-12Introduce two quirks to prevent attaching ATA and ATAPI devicesMike Belopuhov
Hyper-V and Xen have varying support for detaching emulated IDE devices ranging from none on Hyper-V to only IDE disks but not CDROM (Xen). The quirk mechanism provides a way of enforcing the desired behavior. With suggestions and OK kettenis, tedu, mlarkin
2017-07-08- For RTL8188CUS/RTL8192CU, we have to force 8051 reset/enable before waitingKevin Lo
for firmware to get ready. It fixes "urtwn0: could not load firmware page" while running stsp@'s script: dhclient urtwn0; ifconfig urtwn0 down; ifconfig urtwn0 scan in a loop. - Minor cleanup for rtwn_read_rom()/rtwn_get_txpower(); no need to use callbacks. Tested by stsp@ and me. ok stsp@
2017-07-03Replace slot time durations with macros.Kevin Lo
ok stsp@
2017-07-02Add the definition of IEEE80211_DUR_DS_SHSLOT.Kevin Lo
From IEEE Std. 802.11-2016, Table 18-5 "ERP characteristics", p. 2332: aSlotTime characteristic: If dont11OperatingClassesRequired is false: Long = 20 us Short = 9 us ok stsp@
2017-07-01- Avoid possible use of uninitialized variable; noticed by jsg@Kevin Lo
- Only set value in R92C_FAST_EDCA_CTRL register if the device is combo WiFi/Bluetooth; confirmed by Yan-Hsuan Chuan from Realtek - There's no need to set the default value for the R92C_PIFS since default value is 0x1c; confirmed by Yan-Hsuan Chuan from Realtek - Disable usb Rx aggregation mode for rtl8188cu/rtl8192cu; vendor drivers use DMA Rx aggregation mode for rtl8188cu/rtl8192cu/rtl8188eu and use USB Rx aggregation mode for later chipsets. Tested by stsp and me. ok stsp@
2017-06-29kill RCSID macros; discussed with millertTheo de Raadt
2017-06-23- Fix Tx queues to USB endpoints mapping and merge urtwn_r92c_dma_init()Kevin Lo
and urtwn_r88e_dma_init() into one; from FreeBSD r291902. - Change the way the number of pages for public queue is calculated; Based on the vendor driver's _InitQueueReservedPage(), the formula for calculation of the number of pages for public priority queue is as follows: if the device has 3 endpoints: PUBQ = total number of Tx pages - HQ - LQ - NQ if the device has 2 endpoints (i.e. has high and normal priority queues): PUBQ = total number of Tx pages - HQ - NQ - Don't write MCS8..MCS15 Tx power if the WNIC is a 1-stream Tx; - Set R88E_TX_PAGE_COUNT to a correct value; - Minimal enhancement in urtwn_open_pipes() for upcoming rtl8192eu chipset support; Tested with USB-N10 Nano (rtl8188cu), DWA-131 rev B (rtl8192cu), and TL-WN725N v2 (rtl8188eu) on amd64. ok stsp@
2017-06-19Do not call txeof nor rxeof in the watchdog routine.Martin Pieuchot
They cannot be serialized with the interrupt routine and are useless because the driver is reinitialized right after. Pointed by and ok mikeb@
2017-06-17The fonts we are looping through in vga_selectfont() are the builtinFrederic Cambus
font which is using the IBM encoding, and some potentially loaded fonts which are either IBM or ISO encoded. Therefore the condition checked by vga_valid_font() is always true, and we can remove it. Thanks to miod@ for pointing this out. OK tb@
2017-06-16- Fix incorrect values in the computation of transmit power for theKevin Lo
rtl8188eu chipset. - Small code refactoring: - replace hardcoded rate indexes with their name, like athn(4). - replace fields offsets with the structure; from FreeBSD r294198. - be compliant with definitions of the efuse in vendor hal_pg.h and rename struct r92c_rom member names: s/channel_plan/reserved5/, s/xtal_calib/channel_plan. - no need to disable HWPDN twice in urtwn_r88e_power_on(). Tested by stsp@ and myself with RTL8188CUS, RTL8192CU, RTL8188EU, and RTL8188CE devices. ok stsp@
2017-06-12typo; from bryan vyhmeisterTheo de Raadt
2017-06-11integer overflow for two range checksTheo de Raadt
fix from C Turt, ok miod
2017-06-08make the gem tx path MPSAFE.David Gwynne
this mostly follows the pattern in ifq.h ok jmatthew@
2017-06-05use byte swapping loads and stores.David Gwynne
shrinks the code a bit on sparc64. ok jmatthew@
2017-05-31The net80211 stack was providing a 'beacon miss timeout' value (in ms)Stefan Sperling
which specified how much time may elapse without beacons before drivers begin searching for a new AP. Drivers convert this timeout value into the amount of beacons they're allowed to miss. Having the stack provide this number upfront simplifies things. ok mpi@
2017-05-31avoid going outside array boundsJonathan Gray
ok krw@ deraadt@
2017-05-31Add support for Ralink RT5360. From Kevin Lo who tested with aJonathan Gray
D-Link DWA-525 rev A2.
2017-05-30Use the CD bit (Cursor Disable) in the cursor start register to properlyFrederic Cambus
disable hardware cursor. From NetBSD. OK deraadt@
2017-05-30Remove comments about implementing FIS-based switching with port multipliers,Jonathan Matthew
which we can safely assume isn't going to happen now. No code changes.
2017-05-30Remove the unused pcdisplay_mapchar_simple function in pcdisplay(4).Frederic Cambus
It has been unused since this code was imported from NetBSD. OK mlarkin@
2017-05-29Add hibernate support for nvme(4). This creates a separate IO queue that isJonathan Matthew
only active during hibernation, preallocating the the submission and completion queues during attach as they need to be page-aligned. tested on an x270 that successfully hibernates now. ok dlg@
2017-05-27nvme: Don't set prp1 for DEL_IOCQStefan Fritsch
NVM_ADMIN_DEL_IOCQ does not need prp1 (just as NVM_ADMIN_DEL_IOSQ). Remove what is likely a cut'n'paste error from the *_ADD_* code. tested by claudio@ ok jmatthew@
2017-05-27nvme: Add suspend/resume codeStefan Fritsch
Based on an initial patch by ehrhardt@ . Thanks to claudio@ for testing and deraadt@ for advice. "go ahead" deraadt@
2017-05-21Rockchip SoCs needs some additional register twiddling when the link speedMark Kettenis
changes to set the appropriate clock. Add a sc_statchg callback in the core softc that gets called when the link status changes.
2017-05-19Repair rtwn(4) IQ calibration.Stefan Sperling
Restore behaviour from before the fix of the botched R92C_USTIME_TSF register definition. IQ cal code was referring to this register by name, but actually needs to use the old value. So add a register definition for the old value under a new name (R92C_BCN_CTRL1) and use this name in the IQ cal code. Discussed with Kevin Lo
2017-05-19Make monitor work with athn(4) on my 3T3R AR9380 device.Stefan Sperling
This card can now receive packets. Transmit is still broken and Kevin Lo reports that his 2T2R AR9380 device cannot receive yet.
2017-05-19Fix R92C_USTIME_TSF register definition.Stefan Sperling
According to Kevin Lo it was wrong (and is also wrong in the Linux driver). FreeBSD made the same change in r282623. Patch by Kevin Lo.
2017-05-18Fix a uvm fault in athn_clock_rate():Stefan Sperling
Don't deref an IEEE80211_CHAN_ANYC channel pointer. ok mpi@
2017-05-12subtract one sector from the disk size before passing it back to theJoshua Stein
scsi layer, which will add one sector back fixes incorrect disk size reporting which was causing fdisk to create a protective MBR of one too many sectors, which caused our EFI bootloader to fail to recognize it as a GPT disk ok dlg
2017-05-088192C is the only MIMO chip supported by this driver, all others are 1T1R.Ricardo Mestre
This diff corrects dmesg to properly show that all others are 1T1R, since right now it only applies to 8188C and all others incorrectly display 0T0R. hint & OK stsp@
2017-05-08Fix R92C_TXDW4_RTSRATE_M and R92C_TDECTRL_BLK_DESC_NUM_M definitions.Stefan Sperling
Same changes as FreeBSD r311948 and r287584. Patch submitted by Kevin Lo. Tested by me.
2017-05-07Program hardware address in dwc_gmac_init() instead of dwc_gmac_attach()Mark Kettenis
such that "ifconfig dwge0 lladdr 00:11:22:33:44:55" actually works.
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-04-26Tell MiRA about the actual number of retries instead of pretending thatStefan Sperling
a frame which was retried N times was retried just once. This punishes retry-heavy data rates even more and should reduce latency. It does not seem to have a noticable effect on net throughput in my testing. If this change causes throughput problems for anyone, let me know. ok tb@ mlarkin@
2017-04-11Partially revert previous mallocarray conversions that containDavid Hill
constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
2017-04-09Convert some malloc(9) to mallocarray(9)David Hill
ok deraadt@
2017-04-08A pile of sizes to free(9). In test for a few days in snapshots.Theo de Raadt
Errors will result in nice clean panic messages so we know what's wrong. Reviewed by dhill visa natano jsg.
2017-04-04add a free() size near microcode loadingTheo de Raadt
2017-03-11Introduce a new knob to force the first USB keyboard as console input.Martin Pieuchot
By setting "machdep.forceukbd=1" you can now use your USB keyboard in ddb(4) even if your BIOS emulates a pckbd(4). ok tom@, kettenis@, deraadt@
2017-03-08Do not clear IFF_UP, even in the error path, clearing IFF_RUNNINGMartin Pieuchot
is enough. This flag should only be set by the stack, drivers shouldn't mess with it. Discussed with dlg@ and mikeb@, ok mikeb@, stsp@
2017-03-05When we're unable to determine which NCQ command failed, fail all activeJonathan Matthew
commands rather than proceeding to an assertion failure. This matches how we handle the same condition with non-queued commands, and the behaviour of every other ahci driver I can find. Add a printf there so we might get some idea of how often this condition arises and what happens afterwards. ok dlg@
2017-02-12Fix an uninitialised return value in rtwn_ra_init(). Though nothingJonathan Gray
currently tests the return value. ok stsp@
2017-02-07pull struct mfi_evtarg_pd_state out of struct mfi_evt_detail.David Gwynne
this lets me pass the specific argument to an aen handler in mfii. it also unbreaks the tree. found by jmatthew@
2017-02-02copy the mbox into the dcmd struct, not the pointer to the mbox.David Gwynne
makes bioctl work on mfi(4) again. while here memset a few mboxes before using them. bioctl breakage reported by jason george
2017-02-01Fix format strings in cy(4), allows to compile with CY_DEBUG.Alexander Bluhm
From Jan Klemkow
2017-02-01Add AMRR support to rtwn(4). Based on code from FreeBSD.Stefan Sperling
Works much better than firmware-based rate scaling in my testing. ok mpi@
2017-02-01In athn(4), if multi-rate retry is disabled due to RTS being used, then doStefan Sperling
not tell rate scaling algos about failed retries. All attempts use the same rate anyway, so checking whether the frame succeeded or failed is good enough. ok mpi@
2017-01-31Configure rtwn's ACMHWCTRL register correctly. Bits in this registerStefan Sperling
correspond to the flag stored in our stack as ac->ac_acm. ok mpi@