Commit Graph

1408 Commits

Author SHA1 Message Date
thorpej 92229a04c1 Quiet some diagnostic messages when we might expect them to happen.
PR #6460, Rafal Boni.
1998-12-18 21:50:16 +00:00
bouyer c37bf0ccb4 Keep track of DMA errors, and downgrade the transert mode (UDMA ->DMA,
DMA->PIO) in case of 2 consecutive errors. Don't downgrade if the
PIO/DMA/UDMA modes were forced by a config flag.
1998-12-16 13:02:03 +00:00
bouyer 94f32463dc Add a callback to re-compute the modes used on a channel. 1998-12-16 12:46:47 +00:00
mycroft 95aa0d0b7d Simplify the copy loops a bit. 1998-12-12 16:58:10 +00:00
mycroft 90b7cbc727 Simplify argument to MGET(), to generate better code. 1998-12-12 16:36:24 +00:00
mycroft a6717054a4 Slight simplification to previous. 1998-12-12 16:31:34 +00:00
bad fe3ce4e89a Simplify the code dealing with the mbuf chain in dp8390_get(). 1998-12-11 18:03:55 +00:00
bad ba8bdebedd Change a comment to reflect reality. 1998-12-11 16:01:16 +00:00
tls 2fbbdcc0cb Fix bug that caused all ifp's to have if_xname ntwo0, which was rather inconvenient. Should use config_found on each port instead, but this works for the moment and it's quick. 1998-12-09 23:25:41 +00:00
thorpej 7a9cc5bfbc Update for changed scsipi_xfer struct. 1998-12-09 08:37:50 +00:00
leo 5335909035 BVME410 ethernet driver by 'maximum entropy'. 1998-12-09 07:33:59 +00:00
augustss 1b499d8ce6 Make the OPL information string more informative. 1998-12-08 14:26:56 +00:00
bouyer 997074f17c Add a missing 'return' in an error path; noticed by Matthias Drochner. 1998-12-08 13:29:31 +00:00
mjacob d610e1ad3f Update BA for new max_lun parameter for SCSIbusses. Clearify maximum luns
for FC HB based upon a SCCLUN define (15 for normal- 255 out of a possible
65535 for SCCLUN). Propagate loopid as adapter_target.

Roll minor platform version. Roll core version number.

Update mailbox definitions with cleaner target mode structure definitions.
Clean up some ENDIAN stuff. Correct botched ISP2100_NVRAM_HARDLOOPID offset.
1998-12-05 19:48:23 +00:00
mjacob 74bc9f26d5 Update HBAs to incorporate the new max_lun property. 1998-12-05 19:43:33 +00:00
pk 19f705b094 Cast bus_space_{read,write}_multi arguments. 1998-12-03 23:33:45 +00:00
bouyer 47ab212504 Rename pio_mode, etc ... to PIO_cap, etc ... for consistency with the
ata_drive_datas struct. Suggested by Soren S. Jorvan.
1998-12-03 18:24:30 +00:00
bouyer 71f33dbfa5 UDMA->Ultra-DMA in a printf 1998-12-03 17:30:32 +00:00
bouyer 2b28c858d8 add a udma_mode field to wdc_softc, and use it the same way dma_mode is used
(higthest ultra-dma mode supported). There may be a higther ultra-dma mode
defined ...
1998-12-03 15:38:59 +00:00
bouyer 1d5d5ab40a In struct wdc_xfer, change 'channel' to a pointer to a channel_softc, to avoid
a double-pointer dereference at run-time. Suggested by Matthias Drochner.
1998-12-02 15:53:34 +00:00
bouyer 45675ab14b - change drive_flags from u_int8_t to u_int16_t
- keep the modes supported by the drive in struct ata_drive_datas (will be
  later used for downgrading the DMA/PIO mode on error)
- use config flags to force/disable PIO/DMA/UDMA modes
- For the CMD PCI0643/6 setup DMA mode to DMA Read multiple.
1998-12-02 10:52:24 +00:00
pk adbfb3777a Update previous: we don't have the required information all the time. 1998-11-30 07:54:29 +00:00
pk 0f8cfb66f0 Some more misc. cleanup in the same style as previous. 1998-11-30 07:44:24 +00:00
pk 9860d69b7e Announce negotiation of async mode consistently (Soren Jorvang; PR#6512) 1998-11-30 07:34:06 +00:00
bouyer 5f088e0243 wdcstart(): Re-add support of shared xfer queue across multiple channels
(was lost between 1.44 and 1.45).
1998-11-29 17:34:49 +00:00
thorpej 96da1decd9 Fix media probe on non-MII chips. 1998-11-29 01:40:46 +00:00
thorpej 18e7f69220 Update for new pcmciabus attribute. 1998-11-27 21:59:18 +00:00
augustss 9726cfd1fb Make the copyright header conform to the NetBSD template. 1998-11-25 22:17:06 +00:00
kenh 1f676cda09 Implement the AT_READREG flag. This is needed for the CHECK POWER MODE
ATA command (among others).
1998-11-23 23:02:11 +00:00
wrstuden f0559087e0 Changes to deal with mac serial ports having clock sources on DCD or CTS.
- When doing a first open, don't enable receive & status interupts before
	the MD layer has had a chance to set things up.
- Enable logic to only enable DCD/CTS interupts if we are looking for/
	expecting interupts on those pins. Disable otherwise.
- in zs_param, only pass up the state of ZSRR0_DCD if we have enabled
	interupts on that pin.

Henry Hotz (<hotz@jpl.nasa.gov>) and Greg walsh <gwalsh@artec.com> have
tried these changes to get certain printers from hanging at boot. They
work in a 1.3.2 kernel for Greg.
1998-11-23 22:10:09 +00:00
drochner 3e38051bc5 in wdc_softc: access the per-channel data via a pointer array instead of
an array of fixed-sized channel_softc elements. This way IDE controllers
which more than 1 channel (pciide) can extend the channel data easily
for private needs.
To avoid the double dereference at runtime, change the argument of
wdcstart() to the channel data pointer instead of the array index.
1998-11-21 15:41:41 +00:00
kml ba30effcf8 Changes to support a HIPPI Framing Protocol device, which allows raw
HIPPI packets to be written without having to go through the network
stack.
1998-11-20 04:12:57 +00:00
thorpej 4ba3417429 Implement reference counting for ATA adapters. 1998-11-20 01:22:37 +00:00
kenh 396aa17f77 Sigh, my bad. Check for chp->wdc being NULL before trying to deference it.
(I didn't realize the ISA wdc front-end doesn't fill in chp->wdc).
1998-11-19 22:50:21 +00:00
thorpej 5f0577babc Adapt to the new scsipi_adapter interface. 1998-11-19 21:43:00 +00:00
thorpej afc84158d1 Back out revision 1.40. That change couldn't have POSSIBLY worked, since
when wdcprobe() is called, the wdc_softc pointer in the channel_softc
hasn't even been intialized!
1998-11-19 19:52:42 +00:00
kenh 1461c4fb20 __wdccommand_done() needs to call wdcstart(), otherwise you can run
into deadlocks when using wdc_exec_command().
1998-11-19 04:07:54 +00:00
thorpej 3e086bd63d Add support for detaching "com" instances. 1998-11-18 23:58:52 +00:00
kenh 58932a8415 Quirk out the first test in the beginning of wdcprobe(); the Vaio
CD-ROM drive doesn't like it for some reason.
1998-11-18 19:12:08 +00:00
thorpej 1d0f24882d Now that the *_activate() functions don't do things which are attachment
specific, move them into the chipset drivers.
1998-11-18 18:34:52 +00:00
thorpej dd6750820c Expose the "enable" and "disable" functions so that the front-ends can
access them.
1998-11-17 20:25:00 +00:00
bouyer b64b7c2964 New IDE xfer flag: C_SENSE, set by the ATAPI back-end sense info needs to
be retrieved.
1998-11-17 14:14:52 +00:00
thorpej 0c3ca7b31e Finish implementing interrupt-driven card insertion and removal support.
- Deactivate the card on removal and queue a REMOVAL event for the socket's
event thread to finish the detach.
- Queue an INSERTION event for the socket's event thread on insertion.

Implement a few missing infrastructure pieces to support this.

Hot swapping of PCMCIA cards now "works".  (Not quite; things like network
devices need changes for their respestive subsystems.  These changes are
coming soon...)
1998-11-17 08:49:11 +00:00
thorpej fc44652721 Implement a kernel thread per PCMCIA socket to handle card insertion and
removal events.
1998-11-16 22:41:01 +00:00
thorpej d2afdb5b59 Fix some whitespace lossage, canonicalize some media names. 1998-11-16 19:13:31 +00:00
mycroft 8146c925da If we get a TX interrupt with no packets buffered, ignore it. This can occur
if the chip is reset while transmitting.

XXX
This occurs at boot time because the SIOCADDMULTI always resets the interface
when adding the `all hosts groups' -- usually while the ARP packet is being
transmitted.  All drivers should be fixed to not reset the interface when
changing the multicast filter, if possible.
1998-11-12 13:18:26 +00:00
bouyer 1e71e76d6c - clearify the boot messages (features supported vs features used). Thanks to
Havard Eidnes for his complains about this :)
- fix some typo in comments
- hoppefully better detection of drives reporting bogus PIO modes.
1998-11-11 19:38:27 +00:00
msaitoh 21e1b057bc Sorry, I forgot to revert "#if 0". 1998-11-09 07:01:47 +00:00
veego 2749e8b74a We don't need the pci headers here. 1998-11-08 22:02:25 +00:00
kenh e58cf6b359 Add definitions for the ATA power management commands 1998-11-05 22:49:09 +00:00
msaitoh 37bbf03777 fix pcic_chip_socket_enable() to works on more machines. 1998-11-05 07:55:48 +00:00
fvdl 7b10c3e7e4 Add the 'ex' driver, a DMA driver for 3Com 90x and 90xB cards. Rename
constants from EP_ to ELINK_ since they're now used in the ex driver as well.
1998-11-04 00:29:28 +00:00
thorpej cd7f7eff85 Code common to RealTek 8019 and 8029 NE2000-compatible Ethernet chips.
Includes media selection support and support for Full-duplex.
1998-10-31 00:44:33 +00:00
thorpej fa97a53c11 Multiple inclusion protection. 1998-10-31 00:31:43 +00:00
thorpej 992f2906ba Move the RTL8029 register definitions to <dev/ic/rtl80x9reg.h>, and add
the registers/bits present in the RTL8019 (ISA version).
1998-10-31 00:27:41 +00:00
nisimura 074bc27605 - Add filenames for VDAC/cursor sprite hardware descriptions; bt431reg.h,
bt459reg.h, bt463reg.h and ims332.h as pointed by Klaus Klein.
1998-10-30 00:18:16 +00:00
dante 2cb48d6c4e Add support for macppc.
Very special thanks to Itsumi Tsutsui for his invaluable collaboration.
1998-10-28 20:39:45 +00:00
kleink 026fcd0ce2 RCS Id police, canonicalize multiple-inclusion protection symbol names. 1998-10-28 16:26:01 +00:00
nisimura 675a2afc89 - Brooktree Bt459 135 MHz Monolithic CMOS 256x64 Color Palette RAMDAC.
- Brooktree Bt431 Monolithic CMOS 64x64 Pixel Cursor Generator.
- Inmos IMS G332 Color Video Controller.
1998-10-28 04:10:36 +00:00
thorpej 56066ad5fb Add media list, media list count, and default media arguments to
ne2000_attach().
1998-10-28 00:13:47 +00:00
thorpej 3a9e6f3a29 Define a "page 3", used on some chips which emulate a dp8390, but also
provide extensions.
1998-10-27 23:34:17 +00:00
scottr 3a7a7177cc Update for changes to NCR5380_READ() and NCR5380_WRITE(). 1998-10-26 04:44:04 +00:00
scottr 8ed7c47c7a In order for the SCI_CLR_INTR() and SCI_BUSY() macros to work, we
must actually use the softc pointer provided.  Adjust NCR5380_READ()
and NCR5380_WRITE() appropriately.
1998-10-26 04:42:47 +00:00
scottr d4e6677111 Replace architecture-dependent tag/handle field names with
architecture-independent versions.
1998-10-25 23:48:29 +00:00
christos fab7faf6a4 Fix typo 1998-10-25 18:49:18 +00:00
christos 906db1e920 PR/6274: John Ruschmeyer: Add support for the ncr53c80 driver on the i386. 1998-10-25 17:26:41 +00:00
bouyer 88d1b8138c If WDC_DIAGNOSTIC is defined, check in wdcstart() that we are called at
splbio.
1998-10-21 09:12:46 +00:00
is a2386d4325 fully implement soft callback usage 1998-10-20 22:18:13 +00:00
chuck ce89209d42 when transmitting we cannot totally fill the circular buffer (i.e.
we can't use up all of the remaining sc->txslot[chan].bfree free
bytes) because that would cause the circular buffer read pointer
to become equal to the write pointer, thus signaling 'empty buffer'
to the hardware and stopping the transmitter.  spotted and fixed
by Kenjiro Cho <kjc@csl.sony.co.jp>
1998-10-20 17:53:54 +00:00
bouyer 794fadcf0a Donc reset the disk state to 0 in wd.c, set a flag which will cause it
to be reset to 0 at wdcstart(). This fixes a race condition between
normal I/O and wdioclt().
1998-10-20 17:00:26 +00:00
is 3ebe847640 Stopgap fix for stupid pasto. Fix for the BAHSOFTCOPY case will be provided
after more sleep.
1998-10-19 22:00:14 +00:00
bouyer 96a0812fd8 Kill an extra printf("\n"). 1998-10-15 11:38:04 +00:00
mycroft d2d873481a pcic_wait_ready(): If we didn't get READY, print out the current status. 1998-10-15 04:04:43 +00:00
perry 6413810bf3 Stop spurious lpt messages from being printed -- approved by fvdl. 1998-10-14 20:09:06 +00:00
dante 773dc968ad Remove some debugging printf 1998-10-14 13:28:47 +00:00
dante de1d4ba9b0 Change the way uCode is loaded into board LRAM, to let it work on macppc. 1998-10-13 22:57:26 +00:00
bouyer e8322de657 Add a new drive flag, DRIVE_MODE, set when the drive properly reported its
PIO/DMA modes. Don't try a SET_FEATURE if it didn't report its mode.
1998-10-13 15:18:46 +00:00
bouyer 7545a59b8c In debug message, always print controller:channel:drive 1998-10-13 15:02:41 +00:00
bouyer ff0134b99f Properly separate DEBUF_XFERS and DEBUG_FUNCS: DEBUF_XFERS is for data
transfers (may be called often), where DEBUG_FUNCS is for setup functions
(not used for normal contitions).
1998-10-13 09:33:59 +00:00
bouyer da5d0a6f17 pciide.c: don't define WDCDEBUG, so it compiles on alpha. Correct a bogon
in the printing of DMA mode (piix3/4 only)
others: set the debug_mask to 0, so that debug messages are turned off by
default but can be easily turned on.
Reset drive_flags to 0 for unconfigured devices, so that they are ignored
later. For configured devices, reset state to 0 after probe/attach.
1998-10-13 08:59:45 +00:00
msaitoh 39c8c94fa5 make it compile with GWETHER again. 1998-10-13 08:33:05 +00:00
bouyer 19fddaeeb5 Merge bouyer-ide 1998-10-12 16:09:10 +00:00
thorpej 29d472f53d Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter.  This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 00:28:28 +00:00
dante 423c1d8dd3 Make AdvanSys narrow driver compile on BIG_ENDIAN machines.
Thanks to Izumi Tsutsui
1998-10-06 14:44:21 +00:00
thorpej 11bc54234b In epic_init(), attempt to start output on the interface once the interface
is initialized.
1998-10-05 19:10:22 +00:00
matt d9cb3415b1 Fix typo (pointed by Matthias Drochner). 1998-10-02 20:00:28 +00:00
drochner 1693b8b4a6 minor changes to console handling in zstty_attach():
-wait 20ms between printf() and reconfiguring the hardware
-set cn_tab->cn_dev here because this is the place where the real minor
 number is known
1998-10-01 18:52:42 +00:00
matt bf8783afa4 Fix the receive length so it includes the extra bytes in the fddi_header. 1998-09-28 20:37:12 +00:00
matt 43b462df88 Insert the FDDI control bytes in pdq_ifstart before we load the dmamap
and dmasync the data.  Fix pdq_os_receive_pdu to use PDQ_OS_HDR_OFFSET
instead of PDQ_RX_FC_OFFSET.
1998-09-28 18:01:43 +00:00
matt a1528c368d Fix transmit handling (this also should speed up transmits
slightly).
1998-09-28 17:13:54 +00:00
dante b2a68e14db Change sources to be KNF 1998-09-26 19:53:34 +00:00
dante da0a3e615e Add support for AdvanSys Ultra Wide boards ABP-9xxUW 1998-09-26 16:09:32 +00:00
dante c6ccd1d83f Remove Wide boards references
Adjust copyright

At this time this driver support the following AdvanSys boards:
- ABP-9xx
- ABP-9xxU
- ABP-9xxUA
1998-09-26 16:02:56 +00:00
mark 7d6c07a559 Use the data32iot and data32ioh members of the wdc_attachment_data
structure for 32 bit transfers.
Test for 32 bit capability on data transfers currently restricted to 16 bit
only.
1998-09-22 00:27:51 +00:00
mark 962edcdc03 Add data32iot and data32ioh members to the wdc_attachment_data structure.
This bus space tag and handle is used for 32 bit data transfers i.e.
when WDC_CAPABILITY_DATA32 is enabled as the 32 bit data register may
not be part of the standard drive registers.
1998-09-22 00:21:16 +00:00
pk 0b10e1ddab Parallel port support routines. 1998-09-21 21:26:51 +00:00
matt ad921921e4 Add softserial to the alpha port. This significantly improved PPP
throughput on com ports.
1998-09-21 00:33:16 +00:00
matt 08e1d890a4 Changes so that BPF readers will get the data in fddi packet aligned along
normal boundaries.  This makes tcpdump much happier.
1998-09-20 02:36:08 +00:00
matt 935fbed4fe Make sure data in FDDI packets are aligned nicely (for alpha, etc.) 1998-09-19 21:21:25 +00:00
mjacob 1dac5b5291 Several changes, including some stub fibre target mode stuff. Establish
a slightly different fibre startup (print ALPA now too). Change
the way that return values from dma setup is done. Make debug messages
out of some queue overflow situations. Turn PORT LOGGED OUT into
Selection Timeout equivlaent. On isp_restart actions don't blow off
the commands with HBA_BOTCH (XS_DRIVER_STUFFUP) - set them with HBA_BUSRESET
(which is defined as XS_DRIVER_STUFFUP until someone decides whether
the suggested change to the midlayer NetBSD is worthy of inclusion).
1998-09-17 23:05:46 +00:00
mjacob a0a31568e8 cleanup header to be just NetBSD, roll rev, change QDEPTH to QAVAIL macro 1998-09-17 22:52:54 +00:00
mjacob 0e0010df41 cleanup header to be just NetBSD 1998-09-17 22:52:14 +00:00
mjacob cb787c768d add some target mode definitions 1998-09-17 22:51:54 +00:00
mjacob 24717f3c3a cleanup header to be just NetBSD 1998-09-17 22:50:53 +00:00
is 95807e512a Garbage collect unused 3rd parameter to comprobe1(). 1998-09-16 21:30:58 +00:00
scottr 7aa4d4483e Revert the last change: returning COMPLETE is clearly the wrong thing to do
if we weren't polling to begin with.
1998-09-16 05:36:35 +00:00
scottr 0af57c2461 Correct a serious problem that affects at least front ends that can only
use PIO (or equivalent) code to do asynchronous transfers:  In
ncr5380_scsi_cmd(), test to see if the request has been completed after
the call to ncr5380_sched(), and return COMPLETE if so.  This avoids
going into an infinite loop in scsipi_execute_xs() while waiting for an
interrupt to trigger completion of the transfer... which, of course,
never happens, since it's already done.
1998-09-14 05:56:14 +00:00
mycroft 32f42fe1e9 Make sure all voices are deallocated on close. 1998-09-13 04:41:34 +00:00
jonathan ea4898c76c Add arc as a target platform. 1998-09-11 19:39:28 +00:00
kenh 9539399333 Add support for passing device quirks from the attachment routine,
and add support for a NO_EXTRA_RESETS quirk (required by the TEAC
IDE Card/II, which the Vaio uses).
1998-09-10 19:24:45 +00:00
mjacob 4a1ccd2fe7 turn into a debug message an ABOUT F/W failure. Add ISPCTL_UPDATE_PARAMS isp_control case 1998-09-10 17:10:27 +00:00
thorpej 9ce5ae6b97 Protect Debugger() call a'la uha driver. PR #6070, Gary D. Duzan. 1998-09-09 05:28:58 +00:00
thorpej d1fba4e7e5 Don't use M_WAITOK to allocate the ring buffer; we could be in interrupt
context.  Reported by Lennart Augustsson.
1998-09-09 05:17:53 +00:00
mjacob a79310ba38 Major reworking of initialization code, addition of NVRAM reading, usage
of device speed updating, etc... A lot of FC and other case statement
handling. Whew. Too much to really detail here.
1998-09-08 07:28:50 +00:00
mjacob 6e2341ae63 Roll major revision. Change some definitions around. Add more current device
state stuff. Make DPARM flags full 16 bits (no shifting needed) and add
the 2 new ones for the 7.55 f/w.
1998-09-08 07:27:04 +00:00
mjacob 542648bf0e Move all ASYNC definitions here (after all, they're mailbox registers).
Clarify FC initialization control block. Add macros for setting WWN
into same. Add a wad more definitions in this area.
1998-09-08 07:24:23 +00:00
mjacob 170521610e Add more ASYNC event codes here. Add NVRAM definitions. 1998-09-08 07:22:06 +00:00
mjacob c0eabb441f add case for going from probetime to runtime speeds 1998-09-08 07:19:58 +00:00
mjacob 9752520872 roll revision, change default tagging to simple tags 1998-09-08 07:18:56 +00:00
pk b871ab5f2c Use the new "%b" format for the various control register bits. 1998-09-06 21:39:33 +00:00
christos 344ed1eaef Assign copyright to TNF. 1998-09-05 14:20:01 +00:00
mark ba8c6b9828 arm32 now supports soft serial interrupts. 1998-09-05 04:25:35 +00:00
is a3ee69c87a Split SMC chipset ARCnet driver into
- machine independent chip driver, in dev/ic/smc90cx6.c/...reg.h,...var.h,
  using bus_space methods
- ZBUS frontend in arch/amiga/dev/if_bah_zbus.c
- added IPL_SOFTNET to arch/amiga/include/intr.h, for this
Implementing the ISA bus frontend is left as an exercise to the reader.
1998-09-02 22:32:06 +00:00
pk 380e88d4f0 Adjust some comments. 1998-09-01 22:56:00 +00:00
jeremy 6693724a83 Changed inaccurate comment on the sc_freq member of the driver's softc
structure.  The frequency is represented in MHz rather than Hz. [PR/6805]
1998-09-01 22:22:03 +00:00
pk fec2fa9e43 Typo in device Id mask. 1998-09-01 21:04:43 +00:00
cgd d58173741d kill the last remnants of __BROKEN_INDIRECT_CONFIG. (only the pica port
used it, and it's non-working and apparently slated for replacement.)
1998-08-31 22:28:04 +00:00
pk 860867bfec macro argument protection. 1998-08-31 11:13:10 +00:00
pk 73b946e04e LSI64854 DMA engine driver.
Currently used by Lance Ethernet and NCR SCSI front-ends on sparc/sparc64.
1998-08-29 21:42:03 +00:00
dante 17759893b0 Add rcs id 1998-08-29 13:44:49 +00:00
thorpej 370a38c007 Add braces to make egcs happy. 1998-08-28 20:03:10 +00:00
thorpej f3bfb08d45 When determining the default media on the Vortex/Boomerang, don't pick
the full-duplex variant.  XXX We should check the EEPROM for "default to
full-duplex".
1998-08-28 18:16:02 +00:00
pk b1447741da Nuke Dprintf; fix formats. 1998-08-28 08:59:14 +00:00
pk dd0709d28d Add selected `%b' bits. 1998-08-27 20:05:11 +00:00
pk 142bff0170 Add missing entries and make it slightly more verbose. 1998-08-27 19:53:02 +00:00
pk b3279eb3dc Move a few prototypes.
Whitespace cleanup.
1998-08-27 18:45:12 +00:00
pk fc397afa14 debug level 0 1998-08-26 15:06:37 +00:00
dante d9e417cde9 Add AdvanSys 930U and 940U SCSI controllers 1998-08-26 14:13:58 +00:00
augustss 6633896a67 Do some renaming of registers and make sure we get sound in both
channels on OPL3.
1998-08-26 13:08:10 +00:00
augustss bb3c56652c Make the OPL driver turn on the sound on sound cards that require it.
That makes it much more likely that we get any sound.  DUH!
1998-08-26 12:10:22 +00:00
thorpej bc21c243cd For non-MII Vortex/Boomerang, set full-duplex in the MAC CONTROL register
in epsetmedia() if full-duplex is selected (new feature on these cards!)

On MII Boomerangs, set the full-duplex bit in MAC CONTROL in the statchg
callback from the MII layer.  Should fix full-duplex on these cards.
1998-08-26 01:32:41 +00:00
thorpej 19b759c2e4 Define the full-duplex bit in the W3 MAC CONTROL register. 1998-08-26 01:29:03 +00:00
pk d4ec33b5f0 The new MI part of the AD1848 driver. 1998-08-25 22:36:40 +00:00
tv 54bf4389f9 egcs brace warning 1998-08-24 02:34:44 +00:00
augustss f2ff59edc5 Change debug output. 1998-08-22 22:54:11 +00:00
pk 177621555f remove sparc hack: there's a bus.h now. 1998-08-20 11:42:55 +00:00
pk 1f007a13cc Cast bus_size_t to u_long in printf() args. 1998-08-20 11:42:13 +00:00
thorpej b43fc64da6 Registers for the Brooktree Bt463 RAMDAC. 1998-08-18 07:43:09 +00:00
thorpej 6bfd748b46 First-crack at RoadRunner (3c574-TX 10/100Mbps PCMCIA). Doens't yet use
any of the RoadRunner speed hacks.
1998-08-17 23:20:39 +00:00
augustss cd09067eb4 * Redo the way the way the MIDI driver attaches to audio devices.
* Improve the midisyn layer a little.
* Add a driver for the Yamaha OPL[23] FM synths.
  The opl driver is not finished yet; it sounds pretty awful.

For some strange reason I cannot get any FM sound from my SB64 cards,
but a regular SB16 works fine.
1998-08-17 21:16:09 +00:00
mycroft a1ac68819f Assign my copyrights to TNF. 1998-08-17 00:26:32 +00:00
matt 2a5371253c splnet() is not appropriate for everyone. Raise and lower SPL via
macros defined in pdqvar.h
1998-08-16 03:44:42 +00:00
thorpej cbcc3cfa46 Oops, back out something that I didn't intend to commit. 1998-08-16 01:16:57 +00:00
mycroft d07b3639a4 Assign my copyrights to TNF. 1998-08-15 17:47:15 +00:00
thorpej c2f2b0d431 RoadRunner has a bit in Reset Options that must be set to enable the MII.
Define that bit.
1998-08-15 16:50:07 +00:00
thorpej a0aca43d11 Reset Options is in Window 3; correct a comment. 1998-08-15 16:47:30 +00:00
thorpej 479d8b25bf The 3c515 (Corkscrew) and 3c574 (RoadRunner) have their Window 1 registers
offset!  Define an inline function to compute the Window 1 register offset
and use it.
1998-08-15 16:20:51 +00:00
thorpej 31a3d86b80 Define the Corkscrew chipset - used by the 3c515 ISA 10/100mbps cards. 1998-08-15 16:15:40 +00:00
mycroft 62b1bf3e2e Assign my copyrights to TNF. 1998-08-15 10:51:16 +00:00
mycroft 6dc903202f Assign my copyrights to TNF. 1998-08-15 10:10:47 +00:00
thorpej 7d0d0346fa Define the RoadRunner FIFO count registers. 1998-08-15 08:28:22 +00:00
thorpej ccf620bfab Define the 3Com "RoadRunner" chipset; like the Boomerang, but for PCMCIA.
No DMA is wired up, it has a shared memory interface, and a FIFO buffer
which can be used to speed up PIO transfers.  (The latter two are
PCMCIA-specific speed hacks to deal hide the performance lossage from
using a PCMCIA->PCI bridge internally.)
1998-08-15 07:28:04 +00:00
mycroft cc8a78e783 Assign my copyrights to TNF. 1998-08-15 04:42:42 +00:00
mycroft b2827b9d36 Assign copyright to TNF. 1998-08-15 04:16:55 +00:00
mycroft 6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02:31 +00:00
drochner cea8e0a23f explicitely select the master before trying to access its registers 1998-08-14 20:39:04 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
thorpej b170caf730 Completely rewrite media selection. Add support for the MII/PHY on
the 3Com 3c905-TX and 3c905-T4.  Fix handling of the MII on the
3c595-MII and 3c597-MII (can't talk to the PHYs on these cards; just
use "manual" for the external MII port).

Fixes kern/4782 (Chris Demetriou).
1998-08-12 18:51:52 +00:00
scottr 53907fe5a1 Support Cabletron Ethernet card, from John Marohn in PR 5762. 1998-08-12 07:19:09 +00:00
thorpej 7b8168e675 Adapt to new MII code. 1998-08-11 00:12:52 +00:00
wrstuden b1bb9aa490 Oops. We do still need to set t_dev in the first open part of zsopen,
so we get ttyXX vs cuaXX right. Leave the initialization in attach.
1998-08-09 18:36:45 +00:00
wrstuden 26e55969e4 Initialize the struct tty's t_dev field at attach rather than first open.
The attach routine calls zsparam if we're setting up the console, and
zsparam needs this field to tell which zstty to set up. Otherwise, we
set up zstty0 even if it's not the console!
1998-08-09 06:17:07 +00:00
mycroft e2686d0a1b Use splnet, not splimp. 1998-08-08 23:51:39 +00:00
wrstuden 06761b1ed4 Merge in a register definition mentioned only in passing in one place in
the Zilog docs.
1998-07-31 05:08:38 +00:00
is 0d257affa0 Add some constants. 1998-07-28 16:03:49 +00:00
augustss daed8d7ce1 Fix obsolete code in waiting for calibration on the ad1848.
(Sigh, the ad1848 driver should be rewritten.)
1998-07-28 12:13:34 +00:00
explorer c5e450957a add (hopefully) bus-independent hd64570 driver, for the Hitachi serial
controller chip.
1998-07-26 03:26:57 +00:00
drochner 3d545acb51 Overload the generic "copyrows" function by a private one which implents
a "fast scroll" by setting the display start in memory.
(Only implemented for "scroll up" because this is more used. "scroll down"
is easy to add.)
This moves the semantics of "copyrows" to something like "moverows";
the contents of the new visible lines at the bottom is undefined.
The emulations can live without the original "copy" semantics.
1998-07-24 16:20:14 +00:00
drochner 7764b57db5 allow the displayed area to start anywhere in display memory,
add a "dispoffset" variable to control this
1998-07-24 16:12:18 +00:00
drochner e81ad8e2c6 add random generator hook 1998-07-24 13:42:29 +00:00
drochner 6dc9297499 remove unneeded typecast 1998-07-24 13:41:52 +00:00
thorpej 458ba64f3a Slight variation on last; be a bit more zealous about fixing up the
clock source.  Now, when my EtherPower II locks up, it eventually recovers!

(Geez, I'd like to know why it does this, and only apparently in 10mb/s mode).
1998-07-23 17:37:38 +00:00
drochner 9a59784f70 Split the LANCE driver into a part specific to the classic chip with
24-bit DMA addresses, and an independant part.
Implement support for the 32-bit mode in the newer (79c9xx) chips.
1998-07-21 17:26:45 +00:00
thorpej 9e17315847 Write the CLOCK TEST bit *at least 16 consecutive times* during initialization,
as the clock source will be set incorrectly otherwise!  From SMC Application
Note 7-15.  Thanks to Christoph Badura for the pointer!
1998-07-20 21:39:05 +00:00
thorpej 79f77cc9ce The mystery bit in the TEST register is actually the CLOCK TEST bit. 1998-07-20 20:45:06 +00:00
is 6054d626f9 Switching dev/ic/lpt.c to use spllpt() instead of spltty(). It doesn't use
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.

On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).
1998-07-18 21:27:25 +00:00
mjacob a455ce7531 Locking is now in the outer framework for isp_init/isp_reset- this allows
us to call isp_reset/isp_init internally with impunity.

Rename isp_phoenix to isp_restart and make it global. Clean it up a tad.

If we get an ASYNC_SYSTEM_ERROR code in isp_intr, call isp_restart and
return- the f/w is toasted at this point (usually), so we have to bring
things back to a known state.

In isp_mboxcmd, when we don't see the HOST_INT bit go clear, try and
find out if the isp is trying to tell us something and try again. This
may avoid a potential deadlock where the previous mailbox command hasn't
been cleared by the ISP.

In isp_init don't try and get device parameters if we already have them-
this typically doesn't work if we're in the middle of an isp_restart.
1998-07-18 21:10:16 +00:00
mjacob 9afa921bc1 roll core version number and add a global visible isp_restart function 1998-07-18 21:06:20 +00:00
mjacob 35c8fecf3a fix headers 1998-07-18 21:05:39 +00:00
mjacob b85bf24ed5 fix bogus comments 1998-07-18 21:05:04 +00:00
mjacob 576988940f roll revision 1998-07-18 21:04:46 +00:00
mjacob e8f976016e Some major thrashing to handle building for other than NetBSD.
There is one change of note- build a list of completing commands in
ispintr and then say you're done- this avoids some re-entrancy issues
that had surfaced.
1998-07-15 19:50:16 +00:00
mjacob d96bd50c07 NetBSD OS specific routines and definitions. 1998-07-15 19:44:04 +00:00
drochner 2ba4227a6e from OpenBSD:
date: 1998/06/24 20:05:03;  author: deraadt;  state: Exp;  lines: +4 -4
initialization error; joel@wmi.com

(affects debug printout only)
1998-07-07 14:13:51 +00:00
thorpej 88139fff5a Never, ever, ever, ever include "assym.h" in C source file. 1998-07-07 02:02:53 +00:00
jonathan 011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan fe484937cf defopt LLC 1998-07-05 03:14:41 +00:00
jonathan 8db0fcdbf7 defopt CCITT. 1998-07-05 02:12:22 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
mjacob 205c293676 Patches from Justin that handle some REV B AIC7880 problems 1998-07-03 23:45:10 +00:00
hpeyerl 7931fb2172 Fix spalling misteak: indentify -> identify 1998-06-30 00:08:32 +00:00
drochner 3f10af182d do the charcter mapping in a separate function 1998-06-26 21:05:20 +00:00
drochner 88e3d10d30 mapping tables for IBM character set 1998-06-26 21:00:27 +00:00
jonathan dbe5213b11 Split arch/sparc/dev/amd7930.c into:
* MI sys/dev/ic/{am7930.c,am7930var.h} chipset driver
  * sparc frontend.
Presere revision history (this time).

TODO: bus.h'ify,  and padded register mappings.
1998-06-24 11:09:23 +00:00
jonathan b40ead2c73 Split sparc am7930 driver into sparc attach and "MI" sys/dev/ic/am7930
chipset driver.  Needs bus'ifying and  register-access.
1998-06-24 10:52:53 +00:00
sommerfe d64d1a0381 defopt a bunch of AHC specific options 1998-06-22 20:02:54 +00:00
christos 3127da532a Add register definitions for the ns8477 floppy controller. This is a superset
of the nec765.
1998-06-21 18:48:12 +00:00
drochner bf42a9e321 adapt to wscons changes, treat incoming characters always as ISO
(ie, convert to IBM)
1998-06-20 21:55:05 +00:00
drochner 0fb233923b do the former at one more place 1998-06-17 20:48:02 +00:00
drochner 39452d9720 avoid sign extension if a character >=128 is passed 1998-06-17 20:44:16 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
drochner 96840772f5 reserve the VGA BIOS area (but don't worry if it fails) 1998-06-12 18:41:01 +00:00
thorpej ab7bc85ff7 Pull in <sys/timepps.h> here so that other things that include comvar.h
will compile.
1998-06-11 02:01:58 +00:00
jonathan bbc2d1522a PPS support from April, reworked and extended to match the PPS-API
Internet Draft (draft-mogul-pps-api-02.txt).
1998-06-10 12:06:23 +00:00
bouyer de7be831ac Make this compile with the recent ISA DMA changes. 1998-06-10 10:24:13 +00:00
thorpej 4ad627c09b Do the unaligned buffer fixup without copying data, more-or-less lifted
from the Shark CS8900 driver.
1998-06-10 01:15:50 +00:00
thorpej be62e9cb1b Nuke __BROKEN_INDIRECT_CONFIG. 1998-06-09 07:35:06 +00:00
thorpej e41f7ca1b8 Make this build w/ EGCS. 1998-06-08 07:11:51 +00:00
thorpej e12c6ddaf2 No need for an explicitly-sized type for sc_flags. 1998-06-08 07:06:41 +00:00
fair b91a2393c1 the AM7990 is a controller, not a "card"; repair a misleading diagnostic. 1998-06-07 08:08:20 +00:00
pk 573196b6ba Check for the ether broadcast address in promiscuous mode (PR#5527). 1998-06-04 20:35:44 +00:00
enami 770c4bfb9d Make this compile with WDDEBUG 1998-06-04 02:27:33 +00:00
thorpej 5852faaf84 Device driver for the SMC 83c170 Ethernet PCI Integrated Controller (EPIC/100)
used in the SMC EtherPower II.

Media control isn't yet supported, due to some MII infrastructure
problems which I hope to address soon.  This isn't a huge deal, since
the PHY defaults to auto-negotiate mode.

Also, the device just programs the multicast hash table to accept all
multicast, to avoid a hardware bug that causes the multicast address
filter to lose in 10Mb/s mode.  This bug will be fixed in a more sane
way once the media control issues are dealt with.
1998-06-02 01:29:41 +00:00
drochner b84dbbb37c Put definitions and subroutines needed for all PC display adapters
(MGA/GCA and compatibles) into global headers / source files.
Let the VGA driver use them.
1998-05-28 16:48:40 +00:00
matt 769e4e6e81 Another bug fix (clear transmit done before trying to queue more transmits). 1998-05-28 03:07:49 +00:00
matt dd77920e3e Only enable transmit done interrupts when output ring is full. 1998-05-27 14:01:02 +00:00
matt 5fb5017c94 Fix syncing of consumer block. 1998-05-27 01:17:53 +00:00
thorpej 5442fd5420 If we have an NCR53CF9x (indicated by the front-end by setting a flag
in the softc's new "features" word), set FSCSI bit in CFG3 if the sync
period is <= 200ns, or clear it otherwise.
1998-05-26 23:17:34 +00:00
matt 1f8a0caf0a Success! With these changes, the DEFTA now under NetBSD/pmax!! 1998-05-26 15:33:16 +00:00
matt 2d80e4786e Verify the driver work if PDQ_NO_BUS_DMA is defined. 1998-05-25 21:24:21 +00:00
matt 05f603434f More pmax coherency stuff. Getting close.. 1998-05-24 22:37:23 +00:00
matt 144c41e986 Fix dmamap leakages. fix transmit bug. fix receive bugs. fix mips
coherency problems.
1998-05-24 21:40:05 +00:00
matt 18319c0048 Changes so that these compile on NetBSD/alpha as well as NetBSD/i386. 1998-05-23 18:32:29 +00:00
matt 9eb77bf49a Change 21040 modes slightly. Prevent infinite autosense loop of 21143 that
is not connected.  Make TULIP_STS_LINFAIL only valid for chips with that
status bit defined.
1998-05-22 18:50:59 +00:00
matt cfbb5f3f21 Add bus_dma(9) support for the DEFxA FDDI driver 1998-05-21 20:44:02 +00:00
augustss 74545baf39 Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.
1998-05-20 16:19:41 +00:00
pk 11c8871c83 Erase spurious end-of-comment. 1998-05-20 16:06:56 +00:00
pk 9299239520 Cirrus Logic CD1190 parallel port chip definitions; from Iain Hibbert. 1998-05-20 14:47:36 +00:00
pk 9c1918e458 Add CD1400_PAR_FIFO_SIZE. 1998-05-20 00:03:11 +00:00
kml 051be14326 Correct copyright date. 1998-05-17 16:46:06 +00:00
drochner 7bd61ed6be needed for VGA text attributes 1998-05-14 23:11:03 +00:00
drochner 95bdb660ed Simple screen attribute handling for wscons.
The graphics device driver passes a "default attribute" for normal text
output to the wscons framework. If the emulation module needs more
attributes (for different "renditions") it can allocate them via a
callback.
For now, only the "sun" emulation makes use of it.
1998-05-14 20:49:55 +00:00
matt 1442b419df Fix alignment crashes on Alphas... 1998-05-14 18:24:00 +00:00
kml e72782a137 Driver for Essential Communications' RoadRunner HIPPI (800 Mb/sec network)
card.  With some modification, this could probably also work for their
Gigabit Ethernet card based on the same chipset...
1998-05-14 00:04:57 +00:00
kleink d2db996158 Fix some arithmetics lossage on typeless pointers. 1998-05-07 21:13:23 +00:00
mjacob 128cb933b4 there is an (unimportant) difference between 1020 && 1020A 1998-05-05 22:10:36 +00:00
enami 2eb37a4e87 When changing power, wait enough to keep timing constraint
described in PCMCIA specification.
1998-05-05 00:37:24 +00:00
pk 6ba2c64ae6 Eliminate the degenerate loop in `ncr53c9x_intr()'. Retain the delay heuristic
it implemented under the label `shortcut:' and only use it in these
cases: (1) after successful re-relection, (2) after receiving command-complete
status, and (3) during message-in handshake.
1998-05-04 14:47:48 +00:00
pk 0d3d41fa21 Allocate SCSI message buffers in ncr53c9x_attach(), with a provision
for front-ends to override the allocation to avoid alignment
handling in their DMA engines. Note that that ncr53c9x_msgout()
can request a 1 byte DMA transfer that would be difficult to break up.
1998-05-04 11:11:24 +00:00
thorpej 53d3aa940b Sync with recent change made to bha.c by mjacob:
Cute buglet: you can end up with zero CCBs if there were no targets
seen by the adapter. Always leave a minimum so the adapter can
finish attaching- it may be there w/o targets for a reason.
1998-04-29 01:02:44 +00:00
mjacob 1acc8b53b5 Cute buglet: you can end up with zero CCBs if there were no targets
seen by the adapter. Always leave a minimum so the adapter can
finish attaching- it may be there w/o targets for a reason.
1998-04-28 23:57:53 +00:00
thorpej 41d55197b4 In wdcintr(), add a catch-all case so that this will compile if no
children are configured.
1998-04-28 18:36:07 +00:00
mycroft 0b2694152f Update copyright. 1998-04-26 06:03:23 +00:00
mycroft eddaea2d53 In LBA mode, always use the `total capacity' count, rather than calculating
the capacity based on the c/h/s numbers.  In fact, don't use the c/h/s
numbers for much of anything.
For ATA-4 drives or later, always use LBA mode, since it's now required.

Collectively, this allows >8GB disks (like the 12GB Bigfoot) to work.
1998-04-26 05:28:23 +00:00
bouyer 68096acabd From Robert V. Baron:
Compute the disk block addr at command queing time rather than exec time.
This fix a bug which could lead to data corruption on disk: when a command
was reexecuted after an error condition (from wdcunwedge), the partition
offset was re-added to the block addr, leading to a transfert at the wrong
disk block.
This should fix the problem reported by some laptop's users, where the
first disk read after a suspend/resume returned garbage.
1998-04-23 13:30:39 +00:00
bouyer 7ba46a56e0 Correct defifintion of the WDCE_MCR and WDCE_ABRT bits: they have been
inverted since the begining.
This doesn't change anything, as these bits are not used in the driver.
1998-04-23 10:37:01 +00:00
augustss 9663e5f689 Make probe message more consistent with usual practice.
From "Soren S. Jorvang" <soren@t.dk>.
1998-04-20 20:58:05 +00:00
leo 112b5de402 Use a stream method for AHC_OUTSL when possible. 1998-04-16 07:13:57 +00:00
leo d3febbb5aa Do endian swaps where appropriate. This is currently dependent on 'BYTE_ORDER'
since the driver only supports little endian busses.
1998-04-16 07:12:43 +00:00
drochner eda73f204f The "mi" TGA driver. It's still not of much use on anything but alpha
because it depends on initialization by the firmware.
Further, an mi mmap() is needed...
1998-04-15 20:16:30 +00:00
leo fe60e74148 Add hooks to make exclusive hardware locking possible. This is necessary
to make the driver suitable for the atari falcon.
1998-04-07 19:51:57 +00:00
drochner 0391896c27 Avoid namespace pollution. 1998-04-07 16:35:42 +00:00
matt b80f703f77 Fix problem with promicuously received packets. (ie. give them to bpf
but not fddi_input).
1998-04-07 13:32:06 +00:00
pk be4108fec1 Replace direct `sparc_bus_map()' calls with bus space map method. 1998-03-30 14:21:38 +00:00
hannken b70a7e1752 Didn't compile: add variable `bit' removed by mycroft. 1998-03-30 10:35:03 +00:00
mycroft d4da63c6c3 Eliminate cs_heldchar. It is not necessary in my version of the driver. 1998-03-30 02:41:21 +00:00
mycroft 8f597a8744 Oops; make the table const. 1998-03-29 22:36:42 +00:00
mycroft a6b8b01d96 Use a 4-bit table to speed up the CRC even further, without increasing the
code size too much.
1998-03-29 22:34:27 +00:00
mycroft fe7f32954b Optimize the address CRC routines a bit. 1998-03-29 22:08:03 +00:00
cgd 9264961c87 add a short delay (5ms) after ATAPI software reset is done, suggested by
Soren S. Jorvang <soren@t.dk>.  Apparently some devices Really Want this.
1998-03-27 19:32:15 +00:00
mjacob 57ca254137 some minor debug printout changes 1998-03-24 23:37:53 +00:00
msaitoh 47d94e4676 fix typo 1998-03-23 16:57:21 +00:00
mjacob fc27ffd92c update some debugging stuff- also turn off possible ULTRA mode for 1020s 1998-03-22 22:02:29 +00:00
mycroft ff0635ab25 Fix error in previous change. 1998-03-22 19:36:52 +00:00
drochner 3a43fe7109 initial import of VGA driver backend for use with the new wscons code 1998-03-22 15:11:49 +00:00
enami 2b5f7351d2 Split Fujitsu MB9696x based ethernet card driver into bus
dependent/independent code and bus.h'fied.
1998-03-22 04:25:36 +00:00
mycroft f6dba67570 Read up to 32 bytes. The ESCC *needs* 8, and it doesn't hurt to leave some
slop in case there are clone chips with a deeper FIFO.
1998-03-22 02:36:02 +00:00
mycroft 2bb5067e13 Move the code to wait for carrier on a tty into a common function, since it
depends only on device-independent state bits.
Implement SunOS-style `dialout' devices.
1998-03-22 00:55:37 +00:00
mjacob 019508faee Well, I don't have a Cyclades board, but I needed the alpha kernels
to compile. I made the changes that seemed to make sense tracking the
shift from TS_WOPEN  to tp->t_wopen- but they may be wrong. I wasn't
subscribed to tech-kern so I missed the discussion, and C. Hannum
was not particularly enlightening. Sorry if this isn't quite right.
1998-03-21 23:26:15 +00:00
pk 69fe6f242f Account for changed bus attachment scheme. 1998-03-21 20:11:30 +00:00
mycroft 834a8ac07a Fix pasto. 1998-03-21 04:31:10 +00:00
mycroft fd620ebb32 Replace TS_WOPEN with t_wopen, per mail on tech-kern. 1998-03-21 04:29:29 +00:00
mycroft 16566cda09 Remove a bogus initializer. 1998-03-21 04:27:58 +00:00
mycroft 2ada4b4af1 Replace TS_WOPEN with t_wopen, per mail on tech-kern. 1998-03-21 04:02:47 +00:00
leo d2551d5b3f Use bus-dma functions. 1998-03-16 15:36:17 +00:00
wrstuden 6dcfc62169 KNF last change 1998-03-05 22:56:18 +00:00
wrstuden 84c6b9dbd7 Make zs_iflush not loop indefinitly. Some Mac PowerBooks lie about having
two SCC channels, and can get stuck in an infinite loop. This change
stops after flushing 4 bytes. Might need upping to 8 bytes if we support
85230 ESCC's.

Idea bounced off of scottr & gwr
1998-03-05 22:03:34 +00:00
augustss 713692a2b5 For the Rx:Tx split message change "(undefined)" to "3:5". 1998-03-04 18:10:03 +00:00
pk 5bc7459ebd Remove `NEW_I82586' 1998-02-28 01:14:57 +00:00
pk 472a1973af Remove `_NEW_I82586' tag; all drivers using this file have been converted. 1998-02-28 01:07:45 +00:00
mycroft 64812254d6 Remove some duplicate definitions. 1998-02-27 13:17:25 +00:00
ross 081231b1ad Add dummy }} after comsoft() to keep ctags(1) bashing on. 1998-02-25 08:32:35 +00:00
enami e12f85fbc1 Disable the device if we fail to open and nobody else has the device open.
(Thanks Charles and Marc for your advices).
1998-02-22 05:09:58 +00:00
mycroft 11b3fea04a Fix bonehead error in previous change. 1998-02-22 03:24:58 +00:00
mycroft 6ad2876b5a Similar changes to com driver:
Arrange to call com_break() and com_modem() at splserial().
It's simpler this way.  Really.
1998-02-19 21:26:10 +00:00
mycroft 84a72d6ff4 Remove stray label from last change. 1998-02-19 09:33:33 +00:00
mycroft 06ec9f646f Arrange to call com_break() and com_modem() at splserial().
It's simpler this way.  Really.
1998-02-19 09:23:38 +00:00
thorpej 4399060ec9 - Perform all necessary bus_dmamap_sync() operations.
- Greatly simplify allocation and DMA mapping of the mailbox and ccbs.
- Be more robust against resource shortage errors, and report errors better.
1998-02-17 03:02:30 +00:00
thorpej 018aa6e97e Don't include <dev/scsipi/scsipi_conf.h> twice. 1998-02-13 21:58:40 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
thorpej eda74e6121 - Perform all necessary bus_dmamap_sync() operations.
- Greatly simplify allocation and DMA mapping of the mailbox and ccbs.
- Be more robust against resource shortage errors, and report errors better.
1998-02-09 10:53:07 +00:00
thorpej 5fe6759646 Fix serial console support, which was broken by the previous revision:
- In the console getc routine, block until a character becomes ready
  (no, really, we mean it).  This routine should _never_ time out.
- In the console putc routine, if the UART has trouble, do NOT proceed
  to print a diagnostic message, which would recursively invoke the
  console putc routine ad nauseum.
1998-02-09 10:22:45 +00:00
thorpej e08a44b196 - Perform all necessary bus_dmamap_sync() operations.
- Greatly simplify allocation and DMA mapping of the mailbox and ccbs.
- Be more robust against resource shortage errors, and report errors better.
1998-02-06 23:06:44 +00:00
enami 9d13bc6e0e Restore system priority level before return from comopen(). 1998-02-06 03:25:34 +00:00
mrg 1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
sakamoto a2b24d5571 Change "__BUS_SPACE_NEED_STREAM_METHODS" to "__BUS_SPACE_HAS_STREAM_METHODS". 1998-02-04 14:13:40 +00:00
thorpej 8abe76d2f0 Add offset and length parameters to bus_dmamap_sync(), used for specifiying
partial syncs of a DMA mapping.
1998-02-04 05:12:46 +00:00
thorpej a7c5c1ef3c Add dm_mapsize to bus_dmamap_t and rename BUS_DMAMEM_NOSYNC to
BUS_DMA_COHERENT.
1998-02-04 00:32:55 +00:00
sakamoto 7052e9949b Change the data access busification functions to
the "stream" busification functions.
In the architecture as the BeBox(CPU is big endian, have ISA bus),
These methods would be used where "raw" data needs to {read,write,set}
unchanged.

Add #ifndef __BUS_SPACE_NEED_STREAM_METHODS (define that on NetBSD/bebox),
if not define __BUS_SPACE_NEED_STREAM_METHODS,
define "stream" busification functions to normal busification functions.
1998-02-03 04:26:45 +00:00
cgd 9bffcfef75 change #ifdefs keying on "alpha" to key on "__NO_SOFT_SERIAL_INTERRUPT"
instead, and define that on NetBSD/alpha and NetBSD/arm32.
1998-02-02 23:01:02 +00:00
cgd c2f42b2213 Implement a flag to indicate that the driver attached correctly.
This is useful in the case where an attachment's probe routine
verifies that there is indeed hardware present but something goes
"wrong" in the attach causing the device to be unusable.  (Without
keeping track of this, in that case incorrect ports could be
accessed or uninitted pointers could be deferenced on open or at
other times.)
1998-02-02 22:54:55 +00:00
marc 5c17882e45 move pcic_wait_ready from i82365var.h to i82365.c 1998-02-01 23:36:23 +00:00
marc 63f5e2bbc3 move pcic_wait_ready to i82365.c 1998-02-01 23:33:51 +00:00
marc 1d4b77e754 split com_attach_subr into attach stuff and per-open initialization stuff
add timeouts to all splserial() while loops so bugs elsewhere don't cause
the com driver to wedge the machine
 add power management support
1998-02-01 23:33:01 +00:00
marc a71698f108 add power management hooks to softc 1998-02-01 23:30:49 +00:00
kleink fa75c2d647 Fix two harmless typographical errors in a comment. 1998-02-01 19:25:44 +00:00
pk f3ee364e31 * Make sure the `ECB_NEXUS' flag accurately reflects the existence of
an initiator/target nexus and thus mark the correct queue (if any) a
  command is on.

* If a disconnected command times out, just leave it on the nexus queue
  and do nothing (for now). I need yet to decide on the strategy to
  follow in this case.  Note: we used to move the command to the `ready'
  queue and then do nothing, which is worse.
1998-01-31 23:37:51 +00:00
thorpej 78650a8398 Use offsetof() from libkern.h 1998-01-30 01:26:51 +00:00
thorpej a7bc6bd92c In the NE2000 case, if we encounter an unaligned mbuf, copy it to an
aligned buffer so that we can do 16-bit PIO to the device without causing
an unaligned access fault.
1998-01-29 00:59:33 +00:00
mjacob 99139bc35a Fix for port-alpha/4903- always download f/w unless config flags say
no or we have no firmware to download.
1998-01-28 19:09:24 +00:00
thorpej 2538ed1062 Use offsetof() from libkern.h 1998-01-28 02:23:04 +00:00
thorpej cdec42b6a0 Fudge the start of the data pointer of the first mbuf in the chain when
reading a packet, ensuring that the data after the Ethernet header will
be aligned.  Part of PR #4595, from Andreas Johansson <ajo@wopr.campus.luth.se>
1998-01-27 23:26:21 +00:00
thorpej 243c218061 Update copyright. 1998-01-26 20:30:06 +00:00
thorpej 044add4253 If we're using these devices on a big-endian CPU, byte swap the "count"
field in the dp8390's packet header (because the dp8390 runs in little-endian
mode in these cases).  Inspired by an e-mail from Kazuki Sakamoto.
1998-01-26 19:21:36 +00:00
pk 09559070f7 * Do not remove ATN from the scsi bus if we have no messages queued but
the target still is in MSG OUT phase. We still send a message (a NO_OP)
  in this case and the chip will remove ATN at the appropriate time.
  Using the RSTATN command here induces a "illegal command" in some
  chip revisions.

  This situation only occurs if the target rejects a previous (multi-byte)
  message early (by switching to MESSAGE IN and sending a MESSAGE REJECT)
  before the chip has completed the entire MSG OUT transfer. ATN will
  remain asserted, and the target returns to MESSAGE OUT phase.

* Account for the events above when reporting "DMA not completed"
  diagnostic messages.

* Stream-line the selection code a bit, and make the DMA setup code
  more like the MSG OUT & DATA XFER setup.
1998-01-24 15:33:35 +00:00
mycroft 753e4909bb Assume a newline has already been printed in wdcattach(). 1998-01-23 01:06:45 +00:00
drochner 94343e637a define offsets into "register window" instead of absolute ISA addresses
for better use in a bus-ified environment
1998-01-19 11:38:00 +00:00
drochner 2562f77567 Don't define absolute ISA addresses here but offsets into the
"controller window".
1998-01-18 14:41:37 +00:00
pk 94072e56f6 Move "async command" state in here. 1998-01-15 16:08:32 +00:00
pk 47505a3b6f Elaborate on "receiver not ready" conditions; we don't need a full reset
in most cases.

Move "async command" state into the softc structure.
1998-01-15 16:07:34 +00:00
cgd 24972c51a4 #include a just-added scsipi header. 1998-01-15 02:23:43 +00:00
cgd 8540a31ee3 kill a couple of unnecessary #ifs 1998-01-15 01:26:13 +00:00
cgd aaede4d8d8 Various cleanups and bug fixes to the wdc/wd code:
* Fix bug in wdc that would overflow ATAPI transfer length.
* Improve wdc probe code so that 'wdc' is probed in if present
  even if there are no drives attached, and so that it works
  properly even if the only device is an ATAPI slave.
* bus_space-ify.
* split the ISA attachment from the wdc driver, and remove
  ISA dependencies from non-ISA files.
* claim that wd and wdc are now machine-independent (probably not
  completely true, but mostly so; they at least work on arm32 and
  i386).
* Various other minor fixups and cleanups, some of which were pointed
  out by Kazuki Sakamoto.
1998-01-14 23:41:59 +00:00
enami 4b62270f85 Don't include <machine/pio.h> and <dev/isa/isavar.h>. Instead,
include <machine/bus.h> directly.
1998-01-13 03:31:42 +00:00
thorpej 1adb4489a6 Update for changes to config. 1998-01-12 20:23:38 +00:00
thorpej 06ce220790 Update for config changes. 1998-01-12 09:39:57 +00:00
thorpej 095c4c092d Adjust for config changes. 1998-01-12 09:23:08 +00:00
pk 69487f1532 * Fix a train-load of bugs, mostly present in one of these categories:
- "out of resource" errors cause receive buffer chain corruption
	- resets can confuse the interrupt handler
	- multi-cast setup causes receive buffer chain corruption
	- shared memory setup incomplete

* Enhance effiency by avoiding unnecessary shared memory access,
  improved handling of receive frame & buffer descriptors, and
  introducing an `asynchronous' option when issuing 82586 commands.

* Exclusively use offsets relative to the bus handle representing the shared
  memory area to formulate accesses to the chip's data-structures.  The
  front-ends provide glue functions that cater to the chip's endian-
  sensitivity, to perform the actual device access (note: single-byte
  accesses are done here using `bus_space_{read,write}_1()').
  This concludes the transformation into a bus-independent driver module.
1998-01-10 02:35:31 +00:00
pk f041e52c7e * Rename a bunch of chip definitions for consistency.
* Abolish C structures to access chip data-structures; instead use macros
  that take indices and offsets relative to the bus handle representing
  the chip's resources.

* Include the old version of this file wholesale, until all drivers
  have been updated to use the MI 82586 code.
1998-01-10 01:46:32 +00:00
mikel c0d8293951 fix some typos in error messages & comments 1998-01-07 08:47:54 +00:00
perry 8a98e23a48 RCSID Police. 1998-01-06 04:55:52 +00:00
perry fff05a68ab RCSID Police. 1998-01-05 07:31:05 +00:00
fvdl ffb3eaa5ea Add extra delay after wdcreset() call in wdcprobe. Needed by at least
one controller, where registers otherwise will still be inaccesible
(even though the busy bit has been reset), making the probe fail.
1997-12-24 02:01:00 +00:00
mycroft f1170022ce Don't do anything in comparam() if the line speed and flags are the same. 1997-12-16 22:52:37 +00:00
pk a8c268918b Changes from Rafal Boni to accommodate ISA driver front-ends. 1997-12-13 21:18:01 +00:00
scottr dc89550a55 Fix typo in a trace message expression. 1997-12-12 22:44:26 +00:00
thorpej 0ac93f48ea Use malloc()/free(), not geteblk()/brelse(), for the device buffer. 1997-12-07 16:09:36 +00:00
chuck d76941843e fix mixer code that was clearly untested:
- allow get/set of enums SUNAUDIO_SOURCE and SUNAUDIO_OUTPUT rather
	than returning EINVAL
 - add missing SUNAUDIO_MONITOR_CLASS case in query_devinfo
 - convert SUNAUDIO_MONITOR case from a MIXER_CLASS to a MIXER_VALUE
	like it is supposed to be
 - the labels for outputs/record class were swapped: fix it

this patch allows "mixerctl" to work properly on a sparc
1997-12-06 03:20:56 +00:00
mjacob 5ff1a34bba Add a new async notification, and also fix a bug where the queue entry
wasn't getting fully zeroed as it should be.
1997-12-05 19:41:49 +00:00
mjacob 62ac2ff851 new async code defined 1997-12-05 19:40:35 +00:00
pk 39879b883e Use a 1-character queue so polled console output can be deferred if
regular I/O has been scheduled.
1997-11-12 22:17:07 +00:00
bouyer f7c6e141e6 Various bug fixes for atapi part:
- clean up debug code
- Don't check ATAPI signature when probing ATA drives, ATAPI devices were
  detected before
- Reset controller after disks probes. The probe, with some combinations of
  ATA/ATAPI device keep it in a mostly working, but strange state (with busy
  led on)
- The WDCF_IRQ_WAIT flag is now cleared by wdc_ata_intr and wdc_atapi_intr
  when appropriate (helps recover from failure conditions)
- In wdcunwedge, send ATAPI_SOFT_RESET to non-ata drives
  (helps recover from failure conditions)
- in wdctimeout be a bit more verbose when we missed an interrupt
- Always Increment xfer->c_skip where it should be
- Set the ITSDONE flag when a polled command completed.
1997-11-05 22:19:07 +00:00
thorpej 1713a9fb07 is790 u_char -> int. 1997-11-05 07:15:42 +00:00
thorpej 03a0c2d900 Implement a simple queueing mechanism that makes these drivers much
more robust in resource shortage situations, basically identical to
code I added to the "ahc" driver some time ago.

Thanks to Brad Spencer for the testing help.
1997-11-04 05:58:22 +00:00
mycroft 47c2d7502f Actually use TIOCFLAG_CDTRCTS. 1997-11-03 16:30:54 +00:00
mycroft 0e16ca013b Always leave DCD_IE and CTS_IE on for now. Needs more work in zsparam() to
make the optimization actually work right.
1997-11-03 16:15:47 +00:00
mycroft 37e260f4a6 Leave the console running with or without DDB. 1997-11-03 15:35:42 +00:00
mycroft 13e9b38191 Slight optimization in soft input routine. 1997-11-03 08:20:35 +00:00
mycroft ce29cdf2e7 Set the ring size back to 2k. 1997-11-03 06:56:28 +00:00
mycroft 9b9cce6084 Mostly cosmetic and performance changes:
* Make the ring buffer size and water marks patchable, and allocate the buffer
  separately.
* Do the ttymalloc() at attach time.
* Reorganize the receive buffer so the status and data pair are next to each
  other.  This is slightly faster.
* Make sure we actually do turn off interrupts in comclose() if we have DDB
  configured and it's not the console.  (D'oh!!!!)
* When we exhaust the current transmit run, turn off transmit interrupts in
  comintr(), so we're fairly sure we don't get another one.
* Nuke the silly lsrmap[] idea; it's slower in the normal case.
* Cache the l_rint pointer in the soft interrupt routine.
1997-11-03 06:55:54 +00:00
mycroft 7d7ecb9200 Bug fixes:
* Carrier detect (TS_CARR_ON) is based on the actual DCD bit, even if it's
  being ignored.
* Set TS_WOPEN early on in zsopen().
* Don't disable interrupts on the console during close if we have DDB.

Inert changes:
* Don't handle ZS_HWFLAG_NO_DCD here; the frontend does it.
* Deprecate `register'.
* Use SET(), CLR(), and ISSET().

More performance changes:
* Rototill receive handling; use a backpressure mechanism to prevent livelock.
* Output silo/ibuf overflow warnings at most once per minute, from a callout.
* When we exhaust the current transmit run, turn off transmit interrupts in
  zstty_txint(), so we're fairly sure we don't get another one.
1997-11-03 06:16:43 +00:00
mycroft 067898abb8 Mostly cosmetic and performance changes:
* Make the ring buffer size and water marks patchable, and allocate the buffer
  separately.
* Do the ttymalloc() at attach time.
* Reorganize the receive buffer so the status and data pair are next to each
  other.  This is slightly faster.
* Make sure we actually do turn off interrupts in comclose() if we have DDB
  configured and it's not the console.  (D'oh!!!!)
* When we exhaust the current transmit run, turn off transmit interrupts in
  comintr(), so we're fairly sure we don't get another one.
* Nuke the silly lsrmap[] idea; it's slower in the normal case.
* Cache the l_rint pointer in the soft interrupt routine.
1997-11-03 06:12:02 +00:00
gwr 762cc5a0fc Fix serial console support (did not turn on CLOCAL). 1997-11-03 04:34:18 +00:00
thorpej e7044069f6 Fix a think'o in ifmedia initialization. 1997-11-03 00:19:41 +00:00
mycroft 61bf289f3e Slight code rearrangement. 1997-11-02 09:31:49 +00:00
mycroft acb27fb42a Slight code rearrangement. 1997-11-02 09:24:51 +00:00
mycroft 5869b743c7 Rearrange *param() slightly to eliminate a spl.
Also fix another comment regarding DTR.
1997-11-02 09:15:41 +00:00
mycroft 76b7dd52df Add another splserial()/splzs(). 1997-11-02 08:55:52 +00:00
mycroft acd97c6676 Minimize some spl regions slightly. 1997-11-02 08:50:31 +00:00
mycroft 8914537568 If we lose HFC, assert RTS. 1997-11-02 08:29:51 +00:00
mycroft b000ee5105 Set the state of DCD_IE and CTS_IE based on what's in rr0_mask. 1997-11-02 08:02:40 +00:00
scottr c35524f0a1 Fix a serious problem in dp8390_write_mbuf(), noticed by Jason Thorpe:
after we've written out the contents of the mbuf, increment the transmit
buffer offset by m->m_len.
1997-11-02 06:18:27 +00:00
thorpej 7438e6c882 Adjust for ifmedia-related changes to dp8390 driver. 1997-11-02 00:25:11 +00:00
thorpej 18636a8934 Add ifmedia support via callbacks to the front-end. 1997-11-02 00:23:54 +00:00
mycroft 74df2cee60 Correct a comment regarding our behaviour with DTR. 1997-11-01 20:40:36 +00:00
mycroft d0df1f96f4 Add additional splserial()s in comopen() and comclose(). These are not
necessary on the i386 port, but may be on others.
1997-11-01 20:31:57 +00:00
mycroft 8475e6c0ba Fix minor omission; write back reg 1 earlier in zsopen(). 1997-11-01 20:23:50 +00:00
mycroft 386d55a1ca Need some additional splzs() in zsopen(), and nuke one that's no longer
needed.
1997-11-01 20:15:10 +00:00
mycroft 8ffb1f6b84 Nuke the special case of heldchange for reg 5. We don't use it for flow
control any more, and the speed of changing DTR isn't really an issue.  Also,
the old code created a bug where zsparam() might have failed to set some
registers.
1997-11-01 18:15:12 +00:00
mycroft 75dc31c41d Yet more changes imported from com driver:
Change the interface to zs_hwiflow(); just have it use zst_rx_blocked.
Make zs_modem() a tiny bit faster.
Do RTS updates immediately; do not allow them to be held.
1997-11-01 17:57:14 +00:00
mycroft eb0f6686d2 Make zst_tba a u_char *. 1997-11-01 17:12:54 +00:00
mycroft 4377152a4b More changes taken from com driver:
Stop output as fast as possible when DCD is deasserted.
Do *not* automatically drop DTR when DCD is deasserted.
Only check for rr0 bits that we care about (DTR and DCD).
1997-11-01 17:09:06 +00:00
mycroft deb1d9f40a GC some unused bits.
Also, part of the previous was copied from the com driver, so DTRT.
1997-11-01 15:59:26 +00:00
mycroft 8008239563 Rearrange open sequence to make sure we catch all line status changes.
Make sure we turn on DTR and/or RTS as appropriate during open.
Rearrange close sequence so the tty is flushed before turning off interrupts.
Deal with `softcar' and the console device by silently asserting CLOCAL and
|HUPCL, as in com driver.
Do *not* fiddle with DTR when changing the line speed.
Make sure we update the tty's carrier status when CLOCAL or MDMBUF is changed.
Only change rr1 when we actually need to turn on or off TIE.
1997-11-01 15:51:23 +00:00
drochner d52df86460 Print probe result after the LCR is restored. Otherwise, bad
things happen if we are the console.
Restore to the prevoius value (not to hardwired 8N1) because this
could be set by the serial console initialization.
Closed PR kern/4373 (Dave Huang)
1997-10-29 18:28:07 +00:00
thorpej 7964d4bd34 When probing for a dp8390 in ne2000_detect(), check for RST being set
in the ISR (from the ISA "ed" driver's generic 8390 probe routine).
Also, add a big comment describing exactly what we're checking when
probing for the dp8390 (also lifted from the ISA "ed" driver).

The RST check should help weed-out non-matches before they get to the
fairly invasive memory check.
1997-10-29 07:57:53 +00:00
thorpej b01dbb214c When creating mscps, be a little more informative about why we couldn't
should creation/initialization of a mscp fail.  Also, don't panic in
these situations.  Instead, simply return an error condition and allow
the caller to deal with it.  It may be the case that we were able to
create one mscp what we can grab, and continue to hobble along.

Also, fix the mscp freelist fencepost error, similar to aha.c and bha.c
1997-10-28 23:46:49 +00:00
thorpej 6e8facbdcc When creating ccbs, be a little more informative about why we couldn't
should creation/initialization of a ccb fail.  Also, don't panic in
these situations.  Instead, simply return an error condition and allow
the caller to deal with it.  It may be the case that we were able to
create one ccb what we can grab, and continue to hobble along.
1997-10-28 23:31:30 +00:00
thorpej 711fc71012 When creating ccbs, be a little more informative about why we couldn't
shoud creation/initialization of a ccb fail.  Also, don't panic in
these situations.  Instead, simply return an error condition and allow
the caller to deal with it.  It may be the case that we were able to
create one ccb what we can grab, and continue to hobble along.
1997-10-28 23:06:21 +00:00
thorpej d1bfbc66c6 Syncronize with changes to aha.c:
Adjust the number of ccbs allocated during initialization.
Every ccb could potentially lock 64k of memory for dma buffers if bounce
buffers are used.  Instead of BHA_CCB_MAX ccbs using 2MByte, only
sc_link.openings ccbs per device are allocated.  Thus we now use only
256KByte per device present.
(hannken)

Fix a couple of errors in bha_create_ccbs():
- Don't ever let the number of CCBs be creater than BHA_CCB_MAX.
- Fix a fencepost that caused the last CCB allocated to never be put
  on the freelist.
(thorpej)
1997-10-28 19:13:36 +00:00
thorpej 1dfae448cd Reply from an INQUIRE DEVICES is a lun map. 1997-10-28 19:08:26 +00:00
thorpej 1bfea0bd23 Fix a couple of errors in aha_create_ccbs():
- Don't ever let the number of CCBs be creater than AHA_CCB_MAX.
- Fix a fencepost that caused the last CCB allocated to never be put
  on the freelist.
1997-10-28 18:40:07 +00:00
bouyer 917389821c Changes to the probe and attach routine:
- at end of attach, explicitely select an existing drive. This fixes hangs
  some users reported (such as the one reported in port-i386/4247).
- Some atapi cdrom drives (e.g. Nec 24x) don't enables their registers before
  a controller reset is issued. The controller probe routine is changed as
  follow: issue a controller reset. If fail, test atapi signature on slave.
  If fail, wait 5s and retry a reset. If the second reset fail, return(0).
  If the first reset succeed, test presence of a master drive:
  atapi signature, and if this fail RO/RW registers test. If no master, test
  atapi signature on slave. If no slave, return 0.
1997-10-27 14:09:23 +00:00
pk 233c534958 Apply patch from Michael L. Hitch (PR#4318):
"A sequence step of 0 after a select with ATN can be a selection
 timeout, or it can also indicate the target did not respond with
 a message out phase.  The latter will occur on very old SCSI
 devices which do not respond to the ATN signal and go directly to
 the command phase".
1997-10-26 16:45:24 +00:00
fvdl 37e4eea4a4 Make 16650 probe optional on COM16650 define. It breaks on some
multiport Startech chips.
1997-10-21 01:25:41 +00:00
is 4a8fcf4aed Dont waste time in delay()s... else we won't finish in time to get our first
lowwatermark interupt for AUDIO_BYPASS data.
1997-10-20 19:07:59 +00:00
is b266316bea Fix pasto in symbolic name for string 1997-10-19 20:46:32 +00:00
christos 7507e6a5e9 Make this compile again. 1997-10-19 20:34:54 +00:00
is eb1b51cac1 tav_write_word -> tav_write_short 1997-10-19 20:21:49 +00:00
mycroft 1bb75c1efa Initialize the IER to 0 in com_attach_subr(). 1997-10-19 20:01:08 +00:00
fvdl ab36c13e4b Add 16650 hardware flowcontrol support. Basically PR 3844 from
Dave Huang <khym@bga.com>, with added check for broken early versions
of the 16650, taken from the Linux driver.

This should be extended to use, for example, higher trigger levels for
the bigger 16650 FIFO, and its capability for using a smaller divisor
and thus higher speeds. But this patch is very useful for 16650 users
already.
1997-10-19 14:26:25 +00:00
fvdl 961e39030d Add 16650 hardware flowcontrol support. Basically PR 3844 from
Dave Huang <khym@bga.com>, with added check for broken early versions
of the 16650, taken from the Linux driver.

This should be extended to use, for example, higher trigger levels for
the bigger 16650 FIFO, and its capability for using a smaller divisor
and thus higher speeds. But this patch is very useful for 16650 users
already.
1997-10-19 14:26:16 +00:00
enami fe0c14e139 Fix typo; hang binary operator at the end of previous line. 1997-10-19 14:10:11 +00:00
enami 5c1050e68f Include locators.h and use symbolic name comes from it. 1997-10-19 14:07:19 +00:00
explorer ebf03fd00c Add hooks for entropy collection. Right now, you must place
options RND_COM
in your kernel config file (along with the
	pseudo-device rnd
line) to enable this.  If results are positive, I will make this enabled
by default.
1997-10-19 11:45:33 +00:00
augustss e7029fc0da Make the audio API (almost) SunOS compatible.
The changes is to allow some limited mixer manipulation through
the audio device (instead of the mixer device).
This rendered 4 methods in audio_hw_if unused so garbage collect these.
1997-10-19 07:41:33 +00:00
is 1083b2ab71 Use long long in bitrate tolerance computation, else we'll overflow for
higher than standard-pc chip clocks.
1997-10-18 23:11:45 +00:00
jonathan 8bb9a1ccb2 Protect #ifdef DEBUG printfs with a run-time teson a patchable variable
(epdebug), as per Jason Thorpe's comments.
1997-10-18 00:15:02 +00:00
gwr b4e346f85d Rename cs_pad to cs_spare1 (for future use by Bill Studenmund). 1997-10-17 23:02:37 +00:00
gwr b69fc1a7cf Move the ttychars() call below the if-not-raw block.
(from Bill Studenmund)
1997-10-17 22:55:09 +00:00
enami 801620373d Define width_names[] only when PCICDEBUG is defined. 1997-10-17 09:37:12 +00:00
matt 54a45a47c8 EN1207 definitions 1997-10-17 09:26:58 +00:00
enami 4eef29b72f No need to cast a generic pointer. 1997-10-17 07:59:39 +00:00
is 11446b9b6e TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c
1997-10-16 23:58:10 +00:00
thorpej 5345a8bef9 Pull marc-pcmcia branch down to trunk. 1997-10-16 23:21:46 +00:00
thorpej b3620a0f8d Pull marc-pcmcia branch down to trunk. 1997-10-16 23:18:18 +00:00
enami 12e22025c4 Remove interrupt handler cookie from aic_softc. 1997-10-16 22:57:02 +00:00
matt 9d865fc8f0 Fix a misspelling of slave in a comment. 1997-10-16 15:16:34 +00:00
thorpej 1ccf0984c2 "com" driver files copied by repository copy magick to sys/dev/ic, and
adjusted for their new home.
1997-10-16 00:01:00 +00:00
thorpej 9ba1ceb091 Pulldown from marc-pcmcia branch. 1997-10-15 22:00:10 +00:00
thorpej 2939780605 Garbage-collect some old i386 console stuff that is no longer used, and
add a comment about something to be fixed later.
1997-10-15 21:13:36 +00:00
matt 2a5a426a31 Some changes to get the 21142/21143 to work in 10Mb/s mode. 1997-10-15 18:51:00 +00:00
thorpej b1ba3c5488 Pulldown from marc-pcmcia branch: minor tweaks to make this a completely
bus-independent driver, and garbage collect a few unnecessary things
from the softc.
1997-10-15 16:54:39 +00:00
gwr 44365b6619 Bring back the optimized ether_cmp() that was lost when the
LLADDR() changes went in.  Mainly relevant on the Sun3/50,
where LANCE_REVC_BUG has to be defined.  Tested on sparc.
1997-10-15 16:34:10 +00:00
explorer 66f8a19d70 back out previous change (committed in error) 1997-10-15 06:08:27 +00:00
explorer f9370ddc7a Add and/or update rnd_*() hooks 1997-10-15 05:55:13 +00:00
explorer 1d74fdb6a3 minor formatting change 1997-10-15 05:48:56 +00:00
enami 4321b83ee2 Pull following change from marc-pcmcia branch:
> revision 1.1.2.4
> date: 1997/10/15 01:01:57;  author: enami;  state: Exp;  lines: +10 -8
> Use bus_space_write_1() directly instead of NIC_PUT(), since
> - same io port is accessed by bus_space_read_1() in the same function, and
> - can bypass sc_reg_map[].
1997-10-15 01:15:51 +00:00
thorpej 457454d81f Pull down from marc-pcmcia branch: Common code used by NE2000 and compatible
ethernet cards.
1997-10-14 22:54:09 +00:00
thorpej 768cd3034d Pull down from marc-pcmcia branch:
Add support for power management.
1997-10-14 21:41:00 +00:00
thorpej 10708da893 Pull down from marc-pcmcia branch:
Minor tweaks to deal with PCMCIA differences, and support for power
management.
1997-10-14 21:28:37 +00:00
is 59129515bb Finalize the isa/lpt.c split:
The isa attachment code is in isa/lpt_isa.c now, which attaches to the
already created ic/lpt* files.
You don't need to change your config files, but you need to re-"config" if
using lpt at isa.
XXX The "lpt" device definition should be in sys/conf/files instead, but to
my knowledge, there are some ports which have private copies of lpt, and would
choke on that. No need to make people unhappy 7 days before release branching.
1997-10-14 15:50:15 +00:00
explorer 80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
mycroft 3081c6f8cf AudioC[A-Z] -> AudioC[a-z]
AudioElinear -> AudioEslinear
1997-10-11 12:43:51 +00:00
mycroft b551325998 AudioElinear -> AudioEslinear 1997-10-11 12:36:04 +00:00
mycroft 2d019e5efd AudioC[A-Z] -> AudioC[a-z] 1997-10-11 11:28:49 +00:00
explorer b5feb41072 Add hooks to insert timing info into the random system 1997-10-10 01:09:03 +00:00
jtc d6ae2cd7fd Fix tipo inherited from old version of TNF copyright template. 1997-10-09 08:03:42 +00:00
jtk 827918e4ab fix warnings when -DAHC_DEBUG 1997-10-09 02:17:36 +00:00
christos 64ff55911c From Enami Tsugutomo: Busify and split the aic6360 driver. 1997-10-06 19:49:17 +00:00
augustss 72251c67c9 Driver for the Interwave audio chip used in the GUS PnP sound card. 1997-10-06 16:03:34 +00:00
thorpej 616e0b7e33 Copyright assigned to The NetBSD Foundation. 1997-10-05 18:26:38 +00:00
gwr 4371d4ef78 Remove the while loop from zsc_intr_hard(). It caused problems on
some machines, and those that really want to can just call this
function in a loop until it returns zero.
1997-10-04 22:30:30 +00:00
mhitch d2f48f6b3e Add yet another chip variant: FAS216, used by the amiga Phase5 SCSI boards. 1997-10-04 03:59:00 +00:00
enami 7376003aeb Cosmetic change; delete one space character. 1997-10-03 16:40:35 +00:00
mikel 20cf0e1cc1 fix missing com_kgdb_attached() argdecl, from Michael C. Richardson in PR 4196 1997-10-03 06:11:35 +00:00
christos a2512e8ec5 Add TIOCM{BI{C,S},{S,G}ET} from revision 1.98. As Charles says these
interfaces are slightly broken and should be obsoleted, but some programs
are using them and also they are useful for debugging.
1997-09-30 21:51:43 +00:00
chuck d3a7613827 midway update:
[1] add EN_ENIDMAFIX - the byte-aligner on the ENI version of the card
	appears to lose under heavy load so avoid using it.  see comment
	in midway.c for full details.

	note that the Adaptec version of the card works properly under
	load.

	detected by Kenjiro Cho <kjc@csl.sony.co.jp> [confirmed by chuck]
	fix by chuck & kjc

[2] update some freebsd specific code [from kjc]

[3] for circular buffers: ensure there is always one free slot so
	that we can easily tell the difference between a full and
	empty list.   re-structure a few loops to reflect this.
	fixes a problem with mbufs being free'd while still in DMA,
	and makes drive a bit more robust.

	detected and fixed by kjc
1997-09-29 17:40:38 +00:00
mjacob 6716542383 A little cleanup and print more error messages. 1997-09-29 01:41:30 +00:00