Commit Graph

1752 Commits

Author SHA1 Message Date
soren 8b0390203b Some minor diagnostics cleanups. 2000-06-06 16:41:33 +00:00
soren 1ec719ccc0 Add power management hooks. 2000-06-06 16:26:57 +00:00
sommerfeld f1802cf848 Fix previous change: guard against missing subdevices of pckbc. 2000-06-06 16:21:22 +00:00
tsutsui 499db14bcb sun3 always defines Debugger(), so don't redefine it. 2000-06-06 14:24:05 +00:00
sommerfeld bcf02ec8ff If rnd is configured into the kernel, do rnd(4) entropy collection
from devices connected to pckbc:
 - Do actual sample collection in pckbc.
 - Add rndsource_element_t to the slot data.
 - Change pckbc_set_inputhandler() to take an additional argument,
the name of the device, which is (eventually) passed into
rnd_attach_source() to identify the source.
 - Change callers of pckbc_set_inputhander() appropriately.
2000-06-05 22:20:54 +00:00
bouyer 0e7cd755f4 use the correct variable in a debug printf(). 2000-06-05 21:47:25 +00:00
tsutsui a12331c461 Oops, struct scsipi_adapter was changed recently. 2000-06-05 15:19:42 +00:00
nisimura 4371d91433 Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.
2000-06-05 07:59:50 +00:00
matt 6204fa3c99 Update to new evcnt stuff 2000-06-05 02:28:19 +00:00
fvdl c8c1e5854f Fix wrong test for (software) queue blocked condition. 2000-06-04 11:42:55 +00:00
matt 576faa0c31 Start couting interrupts. 2000-06-04 02:14:12 +00:00
fair e3a9f21a5f Change the debug level from 1 to 3 for "skipping target" diagnostic
which spews unreasonably for a Qlogic SCSI-2 narrow controller, which
does not have ID's above 7.
2000-06-03 22:44:43 +00:00
fvdl b9bb94500e Obey the "Reset SCSI bus at startup" EEPROM setting. 2000-05-29 20:13:53 +00:00
jhawk 1e59d99d28 For all network drivers that call ether_ifattach(), and also
have _detach() functions:
  Ensure that softc keeps state about whether the attach succeeded,
  and make the detach function return immediately if the attach did
  not complete.
2000-05-29 17:37:12 +00:00
tsubai 8cde93a435 * Support (not so) new cards. (only Cyclom-8YsP+ is tested)
* Make compilable with CY_DEBUG.
2000-05-29 12:05:41 +00:00
matt 2864a7186a reclaim transmitted packets on receive interrupts. 2000-05-28 01:28:52 +00:00
fvdl 3713246e34 Don't bother searching the qinfifo for SCBs to requeue in the BUSY
and QUEUE FULL cases; this is already done for all BAD_STATUS cases.

Make sure to requeue the SCB in the above cases internally in the driver,
the SCSI layer doesn't know how to deal with it properly.
2000-05-28 00:19:59 +00:00
fvdl 4b7b35ae8a When a bus is accessed for the first time, reset it. Without this,
some devices may not be found if the BIOS (which would normally
do the reset at startup) is disabled. Should really be done from the SCSI
layer.

Implement the SCBUSIORESET ioctl.
2000-05-27 21:58:15 +00:00
dante 39c7c9aff6 Change AdwInitCarriers in adwmcode.c
Add new AdwInitCarriers prototype in adwmcode.h
All of the supported adapters are now initialized calling a unique common
    function
2000-05-27 18:24:50 +00:00
thorpej d0a8b751b2 Don't use sleep() and a callout; just use tsleep(). 2000-05-27 04:46:24 +00:00
matt dd266dbb2f Fix counting of output packets. Only count descriptors with TDES_LS set.
Also make transmit timeout logic more correct.
2000-05-27 04:26:32 +00:00
tsutsui 7ae8c684a8 Increase delay on EEPROM access.
CATS sometimes cannot read MAC address correctly.
2000-05-27 00:55:42 +00:00
ragge 38d5764cd1 Fix for a driver bug provided by Jon W Grubbs (jgrubbs@megsinet.net).
This bug is only visible on some disks, and I have verified that it works
correctly on VAX. However, du to the author, it is a problem on other
machines/disks as well. Here's the author's comments:

> The MI code for the NCR5380 has a small bug in it  The RZ56 wants to
> negotiate for Synchronous Data Transfers and when it does, the current code
> looks like it will send a REJECT message as the spec calls for when we cant
> handle the request.  However, a couple of lines of code in the
> ncr5380_msg_in routine are missing wrt the PARITY message and anything that
> wants to send a REJECT message.  The ATN setup that is done in
> ncr_sched_msgout is immediately negated by the final byte ACK sequence in
> this routine.  This causes bad things to happen to an RZ56.
2000-05-26 21:11:00 +00:00
tsutsui e3427d8f2c Call bus_dmamap_sync() properly before/after reading fcd_stats
in fxp_control_data.
2000-05-26 19:11:24 +00:00
thorpej 8a3725612d Add support for the Davicom DM9102 and DM9102A 10/100 Ethernet chips.
Partially based on diffs submitted by Matthew Orgass <darkstar@pgh.net>
and IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>.
2000-05-26 16:38:13 +00:00
dante 3d7bdc4c94 Fix a bug introduced in last commit which caused a painc due to
re-enqueueing an already free ccb.
Prepare the background to have a unique initialization function for
    all of the supported host adapters.
Rename a lot of #define in a more sane way.
Move Carriers initialization and defines in adwmcode.{c,h}
Don't lose Carrier nodes in case of a BUS/Chip reset explicitly invoked
    after a DMA failure.

XXX - DMA failure still arise when AdvanSys U[2]W host adapters are used
      in conjunction with Intel 82443BX Host Bridge/Controller (rev. 0x03).
      !?!Have to understand why!?!
2000-05-26 15:13:43 +00:00
tsutsui 5dca757b0e Swap the order of u_int16_t member in Tx/Rx descriptors
on big endian machines.

"Big endian mode" of smc83c170 actually works!
(i.e. no htole??()/le??toh() functions are needed.)
2000-05-26 00:20:26 +00:00
tsutsui dea97be7fd Don't use bcopy() to copy u_int16_t data to u_int8_t array. 2000-05-26 00:14:41 +00:00
thorpej c9a7ec7a66 Add Davicom DM9102 registers. 2000-05-25 22:50:11 +00:00
thorpej 7c709cc6b4 Comment the fact that the X3201-3 requires FS|LS in the setup
packet descriptor.
2000-05-25 22:18:07 +00:00
thorpej f4a3f5ea48 So, while the DEC chips and other clones want no FS|LS in the
setup descriptor, apparently the Xircom X3201-3 requires it.
2000-05-25 18:46:07 +00:00
thorpej 215a635a5b Truncate receive buffers to 4-byte boundary. Slightly modified
from kern/10198, from Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>.
2000-05-25 16:47:18 +00:00
thorpej 2f08658512 Fix a couple of typos in debugging messages. From IWAMOTO Toshihiro,
kern/10194.
2000-05-25 16:37:33 +00:00
thorpej 05a766d42e Don't set FS and LS in the setup packet descriptor. From
IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>, kern/10194,
and confirmed with the 21040 manual.
2000-05-25 16:36:03 +00:00
fvdl 3e54d43abc Be sure to not use tagged queueing for a few commands. 2000-05-25 11:41:05 +00:00
bouyer b063b2ec36 Separate the sheduler from the main script, allocate another DMA-safe
memory page for the sheduler. Put the main script in the on-chip RAM when
available.
Avoid a null-pointer dereference when DSA is invalid.
2000-05-25 10:10:54 +00:00
soren c25111e4ae Make two previous changes more correct, as shown by Izumi Tsutsui. 2000-05-24 13:20:32 +00:00
soren 8922795de0 The EEPROM is little-endian. 2000-05-24 08:04:23 +00:00
soren 66083288eb Fix DMA status reading on big-endian systems. From Sanjay Lal on port-macppc. 2000-05-24 07:49:13 +00:00
soren 35bf53bd9c And a newline after error string. 2000-05-24 06:04:12 +00:00
bouyer 2904666f56 Allocate dynamically the command block descriptors. 2000-05-23 17:08:07 +00:00
soren 9f00930ace Make AHC_DEBUG compile. 2000-05-23 03:50:12 +00:00
fvdl c9fe89891a Don't try to re-enable tags once they have been disabled because of a
MSG_REJECT from the target. Obey the NOTAG quirk.
2000-05-22 21:14:24 +00:00
tsutsui a6d8e45ba7 Call bus_dmamap_unload() if any Tx mbuf remains in rtk_stop(). 2000-05-21 13:00:46 +00:00
matt 20a98cb524 count input and output packets. 2000-05-20 18:33:18 +00:00
jhawk 92f539aa66 Calibrate the timeouts from rev 1.26 by using DELAY(1) so their
values are less machine-dependant. Fixes port-i386/10141, where
spurrious timeouts were being seen.
Also note the line numbers of the timeouts so it can be determined
which is being seen (via __LINE__).
2000-05-19 16:00:30 +00:00
tsutsui f2973e2fb8 - Change RL_* -> RTK_*
- Free bus_dma resources if attach fails
- Add detach and power management code

Patch from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> in kern/10156.
2000-05-19 13:42:29 +00:00
thorpej f636538446 NULL != 0 2000-05-19 04:34:39 +00:00
mrg badbd98b2a rearrange the order of bus_dma operations to be more like many other
drivers, at the suggestion of fvdl.  also, use bus_dmamap_load() not
load_raw().
2000-05-18 14:00:46 +00:00
mrg cc57e4111a do not pass a `boundary' argument to bus_dmamap_create(), particularly one
that is smaller than the `size' argument.
2000-05-18 12:49:09 +00:00