Commit Graph

1752 Commits

Author SHA1 Message Date
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
dante 8c999651eb Change adw_isr_callback() status handler
Add a catch for DMA Error which show up on Intel 82443BX Host Bridge/Controller (rev. 0x03). This doesn't fix the problem, but reset the SCSI bus and reinitialize the host adapter
Minor cosmetical changes

Thanks a lot to Greg Oster and Andan Lauber
2000-05-10 21:22:34 +00:00
pk 1bf775b965 Conform bus_dmamem_{alloc,map} usage to bus_dma(9) specs. 2000-05-09 22:42:08 +00:00
explorer 6b66bf5d80 set paa_busname to pcmcia, like the i82365.c driver does. 2000-05-08 19:44:34 +00:00
dante 6644e670f7 Change the way ADW_CARRIER is allocated and handled.
Increased ADW_MAX_CCB to 63 and ADW_MAX_CARRIER to 253
Print WDTR/SDTR negotiation result per target
Protect AdvISR() inside splbio()/splx() pair
Add a pending queue to keep track of all the CCBs that are being executed by the host adapter.
Rewrote timeout handler in a more efficient way:
    After 3 timeout now the SCSI is resetted and all pending queues not completed are now reenqueued in the waiting queue so to get executed just after the BUS Reset (hoping that resetting the SCSI BUS and reinitializing the adapter could solve the problem).
2000-05-08 17:21:33 +00:00
mycroft f5bd37be57 Make the SPARC audioamd driver at least *compile*. Well, the C code, that is.
*sigh*
2000-05-08 02:44:31 +00:00
martin 41dc1a6839 Avoid stomping on the W0_CONFIG_CTRL register which seems not to be
implemented on EISA cards. This makes a 3Com 3C597 Fast Etherlink TX
work for me at last, fixing PR kern/7067.
2000-05-07 14:03:25 +00:00
wiz 7392f90215 multiple inclusion protection 2000-05-07 03:01:58 +00:00
wiz 006e9528a1 install bt8xx.h for bktr 2000-05-07 00:29:03 +00:00
wiz c2f780fbfd Import of (finally busspaced) bktr-driver from FreeBSD (part 2).
This version is from the location specified in the README, modified
by bktr2netbsd, to be committed later.
2000-05-07 00:17:13 +00:00
soren 6a1547768c Typos. 2000-05-06 00:44:00 +00:00
matt 2b44ae84ee LP64 printf fix. (I wish size_t was unsigned long on all platforms). 2000-05-05 17:52:38 +00:00
bouyer 904ca34539 Ops, restore sync/wide parameters after a reselect.
Also, better handling of parity errors.
2000-05-05 09:32:48 +00:00
bouyer 4c9516aa3b Rework the command queue, to avoid having commands blocked at the end
of the queue. Load is now properly balanced across all disks of the same bus.
2000-05-05 09:05:44 +00:00
ad fc89ce9f53 Oops, nuke unused structure member. 2000-05-04 17:27:25 +00:00
bouyer 2306b4a34e When a WDTR message is rejected, initiate sync negotiation anyway.
When a SDTR message is rejected indicate that target is async
Add a missing bus_dma_sync call.
2000-05-04 17:18:27 +00:00
bouyer f5b572d26b - LP64 issues in debug printfs.
- on a phase mismatch, do byte recovery only if we were in data phase.
  Otherwise just clear the fifo.
- Properly handle reject of a sync or wide negotiation.
2000-05-04 16:56:13 +00:00
thorpej b29178acf3 Remove unnecessary junk on #undef line that some C preprocessors
get cranky about.
2000-05-03 19:19:04 +00:00
thorpej e37397c2e8 `typedef void ifnet_ret_t;' isn't valid C -- use #define, instead. 2000-05-03 19:17:54 +00:00
thorpej ab635a46d3 Slight change to previous. 2000-05-03 19:15:27 +00:00
thorpej 2d66ccbd13 Don't return an uninitialized error code. 2000-05-03 18:58:37 +00:00
thorpej 01e8438aa8 Fill in ccb->ccb_req.sgcount with the value that's guaranteed to
be initialized.
2000-05-03 18:58:15 +00:00
bouyer 3bb9a5f666 - do sync/wide negotiation
- use a circular queue for the start slots, so that order has better chances
  to be preserved.
2000-05-02 19:03:02 +00:00
augustss f9dbbf4c92 Make am7930 driver machine independent. PR 10032 from Gregory McGarry. 2000-05-02 06:30:49 +00:00
tsutsui 9498452c05 - Move some initialization into MI rl_attach() from each bus attachment.
- Use proper CARDBUS_* macro in if_rl_cardbus.c
- Use product ID read from PCI configuration space rather than from EEPROM
  in if_rl_pci.c.

Patch sent from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> and
some cosmetic changes by me.
2000-05-01 15:08:50 +00:00
soren ac6e6c980d Add Seeq 8003 register definitions. 2000-05-01 08:06:17 +00:00
dante 1dbea6c0f9 Add new microcode for all of the supported boards.
Fix minor glitches.
Add preliminary support for ASB-3940U3W host adapters; it might work w/ autotermination on.
ASB-3940U3W support is not yet tested due to lack of board.
2000-04-30 18:52:14 +00:00
tsutsui 439b360ab9 Modify EEPROM read functions and handle also 9356 EEPROM.
Fixes kern/9861.
2000-04-30 12:00:40 +00:00
is 4cacfc5684 change 10base-t media _setting_ to set autodetect instead.
Contrary to what the rtl8019 docs say, this seems to be necessary.
Observed by myself when implementing non-auto earlier, and independently
complained about by Antti Kante in PR 9962.
2000-04-28 17:49:03 +00:00
augustss 308fa27a0d Unmute some mixer controls by default. From OpenBSD. 2000-04-28 12:39:59 +00:00
bouyer fcf693203f More big-endian fixes from Izumi Tsutsui. 2000-04-27 16:49:07 +00:00
bouyer bf7a94ec2b Fix copyrigth notice. 2000-04-27 14:06:57 +00:00
bouyer ce7f4dafe1 Big-endian fixes from Izumi Tsutsui. 2000-04-26 20:00:31 +00:00
ad d5d441a516 - Bump xfer size limit to the maximum allowable.
- 20 CCBs is enough to maintain a constantly stuffed inbound FIFO.
2000-04-26 15:58:01 +00:00
ad 75bb77ed56 - Rearrange some spl*() calls to be as intended.
- Scan cac_cd in cac_shutdown(), don't use a SIMPLEQ.
2000-04-26 15:54:02 +00:00
tsutsui b4f524c223 - Allocate mbuf dynamically on Tx and use bus_dmamap_load_mbuf(9).
- Call bus_dmamap_sync(9) as appropriate.
- Leave only register declarations in rtl81x9reg.h and
  split other stuff into rtl81x9var.h.

bus_dma(9) code mostly taken from thorpej's if_rtp.c.
2000-04-26 14:02:34 +00:00
thorpej 8b8597dae0 Recognize the Crystal CS4297A codec, and add a couple of macros
to manipulate AC97 codec IDs.
2000-04-26 00:00:41 +00:00
bouyer eba93ce7d2 Ops, need to restore correct DSA value after a phase mismatch, we may have
been interrupted during a S/G operation.
2000-04-25 20:02:33 +00:00
bouyer 88be4752d0 - Change the script to start new commands in an asyncronous way, using
'command slots' in which the host can put command and wait for the script
 to start them
- Change siop.c to do full disconnect/reslelect, allowing as much as one
 command per target/lun to run in parallel.
- Fix bug in registers init where a board without BIOS would end at
  ID 0 (now the driver works on alpha too).
- better handling of messages, sending back a MSG_EXT_SDTR in response to an
  incoming MSG_EXT_SDTR, and MSG_MESSAGE_REJECT for unhandled messages.
- fix use of bus_dmamap_sync() and htole32().
- supports shared interrups
- change some int8 and int16 to int, for alpha and mips benefits ( suggested by
  Toru Nishimura)
2000-04-25 16:27:05 +00:00
tsutsui 6369b56c99 Fix two endian problems. rtk now works on macppc.
- Use le32toh() on reading rxstat from the Rx DMA buffer.
- rl_read_eeprom() should return EEPROM values in little endian
  when caller requires byte-stream data.

bus_dma(9) fixes are still on-going.

XXX rtk on macppc seems to make tons of CRC errors...
XXX Does it work fine on i386 or others?
2000-04-25 14:16:46 +00:00
tsutsui 6f9392b42a Merge changes of sys/pci/if_rl.c rev. 1.8->1.10. (from kern/9870)
Also remove unused pbase, vbase and PCI_CAP_PWRMGMT declarations.
2000-04-24 15:25:00 +00:00
bouyer 19ada4a82a Snapshot of work in progress: new driver for the NCR 53c8xx SCSI controller
(the name 'siop' is still being discussed, may change).
Only basic disconnect/reselect for now, no sync/wide negotiation.
Tested with 810A, 875 and 895 on i386 only.
The bus-independant part should also be able to handle the 53c720 and 53c770.
A new driver with enhanced script should appear for the 825/875/895 'soon'.
2000-04-21 17:56:58 +00:00
enami debe6e88b6 Calculate an offset of mailbox_in correctly by renaming BHA_MBO_OFFSET
to BHA_MBX_OFFSET and using it also for mailbox_in.  Since all mailboxes
should be placed in a single continuous memory due to a hardware limitation,
an offset of any mailbox can be/should be calculated using a same expression.
2000-04-19 02:39:12 +00:00
matt 0aae0cd7a6 only print packets if debug > 1 2000-04-16 17:03:42 +00:00
pk 321bc31690 Remove spurious splx() call. 2000-04-14 20:33:48 +00:00
mrg dfe176302c add some casts to (u_long) to shut up gcc 2000-04-14 08:22:49 +00:00
itojun ecb5f2e56a revisit in6_ifattach().
- be persistent on initializing interfaces, even if there's manually-
  assigned linklocal, multicast/whatever initialization is necessary.
- do not cache mac addr in the kernel.  grab mac addr from existing cards
  (this is important when you swap ethernet cards back and forth)
now ppp6 works just fine!

call in6_ifattach() on ATM PVC interface to assign link-local, using
hardware MAC address as seed.

(the change is in sync with kame tree).
2000-04-12 10:36:38 +00:00
haya e49807d100 Incorporate the changes of RL81x9 driver provided by M. Kanaoka
<kanaoka@ann.hi-ho.ne.jp>.  He separated the driver into IC specific
portion and bus attachment portion and added cardbus attachent.
2000-04-10 07:42:55 +00:00
thorpej 0ed7436590 Add a patchable variable `tlp_srom_debug' that enables dumping of
SROM output, etc.
2000-04-07 18:58:15 +00:00
mrg 952f1cf1d0 avoid using uninitalised variables inside WDCDEBUG. 2000-04-05 06:27:36 +00:00
mrg 36b65b7d48 return if we can't map DMA buffers 2000-04-05 05:54:02 +00:00
thorpej 5a41b5bf56 - if_tlp_cardbus.c: Use the `pmreg' pointer passed by by
cardbus_get_capability() [mirror change already made to if_tlp_pci.c]
- if_tlp_cardbus.c: If we don't find an ISV SROM, try to grab the
  Ethernet address from the CIS.
- if_tlp_cardbus.c: set CardBus cards to store-and-forward mode from
  the get-go.
- Put the TxThresh tables in tulipvar.h, and use them in the CardBus
  and PCI front-ends to go to store-and-forward mode.
- Document the Xircom X3201-3 clone a little more.
2000-04-04 19:22:50 +00:00
bouyer 77f1e5eb02 Add checks to detect busy-waits, conditionnal on new debug flag
DEBUG_DELAY (0x40). This will print how much time we did loop in wdcwait(),
if we had to read registers more than one time.
2000-04-04 12:43:13 +00:00
bouyer fcb3e9ddac Better fix to previous: delay(100) before the IDENTIFY, and if it fails
delay(1000000) and retry. The 1s delay is needed for some special case only,
no need to hang the machine for that long everytime (especially for PCMCIA).
2000-04-04 09:25:51 +00:00
cgd 1f0de7e7d2 actually put a _comment_ before the second read of the ident register
that Charles added in rev 1.58.  Not only is it good programming practice
to explain magic, but code that looks like:

                reg = pcic_read(h, PCIC_IDENT);
                reg = pcic_read(h, PCIC_IDENT);

is _gonna_ be interpreted as a cut-n-paste error by someone eventually.
2000-04-03 01:55:25 +00:00
mycroft b1c28384dc If the SROM size is to far out of range, issue a diagnostic and set the size
to 1Kb.  Some boards (e.g. my SMC9332) have a broken MicroWire interface.
2000-04-02 23:38:05 +00:00
thorpej dc680eb373 Slight correction to last: really only do it if it's a 21142 or 21143. 2000-04-02 19:02:34 +00:00
nathanw c0a4c9e67d Move bt463 code to dev/ic and adapt to the new ramdac interface.
Set default window type to 24-bit truecolor.
Correctly set pseudocolor mode.
2000-04-02 18:57:36 +00:00
nathanw c66f54d73d Adapt to change in ramdac interface. 2000-04-02 18:55:01 +00:00
nathanw 2b4ac6a7b9 Add ramdac_register() to interface structure. 2000-04-02 18:54:33 +00:00
mycroft e70fd4b33c During the socket probe, read the ident register twice.
I don't understand why, but sometimes the clone chips in hpcmips boxes read
all-0s the first time.
2000-04-02 18:29:14 +00:00
mycroft 229fcf5bbe When using MII on 2114[23] chips, zero the SIA TXRX register to disable the
internal Nway engine.  This fixed a major performance problem.
Thanks to Matt Thomas for pointing this out.
2000-04-02 17:23:33 +00:00
bouyer b2cd1f029a Bump delay() from 100 to 1000000 before attempting a IDENTIFY just after a
reset - solves a problem reported by cpg@aladdin.de.
2000-04-01 14:50:32 +00:00
bouyer 26f6c9a9cf - DMA code cleanup: pciide_dma_finish() doesn't stop/unload the current DMA op
if an IRQ was not detected, unless the force flag was given. Use this to
  detect if the IRQ was for us (closer to shared IRQ for controllers which
  don't have their own IRQ handler in pciide.c) and to poll for DMA xfer.
  Also makes the timeout recovery code simpler.
- ATAPI cleanup: don't call controller-specific functions from atapiconf.c
  (wdc_*), so that it's possible to attach an atapibus to something else
  than a wdc/pciide (Hi Lennart :).
  Overload struct scsi_adapter with struct atapi_adapter, defined
  as struct scsi_adapter + atapi-specific callbacks. scsipi_link still points
  to an scsi_adapter, atapi code casts it to atapi_adapter if needed.
  Move atapi_softc to atapiconf.h so that it can be used by the underlying
  controller code (e.g. atapi_wdc.c).
  Add an atapi-specific callback *atapi_probedev(), which probe a drive
  in a controller-specific way, allocate the sc_link and fills in the
  ataparams if needed. It then calls atapi_probedev() (from atapiconf.c)
  to do the generic initialisations and attach the device.
- While I'm there merge and centralise the state definitions in atavar.h.
  It should now be possible to use a common ata/atapi routine to set the
  drive's modes (will do later).
2000-04-01 14:32:22 +00:00
augustss 169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
simonb 5a5c310fae Delete redundant decls of fxp_enable(), fxp_disable() - they're in
i82557var.h.
2000-03-30 02:06:17 +00:00
simonb 9e370d4402 Delete redundant decl of com_attach_subr(), it's in comvar.h. 2000-03-30 02:04:30 +00:00
simonb b75e08a514 Delete redundant decl of aicattach(), it's in aic6360var.h. 2000-03-30 02:02:53 +00:00
tsutsui c693409acb Nuke register declarations. 2000-03-29 13:57:51 +00:00
tsutsui ac8fa9c43d Remove "register" declaration. 2000-03-29 13:09:02 +00:00
ad 627a9ec886 Spelling error. 2000-03-29 12:02:01 +00:00
simonb 8a447f3757 Remove reduncdant decl of wdc_kill_pending - it's in <dev/ic/wdcvar.h>. 2000-03-29 03:56:53 +00:00
simonb bfb011b813 Remove duplicate ncr53c9x_dmaselect declaration. 2000-03-29 03:03:28 +00:00
kleink ba9bb9dcd5 Cosmetical nit in previous. 2000-03-27 17:00:50 +00:00
onoe 6daecf7901 Fix multicast filter to set IFF_ALLMULTI flag properly. Also clear
unused group address from filter.
2000-03-27 12:58:01 +00:00
onoe 720e17c11e Do not try to lock out MAC until the firmware correctly start up, to avoid
"awi: failed to lock interrupt" message when IRQ are shared with other
devices [PR kern/9660]
2000-03-27 12:54:59 +00:00