Commit Graph

1881 Commits

Author SHA1 Message Date
Bruce Evans 657365cdd7 Implemented sending of BREAKs. This is quite complicated because the
hardware is interrupt-driven to a fault and sending a BREAK requires
mode switching.  Always running in the BREAK-capable mode as in PR 8318
would double the overhead for sending \0's.

Reminded by:	PR 8318
1998-12-17 17:40:13 +00:00
Justin T. Gibbs 0378c40c5c Fix a few problems with handling rejected transfer negotiation messages.
Use the host message loop for any unknown message types instead of performing
a reject message in the sequencer.  Pass reject messages to the host
message loop too which frees up a sequencer interrupt type slot.

Default to issuing a bus reset if initiator mode is enabled.  It seems
that the reset scsi bus bit is not defined in the same location for
all aic78xx BIOSes, so attempting to honor this setting will have to
wait until I get more information on how to detect it.

Nuke some unused variables.
1998-12-17 00:06:52 +00:00
Poul-Henning Kamp 11749a2453 Straigthen out the use of the tls and tlf callbacks.
Not tested on the if_sr, if_cx and if_ar drivers, but
expected to work just the same as it used to.

Any users of these drivers (or even better: donors
of hardware for them) please contact phk@freebsd.org
so we can test the next batch of changes to if_sppp.
1998-12-16 18:42:38 +00:00
Eivind Eklund fcfdc24dd2 vxalloc() can return NULL. Deal with it. 1998-12-16 00:38:57 +00:00
KATO Takenori 4896212043 Oops, I forgot to commit two diffs to fe driver. 1998-12-15 15:56:37 +00:00
KATO Takenori 2d2d8cc4f0 PC/AT(ISA) version and PC-98(NEC) version of if_fe drivers are merged,
as well as several functional additions.

(1) dot3 MIB support.
(2) if_media selection method support.
(3) bridge support.
(4) new boards support. Supported boards are as follows.
    [PC/AT]
     * Fujitsu FMV-180 series
     * Allied-Telesis RE2000 series
     * Allied-Telesyn AT1700 series
     * Gateway Communications G/Ether series
     * UB networks Access/PC ISA series
     * TDK/LANX LAC-AX series
     * ICL EtherTeam16i series
     * RATOC REX-5586/5587
    [PC-98]
     * Allied-Telesis RE1000 series
     * Allied-Telesis RE1000Plus/ME1500 series
     * Contec C-NET(9N)E series
     * Contec C-NET(98)P2 series
     * UB networks Access/PC N98C+ series
     * TDK/LANX LAC-98 series(not tested)

Submitted by: seki@sysrap.cs.fujitsu.co.jp (Masahiro Sekiguchi) and
              chi@bd.mbn.or.jp (Chiharu Shibata)
1998-12-15 15:51:37 +00:00
Justin T. Gibbs 41faa7d374 Pull in new ccb_hdr list types. 1998-12-15 08:24:45 +00:00
Justin T. Gibbs 0ca48af774 Perform a save data pointers operation if a data transfer was performed
in target mode, but we are not completing the command.

Use a template of allowed bus arbitration phases to selectively and
dynamically enable/disable initiator or target (re)selection.

Properly handle timeouts for target role transactions - just go to the
bus free state and report the error to the peripheral driver.

Checkpoint support for the XPT_ABORT_CCB function code.  This currently
handles the accept tio and immediate notify ccb types, but does not
handle the continue target I/O or SCSI I/O ccb types.  This is enough
to handle dynamic target enable/disable events.

Clean up the SCSI reset code so that we perform at most 1 SCSI bus
reset at initialization, the reset requested by the XPT layer.
1998-12-15 08:22:42 +00:00
Nick Hibma fd3ae282c5 Added UCLASS_CDC definitions to usb.h 1998-12-15 07:06:51 +00:00
Warner Losh b128b9cf2a o Convert length of hccb to integer from the array. Eivind Eklund
pointed this out, but I've not seen a manifestation of this.
o Check against 0x00 as well as 0xff for geometry register, as some clone
  cards don't return 0xff.  Vadim Mikhailov pointed this out in PR
  8743 for his Dell SCSI Array controller working in AHA-1540
  emulation mode.  Note that this test is likely to go away in the
  future in favor of a better one Justin has recommended.
1998-12-15 02:51:54 +00:00
Julian Elischer 6384b0f1bb The OHCI interfaces I have access to map their control regs etc. into
memory address space rather than IO space.. reflect this when looking for the
interface revision register.

If this is not true for them all then we probably need some smarter code.
1998-12-14 21:14:11 +00:00
Bruce Evans ff9607b070 Fixed LINT breakage in previous commit. Option FDC_YE enabled a
syntax error.  Options FDC_YE and DEVFS together enabled references
to a nonexistent variable and calls of a nonexistent function.
1998-12-14 16:29:58 +00:00
Nick Hibma bea029a166 Added Id 1998-12-14 09:40:15 +00:00
Nick Hibma 6fef2c2c27 Added Id to all files 1998-12-14 09:32:25 +00:00
Nick Hibma f287ad3471 Added Id 1998-12-14 09:31:41 +00:00
Nick Hibma 680a2f48d9 Added comment 1998-12-14 09:15:19 +00:00
Nick Hibma def348d45a Added copyright and Id 1998-12-14 09:13:29 +00:00
Matthew Dillon 2cbe36f725 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
Matthew Dillon 35f069d08b pci_device pd_probe function changed from returning char * to returning
const char *.  Originally I was going to add casts from const char * to
    char * in some of the pci device drivers, but the reality is that the
    pci device probes return constant quoted strings.
1998-12-14 05:47:29 +00:00
Nick Hibma 1806e812ae small oops on previous bug fix, it's late... 1998-12-13 23:53:42 +00:00
Nick Hibma 67aabdd8b7 small bug fix 1998-12-13 23:26:41 +00:00
Nick Hibma 9501b6d6b8 Removed unneeded definition 1998-12-13 23:16:20 +00:00
Steve Price 921543cf2f Add support for another 3COM/USR PNP modem, USR3031. 1998-12-13 23:12:54 +00:00
Nick Hibma eca58e5e00 dded the stubs for umodem and ucom (communications class driver). They are nothing other than
the ugen driver with different variable names.
1998-12-13 23:04:35 +00:00
Eivind Eklund b3a941181e Remove warning introduced by the last committer. 1998-12-13 23:00:48 +00:00
Nick Hibma 3e041e6116 Updated USB kernel sources to NetBSD sources of 1998-12-09.
1 bug fix and several textual changes.
Preparing to feed back changes for port into NetBSD to create one source base.
1998-12-13 22:27:42 +00:00
Justin T. Gibbs 0aae7eb02e Pull in fixes similar to those recently committed to the bt driver:
- For transactions of 0 length, us a non-residual checking CCB type.

 - Preserve command status if our interrupt handler completes a command
   while we are polling for completion in aha_cmd.
1998-12-13 00:05:04 +00:00
Nick Hibma da3ff61390 Fixed warning in usr.sbin/usbd 1998-12-12 11:57:59 +00:00
Warner Losh 69acd21dfd Add support for the YE-Data external PCMCIA floppy driver. This
floppy is used on the toshiba Libretto line of subnotebook computers.
It differs from a normal floppy in that you must use PIO rather than
DMA to transfer the data.

To enable this, you must add options "FDC_YE" to your kernel.  I don't
have a machine that has a floppy and a pcmcia slot to test to make
sure that this doesn't impact normal floppy units, so I've left this as
an option.

I have ported this to -current and made an attempt to ensure that the
indentation conforms to style(9), aka the bruce filter.

Reviewed by:	nate, markm
Submitted by:	David Horwitt (dhorwitt@ucsd.edu)
1998-12-12 08:16:01 +00:00
Julian Elischer 8cbe8a3ebf If we failed to probe/attach somehow, we never have a sc->sc_hcca
but the present PCI probe code still thinks we are there as the pci attach
can't return an error code.

This means we are in the shared interrupt list, but have not been set up.
If we are sharing ints with another device, ohci_intr will be called and will
coredump on a NULL reference. So just return if it is called when not set up.

This fixes the symptom and not the cause.
The right answer is to let the PCI system know that the attach failed,
or to fail earlier (in the PCI probe).
The attach() is a void fn() so it can't return failure..
1998-12-11 06:02:06 +00:00
Justin T. Gibbs 4c196f451c Remove unsued variable.
If we are not transfering any data, use a non S/G ccb type that doesn't
return residual information.  It seems that some firmware revisions dislike
S/G ccbs with 0 length S/G lists.

Correct bt_cmd() so that we always honor command status that was latched
by our interrupt routine while polling for completion..
1998-12-11 03:50:35 +00:00
Nick Hibma 8a1e798f6c Fixed same as Julian did in uhci_pci.c and fixed the fetching of the revision ohci_pci.c; clean up 1998-12-11 00:09:54 +00:00
Julian Elischer 3265f363c6 The shift and the masking were in the wrong order for extracting
the INTERFACE type byte from the longword register.
1998-12-10 22:07:05 +00:00
Eivind Eklund 2ae353f9a7 Rename one of the two devfs_link's to devfs_makelink. 1998-12-10 19:57:01 +00:00
Brian Somers db21d4f4fc Support ESS1868 (and probably ESS688 & ESS1668).
Submitted by: Max Khon <fjoe@husky.iclub.nsu.ru>
1998-12-10 18:36:10 +00:00
Justin T. Gibbs 4dd5dcaecd Revamp the way that exceptional message handling is performed so that it
is more robust and common code can be used for both the target and iniator
roles.  The mechanism for tracking negotiation state has also been simplified.

Add support for sync/wide negotiation in target mode and fix many of
the target mode bugs running at higher speeds uncovered.  Make a first
stab at getting all of the bus skew delays correct.  Sync+Wide dataout
transfers still cause problems, but this may be an initiator problem.

Ensure that we exit BITBUCKET mode if the controller is restarted.

Add support for target mode only firmware downloads.  This has been
tested on the aic7880, but should mean that we can perform target mode
on any aic7xxx controller.  Mixed mode (initiator and target roles in
the same firmware load) is currently only supported on the aic7890, but
with optimization, may fit on chips with less instruction space.
1998-12-10 04:14:50 +00:00
Archie Cobbs e43f5ffbb8 Eliminate compiler warning. 1998-12-10 02:31:08 +00:00
Archie Cobbs bd3d61e39f Eliminate compiler warning. 1998-12-10 01:52:16 +00:00
Nick Hibma 97797dc959 Various bug fixes:
1) Removed 'emulation' of bitmaps in printfs, FreeBSD seems to have caught
  up on that one
2) Fixed a few bugs in the timeout/timo timeout variables
3) First attempt at fixing a bug mentioned by Kazu: uhci_run is not able
  start/stop his USB host on his motherboard.
1998-12-09 23:36:15 +00:00
Nick Hibma a48e33e094 Preliminary support for OHCI motherboards 1998-12-09 23:28:43 +00:00
Nick Hibma d584bf7a28 1) Fixed bug: sc was used unitialised in uhci_run
2) Clean up the code and remove superfluous statements
1998-12-09 23:23:13 +00:00
Eivind Eklund 0d8e97fbaf Someday I hope people will learn that "#endif" is not a comment
introducer in ANSI C.
1998-12-09 03:30:52 +00:00
Eivind Eklund 98b5612b47 malloc(xxx, yyy, M_WAITOK) does not fail. This probably explains why
the bug in the check had never been discovered.
1998-12-09 02:18:53 +00:00
Eivind Eklund 761d24ba21 Adjust prototype to match definition (by adding a 'const'). 1998-12-09 01:12:18 +00:00
Archie Cobbs f1d19042b0 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
Bill Paul f5c444e19e Add sanity check to foo_start() routines: in the unlikely (though
apparently possible) event that the transmit start routine is
called with and empty if_snd queue, bail out instead of dereferencing
unilitialized transmit list pointers and panicking.
1998-12-05 02:21:44 +00:00
Matt Jacob cc56928232 oops on last 1998-12-05 01:46:40 +00:00
Matt Jacob e205b454ac Remove the Target mode functions until they're in better shape. Implement some
suggested compilation cleanups from Eklund. Wire down a hard loop id if we are
not on a platform that has the ability to get to a PCI BIOS (it still will
float to the ID it gets after a LIP but at least we can try). Clarify that the
expanded lun is based upon SCCLUN defines (in f/w).
1998-12-05 01:33:57 +00:00
Matt Jacob d3a9eb2ebe make a real "done" func; clarify some LUN widths 1998-12-05 01:31:21 +00:00
Matt Jacob e9c2652818 compilation fixes from Eklund 1998-12-05 01:30:52 +00:00