Commit Graph

262139 Commits

Author SHA1 Message Date
rin 8cfe831ad7 - pci_intr_setattr() is in pci_intr(9)
- pci_intr_type() is in pci_msi(9)
2018-09-20 07:08:00 +00:00
rin cad9018e14 Link pci_intr_*(9) to pci_intr(9), except for those described in pci_msi(9). 2018-09-20 06:54:36 +00:00
rin 91dfd30087 pci_intr_type() is described in pci_msi(9). 2018-09-20 06:48:53 +00:00
kre 3d4a88b591 Remove #if 0'd code that somehow got mangled in the (somewhat messy)
commit process and ended up being a syntax error...
2018-09-20 06:06:06 +00:00
cherry d0405bb11f When we removed the XEN special case from isa/isa_machdep.c
there was a corner case that was missed in
x86/intr.c:intr_establish_xname()

In isa_machdep.c:isa_intr_establish_xname() the legacy_irq parameter
is never set to -1. It is also incorrect to call
isa_intr_establish_xname() with a legacy_irq parameter of -1.

Thus we infer that whenever we see (legacy_irq == -1) in
intr_establish_xname() which is downstream, we were *NOT* called from
isa_machdep.c:isa_intr_establish_xname()

Given that there are no other users of intr_establish_xnam() which
pass a valid legacy_irq != -1, we assume therefore that we *WERE*
called from isa_machdep.c:isa_intr_establish_xname() in this case.

This is an important distinction in the case where a valid
legacy_irq > NUM_LEGACY_IRQS was passed down from
isa_intr_establish_xname() but was ignored by xen_pirq_alloc() and
overwritten with the "pseudo" irq which is then passed back. We thus
pass the incorrect "legacy" irq value to pirq_establish().

Even though non ISA (ie; PCI and MSI(X) cases), this is the correct
behaviour, we need to maintain (bug?) compatibility with the isa
case.

Thus the one liner diff.

CVS: ----------------------------------------------------------------------
CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to PR 123
CVS:
CVS: Please evaluate your changes and consider the following.
CVS: Abort checkin if you answer no.
CVS: => For all changes:
CVS: Do the changed files compile?
CVS: Has the change been tested?
CVS: => If you are not completely familiar with the changed components:
CVS: Has the change been posted for review?
CVS: Have you allowed enough time for feedback?
CVS: => If the change is major:
CVS: => If the change adds files to, or removes files from $DESTDIR:
CVS: => If you are changing a library or kernel interface:
CVS: Have you successfully run "./build.sh release"?
2018-09-20 05:08:45 +00:00
macallan 6135589eeb don't build kernel grovelling tools as n64 on sgimips - we don't actually have
n64 kernels there. Yet.
2018-09-20 02:51:21 +00:00
wiz 604e240dd5 Remove a comma and some trailing whitespace. 2018-09-20 01:11:19 +00:00
rin b9dbff4e1b Remove unused KBD_NULLMAP entries copy-paste from sys/dev/pckbport. 2018-09-19 23:28:58 +00:00
rin a6566306c7 Remove invalid option copy-paste from hpcmips. 2018-09-19 23:22:17 +00:00
christos 9f61665baf changes from kre@
- pass intmax to fmtydhmsf instead of time_t to avoid extra conversions.
- make -TTT mean "always keep 3 decimal digits of duration precision" (ie:
  always print ms)  (including trailing 0's, even .000 if it happens)
- make -T (all forms) be subject to the locale (obey the radix character)
- don't print ymd, since that would require calendar calculations to get
  right.
2018-09-19 23:02:14 +00:00
kre 2f9f119b68 Allow a third use of -T to force .NNN (always three digits) in -TT
(ISO8601 durations) format for timestamps - that is,not dropping trailing 0's.
2018-09-19 22:58:03 +00:00
kre 0d9f7721aa In -TT mode (ISO8601 duration timestamps) print milliseconds as
decimal fractions of a second (as they should be) rather than integer
milliseconds (ie nnn.1means nnn seconds and 1/10 of a second, not
nnn seconds, and 1 millisecond).   While here convert some inappropriate
time_t usage to intmax_t which works better (int, or long, would probably
work just as well).
2018-09-19 22:55:12 +00:00
ginsbach 4a25b40a6e Add AMDD, ASF, MSC, RMCP, SAML, STOMP, and YAML
Hyphenate TDD description (grammar)
2018-09-19 18:53:25 +00:00
ginsbach 1a57b81d0a Add BDFL and SJW 2018-09-19 18:50:39 +00:00
aymeric c8bd03e738 Add support for the DE0 NanoSoC board.
It's Cyclone V based and thus includes a dual-core Cortex A9 @925MHz.
Most standard peripherals are supported (USB, SDCard, Ethernet) and
no unusual peripheral is supported yet (FPGA, GPIO, ...)
2018-09-19 17:31:38 +00:00
maxv a6a95377dc i386 xen is pae 2018-09-19 16:23:05 +00:00
maxv dfbe69edb9 Don't build the module sets for non-pae-32bit-pv. Noted by John D. Baker
on port-i386@, thanks.
2018-09-19 16:11:53 +00:00
maxv 657923ce43 Switch back to tabs, it was nicer this way. 2018-09-19 15:36:12 +00:00
maxv a51b00c421 Don't display l_wchan, either there is something in l_wmesg and we display
it, or there's nothing and we print "-".
2018-09-19 15:20:39 +00:00
maxv 9d7954dab6 Remove daic(4), it has never been functional.
ok martin@
2018-09-19 13:58:26 +00:00
rin 336ead2267 Fix in_undefer_cksum() and in6_undefer_cksum().
The 4th argument for in[46]_cksum() should be length of L4 header +
L4 payload. The previous revisions are wrong

- for IPv4 when hdrlen != 0
- for IPv6 always

These functions are used only in net/if_loop.c and
arch/powerpc/booke/dev/pq3etsec.c under some special circumferences.
This should be why the bugs have not been found until today.

OK maxv
2018-09-19 07:54:11 +00:00
msaitoh 8553f24d94 Micro optimization. m_copym(M_COPYALL) -> m_copypacket(). 2018-09-19 07:51:23 +00:00
rin 1ab0e422ba This file was only for setting COMPAT_AS appropriately, which is
automatically done in sys/compat/common/Makefile.inc since r1.24:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/common/Makefile.inc#rev1.24
2018-09-19 07:26:54 +00:00
christos a1d2abcab8 add -TT printing ISO 8601 duration 2018-09-19 00:15:05 +00:00
rin 1e421f65db PR lib/53615
Before invoking a previous signal handler, make sure it is not SIG_*.
Fix potential crash with SIGWINCH.

OK roy
2018-09-18 22:51:00 +00:00
rin 88ccf2cadc PR lib/53615
getch() and get_wch() should return KEY_RESIZE when interrupted by SIGWINCH.

OK roy
2018-09-18 22:46:18 +00:00
christos b2d60dd6a2 fix ymdhms calculation 2018-09-18 22:12:19 +00:00
jdolecek caac3a6421 fix ata_xfer leak on drive probe 2018-09-18 21:28:22 +00:00
jmcneill b40f700548 utf8_to_ucs2 second param (nmp) needs to be initialized before calling this function 2018-09-18 19:19:45 +00:00
uwe f2a23f2810 Clarify the comment in the "unconst" version of hpckbd_keymap_setup.
Both sh3 (P1) and mips (kseg0) have the kernel directly mapped.
2018-09-18 14:57:32 +00:00
skrll d9e133d0e7 Update firmware to
commit 1bd0e85c3ce7f6946f5cd4e18e7b45d50767412f
Author: popcornmix <popcornmix@gmail.com>
Date:   Mon Sep 17 14:39:10 2018 +0100

Tested by Jun Ebihara as discussed on port-arm
2018-09-18 11:54:01 +00:00
msaitoh ad29c40915 - Fix bridge_enqueue() which was broken by last commit. Use correct mbuf
pointer.
- Modify comment.
2018-09-18 09:27:35 +00:00
uwe 4be5e413fc Fix comment formatting in previous. 2018-09-18 09:09:26 +00:00
mrg 5fd899306d fix wsdisplay/wskbd and cngetc() return value issues:
- return -1 for error / no character
- allow 0 as a character

cngetc() itself considers any value >= 0 valid, and this matches
the usage in other drivers that return -1 for "not data", vs
polling until something arrives.

removes ^G from spewing out the askname/etc prompts when no key
has been pressed (these come from cngetsn(), ignoring unknown
non printable characters.)

from @skrll with help from @mlelstv.
2018-09-18 06:19:28 +00:00
mrg ce7cf81a7e remove usb(4)'s "flags 1" code. it has been dead for a while,
as it runs during the interrupts part of configuration now,
and all the devices try attach as early as possible, including
any root or boot required disk or keyboard device, which is
what this flag was for.
2018-09-18 05:37:54 +00:00
mrg bf4930390e deal with partial attach failures in usb_attach vs usb_detach aka PR 53598.
- make sure xhci's sc->sc_ios is NULL if failure happens.
- rearrange usb_attach() / usb_doattach() to make it simpler to clean up.
- move usb_async_intr softint into usb_once_init().  previously, each USB
  controller would start a new one, and leave the old one leaked.
- handle controller interrupts without a bus attached
2018-09-18 05:24:10 +00:00
rin 0a7ec1b328 Apply workaround introduced in r1.32 to hpcmips.
Fix kernel crash when console is attached. Now, my MC/R550 boots multiuser.

Thanks Masahiko Ito for encouraging me to do bisection to find this out.

XXX pullup-8, pullup-7
2018-09-18 02:58:10 +00:00
mrg 2375cb2fb0 implement a gross hack to fix "boot -a" on systems with usb keyboards on
systems with ehci handover to uhci (and maybe ohci), and fix a similar
problem for "boot -s".

there is effort to ensure that all devices attached via USB are probed
before RB_ASKNAME or RB_SINGLE attempts to ask any questions on the console,
and largely this works, often by chance, today, for USB disks and root.
i've recently pushed this more into uhub and general USB device attachment
as well, and kept a config_pending reference across the first explore of
a bus.  these fix many issues with directly attached hubs.

however, on systems where devices connected to ehci ports are handed over
to a companion uhci or ohci port, it may not be the first, or even second,
bus explore that finds the device finally before attachment, and at this
point all config_pending references are dropped.

there is no direct communication between drivers, the potentials are
looked up but their device_t is only used for generic things like the name,
so informing the correct companion to expect a device and deal with the
config_pending references is not possible without some fairly ugly layer
violations or multi-level callbacks (eg, we have "ehci0", and usually an
the relevant companion, eg, "uhci2", but it is the uhub that uhci2 has
attached that will deal with the device attachment.)

with the above fixes to generic USB code, the disown happens during the
first explore.  the hack works by, at this point, checking if (a) root
is not mounted, (b) single user or ask name are set, and (c) if the hack
as not been triggered already.  if all 3 conditions are true, then a
config_pending_incr() is called and a callback is triggered for (default)
5 seconds to call config_pending_decr().  ehci detach pauses waiting for
this callback if scheduled.

this allows enough time for the uhub and the ukbd/wskbd to attach before
the RK_ASKROOT prompts appear.  testing shows it takes between 1.5 and
2 seconds for the keyboard to appear after the disown occurs.


Index: dev/usb/ehcivar.c
- new sc_compcallout, sc_compcallout, sc_complock, and a state for th
  handover hack.

Index: dev/usb/ehci.c
ehci_init():
- use aprint_normal_dev() instead of manual device_xname().
- initialise sc_compcallout, sc_compcallout, sc_complock, and sc_comp_state.
ehci_detach():
- if there are companion controllers, tear own the above, including waiting
  if there is a callback scheduled.
ehci_disown_callback():
- new callout to call config_pending_decr() in the the future.
  schedule this ca
ehci_disown_sched_callback():
- if booting to single user or asking names, call config_pending_incr() and
  schedule the callout above, default 5 second delay.
ehci_disown():
- if disowning a port call ehci_disown_sched_callback().
2018-09-18 02:00:06 +00:00
mrg 275f5ff63e add config_pending usage to uhub and general USB device attachment.
- call config_pending_incr() and config_pending_decr() around attaching
  devices against "usbdevif" attribute.

uhub:
- convert sc_explorepending and sc_running to bool.  add new sc_first_explore.
- call config_pending_incr() at the start of uhub_attach().  dropped in
  uhub_explore(), if this is the first explore.
2018-09-18 01:36:44 +00:00
mrg b6a20812c8 - move export for devmon_insert_vec into sys/device.h.
- export root_is_mounted for future USB RB_ASKNAME hack.
- make some things in subr_autoconf.c static
- move device_printf() prototype out from the middle of two sets of
  aprint_*() prototypes.
2018-09-18 01:25:09 +00:00
aymeric 33f05017e8 Add support for the enhanced descriptors feature.
This makes "recent" dwc gmac controllers, as found e.g. on the Cyclone V, work.
The change was also tested working on an Allwinner A20 which doesn't have the
feature.

No negative reaction on port-arm.
2018-09-17 20:25:49 +00:00
tsutsui f575714ed0 Fix hangup after framebuffers are attached on 3MIN. PR port-pmax/53611
Ok'ed by mrg@.  Should be pulled up to netbsd-7 and netbsd-8.
2018-09-17 16:52:28 +00:00
maxv 89c1f53e69 Reduce the noise, reorder and rename some things for clarity. 2018-09-17 15:53:06 +00:00
tsutsui 53233017b7 Make sure to install a bootloader even on upgrade installation.
Fixes another part of port-sgimips/53583.
Should be pulled up (with rev 1.5) to netbsd-7 and netbsd-8.
2018-09-17 15:19:29 +00:00
mrg cbde71dbbb reorder some struct members to remove holes. 2018-09-17 08:27:41 +00:00
maxv c4e059e94a Kick fragments that would introduce several !MFFs in a reassembly chain.
The problem arises if we receive three fragments of the kind

	3.  A -> has MFF
	1.  B -> doesn't have MFF
	2.  C -> doesn't have MFF

Because of the received order B->C->A, we don't see that B is !MFF, and
therefore that there is a problem in this chain.

Now we do two checks, and drop us if:

 * there is a fragment preceding us, and this fragment is !MFF, or
 * there is a fragment following us, and we are !MFF

Spotted a long time ago.
2018-09-17 08:11:27 +00:00
maxv ee6ebbd77a Hold ip_off and ip_len in the fragment entry, instead of always reading
the associated mbuf (and converting to host order). This reduces the
cache/TLB misses when processing long lists.
2018-09-17 06:01:36 +00:00
kre a63b9e9c06 When this file is used when not building the kernel (eg: /usr/sbin/crash)
make cnpollc() go away.
2018-09-17 01:49:54 +00:00
ryo 7d099f1082 delete debug printf and KASSERT. 2018-09-17 00:15:55 +00:00
mrg 85526a327c don't print a blank line that ends up in logs and console output. 2018-09-16 23:20:18 +00:00