Commit Graph

1783 Commits

Author SHA1 Message Date
scottr c5d19fd124 Make this compile #ifdef DDB:
- Prototype debugging functions
 - Replace %x and %lx with %p as appropriate
1996-12-15 10:02:30 +00:00
mycroft e1a87dc790 Make sure to initialize the memory we just allocated. 1996-12-14 10:50:32 +00:00
mycroft be33336052 If attaching the console, reinitialize it immediately. 1996-12-14 10:46:38 +00:00
mycroft 58e4442168 Turn off the baud rate changing optimization. 1996-12-14 08:56:23 +00:00
gwr aaa60cfea6 Add ZSWR1_IMASK (all intr. enable bits in WR1) 1996-12-13 21:02:39 +00:00
pk 841d1ec634 Comply with recent autoconfiguration changes. Diffs graciously
supplied by Chris Demetriou.
1996-12-10 22:54:46 +00:00
thorpej 55acc3ffb3 Fill in sc_link.max_target 1996-12-10 21:57:17 +00:00
thorpej d502e68402 Fill in sc_link.max_target 1996-12-10 21:27:16 +00:00
thorpej f113ac70dd Add a "max_target" member to struct scsi_link, which is filled in by
host adapter drivers, indicating the highest SCSI target they can
address.  Use this value to dynamically allocate data structures, rather
than hard-coding 8 targets.

These changes allow targets > 7 to be addressed on wide SCSI busses.

Fixes PRs #1674 and #2892.
1996-12-10 21:06:29 +00:00
cgd e9abc8540f remove all traces of __BROKEN_INDIRECT_CONFIG (except in shared drivers) 1996-12-08 00:22:08 +00:00
cgd 74187419b6 The last change fixed a last-minute goof in the __BROKEN_INDIRECT_CONFIG
case, but added a typo (extra parenthesis) in the !__BROKEN_INDIRECT_CONFIG
case.  fix it.
1996-12-08 00:14:03 +00:00
cjs 75d4fb207b Add definition for internal config register. 1996-12-07 16:23:40 +00:00
cjs b1e0c7d657 Print the memory size on startup.
Add newline to `Interface disabled' printf and clean up formatting.
Change packet read/write code to align all reads and writes into
memory to an appropriate boundary for the I/O size. This also fixes
a bug where the trailing unaligned bytes (1-3 of them) would be
put in an additional mbuf even if there was enough space for them
in the one we were currently filling.
This has been tested on a 3c905 in an Alpha (32-bit I/O, alignment
required), a 3c905 in an i386 (32-bit I/O, alignment not required)
and a 3c509 in an i386 (16-bit I/O, alignment not required). It
should be tested on a 3c509 in an Alpha with an ISA bus, if somone
can manage to get the two items together.
There are still some bugs in the driver relating to initialisation;
on my Alpha with a 3c905 you need to do an `ifconfig ep0 down;
ifconfig ep0 up' after the initial ifconfig to make it start working.
Apparently there are also some problems with a 3c579 in an i386,
although a 3c905 in an i386 works just fine.
1996-12-07 08:33:07 +00:00
pk e974072523 Deal with Lance memory size 132KB (sparc `lebuffer' devices use this size). 1996-12-06 21:54:00 +00:00
cgd 243ef518d2 fix a (fatal) bug in the __BROKEN_INDIRECT_CONFIG changes checked
in yesterday.  (got a little bit careless with #ifdef'd variables.)
1996-12-05 22:16:04 +00:00
mikel 179a058e17 fix AUTO_CAL_ENABLE bug, & misc. cleanup. 1996-12-05 07:01:30 +00:00
mikel 94909aee07 return proper output port. Fixes PR kern/2014. 1996-12-05 06:48:47 +00:00
thorpej 3ec2c5af68 Duh, make sure i/o tags and handles are initialized before actually
probing for the LANCE chip.
1996-12-05 02:39:37 +00:00
cgd 8b6a32d1c1 update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:39:27 +00:00
cgd 197d80c63a update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:25:23 +00:00
cgd ea0c7b4423 update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:06:39 +00:00
thorpej 3ae1a191dc Recognize the HP ScanJet 4p, per PR #2663 (Kenneth Stailey). 1996-12-03 01:25:53 +00:00
thorpej 7d4d4753a8 Implement a simple scsi xfer queue to avoid presenting a resource
shortage to the upper scsi layers, which don't (yet) deal well with
resource shortages.
1996-12-02 19:06:41 +00:00
thorpej c164cadf68 Convert to use <machine/bus.h> 1996-12-02 05:44:17 +00:00
leo 91c17fedfa The atari has a pci_machdep.h file. 1996-12-01 21:02:18 +00:00
jtk 15aad8e10b forgot to regenerate these after committing pcidevs for its NetBSD header tag 1996-11-30 15:16:22 +00:00
thorpej 40611b811f Start a mode sense with a clean sense buffer.
Fixes PR #2953, from David M. Stanhope <dms@celtech.com>.
1996-11-29 19:58:40 +00:00
thorpej f3c0cc95a1 Add an inquiry pattern for the HP ScanJet 4p.
From Valtteri Vuorikoski <vuori@notcom.org>, PR #2957.
1996-11-29 19:53:32 +00:00
thorpej f6ffe73a99 Add Yet Another Broken CD-ROM Drive to The List.
From Lennart Augustsson <augustss@cs.chalmers.se>, PR #2971.
1996-11-29 19:51:14 +00:00
jtk ebc2675469 add Cirrus CL-7541, 7543 and ACC 2188; regen .h files 1996-11-28 16:29:59 +00:00
thorpej c645414c6e Regen. 1996-11-28 00:49:48 +00:00
thorpej 5d9878b0be Fill out the Intel section of this a bit, and note the URL of a
periodically updated list of PCI vendor/product codes.
1996-11-28 00:46:35 +00:00
thorpej a4f9e46a87 The MODIFY_IOPORT command does not generate an HACC (command complete)
signal; don't wait for it.

Add a "clarification" cast to the last argument to bha_cmd() in
bha_disable_isacompat().
1996-11-28 00:43:26 +00:00
thorpej 3b4e2a1ac9 In wdattach(), when printing out info about the drive, make the output
look a little more like a SCSI disk's.  This has the pleasant side-effect
of preventing the output from annoyingly extending past 80 columns.
1996-11-27 10:50:39 +00:00
cgd d7c58f547e Drop LPT_NPORTS to 4 from 8. Some lpt units require only 4 I/O ports
(e.g. from 0x3bc to 0x3bf, for example).  Others may require more,
but until there's some special handling for them, 4 should be returned
so that on systems with I/O port accounting, the unit at 0x3bf can be
properly mapped, etc.  (OK'd by mycroft.)
1996-11-23 23:22:50 +00:00
cgd 828f1f3aa1 Provide a routine so that ISA/EISA bridges can set up a callback so
that their child busses can be attached after the PCI bus
autoconfiguration for their parent bus is done.

This works because:
	(1) there can be at most one ISA/EISA bridge per PCI bus, and
	(2) any ISA/EISA bridges must be attached to primary PCI
	    busses (i.e. bus zero).

That boils down to: there can only be one of these outstanding
at a time, it is cleared when configuring PCI bus 0 before any
subdevices have been found, and it is run after all subdevices
of PCI bus 0 have been found.

This (or something like it) is needed because there are some (legacy)
PCI devices which can show up as ISA/EISA devices as well (the prime
example of which are VGA controllers).  If you attach ISA from a
PCI-ISA/EISA bridge, and the bridge is seen before the video board is,
the board can show up as an ISA device, and that can (bogusly)
complicate the PCI device's attach code, or make the PCI device not be
properly attached at all.

This could be done with machine-dependent code, but as more ports
add support for PCI (and PCI-ISA/EISA bridges) more will need it.
The i386 port could (perhaps should) be converted to use it as well.
1996-11-23 21:58:16 +00:00
cgd f1482e61d8 cast pointers to long, not int, and fix the resulting printf format goof. 1996-11-23 21:42:28 +00:00
cgd 452ba6e098 restrict the FSTATE_STAR prohibition (and panic) to the i386 only. Cloning
devices actually do make sense on indirect-config busses, because you
might be able to have more than one of the busses!  In addition, they're
useful because they don't require unit numbers to be wired down, so you
could e.g. have vga* at indirect? and vga* at direct?, and have the first
one found be unit number zero.  Finally, devices which can divine their
own ports numbers, etc., actually should be cloning, even if you know you'll
only have one bus that they can live on.
1996-11-23 21:36:44 +00:00
jonathan f6a82ef733 * 3c509s drop the low-oder bits of EP_THRESH_DISABLE (2047) on a write,
and the result reads back as zero.  Mask probe code accordingly.
1996-11-22 04:48:26 +00:00
chuck ae805c5cbf midway fixes:
1. fix possible hang in en_txlaunch().   when attempting to extend
	the length of an mbuf to avoid a flush we should extend it
	by cnt [which is ((need - len) % 4)] rather than 4 - cnt.
	also, add an EN_DEBUG printf() when we pad/FLUSH a buffer
	to help with debugging/understanding what the driver is up to.
  2. use interface packet counters
  3. when turning off a recv VCI we recompute the new mode.   make sure
	we don't include the "in service" bit in the new mode, otherwise
	a VCI may appear "hung" if you turn it off while a service
	interrupt is pending.
  4. when shutting down a VCI that is still receiving data, don't bother
	going into "drain mode" if only the hardware in service bit is
	set (otherwise the VCI may get "hung" in drain mode).
	as a result of this we may get "unexpected rx interrupt" messages
	which are not really an error, so put this printf in EN_DEBUG.
  5. be sure to zero txspeed[lcv] when enabling a VCI (start at full
	speed).   (hooks for setting txspeed[] are currently not in
	the driver, but we are playing with it locally).
credits:
	#1: Detected by: Zdenek Salvet <salvet@horn.ics.muni.cz>, fix by me.
	#2: Contributed by: Zdenek Salvet <salvet@horn.ics.muni.cz>
	#3,#4,#5: Detected by: Milind M. Buddhikot <milind@dworkin.wustl.edu>,
		fixed by me.
1996-11-21 20:49:22 +00:00
perry a797b925b2 Incorporate updated version of fixes from FreeBSD submitted in PR
2841, plus some fixes to make the patches work on the Alpha. Seems to
improve the NCR driver a lot. We probably should try to incorporate
any updates that have happened since, too.
1996-11-20 21:26:48 +00:00
gwr 16b8098faa Use ether_cmp() on the sun3 (for the "le" driver - 3/50, 3/60)
because those have to assume LANCE_REVC_BUG, which causes the
driver to compare Ethernet addresses on every received frame.
1996-11-19 21:21:13 +00:00
jonathan 16d760f318 Fix for hanging 3com ``large packet'' (100Mbit) Etherlink-III devices:
* Add a slot in the softc, ep_pktlenshift, to indicate that
    a board implements ``large packets'' (FDDI-sized frames) and
    therefore implicitly shifts the argument to packet-length commands
    by two bits to fit a 13-bit length in  an 11-bit command argument field.

 *  Change  the reset of station-mask filterto be independent of bus-type
    (e.g.,. for 3c515)

 * Replace  the "2044" constant used to disable TX threshold interrupts
   on 3c509-generation cards with a #define. Use 2047 instead,
   since that works on the large-packet cards (Vortex, Demon, Boomerang)
   and 2044 doesn't.

 *  Add code to  epconfing to probe for large-packet support,
    set the softc appropriately, and  shift packet sizes in commands
    by ep_pktlenshift to compensate  for the implicit shift.

 *  Tweak the epconfig() code to avoid hanging on startup.
    Set the Tx threshold to interrupt when there's space for
    a maximal-sized ether frame, then  do epinit() then epstop(),
    instead of just the Tx and Rx reset. Required on at least a 3c595.

Tested on  a 3c595, but not on 3c509-generation hardware.
1996-11-17 23:58:29 +00:00
mikel bcc644fd7e Add missing arguments to NIC_GET in debug code. Fixes kern/2875. 1996-11-17 04:11:18 +00:00
jonathan 40bd2b1104 Fix front-ends of split uha driver to compile when DDB is not configured:
Propagate Debugger() macro from uha.c to uha_{eisa,isa}.c.
  update file names accordingly.
1996-11-15 22:53:36 +00:00
cgd 71f1ac1e29 print ptrdiff_t's by casting to long and printing with %l<whatever>.
(This fixes problems with the printf format fixes i checked in yesterday.
ptrdiff_t is an 'int' on the i386 but a 'long' on the alpha, so the cast
really is necessary...  *sigh*)
1996-11-14 20:33:04 +00:00
cgd b005a8ee10 move cominit() prototype to comvar.h, so that ports which use 'com'
for serial console, but don't use the (i386-specific)
comcninit()/comcnprobe() functions, can do the right thing.
1996-11-13 19:41:35 +00:00
cgd 2bf9f4b20a fix a bunch of printf format botches 1996-11-13 19:34:31 +00:00
thorpej 4ad70417a0 Centralize the declaration of the "en" driver (Efficient Networks, Inc.
155Mb/sec ATM interface).
1996-11-12 23:58:01 +00:00
mycroft 990ebfa55d Fix uha_{reset,init}_mscp() prototypes. 1996-11-12 20:57:43 +00:00