probably harmless in this case, since the latter is called on tty
input, which is usually a result of some system call, so we've got
plenty of stack left. It's still nice to fix these things, though, in
case somebody ever decides this driver is a good example of something
(perhaps "what you probably shouldn't do").
night of testing before merging to -stable.
Also added to code to detect TX underruns and automatically increase the
TX threshold to avoid them. Carefully placed diagnostig printf() about
this under #ifdef DIAGNOSTIC to avoid getting any panicky e-mails from
confused users, like I always do with the xl and dc drivers.
common_attach is wrong as common attach initialize some fileds used by
mediainit routine. This was hard to notify because loading driver as kld
lead to mediainit routine being called after common_attach, though probe_phy
is called before.
MFC after: 1 week
- Callers of asleep() and await() have been converted to calling tsleep().
The only caller outside of M_ASLEEP was the ata driver, which called both
asleep() and await() with spl-raised, so there was no need for the
asleep() and await() pair. M_ASLEEP was unused.
Reviewed by: jasone, peter
bypass some extra anti-foot-shooting measures. Currently, its only
effect is to allow detaching a device while it's still open (e.g.,
mounted). This is useful for testing how the system reacts to a disk
suddenly going away, which can happen with some removeable media.
At this point, the force option is only checked on detach, so it
would've been possible to allow the option to be passed with the
MDIOCDETACH operation. This was not done to allow the possibility of
having the force flag influence other tests in the future, which may
not necessarily deal with detaching the device.
Reviewed by: sobomax
Approved by: phk
definitions of all of the ioctls, plus round out all ioctl definitions to
match what exists for linux. Allow ioctls to be called through either the
native or linux interface, though no apps exist (yet) that can take
advantage of native calling.
Correct an off by one in our critical section handling.
SEQADDR always reads the next instruction to execute,
so we must subtract one from its value before making
comparisons with entries in the critical section table.
Print a few additional registers whenever we dump
card state.
Show the SCB_CONTROL and SCB_TAG values for all pending
SCBs in card SCB ram when dumping card state.
aic7xxx.seq:
Fix a bug introduced while optimizing the SDPTR path.
We would ack the SDPTR message twice on Ultra2 or better
chips if it occurred after all data had been transferred
for a transaction.
Change our workaround for the PCI2.1 retry bug on some
chips. Although the previous workaround was logically
correct, its faster method of draining the FIFO seemed
to occassionally confuse the FIFO state. We now drain
the FIFO at half the speed which avoids the problem.
aic7xxx_pci.c:
Chips with the PCI 2.1 retry bug can't handle a 16byte
cachesize. If the cachesize is set to 16bytes, drop
it to 0.
Although it can go higher, it is not safe to so do on arrays with many
members. Compromise by adding a tunable, "hw.aac.iosize_max" that can be
set at boottime. Also document in the aac(4) manpage.
MFC after: 4 weeks
interrupt handler from the upper half, etc. This fixes some serious stability
problems that we were seeing on our production server. These patches have
been tested for almost 6 months and are a highly recommended MFC candidate.
Reviewed by: gibbs, merry, msmith
MFC after: 4 days
to hang or panic kernel by detaching disk from which fs is mounted;
- replace "md" with MD_NAME in yet another place.
Reviewed by: phk
Approved by: phk
a standard cell_t type for the fields of all argument structs. Also
make ihandle_t and phandle_t unsigned to avoid sign extension problems.
Approved by: benno
in the case where there are no interrupts routed for it does not
contain enough space to use it to route an interrupt. In the case
where we need to route an interrupt, throw away the returned buffer
and create a new one containing the interrupt we want.
boot time. Loading as a module once the system is up and running
doesn't make any sense.
- Fix acpi_FindIndexedResource (it would only check the first resource),
changes the calling interface.
- Add a new helper function (acpi_AppendBufferResource) to help building
buffers containing resources.
- Remove the beer-ware license (reqested by phk)
- Reorganise so that the PIIX4 workaround code is kept together, and
switch the workaround function via the timecounter struct, saving
a compare in the read-timecounter codepath. Also indicate that
the workaround is active by changing the timecounter hardware string.
either what's in NVRAM or what the safe defaults would be if we lack NVRAM.
Then we rename cur_XXXX to actv_XXXX (these are the currently active settings)
and the dev_XXX settings to goal_XXXX (these are the settings which we want
cur_XXXX to converge to).
This probably isn't entirely final as yet- but it's a lot closer to now
being what it should be, including allowing camcontrol to actually set
specific settings.
either what's in NVRAM or what the safe defaults would be if we lack NVRAM.
Then we rename cur_XXXX to actv_XXXX (these are the currently active settings)
and the dev_XXX settings to goal_XXXX (these are the settings which we want
cur_XXXX to converge to).
Roll core minor.
either what's in NVRAM or what the safe defaults would be if we lack NVRAM.
Then we rename cur_XXXX to actv_XXXX (these are the currently active settings)
and the dev_XXX settings to goal_XXXX (these are the settings which we want
cur_XXXX to converge to).
size (previously, the transfer size would be rounded up to a multiple of
the block size, which would overflow the buffer).
This fixes panics when doing things like trying to mount audio CD's.
PR: kern/21946
Review Timeout: sos
In file included from ../../../dev/vinum/vinumhdr.h:77,
from ../../../dev/vinum/vinum.c:44:
../../../dev/vinum/vinumext.h:165: warning: redundant redeclaration of `setjmp' in same scope
../../../sys/systm.h:96: warning: previous declaration of `setjmp'
../../../dev/vinum/vinummemory.c:44: warning: redundant redeclaration of `longjmp' in same scope
../../../sys/systm.h:97: warning: previous declaration of `longjmp'
Correctly reintroduce loop_seen_once semantics- that is, if we've never
seen good link, start bouncing commands with CAM_SEL_TIMEOUT. But we
have to be careful to have let ourselves try (in isp_kthread) to check
for loop up at least once.
PR: 28992
MFC after: 1 week
blown over by the Hurricane and had a house dropped on you by the Tornado.
Now it's time to have your parade rained on by... the Typhoon!
This commit adds driver support for 3Com 3cR990 10/100 ethernet
adapters based on the Typhoon I and Typhoon II chipsets. This is actually
a port of the OpenBSD driver with many hacks by me.
No Virginia, there isn't any support for the hardware crypto yet. However
there is support for TCP/IP checksum offload and VLANs.
Special thanks go to Jason Wright, Aaron Campbell and Theo de Raadt for
squeezing enough info out of 3Com to get this written, and for doing
most of the hard work.
Manual page is included. Compiled as a module and included in GENERIC.
storing a flag in the global variable 'linksys' during the probe
routine and reading it during the attach routine. We now have the
ED_VENDOR_LINKSYS vendor code stored in sc->vendor, so check that
instead.
not from the probe routine. This was an oversight when I originally
ported the miibus support to -current, though it was mostly harmless.
We now set the vendor code to the new value ED_VENDOR_LINKSYS in
ed_pccard_Linksys() at probe time. Then ed_pccard_attach() checks
the vendor code, and sets up the miibus if appropriate.
Reviewed by: imp
This code is based on the mp_clock code by phk. It attempts to
detect the PIIX4 (see comments for details) and use a workaround
for its problems.
This code is experimental, and could use some testing and review by a
timekeeping enthusiast.
RSDP, it's now found via a callback).
AcpiOsSleepUsec() went away, use AcpiOsSleep() instead (we could use
AcpiOsStall() too)
AcpiFormatException() was changed to make more sense (it behaves like
our old acpi_strerror() did), so throw acpi_strerror() away (still
#defined in acpivar.h though, we need to sweep these seperately).
events. Otherwise you would see unexpected results if shift or
locking keys are defined to give different actions depending
on other shift/locking keys' state.
Please keep the ukbd module and the kernel in sync, otherwise
the USB keyboard won't work after this change.
MFC after: 10 days
If bus_dma will give us addresses > 32 bits, setup our dma tag
to accept up to 39bit addresses.
aic7770.c:
Update the softc directly rather than use an intermediate
"probe_config" structure.
aic7xxx.c:
Complete core work to support 39bit addresses for bulk data
dma operations. Controller data structures still must reside
under the 4GB boundary to reduce code/data size in the sequencer
and related data structures. This has been tested under Linux
IA64 and will be tested on IA64 for FreeBSD as soon as our port
can run there.
Add bus dmamap synchronization calls around manipulation of
all controller/kernel shared host data structures.
Implement data pointer reinitialation for a second data phase
in a single connection in the kernel rather than bloat the
sequencer. This is an extremely rare operation (does it ever
happen?) and the sequencer implementation was flawed for some
of the newest chips.
Don't ever allow our target role to initiate a PPR. This
is forbidden by the SCSI spec.
Add a few missing endian conversions in the ignore wide pointers
code. The core has been tested on the PPC under Linux and should
work for FreeBSD PPC. As soon as I can test the OSM layer for
FreeBSD PPC, I will.
Move some of ahc_softc_init() into ahc_alloc() now that the
probe_config structure is gone.
Add a 4GB boundary condition on all of our dma tags. 32bit
DAC under PCI only works on a single 4GB "page". Although
we can cross 4GB on a true 64bit bus, the card won't always
be installed in one and we can save code space and cost in
implementing high address support by assuming the high DWORD
address will never change.
Add diagnostics to ahc_search_qinfifo().
Correct a target mode issue with bus resets. To avoid an
interrupt storm from a malicious third party holding the
reset line, the sequencer would defer re-enabling the reset
interrupt until either a select-out or select-in. Unfortunately,
the select-in enable bit is cleared by a bus reset, so a second
reset will render the card deaf to an initiator's attempts to
contact it. We now re-enable bus reset interrupts immediately
if the target role is enabled.
aic7xxx.h:
Remove struct ahc_probe_config.
SCB's now contain a pointer to the sg_map_node so we can perfrom
bus dma sync operations on the SG list prior to queuing a command.
aic7xxx.reg:
Register the Perforce ID for this file with the VERSION keyword
so it is printed in generated files.
Add the DSCOMMAND1 register which is used to access the high
DWORD of address bits.
Add the data pointer reinitialize sequencer interrupt code.
aic7xxx.seq:
Register the Perforce ID for this file with the VERSION keyword
so it is printed in generated files.
Remove code to re-enable the bus reset interrupt after a select-in.
In target mode we cannot defer this operation as ENSELI is cleared
by a bus reset.
Complete 39bit support.
Generate a sequencer inteerrupt rather than handle the data
pointers re-initialitation in the sequencer.
Inline the "seen identify" assertion to save a few cycles.
Short circuit the update of our residual data if we have
fully completed a transfer. The residual is correct from
our last S/G load operation.
Short circuit full SDPTR processing if the residual is 0.
Just mark the transfer as complete.
aic7xxx_93cx6.c:
Synchronize perforce IDs.
aic7xxx_freebsd.c:
Complete untested 39bit support.
Add missing endia conversions.
Clear our residuals prior to starting a command. The
update residual code in the core only sets the residual
if there is one.
aic7xxx_freebsd.h:
Modeify ahc_dmamap_sync() macros to take an offset and a length.
This is how sync operations are performed in NetBSD, and we should
update our bus dma implementation to match.
aic7xxx_inline.h:
Add data structure synchronization helper functions.
Fix a bug in ahc_intr() where we would not clear our unsolicited
interrupt counter after running our PCI interrupt handler. This
may have been the cause of the spurious PCI interrupt messages.
aic7xxx_pci.c:
Adjust for loss of probe_config structure.
Guard against bogus 9005 subdevice information as seen on some
IBM MB configurations.
Add 39bit address support.
MFC after: 10 days
and outputing them in generated files.
Fixed a few other scanner bugs that for some reason didn't show up until
these modifications were made.
MFC after: 10 days
when we get an RX_ERR interrupt rather than the nge_rxeoc() handler. The
rxeoc (end of channel) handler attempts to reinitialize the whole NIC,
which we don't want to do if we only received a bad packet.
. Integrate fdc.h into fd.c, with the removal of ft(4) there's no longer
a reason to scatter things across two files.
. Sanitize comments. Convert them into the style(9)-recommended
multi-line form, make them sentences where apprpriate, etc.
. Declare all functions on top, and declare them in the order they
appear in the file. This order is totally chaotic, but Bruce
convinced me that reordering the file wouldn't make it better either.
. Kill a `possibly uninitialized' warning (only seen with -O2) in
fd_read_status().
. Make the comments at return (0|1) statements in fdstate() consistent.
. Nuke a ``keep the compiler happy'' dummy return at the end of fdstate(),
gcc is smart enough to detect that it would never be reached anyway.
o Much cleanly separate NetBSD(XS) / FreeBSD(CAM) codes.
o Improve tagged queing support (full QTAG).
o Improve quirk support.
o Improve parity error retry.
o Impliment wide negotheation.
o Cmd link support.
o Add copyright of CAM part.
o Change for CAM_NEW_TRAN_CODE.
o Work around for buggy KME UJDCD450.
o stg: add disconnet condition.
o nsp: use suspend I/O.
and more. I thank Honda-san.
conf/options.pc98: add CT_USE_RELOCATE_OFFSET and CT_BUS_WEIGHT
dev/{ct,ncv,nsp,stg}/*_{pccard,isa}.c: add splcam() before calling
attach/detach functions.
Tested by: bsd-nomads
Obtained from: NetBSD/pc98
- All sources are built in a single object, reducing namespace pollution.
- Kill the ready queue, and handle a busy response to mly_start in callers
rather than deferring the command.
- Improve our interaction with CAM:
- Don't advertise physical channels as SCSI busses by default.
- use the SIM queue freeze capability rather than queueing CDBs internally.
- force bus reprobe at module load time.
- Clean up more resources in mly_free.
- Tidy up debugging levels.
- Tidy up handling of events (mostly just code cleanliness).
- Use explanatory macros for operations on bus/target/channel numbers.
a bunch of frames. In this case, the dc_link flag is cleared, and dc_start()
stops draining the if_snd send queue, which results in lots of 'no buffers
available' errors being reported to applications. The whole idea behind
not draining the send queue until the link comes up was to avoid having
the gratuitous ARP being lost while we're waiting for autoneg to complete
after the interface is first brought up. As an optimization, change the
test in dc_start() so that we only bail if dc_link is not set _and_ there
are less than 10 packets in the send queue. If the queue has many frames
in it, we need to drain them. If the queue has a small number of frames
in it, we can hold off on sending them until the link comes up.
MFC after: 1 week
We originally had it such that if the connection topology was FL-loop
(public loop), we never looked at any local loop addresses. The reason
for not doing that was fear or concern that we'd see the same local
loop disks reflected from the name server and we'd attach them twice.
However, when I recently hooked up a JBOD and a system to an ANCOR SA-8
switch, the disks did *not* show up on the fabric. So at least the
ANCOR is screening those disks from appearing on the fabric. Now, it's
possible this is a 'feature' of the ANCOR. When I get a chance, I'll
check the Brocade (it's hard to do this on a low budget).
In any case, if they *do* also show up on the fabric, we should
simply elect to not log into them because we already have an
entry for the local loop. There is relatively unexercised code
just for this case.
MFC after: 2 weeks
1) Bite the bullet, and allow unaligned accesses without buffer copies
on the i386 platform. According to some tests run by Andrew Gallatin,
the buffer copy performance hit is greater than the unaligned access
performance hit (especially with jumbo frames). We still need to copy
everywhere else.
2) Enable interrupt moderation with a 100us timeout.
Submitted by: Andrew Gallatin <no longer at duke.edu>
MFC after: 1 week
- When both SC_PIXEL_MODE and SC_NO_FONT_LOADING are defined,
quietly drop SC_NO_FONT_LOADING, because the pixel(raster)
console requires font.
- When SC_NO_FONT_LOADING is defined, force SC_ALT_MOUSE_IMAGE.
Without font, the arrow-shaped mouse cursor cannot be drawn.
- Fiddle and simplify some internal macros.
MFC after: 2 weeks
haven't been probed successfully. It's a known bug that ISA hints
processing instantiates those devices, and prematurely killing them
has other unwanted side-effects.
where they will never succeed. Add a stop-gap measure that will at
least eventually timeout the operation instead of retrying it
indefinately.
MFC after: 1 month
Despite of a few cosmetic things like adding ``irritating silly
parentheses'' around all return values, this mainly improves FDC reset
handling by no longer gratuitously resetting the FDC all the time
(which causes it to lose the notion of the current track) but only in
case of errors, and it sanitizes the block and offset calculations in
fdstrategy() and fdstate(). Some additional cleanup added by me, in
particular the large switch in fdstate() now always uses return to
break out, and no branch falls off the end of the switch statement
anymore. Per Bruce's suggestion, removed M_NOWAIT from the malloc()s
to simplify things.
Submitted by: bde (mostly)
Previously, I had the MODE_1000 bit in the global config register set
unconditionally, which was wrong: we have to turn it off if we have
a 10/100 link. This is now handled in the nge_miibus_statchg() routine.
Discovered by: Nathan Binkert <binkertn@eecs.umich.edu>
(Note: this commit is being done from JFK airport. :P )
Monitor the system power profile, and use _SCP to adjust thermal zones
accordingly.
Simplify the behaviour of the timeout routine, and add some temporary
debugging.
PCI bus object. This should deal both with already-routed interrupts
as well as devices that need an interrupt routed.
Note that it *doesn't* deal with interlocked interrupt dependancies, nor
does it select between interrupt options in a smart way. These are
optimisations that need further work.
is a parallel adjunct to active cooling, not a lesser evil. The _ACx
levels sort from 0 being hottest, not coolest.
Sanity check the returned temperature values, since we are having
trouble reading them on some systems.
Rearrange sysctl nodes a bit; this is probably close to the final layout.
destroyed properly (otherwise bad things would happen after a clone
dev had been created, and the module was kldunloaded). Allocated
children that have not successfully probed are being deleted again
(otherwise fd0 and fd1 have always been allocated, even if only
fd0 was acutally present, and fd1 even survived kldunloading the
module).
Still, kldunloading leaves remnants of the previously existing devices
intact. Why doesn't it destroy all the devices? As a consequence,
since dev->descr now points into no longer allocated memory, the
system panics deep inside printf(9) when running devinfo(1) after
kldunloading the module. Ideas sought...
Also, when kldloading the module on a hints-populated isab0, this bus
somehow has already created an fdc0 entry (a dummy) so the load
attempt fails and will register fdc1 instead. What are those dummy
entries for? Loading the module from the bootloader works, and it
can be unloaded an re-loaded then later.
For fibre channel, start going for the gusto and using AC_FOUND_DEVICE
and AC_LOST_DEVICE calls to xpt_async when devices appear and disappear
as the loop or fabric changes.
ISPASYNC_FW_CRASH is the async event code where the platform layer
deals with a firmware crash.
some of the RIO (reduced interrupt operation) stuff. Add 64 bit
data list (DSD type 1) and arbitrary data list (DSD type 2)
data structure defines.
Add macros that parameterize usage of the Request/Response in/out
queue pointers. When we finish 2300 support, different registers
will be accessed for the 2300.
part of the PCI block for the 2300- not software convention usage
of the mailbox registers- so we macrosize in/out pointer usage.
Only report that a LIP destroyed commands if it actually destroyed
commands. Get the chan/tgt/lun order correct. Fix a longstanding
stupid bug that caused us to try and issue a command with a tag on
Channel B because we were checking the tagged capability for the
target against Channel A.
A firmware crash is now vectored out to platform specific code
as an async event.
Some minor formatting tweaks.
(this commit is just the first stage). Also add various GIANT_ macros to
formalize the removal of Giant, making it easy to test in a more piecemeal
fashion. These macros will allow us to test fine-grained locks to a degree
before removing Giant, and also after, and to remove Giant in a piecemeal
fashion via sysctl's on those subsystems which the authors believe can
operate without Giant.
- Move the lance_probe function to if_lnc.c.
- Support C-NET(98)S again.
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) and nyan
No response from: Paul Richards
* add support for mic record channel
* add support for setblocksize
* make mpsafe
* make getptr accurate
* reduce buffer size from 64k to 16k for better synchronisation
removed and a minimal number of changes to make it compile in the new
location.
# I have a fully converted on a disk that may be crashed. If it is
# crashed, I'll redo the work.
MFC after: 5 days
- Mask GPCNTL against 0x1c (was 0xfc) for the reading of the NVRAM.
This ensures LEDC bit will not be set on 896 and later chips.
Submitted by Chip Salzenberg <chip@perlsupport.com>.
- Add probe for Tekram 390 U2B/U2W SCSI (53C895) LED handling.
Submitted by Chip Salzenberg <chip@valinux.com>
Pass the softc, not the device_t to the Notify handler.
Don't invoke the Interpreter from callout context, as it may sleep.
Use AcpiOsQueueForExecution, which is called from taskqueue_swi.
Add an ACPI subsystem mutex, and macros for handling it. Because it's
not possible to differentiate between ACPI CA acquiring mutexes for
internal use and for use by AML, and because AML in the field doesn't
handle mutexes correctly, we can't use the ACPI subsystem's internal
locking. In addition, we have other private data of our own to lock.
Add initial locking to the ACPI driver code and the thermal module.
These locks are currently inoperative.
Pull some errant style back into line.
the sector ID.
Based on numerous comments made by Bruce, rewrite a good part of the
old fdformat() function, and merge it with fdreadid() into a single
unified fdmisccmd() function. Various style and a couple of more
serious bugs fixed there.
While i was at it, i also fixed the long-standing "TODO: don't
allocate buffer on stack." in fdcioctl(), fixed a number of style bugs
there, and finally implemented the FD_DEBUG ioctl command that has
been advertised in <sys/fdcio.h> (formerly <machine/ioctl_fd.h>) for
almost seven years now. ;-)
Submitted by: bde (a lot of fixes for fdformat())
a KLD. Still doesn't work well except in the PCMCIA case (now if only
pccardd(8) could load and unload drivers dynamically...). Mainly, it
tries to find fdc0 on the PCI bus for whatever obscure reasons, but i
need someone who understands driver(9) to fix this. However, it's at least
already better than before, and i'm tired of maintaining too many private
changes in my tree, given the large patches bde submitted. :)
Idea of a KLD triggered by: Michael Reifenberger <root@nihil.plaut.de>
by now (except of a compile test), but i believe this to contain no
actual functional changes.
. Fix the copyright of the Regents i accidentally broke in rev 1.197
(although only a very small part of the original driver survived
at all...).
. Bump MAX_CYLINDER since some obscure formats really use more than 80
cylinders.
. Correctly handle BIO_FORMAT which used to be a bitmask but is now a BIO
command of its own.
. Numerous stylistic fixes.
Submitted by: bde
- Reorder the acpi_* functions in a sensible fashion
- Add acpi_ForeachPackageObject and acpi_GetHandleInScope
- Use the new debugging layer/level names
- Implement most of the guts of the acpi_thermal module; passive cooling
isn't there yet, but active cooling should work.
- Implement power resource handling (acpi_powerres.c)
This compiles and mostly works, but my test coverage is small, so feedback
is welcome.
if a device has vchans already but they are all busy, allocate another one
at open() time, up to a maximum of hw.snd.maxvchans.
when creating/destroying vchans, don't make/remove a devnode for the
first/last one as it replaces a hardchan.
functions in ifconfig. "ifconfig an0" should output the correct
status now. Also, make the read and write functions both more
robust and more consistant. This should stop most of the incorrect
size complaints and eliminate the possiability of panics from firmware
that increases resource sizes.
PR: kern/27826
Reviewed by: imp, jlemon
Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
David Wolfskill <dhw@whistle.com>
. staticize out_fdc(), there's no longer an ft(4) driver sharing its use
. remove in_fdc(), has been used by ft(4) last time, long since obsoleted
by fd_in()
. move the declaration of fd_clone() to where most of the other function
declarations are
. de-__P()ify fd_clone(), it's been the only _P()ed function in the
entire file
something: offset into the first mbuf of the target chain before copying
the source data over.
Make drivers using m_devget() with a first argument "data - ETHER_ALIGN"
to use the offset argument to pass ETHER_ALIGN in. The way it was previously
done is potentially dangerous if the source data was at the top of a page
and the offset caused the previous page to be copied (if the
previous page has not yet been appropriately mapped).
The old `offset' argument in m_devget() is not used anywhere (it's always
0) and dates back to ~1995 (and earlier?) when support for ethernet trailers
existed. With that support gone, it was merely collecting dust.
Tested on alpha by: jlemon
Partially submitted by: jlemon
Reviewed by: jlemon
MFC after: 3 weeks
the console device was open. At other times, the interrupts that
are used to detect the break signal or ~^B sequence were disabled,
so these events would not be noticed until the next open (e.g. the
next kernel printf). This was mainly a problem while there was no
getty running on the console, such as during bootup or shutdown.
For serial consoles with break-to-debugger support, we now enable
the generation of interrupts at attach time, and we leave them
enabled while the device is closed.
Reviewed by: bde (I've since made chages as per his suggestions)
via the new DIGIIO_SETALTPIN ioctl, and allow the port's ALTPIN setting
to be queried via DIGIIO_GETALTPIN.
The initial state and lock devices are normally used to set and/or
lock ALTPIN settings although the device itself may also be used.
ALTPIN settings are applied per-device and apply to both the callin
and callout device at the same time.
converting from the old external mbuf buffer code to the new (with the
MEXTADD() macro). Also free free list memory correctly in
foo_free_jumbo_mem() routines: grab the head of the list, then
remove it, _then_ free() it.
This fixes the memory corruption problem I've been chasing in the level 1
driver.
1: most drivers are sensitive to timing, and
2: the handlers are MPSAFE and need a chance to get into the kernel
before some other non-mpsafe handler blocks the ithread on Giant in
shared irq cases.
Reviewed by: cg (in principle)
worked before.
mixer, dsp and sndstat are seperate devices - give them their own cdevsws
instead of demuxing requests sent to a single cdevsw.
use the si_drv1/si_drv2 fields in dev_t structures for holding information
specific to an open instance of mixer/dsp.
nuke /dev/{dsp,dspW,audio}[0-9]* links - this functionality is now provided
using cloning.
various locking fixes.
ports later on.
This includes the basic MI interface routines as well as a console driver.
The MD code is kept in the MD directories.
Reviewed by: obrien
built in, or as an addon card (My Japanese isn't quite good enough to
know which). [FreeBSD98-testers 5098] contains all the details.
Submitted by: Kawanobe Koh-san <kawanobe@st.rim.or.jp>
The DP83820/83821 has an undocumented limitation concerning jumbo frames
and TX checksum offload. In order for TX checksum offload to work, the
outgoing frame must fit entirely within the TX FIFO, which is 8192 bytes
in size. This isn't a problem, until you try to send a 9000-byte frame,
at which point the TX DMA engine goes to sleep. It turns out that if
you want to send a jumbo frame larger than 8170 bytes (8192 - 64), you
have to turn off the TX checksum support.
As a workaround, I changed nge_ioctl() so that if the user selects an
MTU larger than 8152 bytes, we clear the if_hwassist flags. The flags
will be set again once the MTU is reduced to a smaller value.
we want the checksums calculated on a per-packet basis using control bits
in the extsts field of the DMA descriptor structure. For TX, the chip
seems to want these bits set in the field of the first descriptor in
a fragment chain, not the last.
vinumhdr.h:80: warning: redundant redeclaration of `vinum_cdevsw'
vinumext.h:239: warning: previous declaration of `vinum_cdevsw'
in each of the following files:
vinum.c, vinumconfig.c, vinumdaemon.c, vinuminterrupt.c, vinumio.c,
vinumioctl.c, vinumlock.c, vinummemory.c, vinumraid5.c, vinumrequest.c,
vinumrevive.c, vinumstate.c, vinumutil.c
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 5)
These warnings used to be confined to the alpha but are on all now.
554: passing arg 4 of `resource_string_value' from incompatible pointer type
576: passing arg 4 of `resource_string_value' from incompatible pointer type
593: passing arg 4 of `resource_string_value' from incompatible pointer type
commands that complete (with no apparent error) after
we receive a LIP. This has been observed mostly on
Local Loop topologies. To be safe, let's just mark
all active commands as dead if we get a LIP and we're
on a private or public loop.
MFC after: 4 weeks
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.
The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).
The macros declare a strongly typed set. They return elements with the
type that you declare the set with, rather than a generic void *.
For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.
For a.out, we use the old linker_set struct.
NOTE: the item lists are no longer null terminated. This is why
the code impact is high in certain areas.
The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.
linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.
Reviewed by: eivind
- Replace some very poorly thought out API hacks that should have been
fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
inconvenient temporary ioconf table from config(). We already had a
fallback to using strings before malloc/vm was running anyway.
. remove stale comments and a stale #define (from the old days of ft(4))
. make MAX_SEC_SIZE (used in isa_dmainit()) a #define
. fix a typo in a string
. use 0 as the blocksize in devstat_add_entry(), since the actual blocksize
is unknown (devstat(9) suggests to use 0 in that case)
around, use a common function for looking up and extracting the tunables
from the kernel environment. This saves duplicating the same function
over and over again. This way typically has an overhead of 8 bytes + the
path string, versus about 26 bytes + the path string.
use of the extsts field in DMA descriptors. We need this to tell the chip
to calculate TCP/IP checksums in hardware on a per-packet basis.
- Fix the unions in DMA descriptor structures. Breakage on alpha led
me to realize I'd done it wrong the first time.
that device add/remove will work without usbd running. usbd is still
used for execing stuff, but that is all now. Ideally it could be replaced
by a devd some day. Until now, usbd had to be running so that the
USB_DISCOVER ioctl could be called to walk the tree when an attachment
status change was noticed.
Among the changes:
- when a detach happens, remove any pending 'attach' messages or the system
suffers from whiplash from exec moused / kill moused loops if you do lots
of attach/detach and later start usbd.
- tweaks related to kthread differences
- disable the select handler for the old interface (never return success).
I have not removed it yet or old usbd's will abort. That can get removed
later once usbd is cleaned up and things have stabilized for a few weeks.
- get Giant in the kthread.
- a couple of minor potential bug fixes (usb_nevents vs malloc failure etc)
Pre-approved by: n_hibma (ages and ages ago)
ep driver. The rest of the patch will wait until I can put the time
into it to get it righter than the kludge it is.
This protects us against card eject problems at all times,e xecpt when
we're in the epintr ISR.
I think bde even reviewed it once.
Also, change the name of ActionTEC pat to more generic Lucent Kermit
chip. Add stub for Xircom card. Add cardbus attachment too.
compliant. All the variable definitions and function names are
reasonably consistent, and the functions which should be static (i.e.,
all of them) are. Other assorted fixes were made. The majority of
the delta is indentation fixes.
Partially reviewed by: bde