by explicitly setting sc->font_width, in the same
places where sc->font_size is set, instead of
relying on the default initialized value of 0 for sc->font_width.
PR: kern/84836
Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru>
MFC after: 2 days
for the spl-era locking, but now that we can have multiple, concurrent
interrupts for multiple wi devices, having a global check to make sure
at most one of them was in wi_cmd no longer makes sense.
MFC After: 2 decifortnight
o Lock ed
o Fix extra newline in probe messages
o Eliminate gone.
o Make detach less-racy.
o Eliminate spl*
o Switch from timeout/untimeout to callout interface.
o Read/write card memory using bus_space calls.
o generalize readmem so that we don't need ifs in the code.
o Fix memory stuff to be consistant.
o Remove OLDCARD compat stuff.
o Mark interrupt as MPSAFE.
# sic, hpp not tested at all
# ISA and PCI attachments lightly tested
- On resume all registers have to be initialized again like after
power-on so reset sc_inited in gem_suspend() in order get all of
the registers set next time gem_init_regs() is called.
- On at least some ERI and GEM revisions GEM_MAC_RX_OVERFLOW happen
often due to a silicon bug and re-initializing is all we can do
about these errors so make handling them non-verbose.
- Remove a superfluous memset(3) call in gem_meminit(), all elements
are initialized to 0 anyway.
MFC after: 1 week
tulip_mbuf_compress(). If we fail to allocate a new mbuf to copy the
data into, put the mbuf back in the driver's send queue so that we can
retry it later rather than throwing the packet away.
- Use m_devget() instead of doing it inline ourselves in the
TULIP_COPY_RXDATA case. If we fail to allocate an mbuf to copy the data
into, don't forget about the original mbuf cluster. The old code would
lose the pointer and leak the cluster in that case. Now it doesn't lose
it but always sticks the original rx buffer back into the receive ring
after trying to copy the data out and send it up the stack. Also, if we
fail to allocate a new mbuf to copy the data into, log an input error.
Also, don't combine the priming case with the received-a-packet case to
make the code flow a bit clearer and easier to follow.
not exsist, do not have ioctl return an error, but instead set -1
in the data returned to the user. This allows the HP bios flash
utilities to work without requiring changes to their code.
Reviewed by: jhb
- Remove form feed characters.
- Fixup style of function declarations.
- Assume that an mbuf cluster is big enough to hold an ethernet frame.
(This should really be using m_defrag(), but this diff is just simple
changes for now.)
- Allocate arrays of metadata for the descriptors in the rx and tx rings
and change the ring pointers to walk the metadata array rather than the
actual descriptor rings. Each metadata object contains a pointer to its
descriptor, a pointer to any associated mbuf, and a pointer to the
associated bus_dmamap_t in the bus_dma case. The mbuf pointers replace
the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
defaults to 0, but can be changed to KTR_DEV at the top of the file
when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
Also, remove an incorrect XXX comment I added earlier, the driver was
correct (at least it does the same thing dc(4) does). TULIP_SP_MAC
was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
so it becomes easier to read at the expense of a couple of duplicated
lines of code. Also, use m_getcl() to get an mbuf cluster rather than
MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
fixup attach to do a better job of cleaning up when it fails. This
gets us a good bit closer to possibly having a detach method someday
and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.
I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on. I'll be removing the non-bus-dma code in a subsequent
commit.
cooling thread which refers psv, tc1, tc2 and tsp. The previous
code made the period where sc->tz_zone.tsp was zero, and it caused
panic at msleep().
Reported by: keramida
Tested by: keramida
and detach() since mtx_lock() will assert that already since the driver
lock is not recursive.
- Move the call to callout_init_mtx() before hme_stop() so that the
callout_stop() in hme_stop() doesn't operate on an uninitialized callout
structure during attach.
Reported by: yongari (2)
MFC after: 3 days
so that devd can match on it. This field was already available to
usbd and is used by a number of usbd.conf entries, so now it is
possible to transfer those entries to devd.conf.
Submitted by: Anish Mistry
specifies a PMC capability (e.g., sampling) that is not supported
by hardware. Return EINVAL early if the PMC class passed in is
not recognized.
MFC after: 3 days
depends, like all other pccard drivers, indirectly through kobj on
pccard. Therefore, it is not appropriate to force pccard to be loaded
when if_ral.ko is loaded. This makes it possible to load if_ral w/o
loading pccard.ko on, eg, pci only systems.
o management of multiple tx rings (up to 4)
o setting of WME IE in association requests
Some features are still missing though, like the possibility to override
the default cwmin/cwmax/asfn values of each tx queues.
- Add locked versions of start and init. The SRM_MEDIA code in dc_init()
stayed in dc_init() instead of moving to dc_init_locked() to make the
locking saner.
- Use callout_init_mtx().
- Fixup locking in detach and ioctl.
- Lock the driver in the ifmedia callouts.
- Don't recurse on the driver lock.
- De-spl.
MFC after: 3 days
- Add locked variants of start, init, and ifmedia_upd.
- Use callout_* instead of timeout/untimeout.
- Don't recurse on the driver lock.
- Fixup locking in ioctl.
- Lock the driver lock in the ifmedia handlers rather than across
ifmedia_ioctl().
Tested by: brueffer
MFC after: 3 days
interrupt comes in later on, which can happen in some uncommon cases.
Another possible fix is to call re_detach() instead of re_stop(), like
ve(4) does, but I am not sure if the latter is really RTTD, so that stick
with this one-liner for now.
PR: kern/80005
Approved by: silence on -arch, no reply from selected network gurus
- Don't set IFF_ALLMULTI in our ifnet's if_flags if we end up allowing
all multicast due to limits in the MAC receive filters in hardware.
Requested by: rwatson (2)
that if softclock is running on another CPU and is blocked on our driver
lock, we will wait until it has acquired the lock, seen that it was
cancelled, dropped the lock, and awakened us so that we can safely destroy
the mutex.
MFC after: 3 days
effect. since CPU speed is restored by degrees, we cannot use
the facility of saving cpu speed by CPUFREQ_set() effectively.
so, we need to save the value when passive cooling is in effect.
Repoeted by: Kevin Oberman <oberman__at__es.net>