Commit Graph

1382 Commits

Author SHA1 Message Date
jonathan 0588cdfc88 Update user-level PPS-API to match -05 draft.
Change PPS_<xxx> ioctls to PPS_IOC_<xxx>.
1999-11-04 05:33:58 +00:00
thorpej 97bbad1f0b Do rd/line and rd/mult on the MX98725 and LC82C115, too. 1999-11-04 01:27:32 +00:00
thorpej e3f20e8ff1 Use Memory Read Line and Memory Read Multiple on the 21140, 21140A,
21142, and 21143, if the PCI bus says its okay.
1999-11-04 01:20:55 +00:00
thorpej ca9b9a3b2e Adapt to mii_phy_probe() change. 1999-11-04 00:24:00 +00:00
thorpej 3750d3f592 Update for ifmedia changes. 1999-11-03 23:07:10 +00:00
thorpej e017601bd3 More or less completely rewrite the way DECchip media is handled, and
add support for the DECchip 21142/21143 SIA/SYM media.  Make the Macronix
98713 behave like a 21140A, and the 98713A and later behave like a 21143.
Nuke all of the Macronix-specific Nway code, as it will be identical to
the 21143 Nway code once it is written.
1999-11-03 22:25:08 +00:00
thorpej eb16cd3aa7 Define DECchip 21142/21143 register bits, and since the Macronix chips
are nearly perfect 21143 clones, delete a bunch of redundant info in that
section of the file.
1999-11-03 22:22:49 +00:00
mycroft d2b362b685 Only update the cursor state if it's enabled. 1999-11-03 15:55:27 +00:00
augustss 361b083d4c Shorten some delay()s. From WITEK Wnuk <witek@atari.org> 1999-11-02 17:48:01 +00:00
soren bc18b45323 Clean up attachment printing a bit. 1999-11-02 05:41:27 +00:00
augustss 860ebb7a92 Make little endian and big endian version of all functions
that deal with 16 bit samples.  Let the drivers decide which ones
to use.
1999-11-01 18:12:19 +00:00
sommerfeld db05febdfa Add enable/disable support and EEPROM size selection, prerequisites
for getting the cardbus fxp attachment to work.

Tested on the built-in 82559 in a VAIO Z505S.

From Johan Danielsson / PR8631; changed slightly to KNF.
1999-10-30 16:07:58 +00:00
enami b9451ead47 remmove unncecessary empty line. 1999-10-30 12:07:08 +00:00
enami fc21ddd943 Call epstop at the beginning of epinit, especially to make sure that
ep_tick is untimeouted before new one is scheduled.  This makes 3C574-TX
works at least in 10Mb/s mode.
1999-10-30 01:35:47 +00:00
enami 3f199cc5e4 Add and delete a reference to an adapter at aicattach(), to make sure
that the adapter is disabled even if it wasn't enabled/disabled during
configuring its children.  This fixes the bug that if an aic pcmcia card
is inserted in a slot during boot, further attaching of any card on the
slot fails once the card is removed.
1999-10-30 00:58:32 +00:00
ragge 12c16f443f DEC specifies that dealing with CSR0 in the interrupt routine must be
done in a special order. Do that here also, but for now inside #ifdef vax
because of the (possible) impact on other arch's.
Now vaxen without IOMMU can use the MI LANCE driver.
1999-10-29 19:50:07 +00:00
sommerfeld 652701006d Fix suspend/resume-related problems observed on fxp0 on Sony Z505S:
Symptoms: system would crash with "data modified on free list" pool
panic from the mbuf cluster pool shortly after a resume.  The cluster
in question contained a valid 82557 receive descriptor and an IP
packet.  Happened sporadically in normal use.  Easiest way for me to
reproduce it was to run tcpdump and a flood ping and do a
suspend/resume cycle or two.

Changes:
 - in interrupt handler, if the interface isn't in IFF_RUNNING state,
just ack interrupts and return; don't try to receive packets, queue
new descriptors, etc., etc.,
 - add power control hook to take interface down on suspend,
and restart it (if it was up) on resume.
 - tweaks to fxp_stop and fxp_shutdown to avoid recursive panics due
to the (now fixed) bug.
1999-10-28 19:21:51 +00:00
mjacob 7227a97ad0 I was misinformed. I cannot get away from specifying tags for FC. Some devices
are happy w/o them- some are unhappy (IBM drives).
1999-10-28 02:50:34 +00:00
augustss 91cbb40ee5 Add AC97 mixer/codec support. From OpenBSD and FreeBSD. 1999-10-27 13:18:02 +00:00
mjacob fb6f289535 nuke a debug printout I thought was already gone 1999-10-26 22:23:20 +00:00
erh 64643af801 Add description of the hd64570 chip. Add brief description of this driver. 1999-10-23 22:20:11 +00:00
ad fd992c5320 Prepare a little for the addition of an interface to user-space. 1999-10-23 16:26:32 +00:00
mjacob 864ff761d7 remember to initialize mailbox 2 for FC isp bus resets 1999-10-22 17:06:12 +00:00
bouyer 9d3c1407f7 If IRQ was not for us, add back WDCF_IRQ_WAIT to the flags, so that
the next IRQ (real or timeout) will be handled.
Fixes the 'missing untimeout' problem reported by a few peoples, and
kern/8639.
1999-10-21 14:37:58 +00:00
enami 4c4a056bc5 fix typo in previous commit. 1999-10-20 16:39:11 +00:00
enami 8a5c548579 cosmetic changes before i do some functional changes. 1999-10-20 16:34:22 +00:00
enami a2369d8e97 Cancel active transfers on aic/wdc detach.
Also makes LS-120 drive works for me again.
1999-10-20 15:22:24 +00:00
ad b3e97ca54b Nuke some silliness. 1999-10-20 12:27:38 +00:00
ad eccc3630ec DPT_MORE_TIMEOUT was scaled wrong. 1999-10-20 11:54:10 +00:00
ad 675c12dbcb - Don't get stalled by a bogus HA_ST_MORE condition.
- Don't trust HA_ST_MORE again if the above situation occurs.
- Nuke bitfields in 'struct eata_sp'.
- Don't bother using scatter-gather if DMA map contains only 1 segment.
- Return TRY_AGAIN_LATER and not COMPLETE if an EATA command times out.
- Check SCSI status in dpt_inquire(), not just HBA status.
- Some cosmetic changes and sanity checks.
1999-10-19 20:16:48 +00:00
cgd d935a73378 nuke RCS "Log" and "Header" tags. They cause problems for third parties
importing our sources, and for NetBSD release engineering folks.
(They've been against the NetBSD coding style forever, but they crept
in anyway.)
1999-10-17 23:53:45 +00:00
mjacob 4938c2371d Some stylistic changes, but also use the new INT_PENDING macro. Start
tracking LIP sequence numbers.
1999-10-17 01:38:27 +00:00
mjacob 4fdbb0d1a0 mostly stylistic 1999-10-17 01:37:34 +00:00
mjacob c525e6fa14 add INT_PENDING macro 1999-10-17 01:37:12 +00:00
mjacob 5781cfe433 some comments added 1999-10-17 01:23:21 +00:00
jonathan b31080319e Fix nanosecond/microsecond botch in PPSAPI:
remove bogus TIMESPEC_TO_TIMEVAL() after applying any {assert,clear} offset.
1999-10-15 06:16:15 +00:00
haya 4eee111127 This is the first check-in of CardBus driver. CardBus driver contains
CardBus bus stub, YENTA PCI-CardBus bridge (cbb), 3Com 3C575TX driver
(ex) and Intel fxp driver.

TODO:
  o Conform to the KNF more strictly.
  o Be unified with pcmcia code as much as possible.
  o Add more drivers for CardBus card, such as APA-1480 or USB card.

The affected files are listed below.

	sys/arch/i386/conf/files.i386
	sys/arch/macppc/conf/files.macppc
	sys/conf/files
	sys/dev/ic/elinkxl.c
	sys/dev/ic/elinkxlvar.h
	sys/dev/ic/i82365.c
	sys/dev/ic/i82365var.h
	sys/dev/isa/i82365_isasubr.c
	sys/dev/pci/files.pci
	sys/dev/pcmcia/pcmcia.c
	sys/dev/pcmcia/pcmciachip.h

The added files are listed below.

	sys/arch/i386/conf/CARDBUS
	sys/arch/i386/include/rbus_machdep.h
	sys/arch/i386/i386/rbus_machdep.c
	sys/arch/macppc/include/rbus_machdep.h
	sys/arch/macppc/macppc/rbus_machdep.c
	sys/dev/cardbus/if_ex_cardbus.c
	sys/dev/cardbus/Makefile.cardbusdevs
	sys/dev/cardbus/cardbus.c
	sys/dev/cardbus/cardbus_map.c
	sys/dev/cardbus/cardbusdevs
	sys/dev/cardbus/cardbusdevs.h
	sys/dev/cardbus/cardbusdevs_data.h
	sys/dev/cardbus/cardbusvar.h
	sys/dev/cardbus/cardslot.c
	sys/dev/cardbus/cardslotvar.h
	sys/dev/cardbus/devlist2h.awk
	sys/dev/cardbus/files.cardbus
	sys/dev/cardbus/if_fxp_cardbus.c
	sys/dev/cardbus/pccardcis.h
	sys/dev/cardbus/rbus.c
	sys/dev/cardbus/rbus.h
	sys/dev/pci/pccbb.c
	sys/dev/pci/pccbbreg.h
	sys/dev/pci/pccbbvar.h
1999-10-15 06:07:17 +00:00
mjacob 3f83c69972 Roll platform version. Keep a bitmap of 'discovered' devices for SCSI adapters
so we'll know when it's time to switch from 'slow' command mode to normal.
Change some settings for configuration printfs and debug levels. Redo the
internal ispscsicmd return definitions and let isp_cmd translate them as
approrpriate to NetBSD values. Remove the inline functions from here- they're
now in isp_inline.h. Put in the start of the correct SWIZZLE/UNSWIZZLE
functions.
1999-10-14 02:33:38 +00:00
mjacob 02911581bb Add in an ioctl entry point so scsictl mediated bus resets will work.
Redo how we start commands- do a 'slow' start function which then
looks to see when we're done the configuration process at which point
it *then* enables sync/wide mode. Set the max openings amount to the
true max openings- not a synthetic. Add a timeout driven command requeue
function so that Loop Down events well freeze things until a later point
in time where they might be restarted.
1999-10-14 02:31:11 +00:00
mjacob 2b760bfd7b remove most target mode stuff. Change the arguments to the
isp_fastpost_complete function to include a handle. Do some
isr register debouncing. Use new inline functions for xflist
handle storage. Remove isp_dumpxflist function. Do some fixups
of NVRAM from some broken cards. Use Full Login after LIP option
for FC cards if f/w < 1.17 - there's a f/w bug that causes the
port database to not be actually refreshed for local loop devices!
Do the appropriate endian swizzling for the ICB. Ditto for SNS structures
(these are no-ops until UltraSparc PCI needs them).
1999-10-14 02:27:12 +00:00
mjacob 74f3840c1b Roll minor version. Change how f/w revisions are stored. Add some
defines to get max luns for a card. Make sure the RESULT_QUEUE_LEN is not less
than 64- I've seen breakage with that. Move the temp port database stuff
into the softc (ick). Remove most of the target mode stuff. Make xflist
storage an external outer layer thing (since it will now be allocated based
upon the maximum commands that this HBA can support rather than request
queue size).
1999-10-14 02:21:50 +00:00
mjacob c607d0ea19 Update FC icb type to have the variants for the 2200 (we don't use it
yet). Remove all target mode definitions.
1999-10-14 02:18:40 +00:00
mjacob 2030b173b8 Add this file to contain common inline functions for use with the Qlogic
driver.
1999-10-14 02:16:55 +00:00
thorpej 8d56d3f3f0 Bound one auto-calibration loop that was missed in previous rounds of
changes.

Yay, audio on my Dell laptop works again.
1999-10-12 00:16:42 +00:00
thorpej 5082673b91 - Encapsulate the EEPROM reading code into ep_read_eeprom(), and use
the correct "read eeprom" opcode on the RoadRunner (which has a larger
  EEPROM, and thus needs a different opcode to make room for the larger
  offsets).
- Reset and enable the MII before probing for PHYs, and reset and enable
  the MII in epinit().
- Be more conservative when resetting the interface after a transmit error.

Based on PR #8331, from Ryoji KATO.

Closer on 3c574, probably will work fine with the 3CCFEM556BI (which
won't have an older rev TDK Semi PHY, and which was tested by the author
of the PR).
1999-10-11 17:48:20 +00:00
thorpej 7871f8c56d Add some more RoadRunner bits. Partially from Ryoji KATO, PR #8331. 1999-10-11 17:41:56 +00:00
mycroft d486b755ca Fix prototype of bha_ccb_phsy_kv() so this compiled on the Mac again. 1999-10-09 22:46:20 +00:00
itohy 8444082915 This file is obsoleted by opl3sa3reg.h . R.I.P.
Sorry for spamming this list so much. :)
1999-10-05 03:55:08 +00:00
itohy 3d17e2f869 opl3sa3.h -> opl3sa3reg.h 1999-10-05 03:53:07 +00:00
itohy 4714c97382 YAMAHA YMF175x (OPL3-SA3) control register description. 1999-10-05 03:38:17 +00:00
itohy 55360c0ac0 - Fix wait for ready code.
- Mute wave output, not the mixer output, on changing CODEC settings.
- Add support for muting wave output while playback or monitoring is inactive.
- Change formula of calculating gain so that all the levels should be
  used equally (the old code uses the min/max gain only at 0/255).
- Cleanup
1999-10-05 03:35:12 +00:00
itohy dae2f73780 Add support for muting wave output while playback or monitoring is inactive.
Cleanup.
1999-10-05 03:31:35 +00:00
itohy a13ace8bac Add power control hooks. 1999-10-05 03:29:22 +00:00
thorpej da257060f5 Avoid silly namespace collision w/ some Alpha signal-related variables. 1999-10-04 23:57:32 +00:00
augustss d81ed72642 Implement program change. From Martin Cernohorsky <cerno@ics.muni.cz>. 1999-10-04 19:31:39 +00:00
thorpej a3ef0b7a6d Fix compilation of ISA bha front-end. PR #8528, Takahiro Kambe. 1999-10-01 18:17:12 +00:00
ad e8d7fe2144 - Save SCSI status in the request.
- In dpt_intr(), if no interrupt is signalled but the HBA has indicated
  that more data will be available soon (HA_ST_MORE), save a context switch
  and wait for the data.
1999-10-01 12:20:12 +00:00
ad 0263e62bc4 Rename HA_ST_INDEX to HA_ST_MORE (More data available soon). 1999-10-01 12:08:51 +00:00
itohy 81bfa8dd74 Fix MIX_ATTEN_MASK value so that monitoring should work correctly. 1999-09-30 23:30:15 +00:00
thorpej 415b44a62a Rework the Buslogic SCSI driver in preparation for some pending improvements
to the SCSIPI subsystem.
- Determine more characteristics about the board, including the number
  of concurrent commands that the processor can execute at a time.
- Rework memory allocation strategy so that we can do dynamic pre-allocation
  of resources according to workload.

Thanks to the Linux Buslogic driver for having some useful comments.
1999-09-30 23:12:28 +00:00
thorpej fe12736867 Update for SCSIPI changes. Note that capabilities update is disabled
until Matt Jacob has a change to update the driver for the latest
firmware, etc. since update device parameters seems to fail once the
system is really up and running, and eventually causes the controller
to wedge.  This may be due to a firmware bug.

Per discussion with Matt.
1999-09-30 23:06:18 +00:00
thorpej 63b8530b4e Update for SCSPI changes. 1999-09-30 23:04:39 +00:00
thorpej 8bc5c71e5f Set the LED mode per the EEPROM on Macronix chips. 1999-09-30 22:28:11 +00:00
thorpej 2492ffef4c Changes to get the Lite-On/Macronix 82C115 working:
- 82C115 has a 128-bit multicast hash table, not 512-bit.
- Correct the way the MAC address is read from the SROM, after re-reading
  the MX98715A Application Note.

Other semi-related changes:
- Differentiate between MX98715 and MX98715A.
- Improve the Macronix link-up/link-down detection.
1999-09-30 17:48:24 +00:00
thorpej ac2360fb09 - Improve the comments that describe the various clone chips.
- Add some more Macronix register bits.
- Define the Lite-On/Macronix 82C115 ``PNIC II'' registers.
- Add the ADMtek AL981 PHY register bits.
1999-09-30 17:41:39 +00:00
ad 19bd684e8a - Remove a couple of items from the TODO list.
- Add a debug check to dpt_poll() (CCB must have CCB_PRIVATE set).
1999-09-30 17:15:54 +00:00
thorpej 61e04b2510 Add link-up/link-down detection for the Macronix NWay block. 1999-09-30 00:07:29 +00:00
thorpej 9d911ccd55 Add some optional stats gathering, and fix tx stats counting; use the last
descriptor in the packet, not the first.
1999-09-29 23:11:36 +00:00
thorpej 56fb88a64a Grumble, yet another chip-designers-and-manual-writers-disagree. Deal with
this by frobbing the 10TCTL register minimally, toggling only the bit we
care about (and hoping that link-capability advertisement happens correctly).

MX98715 can talk to the network now.
1999-09-29 22:07:47 +00:00
ad 122919c087 Install dptreg.h, dptvar.h. 1999-09-29 20:46:41 +00:00
thorpej e3398d3647 - Get a little closer on the Macronix chips. Still some more work to do.
- Add some basic support for the ADMtek AL981 clone (which, unfortunately,
  I can't test until my sample boards arrive).
1999-09-29 18:52:19 +00:00
thorpej bbd3e72fbc - Add register definitions for the ADMtek AL981.
- Add a comment about the Macronix MX98713 -- it's almost exactly like
  a 21140A, and doens't have the Nway registers that the other Macronix
  chips have.
1999-09-29 18:50:39 +00:00
ad f6e42db75a - Move initial reset code into dpt_readcfg()
- Bus specific front-end is now responsible for reading EATA configuration
- EATA configuration data is now saved in the softc
- Make synchronous writes work properly
- Don't ignore HBA timeouts in dpt_cmd()
- Prefix eata_cfg's members with `ec_', not `dc_'
1999-09-29 17:33:02 +00:00
ad 51de3bc208 PCDISPLAY_SOFTCURSOR: remember state of cursor during full screen scroll. 1999-09-29 17:29:24 +00:00
ad e2bdb5f380 PCDISPLAY_SOFTCURSOR: invert foreground too. 1999-09-29 17:26:06 +00:00
ad 9876b8900e - Fix some comments.
- Synchronous writes musn't linger in the HBA's cache.
1999-09-28 23:39:14 +00:00
ad 7064961321 - Add some profiling gunk.
- Add CCB_SYNC for CCBs where data must be written synchronously by the HBA.
1999-09-28 23:35:29 +00:00
thorpej 0bd09380a2 Oops, Macronix MX98713A doesn't have GPIO direction bits in the SROM
because it doesn't have a GPIO port (CSR12 is the `10baseT status'
register on this chip revision).
1999-09-28 21:56:45 +00:00
thorpej cca601b9b2 Make sure the Revision register contains the correct magic number.
From Chuck Cranor.
1999-09-28 17:55:33 +00:00
enami ee587c6c18 s/#define /#define<TAB>/. 1999-09-28 15:10:20 +00:00
ad 21a6ff6082 - Wait up to 2 seconds for HBA ready before executing CP_PIO_GETCFG
- Remove some unneeded memset() calls and assignments
- Fix comment on dpt_done_ccb()
1999-09-28 09:18:00 +00:00
ad 48a0b6237a A driver for DPT EATA SCSI adapters. dpt.c contains a brief TODO list. 1999-09-27 23:41:47 +00:00
enami bb03434a5f Support Planex Communications Inc, FNW-3600-T. 1999-09-27 23:19:12 +00:00
thorpej a5649fe4d5 Initial support for 21140[A] GPR media. 1999-09-27 19:14:01 +00:00
thorpej 848d8b7080 Add a media name pointer to the tulip_2114x_media structure, and define
a table for converting SROM media block type codes to ifmedia subtypes.
1999-09-27 19:03:59 +00:00
thorpej 1f0fa59202 - Define more "selected connection type" bits for the ISV SROM.
- Define ISV SROM bits for 21140[A] GPR media.
- Define a bitmask which includes media-related bits in the OPMODE
  register.
1999-09-27 19:02:50 +00:00
enami f449bb216c Change NE2000_USE_WORD to take pointer to softc rather than type. 1999-09-27 05:25:44 +00:00
enami 56a3e3e340 Minor cleanup; use the cached result instead of evaluating the
macro NE2000_USE_WORD twice.
1999-09-27 04:52:19 +00:00
enami 7fcb2b605a Define new macro NE2000_USE_WORD() and use it where appropriate. 1999-09-27 04:14:06 +00:00
enami 9bcfc916b0 Allow caller to specify the type of NE2000. 1999-09-27 04:07:24 +00:00
enami 2a328ebcb2 Allow to detach aic, but turned off by default. The patchable variable
aic_dodetach controlls this.
1999-09-26 08:14:57 +00:00
thorpej 4fa51ba8bd Make tlp_read_srom() work on big-endian systems.
From a patch supplied by Luoqi Chen <luoqi@chekov.watermarkgroup.com>.
1999-09-26 03:39:01 +00:00
is 13021b9955 Avoid calling m_pullup in a few places, where not necessary. 1999-09-25 20:43:43 +00:00
thorpej c999e3ca1a Add support for the DECchip 21140[A]. This currently only works with
boards which use MII for media attachment.

ISV SROM format information lifted from Matt Thomas's `de' driver.

Thanks to Dave Sainty for experimenting w/ his 21140A MII boards, and
for supplying a fix to the MII bit-bang code (PR #8382).
1999-09-25 00:27:00 +00:00
thorpej c61e95f1f5 Add Tulip ISV-format SROM media block types. 1999-09-24 18:27:22 +00:00
enami 67e874d814 Allow to detach wdc, atapibus, wd and cd. 1999-09-23 11:04:29 +00:00
mhitch 636de81487 Define config register 3 values for NCR53C9x/FAS216.
Add sc_cfg3_fscsi to the softc and use it to set the chip into Fast SCSI
mode for the chips that use it.
1999-09-22 03:31:23 +00:00
ragge 3455a353f9 Fix minphys() on vax. While here, convert to bus.h. 1999-09-21 18:07:54 +00:00
danw 6775e175ca Add a brief delay after resetting the card before checking to see if
it's done resetting. Trying to read registers off the card while it's
unresponsive can cause a machine check on some platforms/busses.
1999-09-21 01:04:44 +00:00
thorpej 30651e46b3 A couple more hacks for the Lite-On PNIC:
- Only use 16 longword bursts.
- Reset the interface for receive filter setups that don't come from
  the reset path.

Hi, Jason is getting really tired of broken clone chips, and really wishes
real 21140 boards were still available, because the DEC chips seem to work
Just Dandy.
1999-09-21 00:14:54 +00:00