summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
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.
2016-04-30Enable high speed timing for bus clock frequencies over 26MHz and advertiseMark Kettenis
support for it. In principle SD cards use high speed timing for frequencies over 25MHz, but it is silly to run those with a clock between 25-26MHz.
2016-04-30Add some missing interrupt bits, and enable the ADMA error interrupt.Mark Kettenis
2016-04-30Implement DMA support. Bits and pieces taken from NetBSD, but we onlyMark Kettenis
support ADMA2. The older SDMA mode has too many limitations to be really usable. Gives us only moderate speed improvements, bus reduces the CPU load considerably. We will reap the full benefits once we implement wider bus widths and high speed modes. There is a remining issue with simultanious use of eMMC and external SD card on (some) Intel Bay Trail hardware. Still under investigation. ok patrick@, stsp@, deraadt@
2016-04-29Call sched_init_cpu() just before booting secondary CPUs.Martin Pieuchot
This prevent the scheduler from scheduling tasks to CPUs not beeing able to execute them during the boot process. ok visa@, kettenis@
2016-04-29Fix some gibbering horrors due to uninitialized struct nameidata'sBob Beck
1) turn NDINITAT into a function and make the macros point to it with the later goal of getting rid of them. 2) Sweep the kernel for places where people make a struct nameidata manually on the stack and fill in what they hope are the required fields and count on prayer and clean living to always get them right. Instead use NDINIT everywhere. NFS was especially bad for this and there have likely been things lurking there for a while. 3) Add a couple of strategic KASSERT's to catch future offenders. ok krw@ sthen@ deraadt@
2016-04-29Panic when attempting to execute a scsi command with no disciplineKenneth R Westerback
defined. Carrying on is pointless. And will currently cause a NULL pointer deref anyway. NULL deref found by mmcc@ and his friend clang. ok deraadt@
2016-04-29Do not remove local symbols from the table.Martin Pieuchot
ddb(4) can now see static functions. That doesn't mean we should start declaring functions as ``static'', however it helps for the few existing exceptions. ok deraadt@, kettenis@
2016-04-29Do not allow to change the routing table of a bound socket. ThisAlexander Bluhm
is not intended and will behave unexpectedly if the address is already used in another domain. It did not work anyway, as the PCB ended in the wrong hash bucket after changing the rtable. Fail with EBUSY if the socket is already bound and rehash the PCB if its rtable changes. input claudio@; OK mpi@
2016-04-29Make if_output() return EAFNOSUPPORT instead of just dropping packetsKenneth R Westerback
and pretending the output succeeded. Packets are still dropped! Idea from jsg@ following same change to bridge(4). ok mpi@
2016-04-28careful study of the holy scrolls reveals that for pselect (and ppoll)Ted Unangst
oversized timespecs should be clamped, not rejected. ok millert
2016-04-28Preserve the domid when swapping 16 bit grant table entry flagsMike Belopuhov
We use an atomic CMPXCHG on first 32 bits of the grant table entry when revoking access to the memory page. Target domain ID field is part of these 32 bits, thus shouldn't be masked out for comparison. This appears to be the last piece of the QubesOS VM chaining puzzle; tested by Marco Peereboom, thanks!