Clamp b_resid to b_bcount in case the info field is larger. Fix a KASSERT
in physio() when a media error occurs on my SDLT320 drive (maybe this drive
is bogus for not setting the highter bits to 0 in the INFO field in this
case).
1) Move a magic number writing code.
Fix a watchdog timeout and "block failed to stop" problem on BCM5701 B5 card.
2) Fix incorrect register write.
Fix a watchdog timeout "block failed to stop" problem on BCM5700 B2 card.
3) Wait more long time for PCISTATE register to return to its original
pre-reset state.
Fix "pcistate failed to revert" problem on BCM5703 A2 card.
- Replace most inline assembly with proper functions. As a side effect
this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
smaller amount. Nearly all of the inlines did something slow, or something
that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.
of another object that will be released shortly.
- Fix a memleak: add sysmon_power_destroy_dictionary() and remove
all objects that are currently in the dictionary and finally release
the dictionary.
which expects a properly filled mbuf chain, but bus_dmamap_load for the
mbuf storage space instead.
- If the chip supports jumbo frames
+ keep track of which RX descriptor uses which jumbo mbuf buffer, so
that we can rewrite the physaddr field of the descriptor later, as it
might be partially overwritten by the hw
+ when we're out of jumbo mbufs, and if the packet is small enough,
copy it into a cluster mbuf
Those changes make my nfe(4) stable in both cases (defining NFE_NO_JUMBO
for the first one).
In nfe_start() do a fast return if IFF_OACTIVE is set, in
this case we need a Tx interrupt to clean up the DMA ring
before if_start can be properly called.
"Add support for Realtek ALC883. This is the "value" edition of the
ALC882, and differs only by lacking an ADC and a mixer, so have it use
ALC882's get_port(), set_port() and a slightly modified version of its
mixer init."
MHz value as suggested by Alan Barret (apb@).
While I'm here make it report the correct type, it should be PC2 not PC
for DDR2.
spdmem0 at iic0 addr 0x50
spdmem0: DDR2 SDRAM memory, no parity or ECC, 1024MB, 800MHz, PC2-6400
spdmem0: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 2.50ns cycle time
spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
spdmem1 at iic0 addr 0x51
spdmem1: DDR2 SDRAM memory, no parity or ECC, 1024MB, 667MHz, PC2-5300
spdmem1: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem1: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...
- the value of the ATA error register would be computed wrongly, leading to
bogus error values reported to wd(4)
- the channel would not always be restarted after an error, so the next
command would not be handled by the controller
- a timeout condition would not be properly reported to wd(4), leading
to a short transfer instead of a reset/retry
these bugs would cause a AHCI SATA channel to be stalled (no more command
processed) after a "ID not found" or "Aborted command" error reported by the
drive.
when arrays have a large number of stripes. Remove unused variable
(recon_stripes_done). Thanks to Dieter Roelants for the report,
suggestions, and testing. Addresses PR#36878.
Exports some sensors through the envsys(4) framework available
in some Thinkpad laptops.
Ported by Pierre Pronchery from OpenBSD, via PR port-i386/36852.
Tweaks, LKM and misc improvements by me. Added into i386/GENERIC
commented out.
sysmon_envsys_unregister(): in sysmon_envsys_destroy_plist() I wasn't
removing the _objects_ from the dictionary, instead I was calling
prop_object_release() with the keysym returned by
prop_object_iterator_next()... obviously this wasn't correct.
- sysmon_envsys_register: use a SLIST to maintain allocated sme_event_drv_t
structs for later use in sysmon_task_queue_sched(). This avoids a
locking error acquiring/dropping the mutex multiple times.
Suggested by rmind.
the limit in some LM chips.
- Add the lm_detach() function that stops/destroys the callout and
unregisters the driver from the sysmon_envsys(9) framework.
disabled, because some drivers depend in the old code yet.
- Use a new mutex for sysmon_envsys_next_sensor_index (used in
compatibility code), otherwise bad things happen with LKMs. Thanks
to this, the hack for LKMs has been removed.
- Check in advance if the driver doesn't exist already on the list
before adding the sensors in the dictionary.
- Don't forget to call sme_event_unregister_all() if
sysmon_envsys_unregister() fails after adding the array into the global
dictionary or when creating sensors.
- Modify and add some DPRINTFs.
The lm(4) lkm works without known problems registering and unregistering
it multiple times.
(at least three or four persons were against it).
- Add a new sensor type: ENVSYS_BATTERY_STATE, this uses value_cur
and some predefined values in a static table, like ENVSYS_DRIVE.
- Move all static tables to sysmon_envsys_tables.c and use a function
on it to retrieve a pointer to the struct of the specified type.
- Rename the ENVSYS_FMONDRVSTCHANGED to ENVSYS_FMONSTCHANGED and make
it generic for Battery state and drive sensors (this flag enables
monitoring on these sensors when state has been changed).
- Update sysmon_penvsys_event() to report state changes on
ENVSYS_BATTERY_STATE sensors and remove other type of events, with
PENVSYS_EVENT_STATE_CHANGED they are not necessary anymore.
the current battery charge state.
$ envstat -dacpibat0 -s"acpibat0 charge state"
acpibat0 charge state: NORMAL
$
It will show WARNING, CRITICAL, LOW or NORMAL depending on the
state it is.
ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.
It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:
<dict>
<key>description</key>
<string>acpibat0 charge state</string>
<key>generic-state-string</key>
<string>NORMAL</string>
<key>monitoring-supported</key>
<false/>
<key>state</key>
<string>valid</string>
<key>type</key>
<string>Generic string</string>
</dict>
Note that it's limited to 32 chars, but we can grow it if needed.
envstat(8) will print ENVSYS_GSTRING sensors as:
$ envstat -dacpibat0 -s"acpibat0 charge state"
acpibat0 charge state: NORMAL
$
Keep track of the status of the scan.
On a transition IEEE80211_S_SCAN -> IEEE80211_S_SCAN, don't stop the previous
scan, finish the current scan.
When we receive some frames in the IEEE80211_S_SCAN state, set current_channel
based on the value advertised in beacons or probre reponse.
Moreover, it fixes WPA issues for me.
This does NOT identify the devices, merely indicates the
presence of devices at certain addresses. Tested on ichsmb
and nfsmb - other SMBus devices will need to ensure the
proper bus type is set. (I2C_TYPE_SMBUS)
From Nicolas Joly, via Paul Goyette, in PR#36744.
(thanks god for KMEMSTATS).
- sysmon_envsys_register: add all objects in the dictionary without any
lock, at this point the sme device hasn't been added into the list
and it's safe.
- Add sysmon_envsys_destroy_plist(prop_array_t) that destroys all objects
associated with a device and use it on sysmon_envsys_unregister() and
sysmon_envsys_register() if there's any error.
Thanks to Mindaugas Rasiukevicius (rmind@) for the great comments/ideas.
error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);
if (error == ENETRESET) {
to this,
if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
which does the same thing.
(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)
Use ifreq_getaddr() twice in es(4).
Whitespace nits.
argument, just pass sme->sme_name to it.
- sysmon_envsys_register: drop the array in all cases, not just when
there's an error. The reference is stored in the dictionary anyway...
- Update some comments.