Commit Graph

1127 Commits

Author SHA1 Message Date
Poul-Henning Kamp
9dc731e563 Typo in my last commit. 1995-12-22 15:52:07 +00:00
Bruce Evans
b3a96d8a4c Renamed private DEBUG macro to avoid warnings when DEBUG is an option. 1995-12-22 15:39:45 +00:00
Bruce Evans
4fa403fb86 Fixed permissions of /dev/pcaudio*. 1995-12-22 15:27:48 +00:00
Bruce Evans
aa67202b2b Fixed arg order in an outb() call. add_timer_randomness() clobbered
part of the DMA channel 0 address and wasn't random in the intended
way.
Submitted by:	KATO Takenori <kato@eclogite.eps.nagoya-u.ac.jp>

Disable interrupts while reading the clock.  This probably isn't
important (allowing interrupts probably increased randomness in
the usual case).

Removed __i386__ ifdef.  This file is in an i386 directory and has
other i386 dependencies.
1995-12-22 15:20:50 +00:00
Bruce Evans
526d7a354a Synced with sio.c. This fixed the DEVFS initialization. cy.c is
supposed to be identical with sio.c for hardware-independent details.
1995-12-22 15:02:22 +00:00
Bruce Evans
bfd6eab381 Fixed bugs introduced in rev. 1.127 (some broken 16650 support was
unintentionally committed):
- the fifo was completely disabled for low speeds.  Apart from being
  unnecessarily inefficient, this invalidated com->tx_fifo_size.
- `ftl' became a bogus name.
- the 16650 probe breaks the COM_NOFIFO() case and has other bugs
  (disabled, not fixed).

Fixed bogus change of the fifo settings for the non-speed of 0.  This
bug made the above fifo bug occur even at non-low speeds.

Fixed the modes of the cua devices.  It isn't possible to set the uid
and gid correctly since the kernel can't know who uucp.dialer is.

Register the devswitch at device attach time.  SYSINIT() is not
the right way to initialize devswitches (if anything :->).
Eventually, the devswitch should be deregistered at device detach
and/or unload time and reregistered at device attach time ...  Then
some com->gone tests could be removed.

Cleaned up some other recent changes.
1995-12-22 14:58:55 +00:00
Poul-Henning Kamp
df85d797f7 Remove crufty "pg" function. 1995-12-22 13:09:39 +00:00
Garrett Wollman
a8178e4bb6 Increase Pentium cyclecounter calibration time to 131072 us. This
experimentally seems to give better results on my machine.
1995-12-20 20:57:33 +00:00
David Greenman
2838c9682a Implemented a (sorely needed for years) double fault handler to catch stack
overflows.
It sure would be nice if there was an unmapped page between the PCB and
the stack (and that the size of the stack was configurable!). With the
way things are now, the PCB will get clobbered before the double fault
handler gets control, making somewhat of a mess of things. Despite this,
it is still fairly easy to poke around in the overflowed stack to figure
out the cause.
1995-12-19 14:30:50 +00:00
Poul-Henning Kamp
27a0b398a7 Staticize.
Unstaticize a function in scsi/scsi_base that was used, with an undocumented
option.
My last count on the LINT kernel shows:
Total symbols:  3647
unref symbols:   463
undef symbols:     4
1 ref symbols:  1751
2 ref symbols:   485
Approaching the pain threshold now.
1995-12-17 21:23:44 +00:00
Bruce Evans
cc3b5b8ba6 Return the i/o size, not a truth value, in the probe. 1995-12-16 21:37:58 +00:00
Bruce Evans
62f84fd1ba One less magic number. 1995-12-16 21:32:19 +00:00
Peter Wemm
15a76dc428 Another shot at getting working si DEVFS entries.. Apparently, it didn't
understand %02d in it's format string...
1995-12-16 14:03:02 +00:00
Bruce Evans
6ea3e9d839 Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.

pci now uses a different interrupt handler type for interrupts that it
dispatches and the isa interrupt handler type for the interrupts that
it handles.
1995-12-16 00:27:59 +00:00
David Greenman
51cdbfcdaf Changed arg type for pio functions.
Cast a few things appropriately to shut up the compiler.
1995-12-15 07:31:40 +00:00
Bruce Evans
0dfe10a65c Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.
1995-12-15 00:54:32 +00:00
Bruce Evans
bfd8f1484e Removed unused #includes. 1995-12-15 00:40:38 +00:00
Bruce Evans
28cc517d85 Removed duplicated #includes of <sys/conf.h> 1995-12-15 00:29:31 +00:00
Bruce Evans
44faa2919b Completed function declarations and added prototypes. Sorted prototypes. 1995-12-15 00:11:27 +00:00
Bruce Evans
d14122ea44 Fixed staticization of DDB functions. 1995-12-14 23:01:51 +00:00
Bruce Evans
d1022821ae Removed my devsw access functions [un]register_cdev() and
getmajorbyname() which were a better (sigh) temporary interface to
the going-away devswitches.

Note that SYSINIT()s to initialize the devswitches would be fatal
in syscons.c and pcvt_drv.c (and are bogus elsewhere) because they
get called independently of whether the device is attached; thus
devices that share a major clobber each other's devswitch entries
until the last one wins.

conf.c:
Removed stale #includes and comments.
1995-12-14 22:03:12 +00:00
Peter Wemm
73852f5e36 Update the skeleton DEVFS code to match reality a little closer.. :-) 1995-12-14 14:29:10 +00:00
Peter Wemm
60f17fcd9f Change the generic "btintr" function's name to "bt_intr" - the same as
all the other bt_XXX() functions in i386/scsi/bt*.

This the important effect of forcing a link error if the user is
still using the old "vector btintr" which is dangerously wrong
after Justin's updates to the driver.

The correct isa vector line for the bt driver is "vector bt_isa_intr".
Justin mentioned this in the commit message and updated LINT and
GENERIC.  This change is to enforce that.. :-)
1995-12-14 14:19:19 +00:00
Poul-Henning Kamp
85f689485d Staticize. 1995-12-13 10:36:03 +00:00
Poul-Henning Kamp
c08c8adcf5 Remove MACH_KERNEL, ORIGINAL, and ZP_DEBUG,
I should have done this before it was imported.
1995-12-13 10:35:36 +00:00
Justin T. Gibbs
09c30e3a1e Isa/VL probe portion of the Buslogic SCSI driver. 1995-12-12 08:50:54 +00:00
Poul-Henning Kamp
94e20eb776 Staticize 1995-12-11 09:26:18 +00:00
John Dyson
983d613468 Undo a change that should not have been committed with the 1Tb enhancements. 1995-12-11 05:02:52 +00:00
John Dyson
a316d390bd Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
Bruce Evans
cb8cad01f8 Unstaticized cx_cdevsw (it is used in if_cx.c).
Added a prototype.
1995-12-10 21:08:11 +00:00
Bruce Evans
81ab2caf0a Replaced nxreset by noreset (if the reset function gets called, then the
device must be configured.  It's hard to tell whether a reset function
should be noreset or nullreset since reset functions are never called.
Most drivers use nullreset but noreset has the advantage of complaining
if somehow gets called).
1995-12-10 20:54:38 +00:00
Bruce Evans
26ec204be0 Replaced nxmmap by nommap (if the mmap function gets called, then the
device must be configured).
1995-12-10 20:34:53 +00:00
Bruce Evans
690999827d Replaced scdsize by generic nopsize. 1995-12-10 20:10:23 +00:00
Bruce Evans
4439655d52 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:53:42 +00:00
Bruce Evans
f332b8a1d5 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:44:58 +00:00
Bruce Evans
c73feca0b7 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
Poul-Henning Kamp
6f4e0beb7e Staticize and cleanup. 1995-12-10 13:40:44 +00:00
Poul-Henning Kamp
3b0b66ee0e Staticize and cleanup.
Ohh, forgot this bit:
(covers sio.c too) recognize the 16650 too.
1995-12-10 13:40:33 +00:00
Bruce Evans
81c5b5f59a Moved vm includes out of centralized headers again. 1995-12-10 02:53:07 +00:00
Julian Elischer
4d92e19833 clean a few DEVFS things..
fix a bug where you couldn't place devices in the root directory
of devfs

remove deprecated routines

On my machine devfs now shows:
julian@erf.tfs.com:
julian@erf.tfs.com: ls -RF
bpf0            mem             ptypb           spkr            ttyp8
bpf1            null            ptypc           stderr          ttyp9
bpf2            pcaudio         ptypd           stdin           ttypa
bpf3            pcaudioctl      ptype           stdout          ttypb
console         pt              ptypf           tty             ttypc
cuaa0           ptyp0           random          ttyd0           ttypd
cuaia0          ptyp1           rsd0            ttyid0          ttype
cuala0          ptyp2           rsd1            ttyld0          ttypf
fd/             ptyp3           rvn             ttyp0           tun0
fd0.1440        ptyp4           rworm           ttyp1           urandom
fd1.1200        ptyp5           scsi/           ttyp2           vn
io              ptyp6           sd0             ttyp3           zero
kmem            ptyp7           sd1             ttyp4
lkm             ptyp8           snp0            ttyp5
log             ptyp9           snp1            ttyp6
lpt0            ptypa           snp2            ttyp7

./fd:
0       15      21      28      34      40      47      53      6       9
1       16      22      29      35      41      48      54      60
10      17      23      3       36      42      49      55      61
11      18      24      30      37      43      5       56      62
12      19      25      31      38      44      50      57      63
13      2       26      32      39      45      51      58      7
14      20      27      33      4       46      52      59      8

./scsi:
sctarg  ssc
julian@erf.tfs.com:

which is all devices really there except for disk slices/partitions..
(if I don't have it it's not there, which has GOT to be an improvement..)

no DEVFS fixes from device maintainers yet?
1995-12-09 09:11:25 +00:00
Poul-Henning Kamp
d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
Peter Wemm
cde694287a Implement detection of whether or not bounce-buffering is required
for the particular card in use.  At the moment, I've set it to any of
the bt445S VLB cards (not the bt445C which apparently work) and the
bt5xx series (isa cards).  The 742 and PCI cards should not need it. :-)

It may be useful to have something like this:
#ifndef BOUNCE_BUFFERS
  if (bounce_buffers_required && more_than_16MB_ram)
    panic("this card requires bounce buffers for more than 16MB ram!")
#endif
1995-12-07 09:13:48 +00:00
Bruce Evans
0310c19f5d Replaced #includes of <sys/user.h> by less gross headers, usually
<sys/vm.h>.  Many device drivers need only the definition of vtophys()
from vm.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:52:35 +00:00
Bruce Evans
86a1c05db0 Removed unnecessary #includes of <sys/user.h>. Some of these were just
to get the definitions of TRUE and FALSE which happen to be defined in
a deeply nested include.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:44:23 +00:00
David Greenman
21864bc400 Updated my copyright.
Fixed two cases of "=" that should have been "==" in card type comparison.
Simplified expression that checks for interface up/down.
Moved ed_ring_copy to before its first use so that it's inlined as intended.
Change mbuf allocation policy so that a received packet is stored in just
an mbuf header (no cluster) if it will fit in one.
1995-12-05 13:01:33 +00:00
David Greenman
4a5f1499b0 all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused.
Change the parameter passed to if_watchdog to be a ifnet * rather than
a unit number. All of this is an attempt to move toward not needing an
array of softc pointers (which is usually static in size) to point to
the driver softc.

if_ed.c:
Changed some of the argument passing to some functions to make a little
more sense.

if_ep.c, if_vx.c:
Killed completely bogus use of if_timer. It was being set in such a way
that the interface was being reset once per second (blech!).
1995-12-05 02:01:59 +00:00
Peter Wemm
80308cade5 aargh! I tested JREMOD, only to discover that the "good oil" part of
it for si.c was accidently inside some #ifdef DEBUG code....
1995-12-04 17:33:45 +00:00
Poul-Henning Kamp
dd05856fd3 I don't know what I messed up in 1.40, but the crynwr mode didn't make it.
Here it is then, I hope.
1995-12-02 20:33:40 +00:00