Commit Graph

1727 Commits

Author SHA1 Message Date
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
thorpej b5cf4e96cf Use big-endian CRC on ADMtek multicast hash. 2000-05-18 03:02:45 +00:00
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
thorpej 47490d3527 Whitespace glitch. 2000-05-16 00:18:44 +00:00
dante e66be0bd10 Cosmetic change 2000-05-15 16:38:49 +00:00
bouyer c94bdce1f4 Don't enable debug message by default. 2000-05-15 15:16:59 +00:00
bouyer 863014523a - split siop.c in script-dependant vs script-independant part, for
comming esiop
- add a reset callback for bus-dependant registers settings
2000-05-15 07:48:24 +00:00
thorpej 7da80620c9 splimp() -> splnet() 2000-05-15 01:55:53 +00:00
thorpej e5ae7c287a Symbol namespace cleanup: rl_ -> rtk_ 2000-05-15 01:55:12 +00:00
thorpej 706ee091ed Move register definitions into ac97reg.h 2000-05-15 01:32:03 +00:00
thorpej 1838aef29c ac97.h -> ac97var.h 2000-05-15 01:27:44 +00:00
dante e852afa89f Fix a typo 2000-05-14 19:52:34 +00:00
dante 94cd08a535 Handle better the status codes.
Add a way to instruct the upper layer to don't bother w/ new requests if/when a device queue is full/busy or the device is unavailabale at that time
Use scsipi_inquiry_data instead of its own inquiry structure
2000-05-14 18:25:49 +00:00
dante 1937dbee6a Reflect changes in scsipi_inquiry_data structure: "flags" field is now named "flags3" 2000-05-14 18:22:13 +00:00
he 084953b8f7 Update from Matthew Jacob:
Correctly account for F-port vs. F-port (no FLOGI_ACC) topologies.
  Make sure we get a port database entry for the fabric name server.
  Preserve fabric logins if the device didn't change across fabric
  or port database changes, or the device has already logged into
  us (e.g., for target/initiator dual role devices like Veritas
  SANbox). Propagate class 3 service parameter changes where devices
  can change roles.

  Fix all occurrences of setting a sendmarker so that setting it
  for one bus on dual bus cards doesn't wipe a pending sendmarker
  for other busses on the same card :-;.

  Comments added and clarifications made in some of the target mode code.
2000-05-13 16:53:03 +00:00
jhawk e0292df01c sc_ih (interrupt cookie) is not pci-specific data
and needs to remain in fxp_softc rather than fxp_pci_softc;
otherwise we break cardbus.
2000-05-12 18:46:33 +00:00
thorpej d6c07323b2 If using ring-mode, don't update the receive descriptor list base address
when a receive overrun occurs.  From Castor Fu <castor@geocast.com>.
2000-05-12 17:09:27 +00:00
thorpej f0481f14ab Oops! We actually want the *lower* 6 bits of the crc32 of the multicast
address to generate the multicast filter bit index, not the upper 6.

Should address kern/8268.
2000-05-12 16:57:30 +00:00
thorpej 6e4b4f6954 Use ether_crc32_le(). 2000-05-12 16:45:42 +00:00
thorpej 692e54c43d Use ether_crc32_be(). 2000-05-12 16:44:19 +00:00
tsutsui 0ee6a24aa7 Read upd_pktstatus from DMA buffer after bus_dmamap_sync() called. 2000-05-12 15:22:33 +00:00
bouyer 9b45dfba17 Accept any 'sc' value when probing atapi drives: with some drives, or
controllers, or combination of both, the value can be different from the
expected one after a reset.
2000-05-12 15:00:33 +00:00
jhawk 6622f20fc1 Move pci-specific data to fxp_pci_softc from fxp_pci_softc.
Add some more pci-specific data to fxp_pci_softc.
2000-05-12 03:36:18 +00:00
jhawk e50925114e Catch some potentially infinite loops in while() loops if the chip happens
to "go insane" and never complete some operations (dmasync, etc.).
2000-05-12 03:35:57 +00:00
bjh21 2d09335a35 Fixes from PR 9838:
Only access board memory using the front-end functions.
Add hook for clearing latched interrupts.
Corrent debugging printf of ethertype on LE systems.
Make it possible to us I82586_DEBUG as a kernel option.

Tested on arm26 and mvme68k.
2000-05-11 20:55:03 +00:00
bouyer 2222d240a7 Use correct divider value for scxfer 2000-05-11 09:30:12 +00:00