Commit Graph

272163 Commits

Author SHA1 Message Date
bouyer
79dd41fe30 reading usbdi.c it looks like usbd_get_config_descriptor() can actually
return NULL, so check for this.
I got NULL pointer dereference here with a device showing:
[   303.732632] ugen0: autoconfiguration error: setting configuration index 0 failed
2019-12-11 11:54:23 +00:00
msaitoh
fa0800bb31 Add SFP support part 1. The code for SerDes and SGMII setting is not include
in this commit. SFP module removal interrupt detects but not used yet:
- Detect SFP's 1000BASE-SX, 1000BASE-LX, 100BASE-FX and 1000BASE-T correctly.
- Detect the Media Auto Sense feature. Not supported yet.
- Add comment.
2019-12-11 10:28:19 +00:00
yamaguchi
8aa27d8e35 Fix to detect link state down
Link status event that is used to update link status sometimes
is not notified when link down. So, use Get Link Status response
that has the same information with the event.
The handling of the event is needed to detect link state
up because the response sometimes does not notify link up.
2019-12-11 10:03:08 +00:00
msaitoh
2acce64ce9 - Set CTRL_ILOS(Invert loss of signal) bit correctly on 82580 port 1, 2, 3 and
newer chips. This change fixes a bug that some fiber, serdes or SFP devices
  don't detect the link status correctly.
  XXX We should check for other NVM reads if they have the same problem. One of
  the solution to avoid this type of bug is to check the register layout
  in wm_nvm_read().
- Use __BIT()
- Add comment
2019-12-11 09:48:16 +00:00
msaitoh
ceb566db8a - MSI-X doesn't use sc->sc_icr variable, so move the code into non-MSI-X part.
No functional change intended. OK'd by knakahara.
- Modify debug printfs a bit.
2019-12-11 09:27:46 +00:00
msaitoh
c8e8300232 No functional change:
- Add defintion of CONNSW register and PCS_NPTX (not used yet).
 - Add some bit definitions of PCS_LCTL.
 - Renae macro.
 - Fix comment. Add comment.
 - KNF.
2019-12-11 09:12:29 +00:00
msaitoh
f26476fafc s/enalbe/enable/ 2019-12-11 07:33:55 +00:00
yamaguchi
361ade933e Fix build error related to ixl(4) on i386 2019-12-11 05:50:03 +00:00
manu
7d48608bd9 Rollback kernel link scrpt change for multiboot
The multiboot section breaks BIOS boot. Rolling back the link script
removes the section, which breaks multiboot but should restore BIOS boot.
2019-12-11 02:31:44 +00:00
msaitoh
5182d54328 Add ukphy_subr flag to ipgphy to make kernel compilable with ipgphy and
without ukphy. Pointed out by Hauke.
2019-12-11 02:22:38 +00:00
yamaguchi
87698eae42 Not use _LP64 but sizeof(bus_addr_t) for getting size of address
It makes ixl(4) be able to work on ILP32

pointed out by thorpej@. thanks.
2019-12-11 01:51:22 +00:00
riastradh
d15066eca8 Oops -- forgot to kmem_free. 2019-12-10 22:30:34 +00:00
christos
5e9cbb1173 When 'attempted_completion_function' non-NULL, with a 'single_match'
match, the expected space is not being added. Problem observed with
"chronyc" and "sqlite3" tab completion. That functionality got
moved to escape_filename() for the !attempted_completion_function
case, but the non-NULL 'attempted_completion_function' case must
also be handled. (Lonnie Abelbeck)
2019-12-10 19:42:09 +00:00
ad
c470496698 Mask out always zero bits off pg->phys_addr. 2019-12-10 18:13:07 +00:00
ad
e6d2f4133f pg->phys_addr -> VM_PAGE_TO_PHYS(pg) 2019-12-10 18:08:32 +00:00
ad
a071a0d97c pg->phys_addr > VM_PAGE_TO_PHYS(pg) 2019-12-10 18:06:50 +00:00
ad
e4a04c43d7 pg->phys_addr -> VM_PAGE_TO_PHYS(pg) 2019-12-10 18:02:14 +00:00
ad
9acd0e1c2f p->phys_addr -> VM_PAGE_TO_PHYS(p) 2019-12-10 18:00:17 +00:00
kre
6815f01556 Balance the parentheses - hopefully unbreak the build. 2019-12-10 13:36:44 +00:00
yamaguchi
ab26da02e0 Added the manual for ixl(4) 2019-12-10 13:07:28 +00:00
nonaka
c9d5b0910f hvn(4) can be added and deleted dynamically. 2019-12-10 12:20:20 +00:00
yamaguchi
a5e8635231 Ported driver for Intel Ethernet 700 series
reviewed by msaitoh and knakahara
2019-12-10 12:08:52 +00:00
ad
7058786aea Inverted test. 2019-12-10 11:35:29 +00:00
nonaka
816b6ece7c hvn(4): Handle VMBUS_CHANPKT_TYPE_INBAND packet type. 2019-12-10 11:19:25 +00:00
ad
129ba28ca3 Fix build break. 2019-12-10 11:12:02 +00:00
kre
7af1d9b731 Correct a typo in a comment, 08x0 was meant to be 0x80 (duh!). NFC. 2019-12-10 09:18:37 +00:00
isaki
6e13a9a980 Fix typo. 2019-12-10 06:25:50 +00:00
manu
ab4342fd22 Add multiboot 2 support to amd64 kernel 2019-12-10 02:06:07 +00:00
manu
9d087602a9 In-RAID partitions with no name can be candidate for booting
The code to select boot partition in RAID assumed thet had a name,
which is true when there is a GPT inside the RAID, but not when there
is a disklabel inside the RAID. This caused a regression from behavior
of NetBSD 8.1.

We fix this by allowing nameless partition to be boot candidates.
This fixes misc/54748

While there, let raid device be used in the boot specification, like
raid0a:/netbsd.
2019-12-10 02:02:47 +00:00
ad
5fcb332dd2 Add mutex_owner_running(). 2019-12-09 21:08:56 +00:00
ad
76e423e55a - Add a mutex_owner_running() for the benefit of the pagedaemon, which
needs help with locking things in reverse order.
- Expunge the panicstr checks.
- Make MUTEX_NODEBUG work for adaptive mutexes too.
2019-12-09 21:05:23 +00:00
ad
359603aa58 Expunge the panicstr checks, we don't need them. 2019-12-09 21:02:10 +00:00
ad
9239dba04a Fix LOCKDEBUG panic on detach. 2019-12-09 21:00:48 +00:00
martin
2d2d93336c PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.
2019-12-09 19:16:53 +00:00
tsutsui
87f4dc45fb Fix incorrect argument order of cpu_intr(), slipped in rev 1.2.
Pointed out by maya@ in PR/45080.

Should be pulled up to netbsd-9.
2019-12-09 16:19:11 +00:00
tkusumi
cffbab3877 dm: Silence aprint_normal() in dm_target_linear_status()
dm_target_linear_status() shouldn't print this debug message by default
on dmsetup "table" ioctl/command.
2019-12-09 16:06:19 +00:00
tkusumi
3838da2c5a dm: Fix error handling in dmioctl()
Looks like cleanup_exit label is in a wrong place.
Should skip prop_dictionary_copyout_ioctl() on error.
2019-12-09 15:54:59 +00:00
jakllsch
16d7a284e8 build drm_panel.c w/ drmkms 2019-12-09 15:37:26 +00:00
jakllsch
153c41cc47 workaround netbsd incompatible LIST_HEAD
adapted from drm_bridge.c r1.3
2019-12-09 15:36:16 +00:00
tkusumi
943f37923f dm: Correct target name "stripe" -> "striped"
Sync with Linux kernel.
The file name is "stripe", but the target name is "striped".
DragonFlyBSD also follows this.
2019-12-09 15:30:42 +00:00
riastradh
c1ca5b3e18 Tidy up comments. 2019-12-09 14:56:44 +00:00
riastradh
36b5d590c2 Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.
2019-12-09 14:56:30 +00:00
riastradh
d8e5becfca Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.
2019-12-09 14:56:18 +00:00
riastradh
ecc02e79ad Factor out some of the self-test logic used for debugging.
Add missing bus_dmamap_sync(POSTWRITE) while here.
2019-12-09 14:56:06 +00:00
riastradh
05dd3bec20 Reduce some duplicated bus_dma clutter. 2019-12-09 14:55:52 +00:00
riastradh
38b328fc76 Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic.  I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.

(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)
2019-12-09 04:51:03 +00:00
riastradh
0bc8879de6 Add crypto engine block. 2019-12-09 04:40:50 +00:00
riastradh
c558d9a3e2 Convert pmap_pvt to atomic_load/store. 2019-12-09 04:39:58 +00:00
msaitoh
ce0d262598 Fix a bug that wm_sgmii_readreg_locked() may return error even if error isn't
occured.
2019-12-09 02:30:30 +00:00
sevan
59348bc454 We currently lack a tunable to control ZFS prefetch, so skip the warning and
FreeBSD specific instructions on settings.
2019-12-09 00:15:11 +00:00