Commit Graph

284034 Commits

Author SHA1 Message Date
rillig
9be4bfa647 make(1): add test for missing error handling in .for loop 2020-12-27 09:58:35 +00:00
rillig
eb9a329939 make(1): re-export variables from the actual make process
Since make uses vfork if available, re-exporting the variables happens
in the address space of the main process anyway, so there is no point in
mentioning anything about "our client process" anywhere.
2020-12-27 05:16:26 +00:00
rillig
0134a24c0d make(1): add test for expansion errors in jobs mode
Since compat mode and jobs mode are implemented separately and vary in
lots of small details, each of them needs to be tested on its own.
2020-12-27 05:11:40 +00:00
rillig
ea8c5a40a4 make(1): align names of VarExportMode with the directives 2020-12-27 05:06:17 +00:00
skrll
5db5105ca4 G/C 2020-12-26 22:28:35 +00:00
jym
a99a2d70c7 Add WayTech USB to Serial device to quirks routines, in order to prevent
uhid(4) from attaching and leave it to ugen(4) so libusb can query it.

It is used by some UPS peripherals for their management, especially the
ones from Infosec and Megatec.

Tested with Infosec E3 UPS through ups-nut-usb and `blazer_usb' driver
using the following configuration (ups.conf):

        [infosec]
                driver = blazer_usb
                port = auto
                vendorid = 0665
                productid = 5161

Make sure the associated /dev/ugenXXX is accessible to `nut' user if you
use ups-nut.
2020-12-26 22:15:37 +00:00
jym
a02c14d579 Regen. 2020-12-26 22:11:20 +00:00
jym
08c7f434ce Add WayTech Development USB to Serial product.
It is used by some UPS devices, notably Infosec and Megatec.

The vendor ID (0x0665) is known differently from various mainstream OSes;
but it is officially registered by USB-IF as `WayTech Development, Inc.'. So
be it.
2020-12-26 22:09:18 +00:00
jmcneill
174e6401e8 ahci_intr: use ffs in the port bitmask instead of looping over all 32 bits 2020-12-26 15:40:29 +00:00
gson
2e0ec785ec Disable the lib/libossaudio/t_ossaudio:oss_dsp_trigger_read test case
on sparc until PR port-sparc/55876 gets fixed.
2020-12-26 15:28:52 +00:00
nia
e5ad6630f8 Check the return value of device_lookup_private against NULL.
Reported-by: syzbot+06561ba90b6e618ce6d0@syzkaller.appspotmail.com
2020-12-26 14:50:50 +00:00
jmcneill
d90a6f1029 AHCI 1.3.1 specification says that it is good practice for system software
to 'zero-out' the memory allocated and referenced by PxCLB and PxFB.
2020-12-26 10:56:25 +00:00
nia
72eb3e2596 Avoid NULL pointer dereference, noticed by KUBSAN.
"Looks fine" roy@
2020-12-26 10:43:39 +00:00
tsutsui
ccc5c3a158 Ignore WSDISPLAYIO_PUTCMAP in WSDISPLAYIO_MODE_EMUL, i.e. text mode.
The hardware palette settings are handled by the STI ROM in STI_TEXTMODE
and changing cmap could cause mangled text colors at least on CRX on 425t.
Updating CMAP in EMUL mode isn't expected anyway.

Fixes "red or invisible text" after exiting mlterm-wscons on A1659 CRX.
2020-12-26 08:58:03 +00:00
msaitoh
e841c41c22 Copy & paste some missing part (flow director, ECC and temp sensor) from
ixgbe_msix_admin() to ixgbe_legacy_irq(). Now it's ready to make a new
function to share the common part. It'll be done in near future.
2020-12-26 06:27:38 +00:00
msaitoh
4e19a24239 Don't return in the middle of ixgbe_msix_admin() when an flow director reinit
failed. NetBSD currently doesn't support flow director, so this is not a real
bug.
2020-12-26 06:17:55 +00:00
msaitoh
83aea15efa Disable some interrupt in ixgbe_{legacy_irq,msix_admin}() to prevent log spam. 2020-12-26 06:10:17 +00:00
msaitoh
89171011d3 Disable/enable the OTHER interrupts correctly.
The OTHER interrupt was not blocked correctly when MSI-X is used.
    ixgbe.c rev. 1.260 added new mutex to avoid the race but it didn't
    disable the interrupt itself.

     Calling ixgbe_enable_intr() enables all interrupts, so it's not good to
    call it when some interrupt sources should not be enabled (e.g.:
    calling ixgbe_enable_intr() in ixgbe_handle_admin() enables queue
    interrupt).

     IXGBE_REQUEST_TASK_NEED_ACKINTR doesn't work as expected because
    ixgbe_handle_admin() can't know which task is enqueued from the
    interrupt context and can't re-enable a specific EIMS bit.

     Solve the above three problems by the following two changes:

      - MSI-X: Disable the OTHER interrupts in the biginning of
        ixgbe_msix_admin().

      - Set mask bits correctly at the end of ixgbe_legacy_irq() and
        ixgbe_msix_admin() using with eim_orig, eims_enable and eims_disable.

      - Remove IXGBE_REQUEST_TASK_NEED_ACKINTR and add
        IXGBE_REQUEST_TASK_{MOD,MSF}_WOI.
2020-12-26 06:07:16 +00:00
msaitoh
34817fabc0 Check EICR's queue bit instead of IFF_RUNNING. This change fixes a bug that
it might incorrectly enable interrupt when IFF_RUNNING is not set. It also
changes that the TX/RX is not processed if a queue interrupt isn't occurred.
2020-12-26 06:02:42 +00:00
msaitoh
b000a59fe1 Don't use "more" flag for simplify in ixgbe_legacy_irq().
No functional change intended.
2020-12-26 06:01:22 +00:00
sjg
a3aef1439d Use .MAKE.DEPENDFILE as makefiles set it 2020-12-26 03:54:48 +00:00
jmcneill
bcac45412d Always issue isb after cpacr_el1 writes since it is a context-changing
operation.
2020-12-26 00:55:26 +00:00
tsutsui
806e09ad47 Fix a longstanding bug in hilkbd (and dnkbd) console attachment.
cn_tab->cn_dev is initialized in wsdisplay_emul_attach()
(but not in wsdiaplay_cnattach()) so it cannot be used
when hil(4) is attached before wsdisplay(4) is attached.
Instead, use exported wsdisplay_cnputc() that is actually
set in early wsdisplay_cnattach().

Now we can use ddb and RB_ASKNAME via HIL keyboard console.
Should be pulleld up to netbsd-8 and netbsd-9.
2020-12-26 00:16:16 +00:00
tsutsui
a0efd42a57 Use C99 designated initializers for struct consdev. 2020-12-25 21:12:15 +00:00
tsutsui
35d011b3d1 Handle WSSCREEN_REVERSE properly. Based on OpenBSD's sti(4).
Also remove WSSCREEN_UNDERLINE from capabilities that is not handled
by sti(4) ROM routines.

Tested on HP9000/425t with CRX.
2020-12-25 20:41:24 +00:00
martin
5dd83105b3 Adjust to "pool" usage in our standard ntp.conf, pointed out
by Connor McLaughlan.
2020-12-25 13:42:02 +00:00
skrll
feae5f4f22 Use designated initializers for struct ata_bustype 2020-12-25 12:33:03 +00:00
nia
479d6bd7ae Avoid potentially accessing an array with an index out of range.
Reported-by: syzbot+8832f540234b996bc5a9@syzkaller.appspotmail.com
Reported-by: syzbot+0b785dd10d987350ecb3@syzkaller.appspotmail.com
2020-12-25 10:00:40 +00:00
mlelstv
1bc006b1c2 When reading from a block device, queue parallel block requests to
fill a buffer with breadn.
2020-12-25 09:28:56 +00:00
maya
70f2b24ae4 Update to 2021, hopefully less errors made in this year. 2020-12-25 09:02:41 +00:00
skrll
768fb9809e Trailing whitespace 2020-12-25 08:57:38 +00:00
skrll
c5d8f61215 Use designated initializers for struct ata_bustype 2020-12-25 08:55:40 +00:00
dholland
5a724c86b4 List calendar's known calendars explicitly, and only install those.
Prevents build failures caused by installing editor backups and other
such silliness.
2020-12-25 07:00:52 +00:00
msaitoh
bc0a983a5e Simplify setting of EIAC register. No functional change intended. 2020-12-24 22:36:43 +00:00
msaitoh
b756d0271c Fix a bug that INTx is disabled if the INTx line is shared with other device.
ixgbe.c rev. 1.264 was not correct.

     Restore EIMS before return. To read ECIR, clearing EIMC is required for
    an errata, so
        0) save the original EIMS value
        1) clear EIMS
	2) read EICR
	3) restore with the saved value.
2020-12-24 18:32:53 +00:00
msaitoh
701a48b283 The EICR register are cleared in the beginning of the ixgbe_legacy_irq(),
so it's not required to clear each bit later in the function.
2020-12-24 15:51:33 +00:00
msaitoh
1528ff5e8a The EICR register's all OTHER interrupt bits are cleared in the beginning of
the ixgbe_msix_admin(), so it's not required to clear each bit later in the
function.
2020-12-24 15:51:04 +00:00
jmcneill
260f8c16f9 trailing whitespace 2020-12-24 14:44:49 +00:00
nia
fe22bed11b Avoid negating the minimum size of pid_t (this overflows).
Reported-by: syzbot+e2eb02f9dfaf4f2e6626@syzkaller.appspotmail.com
2020-12-24 12:14:50 +00:00
msaitoh
5c87288a34 Reorder some code to reduce diff between ixgbe_legacy_irq() and
ixgbe_msix_admin. No functional change intended.
2020-12-24 10:37:47 +00:00
msaitoh
075e01eaf1 Add some debug printf()s and modify comments. 2020-12-24 10:00:36 +00:00
msaitoh
dddde3ab58 Remove strange ixgbe_enable_intr() in ixgbe_legacy_irq().
If the interface is UP and the INTx line is shared with other devices,
it result in enabling all interrupt sources even if some of them are
disabled for the workqueue. Delete ixgbe_enable_intr() in ixgbe_legacy_irq().
2020-12-24 06:14:41 +00:00
tsutsui
a52c876880 Add A1659A CRX framebuffer to "Supported hardware" list.
Also remove SGC support from "Unsupported hardware" list.
2020-12-23 17:57:17 +00:00
uwe
100c154117 G/c trailing whitespace. 2020-12-23 17:57:00 +00:00
thorpej
3524a0e97c Add direct-config support. 2020-12-23 17:10:37 +00:00
skrll
c4d8e5df1f Attachment pretty print 2020-12-23 16:52:06 +00:00
thorpej
42e9fa71dd Register each virtual bus's i2c_tag_t so that references for e.g. HDMI DDC
in the device tree work.
2020-12-23 16:04:42 +00:00
thorpej
21b71bc09d Change fdtbus_register_i2c_controller() to directly register the i2c_tag_t,
rather than the device and a set of functions (the only of which was to
return the i2c_tag_t anyway).  Previously, this assumed only a single
i2c controller node per device_t, which is not true with an i2c mux.
2020-12-23 16:02:11 +00:00
skrll
35c42191f5 Deduplicate and group the USB stuff. Spotted by uwe@ 2020-12-23 15:56:43 +00:00
skrll
8644267a50 Tidyup the i.MX SoC support by
- Moving the  FDTised code to sys/arch/arm/nxp to match the
  sys/arch/{cpu}/{vendor} convention
- FDTise some more drivers
	- Secure Non-Volatile Storage
	- watchdog driver
	- On chip OTP
- Match fsl,imx6dl
- Add some more drivers to GENERIC that will be supported by i.MX 6
  boards
2020-12-23 14:42:38 +00:00