summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-05-07add support for changing the bus width and set the 4-bit mode capabilityJonathan Gray
ok patrick@ kettenis@
2016-05-06Reset the bus width back to 1-bit when resetting the host. Makes imxesdhc(4)Mark Kettenis
work on the cubox-i, whereu-boot leaves the controller in 4-bit mode.
2016-05-06Revert the previous commit. There still are bad interactions between theMark Kettenis
pagedaemon and the buffer cache. requested by deraadt@
2016-05-06Make sure we always update both bits that control the bus width. Also makeMark Kettenis
sure that we reset the bus width (to 1-bit) after powering up the bus. Apparently the register write fails if the bus isn't powered on. Implement the chip callback function and advertise 4-bit bus support. ok stsp@
2016-05-06Round the requested clock frequency down to a support value instead ofMark Kettenis
insisting on an exact match. Add support for a 50 MHz clock. ok stsp@
2016-05-06Fix the DMA transfer code to repect the block size in the sdmmc command.Mark Kettenis
ok stsp@
2016-05-06Fix efiboot not to hang with a disk whose block size < 512.YASUOKA Masahiko
Report and diff from Vegar Linge Haaland ok krw
2016-05-05r1.10 of if_bnx.c effectively removed the limit on the number of segments inJonathan Matthew
the tx dma maps, apparently to allow heavily fragmented packets to be sent. The tx ring accounting in bnx_start assumed that the longest fragment chain we'd see was BNX_MAX_SEGMENTS, so sending a heavily fragmented packet when the ring was already full could cause it to overflow. In the 10 years since r1.10, we've started defragmenting packets if they won't fit in the dma map, so we can limit the maps to BNX_MAX_SEGMENTS again. While we're here, ensure there's always at least one slot on the tx ring free, for consistency between drivers. Fixes packet corruption seen by otto@ ok mpi@ dlg@
2016-05-05Bump up the clock to 25 MHz before trying to read the SCR register of an SDMark Kettenis
card. Data transfers don't seem to work on the Realtek RTS5229 Card Reader if the clock frequency is too low, and reading the SCR requires a data transfer.
2016-05-05Remove uvm_mapentry_freecmp which has been unused for yearsStefan Kempf
Found by David Hill with clang.
2016-05-05Add Dual Data Rate support for eMMC at 52MHz.Mark Kettenis
2016-05-05Populate SCSI inquiry data with information from SD and MMC cards.Mark Kettenis
Code is slightly more convoluted to avoid using strncpy(9). ok jsg@, millert@, deraadt@
2016-05-05Return ENOTTY in acpithinkpad backlight get/set ioctls if the maximumJonathan Gray
value is 0 to match the behaviour when the callbacks are not set. Prevents a divide by zero in wsconsctl(8) reported by Caspar Schutijser. earlier version ok jung@ deraadt@ kettenis@
2016-05-04Use BUS_DMA_OVERRUN to cope with the broken DMA engine of the Davicom DM9102Mark Kettenis
found on some Sun sparc64 machines. This fixes the unrecoverable DMA errors people have been seeing ever since dlg@ made changes to the pool code that changes the memory layout.
2016-05-04Some hardware (such as the onboard dc(4) of the Netra X1) has a broken DMAMark Kettenis
engine that might attempt to read beyond the end of the buffer that was programmed. The IOMMU catches this "DMA overrun" and throws an unrecoverable error at us, at which point we have no choice but to panic. To avoid this implement a BUS_DMA_OVERRUN flag that maps an additional scratch page at the end of the vdma address range. DMA requests will spill over into this page, which just returns zeroes. Thanks to matthieu@ for giving me access to a machine with the problem. ok deraadt@, beck@
2016-05-04Initial support for MSI-X. Only supported on amd64 for now. I have diffs toMark Kettenis
actually use this in em(4) and xhci(4), but I'm not committing those yet because we almost certainly need to save and restore the MSI-X registers during suspend/resume. However, this allows mpi@ to play with multiple-vector support in networking hardware. Requested by mpi@ ok mlarkin@, mikeb@
2016-05-04Print SD host controller version.Mark Kettenis
2016-05-04Preserve DiffServ value when fragmenting an ipv4 packet.Vincent Gross
Ok phessler@, henning@
2016-05-04Add high-speed support for SD cards. In theory this should double theMark Kettenis
transfer rates to and from the card. In practice the improvement will be smaller, but I am seeing serious improvement in the read speeds.
2016-05-04Don't mask pins configured as direct IRQ. Those are tied directly to the APICMark Kettenis
and don't generate a GPIO controller interrupt. Masking them menas devices relying on those APIC interrupts will break. Unbreaks the keyboard on the Asus x205ta, which got broken in rev 1.6.
2016-05-04Fall back to "safe-value" when "unmanage-value" is not evailable toMartin Pieuchot
configure fan speeds. from mglocker@, ok kettenis@
2016-05-04Make KERN_FILE_BYPID return ESRCH when PID not found, both in sysctl andVadim Zhukov
offline paths. More polishing to come. Input and okay bluhm@ & kettenis@.
2016-05-03Print missing newline if we bail out because of a uid mismatch.Mark Kettenis
2016-05-03Stop using a soft-interrupt context to process incoming network packets.Martin Pieuchot
Use a new task that runs holding the KERNEL_LOCK to execute mp-unsafe code. Our current goal is to progressively move input functions to the unlocked task. This gives a small performance boost confirmed by Hrvoje Popovski's IPv4 forwarding measurement: before: after: send receive send receive 400kpps 400kpps 400kpps 400kpps 500kpps 500kpps 500kpps 500kpps 600kpps 600kpps 600kpps 600kpps 650kpps 650kpps 650kpps 640kpps 700kpps 700kpps 700kpps 700kpps 720kpps 640kpps 720kpps 710kpps 800kpps 640kpps 800kpps 650kpps 1.4Mpps 570kpps 1.4Mpps 590kpps 14Mpps 570kpps 14Mpps 590kpps ok kettenis@, bluhm@, dlg@
2016-05-03implement bus_space_read_raw_X and bus_space_write_raw_XDavid Gwynne
with feedback from kettenis@ fixes building a kernel with xge, which might actually work on these machines now.
2016-05-03Make ip_forward() use the route entry fetched in in_ouraddr() when it isMartin Pieuchot
possible. This reduce the number of lookups to 1 for non-multicast traffic when PF is disable. Tested by Hrvoje Popovski who confirmed that benchmark numbers are now as good as with a single cache entry. ok visa@, bluhm@
2016-05-03Put back a panic() if an incoming packet already has a statekey.Martin Pieuchot
Apparently nobody can hit this condition anymore or people do not report bugs if their kernel do not panic. ok dlg@, sashan@
2016-05-03alias bus_space_{read,write}_raw to the non-raw counterpartsDavid Gwynne
busses are little endian, so the non-raw ops are raw anyway. fixes the kernel build after xge grew the use of the raw ops.
2016-05-03Revert previous commit. Calling sched_init_cpu() fromMark Kettenis
cpu_boot_secondary_processors() break suspend/resume.
2016-05-03regenDavid Gwynne
2016-05-03samsung use the same pci device id for multiple nvme partsDavid Gwynne
2016-05-02Simplify life for routing table implementations by requiring that rtable_walkJonathan Matthew
callbacks return EAGAIN if they modify the routing table. While we're here, simplify life for rtable_walk callers by moving the loop that restarts the walk on EAGAIN into rtable_walk itself. Flushing cloned routes on interface state changes becomes a bit more inefficient, but this can be improved later. ok mpi@ dlg@
2016-05-02Fix some issues wrt timestamp updating. The tmpfs_read() andMartin Natano
tmpfs_readlink() functions ignore the noatime mount option, tmpfs_read() should not update atime when zero bytes have been requested (as per posix) and tmpfs_write() should update mtime and ctime (as per posix). ok espie
2016-05-02Add check to armv7 platform bus match code, so that those busses onlyPatrick Wildt
attach if we are running in legacy mode. ok jsg@
2016-05-02Fix a corner case of 12-bit arithmetic: also increment the ba_winmissTheo Buehler
counter if sn == 0 and ba_missedsn == 0xfff. ok stsp@
2016-05-02Merge two identical code paths.Martin Pieuchot
ok benno@, visa@
2016-05-02Rework mainbus and implement simplebus to be able to span a tree-likePatrick Wildt
topology based on device tree information. Introduce a common attach args structure to be used for all fdt-capable bus devices. ok jsg@ kettenis@
2016-05-02IEEE 802.11 sequence numbers wrap at 12 bit.Stefan Sperling
Fix a case where ieee80211_ba_input() failed to account for that. ok tb@
2016-05-02add an empty ommmc_dump_regs() to fix the SDHC_DEBUG buildJonathan Gray
2016-05-02add support for changing the bus width to ommmc and set the 4-bit modeJonathan Gray
capability ok kettenis@
2016-05-01Print some capabilities.Mark Kettenis
ok deraadt@, patrick@
2016-05-01Print base clock frequency.Mark Kettenis
ok deraadt@, patrick@
2016-05-01Remove unused match function. The armv7 platforms implement their own,Patrick Wildt
which are more specific. ok kettenis@
2016-05-01Add bus width switching support for MMC. Enable 8-bit bus support onMark Kettenis
sdhc(4) controllers that support it. Mostly from NetBSD. This makes the raw transfer rate of the eMMC on the Lenovo Ideacentre Stick 300 go up to 40 MB/s.
2016-05-01Add a small delay after switching an MMC card into high-speed mode to makeMark Kettenis
sure it has witched before changing the bus clock speed.
2016-05-01Always write block count. This fixes the DMA issues on Bay Trail.Mark Kettenis
2016-05-01Add support for changing the bus width to the sdmmc subsystem and the sdhc(4)Mark Kettenis
controller. Use this to switch SD cards to a 4-bit bus if they support it. ok deraadt@, jsg@
2016-05-01Remove a bogus "else" that was causing breakage with LCP echoes,Stuart Henderson
bug introduced in r1.138. Reported at https://twitter.com/DarkSoul4242/status/722365165262405633 (twitter is *NOT* the place to report bugs!) and in https://marc.info/?l=openbsd-bugs&m=145988918010707&w=2, pointed out by tb@
2016-05-01Shuffle gpt/mbr code around a bit to make it more like other searchesKenneth R Westerback
for the disklabel. Tweak a few comments to make it more clear what is happening. No intentional functional change. ok yasuoka@
2016-04-30Mask all gpio interrupts when we attach. Fixes interrupt storm on the LenovoMark Kettenis
Ideacentre Stick 300.