Commit graph

3889 commits

Author SHA1 Message Date
Matt Jacob d667c06c77 Clean up some target mode debug messages. Fix (finally, I believe)
Andrew's problems with SCSI on some alphas- do not call isp_update
directly to update parameters- just mark them as being ready to
update for the next command- the system would just hang on a READ
CAPACITY for a drive. Really annoying because it wouldn't even timeout
(and it has a timeout) so either the SET PARAMETERS call was nuking
things or the f/w was really dropping the ball.

approved: jkh

Reviewed by:	gallatin@freebsd.org
2000-02-15 00:52:52 +00:00
Matt Jacob e142669a43 If the CDB length is greater than 12 for parallel SCSI, ispscsicmd has
made the initial queue entry a EXTENDED CMD queue entry, so we have to
go straight to continuation segments for any data segments.

approved: jkh
2000-02-15 00:50:01 +00:00
Matt Jacob fe4d046167 Clean out residual bogosity for fast posting stuff- ISP_NO_FASTPOST_SCSI
is gone as a define. We just don't support fast posting for anything less
than the 1240/1080/1280/12160 or Fibre Channel cards.

Put in support for CDB's larger than 12 bytes for parallel SCSI (up to 44
bytes are allowed).

Approved: jkh
2000-02-15 00:35:00 +00:00
Cameron Grant 73bd6f4aab fix ess end-of-buffer repeating
Submitted by:	nhibma
Approved by:	jkh
2000-02-14 23:37:02 +00:00
Duncan Barclay 91a2dd11db Initial import 2000-02-13 21:07:25 +00:00
Gerard Roudier 7a35ada03e Simplifications:
- Remove all the code intended to deal with experimental
  C1010 revisions. This code got useless due to commercial
  chip revisions having been fixed.
Fixes:
- Rewrite/rework the WSR condition handling.
  Previous drivers snooped on the BUS through the SBDL IO
  register and this has been discovered to trigger a spurious
  SCSI parity error when WSR had been set by chip and cleared
  by SCRIPTS prior to reading SBDL bit [0...7].
  On the other hand, the C1010 does not use the SWIDE register
  when synchronous data transfers are taking place and
  requires a CHMOV (1) WHEN DATA_IN to be performed in order
  to move to memory the residual byte when WSR is set and
  the residual byte is useful data.
  BTW, the new WSR handling by the driver is simpler.
- No longer attempt to read from SCRIPTS the SBDL register.
  This is intended to avoid to be victimized again by any other
  issue regarding the handling of this register by 8xx chips.
Miscellaneous:
- The driver is now able to handle the WSR + IGN RESIDUE
  condition at the end of a DATA IN I/O without need of a
  programmed interrupt. It is a minor? optimization.
- A few other minor cosmetic changes.

This driver version fixes notably a permanent SCSI parity
error condition at boot that can be triggerred due to recent
changes in cam_xpt.c between 1.79 and 1.80.
Changes in CAM/XPT are fine, but the new handling of the full
INQUIRY may trigger the driver problem when a target returned
an odd value in the `additionnal length' field of the INQUIRY
response.

The diff against previous driver version is large, but it
consists approximatively in:
- 350 lignes removed and not compiled in previous drivers
  (They addressed experimental C1010 revisions)
- 250 lignes added or changed, half being comments or empty
  lines.
So, in fact, the real changes are about 120 lines of source.
About 80 lines address SCRIPTS changes and about 40 lines
address C code changes.

Approved by: jkh

New WSR handling reviewed by Pamela Delaney <pam.delaney@lsil.com>
(For back-porting to Linux sym53c8xx driver 1.6x series)
2000-02-13 12:14:07 +00:00
Peter Wemm 84a5b01504 Fix two warnings. 2000-02-13 03:03:31 +00:00
Peter Wemm be3448f6ad The Leadtek Winfast TV2000 has one of the FM capable Tuners. Don't
default to a non-FM tuner or FM radio is non-functional.

Approved by:	jkh
2000-02-12 08:49:21 +00:00
Matt Jacob 960f6939af Add in 12160 (Ultra3) support. Redo things to use the newbus code.
Approved: jkh@freebsd.org

PR:		16141
2000-02-11 19:45:17 +00:00
Matt Jacob 66dcc0e99f Turn back on fast posting- the code that turns it off (for 1020/1040) is
now in isp.c

Approved: jkh@freebsd.org
2000-02-11 19:37:56 +00:00
Matt Jacob af4d01494d Correct a minor typo in error message.
Approved: jkh@freebsd.org
2000-02-11 19:36:30 +00:00
Matt Jacob c2e7467339 Add in new async mbox defines for 2200- point to point stuff.
Add in definitions for the extended initialization control block
(2200 only again).

Approved: jkh@freebsd.org
2000-02-11 19:35:42 +00:00
Matt Jacob c211f23b90 Add in 12160 (Ultra3) NVRAM definitions.
Approved: jkh@freebsd.org
2000-02-11 19:34:33 +00:00
Matt Jacob fd589c2e36 Add in 12160 (Ultra3) firmware. Gawd, this file is bulky.
Approved: jkh@freebsd.org
2000-02-11 19:32:51 +00:00
Matt Jacob 0f38a25b52 Restructure nvram reading routine to split out to separate functions
for 1020/1X80/12160/2X00- for readability. Add in 12160 (Ultra3)
support- but not with PPR just yet.  Fix and clarify fetching of
return parameter for getting firmware rev which for the 2200 contains
the connection topology (Private Loop (NL-port), N-port, FL-port,
F-port). Synthesize the connection topology for the 2100 which can
only be Private Loop or FL-port. Handle a couple of new async
mailbox commands which signify connection in Point-to-Point mode
(N-port or F-port) or indicate various toe stubbing getting to same.

Approved: jkh@freebsd.org
2000-02-11 19:31:32 +00:00
Matt Jacob 83fbc5665e Add 12160 (Ultra3) defines. Add config option flag for forcing point-to-point
instead of FC-AL (2200 only).

Approved: jkh@freebsd.org
2000-02-11 19:25:01 +00:00
Søren Schmidt 32c3d17908 That "NO DRIVER" panic fix wasn't good enough... 2000-02-11 07:37:00 +00:00
Kazutaka YOKOTA aec1fa1ca3 - Be slightly more cautious and try to make more sure the keyboard
input queue is emptied when initializing the keyboard controller.
- Remove an unnecessary `if' statement.

Approved by: jkh
2000-02-11 01:22:30 +00:00
Kazutaka YOKOTA 40de16e3c3 - Don't reset text colors when changing the video mode.
Approved by: jkh
2000-02-11 01:20:34 +00:00
Kazutaka YOKOTA ade2307229 - Fix text cursor logic so that multiple instances of the "normal" cursor
won't appear on the screen, and "blinking" and "destructive" cursor
  won't appear in the vty for which the text cursor is currently hidden.

Approved by: jkh
2000-02-11 01:19:44 +00:00
Nick Hibma 8f9683e20c Correctly handle the conversion from virtual to physical addresses. The
problem was basically (for offset > 4096):

	vtophys(addr) + offset != vtophys(addr + offset)

Also, use TD's with a maximum size of 4k instead of 8kb for OHCI
controllers.

This problem occurs in drivers that use large transfer sizes:
umass, host2host and ethernet with jumbo frames.
2000-02-10 18:50:19 +00:00
Bill Paul 74ea2d6f60 Update the Tigon driver to use the 12.3.18 firmware release from Alteon.
(No changes to the driver code itself.)

Approved by: jkh
2000-02-10 00:37:48 +00:00
Justin T. Gibbs 85ac786b13 Kill the "unpause_always" argument to unpause_sequencer(). The reasons
for optimizing the unpause operation no-longer exist, and this is much
safer.

When restarting the sequencer, reconstitute the free SCB list on the card.
This deals with a single instruction gap between marking the SCB as free
and actually getting it onto the free list.

Reduce the number of transfer negotiations that occur.  In the past, we
renegotiated after every reported check condition status.  This ensures
that we catch devices that have unexpectidly reset.  In this situation,
the target will always report the check condition before performing a
data-phase.  The new behavior is to renegotiate for any check-condition where
the residual matches the orginal data-length of the command (including
0 length transffers).  This avoids renegotiations during things like
variable tape block reads, where the check condition is reported only
to indicate the residual of the read.

Revamp the parity error detection logic.  We now properly report and
handle injected parity errors in all phases.  The old code used to hang
on message-in parity errors.

Correct the reporting of selection timeout errors to the XPT.  When
a selection timeout occurs, only the currently selecting command
is flagged with SELTO status instead of aborting all currently active
commands to that target.

Fix flipped arguments in ahc_match_scb and in some of the callers of this
routine.  I wish that gcc allowed you to request warnings for enums passed
as ints.

Make ahc_find_msg generically handle all message types.

Work around the target mode data-in wideodd bug in all non-U2 chips.
We can now do sync-wide target mode transfers in target mode across the
hole product line.

Use lastphase exclusively for handling timeouts.  The current phase
doesn't take the bus free state into account.

Fix a bug in the timeout handler that could cause corruption of the
disconnected list.

When sending an embedded cdb to a target, ensure that we start on a
quad word boundary in the data-fifo.  It seems that unaligned stores
do not work correctly.
2000-02-09 21:25:00 +00:00
Justin T. Gibbs 1907f932b8 Fix parity error detection logic for aic7880 and aic7895 chips during
the probe of external SRAM.

Approved by: jkh@FreeBSD.org
2000-02-09 21:00:22 +00:00
Nicolas Souchu 249a96889e Fix system hang when printer locks on missing paper
(also called the "printer fiasco")

Approved by: jkh
2000-02-08 21:46:27 +00:00
Søren Schmidt 1af69d6936 Probe cosmetics. 2000-02-08 18:38:39 +00:00
Søren Schmidt cc8baa1136 The bde script has a bug, I used a patch from it verbatim, bad idea....
Fixed...
2000-02-08 16:39:11 +00:00
Søren Schmidt e8359a57de Do refcounting of open devices (more) correctly.
count_dev funtion by phk.
2000-02-07 23:05:40 +00:00
Søren Schmidt a9ec39136b Dont panic if no sub-driver is found. 2000-02-07 22:57:11 +00:00
Søren Schmidt 77145a3388 Unbreak addump, now dumping works again. 2000-02-07 22:56:32 +00:00
Nick Hibma 4f2e8d6383 Add PCI Id's for i810 chipsets.
PR:		16517
Submitted by:	SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp>
Approved by:	jhk
2000-02-07 12:50:33 +00:00
Nick Hibma 3a119ee1e2 Don't use tsleep when cold booting. It is called before bus->use_polling
is initialised by usb_init.

This might solve problems with some controllers not being initiliased
properly, because a delay was effectively a tsleep that returned
immediately.

Approved by:	jhk
2000-02-06 14:59:00 +00:00
Nick Hibma ef4da90333 Disable the generation of SMIs (System Management Interrupts). Always set
the PIRQD bit.

This fixes the problem of uhub0 hanging forever during boot when USB
keyboard support is switched on in the BIOS on motherboards with Intel
chipsets (UHCI).

Approved by:	The Sheep
2000-02-06 14:52:27 +00:00
Justin T. Gibbs 4bb38e7b78 Fix indentation.
Overlooked by:	n_himba@FreeBSD.org but not bde@FreeBSD.org
2000-02-04 14:25:24 +00:00
Nick Hibma 3cbd7cadf5 Unbreak LINT (missing curly brace).
Broken by:	gibbs
2000-02-04 14:14:51 +00:00
Søren Schmidt 96ebd6d1fc fix support for shared IRQ's.
fix support for multiple HPT & Promise controllers.

support mixed 33/66 devices on the Promise 66 controllers.

fix the refcount stuff in the atapi drivers.

misc cleanups.
2000-02-04 10:20:22 +00:00
Nick Hibma b70b9ce019 Commit missing bits, forgotten when committing support for suspend/resume
for USB.

Call uhci_power when suspending and resuming.

Approved by: The One.
2000-02-04 10:18:37 +00:00
Justin T. Gibbs 31fef9fb1a Update copyright license terms to match the reset of the aic7xxx dirver. 2000-02-03 16:54:11 +00:00
Justin T. Gibbs b27f40c064 Add support for the AdvanSys ASC38C0800 Ultra2 chipset. Preliminary
support is also included for the ASC38C1600 Ultra160 chipset, but
as firmware is not yet available for this chip, it is disabled.

Approved by: jkh@FreeBSD.org
2000-02-03 16:34:57 +00:00
Bill Paul 6f76cb1e28 Add support for WEP (encryption) for silver and gold WaveLAN/IEEE turbo cards.
Also update wicontrol to enable/disable encryption, set WEP keys and set the
TX key index. Silver cards only have 40-bit keys. This is something of a quick
hack, but it works well enough for me to commit this from the LinuxWorld
exhibit floor.

The WEP support only shows up if you have a card that supports it.

Would have been approved by: jkh, if he hadn't wandered off somewhere
Approved in his place by: msmith, who's standing right here
2000-02-02 17:59:13 +00:00
Peter Wemm 483df2dd3b Spell "pci_delete_resource" correctly.
Approved by:	jkh (who must be very sick of requests now :-)
2000-02-01 18:02:12 +00:00
Justin T. Gibbs aac5584a61 Remove a spurious printf left in from debugging.
PR: 16642
2000-02-01 00:43:58 +00:00
Nick Hibma 9a69e6509a bus_release_resource is spellt like bus_release_resource not like
bus_delete_resource.

Fixes a problem when the probe succeeded, but the attach failed. The
release of the resources was done inproperly.

Approved by:	jkh
2000-01-31 14:05:21 +00:00
Søren Schmidt 4de1cbfab9 cosmetic changes only. 2000-01-29 22:38:36 +00:00
Peter Wemm 4486cd7990 Use config's tools rather than #if's. 2000-01-29 18:54:12 +00:00
Nick Hibma 5a250db943 Get the KASSERT right. 2000-01-29 18:53:42 +00:00
Peter Wemm 5775b1a2b6 Tidy up stray or bogus #if NFOO > 0 and #include "foo.h". 2000-01-29 18:48:30 +00:00
Peter Wemm 96e00123b4 Remove a rather bizzare set of #ifdefs and #defines that all worked out
to be a NO-OP.
2000-01-29 18:44:01 +00:00
Peter Wemm 1c6f64061c Remove #if NDGB > 0 and #if NDGM > 0 2000-01-29 18:42:45 +00:00
Peter Wemm 86edd75342 Remove #include "eisa.h" and #if NEISA > 0 2000-01-29 18:22:33 +00:00
Peter Wemm d835c5043b Remove unneeded #include "eisa.h" and #if NEISA > 0 2000-01-29 18:21:21 +00:00
Nick Hibma c50e6e7a39 Fix debugging output. The TDs are linked through the dnext field, not
nexttd.
2000-01-29 18:01:15 +00:00
Nick Hibma 64470e4c96 Remove a warning from LINT 2000-01-29 16:25:55 +00:00
Peter Wemm 690f85de65 Remove a bunch of unused (NO-OP) #if NFOO > 0 type includes and some
#include "foo.h" headers.
2000-01-29 16:17:36 +00:00
Peter Wemm e27c1addaa Remove #if NFOO > 0 (it's not required in most cases) and also where it
isn't used as a result, remove #include "foo.h".  Many of these drivers
still use NFOO for softc struct sizing etc however.
2000-01-29 16:00:34 +00:00
Nick Hibma acd60c3cb0 Unbreak LINT.
Pointed out by:   Peter Wemm
2000-01-29 15:55:03 +00:00
Peter Wemm cebf86fa3f Put a FYI in the compatability shims so that people are aware that they
are using an old unconverted driver.  Most (if not all) of the drivers
for common hardware are newbus these days.  However, we don't want
to encourage people to take the easy way out and write new drivers
using the shims.  This is just passive "encouragement".

Reviewed by:	phk
2000-01-29 15:37:36 +00:00
Peter Wemm 8f8e587948 Use config's conditional compilation rather than using #ifdefs that make
modular compilation harder.  I'm doing this because people seem to like
cut/pasting examples of bad practices in existing code.
2000-01-29 15:08:56 +00:00
Nick Hibma 8010b90dc6 First part of the fix for ohci_hash_find_td panic.
Some controllers submit bogus pointers to the Done queue.
ohci_hash_find_td fails to find these in its hash and panics. Instead of
panicing we now assume the whole done queue is lost and let the timeout
code to clean up the mess after us.
2000-01-29 14:53:47 +00:00
Peter Wemm b7598e9bd7 Remove #if NVX > 0 and #if NEISA > 0 (and #include "eisa.h") as it's not
needed.
2000-01-29 14:50:32 +00:00
Peter Wemm bc51803479 Remove #include "vga.h" and #if NVGA > 0 as it's implied by config. 2000-01-29 14:43:47 +00:00
Peter Wemm 25a2c600af Remove #include "splash.h" and #if NSPLASH > 0" - it's implied by config. 2000-01-29 14:42:57 +00:00
Peter Wemm 2d8e7d39da Remove #if NIE > 0 test, it's guaranteed to be true by config. 2000-01-29 14:41:52 +00:00
Nick Hibma 75fc24dc62 Add comments and debugging info. 2000-01-29 14:41:48 +00:00
Peter Wemm 5c5ea07fc6 Remove #if NEN > 0 in the name of FreeBSD - it's not required as config
only compiles this file if it's true.  NEN is still used though. :-(
2000-01-29 14:38:04 +00:00
Peter Wemm 71619ad987 Remove #include "eisa.h" and #if NEISA > 0 as it's only ever compiled
if NEISA is > 0 as guaranteed by config.
2000-01-29 14:31:57 +00:00
Peter Wemm 0b5436a74a Remove #if NCCD > 0 - it's guaranteed to be true by config if ccd.c is
being compiled. (NCCD is used elsewhere though :-( )
2000-01-29 14:29:56 +00:00
Peter Wemm 3ec08445be Remove #include "eisa.h" and #if NEISA > 0 - this is guaranteed by config. 2000-01-29 14:27:26 +00:00
Peter Wemm 0cdb7d6692 remove #include "eisa.h" and #if NEISA > 0 - this is guaranteed by
config since ahc_eisa.c is "optional ahc eisa" meaning "only compile
ahc_eisa if ahc and eisa are defined"
2000-01-29 14:22:19 +00:00
Nick Hibma a59ac0e8be The toggle carry bit is stored in the headp not the tailp. 2000-01-29 14:18:31 +00:00
Søren Schmidt eff43d0e8a cosmetic changes only. 2000-01-29 14:10:59 +00:00
Peter Wemm 2b898d39e5 Remove #include "ppc.h" and #if NPPC > 0 - this is always true as it is
'optional ppc' in conf/files*
2000-01-29 14:02:30 +00:00
Nick Hibma e0d607e198 Mask off the last two bits before comparing. It might just be that some
hardware might leave those bits in the wrong state.
2000-01-29 11:59:31 +00:00
Nick Hibma fa1df741fb Tripmine for bad hardware. 2000-01-29 11:50:44 +00:00
Bruce Evans 689315d4f7 "Completed" the previous fix. Return ENOMEM on memory allocation failure
in sioattach(), not ENXIO.  Free resources before returning early in
sioprobe() and sioattach().
2000-01-29 03:02:55 +00:00
Bill Paul e225ecbbd4 Minor tweak: the D-Link 10/100 USB ethernet adapter is apparently using
the same design as the LinkSys adapter and needs the same special handling
to enable its PHY.
2000-01-29 02:16:47 +00:00
Cameron Grant a05382d9ae differentiate cmi8330 and als100 pnp cards based on their vendor id. this
is a kludge for 4.0
2000-01-29 00:18:29 +00:00
Søren Schmidt a4fec20898 Get the MEDIA_CHANGED status right here too. 2000-01-28 22:17:29 +00:00
Søren Schmidt 211a760057 Use atapi_test_ready not atapi_wait_ready, I need more sleep :( 2000-01-28 21:30:31 +00:00
Søren Schmidt 78e0324341 Get the MEDIA_CHANGED status right. 2000-01-28 21:03:25 +00:00
Søren Schmidt 0b905b407e Fix the atapi-fd.c (afd device) so that fx MSDOS formatted ZIP
disks can be mounted. Use b_pblkno instead of b_blkno

Found by: phk

Protect (proberly) against setting modes on nonexisting devices.
2000-01-28 20:18:19 +00:00
Gerard Roudier b5727bb5f0 - Fix an issue that paniced the machine in data overrun
condition.
- 1 line change that allows to balance chips between ncr
  and sym using pci compat option (not compiled by default
  in 4.0 but maintains the driver source 3.4 compatible).
2000-01-28 20:11:32 +00:00
Søren Schmidt 96478887ff Fix compilation on ISA only setups... 2000-01-28 15:57:13 +00:00
Søren Schmidt 02ce0452e1 Cleanup the ata_dmainit function a bit.
Also allow BIOS setup DMA on unknown controllers.
2000-01-28 13:35:43 +00:00
Nick Hibma 031ca4fb23 Correct the list of error messages. It was incomplete. 2000-01-28 13:05:26 +00:00
Nick Hibma e1b2b4098c Regen. 2000-01-28 10:31:12 +00:00
Nick Hibma d8634f7c3d Correct the entry for the Kodak DC290.
Submitted By:	Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
2000-01-28 10:26:29 +00:00
Søren Schmidt 6a7f51845b Oops, fix compile error due to the new way of storing the transfer mode. 2000-01-28 08:03:21 +00:00
Andrew Gallatin de6d75328e Add support for detection of the ESS 1688 found on my Dell Latitude LM 2000-01-28 04:28:11 +00:00
Bill Paul 935e6be657 Fix a bug in the uhci driver that breaks large bulk IN transfers. The
uhci_check_intr() routine needs to be more careful about deciding when
the end of a transfer has been detected.

This allows me to remove the nasty workaround code from if_aue and if_cue.
Receive performance is now much better for these adapters (500KB/sec
vs. 350KB/sec).

Also removed unused KUE_CUTOFF define from if_kuereg.h.

Submitted by: Lennart Augustsson
Reviewed by: n_hibma
2000-01-28 02:15:31 +00:00
Nick Hibma fd43044e52 The values for OHCI_HALTED and OHCI_TOGGLECARRY were reversed. 2000-01-28 00:03:45 +00:00
Nick Hibma 8648a2cdb9 Move the defines to the right location.
Add a DIAGNOSTIC when closing interrupt pipes.

Insert splx(s) which were left out with iso pipes (non-functional yet) and
in a DIAGNOSTIC.
2000-01-27 23:25:58 +00:00
Nick Hibma cc16f1b9d9 Add umass.c 2000-01-27 23:19:14 +00:00
Søren Schmidt 0fd4327bb6 Add sysctl oid hw.atamodes to set the transfermodes online. 2000-01-27 19:00:51 +00:00
Cameron Grant 45248baa3c handle simplex devices right 2000-01-26 20:27:45 +00:00
Nick Hibma 2aff98945c Properly teardown the allocated and initialised stuff when an error
occurs (OHCIwas already done for UHCI).

Get rid of the usbus variable. It is confusing.

Align uhci_pci.c and ohci_pci.c again.
2000-01-26 10:52:27 +00:00
Nick Hibma 9e2bdb4369 Don't set ivars until we checked the return value from device_add_child. 2000-01-26 10:27:12 +00:00
Nick Hibma 06ffae8586 Add comments 2000-01-26 08:46:41 +00:00
Doug Rabson 150630c449 Make this lot build on alpha. 2000-01-25 22:23:48 +00:00
Doug Rabson d64d73c906 * Don't use ivars to access resources, bus_set/get_resource is much better.
* First approximation of making this work on alpha (not working yet).
2000-01-25 22:21:45 +00:00
Søren Schmidt 0817db9f98 Retry a bit more agressively on the atapi identify.
Try to support older systems reporting irq0 for the first channels.

Support sharing of the std interrupts (says peter :) )

Dont use READ_CD on normal data reads (2048 bytes), too many old drives
doesn't support this command even if the std says "shall" :(, but still
use READ_CD on all other blocksizes.

Add the geometry to the ad probe, its still usefull.
2000-01-25 20:14:51 +00:00
Nick Hibma f68d3a9c5c Add usbd_clear_endpoint_toggle(pipe) function.
This is needed to implement a asynchronous callback for clear endpoint
stall, needed for the umass driver.
2000-01-25 18:40:39 +00:00
Nick Hibma ad705781e1 Correct subroutine names in DPRINTF 2000-01-25 18:37:58 +00:00
Peter Wemm 931e989797 Always leave SP_DCEN on (monitor DCD). Otherwise the firmware *really*
does ignore DCD.  Even TIOCMGET cannot read DCD as the firmware doesn't
report it.  This has pretty interesting effects for ppp(8) which runs
in clocal mode and polls carrier (!).  (Specialix's linux driver does
this too)

Also update the firmware to 3.0.6 for the SX cards, as apparently there
was a problem with floating (disconnected) DCD pins causing stray carrier
transitions, especially at port open time.

It seems to work here, and carrier loss is detected nearly immediately
rather than having to wait for a LQR timeout (a few minutes) before ppp(8)
gives up.

DCD problem noted by: nsayer
2000-01-25 16:45:54 +00:00
Søren Schmidt fe08efdcfb General cleanup.
Dont be so verbose in the probe, only ONE line printed now, to get more
info boot verbose. Centralise most printf's in ata-all & ata-dma to use
the ata_printf function, it saves alot of codelines.

Repeat the identify command if drive fails the first.

Protect the timeout functions with splbio.

Dont update the transfer details before we are sure the transfer
succeded, this way they are proberly retried on errors.

Move the handling of next_writeable to userland.

Use the READ_CD command to read CD's. That enables us to read _anything_
via the normal read/write interface. This kindof obsoletes the READAUDIO
ioctl, but we keep that for now.
2000-01-24 20:45:24 +00:00
Bill Paul f43d9309a5 Add support for DM9102A boards with Davicom DM9801 HomePNA PHYs. 2000-01-24 17:19:37 +00:00
Roger Hardiman cfa7b44621 Update to driver 2.07
Add new Channel Set for France. Submitted by Daniel Dagneaux <dagneaux@lure.u-psud.fr>
2000-01-24 14:00:34 +00:00
Roger Hardiman 12504d0820 Update to driver 2.07
Update i2c code to build on FreeBSD 3.x and 4.x machines.
Added GPIO audio values for the Askey/Dynalink TV card talken from postings on the V4L mailing list.
Update Australian Channel Set. Submitted by John Birrell <jb@cimlogic.com.au>
Add new Channel Set for France. Submitted by Daniel Dagneaux <dagneaux@lure.u-psud.fr>
2000-01-24 14:00:21 +00:00
Kazutaka YOKOTA 3c0931ff87 Fix a bug exposed by the previous commit. Do not use scp->font_size,
if the screen is in a graphics mode

Reported by: Maxim Sobolev <sobomax@altavista.net>
2000-01-24 13:44:39 +00:00
Nick Hibma dd3d335141 The previous fix for the USB ugen device set configuration ioctl()
has a slight error, and returns EIO way too often.

PR:		16315
Submitted by:  Louis Mamakos <louie@TransSys.COM>
2000-01-24 10:23:57 +00:00
Doug Rabson f0aac6a503 Add a workaround to which allows alphas to reserve a port range which
doesn't conflict with the parallel port on my miata (0x3bc..0x3bf).
The right solution will be to reserve two port ranges in vga, 0x3b0..0x3ba
and 0x3c0..0x3ca.

Reviewed by: yokota
2000-01-24 09:22:51 +00:00
Peter Wemm 67d5be5275 Ack! I totally botched the pci probe routine which resulted in it trying
to match everything else *but* a specialix pci card. *blush*.
2000-01-24 08:11:10 +00:00
Peter Wemm b830d4388e A bit more newbusification of si. This still isn't quite finished.
Split out the bus attachments so the impact of the bus xxxvar.h files
with the inline macros for the ivars are confined to one file each.
2000-01-24 07:24:02 +00:00
Warner Losh 25f061dedd Fix plug and play support:
o Cut out the probed stuff.  We no longer need it since newbus implicitly
  checks for this (likely bt can be changed as well in this way).
o Add preliminary support for unload.  Untested because aha doesn't yet
  support identify and there are some interactions with PnP that I've
  not yet worked out.

With this I can boot the AHA-1542CP FW F.0.  All the aha resources
appear to be picked up via pnp now.
2000-01-24 07:08:40 +00:00
Peter Wemm 5b249744bd Initial attempt at newbusification of the specialix si/xio/sx driver.
The files were repo copied from their original location and are part
way towards being portable.
This should unbreak the EISA support in the driver.
I have not updated files* yet as I'm not quite finished.
2000-01-23 22:51:49 +00:00
Peter Wemm fe8140cd15 Fix some warnings. 2000-01-23 19:27:11 +00:00
Peter Wemm 62797de451 remove "extern int cold" from SPLUSBCHECK - it causes a heap of warnings. 2000-01-23 19:26:16 +00:00
Peter Wemm 10a1190c8b Fix a warning in DIAGNOSTIC code. 2000-01-23 19:25:29 +00:00
Peter Wemm 6ff37636a3 Remove #if 0'ed reference to isa_device->id_alive 2000-01-23 18:21:20 +00:00
Nick Hibma db972b58b5 Check whether we can change config at all. If any of the endpoints
has been opened, we should not allow configuration changes as endpoint
descriptors might disappear.

PR:	16256, 16168
2000-01-23 15:48:29 +00:00
Nick Hibma bf79729b6e Zap the vnodes for the control endpoint as well. 2000-01-23 15:42:08 +00:00
Nick Hibma 9c918de3de Return ENXIO on error, not 0. Seems to have been skipped when converting
to newbus.

Reviewed by:	bde
2000-01-23 15:11:15 +00:00
Peter Wemm 0f063508d7 Some newbus-inspired tidy-ups. Use device_identify() rather than scanning
the resource table to locate children.  The 'at ppbus?' can go again.
Remove a few #if Nxxx > 0' type things, config arranges this for us.
Move the newbus method glue next to the DRIVER_MODULE() stuff so we
don't need extra prototypes.
Don't set device descriptions until after the possibility of the probe
returning an error.
Remove all cdevsw_add() calls, all the drivers that did this also use
make_dev() correctly, so it's not required.
A couple of other minor nits.
2000-01-23 14:41:04 +00:00
Peter Wemm a3a2b1e1b2 Note the PnP id's for the NMX2210 next to the id's where they are used.
The pnpbios doesn't supply a description in the case we've seen so
supply one.
2000-01-23 13:17:03 +00:00
Peter Wemm 1816634e49 Clean up some more loose ends..
isa_device->id_ri_flags and RI_FAST were not implemented and did nothing.
The two drivers that were mistakenly thinking this was working were
cy.c and loran.c - these should be converted to newbus.
GC (garbage collect) isa_device->id_alive
GC userconfig.c references to isa_device->id_scsiid (!).
2000-01-23 11:50:43 +00:00
Matthew N. Dodd 0e8fe3f0e9 Fix a bug in the last commit. >> 4 instead of >> 8. *bap*
Fix a long-standing bug where I used a 'break;' instead of a 'continue;';
you had to have multiple ISA boards in non-PnP mode with an 'unknown' board
with a lower MAC address to find this one.  Since I have 4 3c5x9 boards
in my test box I was somewhat confused when this happened. :)

Make the messages printed by ep_isa_identify() a little more consistent;
we'll only see them in verbose boot mode but it makes me feel better if
they look nice.
2000-01-23 08:46:21 +00:00
Matthew N. Dodd adc098b163 Add the ID for the 3c509-TPC.
Also, while I'm here, add a mechanism to catch unknown board IDs that
are likely to be 3c509s and allow them to be attached.

PR:		kern/16304
Submitted by:	Kelly Yancey <kbyanc@posi.net>
2000-01-23 08:23:38 +00:00
Seigo Tanimura 8f7076b8ff The pointer of the serial FIFO in the DSP seems to make an error
upon starting/stopping the DSP. Correct the pointer in addition
to clearing the FIFO.
2000-01-23 07:04:02 +00:00
Tatsumi Hosokawa 19fdaeba95 Don't execute MAC address initialization for non-pccard sn devices. 2000-01-22 17:24:16 +00:00
Matt Jacob 997f6ab3d7 There seems to be some problems, particularly on alpha, with
FAST POSTING enabled for parallel SCSI. Be sure about things
and disable it for now.
2000-01-21 20:54:22 +00:00
Nick Hibma bd7bdb532c Add ID for the AMD-756 OHCI controller 2000-01-21 10:46:29 +00:00
Tatsumi Hosokawa de2119c894 Added support for hex-encoded MAC address of Megahertz X-Jack Ethernet Card
Reviewed by:	Warner Losh <imp@village.org>
2000-01-21 09:05:49 +00:00
Tatsumi Hosokawa 87ef0a0afb Propagate MAC address in CIS tupple to dev/ed/ driver.
Many ed-based Ethernet PC-cards can't get correct MAC address without
this patch.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Warner Losh <imp@village.org>
2000-01-21 03:08:46 +00:00
Archie Cobbs 22b6e04be8 Remove definition of the unimplemented "control" hook. 2000-01-21 01:39:40 +00:00
Nick Hibma 341777d004 Add support for DEVICE_SUSPEND, DEVICE_RESUME and DEVICE_SHUTDOWN
methods for USB devices.

However: with none of the devices I have here suspend seems to work
properly.  This is probably a bug in uhci_power which I still have to
look at.

Prodded and pushed by:  Christopher Masto <chris@netmonger.net>
2000-01-20 22:24:35 +00:00
Nick Hibma fc096eaad4 Remove duplicate include 2000-01-20 22:05:30 +00:00
Nick Hibma 5fa5aeec53 Properly remove interrupts if initialisation fails. 2000-01-20 21:36:07 +00:00
Bill Paul 58295f6ace Fix test for deciding when a bulk IN transfer got truncated. I thought
I fixed this last night, but apparently I only applied the patch to the
copy of the code in /dev/brain0.
2000-01-20 19:57:43 +00:00
Kazutaka YOKOTA 7c6f57a384 - Add some comment from bde on the keyboard interrupt.
- Fix obsolete comments.
2000-01-20 13:32:53 +00:00
Kazutaka YOKOTA cf3024b76c Do not include `ukbd.h'; it's not used.
Pointed out by: bde
2000-01-20 13:24:28 +00:00
Kazutaka YOKOTA e17b116645 Unconditionally define sc_paste(). 2000-01-20 13:23:03 +00:00
Kazutaka YOKOTA acdf858c9b Fix wrong usage of FONT_NONE. It was not meant to be set in
scp->font_size in the first place.  It is redundant now and is
removed.

Found by: bde
2000-01-20 13:21:47 +00:00
Bill Paul 1aebda0582 Regen. 2000-01-20 07:39:19 +00:00
Bill Paul a6d9a40e81 More USB ethernet tweaks:
- Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the
  following improvements:
        o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP
          quirk. This allows drivers to specify busy waiting only for
          certain transfers (namely control transfers for reading/writing
          registers and stuff).
        o New USBD_FORCE_SHORT_XFER flag can be used to deal with
          devices like the ADMtek Pegasus that sense the end of bulk OUT
          transfers in a special way (if a transfer is exactly a multiple
          of 64 bytes in size, you need to send an extra empty packet
          to terminate the transfer).
        o usbd_open_pipe_intr() now accepts an interval argument which
          can be used to change the rate at which the interrupt callback
          routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the
          value specified in the device's config data, but drivers can
          override it if needed.
- Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions.
- Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all
  control transfers. We no longer force the non-tsleep hack for
  bulk transfers since these are done asynchronously anyway.
- Removed quirk entry fiddling from if_aue and if_kue since we don't
  need it anymore now that we have the USBD_NO_TSLEEP flag.
- Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to
  usbd_open_pipe_intr().
- Add a flag to the softc struct in the ethernet drivers to indicate
  when a device has been detached, and use this flag to perform
  tests to prevent the drivers from trying to do control transfers
  if this is the case. This is necessary because calling if_detach()
  with INET6 enabled will eventually result in a call to the driver's
  ioctl() routine to delete the multicast groups on the interface,
  which will result in attempts to perform control transfers. (It's
  possible this also happens even without INET6 support enabled.) This
  is pointless since we know that if the detach method has been called,
  the hardware has been unplugged.
- Changed watchdog timeout routines to just call the driver init routines
  to initialize the device states without trying to close and re-open the
  pipes. This is partly because we don't want to frob things at interrupt
  context, but also because this doesn't seem to work right and I don't
  want to panic the system just because a USB device may have stopped
  responding.
- Fix aue_rxeof() to be a little smarter about detecting when a double
  transfer is needed. Unfortunately, the design of the chip makes it hard
  to get this exactly right. Hopefully, this will go away once either
  Nick or Lennart finds the bug in the uhci driver that makes this ugly
  hack necessary.
- Also sync usbdevs with NetBSD.
2000-01-20 07:38:33 +00:00
Archie Cobbs 1b67001469 Fix an #ifdef that should have been and #ifndef.
Noticed by:	Hellmuth Michaelis <hm@hcs.de>
2000-01-20 01:49:45 +00:00
Bill Paul 88d739dc5f Add support for the Davicom DM9102A 10/100 ethernet controller chip.
This is just to make sure we initialize the chip correctly: we need to
make the sure the port select bit in CSR6 is set properly so that we
use the internal PHY for 10/100 support. (The eval boards I have also
include an external HomePNA PHY, but I need to play with that more
before I can support it.)
2000-01-19 19:03:08 +00:00
Jordan K. Hubbard 6417807e8b Add parallel port clock driver.
Submitted by:	Sascha Schumann <sascha@schumann.cx>
2000-01-19 18:19:16 +00:00
Søren Schmidt 6e5d660a63 Quantify the calls to ad_attach and atapi_attach so that diskless
or atapiless kernels can be built.
2000-01-19 07:25:46 +00:00
Bill Paul 76fd432173 Fix a couple of bugs:
- The busy wait hack in usbdi.c was doing its timeout in microseconds
  instead of milliseconds.
- if_aue.c:aue_intr() is creating a bitmask by and'ing two bits when it
  should be or'ing them.

Submitted by:	Lennart Augustsson
2000-01-19 01:01:56 +00:00
Søren Schmidt 974f34013a Rearrange the probecode, so that 80pin cables can be identified
correctly on both master and slave.
Smash together the ata_params & atapi_params structures as they
are more or less equal anyways.
Get rid of the last SYSINIT's in here.
2000-01-18 21:02:59 +00:00