Commit Graph

2582 Commits

Author SHA1 Message Date
Eivind Eklund
494dc6bbe2 Fix typo - sizeof(struct crtl *) -> sizeof(struct ctrl *).
XXX This still assume that bzero() over a field create null-pointers,
which seems a chancy proposition at best.
1998-12-13 23:25:29 +00:00
Eivind Eklund
b3a941181e Remove warning introduced by the last committer. 1998-12-13 23:00:48 +00:00
Eivind Eklund
b405a21dd1 Another extra pointer check. 1998-12-13 22:29:32 +00:00
Warner Losh
69acd21dfd Add support for the YE-Data external PCMCIA floppy driver. This
floppy is used on the toshiba Libretto line of subnotebook computers.
It differs from a normal floppy in that you must use PIO rather than
DMA to transfer the data.

To enable this, you must add options "FDC_YE" to your kernel.  I don't
have a machine that has a floppy and a pcmcia slot to test to make
sure that this doesn't impact normal floppy units, so I've left this as
an option.

I have ported this to -current and made an attempt to ensure that the
indentation conforms to style(9), aka the bruce filter.

Reviewed by:	nate, markm
Submitted by:	David Horwitt (dhorwitt@ucsd.edu)
1998-12-12 08:16:01 +00:00
Eivind Eklund
2ae353f9a7 Rename one of the two devfs_link's to devfs_makelink. 1998-12-10 19:57:01 +00:00
Brian Somers
db21d4f4fc Support ESS1868 (and probably ESS688 & ESS1668).
Submitted by: Max Khon <fjoe@husky.iclub.nsu.ru>
1998-12-10 18:36:10 +00:00
Archie Cobbs
bd3d61e39f Eliminate compiler warning. 1998-12-10 01:52:16 +00:00
Archie Cobbs
4b62fdebb8 Eliminate compiler warnings. 1998-12-10 01:42:32 +00:00
Eivind Eklund
0d8e97fbaf Someday I hope people will learn that "#endif" is not a comment
introducer in ANSI C.
1998-12-09 03:30:52 +00:00
Eivind Eklund
80524be65c If we're not going to check returnvalues, it had better be M_WAITOK.
M_NOWAIT -> M_WAITOK in attach.
1998-12-09 03:11:33 +00:00
Eivind Eklund
11e8322cac Move the return so that the DEVFS code can execute, too. All code is
equal (it is just that some is more equal than other).
1998-12-09 02:56:48 +00:00
Archie Cobbs
f1d19042b0 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
Bruce Evans
f9809f9802 Ifdefed a conditionally used include.
Don't depend on "implicit int".

Don't bloat the data section with labpc_devsw_installed.
1998-12-06 17:58:21 +00:00
Archie Cobbs
2127f26023 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
Archie Cobbs
790eeb2b51 Fix compiler warnings. 1998-12-04 22:14:05 +00:00
Archie Cobbs
aa0d9efc2e Fix typo: the expression .. & .. == .. needs parentheses: (.. & ..) == ..
PR:             8280 (2/3 patches contained in this PR)
Submitted by:   Sakari Jalovaara <sja@tekla.fi>
1998-12-04 21:33:06 +00:00
Poul-Henning Kamp
5986967ee2 don't print '?' for ioaddr the device may legitimately not have an
ioaddr.
1998-11-29 15:42:40 +00:00
Bruce Evans
d21c930ccb Fixed sloppy clearing of TS_BUSY. Don't clear it until the transmitter
is completely empty.  There is an interrupt for output completion.  It
is painful to use, but polling method used in the corresponding fix in
sio.c (rev.1.152) can't be used because there is no status bit for
transmitter-empty.  Now ttywait() works right.

Reminded by:	NIST-PCTS
1998-11-28 15:48:09 +00:00
Bruce Evans
4635f7acc0 Merge from sio.c rev.1.163:
Don't call timeout() for DTR wakeup if the relevant timeout is already
active.  This fixes "timeout table full" panics when sufficiently many
cyopen()s are interrupted while they are sleeping waiting for the
timeout to expire.
1998-11-28 13:18:16 +00:00
Paul Richards
1a3376721b Add Id string to if_lnc.h and fix up copyrights to be consistent and up to date. 1998-11-26 00:57:32 +00:00
Paul Richards
6789e41fe6 Despite what people may think the Am79C970 returns the chip id of an Am79C965.
Fix the PCI probe code to accept this id otherwise cards based on the Am79C970
fail to probe.
1998-11-26 00:53:45 +00:00
Bruce Evans
976d09b9f2 Untangled the Cyclades offsets a little. CY16_RESET and CY_CLEAR_INTR
were half of their physical offsets for ISA and 1/4 of their physical
offsets for PCI, while all other Cyclades offsets were physical/1 for
ISA and physical/2 for PCI.  Logically wrong macros were used to scale
CY16_RESET and CY_CLEAR_INTR to the correct physical offsets.

Fixed some style bugs (mostly long lines).
1998-11-23 13:58:55 +00:00
Bruce Evans
a84c84f5b0 Reduce i/o overheads by not preserving the channel access register in
interrupt handlers.  Instead, load and use it atomically as necessary.
This reduces mode switching overhead for "polled" mode interrupt handling
from 5 i/o's to 3 (per service type, per port) so that polled mode is only
slightly more inefficient than "interrupt" mode.
1998-11-22 17:40:32 +00:00
Bruce Evans
8280a33470 Deleted the workaround for lockup of certain (hopefully no longer used)
UARTs when their divisor latch registers are selected while they are
doing output.  Waiting for (some) output to drain is not permitted for
the TCSANOW case of tcsetattr().  NIST-PCTS easily detects bugs like
this by testing at at speeds that no one would want to use (50 bps).

Deleted stale comments related to flushing i/o.  Flushing works properly
for 16550s according to NIST-PCTS (it can't work properly for 16450s).
This finishes fixing all sio(16550)-related bugs found by NIST-PCTS.
1998-11-22 10:47:42 +00:00
Bruce Evans
121d04904e Fixed a comment in code that will soon go away. 1998-11-22 09:41:12 +00:00
Archie Cobbs
2b81bbcbef Eliminate compiler warning. 1998-11-21 01:57:48 +00:00
Archie Cobbs
3a8dbd82b3 Eliminate some ompiler warnings. 1998-11-21 01:54:50 +00:00
Kazutaka YOKOTA
0e06fe21c6 - Added some configuration flags as workaround for not-so-compatible
keyboard/mouse/display switch products (console switches).  Some
  products claim they emulate the PS/2 mouse when the host computer
  talks to the mouse while the mouse is actually routed to another
  host.

	flags 0x200	Do not try to identify the mouse model. All
			mice will be recognized as "generic PS/2".
	      0x400	Do not reset the mouse.  Some switches' response
			to the reset command is too slow and the psm
			will timeout.
	      0x1000	Relax error checking when probing the mouse
			port.

- Added another flag for pad devices.

	flags 0x800	Assume the pad behaves like ALPS GlidePoint
			when the user `taps' the surface of the pad;
			it will be reported as the fourth button.
1998-11-20 11:46:43 +00:00
KATO Takenori
8ea9416c8c Fix ROOL UP/DOWN keys of PC-98. 1998-11-18 08:33:58 +00:00
Eivind Eklund
340fe9ae67 Make it possible to adjust the IDE probe delay from kernel config files. 1998-11-15 20:08:50 +00:00
Eivind Eklund
34e7656caa Depend on __FreeBSD_version instead of __FreeBSD__ 1998-11-15 19:30:48 +00:00
Bruce Evans
4cfe0f4600 Fixed the bug that caused negative busycounts in devstat. The
devstart_start_transaction() call is misplaced - it is after the
wdustart() call that queues the transaction on the controller queue.
Normally this doesn't matter because we're running at splbio() so
nothing will look at the controller queue.  However, obsolescent
code for syncing labels sometimes slept after the transaction was
started, so the transaction sometimes completed before it was
[recorded as] started.  This code was misplaced even for syncing
labels.  Move it to the right place.  It should go away, but
something may depend on its side effects.
1998-11-15 13:54:31 +00:00
Luigi Rizzo
a6a30776d3 Add a missing newline
Submitted by:	Roger Hardiman
1998-11-14 13:07:59 +00:00
Luigi Rizzo
ac1e654ef7 Add entry for AOpen AW37 1998-11-10 10:44:56 +00:00
Justin T. Gibbs
3c1cabf7a2 Fix probes when a port address is specified. 1998-11-10 06:44:54 +00:00
Doug Rabson
7095ee912b * Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
  pass a vm_offset_t instead of an int for the offset allowing
  devices with a larger memory map than (1<<32) to be supported
  on the alpha (/dev/mem is one such).

These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
1998-11-08 12:39:07 +00:00
Nicolas Souchu
d3cf287966 iicbus probe and attach deferred until root_bus_configure() call. 1998-11-04 22:09:17 +00:00
Luigi Rizzo
16c775657c Remove an error message from sb interrupt driver -- it
does not apply to all situations.
1998-11-04 09:13:20 +00:00
Kazutaka YOKOTA
58541533dd Don't update the screen while the cursor shape is being changed
by the user-land program.
PR: i386/8344
1998-11-03 02:37:46 +00:00
David E. O'Brien
20ae30c22c spell check 1998-11-02 09:39:54 +00:00
Peter Wemm
e6b148712b Fixup prototypes so that this beastie compiles. 1998-10-31 14:23:09 +00:00
Nicolas Souchu
af5487872e pcf.c: timeout management added
ppc.c: nsc code improved. Actually, a complete rewrite.
1998-10-31 11:37:09 +00:00
Luigi Rizzo
2a62931083 Fix a typo, and remove verbose error reporting when in
promisc mode (they are annoying in normal mode
as well so i am really tempted to remove them unconditionally...)
1998-10-30 11:53:58 +00:00
Luigi Rizzo
9525e8f53c Use "KB" instead of "Kb" for KiloBytes, consistently with other
drivers and common practices.
1998-10-30 10:57:09 +00:00
Poul-Henning Kamp
00fb0e87c7 Update to current reality. We can now track several LORSTA on separate
minor devices.

Improve PLL/OCXO DAC dithering.

General remodeling.

Performance is now 2.5e-11 in frequency and +/- 100 nsec in time, both
of which are actually the limits of the transmitted signal.
1998-10-24 19:55:09 +00:00
Poul-Henning Kamp
d259be02bc Update timecounters to new interface. 1998-10-23 10:46:20 +00:00
Bruce Evans
43a2c34c47 Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.
1998-10-22 15:39:35 +00:00
Bruce Evans
fdf69a1788 Fixed the ifdef for `uart' driver being present. The sound-driver-specific
ifdef used in uart6850.c is bogus.

Reported by:	Paul Allenby <pallenby@mikom.csir.co.za>
1998-10-22 11:41:22 +00:00
Luigi Rizzo
824f5b2e35 Fix behaviour of the driver with small files -- due to a stupid
bug sound was not played if the total amount of data written to
the device was less than one blocksize

Noticed by: NABETANI Masaki and FreeBSD-users-jp
1998-10-22 11:20:33 +00:00
Bruce Evans
2d5e4a9b94 The previous change was much too simple to actually compensate for
braindamage in sound driver confiruration.  Attempt to only reference
interrupt handlers if their driver is configured.
1998-10-22 10:34:11 +00:00
Bruce Evans
fe310de802 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
Søren Schmidt
8de3e08bf8 Make the next_writeable address specific for each drive, there might
be more than one burner online.
1998-10-15 08:11:55 +00:00
David Greenman
6cde7a165f Fixed two potentially serious classes of bugs:
1) The vnode pager wasn't properly tracking the file size due to
   "size" being page rounded in some cases and not in others.
   This sometimes resulted in corrupted files. First noticed by
   Terry Lambert.
   Fixed by changing the "size" pager_alloc parameter to be a 64bit
   byte value (as opposed to a 32bit page index) and changing the
   pagers and their callers to deal with this properly.
2) Fixed a bogus type cast in round_page() and trunc_page() that
   caused some 64bit offsets and sizes to be scrambled. Removing
   the cast required adding casts at a few dozen callers.
   There may be problems with other bogus casts in close-by
   macros. A quick check seemed to indicate that those were okay,
   however.
1998-10-13 08:24:45 +00:00
Kazutaka YOKOTA
ba8e952c77 Added a workaround for yet-another, less-than-compatible keyboard controller.
This one returns 0xfa (ACK) for TEST_KBD_PORT and TEST_AUX_PORT commands.
The compatible controllers expected to return 0.
1998-10-13 07:56:38 +00:00
Warner Losh
bb415a7e88 Fix breakage introduced by last patch. bde has added CC_QUIET flag to
hasseen_isadev so this will be less noisy when conflicts do exist.
Also eliminate redundant warnings about conflicts.

Requested by: bde
Reviewed by: gibbs
1998-10-12 18:53:33 +00:00
Bruce Evans
a4e195e166 Don't print conflict messages in haveseen_isadev() if CC_QUIET is
specified.  This makes haveseen_isadev() useful for searching for a
free resource.  This increases the bitrot in the pci RESOURCE_CHECK
code.

Fixed the pre-attach conflict message.  The flag for distinguishing
pre-attach conflict checks from pre-probe ones was never set.
1998-10-12 13:12:45 +00:00
Bruce Evans
8806141c1d Added flag CC_QUIET for quiet conflict checking.
Fixed corrupted tabs.
1998-10-12 11:32:35 +00:00
Warner Losh
19bed41a5d Fix conficts in probe:
o For bt and aha only probe the one I/O range if a specific I/O is specified
  in the config file.
o Don't even try to probe I/O ranges that have been seen already.
o If we conflict with an IRQ or DRQ, then fail the probe.

Requested by: bde, gibbs
Approved by: jkh
1998-10-10 00:44:12 +00:00
Dag-Erling Smørgrav
83eb77e880 Make that annoying "device busy" message dependent on DEBUG (using the
DEB macro). There are probably quite a few other messages that warrant
a similar treatment, and many more that should be converted to plain
log messages (e.g. "WARNING: wrintr but write DMA inactive!"). Now
that I think of it, same goes for the CAM code (e.g. the famed "tagged
openings" message)
1998-10-08 20:55:54 +00:00
KATO Takenori
0dce060dd6 Discard previous commit. 1998-10-08 17:20:58 +00:00
KATO Takenori
bb168650e8 Add SMC EtherEZ98 support to ed driver (PC-98).
Reviewed by:	kato
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1998-10-08 17:04:59 +00:00
Søren Schmidt
f8161cee7c Remove debug output on disk change. 1998-10-08 06:41:44 +00:00
Dag-Erling Smørgrav
5b3a79a466 Nit in comment: PnP ID 0x3500630e is a CS4236B, not a CS4236. 1998-10-04 16:22:25 +00:00
Mike Smith
b0773b5098 At net-jp@jp.freebsd.org mailing list, if_cs user in Japan
reported bug.

  At using tcpdump for cs interface, tcpdump only dump packet which
src or dst MAC-address is cs interface. cs interface can't look up
packet between others.

Submitted by:	MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
1998-10-04 02:11:15 +00:00
Alexander Langer
fd5e555c48 Removed duplicate case.
Submitted by:	dfr
Blessed by:	luigi
1998-10-03 14:43:49 +00:00
Luigi Rizzo
fe854067c7 Update the pcm driver to the most recent version. This should
add support for Vibra16X, OPTi925, and bring in several assorted
fixes to the code and documentation.
Also present here are apm hooks so that laptops can properly
reconfigure the hardware after suspend (tested on the Libretto50).
Reviewed by: jordan
1998-10-02 17:26:37 +00:00
Kazutaka YOKOTA
6ce70b4260 A size field returned by the VESA BIOS is already expressed in bytes.
Submitted by: sos
1998-10-02 03:42:19 +00:00
Andrey A. Chernov
24c7337e25 Restore static of sc_flags.
Restore set_destructive_cursor prototype.
1998-10-01 21:04:52 +00:00
Kazutaka YOKOTA
def802441f Yet another round of fixes for the VESA support code.
- Express various sizes in bytes, rather than Kbytes, in the video
  mode and adapter information structures.
- Fill 0 in the linear buffer size field if the linear frame buffer
  is not available.
- Remove SW_VESA_USER ioctl. It is still experimetal and was not meant
  to be released.
- Fix missing cast operator.
- Correctly handle pointers returned by the VESA BIOS. The pointers
  may point to the area either in the BIOS ROM or in the buffer supplied
  by the caller.
- Set the destructive cursor at the right moment.
1998-10-01 11:39:18 +00:00
Dag-Erling Smørgrav
afc8ba89ef Document that we support the CS4236B. 1998-09-30 14:09:00 +00:00
Dag-Erling Smørgrav
e401e55f33 Add PnP ID for Crystal Semiconductors CS4236B codecs (register-
compatible with CS4236, so no driver changes are required)

Reviewed by:	Luigi Rizzo <luigi@iet.unipi.it>
1998-09-30 14:06:25 +00:00
Andrey A. Chernov
cecc3abb9d Restore v1.3 - page align workaround moved to vm86_datacall now 1998-09-29 20:38:54 +00:00
Andrey A. Chernov
81e30e2649 cosmetique - remove unneded static in previous commit 1998-09-29 04:11:35 +00:00
Andrey A. Chernov
bb2691312e workaround painful vm86_datacall requirement that segment+offset
must be withing the same PAGE frame
1998-09-29 04:09:39 +00:00
Andrey A. Chernov
d4b2d02fc1 Fix destructive cursor shape after text mode switch.
This is only for standard modes, I don't check vesa modes yet.
1998-09-29 02:00:57 +00:00
Andrey A. Chernov
83eda2d885 fix handling more than one cards
Submitted by: "Sergey V.Dorokhov" <svd@kbtelecom.nalnet.ru>
1998-09-28 23:27:57 +00:00
Kazutaka YOKOTA
ef7b5df757 Cosmetic changes:
- there were too many global variables (there still are :-).
- the data section was bloated by explicit initializations of static
  variables to 0 (only fixed the recently changed ones).
- WRAPHIST() had silly parentheses around foo->bar.
- the comment about inline functions was stale.
- the comment about Userconfig presumes too much about the boot environment.
- `i' was reused confusingly in scioctl().
- the declaration of `butmap' used a deprecated K&R misfeature.
- the initializeation of `butmap' had an unnecessary line break.
- `unsigned char' was not consistently (mis)spelled as u_char.
- English was poor in a comment in videoio.c.
Submitted by: bde
1998-09-26 03:38:40 +00:00
Kazutaka YOKOTA
a8dedb0cfb - Use `u_long cmd' ioctl arg.
- Fix some external function declaration.
Submitted by: bde
1998-09-26 03:34:10 +00:00
Kazutaka YOKOTA
a3cd018562 Cosmetic change: adjust copyright notice. 1998-09-25 11:55:46 +00:00
Kazutaka YOKOTA
e91db91d4e SC_BAD_FLICKER -> SC_ALT_SEQACCESS
Now supposedly less harmful way of accessing VGA sequencer registers
is default. An alternative, often troublesome, I/O access is optional.

Discussed with: sos, jkh
1998-09-24 13:20:47 +00:00
Bruce Evans
f28d6834e1 Removed unused include of "ioconf.h" again. The CAM changes made ioconf.h
empty but regressed to including it here.
1998-09-24 10:43:42 +00:00
Bruce Evans
849ded1371 Removed a stale comment about "ioconf.h". 1998-09-24 10:41:13 +00:00
Kazutaka YOKOTA
95bafc8f5a Fix and update for VESA BIOS support in syscons.
- Handle pixel (raster text) mode properly.
   - Clear screen and paint border right.
   - Paint text attribute (colors).
   - Fix off-by-one errors.
   - Add some sanity checks.
- Fix some function prototypes.
- Add some comment lines.
- Define generic text mode numbers so that the user can just give
  "80x25", "80x60", "132x25"..., rather than "VGA_xxx", to `vidcontrol'
  to change the current video mode.  `vidoio.c' and `vesa.c' will map
  these numbers to real video mode numbers appropriate and available
  with the given video hardware.  I believe this will be useful to make
  syscons more portable across archtectures.
1998-09-23 09:59:00 +00:00
Bruce Evans
6ed49410a5 Attempt to work around a bug in the previous commit related to
non-reentrancy of SMP clock locking.  Depend on the giant lock
protecting clkintr().
1998-09-20 19:56:28 +00:00
Nicolas Souchu
0a40e22a5d - program counter was previously an index in the microsequence, now pc
is struct ppb_microseq* pointing directly into the microsequence
1998-09-20 14:47:01 +00:00
Bruce Evans
4c7304dd15 Remove unused file. 1998-09-20 05:54:38 +00:00
Bruce Evans
a6796db6ce Ensure that the i8254 timecounter doesn't go backards. It sometimes
went backwards when interrupts were masked for more than one i8254
interrupt period.  It sometimes went backwards when the i8254 counter
was reprogrammed.  Neither of these should happen in normal operation.

Update the i8254 timecounter support variables atomically.  Calling
timecounter functions from fast interrupt handlers may actually work
in all cases now.
1998-09-20 03:47:54 +00:00
Jordan K. Hubbard
36607a387c MF22: Robert Swindells' patch for correct probing of more AMD cards.
Merged by:	Max Khon <fjoe@iclub.nsu.ru>
1998-09-17 13:09:16 +00:00
Justin T. Gibbs
9f02ad6073 Nuke uninitialized varible fd from retrier(). Change the devstat code
to reference fdc->fd instead.
1998-09-15 22:07:24 +00:00
Søren Schmidt
a8445737e7 Add VESA support to syscons.
Kazu writes:

The VESA support code requires vm86 support. Make sure your kernel
configuration file has the following line.
        options "VM86"
If you want to statically link the VESA support code to the kernel,
add the following option to the kernel configuration file.
        options "VESA"

The vidcontrol command now accepts the following video mode names:
VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600

The VESA_800x600 mode is a raster display mode. The 80x25 text will
be displayed on the 800x600 screen. Useful for some laptop computers.

vidcontrol accepts the new `-i <info>' option, where <info> must be
either `adapter' or `mode'.  When the `-i adapter' option is given,
vidcontrol will print basic information (not much) on the video
adapter. When the `-i mode' option is specified, vidcontrol will
list video modes which are actually supported by the video adapter.

Submitted by:   Kazutaka YOKOTA yokota@FreeBSD.ORG
1998-09-15 18:16:39 +00:00
Justin T. Gibbs
bd9d336e40 Obsoleted by CAM. 1998-09-15 10:40:55 +00:00
Justin T. Gibbs
26dc5ba614 The Buslogic driver is smart enough to set it's own interrupt vector now. 1998-09-15 10:04:08 +00:00
Justin T. Gibbs
b2dfb1f906 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
		mike@smith.net.au (Mike Smith)
1998-09-15 08:15:30 +00:00
Justin T. Gibbs
5d55526b65 Adaptec 154X SCSI-Host Adapter driver for CAM.
Submitted by:	Warner Losh <imp@village.org>
1998-09-15 07:39:55 +00:00
Justin T. Gibbs
532abf3b7a Mylex/Buslogic MultiMaster SCSI-Host Adapter Driver for CAM. 1998-09-15 07:32:57 +00:00
Justin T. Gibbs
a5a2d1bfe9 Advance Systems SCSI Host Adapter driver for CAM. Currently only support
the 8bit SCSI AdvanSys products.
1998-09-15 07:03:43 +00:00
Søren Schmidt
d024c95599 Remove the SLICE code.
This clearly needs alot more thought, and we dont need this to hunt
us down in 3.0-RELEASE.
1998-09-14 19:56:42 +00:00
Søren Schmidt
c77c6e0cbb Make /dev/vga a softlink to /dev/ttyv0 under DEVFS using /etc/rc.devfs
Remove the hack from syscons that added a /dev/vga node in DEVFS
it broke root acces on ttyv0 because dev_mkdb screwed up.
1998-09-14 09:14:46 +00:00
Eivind Eklund
dfef928b1c Support PnP compatibility IDs. This allow e.g. the ed driver to pick
up any PnP NE2000 compatible card, instead of forcing us to always
update ID lists.

Submitted by:	Ugo Paternostro <paterno@dsi.unifi.it>
1998-09-13 22:15:44 +00:00
Nicolas Souchu
41990851b8 invalid printf call fixed -> compile time warning removed 1998-09-13 20:57:06 +00:00
Nicolas Souchu
54ad6085b1 ppbus enhanced to support ZIP+ : microseq improved 1998-09-13 18:26:44 +00:00
Warner Losh
89afdb2434 Print warning about block size not being optimal once per open rather than
once per offending write.
1998-09-09 17:20:32 +00:00
Søren Schmidt
eeded4d82e Add new atapi-cd driver that supports atapi CD-R/RW drives.
This is only a stop-gab solution to get atapi burner support into 3.0.
1998-09-08 20:57:47 +00:00
Luigi Rizzo
ac38e6e338 fix a problem with our definition of SNDCTL_DSP_GETBLKSIZE, to let
the FreeBSD x11amp work (same as in -stable)
1998-09-08 07:21:00 +00:00
Tor Egge
572d053e17 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
Luoqi Chen
02c71890cd Make irq forwarding truely functional. 1998-09-04 23:03:04 +00:00
Nicolas Souchu
4e190a62f8 Reviewed by: Doug Rabson
Submitted by:	nsouch
Philips PCF8584 chipset support. Chipset controller for the I2C bus.
1998-09-03 21:01:22 +00:00
Nicolas Souchu
edcfcf270b printing with compatible mode fixed if ECP available + more verbose if bootverbose set 1998-09-02 20:34:34 +00:00
Mike Smith
8abff6b13b Enable duplex autodetection if UTP media are autodetected.
Add a sysctl 'machdep.cs_recv_delay' to specify how long to wait after
receiving a packet in order to check for a subsequent (back-to-back)
packet.  The cs8900 has a very small receive buffer, so this helps avoid
overflows at the cost of some extra CPU overhead.

Submitted by:	Oleg Sharoiko <os@rsu.ru>, MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
1998-08-27 22:41:18 +00:00
Bruce Evans
00671271c3 Fixed printf format errors. Only one left in LINT on i386's. 1998-08-24 02:28:16 +00:00
Poul-Henning Kamp
be18fc123b remove bdevsw arg from dsopen();
Forgotten by:	julian
Reviewed by:	bde
1998-08-23 20:16:35 +00:00
Bruce Evans
1fcee46997 Fixed printf format errors. 1998-08-23 10:16:26 +00:00
Bruce Evans
ae5a10cad0 Fixed printf format errors. `struct eisa_device' uses a strange type
for the unit number (like most SCSI drivers).
1998-08-23 10:12:12 +00:00
Bruce Evans
3441a318d8 Fixed printf format errors.
Fixed style bugs in the int to u_long ioctl command arg changes.  This
driver doesn't use the u_foo BSDism.

Don't smash ioctl command args back to int.
1998-08-23 09:57:09 +00:00
Bruce Evans
cf8c7b0963 Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read().

Cleaned up the cdevswitch initializers for all tty drivers.

Removed explicit calls to ttsetwater() from all (tty) drivers.  ttsetwater()
is now called centrally for opens, not just for parameter changes.
1998-08-23 08:26:42 +00:00
Bruce Evans
87c95fa5dc Removed cxpoll(). Just use ttpoll() like all other tty drivers. It's
equivalent except for the bad-minor-number case (which probably can't
happen).
1998-08-23 07:52:48 +00:00
Mike Smith
b63b587cb3 A better fix for kern/7144:
The check for dropping unicast packets not sent to our ethernet
address is after the bpf tap, but not conditioned on it.  All packets
received should get handed to bpf, and unicast packets not to us (mac)
should get dropped whether or not there is a bpf listener.  I believe
that the common optimization that the interface is in hw promisc mode
iff there is a bpf listener is in general wrong, but more frequently
so on wavelans.

I think Max's fix makes bpf listeners not see unicast packets sent to
others, but I'm not sure.

One can argue that checking on MOD_ENAL is wrong, but the code only
drops packets that shouldn't be received.  The correctness condition
is that it be run whenever unicast packets without our mac address can
be received.

PR:		kern/7144
Submitted by:	Greg Troxel <gdt@ir.bbn.com>
1998-08-20 05:49:59 +00:00
Bruce Evans
e4b6edc65b Fixed bogus spelling nx*' of some no*' devswitch functions. 1998-08-20 05:48:17 +00:00
Bruce Evans
4a74956bf7 Fixed devfs initialization which I broke in the previous commit.
Fixed an old name and disorder in the sio dictionary.
1998-08-20 05:21:50 +00:00
Bruce Evans
9a02ad618f Fixed devfs initialization which I broke in the previous commit. 1998-08-20 05:12:48 +00:00
Bruce Evans
3fd2d29816 Enabled dynamically sized tty input buffers (with enough buffering
for 1 second's worth of input) and larger tty output buffers.  The
interrupt-level buffers are still too small for speeds above 115200
bps (only a little too small for 230400 bps if RTS flow control is
enabled).

Don't call ttsetwater() explicitly in open().  It is now called for
the TTYDISC l_open() and should be static.

Don't attempt to register the cdevsw more than once.
1998-08-19 04:17:38 +00:00
Joseph Koshy
db1ab08ec9 Correct handling of ASCII DEL (0x7F).
I don't have access to a real VT220 to verify this against.
However, I'm committing the patch in `good faith' because
(a) getting hold of a real VT220 is going to be increasingly difficult
    the longer the PR sits around,
(b) some one was troubled enough to in a PR and
(c) the fix is minor and has no other implications.

PR: 7559
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
1998-08-19 03:39:40 +00:00
Joseph Koshy
1d26c935fe Correct glyph displayed by PCVT in ISO Latin-1 mode.
PR: 7610
Submitted-by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
1998-08-19 03:07:16 +00:00
Søren Schmidt
95332616af Fix one forgotten instance of \n to \r 1998-08-18 07:36:47 +00:00
Bruce Evans
0492d857d1 Removed unused includes. 1998-08-17 19:09:36 +00:00
Bruce Evans
c31c5c44b0 Fixed a type mismatch.
Fixed a missing extern declaration (bug for bug compatibly including
style bugs.  Should probably be static).
1998-08-17 18:47:36 +00:00
Bruce Evans
162886e237 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
Bruce Evans
86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Bruce Evans
9d97be3511 Cast an int to (intptr_t) before casting it to (void *).
Don't cast a pointer to a long just to print it.
1998-08-16 01:04:48 +00:00
Bruce Evans
5014fe3b58 Fixed yet more ioctl breakage due to the type of the `cmd' arg chaninging
from int to u_long but not changing here.
1998-08-16 00:57:07 +00:00
Bruce Evans
8705accbe7 Use offsetof() to avoid some casts from pointers to integers (of a
possibly different size).
1998-08-15 21:36:16 +00:00
Søren Schmidt
45696a866c Only write a filemark on close when data has actually been written. 1998-08-14 15:54:57 +00:00
Søren Schmidt
b5be0bd29d Changed \n to \r in the mouse cutbuffer, this makes pine & Emacs
behave better when using the cut&paste functionality.

Submitted by: Barry Bierbauch <pivrnec@vszbr.cz>
1998-08-14 06:32:03 +00:00
Mike Smith
87fffb7ca3 Fix BNC/AUI autodetection.
Submitted by:	MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
Submitted by:	Oleg Sharoiko <os@rsu.ru>
1998-08-13 20:31:17 +00:00
Bruce Evans
87543489d0 Cleaned up previous commit, mainly by moving repetitive calculations
of invariants to cyattach().

Fixed minor bugs:
- cyparam() returned without restoring the ipl in the error cases.  This
  was harmless because cyparam() is always called at spltty().
- one check for "rev. J or higher" actually checked for precisely rev. J.
1998-08-13 19:03:22 +00:00
Bruce Evans
fc64b69498 Updated for not-so-new version of Cyclom-Y boards (with 60MHz clock and
swapped RTS/DTR).  Merge the vendor's modification of the 2.2.6-release
version into -current for reference.  Will be cleaned up in next commit.

Obtained from:	ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/2.2.6/cyy226.tar.gz
1998-08-13 13:54:10 +00:00
Bruce Evans
001ca7cc09 Removed support for FreeBSD-1.x. 1998-08-12 18:32:42 +00:00
Bruce Evans
3dcbf6cec0 Fixed printf format errors.
Removed support for FreeBSD-1.x.
1998-08-12 18:16:38 +00:00
Bruce Evans
0e4801883f Removed unused includes. 1998-08-12 18:02:48 +00:00
Bruce Evans
9b94cfc031 Don't depend on "implicit int". 1998-08-11 17:22:42 +00:00
Bruce Evans
92971f1fd7 Register tty software interrupt handlers at run time using register_swi()
instead of at compile time using ifdefs.

Use _swi_null instead of dummycamisr.  CAM and dpt should call
register_swi() instead of hacking on ihandlers[] directly.
1998-08-11 17:01:32 +00:00
Bruce Evans
18c5a6c435 Implemented dynamic registration of software interrupt handlers. Not
used yet.

Use dummy SWI handlers to avoid some checks for null pointers.
1998-08-11 15:08:13 +00:00
Bruce Evans
8f5eb45899 Fixed null setting of multiple wakeup prevention variable.
Fixed printf format errors.
1998-08-10 20:47:22 +00:00
Bruce Evans
b97fc94873 Use [u]intptr_t instead of [unsigned] long to convert and/or represent
pointers.

This finishes fixing conversions between pointers and integers of
possibly different sizes in GENERIC.
1998-08-10 17:21:49 +00:00
Bruce Evans
c41141b002 Fixed the formatting of some tables (mainly the one produced by ps
in ddb) which I broke by changing %8[l]x to %8p.  Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero.  The tables are still horribly misformatted on
64-bit machines.

Use %p instead of %8p to print pointers when the field width isn't
important.
1998-08-10 14:27:34 +00:00
Kazutaka YOKOTA
4da170bcf6 A workaround for screen flicker; eliminate some I/O access to the VGA
chip.

It has been observed that the problem is most apparent:

a) in notebook computers,
b) and/or in the systems with C&T video chips.

Define the new configuration option SC_BAD_FLICKER in the kernel
configuration file to remove outb()/outw() calls in question.
1998-08-10 08:39:19 +00:00
Poul-Henning Kamp
22126f4208 The machine dependent disk slice manager does not recognize
DOS partition type 15 (Extended DOS, LBA) as a container for
DOS logical volumes, so the appropriate slices (e.g. sd1s5)
are not initialized.

PR:		7549
PR:		4120
Reviewed by:	phk
Submitted by:	Jim Mattson <jmattson@sonic.net>
1998-08-10 07:22:14 +00:00
Jordan K. Hubbard
afc2d1c74e A few misc changes to get the spigot and meteor board working in 3.0.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1998-08-08 19:26:08 +00:00
Mike Smith
46f3ff7986 Major ppbus updates from the author.
- ppbus now supports PLIP via the if_plip driver
 - ieee1284 infrastructure added, including parallel-port PnP
 - port microsequencer added, for scripting the sort of port I/O
   that is common with parallel devices without endless calls up and down
   through the driver structure.
 - improved bus ownership behaviour among the ppbus-using drivers.
 - improved I/O chipset feature detection

The vpo driver is now implemented using the microsequencer, leading to
some performance improvements as well as providing an extensive example
of its use.

Reviewed by:	msmith
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1998-08-03 19:14:33 +00:00
Kazutaka YOKOTA
88a5f0cca7 1. Reorganized screen saver related code so that both the LKM screen
saver and splash screen can all work properly with syscons.  Note that
the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it
requires additional code from msmith.

- Reorganized the splash screen code to match the latest development
  in this area.
- Delay screen switch in `switch_scr()' until the screen saver is
  stopped, if one is running,
- Start the screen saver immediately, if any, when the `saver' key is
  pressed. (There will be another commit for `kbdcontrol' to support
  this keyword in the keymap file.)
- Do not always stop the screen saver when mouse-related ioctls
  are called.  Stop it only if the mouse is moved or buttons are
  clicked; don't stop it if any other mouse ioctls are called.

2. Added provision to write userland screen savers.  (Contact me if you
are interested in writing one.)

- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to
  support userland screen savers.

3. Some code clean-ups.
1998-08-03 11:30:45 +00:00
Kazutaka YOKOTA
855458e47b - When the system is shut down, switch to the vty0 if possible.
- Don't try to ring bell when system is going down. Beacuse the clock
  code is about to be stopped, the timeout routine won't be called
  anymore.
1998-08-03 09:18:58 +00:00
Kazutaka YOKOTA
2f803c851e Fix the bug which always reallocated the cut buffer whenever
the screen mode is changed even if another vty has larger size.
Reallocate the buffer only when the new screen size is larger than
the current cut buffer size.
1998-08-03 09:17:06 +00:00
Kazutaka YOKOTA
16d7bd5278 Don't accept the blank time value, if it is too big.
PR: bin/6188
1998-08-03 09:15:36 +00:00
Kazutaka YOKOTA
30f3a4598b - Add new bell types: "quiet.normal" and "quiet.visual".
When bell is of "quiet" types, the console won't ring (or flush)
  if the ringing process is in a background vty.
  PR: i386/2853

- Modify the escape sequence 'ESC[=%d;%dB' so that bell pitch and
  duration are set in hertz and msecs by kbdcontrol(1).
  There will be a corresponding kbdcontrol patch.
  PR: bin/6037
  Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)
1998-08-03 09:09:35 +00:00
Bruce Evans
34e9dea435 Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICE
and DSO_NOLABELS flags prevent searching for slices and labels
respectively.  Current drivers don't set these flags.  When
DSO_NOLABELS is set, the in-core label for the whole disk is cloned
to create an in-core label for each slice.  This gives the correct
result (a good in-core label for the compatibility slice) if
DSO_ONESLICE is set or only one slice is found, but usually gives
broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS
is set.
1998-07-30 15:16:06 +00:00
Bruce Evans
7010319f16 Fixed sign extension bugs awoken by changing speed_t to an unsigned
type.  19200, 1200 and other relatively uninteresting speeds were
broken.

Submitted by:	Rob Mallory <rmallory@qualcomm.com>
1998-07-29 18:48:20 +00:00
Bruce Evans
5c1a1eae83 Fixed error handling:
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
  buffers.  Undead DMA corrupted the malloc freelist fairly consistently
  in the following configuration: SLICE kernel, 2 floppy drives, no disk
  in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout().  Doing so gave an "extra"
  interrupt which was usually misinterpreted as being for completion
  of the next FDC command; the interrupt for completion of the next
  FDC command was then usually misinterpreted...  There were further
  complications for interrupts latched by the soft-spl mechanism so
  that they were delivered after all the h/w interrupts went away.
  This caused at least wrong head settle delays and may be why the
  FreeBSD floppy driver seems to munch floppies more than most floppy
  drivers.  The reset was unnecessary anyway in cases that didn't have
  the bug described next, since is was repeated a little later for
  the IOTIMEDOUT state.  The state machine has complications to handle
  resets correctly, so just use it.
- Don't call retrier() from fd_timeout().  The IOTIMEDOUT state needs
  to be processed next, and it isn't valid to set to that state if
  retrier() has aborted the current transfer.  Doing so caused null
  pointer panics after the previous bug was fixed.

Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
  doing the next i/o.  New fdc flag for this.  This fixes spurious
  warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
  for the results from reset if we actually reset.  This fixes spurious
  warnings for other paths to STARTRECAL.  [Oops, it may break reset
  handling for motor-off resets.]

Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
  for i/o.
- Don't handle the bp == 0 case.  This case can't happen for i/o.
- Don't check for controller-busy.  We know it must be.
- Don't print anything.  retrier() already prints too much for normal
  errors.
- Fudge the state differently so that the state machine advances
  fdc->retry and the status is invalid (perhaps this should fudge a
  valid state like the one for WP).
- Style fixes.
1998-07-29 13:00:42 +00:00
Jonathan Lemon
a69546de82 Extend cpl workaround so that it applies when we are returning to
user-mode as well as vm86 mode.
1998-07-27 16:51:33 +00:00
Bruce Evans
f69c53b019 Don't pass the label to diskerr(), since the label is being constructed
and may be invalid.  In particular, d_secpercyl may be 0, and diskerr()
divides by it.
1998-07-25 16:35:06 +00:00
Mike Smith
b16d163da1 Add the 'cs' driver for Crystal Semiconductor CS89x0 devices. This
supports PnP and if_media.  I've been running a slightly older version
here for several weeks now.
Submitted by:	Maxim Bolotin <max@rsu.ru>
1998-07-20 20:00:43 +00:00
Mike Smith
2512c3e67b Add support for PCNet PCI chips that only work when we talk to them as ISA
devices. Specifically fix the case for the Hitachi version as used in
their VisionBook models.

Submitted by:	Ted Faber <faber@isi.edu>
1998-07-20 17:33:01 +00:00
Bruce Evans
92d1f65ed2 Moved allocation of the slices struct to the right place. Initialize
everything in it (the devsw pointers were not initialized early or at
all for the !DEVFS case, but this was harmless on i386's).
1998-07-20 13:39:45 +00:00
Bruce Evans
f2bd332e7c Stop physical DMA for the non-auto case in isa_dmadone(). This fixes a
small part of a bug suite beginning in the SLICE probes but mostly in the
floppy driver.  This is a quick fix: the auto case shouldn't be special;
DMA should also be stopped in isa_dma_release(); isa_dmastop() probably
shouldn't exist; common DMA registers should not be accessed without
locking.
1998-07-19 04:22:55 +00:00
Bruce Evans
e5d7d24361 Fixed error handling after a seek error that can't happen. When the
controller reports a successful seek, it is very unlikely to report
seeking to a cylinder other than the one requested, but we check for
this, and botched the error handling for the requested_cylinder != 0
case.  This error happened when the bug fixed in rev.1.52 of <sys/buf.h>
caused the head of buffer queue to change to one starting on a different
cylnder - the requested cylinder was found, but it wasn't what we
thought we requested.  The fix is simply to arrange to reset the state
machine.

Corruption of the buffer queue seems to only have been a problem in the
floppy driver.  Other drivers dequeue the head of the queue before doing
physical i/o on it, so the corruption at worse broke the elevator sort
order.  Dequeueing breaks it anyway.
1998-07-18 03:15:33 +00:00
Bruce Evans
18da528d41 Changed %n to %r in devfs name format strings. %n has almost gone away. 1998-07-15 12:18:34 +00:00
Bruce Evans
1be1e72fd8 Don't cast pointers to longs in asm statements.
These asm statments are not quite as pessimal as when I complained
about them in rev.1.9 of audio.c.  They seem to be only 40% slower
than the C version on P5's and the same speed on K6's.
1998-07-15 11:47:58 +00:00
Bruce Evans
51d5e97efa The ioctl request arg is unsigned log, so don't attempt to pass it
around as signed int.

Fixed printf format error for ioctl request arg hidden in ifdefed code.
1998-07-15 10:11:21 +00:00
Bruce Evans
29d6b96d69 The ioctl request arg is unsigned long, so don't attempt to pass it
around as signed int.
1998-07-15 09:59:31 +00:00
Bruce Evans
ea878c61f1 Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.
1998-07-15 09:38:10 +00:00
Bruce Evans
3cc954df66 Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.  Doing so broke i386's with 64-bit
longs.
1998-07-14 11:42:05 +00:00
Bruce Evans
8f5aca410f Don't pretend to support ix86's with 16-bit ints and 32-bit registers
by using longs just to ensure 32-bit variables.  Long variables don't
fit in 32-bit registers on ix86's with 64-bit longs.
1998-07-14 06:17:28 +00:00
Bruce Evans
9bffbcd4f5 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
Julian Elischer
ad27f8d9a5 SLICE probing becomes asynchronous. It can now be triggered by
interupt level events. This needs a lot of cleanup, but has been working
here for a month or two.. originally needed for CAM integration
but that hasn't happenned yet. The probing  state machines for each
handler should be replaced by a more generic state-service. It's
still quite messy in there..
1998-07-13 08:23:05 +00:00
Poul-Henning Kamp
3bc7e56592 Improve a couple of comment.
PR:		7242
Reviewed by:	phk
Submitted by:	Peter Jeremy <peter.jeremyp@alcatel.com.au>
1998-07-11 08:01:18 +00:00
Bruce Evans
ac1e407b32 Fixed printf format errors. 1998-07-11 07:46:16 +00:00
Bruce Evans
a838d83d8f Don't pretend to support ix86's with 7-bit ints by using longs just to
ensure 8-bit variables.  Doing so mainly bogotified some printf formats.
1998-07-11 06:35:39 +00:00
Eivind Eklund
c8cedb4e27 "vender" -> "vendor"
Requested by:	Aage Røbekk <aagero@aage.priv.no>
1998-07-06 16:10:06 +00:00
Warner Losh
f71f5262b1 Add the ability to suspend as well as hibernate to the system. This
is the kernel part of my commits, the userlevel stuff will be done in
a separate commit.  Add the ability to suspend as well as hibernate to
syscons.  Create a new virtual key like hibernate for suspend.  Update
apm_bios.h to define more apm bios goodies.
1998-07-06 06:29:07 +00:00
Julian Elischer
f7ea2f55d1 There is no such thing any more as "struct bdevsw".
There is only cdevsw (which should be renamed in a later edit to deventry
or something). cdevsw contains the union of what were in both bdevsw an
cdevsw entries.  The bdevsw[] table stiff exists and is a second pointer
to the cdevsw entry of the device. it's major is in d_bmaj rather than
d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers
to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw).

rawread()/rawwrite() went away as part of this though it's not strictly
the same  patch, just that it involves all the same lines in the drivers.

cdroms no longer have write() entries (they did have rawwrite (?)).
tapes no longer have support for bdev operations.

Reviewed by: Eivind Eklund and Mike Smith
	Changes suggested by eivind.
1998-07-04 22:30:26 +00:00
Jordan K. Hubbard
24fa2d131e Check for missing keyboard.
PR:		7108
Submitted by:	Hellmuth Michaelis <hm@hcs.de>
1998-07-03 14:34:28 +00:00
John-Mark Gurney
a9e837f479 document options to hardwire GUS irq/dmas... 1998-06-30 08:24:02 +00:00
Poul-Henning Kamp
761b9eeed9 Add D_DISK flag. 1998-06-26 18:13:57 +00:00
Poul-Henning Kamp
b62591052c Remove bdevsw_add(), change the only two users to use bdevsw_add_generic().
Extend cdevsw to be superset of bdevsw.
Remove non-functional bdev lkm support.
Teach wcd what the open() args mean.
1998-06-25 11:28:07 +00:00
Kazutaka YOKOTA
bf41934ccb Don't refer to mouse_info.u.datea.[xyz] while processing MOUSE_BUTTON_EVENT
ioctl.  These fields don't have valid values for this ioctl.
PR: kern/6928
Submitted by: Bill Fenner <fenner@parc.xerox.com>
1998-06-24 10:21:30 +00:00
Poul-Henning Kamp
e29bc9add4 Avoid some panics in sio_unload which gets called with various dirt
if the attach of a modem card failed.
1998-06-24 09:23:32 +00:00
Bruce Evans
be160d60ab Removed unused includes. 1998-06-21 18:02:50 +00:00
Bruce Evans
86ef30b746 Removed unused includes.
Ifdefed conditionally used includes.
1998-06-21 17:08:08 +00:00
Bruce Evans
2d7fa8d877 Removed unused includes.
Ifdefed conditionally used includes.
Finished rev.1.39.  (I only submitted the request.)
1998-06-21 16:51:06 +00:00
Bruce Evans
4d2540b074 Removed unused includes.
Don't depend on "implicit int".
1998-06-21 15:54:11 +00:00
Bruce Evans
2773aa0ef6 Removed unused includes.
Don't depend on "implicit int".
Don't bloat the data section with explicit initialization to 0.
1998-06-21 15:49:39 +00:00
Bruce Evans
e5b19842ef Removed unused includes. 1998-06-21 14:53:44 +00:00
Bruce Evans
316bbd5c6f Converted add_interrupt_randomness() to take a `void *' arg. Rewrote
mmioctl() to fix hundreds of style bugs and a few error handling bugs
(don't check for superuser privilege for inappropriate ioctls, don't
check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't
return EPERM for null changes).
1998-06-21 11:33:32 +00:00
Bruce Evans
5a2ae61fec Converted isa_strayintr() to take a `void *' arg. 1998-06-18 16:08:46 +00:00
Bruce Evans
9a2daf9190 Changed the type of an isa/general interrupt handler to take a
`void *' arg.  Fixed or hid most of the resulting type mismatches.
Handlers can now be updated locally (except for reworking their
global declarations in isa_device.h).
1998-06-18 15:32:09 +00:00
Bruce Evans
a5211c115d Renambed sbintr to sb_intr to avoid a conflict with the (now
unconditionally declared although it can't be configured together
with snd) extern function sbintr.
1998-06-17 16:59:30 +00:00
Bruce Evans
e9b998f0be Don't depend on <sys/conf.h> declaring isa device structs or isa
interrupt handlers.  pcm is not in LINT, so it is hard to test.
1998-06-17 16:54:22 +00:00
KATO Takenori
a880d1a224 Declare bsintr when PC98 is defined. 1998-06-17 16:32:23 +00:00
Bruce Evans
084d9853ca Don't declare isa device structs or isa interrupt handlers in <sys/conf>,
and don't depend on them being declared there.  This will cause lots of
warnings for a few minutes until config is updated.  Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
1998-06-17 14:58:04 +00:00
Bruce Evans
f878d7eebd Include <i386/isa/pnp.h> after including its prerequisite
<i386/isa/isa_device.h> - don't depend on pollution in <sys/conf.h>
including the prerequisite earlier.
1998-06-17 14:01:00 +00:00
Bruce Evans
b6f37c1954 Added used include of <i386/isa/isa_device.h> - don't depend on
pollution in <sys/conf.h>
1998-06-17 13:54:59 +00:00
Bruce Evans
eca52014bd Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).

Discard events on going-away devices too.  Endless loops may have
been possible when an active pccard was removed.
1998-06-16 11:05:59 +00:00
Bruce Evans
26d7294956 Avoid 64-bit divisions and modulos. Fixed related overflows for weird
args.

This driver should not be used, since it calls uiomove() with interrupts
disabled.
1998-06-14 10:52:52 +00:00
Steve Price
396ffb2e6b Add a macro tweak.
PR:		6932
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-13 19:36:22 +00:00
Steve Price
56cef66e8c Add a symlink from /dev/vga to /dev/ttyv0 when using DEVFS
for programs like doscmd.

PR:		6920
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1998-06-13 18:53:22 +00:00
Poul-Henning Kamp
4342fa9172 Correct name and number for sxdc modules
PR:		6891
Reviewed by:	phk
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-10 12:49:54 +00:00
Poul-Henning Kamp
a58f0f8e66 Add a tc_ prefix to struct timecounter members.
Urged by:	bde
1998-06-09 13:10:54 +00:00
Bruce Evans
a09bee1aa8 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
Søren Schmidt
1747fd3131 Correct even more ioctl breakage :(
Doesn't people check their code before committing anymore, it could
at least compile  ????
1998-06-08 09:00:28 +00:00
Bruce Evans
387905a6b3 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (don't do this in one case where it would change the
object file)).
1998-06-08 08:50:43 +00:00
Bruce Evans
ea0be99955 Updated yet another ioctl, and put wst in LINT to inhibit further bitrot. 1998-06-08 06:18:53 +00:00
Poul-Henning Kamp
48115288df Add a member function more to the timecounters, this one is for use
with latch based PPS implementations.  The client that uses it will
be committed after more testing.
1998-06-07 20:36:55 +00:00
Doug Rabson
498b291e26 Fix some more ioctls which I missed becausese they were hidden by options
which were not in LINT.
1998-06-07 19:40:41 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
Poul-Henning Kamp
dbb3475507 Add a "this" style argument and a "void *private" so timecounters can
figure out which instance to wount with.
1998-06-07 08:40:53 +00:00
Steve Price
810e1311d2 keymap -> key_map so that the kernel will compile with
-DESKEYMAP.

PR:		6864
Submitted by:	Javier Rueda <jmrueda@diatel.upm.es>
1998-06-06 17:45:11 +00:00
Bruce Evans
12e1ed28e2 Force success of the probe (after doing it as before except in one
miscconfigured case) if the port is the console.  This fixes several
bugs:
- if all sioprobe()s failed, then the console driver followed null
  pointers in cdevsw[].
- if the sioprobe() for the console failed but another sioprobe()
  succeeded, then init hung early when the console couldn't be
  opened.
- it was silly for the console to not be there after printing boot
  messages on it.
Bugs introduced by this are hopefully no worse than old ones caused
by forcing the success of the `cn' level probe.
1998-06-03 12:30:10 +00:00
Bruce Evans
b76bb1d472 Fixed a printf() arg botch in the previous commit.
Only complain about an irq mismatch in the probe if the configured
irq doesn't become active, and then print the bitmap of irqs that
became active (including clock irqs) instead of just the first
(not including clock irqs).

Bugs reported by: msmith
1998-06-03 09:43:38 +00:00
John Dyson
e8f367853b Correct sleep priority. 1998-06-02 05:39:13 +00:00
Bruce Evans
cd55b8f46c Converted the ICU-level interrupt tests (3, 5 and 8) in sioprobe() into
a test of the irq number, and made failure of this test non-fatal.
Removed related unused complications for the APIC_IO case.  Removed the
no-test3 flag.

Deverbosified the failure messages for the other tests.  Removed the
per-port verbose flag - just use the general verbose flag.
1998-05-31 10:53:55 +00:00
Poul-Henning Kamp
bfb925ba31 most recent code for Loran driver. 1998-05-29 08:04:44 +00:00
Poul-Henning Kamp
e796e00de3 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
Paul Richards
aa6b464e36 Fix some bitrot in the multicast support, the move from TAILQ macros wasn't implemented fully. 1998-05-27 11:05:17 +00:00
Paul Richards
697990295f This time add an Id string that'll actually get expanded :-) 1998-05-27 09:59:13 +00:00
Paul Richards
f0a5342dc5 Add an ID string (can't believe it never had one!) 1998-05-27 09:58:00 +00:00
Jonathan M. Bresler
29c98bc624 code was using wrong temporary variable "i", in place of "j".
i contains the contents of the EP_W0_CONFIG_CTRL register.
	i was being used as the array index into an array on the stack.

	j is initialized to 0 as it should be.

PR:		kern/6757
Reviewed by:	jmb
Submitted by:	Stephane E. Potvin <sepotvin@videotron.ca>
1998-05-26 02:28:18 +00:00
Poul-Henning Kamp
d53fd54d9f LoadSoftModem() routine at sio.c does not trap general serial I/Os.
It fauls to probe eather DSI Modem or others.

PR:		4657
Reviewed by:	phk
Submitted by:	Kenji Saito <marukun@mx2.nisiq.net>
1998-05-20 06:46:58 +00:00
Poul-Henning Kamp
4b9afc97a7 Change a data type internal to the timecounters, and remove the "delta"
function.

Reviewed, but not entirely approved by: bde
1998-05-19 18:48:30 +00:00
Tor Egge
2f1e70693d Add forwarding of roundrobin to other cpus. This gives a more regular
update of cpu usage as shown by top when one process is cpu bound
(no system calls) while the system is otherwise idle (except for top).

Don't attempt to switch to the BSP in boot().  If the system was idle when
an interrupt caused a panic, this won't work.  Instead, switch to the BSP
in cpu_reset.

Remove some spurious forward_statclock/forward_hardclock warnings.
1998-05-17 22:12:14 +00:00
Tor Egge
167a4d818c Use a higher priority interrupt vector for 8254 timer interrupts. 1998-05-17 21:15:18 +00:00
Poul-Henning Kamp
c21410e119 s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g

Reviewed by:	bde
1998-05-17 11:53:46 +00:00
Poul-Henning Kamp
bdb8446393 The PnP code in 2.2.6 detects the Motorola ModemSurfer 56K,
but doesn't do much of anything with it.  I added it to siopnp_ids[]
and it was found and recognized as a serial port.

PR:		6605
Reviewed by:	phk
Submitted by:	Dave Marquardt <marquard@zilker.net>
1998-05-13 07:26:55 +00:00
Søren Schmidt
e855c8bedc Oops, only apply the CHS size from lbasize thing when disk reports
"too big for CHS" ie 16383 cyls..
1998-05-11 15:30:43 +00:00
Steve Price
a396970306 Add support for the Yamaha YMF-719.
PR:		6348
Submitted by:	Yoshiak Uchikawa <yoshiaki@kt.rim.or.jp>
1998-05-10 23:53:27 +00:00
Julian Elischer
d210b3552c cleanup:
take out duplicated dump code
1998-05-07 01:15:23 +00:00
Julian Elischer
9b7408fe46 There is no dump routine for fd so give it an explicit NULL entry
in the SLICE table.
1998-05-06 23:35:36 +00:00
Julian Elischer
7f2f1b784e Add dump support to the DEVFS/slice code.
now we can actually catch our crashes :-)

Submitted by: Luoqi Chen <luoqi@chen.ml.org> (the man who's everywhere)
1998-05-06 22:14:48 +00:00
Søren Schmidt
eb011aea8d Fix the 4-8G LBA geometry it was wrong.
Support >8G drives in CHS mode. This is done by guesstimating the
cylinder count from the LBA size reported. It works on my shiny
new Maxtor 11.5G drive, YMMV.

Reports from users of other big drives (read Quantum bigfoot's)
are welcome...
1998-05-05 14:27:26 +00:00
Poul-Henning Kamp
b4362367e0 Detect USR PnP x2 modem.
PR:		6496
Reviewed by:	phk
Submitted by:	Kurt D. Zeilenga <Kurt@Boolean.NET>
1998-05-04 10:35:13 +00:00
Bruce Evans
d86cac8647 Don't depend on "implicit int". 1998-05-01 18:30:02 +00:00
Bruce Evans
77849078bf Oops, the previous commit should have changed i386' to __i386__',
not `__i386'.
1998-05-01 16:40:21 +00:00
Julian Elischer
21a56c939e Submitted by: Doug Ambrisko <ambrisko@whistle.com>
make standard links for the first detected sound card.
1998-04-28 00:10:53 +00:00
Julian Elischer
1667f2b3e5 slice_device.c: permissions changes for SLICE devices
vn.c:		change time of SYSINIT scheduling.
wd.c		don't revert to fully closed state. ( may require more)
all in SLICE mode only.
1998-04-24 07:54:00 +00:00
Julian Elischer
1077fa97b3 When calling the open function, specify either FREAD and/or FWRITE
as leaving them both 0 has the same effect as not openning the device at all.
1998-04-23 22:09:55 +00:00
Eivind Eklund
57402d4df8 Add devfs support.
Submitted by:	somebody whose name escapes me :-(
1998-04-23 00:06:43 +00:00
Tor Egge
beede91e58 Mask the interrupt before setting the corresponding bit in ipending if
the interrupt is already active.
Don't use lock prefix for operations on ipending.
Always use lock prefix for operations on iactive.
1998-04-22 22:49:29 +00:00
Julian Elischer
afcdc872dc Bad144 support for the slice system (!)
Submitted by: luoqi@watermarkgroup.com (Luoqi Chen)

I'm amazed by this. Slice has only been checked in for 2 days..
1998-04-22 19:27:54 +00:00
Julian Elischer
26d3bf5f1b close() is no longer a SLICE method.
Close is simply an open with no-read and no-write once internal to SLICE
(it still exports a close to the rest of the kernel)
1998-04-22 10:25:27 +00:00
KATO Takenori
5e4832f65d PC-98 does not supports DMA automode lager than 65535 bytes. 1998-04-21 09:48:45 +00:00
KATO Takenori
bb9b85aaeb Supports PC-98 again. 1998-04-21 09:46:14 +00:00
Søren Schmidt
d264ed7a01 Enable DEVFS usage of the device (include opt_devfs.h> 1998-04-20 18:51:33 +00:00