There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
- bus_dmamap fixes, with checks against NULL
- move the rings' allocation code later in iwi_attach() to avoid NULL pointer
dereference if allocation fails
- avoid double free() in case of failure during attach. If an allocation fails,
do not free the ring directly, as it is handled by iwi_detach()
- only set ring->count for RX/TX rings when ring allocation is successful, or
else the for loop during detach will fail with a NULL dereference.
- call pci_intr_disestablish() if iwi_reset() fails during attach; driver is
in an incoherent state, interrupt handler should not be used.
Proposed by me on tech-net@, approved by christos@. Compiled and tested
with GENERIC and XEN3_DOM0 kernels.
in IP headers, so we have to deduct not only IP option headers but all
IP headers. But in TCP/UDP layer we can assume the IP header is valid
and a sum of the IP header part should be 0xffff, so we don't have to
bother to deduct it from the computed checksum.
which don't have EXT_RFA and IPCB support. From hme(4) driver and
FreeBSD's fxp(4). Tested on i82559.
XXX: Probably we should have a common function to parse RX packet headers
XXX: to handle a raw checksum value and share it among hme(4) and gem(4) etc.
already powered down. This change prevents PCI bus exceptions
(indicated by NMI) when, for example, I detach the whole device
tree on a Soekris net4521:
com1: detached
NMI ... going to debugger
Stopped in pid 0.1 (system) at netbsd:sipcom_stop+0x4d: pushl $0
db{0}> continue
NMI ... going to debugger
Stopped in pid 0.1 (system) at netbsd:sipcom_stop+0x149: addl $0x10,%e
sp
db{0}> continue
sip0: detached
(On the AMD Elan SC520, the NMI occurs at the instruction after
the write or, if the write was posted, at either that instruction
or some later one.)
enabled:
- don't enable interrupts before calling uhci_run()
- check if the controller's interrupt is enabled in uhci_intr()
The issue is that uhci_run() may tsleep(), uhci_intr1() may be called before
uhci_run() is complete and disable it because it found it halted.
Now a uhci controller can be successfully exported to a NetBSD Xen domU :)
not 82550, so don't set FXPF_EXT_RFA (available only on 82550/82551)
for those variants.
Tested on Intel PRO/100 VM with 82562EM/EX PHY by ISHII Kimio
on current-users, and should also fix PR kern/40431.
because EXT_RFA for RX cksum is always available with IPCB for TX cksum
but i82558 and i82559 have only EXT_TXCB without IPCB.
Tested on the following fxp cards:
fxp0 at pci0 dev 14 function 0: Intel i82557 Ethernet, rev 2
fxp0 at pci0 dev 14 function 0: i82559 Ethernet, rev 8
fxp0 at pci0 dev 14 function 0: i82550 Ethernet, rev 12
when bus_dmamap_create fails, then the map pointer is undefined.
age_dma_free() assumes, the map pointer is NULL. Make the assumption
always true by setting the map pointer to NULL in bus_dmamap_create()
error path in order to prevent age_dma_free() to call bus_dmamap_destroy()
on an invalid map.
to 2 for now. strategy routine must be written, for now only parsing and
support routines are available. This is work in progress code and should be
taken very carefully.
interrupt map, interrupt handler and dma maps.
Also prevent call to bus_dmamap_destroy() when bus_dmamap_create() failed.
The nfe_free_* routines assume, the map pointers are NULL but they
are actually undefined. Make the assumption true by making them NULL
in the error path of bus_dmamap_create().
All together, this fixes crashes when nfe_attach() fails.
ok martin@
disk queue is being held. Work around this by dropping the lock before
bdev_strategy(), and re-grabbing the lock afterwards. This is a
temporary measure until I get to gutting this queue locking code.
There has been some success with this in addressing PR#39993.
This patch is from Antti Kantee. Thanks!
via ECDT, we would print:
acpiec0 at acpi0 (EC, PHP0C09-0): ACPI Embedded Controller (disabled)
The embedded controller isn't actually disabled, but instead this driver
instance, so change the message to read:
acpiec0 at acpi0 (EC, PHP0C09-0): using acpiecdt0
Not directly related to the PR but this bug was discovered while testing.
In azalia_stream_halt, invalidate the intr ptr to prevent a race condition
where azalia_stream_intr can jump off into lala land during stream shutdown.
based on cgsix). Original commit message:
Include wsdisplay.h directly in the header to avoid different sizes
of cgsix_softc depending on proper previous includes by the includer
due to #ifdef NWSDISPLAY. Thanks to kmem poison check and DEBUG kernels.
monstrous if-then-else-if constructs.
2. Display module capacity in GB if it is at least 1GB.
3. Indicate if a memory module is "registered".
4. For DDR3, indicate if a temp-sensor is present.
Inspired by similar changes in OpenBSD's spdmem(4).
conditional on FXPF_EXT_TXCB, so, replace all uses with that
- for the pci frontend, reestablish some flags lost the the prior
changes and simplify one of the cases
this fixes PR 40677 and may fix PR 40431.
resources on the same line as autoconf messages. Things like:
pcppi1 at acpi0 (SPKR, PNP0800)
pcppi1: io 0x61
become:
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
IEEE 802.3 Annex 28B.3 specifies the following relative
priorities of the technologies supported by
802.3 Selector Field value:
1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T
Our drivers give 100BASE-T4 a higher priority than
100BASE-TX full duplex.
Fix this. This patch is based on changes in FreeBSD and OpenBSD.
Patch presented on tech-kern and tech-net:
http://mail-index.netbsd.org/tech-kern/2009/02/15/msg004397.htmlhttp://mail-index.netbsd.org/tech-net/2009/02/15/msg001064.html
got no comments, no objections.
bus driver's match function to return a higher confidence (so it can
beat out vga(4), for example). genfb needs-flag so md code can determine
if the genfb driver is present.
wsmouse(4) can attach directly at arckbd(4) and I can dispose of the
ugly arcwsmouse(4) and arcwskbd(4) interpositions. Do that, and purge
them from the documentation as well.
Old:
piixpm0 at pci0 dev 20 function 0
piixpm0: ATI Technologies SB600/SB700/SB800 SMBus Controller (rev. 0x13)
piixpm0: interrupting at SMIpiixpm0: polling
New:
piixpm0 at pci0 dev 20 function 0
piixpm0: ATI Technologies SB600/SB700/SB800 SMBus Controller (rev. 0x13)
piixpm0: interrupting at SMI, polling
Cosmetic change only, no functional changes intended.
to the device's cache anyway and so cmdh_prdbc reports a completed
transfer. If we use it to update ata_bio->bcount this has 2 conseqences:
- the automatic LBA48 workaround doesn't qick in because bcount is used
to compute the last sector of the transfer (wd(4) part of kern/40569)
- wd(4) will report a B_ERROR buffer with a b_resid of 0, which panics
a DIAGNOSTIC kernel
Fix by ignoring cmdh_prdbc if we had a write with errors, and in this case
leave ata_bio->bcount at its initial value.
While there use NOERROR instead of 0 for ata_bio->error (cosmetic).
thanks to Matthias Scheler for tests.
we need to account for that. Failure to do so means we can end up
waiting forever for writes we think are outstanding, but which have
already completed.
Addresses the RAIDframe part of PR#40569. Thanks to Matthias Scheler
for reporting the issue and verifying the fix.
LBA 48 work around. The first entry will watch the Seagate ST3160815AS
(and similar models), the second one HP's OEM version of the same drive.
This avoids the RAID rebuild problems described in PR kern/40569.
can be called _before_ we've identified the chip. Ensure that sc_chip
is initialized to NULL before chip is identified, and if it is NULL or
ADM1027, use the less-efficient send_byte/receive_byte.
While here, don't attempt to release the i2c bus if we failed to acquire
it. This would cause a panic on a LOCKDEBUG kernel.
Thanks to Nicholas Joly for pointing out both of these bugs.
device doesn't support flushing the cache. Fixes an issue (reported
privately) where ST39120A drives are not capable of flushing the
cache, and RAIDFrame was incessantly complaining.
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)
See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html
Reviewed by abs@ in private mail.
shutting down -- this is only supposed to happen from the pcmcia
kernel thread while the system is running
-in wd_shutdown, call ata_addref first, so that the adapter is either
active or we know that it isn't
This fixes a hang on shutdown-p reported by Dennis den Brok per
PR kern/40531. Verified by by Dennis and me.
(reported against 5.0-Beta, so this is a pullup candidate)
handler for them.
Don't override the latency timer set for us by the CardBus code.
Add a bit of debug code for the Function Event Registers, #if 0'd
out for now.
Cosmetic: remove gratuitous parenthesization of return statements.
Change the indentation of the struct atw_pci_softc definition.
Use a more meaningful variable name, et cetera.
addresses, rather than trying to read a byte of data from the device.
Some devices don't like to be read from (certain clock devices are, I'm
told, write-only!), while others expect to be asked only for words (or
pairs of bytes).
While here, skip a bunch of i2c addresses that can't (or at the very
least, shouldn't) have any slave devices.
This is the only use in NetBSD of the quick_read/quick_write protocol,
and it remains disabled by default. I've updated all the generic i2c
drivers to handle the quick_* protocols, but several port-specific
drivers have not been updated since I'm in no position to verify that
the changes work. Assistance from sandpoint, arm/xscale, evbarm/gumstix,
mips/alchemy, and macppc would be greatly appreciated.
routine, since we have already have the iic_smbus_* interfaces.
NOTE: i2c controllers that provide their own i2c_exec() routine also need
to be modified. I'll be committing most of these shortly.
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.
Switch to polling mode after the acpi(4) device has been suspended as
interrupts will be disabled later on and we may still need to execute
AML that tries to sleep or wait on a semaphore.
sense structures in icp_scr map; otherwise we'll compute an offset past the
allocated memory (and past the end of the dmap map) from the ic_ident.
To be safe use ICP_NCCB_RESERVE instead of 2; as I'm not sure why
ICP_NCCB_RESERVE is 4.
panics.
Extract a new function, bnx_add_buf(), from bnx_get_buf().
bnx_add_buf() just tries to add an mbuf to the Rx chain. bnx_get_buf()
tries to allocate an mbuf, first, and then to add the mbuf to the
chain. Use bnx_add_buf() to try to put an mbuf that we took off
of the chain back onto the chain, and use bnx_get_buf() everywhere
else.
This change seems to be in keeping with the author's intent, but
it looks like the code broke at some point.
Thanks to Jarle Greipsland, David Dudley, and others for reporting
this bug and for testing patches.
upc_submatch() whereby it made sure that the correct driver attached.
Since this didn't really belong in the submatch function anyway,
reintroduce it in the match functions for upc's children.
This allows my A5000 to find at least one of its hard disks.
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.
Use ETHER_ALIGN to calculate number of segments correctly (actually the same way as FreeBSD and OpenBSD do).
Also use ETHER_ALIGN to correctly adjust new mbufs.
This makes the driver finally work. Tested by Jochen Kunz:
ping -nf 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
----192.168.2.1 PING Statistics----
28949 packets transmitted, 28949 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.157/0.364/2.272/0.023 ms
2710.6 packets/sec sent, 2710.6 packets/sec received
XXX Shouldn't if_ether.h provide ETHER_ALIGN instead of defining it in all drivers?
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
interrupt context, as my vax kernel with DIAGNOSTIC told me. Instead, we
defer the work and get it to run in thread context via a workqueue(9).
Thanks to matt@ for the review.
ID pair. Misuse of the revision numbers was causing some of the chip
features to be disabled on some integrated Intel chips. So, move the
determination of the features into the bus frontend, where the
vendor/product ID is known. (Note: sc_rev should be removed. The
microcode patch stuff is also busted and needs to be fixed.) Also,
poll the actual flow control status in inphy, rather than making
assumptions.
contributed anonymously.
Unloading doesn't work right in any case -- it doesn't clean up the
sysctl tree, among other things. This code needs Work, but at least
this prevents it crashing randomly due to autounload while X is
running.) Also, fix the dependency list for radeondrm.
contributed anonymously.
Written by Pyun YongHyeon for FreeBSD, ported to DragonFlyBSD
by Sepherosa Ziehau, ported to OpenBSD by Kevin Lo and then
ported to NetBSD by me.
XXX Driver needs testing.
rather than using just drive 0 status. Another drive with a different
status would cause the previous status state to flip-flop and repeatedly
output state change messages.
that we have to run lvm vgchange -a n before modunload in NetBSD.
We really need to disable module unloading only for mounted devices, I have
to look at vfs_hooks for mount/umount calls and find way how to mark devices
as mounted in dm driver.
- reset autonegotation timer if media option is not IFM_AUTO or we got a invalid link.
- Announce link loss right after it happens.
- Autonegotiation is retried every mii_anegticks seconds.
- Report link state changes right after setting autonegotiation.
- use rgephy_reset consistently
- change rgephy_reset to use mii_phy_reset and rgephy_load_dspcode.
These changes give me a speedup from 6.5MB/s to 9.1MB/s on a 100MBit link.
Also: move mutex init/destroy into attach/detach functions and
handle case where line discipline is closed before the irframe
device. Fixes PR kern/40271.
However, ugensa.c was, so restore that licencse and append mine.
Also, use UT_*_VENDOR_INTERFACE instead of local defines of the same thing.
No functional change.
partitions on optical media like CD/DVD/BD but also on all other media if
there is no NetBSD disklabel or MBR label.
Also fix cd's readdisklabel arguments so the ioctl's arrive at the right
device (!) and update its default label to make more sense.
before readdisklabel(9) on DIOCGDINFO so that we can get correct
media size via the ioctl. (usually floppy doesn't have a real disklabel)
Tested on i386 with 1.44M floppy.
- Storing updated video format after user changes format
- Round up number of xfers queued to multiple of 8, due to ehci inefficiencies
- Remove random debugging line I slipped in earlier
linear can be loaded as module. Module is not loaded when there is target
with similar name already. Zero and error targets aresimple examples how
can be all future targets written to support dynamic loading. Target can't
be unloaded until there is at least one user.
the base NetBSD system. It uses Linux LVM2 tools and our BSD licensed
device-mapper driver.
The device-mapper driver can be used to create virtual block devices which
maps virtual blocks to real with target mapping called target. Currently
these targets are available a linear, zero, error and a snapshot (this is
work in progress and doesn't work yet).
The lvm2tools adds lvm and dmsetup binary to based system, where the lvm
tool is used to manage and administer whole LVM and the dmestup is used to
communicate iwith device-mapper kernel driver. With these tools also
a libdevmapper library is instaled to the base system.
Building of tools and driver is currently disable and can be enabled with
MKLVM=yes in mk.conf. I will add sets lists and rc.d script soon.
Oked by agc@ and cube@.