Commit Graph

2187 Commits

Author SHA1 Message Date
cgd 059aaedd65 clean up NetBSD RCS ID strings, include machine/options.h 1997-04-06 22:31:45 +00:00
jtk 73cfcd9f66 fix compile error if AUDIO_DEBUG 1997-04-06 17:21:45 +00:00
jonathan 2f1aae7d37 Commit message for previous revision (lost due to Ultrix-compat bug):
* Don't print DMA_OUT message in the `normal' case of a 16-byte residual.
* ioasic-connected 53c94 devices are always clocked  at 25MHz even on
  machines with 12.5MHz TurboChannel.
1997-04-06 10:07:54 +00:00
jonathan 055fff0581 *** empty log message *** 1997-04-06 09:58:30 +00:00
augustss 7dcb9bed4c Make sure the bus tag is set where we need it. 1997-04-06 00:54:22 +00:00
augustss 29e9c34ad3 Add RCS id. 1997-04-06 00:35:19 +00:00
augustss 0a999294f5 Add support for MAD16 based audio cards.
XXX Change the way we determine to probe for it when
    multiple I/O ranges are available.
1997-04-06 00:33:07 +00:00
augustss 7dedd37033 Busify the WSS driver. 1997-04-05 23:50:23 +00:00
mjacob 6d4d1f8852 Okay, Charles convinced me that XS_DRIVER_STUFFUP is better than XS_SELTIMEOUT. 1997-04-05 22:36:56 +00:00
mjacob 0d321a7e29 Add 60 (MHz) value for PCI clock frequency value. Also enable DMA bursting. 1997-04-05 02:55:28 +00:00
mjacob ddc693c299 A) Attempt to get clock rate from ISP chip prior to bashing it over the head
in reset. If none there, try and get from the bus/platform specific code.
If a nonzero value for either, set the clock rate. This is why the PCI
card versions weren't working- they need to be set at 60MHZ, rather than
the default 40MHZ (which worked fine for the internal ISP chips on the
Alpha 8X00).

B) If a isp_poll returns failure (command never completed) to the caller
and no error is set in the xs struct, set XS_SELTIMEOUT. And then call...

C) Added isp_lostcmd function to try and ask the ISP chip about it's current
state as well as the state of commands for a particular target/lun. This is
going along to try and figure out why the very first command to the ISP always
seems to get swallowed up.
1997-04-05 02:53:22 +00:00
mjacob 8f28eaab67 Need a bus/platform specific clock speed variable. 1997-04-05 02:48:36 +00:00
pk c59dd873f4 Remove alignment requirement of ether_cmp(): turn it into a series of
byte comparisons. Compare the ethernet addresses backwards on the
assumption that address number byte 6 has the most random distribution,
so packets not for us spend the least time in here.
1997-04-04 22:35:36 +00:00
mycroft 9448a01404 New version of com driver. Uses a different queueing mechanism and a split
hardware/software interrupt mechanism for improved performance.  Many odd
protocols bugs also fixed.
1997-04-04 20:56:34 +00:00
mycroft 232ade1b2b comdefaultrate -> comconsrate
comconsbah -> comconsioh
Only use comconsrate on the console.
1997-04-04 20:49:49 +00:00
matthias 470e2a9983 * Do some KNFing.
* Make all local functions static.
* Add some untested netatalk support.
1997-04-04 19:02:43 +00:00
christos ef8d40a999 Busify the driver (from perry). 1997-04-04 18:59:35 +00:00
augustss e52219bae7 Regen. 1997-04-04 00:24:36 +00:00
augustss a987ede509 Two more PCI devices. 1997-04-04 00:22:00 +00:00
mycroft 4df7e1dac7 Remove superfluous probe message. 1997-04-02 03:58:25 +00:00
mycroft 6d3685ab6c Add a SDEV_AUTOSAVE quirk for the Emulex SCSI<->ESDI bridge. 1997-04-02 02:36:02 +00:00
mycroft aca1dae3c4 Push the buffer cleanup code into scsi_done(), and split it so that biodone()
is called *after* the driver `done' routine.  This fixes disk I/O statistics
on SCSI devices.

Also, calling the `done' routine with a `complete' argument of 0 and actually
having it do anything meaningful loses in at least 3 ways, so just nuke the
argument altogether and don't call it this way.  If the driver needs to do
some error handling, that's what `err_handler' is for.
1997-04-02 02:29:30 +00:00
gwr 1614a8ad2e Always schedule a timeout before the first occasion where
we return from the driver expecting to come back due to an
interrupt, because the interrupt might not happen...
Do the untimeout in ncr53c9x_done instead of just before
almost every call to ncr53c9x_done as was done previously.
Make ncr53c9x_sense schedule its own timeout for the new
command it is starting (request sense), separate from the
timeout for the command that just completed.
1997-04-01 22:10:04 +00:00
gwr 50b0bafbbb Allow separate control over the "per-target trace" feature
via the NCR53C9X_DEBUG value.  Add some padding for m68k.
1997-04-01 22:08:18 +00:00
mikel df25ccca49 loosen the version number check in the quirk list for the CDR-H98MV;
from Koji Imada in PR kern/3419.
1997-04-01 04:05:03 +00:00
thorpej b20341d54a If we don't match a known card ID, return "don't match". 1997-03-31 20:52:13 +00:00
jonathan 2e7e0f6ca0 Merge with Mattias Drochner's PCnet-PnP front-end. 1997-03-31 20:36:38 +00:00
jonathan 999f50b033 PCnet-PnP front-end driver for isapnp PCnet cards. 1997-03-31 20:22:19 +00:00
jonathan c1f72bba37 Add ifmedia hooks: include <ifmedia.h> and add sc_media to softc. 1997-03-30 22:47:05 +00:00
jonathan 70e7856e42 Match missing variants:
3c900 twisted-pair only, 3c595 mii, 3c595 100bT4, 3c905 100bT4.
Is there an MII version of the 3c905?
1997-03-30 21:31:01 +00:00
christos 4c29beee46 PR/3409: Koji Imada: cdsize() timeout too short for cd changers. 1997-03-29 21:37:55 +00:00
jtk dd46e6280e partial fix for PR 3385: correctly identify JAZZ-16 when AUDIO_DEBUG is
enabled
1997-03-29 05:41:28 +00:00
mhitch cb3b852a7f A couple of missed boot() -> cpu_reboot() changes. 1997-03-29 05:03:01 +00:00
mycroft 11117540d2 Use a temporary data structure for holding probe information, rather than a
full softc.
1997-03-29 02:32:30 +00:00
mycroft 056fd71e85 General cleanup: bus.h, etc. 1997-03-29 02:11:09 +00:00
mycroft 080350dc0d Use a temporary data structure for holding probe information, rather than a
full softc.
1997-03-28 23:47:08 +00:00
cgd d26286ab6b clean up (unify) the register mapping code a bit 1997-03-28 22:25:01 +00:00
cgd 874e7169a4 punt pci_mem_find's &cacheable arg, and pass NULL instead. We never
want to map the memory register cacheable.
1997-03-28 22:16:06 +00:00
cgd 359850c818 clean up isp_pci_prefer_io comment 1997-03-28 21:51:51 +00:00
veego 7ae296c7de - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:50 +00:00
veego 5aa9546783 - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:49 +00:00
veego a715085e43 - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:47 +00:00
scottr 1cc0fb9b24 Add SDEV_AUTOSAVE quirks for IBM 0663H{08,12} disks 1997-03-27 07:37:54 +00:00
scottr b316767c92 Work around an ambiguity in the SCSI spec. Some implementations,
particularly older ones, don't do a SAVE DATA POINTER before disconnecting.
When the driver reconnects, it does an implicit RESTORE POINTERS, and
restores the data pointer from *before* the last transfer.  If the driver
calculates the residual using the data pointer and doesn't account for
this, the residual will be wrong.

What we do is test for the SDEV_AUTOSAVE quirk when we see a disconnect
message, falling through to do a SAVE DATA POINTER if the quirk applies
to this target.

The workaround was suggested by Mycroft, who also provided the explanation
of the problem.  Actual code was (mostly) ripped off from the 53C9x driver.
1997-03-27 07:30:40 +00:00
gwr 8be7d1ef9e No longer need the hack that forced SCSI_POLL when cold. 1997-03-27 01:16:01 +00:00
pk c5d5c54038 Add workaround for the "extraneous bytes after re-select" problem that
ESP100 chips may exhibit.
1997-03-27 00:29:57 +00:00
thorpej 66908db327 Resolve conflicts from merge. 1997-03-26 02:08:07 +00:00
thorpej 8443f8fad0 Resolve conflicts from merge. 1997-03-26 01:33:32 +00:00
scottr 757d4ce5d4 Add SDEV_NOLUNS quirk for Seagate ST125N. 1997-03-25 22:33:50 +00:00
christos 93b36b663d PR/3388 from Tatoku Ogaito: Add product id for another soundblaster PnP card. 1997-03-25 15:16:49 +00:00
mikel eba3c11c27 some cleanup; still needs a *lot* of work 1997-03-25 07:57:14 +00:00
gwr 5c88d15269 When cold!=0 force SCSI_POLL (otherwise swapconf will hang) 1997-03-24 17:16:45 +00:00
jtk 983d7a8c15 use new name sc_drq8 and initialize sc_drq16 (reflect changes to SB driver) 1997-03-24 05:30:28 +00:00
thorpej 4c03c2945d Resolve conflicts from merge. 1997-03-24 00:35:02 +00:00
thorpej 24840394af Fix a screwup (my fault, oops) that caused the stack to get corrupted.
From Ian Dall <Ian.Dall@dsto.defence.gov.au> on port-pc532.
1997-03-24 00:04:53 +00:00
veego 196e8ba3c2 Resolve conflicts from merge. 1997-03-23 09:37:28 +00:00
cgd da14b3d856 clean up isp_poll() so that it works more correctly. (Modeled on the version
in the BusLogic driver.)
1997-03-23 00:50:07 +00:00
matthias c796ad8010 Add missing arp tag for se driver. 1997-03-21 08:55:09 +00:00
mycroft cf83d6c33f Use native IPL_AUDIO for i386. 1997-03-21 04:36:29 +00:00
mycroft 188dec4d19 Clean up a bit, and export isa_dmamask() and isa_dmaunmask() interfaces. 1997-03-21 02:17:11 +00:00
mycroft 51c794927e Minor changes. 1997-03-21 00:56:43 +00:00
mycroft 9bc57d2244 Add PnP ID for SB AWE32. 1997-03-21 00:49:38 +00:00
mycroft 3523bc35d5 Add an isa_dmacount() function, to get the current residual count on a channel. 1997-03-21 00:00:21 +00:00
mycroft 6f51eb5c3d Use autoinitialize DMA mode on the SB2 and later. Partly from Torsten Duwe. 1997-03-20 21:42:11 +00:00
chuck 63c14f2d75 MAJOR CHANGES: [contributed by Chuck Cranor <chuck@ccrc.wustl.edu> and
Anne Hutton <hutton@isi.edu>]:
   - add support for Adaptec 155 PCI ATM cards (e.g. ANA-5940)
          - add sc->is_adaptec to handle differences between cards.
          - break out MID_MK_TXQ/MID_MK_RXQ seperate macros to handle
                  the new Adaptec format TXQ/RXQ.
          - adjust en_dqneed to return 1 on ADP (since the Adaptec can
                  DMA anything in one DRQ/DTQ!)
          - add hook for a bus specific reset function (adaptec has
                  a seperate reset register that needs to be hit when
                  resettting the midway).
          - adjust DMA test to not worry about burst sizes on the
                  adaptec (since it handles it all for us!) and to handle
                  the new DTQ/DRQ format.
          - add Adaptec DMA support to en_txlaunch() and en_service()


BUG FIXES:
   - fixed receiver panic under heavy load ("lost mbuf in slot 0!").
          when the reassembly buffer overflows, the T-bit is set in
          the RDB and the data field is empty.  en_service() sets up
          a 4-byte (RDB size) dummy DMA without IF_ENQUEUE.  but the
          recv intr handling in en_intr() always does IF_DEQUEUE.
          as a result, a successive recv intr loses its mbuf and
          leads to a panic.  the solution is to only IF_DEQUEUE if
          the interrupt has non-zero length (indicating that there
          is an mbuf to get).   in order for this to work, EN_DQ_MK
          must always be non-zero.   we do this by or'ing in an unused
          bit (0x80000).
                  reported by: Kenjiro Cho <kjc@csl.sony.co.jp>

   - fix setting of transmit channel when txspeed[] is non-zero
          (e.g. traffic shaping).    the old scheme didn't work
          properly (it allowed the same VCI to use multiple tx channels
          thus defeating the txspeed[] parameter).   the new scheme
          statically assigns a VC to a channel when txspeed[] is set.
          [note that the code to set txspeed[] isn't in the driver right
          now since a MI interface to do this hasn't been made yet]
          we add sc->txvc2slot[] and sc->txslot[n].nref for this.
                  reported by: Kenjiro Cho <kjc@csl.sony.co.jp>,
                                  Milind M Buddihikot <milind@ccrc.wustl.edu>,
                                  Dong Lin <dong@eecs.harvard.edu>

   - when doing SRAM copies, be sure to round up the length to the next
          largest word (otherwise the driver will try to do a byte clean
          up DMA and then get an ID error interrupt).


MINOR CLEANUPS:
   - clean up loops in DMA test
                  contributed by: Kenjiro Cho <kjc@csl.sony.co.jp>

   - restructure and cleanup of en_read/en_write macros/inlines

   - clean up some byte ordering stuff so that we are consistant throughout
          the driver
1997-03-20 21:34:42 +00:00
chuck aeee0bf5a5 add support for adaptec PCI atm cards (see midway.c log for details) 1997-03-20 21:30:46 +00:00
chuck e64066a694 regen 1997-03-20 20:22:17 +00:00
chuck 088d71a793 - add Adaptec ATM ID's (0x5900, 0x5905). still trying to find out how they
correspond to the ANA numbers...  certainly includes ANA-5940.
 - add Efficient Nets product 0x0000.  according to linux pci.h
	the 0x0000 is an FPGA version of the midway card and the 0x0002
	is the ASIC version.
1997-03-20 20:18:43 +00:00
mycroft b89990fba6 Oops; fix pasto. 1997-03-20 20:18:40 +00:00
mycroft 4f9648674a Make sure we round the block size to a multiple of the sample size. 1997-03-20 20:15:24 +00:00
mycroft 7a55cafeeb Implement set_format. 1997-03-20 16:51:38 +00:00
mycroft 2c6048e49f Make sure to recalculate the block size after changing the
sampling rate.  Also, nuke the global variable audio_blocksize.
1997-03-20 16:13:55 +00:00
mycroft e0b3534b6c Remove bogus block rounding code. If the application sets a
block size explicitly, it had better know what it's doing.  From
PR 2587, by Robert Baron.
1997-03-20 16:04:22 +00:00
mycroft a2f33a43c2 Turn off a debugging printf(). 1997-03-20 11:04:51 +00:00
mycroft 95abb133dc Add 16-bit DRQ support on PnP, and enable 16-bit output. 1997-03-20 11:03:10 +00:00
mycroft ab86334267 Second DRQ is at 0x75, not 0x72. 1997-03-20 10:48:02 +00:00
thorpej 21c7befacf Back out part of the previous patch - not only does stuffing a sizeof()
into 8 bits generate (bogus) warnings on some architectures, but the
change to pad on "scsi inquiry" is no longer needed, apparently.
Thanks to Matthias Pfaller for pointing the latter out to me.
1997-03-20 07:13:07 +00:00
mycroft c1cc14fa25 Combine set_encoding and set_precision into a single set_format interface. 1997-03-20 06:48:48 +00:00
mycroft de69173e77 Fix oversights in previous. 1997-03-20 03:56:11 +00:00
mycroft 8b4878a6ba Fill in silence-padded blocks so we don't get gaps. From PR 3357,
by Lennart Augustsson.
1997-03-20 03:19:53 +00:00
mycroft a283cb636c Check for errors returned by AD1848 routines. 1997-03-19 19:54:44 +00:00
cgd 2cde9c6e69 fix multi-function device support, add new known classes/subclasses,
and clean up class/subclass printing.  From brb@brig.com via PR 3359.
1997-03-19 19:38:46 +00:00
mycroft 2b72395bfc ad1848_commit_settings(): Don't set the speed/format register if the
parameters haven't changed.  From PR 3360, by Jason Baker.

Also, clean up several overly-complex interfaces.
1997-03-19 19:31:15 +00:00
mikel eb7e30aa3d normalize off-by-four ad1848 register offsets.
also silence probe unless debugging is enabled.
1997-03-19 06:47:37 +00:00
mikel 80a8a81608 normalize off-by-four ad1848 register offsets. 1997-03-19 06:45:21 +00:00
thorpej 914022ca23 Resolve conflicts from merge. 1997-03-19 02:37:36 +00:00
christos dd64e55c90 PR/3353: From Alistair G. Crooks: move to the new arp world. 1997-03-18 18:58:12 +00:00
cgd 5b1c90b820 add appropriate includes so that this deals properly with NS and CCITT+LLC.
(Includes stolen from dev/ic/am7990.c, because it's a (the?) canonical
networking hardware driver.)
1997-03-18 04:45:04 +00:00
thorpej f94626f157 Driver for the Cabletron EA41x SCSI Ethernet Adaptor, written by
Ian Dall <ian.dall@dsto.defence.gov.au>.  Converted to "new arp"
and some other (very) minor changes by me.
1997-03-18 01:31:15 +00:00
thorpej 8c465535e7 Two changes from Ian Dall <ian.dall@dsto.defence.gov.au>:
- Deal with devices that ignore the length specified in the
  inquiry command.
- Allow asynchronous requests without using a buf (key off NOSLEEP instead).
1997-03-18 01:28:10 +00:00
is bde018355f Signed shifts are evil.
Thanks to Michael Smith for reporting, Jason Thorpe for pointing to the
report, doing a quick workaround which pointed me to the right code part and
for testing the final fix.
1997-03-17 18:29:56 +00:00
thorpej 0398318515 Resolve conflicts from merge. 1997-03-17 03:44:49 +00:00
thorpej 1d987a161b #include <net/if_media.h> 1997-03-17 03:17:34 +00:00
thorpej 80e6765189 - Add support for media selection via if_media. If the front-end
does not supply media types, default to the "manual" type.
- Clean up the ETHER_CMP stuff slightly.
- Keep track of our carrier status, for media status requests.
1997-03-17 03:14:03 +00:00
cgd cd0461fbb8 map either via memory or I/O space, depending on the setting of a
patchable kernel variable.  eventually, it might make sense to turn
this into a driver flag or something.
1997-03-16 00:37:00 +00:00
cgd d611773458 fix botches in is's new ARP changes 1997-03-15 21:06:09 +00:00
is 07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
mikel 8147d1718f fix various AD1848/PSS misfeatures; from Jason Baker in PR kern/2045.
also did some misc cleanup of my own.
1997-03-13 08:34:49 +00:00
cgd e36a5ca4de change microcode array definitions from "unsigned short" to the more
correct u_int16_t, and remove bogus casts that the old definition
required.
1997-03-13 04:07:44 +00:00
mycroft 919efaeb60 Make the microcode table const. 1997-03-13 03:33:03 +00:00
mycroft b0c4e068d0 Modify audio_fill_silence() to take an encoding number rather than a softc*
and mode.
1997-03-13 02:45:07 +00:00
mycroft ac3b8b13b7 Don't share the silence block between devices. Make silence filling work for
more encodings, and make it device-independent.  From Lennart Augustsson, in
PR kern/3305.
1997-03-13 02:19:32 +00:00
cgd 5f0d034532 include <vm/vm.h> for vtophys() on x86. kill extra <sys/kernel.h> incl. 1997-03-13 01:56:06 +00:00
christos 9733b260cd Add a match for the ESS1868; from herb... 1997-03-13 01:45:11 +00:00
cgd d999d514ce make these compile (and hopefully run; they're untested) on the Alpha 1997-03-13 01:10:34 +00:00
cgd 8aa5282c68 clean up the __BROKEN_INDIRECT_CONFIG chunks of the last change 1997-03-13 01:04:02 +00:00
cgd 4c654c0acf fixes from Matt Jacob so that these can compile and run on the Alpha.
(aic7xxx has been tested and works on the Alpha, bha has not yet been
tested on thne Alpha.)
1997-03-13 00:38:48 +00:00
mycroft 8f8b0d91e5 Remove bogus use of splhigh(), and apparently unneeded bzero(). 1997-03-12 22:31:37 +00:00
cgd cf26d31ad2 NetBSD RCS ID tweaks, a few comment block tweaks. Also, make copyright
notices consistent (per Matt Jacob).
1997-03-12 21:06:41 +00:00
cgd 099e30a322 ISP 10x0 driver from Matthew Jacob of NASA Ames Research Center.
(March 12, 1997 version).
1997-03-12 20:44:50 +00:00
cgd 265be6d839 enabled SQWE as well as PIE in reg B. 1997-03-12 19:13:20 +00:00
christos 12331eb691 Fix typo of PR/3319 1997-03-12 13:53:14 +00:00
mikel d9b86972c1 SB minor version number is always two digits 1997-03-12 07:06:19 +00:00
cgd 9753d8f7a5 properly #define MC_REGB_SQWE. From Matt Jacob 1997-03-12 06:53:42 +00:00
cgd dbaf4fbdbe specs for ISP 10x0 (isp) driver PCI attachment. From Matt Jacob 1997-03-12 06:39:47 +00:00
chuck 7df0dbdd33 minor fixes to freebsd code sections from Kenjiro Cho <kjc@csl.sony.co.jp>
get ready to add support for adaptec version of midway card (which
has a different DMA interface).
1997-03-11 23:30:19 +00:00
mikel 877fe66c4e SDEV_NOMODESENSE quirks are no longer needed for optical devices; from
Enami Tsugutomo in PR kern/3308.
1997-03-11 06:06:35 +00:00
mikel 1186720517 eliminate leftover header from bt -> bha conversion; noted by Enami
Tsusgutomo in PR kern/3310.
1997-03-11 04:24:03 +00:00
leo 3d849b9429 - Turn the sc_[tr]bufaddr fields into arrays of addresses instead of just
the base address. This allows for a more flexible layout of buffers
  in the Lance's memory.
- Add a new element 'sc_saved_csr0' to am7990_softc. It's value is or-ed
  with the current csr0 value in the am7990_intr() function. This allowes
  for a 'deferred' interrupt sceme.
1997-03-09 21:12:39 +00:00
mikel a71e39e5d5 fix some spelling errors noticed by Charles Kane <ckane@mipos2.intel.com>.
fix some more noticed by myself; all are in comments or strings.
1997-03-09 06:10:32 +00:00
thorpej 709ccfa853 Patch from Matt Thomas to deal with the fact that Pass 2.[012] of
the 21140A-A[CDE] have a buggy receiver which may hand and/or corrupt
data on receive overflows.
1997-03-06 22:32:20 +00:00
mikel ffe5d2d664 don't forget the bus_space tag; from Azuma Okamoto in PR kern/3290. 1997-03-05 08:02:03 +00:00
mycroft e481e52aa9 Fix a couple of splhigh()s that should be splbio(). 1997-03-04 21:42:32 +00:00
mikel 4a6b41b8fe garbage collect unused variable (was this struct declaration orginally
a typedef?); from Enami Tsugutomo in PR kern/3282.
1997-03-04 06:25:22 +00:00
christos 700cbbae46 Fix bug introduced in the conversion to bus_*(). Don't always say that
we are a JASS16. From enami tsugutomo.
1997-03-03 21:40:01 +00:00
briggs 2163898eeb Add the 53c96 variant. 1997-02-27 13:59:32 +00:00
thorpej dd89d8fd78 Machine-independent NCR 53c9x SCSI driver, derived from the SPARC/Alpha
versions.  Thanks to Chris Demetrious and Paul Krannenburg for the
initial work towards merging the two.
1997-02-27 01:12:07 +00:00
gwr 9f53f9825f Use sc_no_disconnect (per-target) instead of NCR5380_PERMIT_RESELECT. 1997-02-26 22:23:48 +00:00
gwr 07378343ed Add the new member "sc_no_disconnect" to ncr5380_softc, and
remove NCR5380_PERMIT_RESELECT.
1997-02-26 22:22:13 +00:00
gwr 4dd31a28f0 Integrate fix for rude targets that transfer more data than requested.
(From Matthias Pfaller).
1997-02-26 20:31:16 +00:00
sommerfe 9def46bf50 Fix PR3260: cosmetic glitch in aha autoconf output. 1997-02-26 04:52:13 +00:00
christos e4fb91bcb5 Fix PR/3251; also don't assign the checksum every time around the loop. 1997-02-24 22:08:25 +00:00
gwr 1da91c27bc Tweak the KGDB glue slightly - do the printf here. 1997-02-24 16:03:05 +00:00
gwr f9d32cbb9b Add declaration for zs_check_kgdb() 1997-02-24 16:01:39 +00:00
thorpej 15b56daab6 If posting an error condition because the media has been unloaded,
make sure to set the residual count to reflect that no data was
transfered.

From Naofumi HONDA / MINOURA Makoto, PR #3007.
1997-02-21 23:03:25 +00:00
thorpej 850b75414f - Tidy up some printf code in chattach().
- Implement a simple quirks framework for changers.
- Add a quirk for the Spectra 9000 8mm tape library; it requires a
  slightly-longer-than-1-minute delay to take tape inventory.  Many
  thanks to David Webster at Cygnus Solutions for testing this for me.
1997-02-21 22:06:52 +00:00
thorpej 625d310b1b Handle optical disks a little better, from Naofumi HONDA / MINOURA Makoto
in PR #3009, with some slight KNF from me.
1997-02-21 21:51:59 +00:00
jeremy 2eff5a6059 Fix typo in comment. 1997-02-21 07:14:21 +00:00
is b22d1088ea Make this compile again on NetBSD-current/i386. 1997-02-20 17:53:50 +00:00
mikel b6a5671c00 make sure that packets are ours before passing them up if interface is
in promiscuous mode; from Juergen Weiss in PR kern/3121.
1997-02-20 06:59:32 +00:00
mikel 2af30c1cd3 make sure max_target is initialized for both buses on multibus parts;
from Anders Hjalmarsson in PR 3103.
1997-02-20 05:15:50 +00:00
gwr 4f4bade9a7 Improve a comment. 1997-02-20 00:32:15 +00:00
gwr d8b59a12b5 Shared functions to convert between year/month/day/hour/minute/second
and "seconds since 1970" (POSIX time_t). See sys/arch/sun3/sun3/clock.c
for an example of how these can be used.
1997-02-19 23:29:28 +00:00
jonathan c7cec27edf Move if_ep media-sense code from front ends to inside back end,
to prepare for if_media, and to support EISA 3c59x cards:

  * change epconfig() to take a short that encodes the chipset
    type (3c509, or Demon/Vortex/Boomerang).
  * add  distinct 3c509 and Demon/Vortex/Boomerang media-sense
    functions to back end.
  * Add EISA match/attach support for the 3c592 and 3c597
    (Demon) cards as well as the 3c509-comatibl EISA 3c509/3c579.

  * Assume that ISA and ISA PnP cards are 3c509-style, until
    proof to the contrary (e.g. large packet support).

Tested on 3c595, 3c590, and 3c509b. Not tested on 3c515 or Demon.
1997-02-18 10:51:06 +00:00
jonathan 788394a2e4 Change bha_pci product names to match latest pcidevs:
PCI_PRODUCT_BUSLOGIC_OLD946C -> PCI_PRODUCT_BUSLOGIC_MULTIMASTER_NC
    PCI_PRODUCT_BUSLOGIC_946C -> PCI_PRODUCT_BUSLOGIC_MULTIMASTER
1997-02-17 22:42:21 +00:00
jonathan 82d682ac83 Correct low-order product code digits for 3Com 3c597 family. 1997-02-17 00:06:17 +00:00
jonathan fcdd1b0065 fix typo in 3Com 3c597 product description. 1997-02-16 20:10:31 +00:00
jonathan ac06c9aae3 Add product entries entries for 3c592, 3c597 (Demon).
(Assume revision zero until proof to the contrary.)
1997-02-16 20:01:14 +00:00
veego 932fca6287 regen. 1997-02-16 17:21:26 +00:00
veego d0e4650c7d Fix errors in the last commit. 1997-02-16 17:17:30 +00:00
jonathan 4fdff0ed65 * Add ep_complete_cmd() function, to issue commands that perform a reset
(RX_RESET, TX_RESET, GLOBAL_RESET).
  Commands issued while a reset is in progress may be dropped. The driver
  must wait until resets are complete; ep_complete_cmd() does so.
* Change RX_RESET,  TX_RESET, GLOBAL_RESET to use ep_complete_cmd().

* Revert epconfig() to use inline RX_RESET, TX_RESET.
  That avoids accidentally setting IFF_UP, which  breaks both diskless boot,
  and "halt" commands issued before the interface is brought up.
1997-02-16 04:09:18 +00:00
tls d21c733fd8 greatly expanded pcidevs file courtesy of Carl Shapiro <cshapiro@sparky.ic.sunysb.edu>. 1997-02-15 11:07:08 +00:00
thorpej a8756f0775 Pass the bus PA (i/o address) to pdq_eisa_init() to avoid doing
arithmetic on bus space handles (which is strictly forbitten.
Pointed out by Matthias Drochner <drochner@zelz28.zel.kfa-juelich.de>
in PR #3216.
1997-02-13 00:08:27 +00:00
thorpej 2953a0ce90 Pass the i/o handle, not bus PA, to bus_space_unmap().
From Matthias Drochner <drochner@zelz28.zel.kfa-juelich.de>,
in PR #3216.
1997-02-12 23:37:38 +00:00
thorpej dfa1224fab Oops, pass the memory handle, not bus PA, to bus_space_unmap().
From Matthias Drochner <drochner@zelz28.zel.kfa-juelich.de>, in
PR #3216.
1997-02-12 23:36:04 +00:00
christos 041fb607e0 Add a break; in the irq/drq allocation loop so we take the first one instead
of the last one.
1997-02-09 18:36:44 +00:00
christos 12a7c99376 Fix an irq -> drq typo 1997-02-09 18:36:11 +00:00
mycroft 1dd1504980 Move the aha ISA probe functions into a separate file. 1997-02-07 17:37:27 +00:00
cgd 711939bcf4 add a bunch of commented-out, unconfirmed entries, based on data from
a "Smart Frame Buffer TURBOchannel Module" user's manual(?), and from
some "DECstation 5000 Model 240 Options and Upgrades" guides found
while cleaning out my office.
1997-02-05 22:14:18 +00:00
ragge a1d8a4570c Support for DL11 (-compatible) async ctlr.
Written by Ben Harris (bjh@mail.dotcom.fr).
1997-02-04 19:13:15 +00:00
thorpej e0145dbc88 NFSCLIENT -> NFS 1997-01-31 05:18:51 +00:00
cgd f89ffa1fe4 don't clobber IER in cominit(). (suggested by mycroft.) 1997-01-30 19:42:33 +00:00
thorpej 9a815ed696 A performance optimization, inspired by a conversation with Thor Simon:
- Keep a freelist of component buffer headers, defaulting
	  to 8 headers per component (tunable with the CCDNBUF
	  kernel compile option).
	- When allocating a component buffer, try to pull a header
	  off the freelist first, falling back on MALLOC() if the
	  freelist is empty.  Use MALLOC() rather than malloc(),
	  because it will attempt to short-cut the allocation before
	  actually making a full-blown malloc() call.
	- Keep statistics on how many component buffer headers have
	  been allocated and how many of those allocations have
	  resulted in freelist misses.

With these changes, I observed measurable decreases in system and
wall clock time on operations on an 8G ccd, as well as a measurable
drop in the time spent in ccdbuffer() (measured with kernel profiling).
1997-01-30 04:00:52 +00:00
thorpej bb60822446 Fix OBOB in ccdopen() partition range check.
From Klaus Klein <kleink@layla.inka.de>, PR #3161.
1997-01-30 03:32:56 +00:00
cgd 3573080902 split isasearch (!__BROKEN_INDIRECT_CONFIG) completely off of
isascan (__BROKEN_INDIRECT_CONFIG), and attempt multiple match/attach
of cloning devices in isasearch().  (If a match/attach succeeds for
a cloning device, try it again.)
1997-01-26 03:49:28 +00:00
thorpej 1392015f6b These files are obsolete (ramdisk -> md). 1997-01-25 00:10:36 +00:00
christos 1a33eecdca const poisoning 1997-01-24 22:13:10 +00:00
christos 2fe3b9727a - increase string space for device class names
- fix the parser so that non-compliant isapnp devices work, and we
  give up when there are too many errors (some on-board pnp sound/atapi/game
  soundblaster compatible card).  reported by chuck cranor
- fix the parser so that configuration tags that come after the
  end-dependencies tag or before the begin-dependencies tag are merged
  in properly (gravis ultrasound). reported by gary duzan
  We now build a tree of card -> logical-dev -> conf, and in the end we
  convert it to a list of conf...
1997-01-24 21:58:34 +00:00
veego ff217ba6d9 Decrease the delay() in isapnp_wait_status(), 100 was too much. 1997-01-24 21:17:19 +00:00
chuck 16ef494b41 bug fix:
- if aal5 frame has a CRC error then the length field in the aal5 trailer
	may not be valid, so we can not use it [and we must dump the frame]
	[Yuhang Sun <sunyh@dworkin.wustl.edu> & chuck@ccrc.wustl.edu]
1997-01-24 20:58:42 +00:00
veego 0a1897f82f Change on printf to remove duplicated informations and add a \n. 1997-01-23 11:42:44 +00:00
mycroft 318bbe30f5 Increase the delay() in isapnp_wait_status() for slow cards. 1997-01-22 23:51:38 +00:00
mycroft f7709d02b6 Add a frontend for the 3C509B. 1997-01-22 23:44:03 +00:00
perry 1c47a4325b close 3079 from Jason Baker -- fixes a test in audio_poll 1997-01-18 04:02:58 +00:00
cgd c05e715a52 kill use of strchr(); it's moving to libkern 1997-01-18 02:18:47 +00:00
mycroft 54133e5f93 Remove a previous gratuitous change, and KNF police. 1997-01-17 22:09:09 +00:00
perry 8852c180ef Fixes to wd driver from cgd -- corrects several nasty bugs typically
associated with coming out of suspends/sleeps on laptops.
Approved by fvdl.
1997-01-17 20:45:29 +00:00
christos cf455412fc Plug and Play support. 1997-01-16 22:00:57 +00:00
christos e6717c0bc9 - convert to bus_space_*
- split attachment code to sb_isa.c
1997-01-16 21:03:30 +00:00
gwr 77eb8c5a65 fix alignment again for m68k 1997-01-15 18:22:35 +00:00
mikel fe9f1f4e3e add missing copyright and RCS ID; ok'd by mycroft 1997-01-15 07:06:42 +00:00
thorpej db33863c33 Fix a couple of minor nits so that this compiles on the alpha.
Noticed by Matt Jacob (mjacob@feral.com).
1997-01-13 00:15:29 +00:00
thorpej 7c14653df6 It's not safe to sleep in mdattach(), so don't pass WAITOK to malloc(). 1997-01-11 06:26:41 +00:00
thorpej aceef5987f Merge into mainline, tidy up some debug code. 1997-01-11 04:47:31 +00:00
thorpej d34ed2a09f Update from Matt Thomas <matt@3am-software.com>. Supports more
Tulip-based cards, including new SMC and Kingston cards.
1997-01-11 04:30:07 +00:00
perry 40533e83ff Commit latest fixes/upgrades to NCR SCSI driver. From FreeBSD via
Dave Huang <khym@bga.com>

Tested on alpha by cgd, tested on several i386 boxes. Certainly causes
no harm to the goddamned mess, but the NCR driver only works when you
perform voodoo rituals on it anyway.

This is what Dave said (in email) has been added to the driver:

  ----------------------------------------------------------------------
  This seems to be the most significant change:
  General cleanup and new features for 53c875 based cards, especially the
  Tekram DC390W/U/F, whose config EEPROM can now be dumped, if the kernel
  is built with option NCR_TEKRAM_EEPROM.

  Other changes:

  - add brackets to expansion of OUTB/W/L macro arguments.
  - remove unused NCB structure element ns_async
  - support sync. SCSI offset of 16 (instead of only 8) on 825A and 875
  - correctly identify 53c810A and 53c825A chips
  - preserve SCSI BIOS settings of PCI performance options
  - remove (already disabled) support for NCR reset because of command timeout
  - reverse order of reading of SCSI and DMA specific interrupt cause registers
  - add definition of Tekram config EEPROM contents (not currently used)
  ----------------------------------------------------------------------
1997-01-10 05:57:10 +00:00
jonathan f703350d59 typo in definition of extended-geometry register. 1997-01-04 16:47:03 +00:00
veego 034ed50ead Add the Matrox Millenium and regen the header files. 1997-01-01 14:56:19 +00:00
jonathan 9821b30fe4 Use DELAY() after doing a TX_RESET or RX_RESET command.
Newer boards (e.g., Vortex) take  time to reset, and wedge on some machines.
Polling on S_COMMAND_IN_PROGRESS would be better, but that doesn't
work with xx_RESET commands on 3c509s.
1996-12-31 21:36:30 +00:00
jonathan 0ede4558bc Use the same symbolic cnames for 100Mbit media as epconfig(). 1996-12-31 21:26:10 +00:00
jonathan 259ce9f178 * make sure 100mbit media-present bits don't collied with 3c509
CONFIG_CNTRL bits by making the "conn" argument to epconfig()
   a u_int, not a u_int16_t, and by defining 100mbit media
   bits in the upper 16 bits.

A redesigned interface that fixes this properly is in the pipeline.
1996-12-30 19:18:28 +00:00
jonathan b00ac4cf2c * add epshutdown(), and establish as shutdown hook: see multiboot
comments in pr port-i386/2358: "if_ep/3C590 no longer working"
* Only call Vortex media-config code on PCI-attached devices, until
  we know if it works on ISA and EISA large-packet devices also.
* Fix typo in printf of MAC address
1996-12-29 17:01:58 +00:00
jonathan 1d7f16f4d9 * Accept 100baseT4, MII variants of 3c595 as 3c595-model devices,
rather than unknown.

* Look for 100mbit interfaces, and for any present, set corresponding
  bits in `conn' argument to epconfig(). epconfig() will now print
  100Mbit media by name.
1996-12-29 13:42:58 +00:00
jonathan 23c1d14c64 * Add 100Mbit xcvr flags to epconfig():
look for 100mbit Xcvrs, print their names, add to ep_connectors.

* Print 10baseT as 10baseT, since media name (utp) is no longer a unique
  transceiver type.

* Redo FIFO memory size printing, also show Tx/Rx split (xxx isa 3c509?).

* Print MAC address on a separate line,  with 100Mbit media and fifo-ram
  info it no longer fits on the same line as media types.

* Comment the fact that the "connection" media-selection code just doesn't
  grok 100Mbit media.

* add code to look for 3c59x/3c90x media-select and autoconfig bits, though
  we don't yet dynamically probe media when the autoconfig bit is set
  (see previous bullet).

* XXX the whole connector/media code should be redone, perhaps a' la
  the BSDI ifmedia design.
1996-12-29 13:32:46 +00:00
jonathan 6ad69cd711 * Expand softc sc_connectors field to 16 bits.
For now, we really only need 8 bits of media type.

* Add bogus definitions for 100mbit transcievers, to be set in the
  "conn" argument to ep_config(). Should  really  use the same bits
  as in EP_W0_CONFIG_CTRL bits, but I don't know what bits the 3c515
  &c use for 100mbit media.

* Define bitflags for 100Mbit transceiver options in ep_connectors.

* Add definitions of powerup/powerdown commands. for interfaces with
  power management. Should send a powerup after APM resume?

* Add definition of fragment-busmaster (vortex) START_DMA command.

* Add definition  of PCI configuration-space media-present bits.
  (really just EP_W3_RESET_OPTIONS remapped into pci config space.)

* Add comments describing what the #define's above are used for.
1996-12-29 13:25:23 +00:00
jonathan 48f7828104 * Expand softc sc_connectors field to 16 bits.
For now, we really only need 8 bits of media type.

* Add bogus definitions for 100mbit transcievers, to be set in the
  "conn" argument to ep_config(). Should  really  use the same bits
  as in EP_W0_CONFIG_CTRL bits, but I don't know what bits the 3c515
  &c use for 100mbit media.

* Define bitflags for 100Mbit transceiver options in ep_connectors.

* Add definitions of powerup/powerdown commands. for interfaces with
  power management. Should send a powerup after APM resume?

* Add definition of fragment-busmaster (vortex) START_DMA command.

* Add definition  of PCI configuration-space media-present bits.
  (really just EP_W3_RESET_OPTIONS remapped into pci config space.)

* Add comments describing what the #define's above are used for.
1996-12-29 12:36:43 +00:00
jonathan f029ade219 Define the contents of window 3's InternalConfig register. 1996-12-29 10:21:48 +00:00
pk 1cfdb29905 Rename this driver `md'. 1996-12-28 23:09:26 +00:00
cgd 73f996ef33 note in a comment (XXX) that strchr() (what's it doing here, anyway?)
causes 'const' to be discarded.
1996-12-22 10:35:08 +00:00
thorpej fca7fce17e Deal with targets > 7 on wide Buslogic controllers. Remember the "wide"
bit from the extended setup inquiry and key off it to:
- Force synchronous negotiation on targs > 7.
- Read additional information returned by wide cards on inquire setup.
- Read sync period on targs > 7.
- Display sync period/offset on targs > 7.
- Set scsi_link.max_target to 15.
cvs: ----------------------------------------------------------------------
1996-12-20 21:35:10 +00:00
jonathan e7a52ac635 Add missing fields to the extended_inquire reply struct.
Fixes probing of aha154x's, and provides wide/ultra bits for the MI scsi code.
1996-12-20 06:20:49 +00:00
thorpej 7770d7c428 Compute the componet number properly so that error reporting is somewhat
meaningful.  Bug noticed by Marshall Midden <m4@nts.umn.edu>.
1996-12-18 19:22:46 +00:00
gwr 1169ecb0a2 Adapt to the new definition of struct zsc_softc
(the zsc_cs[2] members are now POINTERS!)
Also fix warnings...
1996-12-17 20:46:11 +00:00
gwr 494730c376 New version of the z8530 driver that should permit the mac68k port
to use this instead of its own.  Also fix warnings, etc.
1996-12-17 20:42:40 +00:00
scottr c5d19fd124 Make this compile #ifdef DDB:
- Prototype debugging functions
 - Replace %x and %lx with %p as appropriate
1996-12-15 10:02:30 +00:00
mycroft e1a87dc790 Make sure to initialize the memory we just allocated. 1996-12-14 10:50:32 +00:00
mycroft be33336052 If attaching the console, reinitialize it immediately. 1996-12-14 10:46:38 +00:00
mycroft 58e4442168 Turn off the baud rate changing optimization. 1996-12-14 08:56:23 +00:00
gwr aaa60cfea6 Add ZSWR1_IMASK (all intr. enable bits in WR1) 1996-12-13 21:02:39 +00:00
pk 841d1ec634 Comply with recent autoconfiguration changes. Diffs graciously
supplied by Chris Demetriou.
1996-12-10 22:54:46 +00:00
thorpej 55acc3ffb3 Fill in sc_link.max_target 1996-12-10 21:57:17 +00:00
thorpej d502e68402 Fill in sc_link.max_target 1996-12-10 21:27:16 +00:00
thorpej f113ac70dd Add a "max_target" member to struct scsi_link, which is filled in by
host adapter drivers, indicating the highest SCSI target they can
address.  Use this value to dynamically allocate data structures, rather
than hard-coding 8 targets.

These changes allow targets > 7 to be addressed on wide SCSI busses.

Fixes PRs #1674 and #2892.
1996-12-10 21:06:29 +00:00
cgd e9abc8540f remove all traces of __BROKEN_INDIRECT_CONFIG (except in shared drivers) 1996-12-08 00:22:08 +00:00
cgd 74187419b6 The last change fixed a last-minute goof in the __BROKEN_INDIRECT_CONFIG
case, but added a typo (extra parenthesis) in the !__BROKEN_INDIRECT_CONFIG
case.  fix it.
1996-12-08 00:14:03 +00:00
cjs 75d4fb207b Add definition for internal config register. 1996-12-07 16:23:40 +00:00
cjs b1e0c7d657 Print the memory size on startup.
Add newline to `Interface disabled' printf and clean up formatting.
Change packet read/write code to align all reads and writes into
memory to an appropriate boundary for the I/O size. This also fixes
a bug where the trailing unaligned bytes (1-3 of them) would be
put in an additional mbuf even if there was enough space for them
in the one we were currently filling.
This has been tested on a 3c905 in an Alpha (32-bit I/O, alignment
required), a 3c905 in an i386 (32-bit I/O, alignment not required)
and a 3c509 in an i386 (16-bit I/O, alignment not required). It
should be tested on a 3c509 in an Alpha with an ISA bus, if somone
can manage to get the two items together.
There are still some bugs in the driver relating to initialisation;
on my Alpha with a 3c905 you need to do an `ifconfig ep0 down;
ifconfig ep0 up' after the initial ifconfig to make it start working.
Apparently there are also some problems with a 3c579 in an i386,
although a 3c905 in an i386 works just fine.
1996-12-07 08:33:07 +00:00
pk e974072523 Deal with Lance memory size 132KB (sparc `lebuffer' devices use this size). 1996-12-06 21:54:00 +00:00
cgd 243ef518d2 fix a (fatal) bug in the __BROKEN_INDIRECT_CONFIG changes checked
in yesterday.  (got a little bit careless with #ifdef'd variables.)
1996-12-05 22:16:04 +00:00
mikel 179a058e17 fix AUTO_CAL_ENABLE bug, & misc. cleanup. 1996-12-05 07:01:30 +00:00
mikel 94909aee07 return proper output port. Fixes PR kern/2014. 1996-12-05 06:48:47 +00:00
thorpej 3ec2c5af68 Duh, make sure i/o tags and handles are initialized before actually
probing for the LANCE chip.
1996-12-05 02:39:37 +00:00
cgd 8b6a32d1c1 update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:39:27 +00:00
cgd 197d80c63a update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:25:23 +00:00
cgd ea0c7b4423 update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:06:39 +00:00
thorpej 3ae1a191dc Recognize the HP ScanJet 4p, per PR #2663 (Kenneth Stailey). 1996-12-03 01:25:53 +00:00
thorpej 7d4d4753a8 Implement a simple scsi xfer queue to avoid presenting a resource
shortage to the upper scsi layers, which don't (yet) deal well with
resource shortages.
1996-12-02 19:06:41 +00:00
thorpej c164cadf68 Convert to use <machine/bus.h> 1996-12-02 05:44:17 +00:00
leo 91c17fedfa The atari has a pci_machdep.h file. 1996-12-01 21:02:18 +00:00
jtk 15aad8e10b forgot to regenerate these after committing pcidevs for its NetBSD header tag 1996-11-30 15:16:22 +00:00
thorpej 40611b811f Start a mode sense with a clean sense buffer.
Fixes PR #2953, from David M. Stanhope <dms@celtech.com>.
1996-11-29 19:58:40 +00:00
thorpej f3c0cc95a1 Add an inquiry pattern for the HP ScanJet 4p.
From Valtteri Vuorikoski <vuori@notcom.org>, PR #2957.
1996-11-29 19:53:32 +00:00
thorpej f6ffe73a99 Add Yet Another Broken CD-ROM Drive to The List.
From Lennart Augustsson <augustss@cs.chalmers.se>, PR #2971.
1996-11-29 19:51:14 +00:00
jtk ebc2675469 add Cirrus CL-7541, 7543 and ACC 2188; regen .h files 1996-11-28 16:29:59 +00:00
thorpej c645414c6e Regen. 1996-11-28 00:49:48 +00:00
thorpej 5d9878b0be Fill out the Intel section of this a bit, and note the URL of a
periodically updated list of PCI vendor/product codes.
1996-11-28 00:46:35 +00:00
thorpej a4f9e46a87 The MODIFY_IOPORT command does not generate an HACC (command complete)
signal; don't wait for it.

Add a "clarification" cast to the last argument to bha_cmd() in
bha_disable_isacompat().
1996-11-28 00:43:26 +00:00
thorpej 3b4e2a1ac9 In wdattach(), when printing out info about the drive, make the output
look a little more like a SCSI disk's.  This has the pleasant side-effect
of preventing the output from annoyingly extending past 80 columns.
1996-11-27 10:50:39 +00:00
cgd d7c58f547e Drop LPT_NPORTS to 4 from 8. Some lpt units require only 4 I/O ports
(e.g. from 0x3bc to 0x3bf, for example).  Others may require more,
but until there's some special handling for them, 4 should be returned
so that on systems with I/O port accounting, the unit at 0x3bf can be
properly mapped, etc.  (OK'd by mycroft.)
1996-11-23 23:22:50 +00:00
cgd 828f1f3aa1 Provide a routine so that ISA/EISA bridges can set up a callback so
that their child busses can be attached after the PCI bus
autoconfiguration for their parent bus is done.

This works because:
	(1) there can be at most one ISA/EISA bridge per PCI bus, and
	(2) any ISA/EISA bridges must be attached to primary PCI
	    busses (i.e. bus zero).

That boils down to: there can only be one of these outstanding
at a time, it is cleared when configuring PCI bus 0 before any
subdevices have been found, and it is run after all subdevices
of PCI bus 0 have been found.

This (or something like it) is needed because there are some (legacy)
PCI devices which can show up as ISA/EISA devices as well (the prime
example of which are VGA controllers).  If you attach ISA from a
PCI-ISA/EISA bridge, and the bridge is seen before the video board is,
the board can show up as an ISA device, and that can (bogusly)
complicate the PCI device's attach code, or make the PCI device not be
properly attached at all.

This could be done with machine-dependent code, but as more ports
add support for PCI (and PCI-ISA/EISA bridges) more will need it.
The i386 port could (perhaps should) be converted to use it as well.
1996-11-23 21:58:16 +00:00
cgd f1482e61d8 cast pointers to long, not int, and fix the resulting printf format goof. 1996-11-23 21:42:28 +00:00
cgd 452ba6e098 restrict the FSTATE_STAR prohibition (and panic) to the i386 only. Cloning
devices actually do make sense on indirect-config busses, because you
might be able to have more than one of the busses!  In addition, they're
useful because they don't require unit numbers to be wired down, so you
could e.g. have vga* at indirect? and vga* at direct?, and have the first
one found be unit number zero.  Finally, devices which can divine their
own ports numbers, etc., actually should be cloning, even if you know you'll
only have one bus that they can live on.
1996-11-23 21:36:44 +00:00
jonathan f6a82ef733 * 3c509s drop the low-oder bits of EP_THRESH_DISABLE (2047) on a write,
and the result reads back as zero.  Mask probe code accordingly.
1996-11-22 04:48:26 +00:00
chuck ae805c5cbf midway fixes:
1. fix possible hang in en_txlaunch().   when attempting to extend
	the length of an mbuf to avoid a flush we should extend it
	by cnt [which is ((need - len) % 4)] rather than 4 - cnt.
	also, add an EN_DEBUG printf() when we pad/FLUSH a buffer
	to help with debugging/understanding what the driver is up to.
  2. use interface packet counters
  3. when turning off a recv VCI we recompute the new mode.   make sure
	we don't include the "in service" bit in the new mode, otherwise
	a VCI may appear "hung" if you turn it off while a service
	interrupt is pending.
  4. when shutting down a VCI that is still receiving data, don't bother
	going into "drain mode" if only the hardware in service bit is
	set (otherwise the VCI may get "hung" in drain mode).
	as a result of this we may get "unexpected rx interrupt" messages
	which are not really an error, so put this printf in EN_DEBUG.
  5. be sure to zero txspeed[lcv] when enabling a VCI (start at full
	speed).   (hooks for setting txspeed[] are currently not in
	the driver, but we are playing with it locally).
credits:
	#1: Detected by: Zdenek Salvet <salvet@horn.ics.muni.cz>, fix by me.
	#2: Contributed by: Zdenek Salvet <salvet@horn.ics.muni.cz>
	#3,#4,#5: Detected by: Milind M. Buddhikot <milind@dworkin.wustl.edu>,
		fixed by me.
1996-11-21 20:49:22 +00:00
perry a797b925b2 Incorporate updated version of fixes from FreeBSD submitted in PR
2841, plus some fixes to make the patches work on the Alpha. Seems to
improve the NCR driver a lot. We probably should try to incorporate
any updates that have happened since, too.
1996-11-20 21:26:48 +00:00
gwr 16b8098faa Use ether_cmp() on the sun3 (for the "le" driver - 3/50, 3/60)
because those have to assume LANCE_REVC_BUG, which causes the
driver to compare Ethernet addresses on every received frame.
1996-11-19 21:21:13 +00:00
jonathan 16d760f318 Fix for hanging 3com ``large packet'' (100Mbit) Etherlink-III devices:
* Add a slot in the softc, ep_pktlenshift, to indicate that
    a board implements ``large packets'' (FDDI-sized frames) and
    therefore implicitly shifts the argument to packet-length commands
    by two bits to fit a 13-bit length in  an 11-bit command argument field.

 *  Change  the reset of station-mask filterto be independent of bus-type
    (e.g.,. for 3c515)

 * Replace  the "2044" constant used to disable TX threshold interrupts
   on 3c509-generation cards with a #define. Use 2047 instead,
   since that works on the large-packet cards (Vortex, Demon, Boomerang)
   and 2044 doesn't.

 *  Add code to  epconfing to probe for large-packet support,
    set the softc appropriately, and  shift packet sizes in commands
    by ep_pktlenshift to compensate  for the implicit shift.

 *  Tweak the epconfig() code to avoid hanging on startup.
    Set the Tx threshold to interrupt when there's space for
    a maximal-sized ether frame, then  do epinit() then epstop(),
    instead of just the Tx and Rx reset. Required on at least a 3c595.

Tested on  a 3c595, but not on 3c509-generation hardware.
1996-11-17 23:58:29 +00:00
mikel bcc644fd7e Add missing arguments to NIC_GET in debug code. Fixes kern/2875. 1996-11-17 04:11:18 +00:00
jonathan 40bd2b1104 Fix front-ends of split uha driver to compile when DDB is not configured:
Propagate Debugger() macro from uha.c to uha_{eisa,isa}.c.
  update file names accordingly.
1996-11-15 22:53:36 +00:00
cgd 71f1ac1e29 print ptrdiff_t's by casting to long and printing with %l<whatever>.
(This fixes problems with the printf format fixes i checked in yesterday.
ptrdiff_t is an 'int' on the i386 but a 'long' on the alpha, so the cast
really is necessary...  *sigh*)
1996-11-14 20:33:04 +00:00