- wait up to 1s for SStatus_DET_DEV after SControl_DET_INIT toggle (from
FreeBSD)
- reset the drive once we know it's there. It may be in some PM state and
not able to properly reply to IDENTIFY. Tested by Teemu Rinta-aho,
fixes PR kern/35049 and should also fix PR kern/35008.
I'm not sure what it exactly means, but at least, the packet in question
is reloaded in ex_txstat() and should not handle the Dn Complete event
at the moment --- it should be served on later interrupt.
- Reload packet on collision, too.
more flexible
- account a number of free txq and use it to see if packets are queued or sent
- assume free TX descriptors are not owned by the chip in re_start() and
panic if there is any inconsistency on them #ifdef DIAGNOSTIC case.
- replace a magic number (reserved TX descs?) with macro
- check status bits at once (I'm not sure how gcc optimized them though)
- no need to check (ifp->if_flags & IFF_UP) twice
(re_init() must be called at splnet() anyway)
- call re_start() only if the interrupt is actually handled here
- call re_start() directly rather than via (*ifp->if_start)()
from RTK_ or rtk_ to RE_ or re_ for maintainability of these sources.
Eventually we should split these files (and struct rtk_softc) into
three elements, rtk(4) specific one, re(4) specific one, and a common
(register definitions, eeprom and multicast functions etc) part.
While here, add a couple of comments around weird definitions.
like Tx underrun.
This should improve performance on such errors.
Handle fifo threshold properly --- actually it did not handled at all.
Note that the Tx Complete interrupts occur only on errors, and ex_txstat()
is not good place to increment sc->tx_succ_ok. Increase the sc->tx_succ_ok
count from 100 to 256, since the ex(4) does busmastering and underruns
should rarely happen in normal operations.
Possibly improve some situation for the hang-on-heavy-load problems,
such as kern/11450 and kern/27096.
it could be lost if bus_dmamap_load_mbuf(9) returns EFBIG.
(though I've never seen the "too mamy segments" message
which indicates the packet has more than 32 fragments)
- move some driver specific definitions from rtl81x9reg.h to rtl81x9var.h
- move several macro where related structures are declared
- remove unused macro
- fix some comments
- unwrap some lines
This should make 3c575CT work and fix following PRs:
kern/12965: 3com 575CT does not work
port-i386/16295: Problems in pci routing table and ex0 (3c575c-tx) networking
at an odd address (0xd9) and noted "8 bit" in rtl81x9reg.h.
XXX: FreeBSD and OpenBSD also use CSR_WRITE_1() to write RTK_GTXSTART
XXX: for 8169 even though there is a "16 bits" comment at GTXSTART macro.
XXX: Which is correct?
I can't think of a good way to avoid race condition between writeback and
DMA write against descriptors if cachelinesize > sizeof(struct rtk_desc)...
Anyway, now re(4) is functional on O2 (and probably other mips ports).
- make DMA descripter members volatile
Now re(4) works on sgimips O2.
XXX: Still re(4) sometimes stalls on NFS load on sgimips,
XXX: but I'm not sure it's sgimips specific or not.
"#if defined(__i386__) || defined(__x86_64__)".
XXX: What will happen if RTL8168B is used on !__NO_STRICT_ALIGNMENT hosts?
XXX: If 8168B can't handle RX DMA into 32bit-unaligned memory, should we
XXX: implement some code to copy RX buffers like vge(4)?
XXX: Or is 8168B available only for on-board NIC for PCs?
- make intersil7170_softc more generic and allocate it during autoconf(9)
rather than MALLOC(9) in attachment
- put todr_chip_handle_t, year0 value, and the century adjustment flag
into the intersil7170_softc
- change the attachment function to just take the softc like mk48txx(4)
- split sys/dev/ic/intersil7170.h into intersil7170reg.h and intersil7170var.h
- cleanup some macro
Untested on real sun4 machines, but no objection on port-sparc
(and port-sun3) in three days.
driver uses the board's DMA system, uses the machine-independent WD33C93
driver, works on NetBSD/acorn26, and doesn't share a name with six other
machine-dependent SCSI drivers. Not tested on acorn32, but it seems to
work tolerably well on my A540.
> When reading PHY regs over the i2c bus, the turnaround ACK bit
> is read one clock edge too late. This bit is driven low by
> slave (as any other input data bits from slave) when the clock
> is LOW. The current code did read the bit after the clock was
> driven high again.
and sync negotiation in particular. Tested on sgimips (thanks to
Manuel Bouyer) and acorn26 (with my still-unfinished driver for the Acorn
SCSI Expansion Card).
The PIOBM is used by only one driver (will be added later,
stay tuned) and intruduce an attribute "ata_piobm" so that
it will be conditionally compiled in.
The "ata_dma" (busmastering transfer using ATA DMA mode) and
"ata_udma" (busmastering transfer using ATA Ultra DMA mode)
attributes are also added for consistency, but unused for now.
macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from
lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN
and SHIFTOUT, and add a manual page for the bit-twiddling macros,
bits(3).
Make the __BIT and __BITS macros "widthless," as best I can, by
changing their type to uintmax_t from uint32_t. XXX The manual
page lags this change by a bit.
Define __PRIxBIT and __PRIxBITS printf(3) format strings.
dev/ic/wd33c93.c. This may not be the best WD33C93 driver we've
got, but it's the most recently worked on and probably the most
portable, so it seems like a good basis for further work (and in
particular an acorn26 driver for the Acorn SCSI card). There's
no functional change in this commit, and sgimips kernels still
compile.
Place the securelevel checks in their logical locations.
This will be clearer in the future when code changes to use kauth(9) calls.
input and okay ad@
it had claimed while acting as the initial console device. This allows
(for example) vga to be the initial console, and an accelerated
framebuffer driver to take over later.
If a codec supports for AC'97 S/PDIF, it will have an mixer "spdif.enable."
However, we can't change the value of the mixer without AC'97 host
driver's support.
in the bus layer and remove from common ath_attach().
Having it in both layers (on some bus architectures)
was causing a double call to ath_stop() on shutdown
which in turn was tickling the bus lockup described
therin on slower machines.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.
Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.
This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.
Approved by core@. Fixes PR port-evbmips/32362.
Merge from chap-midi branch, after
~month for review
Comments by thorpej@ drochner@ and Alexandre Ratchov
Incorporated: points by thorpej@ drochner@; preliminary support for
a stats-collecting ioctl suggested by martin@ from comments by A.R.
PR kern/32441 kern/32442 kern/32567 kern/32588 kern/32694 kern/33590
kern/33614 and one instance of kern/32651
ok martin@
Keep track of the average RSSI using an Exponential Moving Average (EMA).
Use it to dynamically tune radio receive sensitivity.
The idea is simple:
- increase sensitivity when the RSSI is bad to optimize throughput on
long distance to the AP, and
- decrease sensitivity when the RSSI is good to reduce noise level and
optimize throughput on short distance to the AP
The EMA allows to smooth RSSI variations so we don't end up changing the
sensitivity too frequently. We check if it would be worth updating the
sensitivity every one second.
RSSI thresholds were taken from the Ralink Tech. Linux driver.
- struct timeval time is gone
time.tv_sec -> time_second
- struct timeval mono_time is gone
mono_time.tv_sec -> time_uptime
- access to time via
{get,}{micro,nano,bin}time()
get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices. MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.
Please report any new problems with this import to garrett@.