Commit Graph

3437 Commits

Author SHA1 Message Date
Søren Schmidt
7dfec6b427 Oops, committed the wrong file.. 1999-11-26 20:05:11 +00:00
Søren Schmidt
30f5b2a68e Fix atapi_wait_ready, it returned prematurely.
Less verbosity on non-fatal errors.
1999-11-26 19:26:04 +00:00
Søren Schmidt
a150cc4284 Tidy up the VIA support a bit, make it more generic. 1999-11-26 19:24:26 +00:00
Daniel C. Sobral
1b6ef0a40c Add id for ESS 1869 OEM to Compaq on Presario 1621. 1999-11-26 18:58:03 +00:00
Bill Paul
dda0e6f54e Update the WaveLAN/IEEE driver:
- 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.
1999-11-25 20:45:49 +00:00
Seigo Tanimura
5d6784867c Attach the resources as given in the configuration in a proper way
for non-PnP cards.

Noticed by:	Pascal Hofstee <daeron@shadowmere.student.utwente.nl>
1999-11-25 01:13:52 +00:00
Søren Schmidt
3082a6dc59 Add DMA support for the VIA 82C586 & 82C686 chips, also rearrange
to fall back to slower speeds if the faster ones fails to probe.

Log and retry request on UDMA CRC errors.

Fix a couple of warnings.
1999-11-24 21:40:05 +00:00
Cameron Grant
54671c035c fix panic for large writes in non-blocking mode 1999-11-22 21:16:01 +00:00
Cameron Grant
29618c3ae2 fix mixer to return properly scaled values 1999-11-22 16:20:48 +00:00
Nick Hibma
c577d56d33 Feh, kind of went wrong the previous commit. dev should child (in some
cases) plus a typo.
1999-11-22 14:39:21 +00:00
Poul-Henning Kamp
38224dcd59 Convert various pieces of code to use vn_isdisk() rather than checking
for vp->v_type == VBLK.

In ccd: we don't need to call VOP_GETATTR to find the type of a vnode.

Reviewed by:    sos
1999-11-22 10:33:55 +00:00
Seigo Tanimura
125fdb9848 Comment out the newmidi stuff. 1999-11-22 10:28:05 +00:00
Seigo Tanimura
fe1a5d1c2f - Introduce the bridge drivers for Sound Blaser, GUS and Crystal
Semiconductor CS461x/428x.
- Add support for GUS and CS461x/428x pcm.

Bridges reviewed by:			dfr, cg
GUS non-PnP support submitted by:	Ville-Pertti Keinonen <will@iki.fi>
GUS PnP support tested by:		Michiru Saito <mich@mtci.ne.jp>
1999-11-22 06:07:49 +00:00
Nick Hibma
aa7e2ba7b6 Move the pretty printing of the description for USB controllers to
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.
1999-11-22 03:34:43 +00:00
Nick Hibma
66272d3701 Remove some bogus bus methods peter added. We are hardly doing
anything as a bus.
1999-11-22 03:22:43 +00:00
Nick Hibma
937791192a Addition of new fields to the usb_devinfo struct to enable the new
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.
1999-11-21 17:30:42 +00:00
Nick Hibma
88ea580e34 Revoke the vnodes on detach. This avoids the crashes people have seen
when moused was still running when the mouse was detached.

Convert uhid to use make_dev while I am there. Ugen still needs to be
converted.
1999-11-21 17:25:30 +00:00
Nick Hibma
6c1119c8a5 Enclosed the arguments of binary and in brackets. 1999-11-21 17:22:30 +00:00
Cameron Grant
e479a8af2a fix for -fno-builtin
PR:		kern/14278
1999-11-21 17:15:12 +00:00
Peter Wemm
959b26f66f These files have been repo-copied to dev/sound/* (making way for pcm
and midi to share the backend files).
1999-11-21 15:58:07 +00:00
Matt Jacob
38dace9790 Clean up stupidity in the isp_handle_other_response function- indexes
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...
1999-11-21 03:18:22 +00:00
Matt Jacob
6db20c3127 Add storage/access for a default WWN. A miscellaneous tweak or two. 1999-11-21 03:15:11 +00:00
Matt Jacob
840e8002a0 Add a isp_getrqentry inline function (that is, find the next available
request queue entry if any are left).
1999-11-21 03:14:04 +00:00
Matt Jacob
80ae565585 Fix some includes for when we (eventually) get target mode working again.
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.
1999-11-21 03:12:58 +00:00
Matt Jacob
28e9826fd4 Put *back* the f/w, this time with a BSD style licence as approved
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 (:-)).
1999-11-21 03:08:29 +00:00
Matt Jacob
9637d68c97 Fix dmasetup functions to have 16 bit queue indices. Get the chip revision
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.
1999-11-21 02:56:17 +00:00
Poul-Henning Kamp
95f1a897f9 Teach the md driver to use preloaded files of type "md_image". 1999-11-20 22:43:27 +00:00
Bill Paul
5fb449fd94 Minor tweak: the subsystem device ID code for the quad port 62044 card
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.)
1999-11-20 18:29:44 +00:00
Cameron Grant
ef9308b1ce repo-copied to make way for newmidi, this commit updates include paths 1999-11-20 16:50:33 +00:00
Peter Wemm
5ab0514321 Allow NULL for startp and/or countp in bus_get_resource() so that you can
get one of the two without having to use a dummy variable.
1999-11-20 14:56:55 +00:00
Matthew N. Dodd
cb5d0c333f I forgot to remove the "NCARD == 0" hacks that kept this driver
from blowing up on PCMCIA systems.  The hack isn't needed anymore.

Reminded by: Blaz Zupan <blaz@gold.amis.net>
1999-11-20 09:28:01 +00:00
Warner Losh
2cb5caa767 Latest incremental efforts on newcard:
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.
1999-11-20 07:23:28 +00:00
Warner Losh
b1ef7ecbc7 Kill unneeded #includes. They were left over from the short period of
time when a strcmp against the device name was required.  Sio patches
sent to peter for review.
1999-11-20 05:16:14 +00:00
Nick Hibma
6c20390aa7 Make the event creation work
- Create the /dev/usb event queue device node.
- Add usbread to the cdevsw.
- Also hide the many minor() behind a USBUNIT macro.
1999-11-19 13:13:28 +00:00
Julian Elischer
2045179917 fix braino.. line misplaced. 1999-11-19 09:19:44 +00:00
Søren Schmidt
bb8f8c633e Loose ad_sleep, its of no use anymore. 1999-11-19 08:21:15 +00:00
Roger Hardiman
39d409c9e1 Rename es1370.c to es137x.c and merge in the patches to support
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
1999-11-19 07:29:10 +00:00
Julian Elischer
6822ccd6e7 protect some more operations with splimp() under Netgraph. 1999-11-19 05:37:37 +00:00
Nick Hibma
5630d3135e Add usbdevs and friends. 1999-11-18 18:02:44 +00:00
Yoshihiro Takahashi
663631a5eb Set port_used and mem_used to the resource size instead of 1.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-11-18 14:18:19 +00:00
Nick Hibma
3d45ad67b2 Change the clist reservation from 0 to buffer size.
Submitted by:  mmoeller@infolibria.com
1999-11-18 12:50:48 +00:00
Nick Hibma
c907e117dd Missed a name change. 1999-11-18 12:45:09 +00:00
Peter Wemm
592b1c00b5 Argh, don't turn the IIR test on unless it's a pccard. These tests mess
up the subsequent probes.
1999-11-18 10:29:06 +00:00
Alfred Perlstein
1c01270e7a remove PCATCH from a tsleep that isn't checked for (avoid infinite loop).
this needs to be revisited.
1999-11-18 08:57:03 +00:00
Peter Wemm
4e250a4b87 Fix some -Wunused warnings 1999-11-18 08:43:58 +00:00
Peter Wemm
4a6eb2cc6c Fix a warning. 1999-11-18 08:39:02 +00:00
Peter Wemm
609d21b734 Fix some warnings. 1999-11-18 08:32:02 +00:00
Warner Losh
6698366077 Sync to latest cardbusdevs file 1999-11-18 07:22:59 +00:00
Peter Wemm
1447114333 Merge some typo fixes from dev/sio/sio.c (siostop -> comstop)
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).
1999-11-18 07:22:41 +00:00
Warner Losh
c6793aa821 Raw import of newconfig cardbus code. This is effectively an import,
so the code doesn't compile.  I added $FreeBSD$ headers.
1999-11-18 07:21:51 +00:00
Peter Wemm
e92f63a277 Remove cdevsw_add() - the make_dev() calls are already there.
Don't '#if NSNP > 0' around the thing as it's silly and not required.
config(8) only causes it to be compiled if NSNP is > 0 by definition.
1999-11-18 06:39:47 +00:00
Peter Wemm
71718a6a22 Convert smb to use make_dev() rather than cdevsw_add(). This stops the
annoying 'smb is usurping smb's cdevsw' type messages.  (Yes, there are
other ways to fix cdevsw_add(), but that is a doomed api)
1999-11-18 05:44:56 +00:00
Peter Wemm
38703ed315 Convert iic to use make_dev() rather than cdevsw_add(). This stops the
annoying 'iic is usurping iic's cdevsw' type messages.  (Yes, there are
other ways to fix cdevsw_add(), but that is a doomed api)
1999-11-18 05:43:32 +00:00
Peter Wemm
8de0675c61 Tidy up a few loose ends in the fifo setup code.
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).)
1999-11-18 05:15:09 +00:00
Warner Losh
e1a0be5f8c o Remove #if XXX from around the probe code.
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.
1999-11-17 23:54:39 +00:00
Nick Hibma
3241be7550 Synchronisation with NetBSD as of 1999/11/16:
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.
1999-11-17 22:33:51 +00:00
Cameron Grant
98d83734f4 this is a full fix for writes not aligned to the sample size selected.
should be a no-op in most cases.
1999-11-15 23:57:33 +00:00
Cameron Grant
0513a1a1cb set default ogain to 50 since some sb cards produce no sound at 0 1999-11-15 23:22:52 +00:00
Peter Wemm
0ff3bc32a8 Fix a typo in the DRIVER_MODULE() declaration which caused a collision
with the real mss module.
1999-11-15 17:03:30 +00:00
Peter Wemm
6e96409f68 Remove duplicate entry for ADS7180 - it's meant to be handled by the
forked-off ad1816 driver.
1999-11-15 17:02:32 +00:00
Doug Rabson
890970b27b Remove some printfs and make it slightly more paranoid about accepting
that an ess1888 is present.
1999-11-15 08:18:24 +00:00
Doug Rabson
62c631ed7f * Ignore the wierd fakechan workarounds for simplex in dsp_ioctl().
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.
1999-11-13 18:31:31 +00:00
Roger Hardiman
753d64dfbb Update to driver 2.05
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
1999-11-13 14:54:00 +00:00
Nick Hibma
2c15f8aa97 Add many new devicelabels
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).
1999-11-12 23:31:03 +00:00
Nick Hibma
0e46cd3e22 Fix the computation of the status of the transfers. It never saw a STALLED
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).
1999-11-11 22:32:55 +00:00
Nick Hibma
babd82dfa2 Avoid the usurping message 1999-11-11 17:36:33 +00:00
Doug Rabson
427ccf0071 Add code to support ISA PnP. 1999-11-11 08:48:40 +00:00
Søren Schmidt
5c7e184349 Dont listen to disks that say they can only do 0 sector transfers. 1999-11-10 19:37:00 +00:00
Søren Schmidt
6e82e8be6d Make the atapi device return sensible errno's back to userland.
Dont panic if a nonexistant device is opened.
1999-11-10 07:13:51 +00:00
Kazutaka YOKOTA
cc5c7f76de Correctly record the mouse position in the current VTY. 1999-11-09 12:35:36 +00:00
Nick Hibma
0b0f3f6c3d The Qtronix keyboard has a built in PS/2 port for a mouse.
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!
1999-11-08 23:58:33 +00:00
Nick Hibma
25ead8013f Add QTronix keyboard with PS/2 mouse connector 1999-11-08 23:50:00 +00:00
Nick Hibma
396f1f268d remove superfluous header include
Submitted-By:	phk
1999-11-08 23:47:34 +00:00
Søren Schmidt
838b8e23b9 Unbreak ATAPI on the Aladdin chipset, only DMA access worked.
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..
1999-11-08 21:36:00 +00:00
Nick Hibma
031911c604 Remove superfluous header file includes
Remove definition of initialiser.

Some clean up.
1999-11-08 21:12:25 +00:00
Nick Hibma
24b4921ad1 Remove superfluous header file includes.
Pushed-By:	phk
1999-11-08 21:06:21 +00:00
Kazutaka YOKOTA
51ebcb230e - Added a new kernel configuration option: SC_TWOBUTTON_MOUSE.
The new option will make the right mouse button the `paste' button.
  Useful for two button mice.

Submitted by: morganw@engr.sc.edu (Wes Morgan)
1999-11-08 10:04:29 +00:00
Kazutaka YOKOTA
73027df75c - Removed SC_VIDEO_DEBUG. It is broken and useless now. 1999-11-08 09:57:16 +00:00
Peter Wemm
80855566e2 Use cdevsw_add() explicitly and DRIVER_MODULE(). 1999-11-08 07:57:03 +00:00
Peter Wemm
91bbda5f1f Call id_drvinit() from attach, not probe as the OS hasn't necessarily
decided which driver to use until attach.  Use DRIVER_MODULE().
1999-11-08 07:56:10 +00:00
Poul-Henning Kamp
44d1184e81 Rename remove_dev() to destroy_dev().
Nagged about by:        msmith
1999-11-08 07:44:01 +00:00
Peter Wemm
c6b92dec5e Use (temporarily) cdevsw_add() so we can change from DEV_DRIVER_MODULE()
to DRIVER_MODULE().
1999-11-08 07:37:15 +00:00
Peter Wemm
475ad603bb Use cdevsw_add() (temporarily) to avoid DEV_DRIVER_MODULE(), since the
make_dev()'s that are there are not enough.
1999-11-08 07:32:06 +00:00
Peter Wemm
1faa5a84a8 Use DEVICE_MODULE() directly instead of DEV_DRIVER_MODULE. psm.c uses
make_dev() already.
1999-11-08 07:29:23 +00:00
Peter Wemm
b09ce13f07 Use cdevsw_add() explicitly as a workaround for DEV_DRIVER_MODULE().
This should be changed to use make_dev() at some point.
1999-11-08 07:24:55 +00:00
Peter Wemm
8cd932769f No need to use DEV_DRIVER_MODULE() since the bktr driver calls make_dev().
Roger: Feel free to change or spam this as you please.
1999-11-08 07:20:07 +00:00
Peter Wemm
bda20b64e4 ulpt.c and ums.c already uses make_dev(), so there's no need to use the
(presently broken) DEV_DRIVER_MODULE().  Use DRIVER_MODULE() directly.
1999-11-08 07:10:48 +00:00
Peter Wemm
bb63a8f5a5 Update the stream socket fileops table to match fo_stat() additions. 1999-11-08 03:34:53 +00:00
Poul-Henning Kamp
d53dedee55 Remove the devsw magic from DEV_MODULE() 1999-11-07 10:01:17 +00:00
Seigo Tanimura
35e6a54a31 Conserve stereo mode in ioctl SNDCTL_DSP_SETFMT.
PR:		14372
Submitted by:	Mattias Pantzare <pantzer@ludd.luth.se>, Ville-Pertti Keinonen <will@iki.fi>
1999-11-07 04:15:30 +00:00
Søren Schmidt
3de25e2f32 Fix IRQ allocation bug on controllers using a shared interrupt.
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.
1999-11-06 16:50:21 +00:00
Matthew N. Dodd
61f676b449 resource_list_{alloc,release}() takes a struct resource_list * as its
first arg.

Reminded by:	Andy Farkas <andyf@speednet.com.au>
1999-11-06 07:38:01 +00:00
Seigo Tanimura
05b17b64dc The unit of sndstat is fixed to zero. 1999-11-06 05:31:47 +00:00
Andrew Gallatin
a3f09ae6e1 Remove calls to alpha_register_pci_scsi(). After Mike's recent boot
changes, it no longer exists and is preventing alpha kernels from building.

reviewed by: msmith
1999-11-05 13:10:39 +00:00
Andrew Gallatin
870c4cf8eb now that a map's base addr is 64-bits, the alpha multi-hose hack needs
to be cast to 64-bits in pci_add_map.  This should allow XP1000s and
DS20s to boot -current again.
1999-11-03 22:43:03 +00:00
Greg Lehey
4e449fe462 Emergency fix to stop world breakage.
Broken-by:	archie
1999-11-03 20:04:00 +00:00
Poul-Henning Kamp
5b664c7c13 Move isfoo() and friends to the newly created sys/ctype.h.
Urged by:       bde
1999-11-03 17:54:26 +00:00
Matthew N. Dodd
5178bd8bde Fix bus_setup_intr(); I changed exintr() to take a pointer to ex_softc
but didn't change bus_setup_intr() to pass the softc in.

Submitted by:	Warner Losh <imp@village.org>
1999-11-03 15:45:14 +00:00
Seigo Tanimura
083279e41b Fix for multiple pcm devices. 1999-11-03 08:10:49 +00:00
Archie Cobbs
44b4dd855d Consolidate some of the various ctype(3) macros in one location. 1999-11-02 22:50:34 +00:00
Archie Cobbs
2ea6270424 Change isspace() macro name to avoid conflict. 1999-11-02 22:42:56 +00:00
Archie Cobbs
da5e3849b2 Fix typo in previous commit. 1999-11-02 22:24:41 +00:00
Mike Smith
97adfbaf83 Correctly compute the block count. In reality, it seems that the
controller will never return the command if it's not exactly a multiple
of a block in size.

Cosmetic formatting for RAID level output.
1999-11-02 03:25:24 +00:00
Mike Smith
83f2409369 Don't print the chipset value; it's not useful.
Now we know what some of the state values are, print the current array
state.
1999-11-02 03:24:09 +00:00
Jonathan M. Bresler
aab735d218 fix misordering of two lines in this file. 1999-11-02 02:19:24 +00:00
Nicolas Souchu
7a19171479 Sync with RELENG_3. 1999-11-01 23:15:29 +00:00
Bill Paul
8562ad200e Do some more work on the mxphy pseudo-driver to make it better at media
detection and remove the long delays that I had used previously. Everything
should be handled by timeouts now.
1999-11-01 17:10:26 +00:00
Seigo Tanimura
1134623173 Call make_dev() to shut up the warning.
Pointed out by:	Donn Miller <dmmiller@cvzoom.net>
1999-11-01 14:29:07 +00:00
Julian Elischer
17f3711323 User netgraph typedefs for methods 1999-11-01 10:09:34 +00:00
Matt Jacob
fdc79fd3fc correct moronic typo 1999-11-01 04:39:52 +00:00
Jonathan M. Bresler
4b9943106b rearrange order of tests for NE1000, NE2000, and Linksys
cards.   previous order caused computers with NE2000 cards
        to hang during boot.
1999-11-01 01:16:56 +00:00
Yoshihiro Takahashi
b81cbfc4af Change Linksys registers base/offset.
On NEC PC-98, asic_addr != nic_addr + 0x10.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-10-31 09:05:20 +00:00
Seigo Tanimura
b3dde4ea8e The total uiomoved size is accumulated in c, not tmp. 1999-10-31 08:58:51 +00:00
Matt Jacob
fed92c475e Organize things to cope with the (possible) lack of downloadable
firmware a bit better.
1999-10-30 19:35:11 +00:00
Matt Jacob
57dd0656a5 Remove firmware from tree until a better copyright from Qlogic is forthcoming. 1999-10-30 19:33:45 +00:00
Matt Jacob
03322f8625 Use pointer to f/w in md structure as to whether f/w exists or not.
If firmware length isn't specified, extract from the 4th short into
the firmware.
1999-10-30 19:32:44 +00:00
Poul-Henning Kamp
02c58685a4 Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"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)
1999-10-30 06:32:05 +00:00
Poul-Henning Kamp
7254edcfaf Don't test boolean return against != 1.
Don't needlessly assign the error variable in an if statement.
1999-10-29 19:03:18 +00:00
Poul-Henning Kamp
923502ff91 useracc() the prequel:
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.
1999-10-29 18:09:36 +00:00
Warner Losh
e653ecce87 Disable old PCCARD_MODULE code.
This should fix LINT.

Prompted by: phk's explicit message about LINT breakage
1999-10-29 17:28:09 +00:00
Semen Ustimenko
1d45e38736 Added code to enable BusMaster operations.
Kurt D. Starsinic <kstar@chapin.edu> had reported
this patch fixing strange behaviour (like timeouts
and RX/TX DMAs stopping errors).
1999-10-29 09:56:52 +00:00
Warner Losh
5eafefaf7a Add (untested) support for the 3C562D/3C563D. I have been unable to
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...
1999-10-29 06:27:07 +00:00
Roger Hardiman
56597309fa Update to driver release 2.04
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
1999-10-28 13:58:17 +00:00
Doug Rabson
f8ef46e907 Fix some resource allocation peculiarities of the intpm device. 1999-10-28 08:06:59 +00:00
Warner Losh
c864a1a7e8 Fix identify code. This also fixes the eeprom messages.
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.
1999-10-28 06:12:58 +00:00
Luoqi Chen
4b80d3dd0b Bug fix: allow reset device command to complete. 1999-10-28 05:28:00 +00:00
Warner Losh
806338b15d Last change to pccard_nbk now obviates the need to check the name of
the device in question.
Also fix warnings on if_ep_pccard.c
1999-10-28 05:06:14 +00:00
Warner Losh
12e0beb470 Add comments to Linksys probe code.
Add another OUI to those acceptible to linksys (this check may need to
be removed).
A couple of style(9) nits.
1999-10-28 04:53:46 +00:00
Matt Jacob
2668d67e9c I was misinformed. I cannot get away from specifying tags for FC. Some devices
are happy w/o them- some are unhappy (IBM drives).
1999-10-28 02:48:42 +00:00
Matthew N. Dodd
79a9057038 HEADS UP! All 3c5x9 users!
- 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.
1999-10-27 06:25:16 +00:00
Warner Losh
fac207b0b2 Make these compile. Next step is to connect newbus plumbing. 1999-10-27 05:24:09 +00:00
Mike Smith
4b006d7bb7 Move some hardware-related items to the hardware-related header.
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.
1999-10-26 23:20:43 +00:00
Mike Smith
ba2ace5164 Change the queueing model used by the controller to drastically reduce
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.
1999-10-26 23:18:57 +00:00
Jonathan M. Bresler
6d193c9936 add support for LinkSys 10/100 cards
new code is conditionalized by the vendor's ethernet OUI

Obtained from:	PAO Project
1999-10-26 23:03:45 +00:00
Matt Jacob
83d62096d6 nuke a debug printout I thought I had already nuked 1999-10-26 22:25:13 +00:00
Luoqi Chen
9da0c0ca63 Fix a typo which would result a bad REQUEST SENSE command be sent to
a device at lun != 0.

Enable tagged queueing (should it be spelled as queuing?) by default.
1999-10-26 22:11:45 +00:00
Warner Losh
dc781fe4ff Very preliminary pcic device support. Will make depend, but won't
(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...
1999-10-26 16:53:57 +00:00
Doug Rabson
4ed33d1537 Make sure we add an interrupt resource if intline!=255. 1999-10-26 07:40:41 +00:00
Warner Losh
c2380338f0 Moderately hacked pccard code from newconfig. It is somewhat in
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
1999-10-26 06:52:31 +00:00
Julian Elischer
3bfb36efc0 Make it compile inthe NETGRAPH case. 1999-10-25 23:14:04 +00:00
Bill Paul
b7da85ec26 Make release is now falling over in if_fe.c due to Warner's pccard changes:
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.
1999-10-25 17:04:17 +00:00
Warner Losh
99ad33d010 Have only one attach routine, rather than two.
Remove debug printfs.

This should allow the ed driver to work when memory mapping works again.
1999-10-25 06:15:45 +00:00
Warner Losh
822ddbd8f7 MIN unused, so kill it 1999-10-25 04:28:53 +00:00
Warner Losh
e3132c8373 Add pccard attachment. This won't work with memory mapped ed devices
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>
1999-10-25 02:55:14 +00:00
Warner Losh
758b76dc94 Add newbus attachment for pccard driver. Heavily tested by me, and
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>
1999-10-25 02:52:16 +00:00
Warner Losh
a57cd933dc Add newbus pccard attachment for sio. Some of this code was written
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.
1999-10-25 02:46:52 +00:00
Matthew N. Dodd
e3f7c52da1 Fix compiling PCCARD kernels.
This is a hack and I don't like it.

Hopefully the new PCCARD stuff should be in working order in a day or so.
1999-10-24 07:17:26 +00:00
Mike Smith
cd4ace0c76 Use the physical block number, not the logical block number, for I/O
operations.  The latter only works where the partion begins at the bottom
of the disk.  Whoops.

Submitted by:	Chris Csanady <cc@137.org>
1999-10-22 20:55:15 +00:00
Matt Jacob
5e73516b7b remember to initialize mailbox 2 for FC isp bus resets 1999-10-22 17:03:03 +00:00
Luoqi Chen
cb6c99d54e A few improvements and cleanups. 1999-10-21 21:15:02 +00:00
Luoqi Chen
86a4b08dc7 Non-functional changes. Add some comments before I start to forget how
everything works myself.
1999-10-21 15:49:25 +00:00
Julian Elischer
4cf49a4355 Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
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
1999-10-21 09:06:11 +00:00
Luoqi Chen
81ef553683 Adaptec 6260/6360 CAM driver. 1999-10-21 08:56:53 +00:00
Andrew Gallatin
ca4e37e1cf Increase the timeout to be 3*hz. This recalibrates the timeout so that
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
1999-10-18 17:55:38 +00:00
Matthew N. Dodd
c769df5b65 This fixes the problem with SMC NE2000 cards hanging the box on
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.
1999-10-18 04:27:33 +00:00
Greg Lehey
5c920f6765 sdio_done:
Set the errors in the correct buffer header.

Inspection-provoked-by: Bernd Walter <ticso@cicely.de>
1999-10-17 23:56:47 +00:00
Greg Lehey
54cd2d3309 launch_requests:
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>
1999-10-17 23:55:10 +00:00
Matt Jacob
a95ae1936f Add in inclusion of machine/md_var.h (so alpha_scsi_bus_register or what
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).
1999-10-17 19:03:11 +00:00
Matt Jacob
fc0685ea06 Remove some target mode stuff. It will get re-introduced in a different
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..
1999-10-17 18:58:22 +00:00
Matt Jacob
ab6c4b31c6 Add in isp_debug variable. It defaults to zero unless CAMDEBUG is defined
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.
1999-10-17 18:50:47 +00:00
Matt Jacob
67b6f02b5e Roll platform major && minor (major now tracks FreeBSD major release).
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.
1999-10-17 18:48:16 +00:00
Matt Jacob
7e90346eec Roll core version number. Do some stylistic changes. Ensure that
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.
1999-10-17 18:45:31 +00:00
Matt Jacob
b996239f46 add in an INT_PENDING macro 1999-10-17 18:41:47 +00:00
Matt Jacob
327d3cc65b Remove target mode definitions (they'll come back later in
a different file).
1999-10-17 18:41:21 +00:00
Matt Jacob
f4e5fd3676 Add a file where inline functions for the Qlogic isp cards can go. This reduces
duplication in all the platform specific header files.
1999-10-17 18:15:05 +00:00
Matt Jacob
1b50f40613 roll 10[24]0 and 1080/12X0 f/w 1999-10-17 18:09:34 +00:00
John Hay
9c21293f55 Add support for the PCI version of the Digi SYNC/570i cards. 1999-10-17 09:40:04 +00:00
Doug Rabson
9091387f87 Correct a stupid type which prevented us from working with any device
which needed port resources.
1999-10-17 06:48:47 +00:00
David E. O'Brien
13bdeaf987 The CTL0044 is more properly known as a "Creative SB AWE64 Gold". 1999-10-16 15:57:33 +00:00
Doug Rabson
d8517c5437 Relax the check for class=storage, subclass=ide to just class=storage.
This allows ata to probe correctly for the HPT366 on Abit's BP6.
1999-10-16 09:00:49 +00:00
Matthew N. Dodd
9f69cadf84 - Convert this driver to newbus.
- 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.
1999-10-16 06:26:44 +00:00
Bill Paul
ed8c6514c4 Convert the mx driver to miibus.
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.
1999-10-16 05:24:13 +00:00
Mike Smith
33c8cb18b3 Use a much larger buffer for message log retrieval until we are sure that
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.
1999-10-16 03:21:20 +00:00
Mike Smith
466454bd7b Fix mlx_diagnose_command so that it actually works. I can't believe this
has been broken since implemented.
1999-10-16 03:08:46 +00:00
Mike Smith
7382092841 Save the drive device_t so that we can print it later. 1999-10-16 01:47:46 +00:00
Mike Smith
f01f2af67a Save the drive device_t correctly so we can print it later.
The drive number is 5 bits, not 4, in the read/write command.
1999-10-16 01:46:59 +00:00
Matt Jacob
042ebb911e Until we actually support SBus, there's no reason to keep the f/w in the tree. 1999-10-15 19:00:50 +00:00
Roger Hardiman
dea6f3fbb6 Include opt_bktr.
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>
1999-10-15 13:35:55 +00:00
Matthew N. Dodd
14bacef14e - Remove the ISA, PCI, and PCCARD specific code from if_ed.c; it
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
1999-10-15 03:12:48 +00:00
Matthew N. Dodd
9b63938369 Break out the bus front end code into separate files.
Note that these haven't been turned on nor has the old code
been removed from if_ed.c.  The next commit will address that.
1999-10-15 01:28:04 +00:00
Doug Rabson
45f0aa1f0e * Implement bus_set/get/delete_resource for pci.
* 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.
1999-10-14 21:38:33 +00:00
Mike Smith
f6b84b08c9 Add support for the version 4 firmware interface and the DAC960 PG and
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.
1999-10-14 02:54:06 +00:00
Greg Lehey
553faec194 Remove reference to obsolete initsd function.
This should have been committed yesterday.

Broke-world-for:	USW2 Root <root@usw2.freebsd.org>
1999-10-13 23:00:30 +00:00
Doug Rabson
81f4abc9c1 Don't match non-IDE devices in probe.
Reviewed by: sos
1999-10-13 18:56:49 +00:00
Greg Lehey
5473959c2b Change default revive block size to 60 kB (was 64 kB), and set a
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.
1999-10-13 03:21:54 +00:00
Greg Lehey
17105dc3e0 Add glue for passing revive block size, and also for initializing a
subdisk.
1999-10-13 03:21:04 +00:00
Greg Lehey
88bba10194 revive_block: Add a check for a too high revive block size. This is
possible now that vinum(8) can specify this size.

Add function initsd, which initializes a subdisk and optionally checks
that it really happened.
1999-10-13 03:20:11 +00:00
Greg Lehey
2e30926d26 launch_requests:
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.
1999-10-13 03:19:31 +00:00
Greg Lehey
2e5213425e MMalloc: don't supply M_WAITOK when mallocing from an interrupt
context.  Be prepared to fail instead.

MMalloc, FFree: ensure that saved file names are properly terminated.
Use MCFILENAMELEN instead of the previous explicit constant.
1999-10-13 03:18:53 +00:00
Greg Lehey
ed3e9bf301 struct vinum_ioctl_msg: Add fields verify (for initsd) and blocksize
(for revive and init).
1999-10-13 03:18:29 +00:00
Greg Lehey
c46d09a85b Fix another instance of vinum_scandisk giving a request to the daemon
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.
1999-10-13 03:17:59 +00:00
Greg Lehey
e7ec252617 Limit the number of outstanding requests on a specific drive and
overall.
1999-10-13 03:17:21 +00:00
Greg Lehey
eab69675bf Modify definition of Malloc: only M_WAITOK if we're not in an
interrupt context.
1999-10-13 03:16:56 +00:00
Greg Lehey
be41f47c8a Change the declaration of initsd. 1999-10-13 03:16:35 +00:00
Greg Lehey
8409d98998 Add some private storage so that we can queue requests in an interrupt
environment even if malloc fails.
1999-10-13 03:16:05 +00:00
Andrew Gallatin
da7ca2d9bd allow pci_ioctl to work with multi-hose alphas.
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
1999-10-12 22:10:53 +00:00
Doug Rabson
25afb89b1c * Add struct resource_list* argument to resource_list_alloc and
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.
1999-10-12 21:35:51 +00:00
Doug Rabson
3598f19234 Bring support for opti931 in from the old driver. 1999-10-12 20:19:03 +00:00
Matt Jacob
d23245c01c remove unnecessary includes 1999-10-11 19:30:59 +00:00
Poul-Henning Kamp
c23f21660c remove unused #include 1999-10-11 19:16:54 +00:00