Commit Graph

286289 Commits

Author SHA1 Message Date
mlelstv 089deafcbb Compute CRC for all segments of a multi-buffer packet.
Add interrupt mitigation for transmit and receive.
Use separate transmit lock.
Fix some error paths.
2021-03-08 13:14:44 +00:00
msaitoh e1035e4cdb Use no_jmbuf evcnt for the failure case of ixgbe_getjcl(). 2021-03-08 07:10:45 +00:00
mlelstv 658992b280 Add bluetooth also to 32bit kernel. 2021-03-08 06:31:42 +00:00
mlelstv 3f227289ed early console for pico-pi-imx7 2021-03-08 06:27:06 +00:00
mlelstv 222bc718db always re-read status register in the loop. 2021-03-08 06:23:31 +00:00
rillig 73071b8322 indent: fix handling of '//' end-of-line comments 2021-03-07 22:11:01 +00:00
christos b7a595bc61 fix missing chars 2021-03-07 20:54:41 +00:00
rillig b65a14572e indent: sprinkle a few const
No functional change.
2021-03-07 20:52:11 +00:00
rillig ec2de7a28a indent: remove redundant parentheses around return value
No functional change.
2021-03-07 20:47:13 +00:00
rillig 17efe8f8c3 lint: move keyword 'continue' over to the other control flow keywords
No functional change since neither rw_jump nor rw_inline_or_restrict is
mentioned in any switch statement, and lint didn't find any other
suspicious enum operations.
2021-03-07 20:40:18 +00:00
rillig a3d348a576 indent: use named constants for the different types of keywords
This reduces the magic numbers in the code.  Most of these had their
designated constant name written in a nearby comment anyway.

The one instance where arithmetic was performed on this new enum type
(in indent.c) was a bit tricky to understand.

The combination rw_continue_or_inline_or_restrict looks strange, the
'continue' should intuitively belong to the other control flow keywords
in rw_break_or_goto_or_return.

No functional change.
2021-03-07 20:30:48 +00:00
rillig 36dd5d7651 lint: do not allow assignment-expression for constant-expression
It's a funny idea to do something like 'case a = 13:', but since any
compiler will reject this code, there is no point in lint supporting it.

No functional change since everywhere the grammar allows a constant
expression, there is no ambiguity where an assignment could be
interpreted differently.
2021-03-07 20:06:48 +00:00
rillig 53af70edc9 lint: rename grammar rule 'constant'
C99 6.4.4 already defines a grammar rule named 'constant' for an number
literal or an enum constant, so don't use that name for something else.

No functional change.
2021-03-07 19:57:46 +00:00
rillig 4c83646ad2 lint: align names of C grammar rules with C99
No functional change.
2021-03-07 19:46:18 +00:00
rillig 7bd1775519 lint: in strict C mode, warn about initialization with '[a ... b]'
https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html
2021-03-07 19:42:54 +00:00
rillig 8c49e96e03 lint: fix off-by-one error in 'case 3...5'
According to the GCC documentation[1], the high end of the range is
inclusive as well, which makes sense since otherwise there would be no
way of specifying a range that includes the maximum representable
number.

Since the range is not used at all in the code, none of the tests could
possibly fail.

[1] https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html

No functional change.
2021-03-07 18:02:45 +00:00
rillig 26903e6b19 lint: inline 'case 3...5' in grammar
There was no point in having a separate grammar rule for the '3...' part
of a range expression, it just made the code more complicated than
necessary.

No functional change.
2021-03-07 17:57:52 +00:00
rillig f4d1bba78c lint: in the name of an array type, list the dimension first
before: array of unsigned int[4]
now:    array[4] of unsigned int

Listing the array dimension first keeps it in contact with the keyword
'array'.  This reduces confusion, especially for nested arrays.
2021-03-07 17:12:41 +00:00
rillig 05f8f43dfd tests/lint: demonstrate wrong warning for array subscript
Seen in usr.bin/indent/lexi.c.
2021-03-07 16:40:20 +00:00
nia 18c61bbc00 G12 2021-03-07 16:25:06 +00:00
christos ee3785118f add TRAP_SIGDEBUG support to mips. 2021-03-07 15:10:05 +00:00
christos d54a6e0c5d Add blocklist support to libwrap which enables all programs using libwrap
to block access from hosts we deny. (libwrap support from Greg A. Woods)
2021-03-07 15:09:12 +00:00
christos ee87d87fd0 Amend missed messages:
netinet6: Pick IPv6 fragment ids uniformly at random.

Expected number of packets before collision is ~2^16, about the same
as we get for IPv4 with alternating disjoint random cycles.  Keep it
simple unless we determine we really need something much better for
IPv6 than what IPv4 can achieve anyway.

netinet6: Rip out now-unused IPv6 fragment id logic.

(from riastradh)
2021-03-07 15:03:32 +00:00
christos 4b58b6c56b netinet/netinet6: Add necessary includes to make these standalone.
(from riastradh)
2021-03-07 15:01:00 +00:00
christos 4b9f0c0a91 netinet6: Mark randomid unused.
Will make merging and bisection easier if anything goes wrong with
flow label or fragment id randomization changes.

(from riastradh)
2021-03-07 14:59:36 +00:00
christos e4aa255bad netinet: Enable RFC 1948 pseudorandom TCP ISS selection by default.
(from riastradh)
2021-03-07 14:58:54 +00:00
christos 5d948faaec netinet: Enable random IP fragment ids by default (from riastradh) 2021-03-07 14:58:27 +00:00
jkoshy 6357c36138 Sync with Elftoolchain [r3916]: update the list of known EM_* values. 2021-03-07 14:53:59 +00:00
rin 9c89647e09 For LP64, remove members of struct cpu_info that exist just for
compatible with booke or ibm4xx. Even if MODULAR || _MODULE,
these members are useless for powerpc64.
2021-03-07 14:42:53 +00:00
rin a4acd1f73c For _LP64, disable members of struct mdproc just for compatible with
booke and ibm4xx, even if MODULAR or _MODULE is defined.

Fix build failure for evbppc64 due to CTASSERT in COND_SET_STRUCT,
which restricts sizeof(struct mdproc) < 31 for unknown reason...
2021-03-07 14:31:53 +00:00
skrll 7abdb11983 Remove an '#ifndef hp300' and make STI_{EN,DIS}ABLE_ROM simply check the
sc_{en,disable}_rom methdos provide by the bus attachment glue.
2021-03-07 14:31:20 +00:00
nat b4f84d307a Intoduce "-n" switch.
Running btat2dpd with "-n" especially for use with pad(4) will stop bta2dpd
from exiting upon a read error from pad(4) devices.

This is to compenstate for the behaviour in NetBSD current that pad(4) will
no longer output 0's when its corresponding audio(4) device is not active.

I believe that this new pad(4) behaviour is not present in -9 and -8.

While here I've improved its function as a daemon and it should reconnect to
bluetooth speakers when they are disconnected/reconnected.

Reported and tested by reinoud@ and maya@
2021-03-07 13:09:43 +00:00
mlelstv 0f81aa3085 Stop advertising more openings after limit is reached. 2021-03-07 12:30:03 +00:00
rillig 317f4968ee indent: in debug mode, output detailed token information
The main ingredient for understanding how indent works is the tokenizer
and the 4 buffers in which the text is collected.

Inspecting this debug log for the test comment-line-end makes it obvious
why indent messes up code that contains '//' comments.  The cause is
that indent interprets '//' as an operator, just like '&&' or '||'.  The
sequence '/////' is interpreted as a single operator as well, by the
way.

Since '//' is interpreted as an ordinary operator, any words following
it are plain identifiers, usually several of them in a row, which is a
syntax error.  Depending on the context, the operator '//' is either a
unary operator (no space around) or a binary operator (space around).
This explains why the word 'line-end' is expanded to 'line - end'.

No functional change outside of debug mode.
2021-03-07 11:32:05 +00:00
rillig bf0defb337 indent: for the token types, use enum instead of #define
This makes it easier to step through the code in a debugger.

No functional change.
2021-03-07 10:56:18 +00:00
rillig 3658a7adc6 indent: use all headers in all files
This is a prerequisite for converting the token types to an enum instead
of a preprocessor define, since the return type of lexi will become
token_type.  Having the enum will make debugging easier.

There was a single naming collision, which forced the variable in
scan_profile to be renamed.  All other token names are used nowhere
else.

No change to the resulting binary.
2021-03-07 10:42:48 +00:00
rin e31cf72b5a Build Xorg server for evbppc with minimum wsfb(4) support for Explora. 2021-03-07 10:42:26 +00:00
rin bb6831e6be Add initial support for Xorg server for wsfb(4):
- Fix WSDISPLAYIO_GTYPE ioctl.

- Support WSDISPLAYIO_LINEBYTES, _{GET,PUT}CMAP, and _SMODE ioctl.

As well as tiny improvements related to it:

- Use actual size of framebuffer for bus_space_mmap(9), as well as upper
  bound for mmap(2).

- Use base address obtained from autoconf(9) layer for mmap(2), instead of
  hard-coded one.

- Use rasops_cmap as default color map, instead of our own ANSI color map.

- Show monitor resolution and color depth instead of size as tty.

I've confirmed that mlterm-fb from pkgsrc/x11/mlterm also works fine.
2021-03-07 10:33:07 +00:00
rillig 66c859742f tests/indent: add tests for the remaining command line options 2021-03-07 10:12:18 +00:00
skrll 6db047e95d Use bus_space_mmap in sti_mmap. This makes X on sti for my B160L nearly
work (the colour map is somewhat wrong), but at least the machine doesn't
wedge.
2021-03-07 10:02:33 +00:00
skrll 5620f23cf3 Provide a bus_space_mmap that always fails. Nothing uses it yet, but it
will be very soon.

OK tsutsui@
2021-03-07 10:01:08 +00:00
rin 27efb13426 Misc cleanup for clarity. No functional changes.
- Group function declarations, and reorder function bodies accordingly.
- Misc KNF.
2021-03-07 10:01:03 +00:00
rin 4f3f7d1954 No need to clear framebuffer here; rasops(4) takes care of it. 2021-03-07 09:48:33 +00:00
rin ebd20e00aa Reduce ifdef. No functional changes. 2021-03-07 09:47:00 +00:00
rin 94ebc17bb2 Revert this commit:
http://www.nerv.org/netbsd/?q=id:20210305T064016Z.410b0e33273c3a62110d09e8bb27939f6a8bab38

> Map framebuffer to virtual space when fb(4) is present,
> even if it is not console.

Direct mapping for framebuffer is required only if fb(4) is console.

XXX
It would be nice if we can remove reserved TLB entries after
fb(4) is properly attached.
2021-03-07 09:43:56 +00:00
rillig 39a9a45a21 tests/indent: allow for comments in either the input or output files 2021-03-07 08:57:38 +00:00
nia 0425cc10a5 BER 2021-03-07 08:48:36 +00:00
skrll baa71a1609 <tab> consistency 2021-03-07 08:16:58 +00:00
rin d4ac66a3c1 Build modules for PPC_OEA64 on evbppc64. 2021-03-07 07:37:35 +00:00
rin 6a710fbbfe whitespace --> tab. No functional changes. 2021-03-07 07:30:15 +00:00