the same struct work before workqueue(9) has internally started to work on
the task.
So to make sure that doesn't happen, provide a semaphore not to run the
workqueue multiple times. It might be clearer just skip using workqueue(9)
and use a thread for about everything, but oh well, I leave that to
someone else.
Now is@ can yank his USB-to-Ethernet adapter while the interface is up.
Support non-blocking reads from USB printers. With this, escputil can
query the printer model, and I can print a test page with gutenprint
5.1 and cups. Add many comments explaining why the support is not
quite right. (This change is quite a bit less invasive than a
"correct" fix, and thus more reasonable to pull up to netbsd-4.)
Rototill debugging, so that all DPRINTFN have a level, and so that the
message is printed if the debug level is >= the number in the source
code. Document debug level plan.
Fix bug where only one status change would be printed (by inspection,
not tested).
Document scheme for reading/discarding data when ulpt(4) is opened for
write only.
Delete dead code.
Plan and patch posted on tech-kern without objections.
Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
nell hardware interrupt handler run at IPL_VM, we can call the socket
drivers interrupt handler directly.
This is always possible on sparc64, but on sparc we might have to fall
back to the old softint bounce. Since this uses arbitrary IPLs, we
can not use the new softint_* for this - we'll have to use the old
sparc_softintr_* functions.
-- r1.15
Add some DSP init code for BCM5221's.
Values derived from Apple's GMAC driver, same init
code also exists in Linux's sungem_phy driver.
tested by miod@ pedro@ and otto@ on a few systems.
-- r1.16
Always explicitly set IFM_HDX for half-duplex.
From brad@
--
documentation, experimentation and a previous patch from John Heasley.
Add improvements to the driver based on the GEM documentation and
from FreeBSD if_gem.c (rev 1.45).
Added support to create/remove hot-spare, pass-through disks.
Added support to create/remove volume sets.
Added support to show information about physical disks, even if they
are marked unused, hot-spares or pass-through.
sd(4) devices are attached/detached automagically when a pass-through
disk or volume set is created/removed... thanks scsipi(9) and cube@
for hints.
other drivers in the future):
- Added BIOC_SVCHECKING to the BIOCVOL ioctl, to know if a volume is
running a consistency check.
- Added three more volume levels for the BIOCVOL ioctl.
- Added BIOC_SDPASSTHRU to the BIOCDISK ioctl, to know if a disk is
in pass-through mode.
- Added BIOCDISK_NOVOL; it's used with the same reason than BIOCDISK,
but it's used only to get information about the physical disks connected
in a controller (regardless if they are in a volume set or not).
- Added BIOC_SSDELHOTSPARE, BIOC_SSPASTHRU, BIOC_SSDELPASSTHRU,
BIOC_SSCHECKSTART_VOL and BIOC_SSCHECKSTOPVOL; to remove a hot-spare,
add and remove a pass-through disk and to start/stop a consistency
check in a volume.
- Added the BIOC_VOLOPS ioctl; to create/remove a volume set.
- Removed the BIOCCREATERAID ioctl, it was too limited for my needs.
- Added compatibility ioctls for BIOCDISK and BIOCVOL, enabled via COMPAT_30.
a pointer to that struct, so that we cannot assign pointers of
arbitrary type to cardbus_chipset_tag_t. Tweak cbb(4) to accomodate
this change.
Make Cardbus_conf_read() and Carbus_conf_write() pass the right
arguments to cardbus_functions->cardbus_conf_{read,write}() for a
change.
Let's hope this stops the crash in cardbus_function_enable() that
macallan@ reported to me.
Michael Lorenz, macallan@, actually found this bug.
(I will change cardbus_chipset_tag_t to a struct * from void *, so
that the compiler will detect similar typos in the future.)
(reported by macallan@).
I originally detected this bug by activating 'PCI master target
abort' interrupts on the AMD Elan SC520 processor. Lo and behold,
several interrupts occurred before the system had finished booting!
NetBSD should probably activate PCI exception reporting whenever
it is available.
in sysmon_envsys_events.c.
- Separate sme_event_check_low_power() into sme_battery_check(),
sme_acadapter_check() and sme_battery_critical() (no functional changes).
its children.
Fix an off-by-one bug in the sensor initialization which stopped
it from completing.
Extract sensor initialization into a new subroutine. If there is
an error while initializing sensors, do not let sc_sme dangle.
panics with a DIAGNOSTIC kernel.
In sysmon_envsys_find_40(), wait until an envsys is not busy before
settings its busy flag, in the pattern of sysmon_envsys_find().
ether_mediachange() to their own module that we compile only if
the kernel configuration demands support for both MII buses and
ethernet. Thanks to Tom Spindler for suggesting that these routines
move to dev/mii/.
This allows cats to override the BIOS (aka ABLE) settings, which enable
native mode, but doesn't route the interrupts correctly.
Discussed last year on tech-kern and port-cats.
synchronize the N descriptors starting with the packet's first
descriptor, not with its last. This ought to help the defined(GEM_DEBUG)
&& IFF_DEBUG case.
by adding a segment to the Tx chain. That entails using one more
descriptor. It did not synchronize the last descriptor.
In gem_start(), clarify and repair DMA synchronization of the Tx
descriptors. Sync them all.
gem_tint() prints a coherent set of descriptors that the NIC has
finished processing. See comments for more information. Compile-tested
on sparc64 and on macppc.
Merge bnx_if_stop() and bnx_stop(). Handle bnx_stop(, 1) by doing
a reset.
Protect the bnx_stop() call in bnx_detach() with splnet().
Thanks to joerg@ for suggesting the above.
In bnx_stop(), deactivate the PHYs with mii_down(). Return right
away if !IFF_RUNNING.
Use LIST_EMPTY().
In bnx_ifmedia_upd(), propagate all mii_mediachg() return codes to
the caller except for ENXIO, which just means that the PHY is
suspended. In bnx_init(), propagate bnx_ifmedia_upd() return codes
to the caller.
In bnx_intr(), replace a common subexpression with a variable,
'sblk'.
In bnx_tick(), let the MII bus keep ticking after the link is up:
check link status and exit after calling mii_tick(), not before.
service routine. Add a wrapper for PHY_SERVICE(), called phy_service(),
and check device_is_active() there. Make the mii_*() routines call
the PHY service routines thorugh phy_service() instead of PHY_SERVICE().
In mii_phy_resume(), restore a PHY's state after resetting it by
sending a MII_MEDIACHG command. This change makes bnx(4) resume
more reliably and more quickly; it should help other NICs to resume,
too, if they attach PHYs through MII.
swap, ffs, lfs, raidframe, ccd and cgd. gpt(8) now defaults to
NetBSD ffs if no type is given, but previous FreeBSD types are
still recognized in the DKWEDGE_AUTODISCOVER code.