Commit Graph

2756 Commits

Author SHA1 Message Date
Greg Lehey
7d0e3c6f72 Correct type of intializer for (undocumented) cdevsw.d_parms.
Submitted-by:	peter
1999-06-29 04:07:55 +00:00
Dag-Erling Smørgrav
af5c746a49 Use the correct value for banksize so splash_pcx works in LFB modes. 1999-06-28 13:52:29 +00:00
Peter Wemm
eb7fc512af Don't #include i386/isa/isa_dma.h - it's in isa/isavar.h now. This
driver is probably not far from being MI now anyway.
1999-06-28 09:19:58 +00:00
Nick Hibma
fd7a5fcd8e Add MultiTech Atlas modem 1999-06-27 22:28:02 +00:00
Nick Hibma
616ff839aa Remove superfluous semi-colon 1999-06-27 22:24:20 +00:00
Nick Hibma
178e4460ef Replace usbd_device_set_desc by device_set_desc_copy 1999-06-27 09:42:40 +00:00
Peter Wemm
b52ab6b545 Initialize and hold locks for ccd generated bufs..
Obtained from: Matt Dillon <dillon@backplane.com>
1999-06-27 09:28:43 +00:00
Nick Hibma
25d210e317 Remove unused variable and computation, possibly leading to a
divide by zero fault.

Possible fix for PR12041

PR:		12041
Submitted-By:	J.Hudson@massey.ac.nz
Reviewed-By:	nsouch
1999-06-26 14:42:17 +00:00
Nick Hibma
7678b59a40 Change 'device' to 'self', to be more like the rest of the code 1999-06-26 12:55:25 +00:00
Peter Wemm
81b1c87805 Fix a dev_t/udev_t issue 1999-06-26 11:00:17 +00:00
Peter Wemm
0fc85147a7 #if 0 an unused function since it generates warnings.. (I have not deleted
it in case it's part of a bigger plan.)
1999-06-26 10:52:54 +00:00
Kirk McKusick
67812eacd7 Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.
1999-06-26 02:47:16 +00:00
Søren Schmidt
c4217f94eb Nine'th update to the new ATA/ATAPI driver:
The atapi subsystem has gotten better error handeling and timeouts,
it also tries a REQUEST SENSE command when devices returns errors,
to give a little more info as to what went wrong. It might be a
little verbose for now, but I'm interested in as much feedback on
errors as possible, especially timeouts, as I'm a bit in doubt if
I've chosen resonable default values everywhere.

The disk driver has been changed a bit to prepare for tagged queing,
which is next on my list.

The disk driver has grown a dump routine, I got one implementation
from Darrell Anderson <anderson@cs.duke.edu> which also did
partial dumps (usefull on big memory machines) I left out the
partial stuff for now, and changed the rest alot to fit into the new
ad_request framework.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!

-Søren
1999-06-25 09:03:07 +00:00
Matt Jacob
ec69779604 (corrections for type change in softc) 1999-06-24 16:42:33 +00:00
Matt Jacob
67eb623192 Bruce pointed out I was being silly with volatile.
Submitted by:	bde@freebsd.org
1999-06-24 16:34:00 +00:00
Kazutaka YOKOTA
7107ea4aa1 Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletion
and insertion should affect the line the cursor is on only.

This change should have been committed together with syscons.c rev 1.308.
(I forgot to do so, when I committed syscons.c :-(

Pointed out by: sos
1999-06-24 13:04:33 +00:00
Kazutaka YOKOTA
d1bb8e0e13 Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletion
and insertion should affect the line the cursor is on only.
1999-06-24 09:21:27 +00:00
Greg Lehey
9faf05037c set_drive_state:
If the drive goes down, queue a close to the daemon.  In many cases
  this function gets called in process context, so it could do it
  directly, but it's more trouble finding out where we came from than
  getting the daemon to do it.
1999-06-24 08:57:16 +00:00
Greg Lehey
e7066f7303 build_request_buffer:
Don't bzero the buffer structure, it's been done already by
  allocrqg.

sdio:
  Build up a correct buffer header, don't steal linkages from system
  buffer headers.

Noticed-by: mckusick
1999-06-24 08:56:03 +00:00
Greg Lehey
49fc4f3ffa Split close_drive into two parts to ensure correct locking against the
daemon before closing a drive.
1999-06-24 08:55:02 +00:00
Greg Lehey
f9b05a3154 Implement daemonrq_closedrive function to close a drive. 1999-06-24 08:54:09 +00:00
Greg Lehey
de4a0cb61d free_drive:
Use new function close_locked_drive to close the drive.
1999-06-24 08:53:14 +00:00
Greg Lehey
8cbc0348f6 Clarify some comments.
struct request:
  Add a daemon function to close drives when they go down.
1999-06-24 08:52:27 +00:00
Jonathan Lemon
db57feb70b Compaq Smart RAID driver for -current. Based on the original ida.c
driver by Mark Dawson.  This probably needs some work, but is stable
enough to boot a RAID-only configuration, and survive `make world'.
1999-06-24 03:33:30 +00:00
Greg Lehey
99f43962ac Backout last change. strerror doesn't exist in the kernel.
Spotted-by: 	"David E. Cross" <crossd@cs.rpi.edu>
1999-06-23 00:31:27 +00:00
David E. O'Brien
55cbed40d3 Wrap the definition of "XE_DEBUG" so it is overridable from the ``cc''
commandline or kernel conf file.
1999-06-22 19:21:00 +00:00
David E. O'Brien
09f86e4760 Fix conflicts. 1999-06-22 19:19:46 +00:00
David E. O'Brien
7d280c7079 This commit was generated by cvs2svn to compensate for changes in r48114,
which included commits to RCS files with non-trunk default branches.
1999-06-22 19:12:08 +00:00
David E. O'Brien
a74faac3af Virgin import of Xircom PCCARD driver v1.20 (1999/06/13):
* Conformance with Dingo specification. This includes:
	Collision/error statistics gathering.
	Multicast address filtering, eg. the hash filter.
	Initialisation and interrupt handling sequences.
Note that I've started on some of this already in v1.20.

* The probe routine needs some more work, to identify oddities such as the
  REM10.

* There are still problems with the autonegotiation code; specifically, it
  won't autonegotiate with some 10/100 hubs.  This might simply be the hardware
  not getting along, in which case there's nothing we can do, but it's still
  worth investigating

* CEM28/CEM33 support.  Should be able to integrate this directly from the
  Linux code.

* Performance enhancements:
	Full-duplex on 10Mbit networks.
	Virtual shared-memory mode.
	Early send and receive modes.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-06-22 19:12:08 +00:00
David E. O'Brien
cb8e217fc6 Virgin import of Xircom PCCARD driver v1.20 (1999/06/13):
* Conformance with Dingo specification. This includes:
	Collision/error statistics gathering.
	Multicast address filtering, eg. the hash filter.
	Initialisation and interrupt handling sequences.
Note that I've started on some of this already in v1.20.

* The probe routine needs some more work, to identify oddities such as the
  REM10.

* There are still problems with the autonegotiation code; specifically, it
  won't autonegotiate with some 10/100 hubs.  This might simply be the hardware
  not getting along, in which case there's nothing we can do, but it's still
  worth investigating

* CEM28/CEM33 support.  Should be able to integrate this directly from the
  Linux code.

* Performance enhancements:
	Full-duplex on 10Mbit networks.
	Virtual shared-memory mode.
	Early send and receive modes.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-06-22 19:12:08 +00:00
Kazutaka YOKOTA
6e8394b8ba The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize
  some of complicated functions.

- Many static variables are moved to the softc structure.

- Added a new key function, PREV.  When this key is pressed, the vty
  immediately before the current vty will become foreground.  Analogue
  to PREV, which is usually assigned to the PrntScrn key.
  PR: kern/10113
  Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>

- Modified the kernel console input function sccngetc() so that it
  handles function keys properly.

- Reorganized the screen update routine.

- VT switching code is reorganized.  It now should be slightly more
  robust than before.

- Added the DEVICE_RESUME function so that syscons no longer hooks the
  APM resume event directly.

- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
  SC_NO_HISTORY and SC_NO_SYSMOUSE.
  Various parts of syscons can be omitted so that the kernel size is
  reduced.

  SC_PIXEL_MODE
  Made the VESA 800x600 mode an option, rather than a standard part of
  syscons.

  SC_DISABLE_DDBKEY
  Disables the `debug' key combination.

  SC_ALT_MOUSE_IMAGE
  Inverse the character cell at the mouse cursor position in the text
  console, rather than drawing an arrow on the screen.
  Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)

  SC_DFLT_FONT
  makeoptions "SC_DFLT_FONT=_font_name_"
  Include the named font as the default font of syscons.  16-line,
  14-line and 8-line font data will be compiled in.  This option replaces
  the existing STD8X16FONT option, which loads 16-line font data only.

- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.

- The video driver provides a set of ioctl commands to manipulate the
  frame buffer.

- New kernel configuration option: VGA_WIDTH90
  Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60.  These
  modes are mot always supported by the video card.
  PR: i386/7510
  Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.

- The header file machine/console.h is reorganized; its contents is now
  split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
  (another new file).  machine/console.h is still maintained for
  compatibility reasons.

- Kernel console selection/installation routines are fixed and
  slightly rebumped so that it should now be possible to switch between
  the interanl kernel console (sc or vt) and a remote kernel console
  (sio) again, as it was in 2.x, 3.0 and 3.1.

- Screen savers and splash screen decoders
  Because of the header file reorganization described above, screen
  savers and splash screen decoders are slightly modified.  After this
  update, /sys/modules/syscons/saver.h is no longer necessary and is
  removed.
1999-06-22 14:14:06 +00:00
Peter Wemm
8d5481c633 Handle suspend/resume methods
Obtained from: Warner Losh <imp@freebsd.org>
1999-06-22 09:44:00 +00:00
Greg Lehey
2096c6b68a Add some comments about the VINUMMINOR macro, which is not for human
consumption.
1999-06-22 05:41:36 +00:00
Greg Lehey
b53adf6b1c bre: Don't loop if we try to access an invalid plex type. This is
typically the case when the expurgated version of Vinum tries to
     access a RAID-5 plex.
1999-06-22 05:40:51 +00:00
Greg Lehey
c9b0944731 Be more intelligent about attaching subdisks to plexes. 1999-06-22 05:37:57 +00:00
Greg Lehey
05f0cb5d5f Print more legible error message if a drive open fails. 1999-06-22 05:37:05 +00:00
Greg Lehey
d884f7143f Modify to work with phk's latest mods to cdevsw. This is a temporary
fix; it doesn't address the problem of removing the module.  If you do
the following:

  vinum stop
  fsck /dev/vinum/VOLUME

you *will* get a system crash.  What we need is a cdevsw_remove
corresponding to cdevsw_add, but that hasn't been written yet.

Submitted-by: phk
1999-06-22 05:36:13 +00:00
Nick Hibma
923938f93a Only print the device name once, during attach (device_quiet) 1999-06-21 21:32:15 +00:00
Nick Hibma
c1fc766d3f 1) Do not include usbdivar.h and access the interface descriptor through
usbd_get_interface_descriptor
2) remove soft reset. It's been dropped from the USB Mass Storage Bulk-Only
   Specification
3) move the clear feature halt to the reset routine.
1999-06-20 15:46:13 +00:00
Peter Wemm
20510b2017 Use the proper interfaces to find if a device is enabled, don't dig into
the bus mechanism's private internals!
1999-06-20 13:10:09 +00:00
Greg Lehey
89bf63adaa sioprobe: Don't try to initialize disabled ports. In particular,
attempting to initialize sio3 caused problems with ATI video boards,
which cleverly share the I/O space.

PR: kern/12295
1999-06-19 08:14:56 +00:00
Bill Paul
274342303b Add a transmit descriptor usage counter and use it to absolutely,
positively not let ti_encap() fill up the TX ring all the way and wrap
around. This fixes a potential transmit lockup where a really fast
machine (or particular TX traffic pattern) can overrun the end of the
ring.

Reported by: John Plevyak <jplevyak@inktomi.com>
1999-06-19 00:36:56 +00:00
Gary Palmer
0625ba2fc3 Add Id strings 1999-06-17 23:42:45 +00:00
Bruce Evans
212dfe6fc7 Fixed a missing userland dev_t to kernel dev_t conversion. 1999-06-17 07:07:55 +00:00
Nick Hibma
f06b2abff3 Remove option USBVERBOSE
Add the options for debugging used in dev/usb/*.c

Submitted by:	Kazu
1999-06-16 17:34:36 +00:00
Kazutaka YOKOTA
5c539f036d Print verbose messages when there is error.
Oked by: des
1999-06-16 14:04:45 +00:00
Kirk McKusick
5e1a20fd26 COM_LLCONSOLE should over-ride COM_DEBUGGER request. 1999-06-15 22:15:10 +00:00
Nick Hibma
85dd1453b1 1) remove the soft reset after a command failed.
2) remove printing of errno and errstr
1999-06-13 22:09:14 +00:00
Nick Hibma
7b69218647 1) Add non-blocking I/O on read
2) Add checks to make sure we do not dereference the softc when not found
because the device has been removed.
1999-06-13 20:49:12 +00:00
Nick Hibma
b24ecce39c Shorten the strings a bit (remove 'Host') 1999-06-13 20:46:10 +00:00
Roger Hardiman
3d68f363a4 Removed checking for unit>NBKTR.
No longer need when using device_get_softc.
(also fixed bug where loadable bktr module could only access 1st device)
1999-06-13 16:05:00 +00:00
Roger Hardiman
5a2f31f0fb Updated to use the new 4.x newbus API
Also removed the BSDI support (for now)
This allows the driver to be loaded/unloaded as a KLD
and loaded in the boot loader phase whithout making a custom kernel.
1999-06-12 14:54:56 +00:00
Bill Paul
32af3bf215 Small optimization: use wi_seek() in wi_read_record() and wi_write_record()
instead of frobbing the buffer access path registers directly. Saves a
few lines of duplicated code.
1999-06-06 16:44:04 +00:00
Bruce Evans
e650b8f451 Fixed null setting of `rc_started'. This was fixed for the
corresponding variable `rc_wakeup_started' in rev.1.36 but broken
again in rev.1.37.  This bug only caused excessive polling (it gave
NRC activations for each of the SWI handler and the timeout handler
instead of 1 of each).

Moved cdevsw attachment from the driver probe routine to the driver
attach routine.
1999-06-04 18:53:47 +00:00
Bruce Evans
216b6d2da0 Really fix cy-driver-related panics when SMP is configured. Rev.1.88 only
fixed half the problem.

Tested by:	Michael Scott Boers <mboers@datacompusa.com>
1999-06-04 18:13:25 +00:00
Roger Hardiman
2dc6d34fac Fix the cdevsw_add change made by PHK.
(It was accidentally added to the BSDI bktr_probe and not the
 FreeBSD bktr_probe)
1999-06-04 13:24:54 +00:00
Nick Hibma
bb32aa3960 Add remark about where bInterfaceProtocol number for USB Zip drive comes
from. 0x50 == 'P' for protoype.

Obtained from:	Pat LaVarre <LAVARRE@iomega.com> on linux-usb@suse.com
1999-06-04 12:41:42 +00:00
Peter Wemm
b42a56cd10 GC unused prototype 1999-06-03 22:03:35 +00:00
Peter Wemm
4961913d45 Quieten the bt_isa_probe() messages since they get a bit much when
the isa probe has gone hunting for a card on it's own.
1999-06-03 20:56:09 +00:00
Kazutaka YOKOTA
2b9e6c7549 Fix PS/2 MouseMan+ protocol. We have been looking at a wrong place
for the sign bit for roller movement!
1999-06-03 12:42:10 +00:00
Jonathan Lemon
2171c52a81 Unifdef VM86
Reviewed by:	silence on on -current
1999-06-01 18:17:50 +00:00
Nick Hibma
509a03961f USB stopped working as of the recent cdevsw cleanup. This fixes that. 1999-06-01 07:22:01 +00:00
Nick Hibma
20f81fcbbc Remove the stub driver. It's useless. 1999-06-01 07:18:53 +00:00
Nick Hibma
a0557cd697 usbd_get_request_status now only returns the value if the associated
pointer is passed.
1999-06-01 06:39:03 +00:00
Nick Hibma
114278b089 1) Remove the definition of usb_cdc_generic_descriptor_t. It is
equivalent to usb_descriptor_t

2) Rename USB_CDC_CM_CM_OVER_DATA to USB_CDC_CM_OVER_DATA
1999-05-31 22:35:55 +00:00
Roger Hardiman
153eb46fb6 On the new Meteor cards, the Philips SAA 7116 is connected to the PCI bus
via an IBM PCI-PCI bridge (82351 or 82352 or 82353)

The driver must identify if it is on a secondary PCI bus, which is
created via the IBM PCI-PCI bridge. If it is, then it must initialise
the IBM PCI-PCI bridge correctly.

To do this, the following new functions are added.
Because they use the pcici_t tag, they are considered 2.2 compatibility APIs
  pcici_t * pci_get_parent_from_tag(pcici_t tag);
  int       pci_get_bus_from_tag(pcici_t tag);

(The _from_tag suffix is used to prevent clashes with similarly named
 newbus PCI API functions)

Submitted by: Anton Berezin <tobez@plab.ku.dk>
Reviewed by:  Doug Rabson <dfr@nlsystems.com>
Reworked by:  Me (roger)
1999-05-31 22:13:37 +00:00
Doug Rabson
a97c75b7ea * Change include file locations.
* Fix some misunderstandings about the return value of resource_int_value().
* Make it build on alpha (doesn't work yet...)
1999-05-31 18:39:17 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +00:00
Poul-Henning Kamp
3faff79c9e The PPSAPI group defines the polarity in draft 3, we guessed it wrong. 1999-05-31 06:57:31 +00:00
Nick Hibma
6e3802969a Enable attachment of multiple drivers to a single device. 1999-05-30 18:49:17 +00:00
Nick Hibma
2eaf666111 Notify CAM of the removed device on detach. 1999-05-30 18:46:04 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".

        Initialize the d_maj and d_bmaj fields.

        The d_reset field was not removed, although it is never used.

I used a program to do most of this, so all the files now use the
same consistent format.  Please keep it that way.

Vinum and i4b not modified, patches emailed to respective authors.
1999-05-30 16:53:49 +00:00
Poul-Henning Kamp
7a1c7bc99f Don't bogusly define a d_reset_t function. 1999-05-30 14:55:24 +00:00
Nick Hibma
8c701b4eef 1) Add URL for printer class specification
2) Change name of UE_IN to UE_DIR
3) Enable printing of the Printer Id string
4) Clean up debugging output while we are at it.
1999-05-30 13:03:00 +00:00
Nick Hibma
12788196b1 - When aborting an interrupt pipe, just wait for 1ms for the completion
of the current interrupt trasaction.
- Do not schedule the next interrupt transaction if the pipe is being
aborted or the last round of the interrupt transaction ended with error.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-30 12:49:39 +00:00
Nick Hibma
c9efdb87e8 When the mouse is being disconnected, do the followings:
- Call ums_disable() to abort the pipe.
- Do not wake up processes which has been waiting or polling for mouse
  data.  It won't be available anymore.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-30 12:48:49 +00:00
Doug Rabson
46e1f231cd Simplistic pnp support. Needs more ids to be added. 1999-05-30 11:14:39 +00:00
Doug Rabson
f7f2df54bb No support for pnp yet. 1999-05-30 11:12:30 +00:00
Doug Rabson
d384956496 No support for pnp devices yet. 1999-05-30 11:10:10 +00:00
Doug Rabson
bcbb365b6b In pci_alloc_resource() only check start and end to see if its a default. 1999-05-30 10:54:31 +00:00
Bruce Evans
4011dfccd2 Don't call disable_intr() when interrupts are already disabled, since
disable_intr() does non-recursive locking in the SMP case.  This should
fix cy-driver-related panics when SMP is configured.

Broken in:	rev.1.73 (3.1 and -current)
1999-05-28 13:23:21 +00:00
Doug Rabson
0476a4d4ff Allow a sio port with its flags set to DEBUGGER+LLCONSOLE to be used for
gdb. This allows the sio probe for that port to be disabled which stops
it from confusing the debugger.
1999-05-28 09:37:11 +00:00
Roger Hardiman
229cf3c335 Add support for ASound Gold card using the ALS120
chipset (a vibra 16x clone)
Identified automatically by its PnP ID

Approved by: Luigi
1999-05-27 06:12:40 +00:00
Andrew Gallatin
0f884d6cef Forgotten in previous commit:
Allow chipset drivers to specify the direct-mapped DMA window's mask in
preparation for tsunami support.  Previous chipsets' direct-mapped DMA
mask was always 1024*1024*1024.  The Tsunami chipset needs it to be
2*1024*1024*1024

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-26 23:05:23 +00:00
Andrew Gallatin
50b8d1cce4 Allow chipset drivers to specify the direct-mapped DMA window's mask in
preparation for tsunami support.  Previous chipsets' direct-mapped DMA
mask was always 1024*1024*1024.  The Tsunami chipset needs it to be
2*1024*1024*1024

These changes should not affect the i386 port

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-26 23:01:57 +00:00
Justin T. Gibbs
51064aaaf8 Ignore subvendor and subdevice ids for all ai7880 parts. These chips
only support 'mirroring' the vendor and device ids, so we don't
lose any information.  Certain revisions of the aic7880 will not
perform the mirroring so to match all possiblities would double
the number of table entries.  This change also allows us to match
things like the 2944B which I missed in the original table.
1999-05-26 16:59:17 +00:00
Justin T. Gibbs
b53bae294f Turn the 'dump eeprom' flag into a real option. 1999-05-25 20:15:41 +00:00
Justin T. Gibbs
378d6d7395 The 1542 cards do not allow adapter commands to be queued while mailbox
commands are outstanding.  You'd think they'd just clear the IDLE bit,
but alas, no.  Delay until all pending mailbox commands have completed
in aha_cmd to work around this.

Report sync rates correctly on Fast Adaptec cards.  Clones may still be
reported incorrectly since there is no documenation on how they report
extended sync values.

Clean up some unused fields in the aha softc.
1999-05-25 20:15:20 +00:00
Justin T. Gibbs
f40c8d7155 All cards using aic789X chips use the new eeprom format.
Corrects bogus negotiation values on aic7890 based controllers.

PR: 11872
1999-05-25 20:12:32 +00:00
Roger Hardiman
8fa3a2e7ed Rename 849 to 849A (the correct name for the IC) 1999-05-25 12:44:40 +00:00
Roger Hardiman
ec3a598be7 Add support for the Bt878/Bt879's Intel 430 FX and
SIS/VIA/ OPTi chipset PCI bus workarounds.

These make the Bt878/879 chips stabler on certain
older and non-intel motherboards.

Use options BKTR_430_FX_MODE
or  options BKTR_SIS_VIA_MODE
to enable these modes.

Also rename 849 to 849A
1999-05-25 12:43:40 +00:00
Bill Paul
497760a16a Fix bug that can cause transmit corruption. There are actually two 'rings'
in the transmit code: the TX descriptor ring, and a 'shadow' ring of mbuf
pointers, one for each TX descriptor. When transmitting a packet that
consists of several fragments in an mbuf chain, we link each fragment
to a descriptor in the TX ring, but we only save a pointer to the mbuf
chain. This pointer is saved in the shadow ring entry which corresponds
to the first fragment in the packet. Later, ti_txeof() can release the
whole chain with a single m_freem() call. (We need the second ring to
keep track of the virtual addresses of the mbuf chains.)

The problem with this is that the Tigon isn't actually through with the
mbuf chain until it reaches the last fragment (which has the TI_BDFLAG_END
bit set), however the current scheme releases the mbuf chain as soon as
the first fragment is consumed. This is wrong, since the mbufs can then
be yanked out from under the Tigon and modified before the other fragments
can be transmitted.

The fix is to make a one line change to ti_encap() so that it saves the
mbuf chain pointer in the shadow ring entry that corresponds to the last
fragment in TX ring instead of the first. This prevents the mbufs from
being released until the last fragment is transmitted.

Painstakingly diagnosed and fixed by: Robert Picco <picco@mail.wevinc.com>
Brought to my attention by: dg
1999-05-24 14:56:55 +00:00
Peter Wemm
578de0426e Fix a [start,end] vs [start,count] botch that corrupted the resource
manager and prevented IOPort allocation beyond the first EISA slot from
working.  subr_rman.c should have trapped this on the way into the system
rather than tripping over the wreckage.

Head banged into wall repeatedly by:  "Matthew N. Dodd" <winter@jurai.net>
1999-05-24 03:08:46 +00:00
Roger Hardiman
ab27fe4452 Added rgb_vbi_prog() to capture VBI data and video at the
same time. To capture VBI data, /dev/vbi must be opened
before starting video capture.
A partly on code from Hiroki Mori <mori@infocity.co.jp>
1999-05-23 21:40:51 +00:00
Justin T. Gibbs
3caf668db7 Don't reference our SCB until we have validated that the firmware has
returned an SCB that is in range.
1999-05-23 18:55:58 +00:00
Justin T. Gibbs
cf7d3071b9 Poll for interrupts in bt_cmd in case they are masked. A completing
mailbox command will block the completion of an immediate command,
so we must service them for our command to succeed.

PR: 11799
1999-05-23 18:54:34 +00:00
Justin T. Gibbs
ebada55cce aic7xxx.c:
Honor the 'bus reset at startup' option now that the XPT properly
	handles transfer negotiation in this scenario.

	Honor the sync rate settings on Ultra2 controllers.  We would
	always negotiate at the fastest speed.  Oops.

aic7xxx.h:
	Whitespace.

aic7xxx.seq:
	Fix a minor nit that would cause the controller to miss the update
	of the negotiation required bitmask causing the negotiation to
	be delayed by a command.
1999-05-22 22:04:11 +00:00
Justin T. Gibbs
1723e869c1 First cut at a driver for the amd53c974 PCI SCSI host adapter. This
driver lacks error recovery and still needs more testing, but it's
about time I got it under revision control.

Submitted by:	 Tekram Inc.
Bus Space/DMA and cleanup: gibbs
1999-05-22 21:50:40 +00:00
Bill Paul
33b3ee3898 - Fix up some comments in if_wi.c (no code changes)
- Mention that the 6Mbps turbo adapters are supported in HARDWARE.TXT
  and RELNOTES.TXT and the wi.4 man page
- Mention turbo adapters in the wicontrol.8 man page and provide a
  complete table of available transmit speed settings
1999-05-22 16:12:54 +00:00
Doug Rabson
6f50cfb43a Use the resource apis to manipulate resources. 1999-05-22 15:47:34 +00:00
Doug Rabson
f78030e22d Don't use BUS_WRITE_IVAR to manipulate resources. 1999-05-22 15:45:47 +00:00
Semen Ustimenko
a1684b9830 Move arpcom structure be the first in softc structure. Needed
for ether_ioctl.

PR:   pending/11754
1999-05-22 06:10:14 +00:00
Bruce Evans
1979249db2 Restored rev.1.76 which was clobbered by rev.1.77. 1999-05-22 04:34:59 +00:00
Nick Hibma
f26c33d249 usbdi.h:
Implement priorities.
GENERIC, LINT, files:
        Remove remarks about ordering of device names.
GENERIC, LINT:
        Sort the devices alphabetically in LINT and GENERIC.
1999-05-20 20:02:37 +00:00
Nick Hibma
91ea20f498 Add comment about split in driver 1999-05-20 19:52:04 +00:00
Andrew Gallatin
aa6de8e012 Add support for multiple PCI "hoses" used on various alpha platforms.
The specific intent of this commit is to pave the way for importing
Compaq XP1000 support.  These changes should not affect the i386 port.

Reviewed by: Doug Rabson <dfr@nlsystems.com>
(actually, he walked me through most of it & deserves more than reviewd-by
credit )
1999-05-20 15:33:33 +00:00
Kazutaka YOKOTA
d3c87b8512 - Include isa/isareg.h rather than i386/isa/isa.h for i386.
- Remove unused (thus, commented out) section of code.
1999-05-20 09:49:33 +00:00
Kazutaka YOKOTA
aee1b285f1 Include sys/isa/isareg.h rather than i386/isa/isa.h for i386. 1999-05-20 09:48:13 +00:00
Søren Schmidt
dc82ab74e3 Eigth update to the new ATA/ATAPI driver:
Fixed problems:

    LS120/ZIP drives still currupted data.
	Reworked once again, buffered I/O is just ignoring any sizehints
	it is given :(
	Now the atapifd driver splits up requests for devices that has
	limitted transfer size.

    ISA only configs fails on boot with interrupt timeouts.
	The new-bus integration introduced a bug where the softc ptr
	was lost during the probe.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!
1999-05-20 09:12:06 +00:00
Roger Hardiman
d3a26f0c62 Updated Australian channel frequencies
Submitted by: Ivan Brawley <brawley@internode.com.au>
1999-05-19 22:04:21 +00:00
Doug Rabson
f38cc0691f Calibrate the processor cycle counter instead of believing what the
firmware says.
1999-05-18 21:24:16 +00:00
Peter Wemm
ab25d374b2 Don't detect an EISA bus unless we see a "card" there somewhere. An EISA
motherboard will have a card for the "motherboard" on slot 0.
 eisa0: <EISA bus> on motherboard
 mainboard0: <ASU5101 (System Board)> at slot 0 on eisa0
This should stop the probe "detecting" an EISA bus everywhere that has
a 'controller eisa0' line regardless of whether it's really there.
1999-05-18 21:03:30 +00:00
Peter Wemm
8dc26439da Move pcibus (host -> pci bus) probe/attach routines from nexus
to pcibus.c.  pci_cfgopen() becomes static and there are no more
bus #ifdef's in nexus.c.
1999-05-18 20:48:43 +00:00
Roger Hardiman
ec5d7ef31d Bt848 driver release 1.65
Change Intel GPIO mask to hopefully stop turning the Intel Camera off
Fixed tuner selection on Hauppauge card with tuner 0x0a
Replaced none tuner with no tuner for Theo de Raadt <deraadt@openbsd.org>.

Ivan Brawley <brawley@internode.com.au> added
the Australian channel frequencies.
1999-05-18 12:16:15 +00:00
Roger Hardiman
ec2a37ea3c Bt848 driver release 1.65
Updated with australian channel set

Submitted by:	Ivan Brawley <brawley@internode.com.au>
1999-05-18 12:14:39 +00:00
Kazutaka YOKOTA
ec6948ccea Slight reorganization of internal interface in the keyboard controller
driver.
1999-05-18 11:33:14 +00:00
Kazutaka YOKOTA
76fa85c503 Silence warnings. 1999-05-18 11:08:39 +00:00
Kazutaka YOKOTA
8fbe57ce4b Remove unnecessary function call. 1999-05-18 11:07:12 +00:00
Kazutaka YOKOTA
83fc7c6ced The previous commit was wrong! This is the correct one ;-< 1999-05-18 11:05:58 +00:00
Justin T. Gibbs
b1334ec97d Correct a bug where the chip could be unpaused in the middle of a bus
or device reset error recovery operation.
1999-05-18 03:58:49 +00:00
Justin T. Gibbs
493950f6d9 Correct the comment for the last commit.
Clean up the handling of failure modes in our attach so we don't free
resources twice.  ahc_free() will do all of the work for us (as would
be required by an unload event) so we only need to handle resources that
the softc has not taken ownership of.
1999-05-17 21:56:00 +00:00
Justin T. Gibbs
40ca72018b Update copyright. Correct some whitespace. 1999-05-17 21:53:51 +00:00
Justin T. Gibbs
923dc21bfe Add a masking scheme to allow for detection of unknown cards using a
chip we think we understand.

Correct identification entry for the AHA2950U2.
1999-05-17 21:53:09 +00:00
Justin T. Gibbs
f240c08e4a Fix whitespace. Correct a comment. 1999-05-17 21:51:41 +00:00
Søren Schmidt
b5bb732345 Seventh update to the new ATA/ATAPI driver:
Fixed problems:

    LS120 drives currupted data.
	The workaround for drives not supporting upto 64K transfers
	has been reworked. It works now both on LS120 & ZIP drives.

    ISA only configs wont compile.
	Fixed.

    The ATA driver wont share interrupts.
	Fixed.

    The "unwanted interrupt" warning gave wrong controller.
	Another lun<>unit messup from the newbus integration.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!

-Søren
1999-05-17 15:58:47 +00:00
Greg Lehey
e4d6d0216b Modify to work with new style dev_t.
With_copious_input_from:  peter
			  phk
1999-05-15 05:49:21 +00:00
Warner Losh
fca33042ed Put a small delay in before sending the inquire_setup command. The
docs don't seem to shed light on why this is needed, but reports from
the field indicate this helps prevent problems in this area.  Ken's
changes seem to have exposed this bug, rather than caused it, as far
as I can tell.

Thanks to Jack O'Neill for tracking this down.

Submitted by: jack@germanium.xtalwind.net

Very strong 3.2 merge candidate.
1999-05-14 23:10:25 +00:00
Justin T. Gibbs
168d6886b8 Use a lookup table for device matching instead of a switch on a 64bit
value.  EGCS generates poor code for sparse switch statements on 64bit
values.

Requested by: bde
1999-05-14 17:38:07 +00:00
Justin T. Gibbs
f3da2c5d80 Take the subvendor and subdevice ids into account during device probe.
Sync up device Ids with the master Adaptec list.

Add probe support for the 2940 Pro although it isn't obvious that
all of the termination support is correct for this adapter yet.
1999-05-14 05:09:24 +00:00
Justin T. Gibbs
06d2b844cc Better workaround for aic7890 chip bug. Use the HS_MAILBOX register to
tell the sequencer to pause itself for a target msg variable update.  This
avoids the pause race entirely as HS_MAILBOX can be accessed without
pausing the chip.

3.2 Merge candidate.
1999-05-14 05:07:25 +00:00
David E. O'Brien
39cc3b46b1 if_xe* now lives in sys/dev/pccard/ 1999-05-14 04:18:24 +00:00
David E. O'Brien
bd5a7eb3e7 Virgin import of Xircom PCCARD driver v1.19.
v1.19 (1999/04/15) updates the CEM56/REM56 support.

Current bugs & misfeatures
--------------------------
* CE2 cards still not working reliably. Unclear if this is related to
  packet I/O code or interrupt handling.
* Autonegotiation support remains flaky. We're now OK with 10Mbit auto
  hubs, but certain combination of hardware will fail to connect.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:26:20 +00:00
David E. O'Brien
e6e8109613 This commit was generated by cvs2svn to compensate for changes in r47151,
which included commits to RCS files with non-trunk default branches.
1999-05-14 02:26:20 +00:00
David E. O'Brien
eeccf7d9a2 Virgin import of Xircom PCCARD driver v1.19.
v1.19 (1999/04/15) updates the CEM56/REM56 support.

Current bugs & misfeatures
--------------------------
* CE2 cards still not working reliably. Unclear if this is related to
  packet I/O code or interrupt handling.
* Autonegotiation support remains flaky. We're now OK with 10Mbit auto
  hubs, but certain combination of hardware will fail to connect.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:26:20 +00:00
David E. O'Brien
80720da0c9 Virgin import of Xircom PCCARD driver v1.18
v1.18 (1999/04/08) adds support for CEM56 and REM56 multifunction cards.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:00:38 +00:00
David E. O'Brien
a745f13344 This commit was generated by cvs2svn to compensate for changes in r47148,
which included commits to RCS files with non-trunk default branches.
1999-05-14 02:00:38 +00:00
David E. O'Brien
2eb387a8da Virgin import of Xircom PCCARD driver v1.18
v1.18 (1999/04/08) adds support for CEM56 and REM56 multifunction cards.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:00:38 +00:00
David E. O'Brien
e3ae23a924 Virgin import of Xircom PCCARD driver v1.17
v1.17 (1999/03/28) has xperimental fixes to 10Mbit autonegotiation and
CE2 input lockup.

KNOWN BUGS
==========

* Media auto-negotiation is definitely not right.  It will work in most
  circumstances and seems to connect OK to most 100Mbit networks, however some
  pathological combinations of hubs/networks/peers seem to confuse it.

* CE2 support is somewhat flakey (ranging from 'works perfectly' to 'hangs the
  machine' so far).  I've fixed the probe routine and a potential lockup in
  the output routine, but a lot of people still report that they can't receive
  or transmit.

* You won't be able to use the modem and Ethenet parts of a multifunction card
  simultaneously.  This is limitation the current FreeBSD PCMCIA support.
  Likewise, there is no support for CardBus devices.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:58:59 +00:00
David E. O'Brien
645cdc12f0 This commit was generated by cvs2svn to compensate for changes in r47145,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:58:59 +00:00
David E. O'Brien
d73bc63ef2 Virgin import of Xircom PCCARD driver v1.17
v1.17 (1999/03/28) has xperimental fixes to 10Mbit autonegotiation and
CE2 input lockup.

KNOWN BUGS
==========

* Media auto-negotiation is definitely not right.  It will work in most
  circumstances and seems to connect OK to most 100Mbit networks, however some
  pathological combinations of hubs/networks/peers seem to confuse it.

* CE2 support is somewhat flakey (ranging from 'works perfectly' to 'hangs the
  machine' so far).  I've fixed the probe routine and a potential lockup in
  the output routine, but a lot of people still report that they can't receive
  or transmit.

* You won't be able to use the modem and Ethenet parts of a multifunction card
  simultaneously.  This is limitation the current FreeBSD PCMCIA support.
  Likewise, there is no support for CardBus devices.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:58:59 +00:00
David E. O'Brien
bd49f2f01b Virgin import of Xircom PCCARD driver v1.16.
v1.16 (1999/03/08) fixed BPF input hang and infinite loop on CE2
short-packet output.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:53:32 +00:00
David E. O'Brien
26ac8ac24c This commit was generated by cvs2svn to compensate for changes in r47142,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:53:32 +00:00
David E. O'Brien
d1e35075a3 Virgin import of Xircom PCCARD driver v1.16.
v1.16 (1999/03/08) fixed BPF input hang and infinite loop on CE2
short-packet output.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:53:32 +00:00
David E. O'Brien
f69b347623 Virgin import of Xircom PCCARD driver v1.15
v1.15 fixed driver registration bug under 3.1-STABLE.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:52:10 +00:00
David E. O'Brien
5941adb59f This commit was generated by cvs2svn to compensate for changes in r47139,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:52:10 +00:00
David E. O'Brien
c5dce5e86a Virgin import of Xircom PCCARD driver v1.15
v1.15 fixed driver registration bug under 3.1-STABLE.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:52:10 +00:00
David E. O'Brien
99872c353c Virgin import of Xircom PCCARD driver v1.14
This driver is mostly based on the `xirc2ps' driver for Linux by Werner
Koch.  Werner has even allowed his code to be distributed under a BSD licence,
making our life considerably easier -- thanks Werner!

This driver supports:
* Intel EtherExpress(TM) PRO/100 PCCARD (16-bit version)
* Xircom CreditCard CE2 / CEM28 / CEM33 / CE3 / CEM56 Ethernet adapters.
* Toshiba Advanced Network 10/100 PCCARD
* Certain Compaq Netelligent 10/100 branded cards

v1.14 has major changes to media selection code, and bugfixes in the
probe routine.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:50:10 +00:00
David E. O'Brien
eaa12ef4a0 This commit was generated by cvs2svn to compensate for changes in r47136,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:50:10 +00:00
David E. O'Brien
76ccae01ea Virgin import of Xircom PCCARD driver v1.14
This driver is mostly based on the `xirc2ps' driver for Linux by Werner
Koch.  Werner has even allowed his code to be distributed under a BSD licence,
making our life considerably easier -- thanks Werner!

This driver supports:
* Intel EtherExpress(TM) PRO/100 PCCARD (16-bit version)
* Xircom CreditCard CE2 / CEM28 / CEM33 / CE3 / CEM56 Ethernet adapters.
* Toshiba Advanced Network 10/100 PCCARD
* Certain Compaq Netelligent 10/100 branded cards

v1.14 has major changes to media selection code, and bugfixes in the
probe routine.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:50:10 +00:00
David E. O'Brien
32597e9335 Virgin import of Xircom PCCARD driver v1.13 1999-05-14 01:41:26 +00:00