does a "restore data pointers" when reselected after disconnecting in
the middle of a DMA transfer). The driver needs a different way to know
which script to continue the DMA transfer. The message-in for the "restore
data pointers" loses the original "resume" script, and the driver would
attempt to continue the DMA transfer at the beginning of the current DMA
chunk, rather than at the point the disconnect occured. The result was a
spurious console message, and a trashed filesystem.
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
* hoist code to deal with fragments of a 16-byte chunk outside
main copy loop.
* over 98% of dynamic calls are 2-byte-algnied but not 4-byte-aligned
(due to 14-byte Ether headers). kernel bcopy is poorly tune for this.
Replace bcopy() with inline code tuned to minimize accesses
to DMA buffers, which aren't uncached on mips.
Tested on 5000/240 (3MAXPLUS) and 3000/700 (sandpiper) (mjacob@feral.com)
re-enabled with ASC_IOASIC_BOUNCE.
All DMA buffered processing is now done in the bus-specific DMA routines
in asc_ioasic.c and asc_tc.c.
Disable several informational messages dealing with non-empty FIFO conditions,
but allow enabling with ASC_DIAGNOSTIC for troubleshooting.
* Move clockvar.h (header file for generic clock code) to sys/dev/dec.
* Move if_le_dec.c with DEC padded LANCE-dma (pmax/pmax, ioasic, vax 3400)
to sys/dev/dec. Remove from sys/dev/tc.
* Declare attribute le_dec_subr in /sys/dev/dec/files.dec,
use if_le_dec.c when it's defined.
* Move IOCTL asic declaration from pmax and Alpha MD machine
files to sys/dev/tc/files.tc.
* move TurboChannel and ioasic if_le attachments from pmax and Alpha machine
config files to /sys/dev/tc/files.tc. Add le_dec_subr attribute.
* Add if_le_dec attribute to if_le_ibus (pmax ds3100 pmax) LANCE attachment.
after synch negotation during device probes, the 53C94 stops with the target
reqesting more command data. The fifo appears to still contain a couple of
bytes, so transfer them. If the target still wants command data after that,
do a transfer pad. The target seems to function normally after this. A
much better solution thant simply rebooting!
Also fix a problem when compiling with DIAGNOSTIC - a mismatch between using
DIAGNOSTIC and MACH_DIAGNOSTIC caused the compile to fail.
Try to start another target and a device disconnects.
* Don't print DMA_OUT message in the `normal' case of a 16-byte residual.
* ioasic-connected 53c94 devices are always clocked at 25MHz even on
machines with 12.5MHz TurboChannel.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
a "Smart Frame Buffer TURBOchannel Module" user's manual(?), and from
some "DECstation 5000 Model 240 Options and Upgrades" guides found
while cleaning out my office.
* When we are transferring in DATA (in asc_dma_in) and the target
is an async device, there is sometimes an extra byte in the FIFO.
If so, we need to drain that byte out of the fifo, but if and only
if the target is async. See also the comments in asc_dma_in()
in the related Mach mk84 asc driver (scsi_53C94_hdw.c), which
has an identical fix but applied in more restrictive conditions
than we need, with async *disk* targets, as well as async tapes.
* Add a watchdog and timeout active SCSI requests, to eliminate any
potential for deadlock due to applying the fix above on newer
silicon versions of the 53c94 which may not have the above problem.
Should use the MI scsi per-target timeout instead, when available.
cfattach code for TC SCSI option cards and ioasic 53c94 baseboard SCSI.
ascvar.h: shared softc declarations
asc_ioasic.c: ioasic front-end code.
asc_tc.c: Turbochannel option (and 5000/200 basebard) front-end code.
* ioasic_attach meeds more work to eliminate pmax_type dependency
and to verify the clocks speed passed to 53c94.
* Add prototypes for asc script entry points; should compile with
-Wstrict-prototypes -Wmissing-prototypes.
* Use tcvar.h interface. The usage of tc_syncbus() and tc_mb() may
not be quite stylistically on an Alhpa, but it apparently makes no
difference on the eerly-generation Alpha CPUs in TC Alphas.
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
function, and kill any locally-defined print function.
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.
Enable reselections as soon as possible after a disconnect - prevents
losing a reselecting device.
Check for and ignore a spurious interrupt during a DMA input (from the
Mach driver).
Turbochannel as well as the IOASIC. It should now work on the 5000/200.
Removed the "aborts" which could leave the disk trashed when the abort
rebooted the system. Fix the data corruption problem by clearing the
FIFO before starting a data transfer.
* Change MachEmptyWriteBuffer() to wbflush(). Should use TC mi names tc_mb(),
tc_wmb, tc_syncbus() but I'm not sure which each wbflush() should be.
* Add prototyped forward decl for asc_Dumplog() and add an explicit void
return type.
* Remove unused variables.
alpha. At some point in the future, those headers should be provided
on the pmax, but until then, things are #ifdef'd so that the old
headers and definitions are still used. Pass a bus_chipset_tag_t
to the TC bus attach code and to devices, on the alpha.
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.
Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
chip-independent clock code. 'clock' has been renamed 'mcclock' 'clock'
has been renamed 'mcclock' (since it's a driver for that particular
clock, and since eventually there may be another clock chip driver),
and now attaches via seperate match/attach functions to both TC and ISA.
This removes a whole lot of #ifdefs...
to {mainbus,tc,ioasic}_cd.
Change ioasic config name from "lance " to "lance". Correct for
pmaxes, perhaps not for Alphas.
Boots and runs under load on a 5000/200. Hangs during boot on an ioasic
decstation; pmax autoconfig needs fixing.
Add Decstation-3100 baseboard support (untested).
change tc_submatch() to compile with the new device-attach scheme:
the TC bus uses a 'submatch' function which checks device locators
and then calls a match function.
Instead of calling cf->cf_driver->cd_match(), we now need to call
cf->cf_attach->ca_match().