Commit Graph

1908 Commits

Author SHA1 Message Date
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
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
onoe ab9d324f37 backout changes between 1.10 and 1.12 to re-enable awictl stuff.
Actually, it is partially duplicated with SIOC[GS]IFMEDIA and
SIOC[GS]80211NWID ioctls currently supported.  But I'd like to leave it
until configuration interface for common 802.11 stuff will be cleaned up.
2000-03-27 12:52:45 +00:00
kleink 230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +00:00
soren 7b737d77b3 For Cobalt Networks 21143's, always use store-and-forward and toggle
a GPIO line to fully reset the PHY.
2000-03-26 10:53:39 +00:00
itojun 130ac9eafe don't call if_deactivate with NULL ifp.
sc->sc_ifp can be NULL if awi_pcmcia_attach() fails, so you will see panic
if you remove a card which fails on attach.
2000-03-26 10:09:33 +00:00
fvdl aa0f78b2f6 We can use openings = 16 here; this won't even exhaust the number of
allocated SCBs for 16 targets, and it's a noticeable difference.
2000-03-25 21:09:08 +00:00
fvdl 97688d9a83 Do simple tagged queueing, enabled by default. 2000-03-25 19:52:12 +00:00
tsutsui 9100212ef0 Add a "sc_rev" member to ncr5380_softc and handle CXD1180 quirk
in MI ncr5380sbc.
2000-03-25 15:27:54 +00:00
ad b84aceb90d The bus_space stuff handles byte order conversions for us. 2000-03-25 13:38:35 +00:00
ad cefe92ae42 Remove paraniod debug check that was mistakenly committed. 2000-03-24 14:33:09 +00:00
hannken 43e3ea96f3 Fix typos from last commit (callout). 2000-03-24 11:46:46 +00:00
thorpej 75f3a36686 Remove bogus callout_init(), pointed out by soren@netbsd.org. 2000-03-23 17:51:51 +00:00
soren 2c88f0bb92 s/32-bits/32-bit/ (Hi Al!) 2000-03-23 15:04:49 +00:00
onoe 6654f3bc85 While am79c930 controller allows unaligned access, bus_space_read/write
must be aligned.  So awi_read/write_2/4 issues multiple bsr1/bsw1 when
unaligned.
2000-03-23 13:57:58 +00:00
enami dce7fa489c Fix a typo in comment in previous commit. 2000-03-23 08:20:06 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
onoe 3ae525eaa3 Sorry I forgot to commit this file.. 2000-03-23 06:04:24 +00:00
mycroft dcd265af9c GC unused variable. 2000-03-23 05:26:00 +00:00
mycroft e695f87102 Remove AWICTL stuff that is obsoleted by SIOC[SG]IFMEDIA and SIOC[SG]80211NWID.
Also, disable AWICTL completely until awictl.h appears.
2000-03-23 05:19:44 +00:00
ws 7da71e5f9e Make IPKDB working again.
Add support for i386 debugging and pci-based ne2000 boards.
2000-03-22 20:58:25 +00:00
ws 1b83998bd7 Add bus_space_barrier.
Add DELAY in some busy loops to allow the dma engine to actually do something
(neccessary on fast processors).
2000-03-22 18:02:59 +00:00
onoe 5644a7e248 Update awi driver, which now supports AMD 79c930 based 802.11 DS cards
as well as 802.11 FH cards.  Also, it can operate in infrastructure mode,
adhoc mode, and wi(4) (aka WaveLAN/IEEE) compatible adhoc mode.
2000-03-22 11:22:20 +00:00
mycroft b58a073f39 There's no need to frob cfg4/cfg5 in _attach(), since _reset() does it. 2000-03-22 03:27:56 +00:00
ad e32aed3c4e Pass xfer size to disk_unbusy(). 2000-03-21 19:47:59 +00:00
enami 83446dedc1 - Test the generic device active flag instead of home grown one.
- Test also it in wdcintr.
2000-03-20 22:53:36 +00:00
ad 424f6471cb - Remove dead code.
- Make synchronous writes optional, disabled by default (*way* too slow).
- Handle case where dm_nsegs > CAC_SG_SIZE.
- Fix a couple of silly bugs.
- Fix use of __attribute__((__packed__));
2000-03-20 18:48:34 +00:00
ad d02615fe27 Install cac{reg,var}.h. 2000-03-20 18:07:59 +00:00
thorpej 92d27d3c2e Get rid of the powerhook when we detach. 2000-03-20 07:52:58 +00:00
tsutsui 979d79d931 Use sc_cfg4 for the Am53c974. 2000-03-20 05:48:28 +00:00
mycroft 8b484a0264 NCR_SCSIREGS() and NCR_PIOREGS() are bogus. GC them. 2000-03-20 00:50:20 +00:00
mycroft 41cd6b4fc9 Reset CFG4 and CFG5 correctly in the reset routine. 2000-03-20 00:49:42 +00:00
thorpej 92c19e5ff7 Add suspend/resume hooks to ensure that the chip doesn't scramble memory
after an APM suspend and is unsnoozed after an APM resume.
2000-03-19 21:45:23 +00:00
mycroft b8e1812629 For the ESP406/FAS408, add sc_cfg4 and sc_cfg5.
Add a detach routine, and do the addref/delref.
2000-03-19 21:25:49 +00:00
pk 6d04005134 Check for console input and output separately.
XXX - split input/output for /dev/console is not yet supported.
2000-03-19 12:42:45 +00:00
pk 3f1373d9b7 Define separate flags for console input and output.
Allow console operations to be passed in attachment arguments.
2000-03-19 12:39:47 +00:00
scw b0ca3fa931 The soft-interrupt handler now returns void. 2000-03-19 10:38:43 +00:00
mycroft 744ccf496c Expose ncr53c9x_init(). 2000-03-18 22:18:57 +00:00
mycroft c0b35f72c2 Adjust ncr53c9x_intr() prototype. 2000-03-18 22:09:32 +00:00
mycroft b1d2b97787 Change footprint of ncr5380_intr() to match normal interrupt handler usage. 2000-03-18 17:14:34 +00:00
mycroft 1d1321109f Use bus_space on MIPS. 2000-03-18 17:07:46 +00:00
mycroft 0af581a1a1 Add a ncr5380_attach() routine which does part of the initialization, attaches
the scsibus, and does the addref/delref dance.
2000-03-18 16:13:22 +00:00
mycroft 5960b2aec6 Move some code around in preparation for nca_pcmcia. 2000-03-18 13:05:20 +00:00
ad afaa5767a3 Match shutdown msg with that of cac.c. 2000-03-16 15:13:05 +00:00
ad a81a812b50 Remove unneeded field in 'struct cac_ccb'. 2000-03-16 15:07:22 +00:00
ad 70063dc527 Driver for Compaq array controllers and disks (cac(4)/ca(4)). 2000-03-16 14:52:22 +00:00
fvdl f44ddd61a9 Do bus-specific interrupt handling (i.e. ahc_pci_intr) via a bus_intr
field in the softc, instead of relying on NPCI > 0. This would
prevent things from compiling if PCI buses were in the config file,
but ahc was attached only to something else than the PCI bus.
2000-03-16 10:33:45 +00:00
augustss f9fd27ea3c Fix an uninitialized variable. From Krister Walfridsson <cato@df.lth.se> 2000-03-15 22:41:29 +00:00
thorpej c38405d33d Add power management support to the `tlp' driver. The battery on my
laptop lasts a whole lot longer now.
2000-03-15 18:39:50 +00:00
sommerfeld fbc4dbb7ac Catch up to rearranged aic7*.h files 2000-03-15 07:17:06 +00:00
fvdl 1e4647a15b New ahc driver, a port of Justin Gibbs' FreeBSD driver. This adds
support for the U2W chips, and U160 controllers.
2000-03-15 02:08:28 +00:00
fvdl 085f68836e Common code for EISA and VL frontends for the ahc driver, split off
by Noriyuki Soda when updating for the new ahc driver.
2000-03-15 02:06:18 +00:00
jdc 797ac20035 Add power management hooks. 2000-03-14 21:20:51 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
thorpej 0391e3393f Slight change to the SROM size printf. 2000-03-10 02:46:39 +00:00
matt 9f86839658 change Mb/s to MB/s (Megabit to megabyte). 2000-03-09 23:19:26 +00:00
groo 7e567738f2 support rfact. use manufac. suggested resistor values by default
clean up some comments
2000-03-09 04:20:58 +00:00
groo af00b7b880 split probe into generic and bus specific 2000-03-07 18:39:14 +00:00
enami c1b54794fc Add missing `cnt++'. 2000-03-07 03:37:39 +00:00
enami 7ce8a9f46b Also, fix indentation in previous commit. 2000-03-07 03:34:52 +00:00
soren dfaacf6eab Fix bug in previous. 2000-03-07 01:08:55 +00:00
soren 6cc1408bca Only print SROM size if TLP_DEBUG. 2000-03-07 01:06:12 +00:00
mycroft 5eee9ca94c Determine the size of the SROM by probing the chip using the standard Microwire
protocol.  Eliminates the need for srom_quirks and some other trash.
2000-03-07 00:39:17 +00:00
mycroft 064b1bd2e9 Fix obvious typo. 2000-03-07 00:33:13 +00:00
thorpej a183d34f04 - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
2000-03-06 21:36:05 +00:00
thorpej a6f861574a No longer necessary to futz with ifp->if_baudrate here. 2000-03-06 21:02:00 +00:00
enami 9066b12bbb Remove redundant assignment. 2000-03-06 10:21:46 +00:00
elric b16807c51a Graphics card independant Bt485 code, derived from dev/pci/tga_bt485.c. 2000-03-04 10:25:57 +00:00
elric c4019af322 Definitions of standard TGA monitors as used by DEC. 2000-03-04 10:25:07 +00:00
elric 7428bb6ffd Definition of struct monitor, which contains syncs, and dot clocks. 2000-03-04 10:24:34 +00:00
elric fec44d6f55 Header for a generic RAMDAC that can be reused between different
graphics cards.
2000-03-04 10:23:39 +00:00
is d8bf2eb8ef - we didn't write enable toe config1-3 registers before trying to set the
media.
- read out original settings to find out what the defaults (EEPROM) for this
  board were, instad of hardwiring to auto.
XXX the first might need further refinement. At least on my boards, 10baseT
doesn't work for 10baseT, only AUTO.
2000-03-03 21:37:18 +00:00
enami a5921b902e Check if device is active in the interrupt handler and the one second
tick handler.
2000-03-02 01:21:56 +00:00
thorpej ac1b683642 Amend previous; pay attention to EX_CONF_MII on deactivate, too. 2000-03-01 20:53:11 +00:00
thorpej 448dfa4249 Only detach PHYs if we have MII in the first place, and remove a bunch
of #if 0'd code which was copied from the Tulip driver.
2000-03-01 20:51:50 +00:00
ad c09a9a072f Oops, pasto. 2000-02-29 11:14:46 +00:00
joda c627d45cc3 (fxp_init): don't clear the FXPF_MII flag as this results in a panic
when detaching
2000-02-28 10:16:17 +00:00
mycroft a87f80ad5f Give the VPP bits better names. 2000-02-28 07:33:08 +00:00
enami 71df610aeb Remove no longer necessary workaround for hpcmips. 2000-02-27 22:57:20 +00:00
augustss 7b4eccb432 Use DPRINTF for debug messages. 2000-02-27 21:06:55 +00:00
mycroft 61cc77895b Some minor cleanup to the probe code. 2000-02-27 20:01:05 +00:00
thorpej 6f1701b01c Put a lock on the pcic, to serialize access to the chip during event
handling.  This is important when multiple cards are present when
the system boots, as we use tsleep now instead of delay in various
places (delay used to provide serialization by virtue of not causing
a context switch).
2000-02-26 17:24:44 +00:00
mycroft 49f1a84ad6 Be even more careful about cleaning up the socket at boot time.
Also, nuke the windows when the socket is disabled.  (They might be deallocated
and reallocated, and would thus cause a conflict.)
2000-02-25 20:45:43 +00:00
drochner 7da6407d04 add (minimal, PIO only) support for the popular "Tundra Universe"
PCI-VME interface chip and a frontend for the "Bit3 Mod. 2706"
PCI-VME adapter
2000-02-25 18:22:39 +00:00
mycroft 7dbe5be481 Disable all windows at boot time, to avoid conflicts when reading the CIS.
Also, GC a small bit of code that's inaccesible after the previous change.
2000-02-25 05:26:17 +00:00
mycroft ac4c520f05 If we fail to attach the socket driver, clear PCIC_FLAG_SOCKETP so that we
don't try to use the socket any further.  (This will only happen if the user
explicitly unconfigured some of the sockets.)
2000-02-25 04:24:37 +00:00
itojun 1ccb9e8170 when change mbuf type, clear m_pkthdr so that we do not get panic with
old data in pointer fields.  NOTE: we'll extend m_pkthdr field soon.

Wondering: do mbuf pre-allocation code in elink3.c really buy us much
performance?  it comes with code duplicate/synchronization problem with
sys/mbuf.h...
2000-02-25 03:39:13 +00:00
groo f5f2ad429c Initial import of National Semiconductor LM7[89] Hardware Monitor with isa and
pnpbios attach.

examples:

	lm0 at pnpbios0 index?
	lm0 at isa? port 0x290


TODO: spinlocks, i2c interface.
2000-02-25 02:17:43 +00:00
ad 50062f0914 - Don't use bitfields.
- Cosmetic changes.
- Shut down all HBAs "simultaneously", not individually.
- Don't bother grokking HA_ST_MORE. It causes problems.
- Other bits and pieces.
2000-02-24 18:47:55 +00:00
thorpej 3f9cf7572c Don't use void * for chipset tags. Bad hacker, no biscuit. 2000-02-22 16:04:44 +00:00
enami 32f100250f Cosmetic changes. 2000-02-22 02:38:26 +00:00
dbj 8f2d14fbd1 added wmesg argument to pcic_delay debug printout 2000-02-21 20:16:22 +00:00
mjacob 7f44584598 clen up some error messages 2000-02-21 19:18:53 +00:00
mjacob d88aecac57 Remove residual and now broken !ISP_NO_FASTPOST_SCSI code (which was
turning back on fast posting!). Redo fabric (re)login loop- don't try
and log out ports that haven't been logged in. Do correct target id
shuffling so we just always find the target ID we want. Add in support
for > 12 byte commands for parallel SCSI. Handle some Dual Bus reset
stuff. Finally fix ABORT COMMAND to use the right 16 bit order of the
handle to abort.
2000-02-19 01:53:56 +00:00
mjacob ff86abe827 Cleanup some printaouts. 2000-02-19 01:51:43 +00:00
mjacob b6dd4ddacf Add in ISP_SWIZZLE_CONTINUATION macro. 2000-02-19 01:51:21 +00:00
mjacob 8c2e6c73e3 Handle dual bus cases for immediate notify and enable lun commands. 2000-02-19 01:50:57 +00:00
mjacob 98f7f7b5a0 Fix ITDEBUG macro 2000-02-19 01:50:25 +00:00
mjacob 77dec43b22 Clarify cd_resid tag. 2000-02-19 01:50:03 +00:00
mjacob 8405ee3752 Add in some mbox return codes that define when we've used up target
ids for doing fabric login. Define the 'Get All Next' SNS response
structure.
2000-02-19 01:49:47 +00:00
thorpej 132107ce3b Add a whole slew of registers found in the PCnet-PCI family. 2000-02-17 20:18:29 +00:00
sommerfeld 50c84950f2 awi: rewrite to be higher performance. 2000-02-17 17:37:23 +00:00
sommerfeld 7adb22cfa5 Add detach support.
Light cleanup.
2000-02-17 15:58:32 +00:00
pk 1d373a94e2 Bump receive buffer size up to the maximum DMA burst boundary. 2000-02-14 17:14:28 +00:00
bouyer 085f44145c - Be more strict in status check before sending a command (make sure
DRQ is not asserted). Closes kern/9346.
- Change the "fake identify before the real one" by a delay(). The real cause
  of the problem is that the drive is unresponsive just after a reset.
  The real problem (and the solution) showed up after the first change.
2000-02-14 12:37:35 +00:00
thorpej 1268cc5d6c If we got an xfer from our backlog queue, don't allow sleeping; we're in
interrupt context.

XXX This is fixed properly in the thorpej_scsipi branch, but that won't
be ready for 1.5, I don't think.
2000-02-12 19:12:52 +00:00
enami 01868857df Add activate routine and check device active flag also in one second
tick handler.
2000-02-12 04:05:49 +00:00
enami fbc47bda30 Cosmetic changes. 2000-02-12 03:55:49 +00:00
mjacob 1b188ee2ff A lot of cleanup and shrinkage. Some items moved to isp_tpublic.h. 2000-02-12 02:33:34 +00:00
mjacob 55a78c1ee4 Add in 12160 (Ultra3) support. Turn back on fast posting for the new
generateion parallel SCSI cards (1240/1080/1280/12160). Split up nvram
reading routines to be more readable. Fix topology reporting- 2200 has
connected topology in mailbox 6 when you're done getting your loop id
(supported: Private Loop (NL Port), N-Port, F-Port, FL-Port). The 2100
doens't report this, but we can synthesize it to be either NL-Port or
FL-Port. Add in some connection mode async events.
2000-02-12 02:32:21 +00:00
mjacob 56e16448ad add in 12160 (Ultra3) related definitions 2000-02-12 02:29:00 +00:00
mjacob 9f63fdeefb add in 12160 (Ultra3) NVRAM definitions 2000-02-12 02:28:32 +00:00
mjacob 87355d841f add some Qlogic 2200 point-to-point and extended ICBOPT definitions 2000-02-12 02:26:26 +00:00
mjacob 50f2620822 add 80 MHz case 2000-02-12 02:25:28 +00:00
mjacob 3f96822c3b some minor cleanups 2000-02-12 02:24:20 +00:00
mjacob 63c56a9de6 add a more public shared i/f to target mode 2000-02-12 02:23:13 +00:00
chopps 44b423d73b always map attr memory 8 bit, since its defined that way. 2000-02-10 09:00:19 +00:00
joda d40e2b51ee add detach code 2000-02-09 22:15:57 +00:00
enami e00270524e ASIX AX88190 support (Planex FNW-3700-T and Melco LPC3-TX) from FreeBSD/PAO3. 2000-02-09 15:40:23 +00:00
enami 99f529f0b3 - Since all resources are mandatory, no need to manage individually.
- KNF some code.
- Factor out some code into function.
- Disestablish an interrupt handler when failed to enable card power.
2000-02-09 14:42:33 +00:00
mycroft 2a2d421881 Forgotten part of chopps\'s i82365_isasubr.c commit. 2000-02-08 17:56:58 +00:00
enami c7573d517e - Bail out from attach stage if failed to enable card, number of iospace
or memspace is unexpected, failed to map iospace or failed to configure
the controller properly.
- Disestablish an interrupt handler if failed to enable card.
2000-02-08 12:49:12 +00:00
thorpej bfdc6759fb Don't rely on the receive descriptor's BCAST/MCAST status bits. Test the
Ethernet destination address to see if it's multicast.
2000-02-08 00:22:13 +00:00
thorpej 52a2804a5c Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel.  Make all clients
of ISA DMA use this call to determine their maximum transfer size.
2000-02-07 22:07:27 +00:00
jonathan e9a4467c58 Fix thinko in previous revision: it wouldn't catch deassert.
Revert the code inside the new test to the previous-but-one revision.
2000-02-07 02:17:18 +00:00
jonathan 2da22cf2c5 Check for DCD status change interrupts which signal PPS events, even
if the line discipline is ignoring carrier (e.g., via comparam()'s
setting of sc->sc_msr_mask).  Move PPS timestamp outside the normal
status-change processing, and ignore sc_msr_mask when testing
for PPS events.
2000-02-06 23:23:37 +00:00
nathanw 958e687d69 LP64 printf fixes. 2000-02-05 20:02:42 +00:00
augustss 494c9affea Support detach. 2000-02-05 18:11:55 +00:00
enami abac10f360 Yet anothor workaround for hpcmips. I guess real problem is somewhere else...
With rev.1.37, my MobileGearII for DoCoMo finds both ne0 and wd0
even if pcic_delay_sleep is 1.
With rev 1.40, it fails to find wd0.
2000-02-05 04:34:36 +00:00
dante 2a46aa5d9a Fix "unused variable" warning when FAILSAFE option is defined 2000-02-04 16:23:14 +00:00
dante b4edda97d5 Fix a compilation bug due to a missing parenthesys 2000-02-04 15:43:46 +00:00
enami 9c688fd57c s/SYSTEM/SYSMEM/; so that this file compiles again. 2000-02-04 11:04:46 +00:00
joda 8006211b18 fix previous broken commit of the 8-bit memory handling (spotted
by Christian Hopps); this will enable 16-bit memory accesses for devices
that can handle it
2000-02-04 10:18:28 +00:00
itojun 0f09f8dd2b cope with card insertion/removal during suspend-resume session.
(removal/ insertion after suspend and before resume)

How should we deal with card swaps?
2000-02-04 09:45:34 +00:00
chopps d344dd94ab keep track of the enabled state of a socket 2000-02-04 08:42:07 +00:00
enami ed0f41807d - Call if_deactivate instead of smc91cxx_disable when deactivating.
- Fix typo in comment.
2000-02-04 04:05:50 +00:00
dante cbacaf54d7 Add AdvanSys U2W (LVD) boards support 2000-02-03 20:28:26 +00:00
itojun 579e538de0 fix promisc mode for smc91cxx again. 2000-02-03 16:20:49 +00:00
enami 1102c5ed1d Remove temporary workaround for hpcmips. Now it works without it. 2000-02-03 09:00:39 +00:00
enami d6554f3e25 Cosmetic changes; remove unnecessary semi-colon. 2000-02-03 08:59:20 +00:00
thorpej 5802ccb9c9 In ahc_intr(), if initialization failed, don't try to service the
interrupt.
2000-02-03 06:25:09 +00:00
chopps 68a7084f0c attempt to make this more like the std indicates 2000-02-03 06:07:06 +00:00
enami 20522c36ed Detach MII if there is. 2000-02-03 06:03:39 +00:00
thorpej eed75dbc26 Don't dry to diving MIIF_NOISOLATE in the PHY drivers. Instead, pass
flags down from the parent to child vi mii_attach().
2000-02-02 17:09:38 +00:00
itojun b2cac6e684 if_detach for sm/pcmcia.
with addition of resource allocation flags in softc (to DTRT on detach).
2000-02-02 16:04:40 +00:00
enami f7096eef97 Fix typo; not PCIC_DEBUG but PCICDEBUG. 2000-02-02 14:23:48 +00:00