Commit Graph

38619 Commits

Author SHA1 Message Date
thorpej
fd153186c8 Protect against multiple inclusion. 2020-03-10 00:24:08 +00:00
mlelstv
afc6579b5e Defer crypto operations to a workqueue and make it utilize all CPUs.
Make device mpsafe.
Some code cleanup.
2020-03-09 08:33:15 +00:00
thorpej
594d380f4b Add an assertion. 2020-03-09 01:55:16 +00:00
thorpej
0dde84e990 Now that we're allocating rx software state from a fixed pool, we
don't have to round-trip pointers in a sketchy way -- we can round-
trip indices.
2020-03-09 01:53:11 +00:00
thorpej
826d6861ed Allocate a static set of receive software state descriptors at attach
time, and create a simple allocator for them for use by the rx reclaim
handlers.  Don't create and destroy DMA maps for receoive buffers
in the interrupt handlers -- just use the maps that are created at
attach time.
2020-03-09 00:32:53 +00:00
thorpej
a67cfe799f Give each Tx DMA map 16 DMA segments rather than the previous absurdly large
number, and structure the loop in txp_start() similarly to other drivers
(e.g. ste_start() in the ste(4) driver).  Similar in spirit to OpenBSD's
rev 1.126, but implemented a bit differently.
2020-03-08 22:26:03 +00:00
thorpej
78067cc9b2 Upgrade to newer firmware needed by some txp(4) variants.
From FreeBSD via OpenBSD.
2020-03-08 20:49:31 +00:00
thorpej
855f9c3e90 Follow the example of the MII code and don't register the half-duplex
versions of each media type.
2020-03-08 19:24:40 +00:00
thorpej
8cafc2bfeb - Use BUS_ADDR_{LO,HI}32(), and rather than forcing the descriptor
DMA addresses into a 64-bit value (and thus using 64-bit shifts
  when unnecessary), just reference the address from the DMA map
  directly.
- Add some missing byte-swaps.
2020-03-08 19:02:03 +00:00
msaitoh
ac1928a385 Use unsigned to avoid undefined behavior. Found by kUBSan. 2020-03-08 14:10:24 +00:00
msaitoh
5cb3127813 Use unsigned to avoid undefined behavior. Found by kUBSan. 2020-03-08 14:09:32 +00:00
skrll
25c08ff653 Fix LOCKDEBUG by calling fdtbus_intr_init as part of cpu_startup_hook, i.e.
later.
2020-03-08 08:26:54 +00:00
skrll
3e913d35e8 Use MUTEX_DEFAULT to avoid confusion 2020-03-08 08:25:36 +00:00
msaitoh
0ee6ba85c2 Regen. 2020-03-08 06:44:26 +00:00
msaitoh
7cbfaf71e9 NVIDIA 0x036[0-7] are nForce MCP55 LPC Bridge. 2020-03-08 06:43:06 +00:00
thorpej
53586cad22 Use BUS_ADDR_{HI,LO}32(). 2020-03-08 03:16:20 +00:00
thorpej
a2dcbf132b Support 64-bit DMA addressing on the DP83820, used only when a 64-bit
DMA tag is available.
2020-03-08 02:44:12 +00:00
thorpej
8bfb256e3e If bus_dmatag_subregion(), actually fall back on the base 64-bit
DMA tag.
2020-03-07 07:33:39 +00:00
isaki
d0b5c44ab6 Fix/Update comments about allocm/freem. 2020-03-07 06:27:19 +00:00
isaki
a8be951e4d Split sc_lock and sc_exlock.
Most (probably all) malloc/free (or routines which may sleep) now can be
called without holding mutex.
Pointed out by riastradh@.
2020-03-07 06:25:57 +00:00
fcambus
421cd63174 Remove references to non-existing fonts.
Include files with font data (courier11x18.h and iso8x16.h) were removed
in 1999 due to licensing concerns.
2020-03-05 18:20:38 +00:00
msaitoh
19a53347af u_int*_t -> unit*_t. No funcitonal change. 2020-03-05 16:05:45 +00:00
msaitoh
05893f30c2 miscelaneous -> miscellaneous in comment. 2020-03-05 15:56:20 +00:00
msaitoh
5065cb1a52 Add support for Farallon PN9000SX from FreeBSD. 2020-03-05 15:45:48 +00:00
msaitoh
911c9a80a7 Regen. 2020-03-05 15:43:30 +00:00
msaitoh
10b64996d4 Add Farallon PN9000SX Ethernet. 2020-03-05 15:43:00 +00:00
msaitoh
5b119cf3f3 No functional change:
- Remove extra semicolon
 - Remove extra whitespace
2020-03-05 15:40:06 +00:00
msaitoh
510905526c No functional change:
- Fix typo in comment.
 - Whitespace
2020-03-05 15:36:39 +00:00
msaitoh
7551b0e05a s/Intialize/Initialize/ in comment. 2020-03-05 15:33:13 +00:00
riastradh
df1f0e7940 Revert "Include opt_diagnostic.h for DIAGNOSTIC."
This did not do what I thought it did.  opt_diagnostic.h is only for
the unused _DIAGNOSTIC, which seems like an abortive attempt to
incrementally convert DIAGNOSTIC to an opt_*.h option rather than a
command-line option.
2020-03-05 15:18:54 +00:00
skrll
862cc1df56 Use howmany. NFC. 2020-03-05 08:30:58 +00:00
skrll
0eb13efa06 Remove XXX comment. The sync is done one the last sitd after the loop. 2020-03-05 08:12:30 +00:00
riastradh
57c472be02 Include opt_diagnostic.h for DIAGNOSTIC.
...at least, in header files, which may not have already included
libkern.h.
2020-03-05 08:08:32 +00:00
skrll
92457c6135 Consistency in use of #define names. No functional change as values of
before and after defines are the same.
2020-03-04 16:17:23 +00:00
isaki
1cb852fd8e Restore backward compatibility with netbsd-7 audio.
For sticky parameters (encoding, precision, channels, sample_rate and pause):
 - AUDIO_SETINFO for nonexistent track updates sticky parameters.
 - AUDIO_GETINFO for nonexistent track reads sticky parameters.
For blocksize, hiwat, lowat and {play.record}.buffer_size:
 - AUDIO_SETINFO for nonexistent track does nothing.
 - AUDIO_GETINFO for nonexistent track returns dummy non-zero values.
Nonexistent track is a playback track on O_RDONLY descriptor for example,
or both tracks on /dev/audioctl.
2020-03-04 14:19:41 +00:00
christos
83f5a6a60a Add ioctls to get and set raw mode. 2020-03-04 01:23:08 +00:00
jdolecek
8863b29311 replace #if condition for irq_slot with __diagused on the cleanup path
fixes PR kern/55044 by Uwe Toenjes
2020-03-03 21:42:31 +00:00
msaitoh
e96a05bbda Don't clear CFI and priority bit to pass them to the upper layer. 2020-03-03 05:41:36 +00:00
yamaguchi
1771f42935 Send packets even if link state is not up
ixl(4) has not the limitation that it must not send packet when
link is down. And most of the other NIC drivers do not refer to it
when sending packets.

reviewed by knakahara@n.o, thanks.
2020-03-03 04:55:46 +00:00
yamaguchi
d3fca170d0 Use ixl_atq_exec for waiting the Get link status response of ixl(4)
not to send the same command at once

reviewed by knakahara@n.o., thanks.
2020-03-03 04:34:45 +00:00
yamaguchi
a47437dcfc Added KASSERT 2020-03-03 04:22:45 +00:00
yamaguchi
7b7712bc5f Fix the crash when ixl(4) sends Get link status command
and receives Get link status response in parallel

sc->sc_link_state_atq.iatq_fn is used in ixl_atq_done_locked()
with sc->sc_atq_lock, but it was cleared in ixl_get_link_status()
without the lock.
2020-03-03 04:19:20 +00:00
nisimura
9750246e9b minor knits in mcast handling. 2020-03-02 19:16:02 +00:00
christos
141531ce86 Add fido constants, and turn hid "raw" mode for fido devices. 2020-03-02 18:15:28 +00:00
riastradh
ffcf681ee3 New ioctl DIOCGSECTORALIGN returns sector alignment parameters.
struct disk_sectoralign {
	/* First aligned sector number.  */
	uint32_t dsa_firstaligned;

	/* Number of sectors per aligned unit.  */
	uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
     sector is misaligned.

Missing:

- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.

- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!

- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.
2020-03-02 16:01:56 +00:00
thorpej
8c87d22cb1 Duh, acctually use all 64-bits when giving the rings to the chip. 2020-03-02 15:13:23 +00:00
msaitoh
df8278196c KNF. No functional change. 2020-03-02 06:38:06 +00:00
thorpej
0cc8d02709 Add explicit casts in bus_dmatag_subregion() calls to avoid overflow /
truncation warnings on 32-bit platforms.
2020-03-01 16:31:01 +00:00
thorpej
0fc78620c5 Use the 64-bit PCI DMA tag if available. 2020-03-01 15:54:18 +00:00
thorpej
6306f3a301 Harmonize bus_dmatag_subregion() handling with other drivers. 2020-03-01 15:46:32 +00:00