Commit Graph

1578 Commits

Author SHA1 Message Date
thorpej 014cd3fcc1 Take a stab at making this work on big-endian systems. 1999-12-12 17:46:36 +00:00
thorpej afbb07a0e5 Use htole32() and le32toh(). 1999-12-12 02:53:56 +00:00
thorpej a661b4e5dc Oops, forgot to byte-swap the receive descriptors. 1999-12-12 02:41:51 +00:00
thorpej caae0e1aa1 - Don't try to run the chip in big-endian mode. Not all chips support
this consistently, and it doesn't always work even when the chip
  supports it.
- Make sure things DMA'd to the chip that the chip interprets are in
  little-endian mode.
1999-12-11 00:32:59 +00:00
mjacob 4b6c35ccaf Respond to a crucial security alert. 1999-12-08 11:01:44 +00:00
thorpej ff4a32590d When checking the SROM checksum, if the standard location fails, try
the new standard location (according to the SROM format update document
for the 21143).  From Masanori Kanaoka.
1999-12-07 18:24:01 +00:00
drochner 162086b1cd do the screen switch asynchronously (via timeout(0)) if possible,
this hopefully helps for the (very rare) display corruption reported
in PR kern/8628
1999-12-06 18:54:50 +00:00
ad 801b079e37 If the vga driver isn't present in the kernel and PCDISPLAY_SOFTCURSOR
is set, then pcdisplay_cursor() should disable the hardware cursor first
time it is called.
1999-12-06 10:04:50 +00:00
mjacob 60416909de Oops. The compiler didn't catch this 'used before set'. Kudos
to Sean Doran for finding it and being nice in telling me.
1999-12-05 18:20:53 +00:00
mjacob 53ecdaee6c Some queue related functions now use a u_int16_t. Turn some messages into
CFGPRINTF messages. Clear up the f/w download slightly. If less than
rev 5 2100 chip, turn off loop fairness. Clean up a botch or two.
1999-12-04 03:08:18 +00:00
mjacob 5854be051d Make sure we have a big enough buffer to sprintf into (noticed by
deraadt@openbsd.org).
1999-12-04 03:06:54 +00:00
mjacob 0f0fbfa802 Roll core version minor. Clean out some target mode stuff. Respecify some
queue related functions to take u_int16_t's. Restructure the softc a bit.
1999-12-04 03:06:05 +00:00
mjacob f5c2acedc2 (wow- I thought I'd already committed most of this).
Clean up some isp_attach time stuff- if ISP2100_FABRIC is defined try *really*
hard to make sure that we get the firmware state to FW_READY and see the
loop state where the Port Database is ready to be gathered- if we don't do
this it's unlikely we will be able to correctly query the nameserver because
we won't see that we're on a fabric.

Clean up the completely broken and stupid attempts to hot switch the
'slow' start routine out of the way. Sigh.

Turn speed announcements into CFGPRINTF functions (available only if DEBUG
defined).
1999-12-04 03:04:59 +00:00
mjacob e363023daf Rearrange defines to make the file diff cleaner with OpenBSD. Change CFGPRINTF
and default verbose levels. Add in a forced compile in f/w define unless
either IS_DISABLE_FW or ISP_COMPILE_FW defined.
1999-12-04 02:59:29 +00:00
sommerfeld 878fa4790f Fix "make includes" since pckbc moved to dev/ic from dev/isa
(Hi, Jason!)
1999-12-04 02:16:24 +00:00
sommerfeld 97cb535e46 change comment to mention that this driver also handles the '558 and '559 1999-12-04 02:02:30 +00:00
thorpej 4560ac465a Split the PC-like keyboard controller driver into chip back-end and
bus front-end.
1999-12-03 22:48:22 +00:00
thorpej 66a51bd133 Quiet down the "excessive collision" messages w/ LEDEBUG. None of the other
Ethernet drivers really report this quite as loudly as this did.
1999-12-01 00:40:53 +00:00
ad 4763c00196 - Don't use our own private endian conversion cruft (from OpenBSD).
- SmartRAID V is not and will never be an EATA board (from OpenBSD).
- Use dpt_outl() when issuing EATA command packet address to HBA.
- Fix a style nit.
- Fix a typo.
1999-11-29 15:04:23 +00:00
bouyer 7bd006b847 Improve a few debug messages. 1999-11-28 20:04:22 +00:00
scw 54f42f17fc Don't bother spinning in the console 'putc' routine for the transmitter
to become idle; it actually doesn't matter as the chip takes care of
this for us. It would also spin endlessly in certain circumstances
during shutdown.

While I'm here, (finally) add code to allow sending BREAK characters.
1999-11-28 12:23:18 +00:00
augustss 961d4d6ad2 Change CS4297 id entry. 1999-11-24 23:21:01 +00:00
sommerfeld 17d170b1ca defopt COM_DEBUG, COM_HAYESP, and COM16650 1999-11-22 03:53:38 +00:00
augustss f73590bbf0 Print the PnP id of unknown codecs. 1999-11-20 01:16:15 +00:00
thorpej 9ed17102f4 - Use the common MII bit-bang module.
- Add support other than 128-byte SROMs.
- Add support for the 21142/21143 MII.
1999-11-19 18:22:42 +00:00
thorpej dc5a586c1c Use the common MII bit-bang module. 1999-11-19 18:17:14 +00:00
joda d7496546b5 try to do a better job of figuring out the EEPROM size; the old code
didn't work on (some?) 557-based cards
1999-11-19 15:19:14 +00:00
bouyer 3a220103e8 Adapt printf format for 64bit stats counters. 1999-11-19 10:42:48 +00:00
thorpej 916d6aaa36 Use the common MII bit-bang module. 1999-11-17 17:56:52 +00:00
thorpej 5bd0644a68 Make the MII code match the `ep' driver's (*again*). 1999-11-17 08:03:30 +00:00
simonb fca16d1571 Move the "Attach the interface" section after printing the mac address
and buffer sizes.  Stops the ipv6 attach info from messing up the
other driver info.
1999-11-17 03:42:24 +00:00
dante 70bd4a7d53 Let user enable/disable WDTR, SDTR and Tag Queuing from kernel config file 1999-11-15 19:55:53 +00:00
thorpej 4bdf6bd731 Call mii_down() as appropriate. 1999-11-12 18:14:17 +00:00
scw 3981e235b7 Zero is a valid value for ch_tcor and ch_rcor, so be a bit more conservative
when deciding if the baud-rate should be changed. (Spotted by Bruce Martin)
Also fix the mask used when setting the Rx FIFO threshold to zero. I don't
yet understand how the Rx side worked with the code as it was. ;-}
1999-11-11 09:38:43 +00:00
mycroft f8934aa2f6 Modification to the previous:
We still have to preload the command, when selecting without ATN.  (We could
probably avoid this by being more careful in the interrupt handler...)
1999-11-10 05:02:53 +00:00
mycroft 58fec0d55a When sending a REQUEST SENSE, do *not* attempt to create an I_T_L nexus. This
is technically wrong, and some targets (like my 4x NEC CD-ROM drive) misbehave
when we do.
1999-11-10 04:21:30 +00:00
mycroft 5b75863870 A residual after select with DMA step 2 is legitimate (in fact, *not* having a
residual would probably be cause for concern), so don't spew about it.
1999-11-10 00:42:37 +00:00
sommerfeld dea88f1c20 Completely rewrite receive processing to avoid sleep-deprivation-induced
brain damage and infinite loops, and lousy RTTs

Also, flush tx queues when reassociating with AP and when taking the
interface down.
1999-11-09 14:58:07 +00:00
sommerfeld 1cfdb728d0 avoid touching freed mbuf after allocation failure. 1999-11-08 15:56:16 +00:00
sommerfeld 66ab262b1c add a bunch of debug printfs under IFF_DEBUG and IFF_LINK2;
turn on IFF_DEBUG to trace the management protocol goo.
turn on IFF_LINK2 as well to see beacons.
1999-11-08 15:45:00 +00:00
sommerfeld 94bb856781 misc cleanups; seems to work a little better in a dense-AP environment now.
1) ignore probe requests rather than printing "unknown mgmt subtype"
	(cosmetic)
 2) don't panic if mget of the 2nd mbuf in a chain fails (patch from MCR)
	(though that whole function badly needs to be rewritten)
 3) be a little more tenacious about hanging on to an access point.
1999-11-08 13:24:00 +00:00
sommerfeld 8be740541b Extract MAC address from CIS data in pcmcia front end.
Fix multicast address manipulation.
ipv6 now works through this driver.
1999-11-06 16:43:53 +00:00
sommerfeld 73bf131124 Add rcsid's 1999-11-05 05:13:36 +00:00
thorpej 0ad32f07d2 Revert this part of rev 1.59:
- Be more conservative when resetting the interface after a transmit error.

It caused the interface to totally wedge on the (somewhat common) transmit
FIFO underrun condition.
1999-11-04 20:27:11 +00:00
sommerfeld d9bc6e4f98 Conditionalize so this builds on 1.4.x.. 1999-11-04 18:43:42 +00:00
sommerfeld 58e709f695 Minimally functional driver for the am79c930 802.11 controller chip).
Working well enough to support dhcp; i'm doing this commit using the
interface.

Supports FH only.  Does not yet do ad-hoc mode; works in
infrastructure mode.  Not yet tested in environments with multiple
access points.
1999-11-04 17:10:53 +00:00
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
thorpej 5ada26d247 Remove the has-mii-doesn't-have-mii OPMODE block from tlp_init(), and
let the pre-init hook and media switch routines handle it all.
1999-09-20 19:52:31 +00:00
thorpej 28b026bee1 Remove special-case 2114x-set-OPMODE_MBO; it's done in the pre-init hook
now.
1999-09-20 19:34:08 +00:00
thorpej 664d8da4f5 Add support for the DECchip 21041. This also adds some preliminary
support for the ISV SROM format used in the 2114{1,1A,2,3}.  Note, like
the 21040, auto-sense is not yet supported for the 21041.

Add a "pre-init" hook, which will be used for the 2114x and PNIC (currently)
which allows chip-specific code to set up and write OPMODE before the
chip is reset.  This is necessary in order for the chip's internal
pathways to get initialized properly for MII/SYM/PCS/SIA media attachments.

Thanks to Dave Sainty for the hint from the `de' driver that inspired the
pre-init hook.
1999-09-20 19:26:54 +00:00
ad 598dcad691 When moving the software cursor on an inactive screen, save character and
attribute from backing store, not display adapter.
1999-09-19 23:00:04 +00:00
matt a6d751c35c One more change for bigendian machines. 1999-09-19 22:58:31 +00:00
ad 97253f4537 Software cursor is not enabled at boot time. Hardware cursor is. 1999-09-19 22:57:24 +00:00
matt 9ac5036f93 Make the DEFPA run under the macppc port (tested on a B&W G3). Add it to
the GENERIC config file.
1999-09-19 22:02:37 +00:00
ad f96e055d70 - mc6845's cursor is disabled by punching bit 6 of cursor start register.
- Add new option (PCDISPLAY_SOFTCURSOR) that provides a large, non-blinking
  cursor in software.
1999-09-19 21:48:08 +00:00
thorpej 5485bcb973 Fix a buglet in tlp_reset(): don't touch the Tulip for at least 50
PCI cycles after starting the reset; it won't respond.  This will
cause a machine check on some Alpha core logic chipsets (e.g. 21071 APECS).
1999-09-19 20:51:09 +00:00
scw d1c5384e9a Minor optimisation. 1999-09-18 09:45:05 +00:00
thorpej 9002796d07 If the interface is not marked as running, abort tlp_intr() early. 1999-09-17 21:57:36 +00:00
thorpej 70997fd3d5 Move the PCI device number to the base Tulip softc; it will be needed to
decode the SROM on 21041 and 2114x multi-port boards.
1999-09-14 23:33:04 +00:00
thorpej 2def4fdb50 Apparently can't really look at excessive collitions and late collisions
in completed transmit descriptors.  These seem to be set even on successful
packet transmissions on my AlphaStation 500's 21040.
1999-09-14 23:23:32 +00:00
thorpej 5c34356d4c First crack at shared ROM/shared interrupts on 21040 multi-port boards,
plus quirk identification for non-multiple-port boards.
1999-09-14 22:25:48 +00:00
thorpej 12c167b5ca Change the semantics of `sc_regshift'; it is now the shift required to
make a CSR index number into a CSR offset.  Introduce a couple of macros
to handle CSR name -> offset conversion.
1999-09-14 05:52:21 +00:00
thorpej a03bd733ca - More PNIC NWAY stuff. Still more work to do, here.
- Fix the SROM checksum routine.
- Add code to parse the old DEC Address ROM SROM format.
- Rearrange the statchg routines a bit, to make them consistent with one
  another.
- Add support for the DECchip 21040.  XXX No support for media autosense
  yet, and no support for any of the multi-port boards yet.
1999-09-14 00:55:38 +00:00
itojun 65363da25e Merge in NetBSD/sh3 from cvs.kame.net repository.
Tree structure:
- sys/arch/sh3: sh3 generic code
	As commented, in-chip device drivers are put into sys/arch/sh3/dev.
- sys/arch/evbsh3: sh3 evaluation boards (pure sh3 CPU, no fancy external HW)
- sys/arch/mmeye: Brains mmEye, www.brains.co.jp
MI source code includes couple of #ifdef for sh3-coff support.
(sh3 uses coff or elf)

Needs some more improvements, especialy in sys/arch/sh3/conf/files.sh3,
to compile the tree (due to last minute tree structure change).
1999-09-13 10:30:21 +00:00
itojun e0042cf412 drop wrongly looped back multicast packet before we put it into BPF. 1999-09-12 18:26:58 +00:00
dante afa103cfb4 Rewrote error handlers. Now they are solid.
Increesed considerably the speed of the driver removing superfluous splbio/splx functions.
1999-09-11 15:34:45 +00:00
itojun ebcd1b7a41 Make sure to behave as IFF_SIMPLEX in all cases.
Drop multicast/broadcast packet looped back from myself.

This is to cope with SMC91C92 (Megahertz XJ10BT), which
loops back multicast packet to itself on promiscuous mode.
(should be ensured by chipset configuration)

Reviewed by: thorpej
1999-09-10 00:23:34 +00:00
tron b9627d002f Add support for Cyclade boards with new Risc II serial controller.
Patches supplies by C Kane in PR kern/7175.
1999-09-09 21:52:11 +00:00
thorpej 057798e505 Snapshot of work-in-progress to support the internal NWay block on
the Lite-On PNIC chips.  Not finished yet; some other infrastructure
work left to do.
1999-09-09 21:48:18 +00:00
thorpej a10045109d Add chip types for several more Tulip clones (ASIX, ADMtex, PNIC II, Davicom),
and match the Compex RL100-ATX; it uses the Winbond 89C840F (RL100-TX is
a Macronix 98713).
1999-09-08 22:29:46 +00:00
mjacob 6913f83874 A useful discussion with Jason convinced me that I had selected the
wrong tag as the default tag to use- we should use ORDERED, no SIMPLE.
1999-09-07 22:54:45 +00:00
rh ff962e992b Add mode 3 support for newer CS423X chips. Modify probe to correctly
distinguish between CS4236, CS4236B, and CS4237B.
1999-09-06 17:07:04 +00:00
thorpej 8386184524 Deal with some more Winbond differences, after a more-thorough-than-before
reading of its manual.
1999-09-02 23:25:28 +00:00
fvdl 5c875f66d0 Select the right transceiver type when configuring the driver. Change the
timing for the mii code a bit. From Robert Elz / the FreeBSD xl driver.
1999-09-01 21:03:02 +00:00
thorpej cfbc8a82fb Make Tulip-style filter setup interrupt-driven. 1999-09-01 20:56:15 +00:00
thorpej e75ce8c0df Don't attempt to do transmit threshold tuning on the Lite-On PNCI; just
put it in Store-and-Forward mode right from the get-go.  This eliminates
the DMA underrun errors that prevented the receive filter setup from working
and caused smashed packets to go out onto the wire.

My NetGear FA310-TX board now works.

There are still "filter setup failed to complete" messages, however they
don't appear to indicate that the filter setup actually failed, since
unicast and multicast packet reception work fine.  I will address this
problem shortly.

Reading the log for the FreeBSD `pn' driver suggests that these chips are,
in fact, pretty crappy, riddled with hardware bugs (for which more workarounds
are coming).
1999-09-01 20:11:19 +00:00
thorpej 5d7f25011b Some of the Tulip clone chips (like the Winbond and ASIX) want the
IC bit set in the *first* descriptor of the outgoing packet.  Appease
them.
1999-09-01 05:07:03 +00:00
thorpej e293024ffa This is the long-awaited "new Tulip driver", a complete, from-scratch
rewrite of the driver for the DECchip 21x4x Ethernet chips, and a variety
of clones.

Currently, the driver supports the Winbond 89C840F (this works pretty
well), and the Lite-On PNIC (e.g. NetGear PCI boards), however Lite-On
support may be broken [I may simply have a busted test board].

Eventually, support for the Macronix and ASIX chips will filter into
this driver, and then, slowly, support for the genuine DEC chips,
and maybe even the DE-425 EISA model.
1999-09-01 00:32:41 +00:00
bouyer 7c1c212662 If we are using UDMA mode > 2 and get a DMA error, downgrade to UDMA mode 2
first: maybe we incorrectly guessed the cable type.
1999-08-30 12:58:58 +00:00
is d8c7407afe Factor out arc_storelladdr(), and use that instead of arc_ifattach() in
the bah_reset() function.
This makes the last change work without deconnecting all the other interfaces
from the interface list.
1999-08-27 19:23:19 +00:00
thorpej 456af6d558 Reduce the number of transmit fragments to 16. 1999-08-27 19:21:32 +00:00
thorpej 513feda9ab - Include the RXE (receive error) interrupt in the interrupt enable mask,
and consider it to be like an RCC (receive copy complete).  The RCC
  code path has always checked for bad received packets.
- Trim the CRC length off the recived packet length; the EPIC/100 always
  includes the CRC in the packet.
- Improve fatal error reporting.
1999-08-27 19:13:00 +00:00
is 8679b79192 Only use ifp->if_addrlen after initializing it.\
Problem detected by Andreas Johansson.
1999-08-26 20:44:50 +00:00
thorpej 90b9deda72 When padding short packets on transmit, don't include the CRC length
in the computation.  kern/8194.
1999-08-25 22:41:42 +00:00
bouyer d6c3ef56b4 Guard pool_get()/pool_put() with splbio()/splx(). Fix kern/8245. 1999-08-25 17:08:20 +00:00
pk 65cfdf2877 Disable inclusion of debugging code by default.
Turn compile-time flag I82586_DEBUG into a boolean switch.
1999-08-23 12:12:42 +00:00
pk 9fceb1947d Do not report "spurious interrupts"; this is a relic of the PC-only
days of this driver.
1999-08-23 12:00:11 +00:00
drochner a47874ac23 correct a comment 1999-08-17 16:15:05 +00:00
thorpej e71ad5a0ac The CCB already contains its DMA address, so no need to recompute it
over and over.
1999-08-17 02:09:47 +00:00
thorpej a01d72e890 Fix several LP64 problems, and clear up kernel pointer vs. physical
address confusion.  This driver now works on the Alpha.
1999-08-16 02:01:11 +00:00
bouyer 26db0bba90 Garbage-collect C_INUSE and C_NEEDDONE. 1999-08-09 09:56:00 +00:00
bouyer 5885dbb878 - use pool(9) for wdc_xfer, instead of managing a free list.
- fix printing of Ultra-DMA modes (shows up when the drive supports highther
  modes than the controller).
- Don't use C_NEEDDONE anymore. We were setting this flag in a possibly
  freed wdc_xfer (this didn't create problems, as it was free'd in the POLL
  case only, while IRQs are blocked, but it's not good practice anyway
  and pool(9) complains about it ;)
1999-08-09 09:55:18 +00:00
ragge 148c244c15 Driver for the DEC SGEC, Second Generation Ethernet Controller. 1999-08-08 11:41:28 +00:00
thorpej a8d8fc178f Fix a typo. 1999-08-07 07:36:19 +00:00
thorpej ec368bb906 Fix a problem uncovered by attempting to compile on the Alpha: overrun_buf
was being initialized to a KVA, when we really wanted a DMA address.  Change
the code to allocate the overrun buffer with the control blocks, and
properly initialize overrun_buf.

Note that overrun_buf cannot actually be shared between all boards; DMA safe
memory could vary from bus to bus.

Garbage-collect two functions which are no longer used because of the
above changes.
1999-08-07 07:20:15 +00:00
bouyer fae9929734 - Add some debug printf (WDCPROBE) in _wdcreset_wait(), I've needed these
2 times in the past
- Set up timeout per xfer instead of per interrupt. This helps with
  PIO transfer (we would call timeout()/untimout() several times for a
  transfer).
- If we missed an interrupt for a PIO transfer, reset and restart it
  immedialy, don't try to recover and continue. If we missed an interrupt we
  may have lost a read/write cycle on the IDE bus. If this happens 1) we
  corrupt data and 2) we enter an interrupt loop at the end of the xfer, as
  the drive has some more data to read/write, but the host thinks the xfer is
  done.
This last change fix the (or at last some of the) 'lookup after lost interrupt'
some peoples have been experiencing.
1999-08-06 12:00:23 +00:00
thorpej 191ab2b8e4 Since we have to go through fxp_init() to properly handle IFF_ALLMULTI
anyway, take advantage of this and greatly simplify the programming
of the multicast filter.  This solves the last reported "device timeout"
problem with this driver.
1999-08-05 01:35:40 +00:00
thorpej 5ea625fe90 Almost completely rewrite the receive logic, making it as close as possible
to the EPIC/100 driver's (adjusting for the fact that Intel Ethernet chips
are from Pluto):
* Don't allocate receive buffers until the interface is actually brought
  up, and release all of them if the interface is taken down.
* Add a knob (defaults to off) which will copy an incoming packet to
  a single header mbuf if it is small enough to fit in one, rather than
  burning an entire cluster on it.  Note that this change will be mostly
  moot if/when sbcompress() is changed to handle compressing clusters.

Simplify some of the receive list logic:
* Rather than using a homegrown queue and additional software RX descriptors,
  use an ifqueue to queue receive buffers, and M_{GET,SET}CTX() to hook DMA
  maps and receive buffers together.

Clean up a bit:
* Macroize a bunch of things to make the code a bit easier to follow.
1999-08-04 05:21:18 +00:00
thorpej 11e9392b3e Only tick the MII if we are using it. 1999-08-04 00:17:28 +00:00
thorpej 0ae14b58eb Be a little less selective in the transmit interrupt path. 1999-08-04 00:14:08 +00:00
thorpej f1c6287a6e Use the Interrupt bit in the command block to generate interrupts, rather
than interrupting after every Command Unit Not Active event.
1999-08-03 23:37:14 +00:00
thorpej 1051ab605d G/c a flag. 1999-08-03 23:18:32 +00:00
thorpej 5c2b83a0ad Don't bother with interrupt-driven multicast setup. 1999-08-03 23:18:09 +00:00
thorpej 3012cf91af Completely rewrite the transmit logic, making it look more like the
EPIC/100 driver's.  Also, fix the "all multicast" logic.  Also do some
general cleanup.
1999-08-03 22:43:28 +00:00
thorpej 4bd8f1566c Be a little nicer about memory usage:
* Don't allocate receive buffers until the interface is actually brought
  up, and release all of them if the interface is taken down.
* Add a knob (defaults to off) which will copy an incoming packet to
  a single header mbuf if it is small enough to fit in one, rather than
  burning an entire cluster on it.  Note that this change will be mostly
  moot if/when sbcompress() it changed to handle compressing clusters.
1999-08-03 17:25:51 +00:00
augustss 42fb510148 Move the mpu device declaration to conf/files.
Let the mpu device attach at the sb device, and then midi at the mpu.
Update the mpu at eso attachment.
1999-08-02 17:37:41 +00:00
augustss cbf1f6f1b9 Move the MPU driver isa/ to ic/.
(I didn't move it in the repository because the revision history
is very short and uninteresting. :)
1999-08-01 18:05:39 +00:00
scw ba922d31d8 Re-work the Tx side to avoid calling into the tty layer at
interrupt time. This was the cause of the 'mmu fault' panics
seen by several people, as the Tx interrupt is at a higher
priority that spltty().
1999-08-01 09:35:05 +00:00
bouyer 2917356cae Guard tsleep() with a while (!(wdc_c->flags & AT_DONE)) {}, as suggested by
Constantine Sapuntzakis confirmed by Bill Sommerfeld. Although nothing is
supposed to call wakeup on this without setting AT_DONE, it's good practice to
do it this way (the process may be waken up by a setrunnable() call).
1999-07-30 14:59:10 +00:00
thorpej d6c9ec0a2e Make this "should work" on big endian systems. 1999-07-27 00:55:34 +00:00
thorpej 7b3258b6a7 Make the kthread API a bit more friendly to loadable kernel modules. 1999-07-06 21:44:09 +00:00
mjacob f428cf36fa Change to approved NASA/Ames copyright. Add Fabric support. Fix SCCLUN support.
Add code that tries to track LoopID shifting.
1999-07-05 20:31:35 +00:00
itojun 118d2b1d4f IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.

- sys/kern: do not assume single mbuf, accept chained mbuf on passing
  data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
  package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
  file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen

In my understanding no code here is subject to export control so it
should be safe.
1999-07-01 08:12:45 +00:00
pk 5041f2a9dd HME ethernet driver.
Note: this is work in progress; needs testing and tweaking. mgr has
promised to do that..
1999-06-27 12:26:32 +00:00
bouyer 4fd8325ec6 Resurect the old register read/write test for non-ATA/ATAPI drives, to avoid
false matches on controllers which properly respond to a WDCC_RECAL command.
Should close PR port-i386/7702 (the author tested this patch, and said it
solves his problem).
1999-06-23 19:00:17 +00:00
abs b02dbae17e In xxx_mediachange(), if there is no callback to the front-end, just
return 0 instead of EINVAL.  In this case, there will only be one media
type, and the upper-level if_media code will ensure that the user is
setting to that type.
This matches changes Jason made a while back to sys/dev/ic/lance.c
1999-06-23 04:17:10 +00:00
thorpej b75d5b1fe6 Fix tyop. 1999-06-20 16:44:49 +00:00
thorpej 206460244e Bus-independent back-end driver for Intel i82557 fast Ethernet chips. 1999-06-20 16:33:28 +00:00
thorpej 041cfb14aa Fix that ANNOYING transmit timeout bug, caused by an unfortunate interaction
between a bug in the receive path (buffer length used instead of actual
received frame length) and the ARP code not correctly setting the length
of the reused mbuf, which all told caused the transmit logic in the chip
to wedge.

Also, make sure to count received packets.

Found and fixed by Zdenek Salvet <salvet@ics.muni.cz>, PR #7809.
1999-06-18 17:44:06 +00:00
thorpej 12347b2657 Make uvm_vslock() return the error code from uvm_fault_wire(). All places
which use uvm_vslock() should now test the return value.  If it's not
KERN_SUCCESS, wiring the pages failed, so the operation which is using
uvm_vslock() should error out.

XXX We currently just EFAULT a failed uvm_vslock().  We may want to do
more about translating error codes in the future.
1999-06-17 15:47:22 +00:00
dante d0fb45fdf3 Clean up some stuff
Remove chip version check
Now compile again on 68k based systems
1999-06-12 12:09:01 +00:00
dante 162dba620b Add support for ISA, EISA and ISApnp cards
Fixed a bus reset bug which shows on arm32
1999-06-06 17:33:18 +00:00
mrg 67cbdf5623 split sbus audiocs code up so we can share it with the ebus. XXX ebus DMA is probably different. 1999-06-05 14:29:10 +00:00
pk 9db217428b Cast size_t to long for printf purposes. 1999-06-05 08:35:45 +00:00
bad 4df5ccb1f6 Now that the ARP code doesn't assume that m_pktdat[0] is the start of the
packet(!) we can enable the code that aligns the struct token_header at the
start of the mbuf.
1999-05-29 22:44:11 +00:00
thorpej 88214f79d2 Pass the appropriate access type for uvm_vslock() based on the FP operation:
fpread == VM_PROT_READ|VM_PROT_WRITE, fpwrite == VM_PROT_READ.
1999-05-26 01:09:02 +00:00
augustss eca0bbe20e Update doc URL. 1999-05-23 16:07:04 +00:00
pk 6f9ad5b61d Since we're now prepending the ethernet header to mbuf on incoming
packets, make sure to align the data after the ethernet header.
1999-05-21 13:08:50 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
drochner 0c3738a17b The last change made the driver go into an interrupt loop after a while.
Obviously, the TX_DEFERRALS counter must be read.
1999-05-14 15:54:16 +00:00
mjacob 61bf929d14 Do a fairly large internal restructuring to accomodate dual-bus host adapters
(e.g., the 1240). Include the new 1080/1240 NVRAM layout reading code. Some
moderately significant mailbox changes were necessary also to accomodate a
second channel.
1999-05-12 18:59:23 +00:00
mjacob 7f137a35ff add a few missing mbox commands 1999-05-12 16:45:58 +00:00
thorpej 9c5ccdf883 Don't count deferrals as output errors. It's only a (single) output error
if an excessive number of deferrals causes the transmission to abort.
1999-05-12 15:33:29 +00:00
thorpej 1a1efc6b68 In lance_mediachange(), if there is no callback to the front-end, just
return 0 instead of EINVAL.  In this case, there will only be one media
type, and the upper-level if_media code will ensure that the user is setting
to that type.

In other words, don't require the front-end to provide the no-op.
1999-04-30 18:15:04 +00:00
bad 8fb6c6124b From Onno van der Linden:
Reorganise the driver some what.
Rename tr_reset() to the more appropriate tr_stop().
Create a common tropic reset routine and use it in the frontends.
Move the code in tr_config() which is only used in the card attachment
routines into a new tr_attach() function.
Take adapter off the ring through tr_shutdown() in a shutdown hook.
This simplifies the bus-specific frontend.
1999-04-29 15:47:02 +00:00
jonathan 5847397a4d Add EEPROM_SSI EEPROM field (hardware revision-level info). 1999-04-28 22:47:44 +00:00
dean 188c3f6ae5 Fix for PR kern/7483: ex driver gets bogus MAC address with 3c905B 1999-04-28 17:34:01 +00:00
thorpej 82f0525910 Make the 3Com Etherlink XL driver work on big-endian systems. From
Izumi Tsutsui, PR #7279.
1999-04-26 23:28:31 +00:00
pk c3f1aa0d3e Don't send any data upstream if we're not open yet. 1999-04-22 20:37:37 +00:00
pk d93e27676e Remove splbio()/splserial(), which should not try to protect bus_dma*(9)
internals.
1999-04-20 20:21:04 +00:00
jonathan 055b827e11 Calling DELAY() during polling for command completion of the normal
per-packet discard of every received packet increases latency and
decrease throughput.  INstead, Spin on S_COMMAND_IN_PROGESS for enough
iterations as the expected time to completion.  Only do DELAY()/poll
loops (as suggested by Jason Thorpe) if spinning fails.
Take PCI as fastest case and compute worst-case estimate.

Shorten DELAY() in S_COMMAND_COMPLETE polling-loop up 10, loop-count
down.  to speed up epreset() completion (m/c filter change, ifup/ipdown, etc).
1999-04-20 04:40:24 +00:00
jonathan 07c7535688 * Make doubly sure that the ep shutdownhooks are run at splnet() or above.
* Clear the `enabled' bit in the softc so late hardware interrupts
  (e.g., just after the full reset) done as part of shutdown) are dropped.
* Eliminate loops that  poll forever on S_COMMAND_IN_PROGRESS to complete.
  Add inline function with bounded loopcount plus small delay, to avoid
  bugs in EISA hardware which never sets S_COMMAND_IN_PROGRESS.
  Use for both TX_RESET/RX_RESET/GLOBAL_RESET cmds, and polling for
  discard-Rx completion
1999-04-19 23:26:48 +00:00
ross 4b0326d939 Get rid of delay() in com_common_putc() because the Shark delay() is borked
and can't be called until after the timers are setup. (It should not use
a timer, or it should have a fallback algorithm.)
1999-04-19 19:27:31 +00:00
thorpej 552465011e Revert revision 1.159. The correct answer was not to re-break the
serial console support, but rather to fix the Shark delay().
1999-04-18 22:02:47 +00:00
pk cd6eaa20b1 Print register contents before we modify it. 1999-04-16 13:35:41 +00:00
mjl 6224c1beda Correct wrong board IDs (used ID definition from FreeBSD) 1999-04-15 23:51:44 +00:00
jonathan 0028097812 Fix ex_read_eeprom() for 3c57x. 1999-04-13 23:07:25 +00:00
jonathan 2bf9a70e67 Endian-ness bugfix for elink3 on big-endian hosts.
Big-endian CPUs should use bus_space_{read,write}_multi_stream methods
  to PIO packet data to NIC in 16-bit or 32-bit chunks.
  Make it so.
  Since we don't have stream methods on all ports yet (esp. i386), use
  the bus_space_{read,write}_multi methods if the compile-time
  stream-method feature-test   macro is not set.
Originally from tsubai@netbsd.org, via HAYAKAWA koichi's cardbus patches.
1999-04-13 20:23:52 +00:00
pk b13e5d1469 Quote "AS IS" as in the majority of Carnegy Mellon notices. 1999-04-12 20:38:17 +00:00
bouyer 503de51fdd Fix probe code for IDE devices:
- Don't rely on ATA signature: some ide controllers seems to not transmit it
  properly (SIMIDE on arm32 machines). Instead, when we guess a drive is here
  after reset, just mark it as ATA and OLD is it's not ATAPI.
- at attach time, use IDENTIFY to eliminate ghost from the probe. If the
  drive had the old flag and IDENTIFY failed, issue a WDCC_RECAL command
  to detect a pre-ATA disk. If IDENTIFY succeded, remove the OLD flag,
  it's obviously not a pre-ATA disk.
- add a new controller flag, WDC_CAPABILITY_PREATA, used to shorcut parts
  of the probe (not necessary, but makes the probe/attach faster). This is
  only set by the ISA front-end, all other controllers supported can't have
  pre-ATA drives attached.
The mechanism used are more or less the same as before, they have just been
reordered. Should solve port-arm32/7324 (waiting for feedback).
1999-04-11 20:50:28 +00:00
drochner 2a614bc836 add support for 80x40 screens 1999-04-10 14:02:11 +00:00