summaryrefslogtreecommitdiffstats
path: root/sys/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* FDT-based I2C drivers should not use OF_* API in the match code, sincepatrick2020-11-124-16/+12
| | | | | | | | on machines with ACPI ia->ia_cookie will be an ACPI node instead of an OF node. We'll still get into trouble with APCI devices that provide a string that matches, but we'll worry when that happens. ok kettenis@
* use RWLOCK_INITIALIZER() in DEFINE_MUTEX()jsg2020-11-122-2/+2
| | | | | | | | | | Gives rwlocks defined this way a non-NULL rwl_name. Move ttm_pool_shrink_scan() DEFINE_MUTEX use out of function scope to fix build with WITNESS after this change and expand macro to have a better name than "lock". Found by and ok semarie@
* Fix athn(4) in client mode against APs that use WPA1/TKIP as the group cipher.stsp2020-11-111-2/+3
| | | | Problem confirmed and fix tested by Matej Nanut.
* syncpatrick2020-11-112-4/+9
|
* Add Prolific PL2303GC USB serial adapter.patrick2020-11-111-1/+2
|
* Enable optical output when bringing an interface up and disable it againkettenis2020-11-101-1/+14
| | | | | | | when bringing the interface down. Disable optical output when the driver attaches to be sure. ok claudio@, patrick@
* Add interfaces to control optical output of an SFP.kettenis2020-11-103-3/+59
| | | | ok claudio@, patrick@
* Fix urtwn(4) against access points which use WPA1/TKIP as the group cipher.stsp2020-11-101-2/+5
| | | | | | | | | | Problem first reported against dhclient(8) by Artem Mazurov on bugs@ Bug was traced down into urtwn(4) by krw@ with a TP-Link TP-WA850RE AP. Regardless, please configure your access points to use WPA2/AES only! WPA1/TKIP is insecure and should die. ok krw@
* Fix previous commit; using > 0 to check a pointer isn't quite right.kettenis2020-11-101-2/+2
|
* If possible, check the MOD-DEF0 signal to detect the presence of an SFP.kettenis2020-11-101-1/+40
| | | | ok patrick@
* use a single preinitialised mutex for atomic64 fallback pathjsg2020-11-092-15/+22
| | | | | | | | | | | Previously we would initialise a variable specific mutex in ATOMIC64_INIT() or atomic64_set() but the drm code in multiple places zeroes memory and later accesses it without calling these resulting in a mutex with IPL_NONE instead of IPL_HIGH. Fixes a 'locking against myself' panic reported by Anthony Richardby on macppc with PowerBook5,6 and RV350. ok kettenis@
* Rework MAC initialization code. Properly turn comphy off and on againpatrick2020-11-091-87/+164
| | | | | | on re-initialization. Make sure interrupts are masked while we are doing those bits dirty. This fixes issues with network stopping after the first down/up cycle.
* Clear TX sent counter on up/down.patrick2020-11-091-1/+4
|
* On interface down, drop received packets by adding them back into thepatrick2020-11-091-5/+48
| | | | buffer manager pool.
* There seems to be a silicon errata for 82598 ix(4) chips. When thebluhm2020-11-091-7/+21
| | | | | | | | | link state changes and an interrupt is fired for that, the MSI-X interrupt mask bits of the queues are cleared. During init while the queues are enabled by the driver, the hardware disabled them in the background. Then receiving packets did not work. In MSI-X mode, use the FreeBSD logic to read the cause from EICS register. from Christiano Haesbaert; tested with 82599 and X540T and OK jmatthew@
* Small whitespace cleanup.patrick2020-11-091-5/+5
|
* use 64 bit atomic builtins on i386 for atomic64jsg2020-11-091-2/+4
|
* vblank seqlock is used from interrupt context so use IPL_TTYjsg2020-11-081-1/+1
|
* Add supported media types for SFPs.kettenis2020-11-081-1/+16
| | | | ok patrick@
* Add code to determine the supported media types from the SFP EEPROM.kettenis2020-11-082-3/+40
| | | | ok patrick@
* U-Boot might not have cleaned its pools. The pool needs to be emptypatrick2020-11-082-4/+25
| | | | | | | | | before we fill it, otherwise our packets are written to wherever U-Boot allocated memory. Cleaning it up ourselves is worrying as well, since the BM's pages are probably in our own memory. Best we can do is stop the BM, set new memory and drain the pool. Tests show that this still returns U-Boot's entries. Now, where have those been stored... in HW or in memory?
* Hand the pool a physical address, not a virtual one.patrick2020-11-081-3/+3
|
* Check that DMA memory has been allocated for the rings and the BM. Whilepatrick2020-11-081-2/+5
| | | | there remove a memset that's already been done by the allocator.
* Add clock support for i.MX8MP. This variant uses essentially thepatrick2020-11-072-1/+198
| | | | | | same layout as the i.MX8MM, which means that all supported clocks so far have the same selection of parents and allows reusing the i.MX8MM code.
* change from rwlock(9) to mutex(9) for linux rwlocksjsg2020-11-074-12/+8
| | | | | | | | | Linux rwlocks are read/write spin locks which don't sleep. Fixes a panic claudio@ reported with a WITNESS kernel on inteldrm(4) 'panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) drmvma' Patch from kettenis@ with a small tweak from me. ok kettenis@
* The ClearFog GT 8K device tree references the PP22's gate clockpatrick2020-11-061-1/+5
| | | | | | instead of the core clock, so add this one to mvclock(4) as well. ok kettenis@
* Remove unused `anon' argument from uvmfault_unlockall().mpi2020-11-061-3/+3
| | | | | | | | | It won't be used when amap and anon locking will be introduced. This "fixes" passing a unrelated/uninitialized pointer in an error path in case of memory shortage. ok kettenis@
* Remove unused `anon' argument from uvmfault_unlockall().mpi2020-11-063-9/+9
| | | | | | | | | It won't be used when amap and anon locking will be introduced. This "fixes" passing a unrelated/uninitialized pointer in an error path in case of memory shortage. ok kettenis@
* move definitions which should be in rwsem.hjsg2020-11-063-6/+14
|
* Match on ConnectX-6 (non-Dx) cards too.jmatthew2020-11-061-1/+2
| | | | tested by Nilson Lopes
* Bail out early if the port type is not Ethernet, rather than failing laterjmatthew2020-11-061-1/+8
| | | | | | | on in the attach process with a useless error message. tested on a ConnectX-6 card in infiniband mode by Nilson Lopes ok dlg@
* Have mvpp(4) pass MII flags depending on the phy mode specified inpatrick2020-11-031-2/+23
| | | | | | the device tee. This allows my ClearFog GT 8K to get the 1G link up. ok kettenis@
* The Marvell 88E1512 supports multiple modes between MAC to PHY and PHYpatrick2020-11-033-3/+26
| | | | | | | | | | to Media. The mode can be configured in the General Control Register 1. On the 88E1512 and 88E1514 this mode defaults to 111 (invalid). Thus we need to change the mode if we want SGMII-to-Copper. For this, allow the interface to pass an SGMII flag, indicating that the interface between MAC and PHY is SGMII. ok kettenis@
* Disable HW PHY polling. It's enabled by default.patrick2020-11-032-2/+10
|
* synctobhe2020-11-021-2/+4
|
* Enable brightness keys on powerbooks where the keyboard attaches as ukbd(4).tobhe2020-11-024-15/+26
| | | | ok kn@
* add support for ctl reads and writes on 710 chips with API < 1.5dlg2020-11-021-6/+28
| | | | | | | | this gets rid of some annoying errors when bringing such an interface up, but more importantly is allows RSS to work on these boards with older firmware. ok jmatthew@
* Update the RTL8125B microcode and use ifiq_input and its return value tokevlo2020-10-312-23/+24
| | | | apply backpressure to rxrs.
* We need more memory barriers on powerpc.kettenis2020-10-291-7/+13
| | | | ok tobhe@
* Silence "using MMIO for ATOM IIO" error message, since that is normal onkettenis2020-10-291-0/+2
| | | | | | POWER9 machines. ok jsg@
* Apple Geyser3 keyboards need munging as well. Reported by Mathius Schocker.kettenis2020-10-281-1/+2
| | | | ok tohe@, deraadt@
* regenkettenis2020-10-282-4/+39
|
* Add a few more Apple Geyser IDs.kettenis2020-10-281-1/+8
| | | | ok tobhe@, deraadt@
* regenkettenis2020-10-282-2/+12
|
* Fujitsu SPARC64 X CPI host bridge and another PLX PCIe switch.kettenis2020-10-281-1/+3
|
* Switch from bus_space_read/write to linux io.h interfaces for alljsg2020-10-286-71/+30
| | | | | | pci "memory space" io. Further reduces the diff to linux. ok kettenis@
* Use the function from <linux/io.h> for all "Memory Space" IO. This reduceskettenis2020-10-285-24/+21
| | | | | | | the diffs to Linux and makes sure we use memory barriers in the same way as Linux does. ok jsg@ (who added the doorbell changes)
* Add missing bus_space_barrier() in mcx_cmdq_post() - without this, cmdqjmatthew2020-10-281-1/+3
| | | | | | | | | | operations during attach fail on some amd64 systems using the TSC delay function, seemingly as there aren't enough memory operations happening to get the doorbell write out to the device otherwise. The lapic delay function didn't expose this problem. suggested by kettenis@ ok dlg@
* Do not touch non existing queues. Allows to disable MSI-X in ix(4).bluhm2020-10-271-2/+3
| | | | OK jmatthew@
* Adding IOMMU support for AMD Vi and Intel VTD (disabled)jordan2020-10-274-1/+3826
| | | | | | | This creates separate domains for each PCI device and can provide protection against invalid memory access. Needed for Passthrough PCI from vmd. ok deraadt@, kettenis@ : ----------------------------------------------------------------------