socket attach code. We now have at least a chance for pccard devices
appearing in the future.
This is a snapshot of ongoing work. Proceed at your own risk.
- more req[uest]->xfer changes.
- get the corresponding NetBSD Id's right
ohci.c
- move untimeout above print statement
- remove usb_delay that panics the system (tsleep in intr context) when
ohcidebug > 5.
ugen.c
- create the devices for endpoints with make_dev.
uhub.c
- change from using usbdebug to uhubdebug
- add more debugging statements
X server, is not responding to the VT switching protocol. (This part
of the code has been somewhat wrong in -CURRENT, but -STABLE has the
correct code...)
PCI SCSI controllers. This driver also supports the following Symbios/LSI
PCI SCSI chips: 53C810A, 53C825A, 53C860, 53C875, 53C876, 53C885, 53C895.
However, it does NOT support earlier chips as the following ones: 53C810,
53C815, 53C825.
See README.sym for more details.
Submitted-by: Gerard Roudier <groudier@club-internet.fr>
Add MD_ROOT and MD_ROOT_SIZE options to the md driver.
Make the md driver handle MFS_ROOT and MFS_ROOT_SIZE options for compatibility.
Add md driver to GENERIC, PCCARD and LINT.
This is a cleanup which removes the need for some of the worse hacks in
MFS: We really want to have a rootvnode but MFS on a preloaded image
doesn't really have one. md is a true device, so it is less trouble.
This has been tested with make release, and if people remember to add
the "md" pseudo-device to their kernels, PicoBSD should be just fine
as well. If people have no other use for MFS, it can be removed from
the kernel.
- Convert to new bus attachment scheme. Thanks to Blaz Zupan for doing
the initial work here. One thing I changed was to have the attach
and detach routines work like the PCI drivers, which means that in
theory you should be able to load and unload the driver like the PCI
NIC drivers, however the pccard support for this hasn't settled down
yet so it doesn't quite work. Once the pccard work is done, I'll have
to revisit this.
- Add device wi0 to PCCARD. If we're lucky, people should be able to
install via their WaveLAN cards now.
- Add support for signal strength caching. The wicontrol utility has
also been updated to allow zeroing and displaying the signal strength
cache.
- Add a /sys/modules/wi directory and fix a Makefile to builf if_wi.ko.
Currently this module is only built for the i386 platform, though once
the pccard stuff is done it should be able to work on the alpha too.
(Theoretically you should be able to plug one of the WaveLAN/IEEE ISA
cards into an alpha with an ISA slot, but we'll see how that turns out.
- Update LINT to use only device wi0. There is no true ISA version of
the WaveLAN/IEEE so we'll never use an ISA attachment.
- Update files.i386 so that if_wi is dependent on card.
pci_probe_nomatch, so it won't be in the way when loading USB as a module.
The reason for them being there in the first place is that every
motherboard comes with USB kit and this way it looks more pretty (peter).
The real solution will be to define some method of detaching a driver
after it has attached.
and shiny usbd daemon to handle events.
usb_port.h:
- Add a macro to retrieve the unit number from a USBBASEDEVICE
usb.h, usb_subr.c:
- Add fields to the device_info struct.
usb_subr.c:
- Fill in the new fields.
- Remove the notification of the event up a bit to make sure all the
information is still available to fill the usb_devinfo struct.
This requires recompilation of usbdevs (src/usr.sbin/usbdevs) and the
ezdownload/ezupload (ports/misc/ezload) utilities in any case.
of queue entries have to be at least 16 bits now! If we're running
a 2100 less than rev 5, turn off loop fairness (per Qlogic errata). Fix
typo in checking against 2200 F/W revision. Slightly fix/reorder fabric
login stuff. Change to usage of isp_getrqentry for code clarity. Add some
defensive dual bus assumptions. Various cleanups, etc...
Role the core version minor number. Change the arguments to the dma
setup function to use a u_int16_t for the output request loop pointer
(truly amazing that this hasn't blown up in anyones face so far). Do
some shuffling around of some items.
by Qlogic. The firmware is now also kept from compiling by default
unless some config options are set.
While we're at it, roll the 2200 f/w to 2.01.0. Still need to get the
1.17.26 2100 f/w working as it solves a lot of problems but it doesn't
want to work yet with this driver (:-)).
out of the PCI CLASS reg and store it in the softc. Use the getenv_quad
function to get a WWN override from the environment. Look for a config
value for same. Make slightly less lame the wwn seed construction.
is documented to be 0x18 in the Adaptec manual, however there appears to
be a newer board rev with code 0x19. I added a #define for this and
updated the probe code so that this board will be properly identified
in the probe messages. (Currently it's just identified generically as
an AIC-6915 chip.)
o Delete pcic1 from NEWCARD
o Add explicit resource hints to pcic0
o Get attach working with newbus, kinda (it does all the newbus stuff,
but doesn't try to attach the pccard yet, too many panics).
o Disable ie0 and le0 in NEWCARD config. There appears to be a bug in
the isa_compat code wrt memory conflicts with newbus drivers for
reasons unknown.
o Minor cleanups.
ES1371 and ES1373 PCI Audio Sound Chips.
The 1371 and 1373 can be found on newer CreativeLabs/Ensoniq
sound cards such as the SoundBlaster PCI 16,64 and 128.
Submitted by: Russell Cattelan <cattelan@thebarn.com>
Obtained from: Parts obtained from linux, but rewritten by Russell
Remove EXTRA_SIO/NSIOTOT and make it fully dynamic (from dev/sio/sio.c)
Make sio work for pccard here - pccardd doesn't activate interrupts
until after prove has succeeded.
Mark the initial reset of likely sio ports as broken as it depended on
config supplying a list of locations to probe, devices are now proved
standalone.
Optimize a bit of COM_NOAST4() logic.
Use bus_get_resource_start() etc rather than using isa-centric calls.
Reactivate the IIR_TXRDYBUG test, I've got a card here with it.
Try to be a bit smarter about activating interrupts (ie: don't panic
if polled)
Fix some style bugs that have crept in over time (there are still more).
Don't use NFDC as an arbitary limit, it is not required and goes against
using PnP fdc devices (eg: when PNPBIOS is turned on, the motherboard
devices (sio, fdc, etc etc) are detected via PnP, not config(8).)
o Rewrite probe code to work in the newbus world.
o Add preliminary pnp support. I have no clue what the pnp ids for
the older ISA machines/cards. I don't have any of these cards/machines
so I'll have to rely on the user community to give me help.
o Minor code reformatting.
Attach hasn't been touched, and there may be some config issues that
we need to deal with as well. These will follow in time.
Cleaning up the code:
- Declare many functions static
- Change variable names to make them more self explanatory
- Change usbd_request_handle -> usbd_xfer_handle
- Syntactical changes
- Remove some unused code
- Other KNF changes
Interrupt context handling
- Change delay to usbd_delay_ms were possible (takes polling mode into
account)
- Change detection mechanism for interrupt context
Add support for pre-allocation DMA-able memory by device driver
Add preliminary support for isochronous to the UHCI driver (not for OHCI
yet).
usb.c, uhci.c, ohci.c
- Initial attempt at detachable USB host controllers
- Handle the use_polling flag with a lttle more care and only set it if
we are cold booting.
usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c
- Make sure an aborted pipe is marked as not running.
- Start queued request in the right order.
- Insert some more DIAGNOSTIC sanity checks.
- Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.
usb.c, usb_subr.c
- Add an event mechanism so that a userland process can watch devices
come and go.
ohci.c
- Handle the case when a USB transfer is so long that it crosses two
page (4K) boundaries. OHCI cannot do that with a single TD so we make
a chain.
ulpt.c
- Use a bigger buffer when transferring data.
- Pre-allocate the DMA buffer. This makes the driver slightly more
efficient.
- Comment out the GET_DEVICE_ID code, because for some unknown reason it
causes printing to fail sometimes.
usb.h
- Add a macro to extract the isoc type.
- Add a macro to check whether the routine has been entered after splusb
and if not, complain.
usbdi.c
- Fix a glitch in dequeueing and aborting requests on interrupt pipes.
- Add a flag in the request to determine if the data copying is done by
the driver or the usbdi layer.
Without this, ioctl commands for setting formats and speeds were
essentially ignored for simplex devices until the application actually
performed a read or write.
* Make sure that both channels are set in the SB mixer code and provide a
mixer table specifically for the ess18xx which supports the extended
accuracy available on this part.
* Fix a stupid bug in ess_format() which ignored the passed-in format and
changed the hardware based on the value which was set last time. This
meant that the hardware setting was often not set correctly at all.
* Add a custom identify driver for the ESS1888 which automagically detects
and adds the device in a pseudo-PnP way. This driver also emits the magic
sequence which enables the sound hardware after a hard reset, allowing
it to work correctly for the sound hardware of a PWS 433au (and probably
all other PWS class alpha machines).
With these changes, I was able to play back simple sounds on my 433au. I
have not tested recording or any other formats other than 8bit ulaw and
16bit stereo.
Make tuner on French SECAM Hauppauge cards work
Submitted by: Cyrille Lefevre <clefevre@citeweb.net>
Fix clipping bugs ready for Xv support in XFree86 4.0
Submitted by: Thomas Mueller <tmueller@thmu.de>
Fix the 'feature' where /dev/vbi needed to be opened before /dev/bktr
when using Teletext with Alevt and FXTV.
Requested by: Randall Hopper
Rename a few (I wish companies would stop buying each other)
Add a quirk entry for hubs that say they are self powered but are
in fact bus powered (usage in uhub follows shortly).
condition for Short transfers.
Change the scheduling to Depth first. We now transfer as many TD's as
possible from QH before moving to the next queue (Breadth first). It should
still be verified that this does not lead to starvation in a busy system
(in the case were transfers are added to the beginning of the control
or bulk queues).
It however posts a bogus button up event once in a while. Whenever
we receive dx=dy=dz=buttons=0 we postpone adding it to the queue for
50msecs with a timeout. If in the meantime something else is posted
the event is ignored.
This avoids the problem Nik Sayer reported. He noticed that X windows
would drop and pick up a window once in a while.
Thanks, Nik, for supplying me with the keyboard to fix the problem!
Try to use a 32bit mask on the IO addresses, this fixes the alpha
and hopefully doesn't break on any i386 machines.
Try to enable both read & write cache on disks, they should be as
default, but better be sure..
Fix a bug which could cause panics in ad/atapi-interrupt.
Add support for UDMA66 on Promise Ultra/Fasttrak controllers.
Get rid of ATA_IGNORE_INTR, and introduce ATA_WAIT_INTR instead.
Add a delay in the dump routine in ata-disk.c, some controllers
seem to need this. Also dont use the timeout watchdog when dumping.
Disable DMA on ATAPI devices as default, add option ATA_ENABLE_ATAPI_DMA
for those that has HW that works.
Add support for some not-up-to-spec ATAPI devices that returns data
together with completition status on data moving cmd's.
"rw" argument, rather than hijacking B_{READ|WRITE}.
Fix two bugs (physio & cam) resulting by the confusion caused by this.
Submitted by: Tor.Egge@fast.no
Reviewed by: alc, ken (partly)
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.
This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
test this support since I don't have the dongle for the card in
question and the dongle I have for my 3C589D doesn't seem to work on
it. I don't know if this is due to the damage I did to the 562 card
in transit from freebsdcon, or a mis-matched dongle...
Update AverMedia GPIO values
Submitted by: AverMedia
Add support for WinTV Theater Dolby Surround Sound DPL3518A chip
Submitted by: Frank Nobis <fn@radio-do.de>
Make PLL mode the default for Bt878s. You no longer need options BKTR_USE_PLL
pccard attachments must activate the resources they want to access.
ep didn't do this, so of course thee eeprom came back as busy. ed and
sio already did this. It was only due to a bug in the logic that the
probe succeeded. These problems have been fixed.
- Rip out all the static softc stuff and do softc allocation the right way.
- Rewrite most of the ISA code so that it provides a DEVICE_IDENTIFY
method to enumerate all non-PnP ISA devices.
This has the following consequences:
- No 'ep' devices may be hardwired.
- All hardwired devices will probably be detected twice.
By hardwired I mean:
device ep0 at isa? port 0x300 irq 10
- 'ep' devices are ordered by bus, slot, and then MAC address.
- Make 3c509B cards work in PnP mode. Yes, they really work.
- Convert over to using ifmedia for media selection. No more of this
lame 'linkX' stuff.
- Consolidate a lot of duplicated code.
- Make a stab at not breaking MII based PCCARD devices.
I doubt that the PCCARD stuff works any more than it did before my
changes but theres hope. My PCCARD hardware should arrive in a
week or so.
- Retreive the media settings from the card EEPROM rather than guessing.
I've got a 3c509-TPO that thinks its got an AUI port and if others
can report similar problems I'll write a bit of clever code that will
fix this but right now it works correctly on all but 1 card.
- Clean up a few things and make some cosmetic changes.
- Add myself as the MAINTAINER since nobody else wants to. I'm
in the best position to do this as I've got an example of most
of the cards:
EISA 3c579 bnc/aui
MCA 3c529 tp/aui
ISA 3c509 tpo
ISA-PnP 3c509B combo
If someone wants to send me a any cards I don't have I'd appriciate
it. Also welcome are 3c59x boards since I'll be folding if_vx and
if_ep at some point.
Shift to using the same queueing strategy that the amr driver uses.
Some simple tests indicate that we use about 2% of the CPU at around
500tps with the controller completely saturated with I/O.
the time spent at splbio(). We now avoid it unless we are actually
manipulating the command queues themselves. This doesn't improve
performance noticeably, but should improve concurrency somewhat.
(yet) compile and link. Renamed pcic back to pcic from pcicx, but
conditionalize its inclusion on pccard being included also. card is
the old and pccard is the new, which is a handy way to have both in
the tree at the same time.
Obtained from: newconfig project
More to follow...
incomplete and likely has problem. The code was originally pcmcia,
but I renamed it to pccard and made it compile on FreeBSD -current. I
converted SIMPLEQ to STAILQ as well as a few sc->dev.xname ->
device_printf changes. This is a green port of fairly mature code.
I derived this work from the FreeBSD newconfig project
(http://www.jp.freebsd.org/newconfig). Any problems with it are
likely introduced by me.
Obtained from: newconfig project
if_fe.c uses PCCARD_MODULE() and is part of GENERIC. I've #ifdef'ed out
the #include of "card.h" to hopefully disable pccard support in this
driver until it can be converted. I'm not positive this will fix make
release, but it can't possibly make it any worse than it is now.
I hope this stuff settles down soon.
yet, but that should be resolved shortly. Non memory mapped ed
devices should work, but I cannot test this since my only ed card is
memory mapped.
Submitted by: Matt Dodd <mdodd@freebsd.org>
I'm committing this from a laptop running this driver. Have only one
devclass for all ep devices (at least for pccard and eisa) so unit
numbering is sane. Might not work with both isa and non-isa devices
on the same system until ep is updated (Matt has some patches in the
pipeline which should resolve this, he wanted me to commit this so he
can resolve any conflicts against cvs rather than my patches).
Reviewed by: Matt Dodd <mdodd@freebsd.org>
by Peter Wemm, but I've not merged all the changes he sent to me yet.
This has not been reviewed by bde, so I'm committing to resolve any
issues he has with this when he returns from FreeBSD CON 99.
I've had four reports of this working for them. I've been able to
communicate to both my built in modem and a pccard modem with these
patches.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.
Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from: Whistle CVS tree
it has the same value on all platforms. Previously it was just under
3 seconds on x86 (typically hz<=128) and just under 1/3 of a second on
alpha (typically hz>=1024). This covers up a race between ad_interrupt()
and ad_timeout() which is being looked into.
reviewd by: sos
bootup. Somehow my backout of an abortaive attempt at shared
memory autoconfiguration included this line:
sc->mem_shared = 1;
Which is fairly important as it turns out.
Since I performed my pre-commit testing on a different box with a generic
NE2000 I didn't catch this. Pointy hat.
Put splbio protection around the main launch loop. We've seen cases where
the bottom half was cutting off the branch on which we're sitting.
Experienced-by: Michael Reifenberger <root@nihil.plaut.de>
have you is prototyped). Removed code versions in md struct- not used
any more. Allocate transfer dma maps and xflist stuff in mbxdmasetup based
upon isp->isp_maxcmds. Allow for multiple calls to mbxdmasetup (for
isp_reset cases).
file later. Do some pencil-sharpening types of minor changes. Change
how active commands are remembered (using new inline functions to get
handles, etc..). Now do a GET FIRMWARE STATUS after firing up the f/w as
outgoing mailbox 2 will tell you the f/w's notion of the max commands
that can be supported. Attempt to retrieve loop topology. Add in the
appropriate SWIZZLE/UNSWIZZLE macros calls (this is a no-op on Little
Endian machines but is needed for sparc (on other platforms)). Move
the temp port database we use to find out where things have moved to
after a LIP to the softc and off the kernel stack. Follow Qlogic's
hint and don't bother setting a tag for commands that don't have
this enabled (presumably the f/w will do it's own selection then).
Use an INT_PENDING macro to check for an interrupt. The call to
ISP_DMAFREE now just takes the handle- not the 'handle-1' which was
a layering violation. Use CFGPRINTF in a couple of places to make
things less chatty if not booting verbose, or CAMDEBUG compiles, etc..
where it defaults to one. Change simq width allocation to the max number
of commands supported by the HBA after f/w fires up- not the constant
MAXISPREQUEST value. Do some stylistic changes.
Add in null SWIZZLE definitions. Add in CFGPRINTF define. Change default
debug level to refer to an external isp_debug variable. Remove inline
functions as they're now in isp_inline.h and include that file.
the result queue length is never less than 64. Move (ick) temp port
database used for post-LIP merging off the kernel stack and put it
into the softc. Remove some target mode stuff which will come back
later in a different file. Change how the list of outstanding commands
are stored (now allocated at mailbox setup time to be just enough for
the max for a specific HBA which can vary). Keep a rotating seed of
the last index for this in the softc. Increase the count of active
commands from 10 to 16 bits.
- Generally clean things up.
- PnP now supported.
Will convert to bus_space, ifmedia and add a DEVICE_IDENTIFY() method
for autodetection. As it stands
device ex0 at isa0
should find a card if one is present.
I feel less dirty now.
In order to make this work, I created a pseudo-PHY driver to deal with
Macronix chips that use the built-in NWAY support and symbol mode port.
This is actually all of them, with the exception of the original MX98713
which presents its NWAY support via the MII serial interface.
The mxphy driver actually manipulates the controller registers directly
rather than using the miibus_readreg()/miibus_writereg() bus interface
since there are no MII registers to read. The mx driver itself pretends
that the NWAY interface is a PHY locayed at MII address 31 for the sole
purpose of allowing the mxphy_probe() routine to know when it needs to
attach to a host controller.
32 bytes is safe.
Handle successful completion of message log retrieval commands.
With these changes, the driver correctly handles the consequences of drive
death and replacement in a reliable array. Note that the massive backlog
of I/O during handling of such an event can kill the system if softupdates
is enabled.
Without it the kernel config options, like OVERRIDE_TUNER, where not
getting passed to the driver.
Bug noticed by: Marc Fonvieille <fonvi@club-internet.fr>
now lives in the respective bus front end files.
- Add various function prototypes to if_edvar.h
- Clean up some debugging code that snuck into if_ed_isa.c
- Turn on the right bits in files.i386
* Change the hack used on the alpha for mapping devices into DENSE or
BWX memory spaces to a simpler one. Its still a hack and should be
a seperate api to explicitly map the resource.
* Add $FreeBSD$ as necessary.
PJ cards. This will probably also support the AcceleRAID and
eXtremeRAID cards, but nobody has volunteered one for testing, so I
haven't enabled their PCI device IDs.
Slightly clean up communication between the disk devices and the
controller device as per new practice, and move some more register-
related items int mlxreg.h from mlxvar.h.
Remove some unnecessary read-modify-write operations to the card
control registers; they don't behave like that.
Increase the status polling interval to 10 seconds. It's still possible
to load the card up to the point where a status poll will find the
previous poll still running, but this will reduce the incidence of
complaints.
maximum of 64 kB.
vinum_conf, struct drive: add fields for the current number of active
requests and the maximum ever active.
struct sd: Add fields for initialize progress.
struct mc: set the size of saved file names to MCFILENAMELEN instead
of the previous explicit constant.
limit the number of outstanding requests on a specific drive and
overall.
Change the way we set the active request count. This enables us to
start the requests without being in splbio for the duration, which
could be very long for IDE drives in PIO mode.
context. Be prepared to fail instead.
MMalloc, FFree: ensure that saved file names are properly terminated.
Use MCFILENAMELEN instead of the previous explicit constant.
and then doing it itself, resulting in a panic downed drives.
Sleuth-work-by: Christopher Masto <chris@netmonger.net>
Remove dummy function initsd, which is now (implemented) in
vinumrevive.c
vinum_scandisk: Check that a drive is up before reading from it. This
is probably excessive paranoia.
Rather than teaching pci_ioctl about hoses, we just pass down a magic number
& let the platform code figure out what the hose is based on what the bus
number is.
concept approved by dfr
resource_list_release. This removes the dependancy on the
layout of ivars.
* Move set_resource, get_resource and delete_resource from
isa_if.m to bus_if.m.
* Simplify driver code by providing wrappers to those methods:
bus_set_resource(dev, type, rid, start, count);
bus_get_resource(dev, type, rid, startp, countp);
bus_get_resource_start(dev, type, rid);
bus_get_resource_count(dev, type, rid);
bus_delete_resource(dev, type, rid);
* Delete isa_get_rsrc and use bus_get_resource_start instead.
* Fix a stupid typo in isa_alloc_resource reported by Takahashi
Yoshihiro <nyan@FreeBSD.org>.
* Print a diagnostic message if we can't assign resources to a PnP
device.
* Change device_print_prettyname() so that it doesn't print
"(no driver assigned)-1" for anonymous devices.
their HotRod controller and on SIIG PCI ultra DMA controller. These
changes also made lots of the Promise code go away, its all much more
generic this way.
Get rid of atapi_immed_cmd, instead use the queue to move atapi commands
from interrupt context if nessesary, the entire atapi layer has
gotten an overhaul.
Lots of fixes to utililize the new features in subr_disk.c etc, and
get rid of the last biots of softc arrays in the drivers, the
only one left is atadevices which cannot easily go away (yet).
Use our own malloc names, its a lot easier to track memory usage this way.
General cleanup overall.
- Work around a problem not yet solved in the tree (but solved in mine.)
device_get_ivars() should never be cast to a struct resource_list *
The solution, under review, involves the creation of a
device_get_resource_list() function. More later.
configuration information from a DPT card at a given port.
This is needed by the ISA bus front end (still to come) and the EISA
bus front end (which hasn't ever worked).
- Blow away dpt_eisa.h as the information it contains does not justify
an additional file.
- Convert dpt_eisa.c to use the onboard config instead of trying to
read the EISA configuration registers.