Commit Graph

136726 Commits

Author SHA1 Message Date
maxv
944d7bed1a Reduce the diff between amd64 and i386. It also fixes a bug in amd64, where
large pages were not handled correctly.
2017-08-15 08:35:56 +00:00
isaki
e813916daa Clean up mix_write(). 2017-08-15 08:30:21 +00:00
isaki
0147e9b47c Avoid possibility of integer overflow (and clean up).
- On 32bit arch and type argument is int32_t, orig[m] * tomix[m] is
  calculated first with int32 (possibility of overflow here) and then
  cast to int64_t for assignment.
- bigger_type is sufficient for product and result.
2017-08-15 08:28:21 +00:00
maxv
ef69cdb819 Reduce the diff between amd64 and i386. 2017-08-15 06:57:53 +00:00
maxv
ef62dcc88b Remove __ELF__ vestige. 2017-08-15 06:39:37 +00:00
maxv
3174c959e8 style 2017-08-15 06:37:50 +00:00
maxv
0dc41925bb Merge into x86/. 2017-08-15 06:27:39 +00:00
maxv
f4ff21336e Reduce the diff between i386 and amd64 (bios32_service not implemented
there).
2017-08-15 06:04:28 +00:00
isaki
91cbb00a7c Clean up audio_open().
As a result of sc_audiochan cleanup, this loop is the same as last + 1.
2017-08-15 05:31:52 +00:00
isaki
9e73f18cf7 Clean up audio_allocbufs().
As a result of sc_audiochan cleanup, it is easy to access sc_hwvc.
2017-08-15 05:11:25 +00:00
isaki
f74024e8cb Remove dead codes.
sc->sc_opens never changes in this loop and as a result of
previous sc_audiochan cleanup "sc_opens == 0" is the same as
"sc_audiochan is empty".
2017-08-15 05:05:32 +00:00
isaki
c241a3c1cb Split the first special element from sc_audiochan list.
- This makes sc_audiochan a list of only open audio chan.
- "SIMPLEQ_FIRST(&sc->sc_audiochan)->vc" is now "sc->hwvc".
No functional changes (except one debug message).
2017-08-15 04:42:56 +00:00
nat
b79ea570a8 Apply the sequence number mask to txack. 2017-08-14 12:51:11 +00:00
hauke
42554a387c Enable the IT8628E shipped with my gigabyte GA-N3150N-D3V board.
XXX These IT suoer IO chips appear to be all fairly alike. Maybe add a
comprehensive list of IDs to recognize them, then deal with the
fallout?
2017-08-14 11:49:30 +00:00
nat
cb47fae4db Conform to the spec. with regards to acknowlegment packets. This prevents
the host controller from freezing.

Inmprove communication from inactive to active state.
2017-08-14 05:33:30 +00:00
jakllsch
fc12da1821 Always try to set USB HID devices into Report Protocol. (Unless the
device is known to be quirky.)

Some of the most-widely-compatible methods of implementing USB Keyboard
NKRO depend on this Request to function as designed.

Issuing this Request is recommended by the HID 1.11 spec (7.2.6):

... "the host should not make any assumptions about the device's state
and should set the desired protocol whenever initializing a device."
2017-08-13 22:29:42 +00:00
mlelstv
146bc77840 validate length for discard operation and split operation when byte length
doesn't fit into 'int'.
2017-08-13 22:23:16 +00:00
jakllsch
0d0313ba43 Support more varieties of USB keyboard reports.
The previous code asssumed reports would closely match the Bootstrap
Keyboard Protocol.  This is no longer always the case, particularly
with higher-end keyboards.
2017-08-13 22:19:56 +00:00
jakllsch
8780d8c54a Fix memory leak in report parsing error paths. 2017-08-13 21:11:45 +00:00
mlelstv
0bbad10443 Don't time out the discard work queue here. Either destroying a work queue
with pending work items panics or accessing freed resources from the work
item will crash. The timeout needs to be handled gracefully by the driver
that implements the discard operation.

Fixes parts of PR 50725.
2017-08-13 21:00:58 +00:00
jmcneill
b3e175fc24 Add support for H3 CPUX clock. 2017-08-13 19:18:08 +00:00
jmcneill
c02e5d790a enable gregulator 2017-08-13 18:27:48 +00:00
jmcneill
721ac4a3ed Add GPIO regulator driver. 2017-08-13 18:27:31 +00:00
jmcneill
97d3260c03 Add fdtbus_gpio_acquire_index for accessing multi-xref gpios properties. 2017-08-13 18:27:11 +00:00
christos
014b6d5aae PR/52483: Ryo ONODERA: Add support for ALPS PS/2 pointing devices 2017-08-13 08:49:27 +00:00
christos
7ee97454b7 Add ALPS pms support 2017-08-13 08:48:30 +00:00
maxv
22b2248cb1 Mmh, restore %cs and %ss on Xen. Otherwise (unpriv) userland could set a
non-three ring, causing the hypervisor to send a fatal interrupt to the
kernel.
2017-08-13 08:07:52 +00:00
maxv
f05e68c341 Remove unused include, remove dead code, KNF, and fix off-by-one. 2017-08-13 07:16:44 +00:00
isaki
7abef65771 Remove mixer chan from sc_audiochan.
Now sc_audiochan contains opened audio chan (and first special
element) only.

First I splitted sc_audiochan into sc_audiochan which has
audio chan (and first special element) and sc_mixerchan
which has mixer chan only.  However nobody else refers this
sc_mixerchan except additions to list and deletions from
list.  So mixer chan's list is not necessary.
2017-08-13 05:04:08 +00:00
isaki
e0da01f938 Move defines to the appropriate place. 2017-08-13 04:09:27 +00:00
jmcneill
09953da5db Add support for deprecated pin configuration and multiplex bindings. 2017-08-12 23:42:52 +00:00
kre
85730dc548 Remove what is now an unused variable. One less build issue... 2017-08-12 19:06:23 +00:00
maxv
98d232f3f3 Remove references to PSL_VM (implicitly vm86). 2017-08-12 13:16:14 +00:00
maxv
4db48c5855 Remove the vm86 fields from the trap frame. It seems to me that we could
now remove the '-16' when initializing pcb_esp0.
2017-08-12 13:11:23 +00:00
maxv
b017fd3cea Remove the vm86 fields from the pcb. 2017-08-12 12:48:47 +00:00
maxv
d70d1674fb Don't include opt_vm86.h. 2017-08-12 12:33:31 +00:00
jmcneill
645a775d92 For boards with bluetooth, use AUX UART for console and PLCOM for bt. 2017-08-12 11:44:26 +00:00
martin
db5d35351f Do not deref a NULL pointer if no current media has been selected.
This error condition does not happen with properly working hardware, but it is
no good reason for a kernel panic either.
2017-08-12 11:21:15 +00:00
mlelstv
d001a53273 tag arcmsr scsipi adapter and pci interrupt as MPSAFE. I/O is now done
without taking kernel lock.
2017-08-12 11:03:47 +00:00
joerg
610e531ea3 Add sparc/sparc64 support for irelative relocations. 2017-08-12 09:03:27 +00:00
maxv
1d3d2f0d7e Remove vm86.
Pass 4.
2017-08-12 07:35:08 +00:00
maxv
9e6f33ab7c Remove vm86.
Pass 3.
2017-08-12 07:21:57 +00:00
maxv
7a3268ffdb Remove vm86. Simplifies a number of critical places.
Pass 2.
2017-08-12 07:07:53 +00:00
maxv
99813fb172 Remove support for vm86 on i386. It is bug-friendly, and there is no point
in having kernel support for this: the instruction set of the CPU is small,
and it can easily be emulated in userland entirely. There are also several
assumptions in the code that are not respected, and the slightest confusion
in the trap frame can lead to ring0 exploits.

vm86 has received zero maintenance. As far as I can tell, it was added
20 years ago in order to make doscmd work. But doscmd has not been
maintained either, and was removed from pkgsrc in 2011. dosbox can be used
instead: it does not require kernel support, and will produce better
results than our flimsy implementation.

Pass 1. (many pieces still in the tree)
2017-08-12 06:46:13 +00:00
macallan
0c7c75bc0c set display output parameters according to properties
Now VGA output works as intended on my Mini 2. DVI is still garbled ( but
visible ) and Mini 1 is untested.
2017-08-11 22:59:05 +00:00
macallan
80a0b9eb24 set properties to signal Mac Mini video output wiring to radeonfb 2017-08-11 22:55:49 +00:00
macallan
f2c7556229 add wsfont now that it's actually usable on at least some drivers 2017-08-11 21:03:23 +00:00
jmcneill
82e84007f0 Defer sdmmc discard operations to the sdmmc task queue. Fixes a panic
introduced by ld.c r1.102.
2017-08-11 18:41:42 +00:00
maxv
2e5cfb022c Don't build the ibcs2 module on i386. 2017-08-11 12:58:14 +00:00
isaki
ac90edd392 Fix a Continue Operation.
Patch from Y.Sugahara.
2017-08-11 07:30:01 +00:00