Commit Graph

36149 Commits

Author SHA1 Message Date
manu
4aff54bd8d Add PN533 based NFC devices 2018-11-08 02:01:28 +00:00
manu
0f4ba33390 Enfore USB timeout on ugen(4) write operations 2018-11-08 01:59:53 +00:00
jdolecek
8df70e6b71 don't touch the queue structure in ata_queue_active() if atabus is already
detached from the channel

fixes panic on null pointer derefence during shutdown reported privately
by Launey Thomas
2018-11-07 17:05:54 +00:00
maxv
f3a4baf748 Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

	/usr/include/dev/nvmm/nvmm.h
	/usr/include/dev/nvmm/nvmm_ioctl.h
	/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.
2018-11-07 07:43:07 +00:00
jmcneill
1d9b648755 Increase kthread priority to PRI_SOFTBIO. 2018-11-06 16:01:38 +00:00
blymn
abbf616b9b Add double finger scroll feature. If the detected width is between a
defined range then report y movement as z-axis.  Effectively emulating
a mouse scroll wheel.
2018-11-06 09:13:17 +00:00
blymn
335eb92c0e Fix clamping of deltas so it works for both positive and negative deltas. 2018-11-06 08:55:02 +00:00
mrg
f5f53dd6ab add support to detect the 3 vmware GPT partition types:
- VMKcore (dump partition)
- VMFS
- VMware reserved

this enables vmkcore partitions for netbsd swap or dump, as well
as naming all of them.
2018-11-06 04:04:33 +00:00
mlelstv
8e369ccc39 When refactoring interface drivers after netbsd-4, the SIOCINITIFADDR
ioctl was passed through ifioctl_common, because the case falls through
to the SIOCSIFFLAGS case. The common handler however doesn't implement
SIOCINITIFADDR, so an attempt to configure plip always failed with ENOTTY.
2018-11-05 18:37:18 +00:00
msaitoh
0ceebb2878 Decode PCI Enhanced Allocation. 2018-11-05 03:51:31 +00:00
christos
837ff2531a make this compile again (rv was uninitialized) 2018-11-03 21:39:10 +00:00
jdolecek
13a160451f fix ahci_detach() to count the ports propertly (same as attach), to avoid
triggerring panic when disks are plugged to non-adjacent ports - this should
fix panic reported by Masanobu SAITOH on current-users

also fix different miscounting of ports in ahci_setup_ports() and
ahci_reprobe_drives()
2018-11-02 21:27:30 +00:00
jmcneill
03660f55df Do not ignore non-zero segment numbers in MCFG if __HAVE_PCI_GET_SEGMENT
is defined.
2018-11-02 19:51:08 +00:00
jmcneill
99199cfc78 Add support for multiple PCI segments. 2018-11-02 15:01:18 +00:00
msaitoh
cf0d79d0d2 KNF a bit. No functional change. 2018-11-02 08:26:32 +00:00
msaitoh
b56422493e - Add missing wm_gate_hw_phy_config_ich8lan(false) in wm_phy_post_reset()
on PCH2. wm_gate_hw_phy_config_ich8lan(true) is called in wm_reset(), so
  wm_phy_post_reset(false) should be called after reset.
- On PCH2, set the phy config counter to 50msec after (PHY) reset.
2018-11-02 08:16:49 +00:00
msaitoh
95edfe2e12 After writing MDIC register, don't read quickly the same register but
do delay(50). Same as otehr OSes.
2018-11-02 08:09:21 +00:00
msaitoh
ecdc3acb8c Fix a PCH2 specific bug that wrong register value can be read when boot.
When a wrong value is read when boot, the read device ID was incorrect and
ukphy(3) is attached instead of ihphy(4). The bug might also result in
MDIC read/write error.

 How to reproduce:

  0) Boot Windows.
  1) Leave some minutes.
  2) Reboot to NetBSD.

 To fix this problem, adding extra 100us delay at the end of
wm_gmii_mdic_{read,write}reg() on PCH2. Same as FreeBSD and linux.

 Reported by David Brownlee a few days ago and also reported by jmcneill
a half year ago. Tested with my own Thinkpad X220.

XXX pullup-[78]
2018-11-02 08:04:42 +00:00
msaitoh
a247df1640 Add workaround for DMA hang problem which result in TX device timeout on
PCH_LPT with I218. Same as FreeBSD and Linux. This woraround is only for
device ID 0x155a, 0x15a2, 0x1559 and 0x15a3. I observed this problem on my
Shuttle DS57U's I218 port six times in two months.
2018-11-02 03:22:19 +00:00
jmcneill
453e6ce9bc Support for "opp-microvolt" with more than one cell 2018-11-01 14:47:36 +00:00
martin
11b42c22e2 Make this compilable with 32bit paddr_t. 2018-11-01 13:09:35 +00:00
jmcneill
469d7fa1bc Add MSI-X support. 2018-10-31 16:11:29 +00:00
msaitoh
c893fecee0 - 82574 and newer's document says the status field has neither EC
(Excessive Collision) bit nor LC (Late Collision) bit (reserved).
  Refer "PCIe GbE Controller Open Source Software Developer's Manual",
  82574 datasheet and newer.

  XXX I saw the LC bit was set on I218 even though the media was full duplex,
  so the bit might be used for other meaning ...(I have no document).
- Use macro.
2018-10-31 06:04:48 +00:00
mrg
693d228f2b use xhci_polling_p(). this might miss when bus2 is active.
XXX: pullup-7, pullup-8.
2018-10-28 21:36:34 +00:00
aymeric
e63eecd71b Deactivate the watchdog timer during attach.
Recent u-boot starts up the watchdog timer, and we don't detect this so
e.g. my DE0 nanosoc reboots after about 20 seconds. Applying a reset to
the watchdog circuit is the only way to stop it according to the
documentation.
2018-10-28 15:06:10 +00:00
maya
3b5e9d52bc Fix previous misnamed initializer elements
committed wrong version of patch, sorry!
2018-10-27 05:38:08 +00:00
maya
bf133c20d3 Add missing ata_recovery struct element, NULL, same as wdc_ata_bustype
in the NWD > 0 case.

Build fix for the case where wd(4) is not built, reported by
John D. Baker on current-users.
2018-10-27 05:35:41 +00:00
jmcneill
f2972b1beb Add xhci at acpi glue 2018-10-26 23:33:38 +00:00
jmcneill
caa67e97a7 Add ehci at acpi glue 2018-10-26 10:46:21 +00:00
jdolecek
37e568de88 enable MSI support where available 2018-10-25 21:07:58 +00:00
jdolecek
b8d8c6e801 release intr if pci_intr_establish_xname() fails 2018-10-25 21:03:19 +00:00
jmcneill
b7635a004e Add support for 64-bit memory resources. 2018-10-25 10:38:57 +00:00
jdolecek
e7384f9dfa ata_kill_active() needs to drop channel drop before calling kill_xfer() hook,
otherwise code tries to lock against itself when deactivating the xfer
2018-10-24 20:25:52 +00:00
jdolecek
80b0d5979e need now channel lock around siisata_device_reset() executed for fatal error 2018-10-24 20:07:37 +00:00
jdolecek
343ae19e93 remove TODO.ncq; the FIS note was added to atastart(), and the note
about dump to unopened wd(4) device was attached to PR kern/16789, and
nothing else remains
2018-10-24 20:03:07 +00:00
jdolecek
57a9a1405e add further note about FIS-based switching to atastart() 2018-10-24 20:01:13 +00:00
jdolecek
af070baeb7 move the comment (and expand) about NCQ TRIM to wd_trim() 2018-10-24 19:46:44 +00:00
jdolecek
654326fabc detach the controller itself on shutdown; adjust to not detach already
detached atabus/channel
2018-10-24 19:38:00 +00:00
martin
9f1d91abfc Remove no longer needed include of ata_dma.h 2018-10-24 09:41:24 +00:00
jdolecek
87466f562e only include umass_isdata.c if atabus present, and likewise ata_subr.c 2018-10-24 07:42:12 +00:00
jdolecek
f1ea457298 only include ata_recovery.c with atabus (same as ata.c which provides
ata_thread_run() used here)
2018-10-24 06:53:26 +00:00
jdolecek
34b039cb08 add support for DIOCCACHESYNC (!), and DIOCGCACHE; code adapted from ccd(4)
tested with Intel ATA Raid
2018-10-23 22:05:01 +00:00
jdolecek
ef2b5d4f55 remove the 'wd* at umass?' for the non-standardized and rare (extinct?)
In-System Design ATA protocol over Bulk-Only devices from most kernels,
leave only in i386/amd64 ALL; it's unmaintained and likely currently broken,
lack of test hardware makes it impossible to support
2018-10-23 19:58:52 +00:00
jmcneill
8b1ae988d4 Do not complain if the _AEI method is not found, just skip installing the
interrupt handler.
2018-10-23 09:19:02 +00:00
manu
d5d625a49b Make USB port iteration code consistent, always startint at port #1
This complements change in revision 1.140
2018-10-23 01:49:37 +00:00
jmcneill
efd4d136da Add driver for ACPI Generic Event Device 2018-10-22 22:36:19 +00:00
jmcneill
593acf4d91 Factor out common ACPI event code into a shared module. 2018-10-22 22:29:35 +00:00
jdolecek
596cd89431 first disestablish interrupt, then release 2018-10-22 21:40:45 +00:00
jdolecek
7b352738c6 remove the note for dump, moral equivalent is done and biodone() most
certainly should not be done
2018-10-22 21:25:23 +00:00
jdolecek
5140610b77 remove the wd* at umass? entry (comment moved to umass_isdata.c and manpage)
remove MSI for ahcisata(4), siisata(4) - these were done
2018-10-22 21:24:18 +00:00