Commit Graph

3569 Commits

Author SHA1 Message Date
David Greenman
0305f20493 Changed timeout for requesting sense from 100ms to 1 second.
Submitted by:	gibbs
1997-02-14 03:13:37 +00:00
Bruce Evans
661e2ccd94 Changed #include order to match better order in 2.2. 1997-02-13 22:48:19 +00:00
Bruce Evans
8363c19687 Get defaults for the boot device (and flags) from the file
"boot.config" (relative to the root directory on the 'a' partition
on the first BSD slice) if it exists.  If it doesn't exist, then
the only visible changes should be that the kernel name isn't reset
to "/kernel" after looking it up fails and that the default name
is now "kernel".

The new function readfile() can be used for other things:
- reading help messages.
- reading splash screens.
- reading userconfig info.
1997-02-13 13:15:47 +00:00
Søren Schmidt
cc5625f0ed Oops, cut/paste could be done on tthe WRONG vty :(
pointed out by Kazu.
1997-02-13 11:58:49 +00:00
Bruce Evans
a7d00b5bf6 Moved definition of FUNCTION_ALIGNMENT to a machine-dependent place.
Changed it from 4 to 16 for i386's.  It can be anything for i386's,
but compiler options limit it to a power of 2, and assembler and
linker deficiencies limit it to a small power of 2 (<= 16).
We use 16 in the kernel to get smaller tables (see Makefile.i386 and
<machine/asmacros.h>).  We still use the default of 4 in user mode.

Use HISTCOUNTER instead of (*kcount) in the definition of KCOUNT()
for consistency with other macros.
1997-02-13 10:47:29 +00:00
Bruce Evans
47cac30b9a Align text to 16-byte boundaries if profiling is enabled. This will
allow a fourfold reduction in the size of the profiling buffers.  This
goes with rev.1.91 of Makefile.i386 which does the same thing for C
functions.
1997-02-13 08:31:53 +00:00
Mike Pritchard
dc14cd9f1b This no longer depends on NFS being defined so that it
can check for an NFS root.  With Lite2, the file system
type can be checked by checking if the rootfs name == "nfs".
1997-02-12 16:46:25 +00:00
Bruce Evans
56a956e530 Use a valid value for MSGSSZ
Don't specify PSM_CHECKSYNC twice.

Submitted by:	MSGSSZ by mi@aldan.ziplink.net
1997-02-12 09:47:31 +00:00
Steven Wallace
1a46116d9d Bug fix for SNDCTL_DSP_GETOSPACE ioctl. It would report 0 bytes
available in buffer when buffer was completely empty.
It now correctly reports the total buffer space available.

Reviewed by:	jkh, davidg
Obtained from:  Linux 1.3.20's sound driver code
1997-02-12 06:56:57 +00:00
Justin T. Gibbs
a042d32c0b Fix a bug in the reporting of residuals. The code was relying on the SG_COUNT
filed in the hardware SCB not changing during the course of a transaction.
Since the sequencer now DMAs the hardware SCB back up to the host when it
detects a residual, this is no longer the case.  I added a field to the
"software" scb to mirror this information and it is now used for doing the
residual calculation.
1997-02-11 17:10:37 +00:00
Bruce Evans
3d1713a8a5 Restored changes from rev.1.58-1.60 which were blown away by the
previous commit.
1997-02-11 15:03:31 +00:00
Julian Elischer
db03b748e3 really minor cleanup
sc is set to ifp->if_softc so use it..
1997-02-11 09:29:48 +00:00
Mike Pritchard
b49b12158f Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.

Also silenced a -Wall warning.
1997-02-10 16:34:16 +00:00
Mike Pritchard
59942ba155 Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.
1997-02-10 16:32:52 +00:00
Darren Reed
4b93480b2a IP Filter is now character device #79 1997-02-10 12:17:45 +00:00
John Dyson
996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
Justin T. Gibbs
21c89fbab3 ahc_search_qinfo->ahc_search_qinfifo
ULTRAENB->FAST20

Add a missing ahc_run_done_queue if a BRKADDRINT occurs.  This should never
happen (haven't heard of one happening), but it was still a bug.

Brought the ordered tag sending code up into the tag code to be clearer.

If we decide we should send an ordered tag, only do so for the target that
timed out instead of all targets.

Initialize the STAILQ in ahc_serach__qinfifo.  This was causing a panic
during some recovery operations.

Remove the unused varable maxtarget.
1997-02-09 03:26:56 +00:00
Poul-Henning Kamp
b7a652ab84 I have no idea what this is all about, but it works and Bruce hasn't
complained so it cannot be entirely bad :-)

I include the email that probably explains it for people who already know:

> >Compiling with -O3 inlines functions.  However the function that is being
> >inlined in makeinfo.c (add_word_args()) is a vararg function and must not be
> >inlined.
> >
> >The code in question is K&R style, and AFIK, there is no way for the compiler
> >to determine that the function uses vararg.  Either change the code to use
> >prototypes, or use stdarg, or add a directive to prevent inlining.
>
> Not declaring a varargs function as varargs before it is used gives
> undefined behaviour.
>
> However, in practice the bug is probably in FreeBSD's <varargs.h>, which
> doesn't use gcc's __builtin_next_arg().  gcc should notice that it is
> used and not inline functions that have it.  <stdarg.h.> uses it, but I
> think there's another gcc builtin that it should be using.

Patch attached.  The ellipsis causes gcc to flag this as a varargs function,
and the name "__builtin_va_alist" is special cased in gcc to hide the last
argument in the arglist.

Reviewed by:	bde & phk
Submitted by:	jlemon@americantv.com (Jonathan Lemon)
1997-02-07 20:22:15 +00:00
Kazutaka YOKOTA
445605a6e0 Fix for the Compaq Armada laptop.
The PS/2 mouse device responds to a reset command with a sequence of
ACK(fa), RESULT(aa) and ID(00).  Most PS/2 mice immediately returns
ACK, but spend sometime before sending RESULT. The Armada takes time
before ACK; extra delay is necessary before the call to read ACK.

The problem was reported in comp.unix.bsd.freebsd.misc and the patch
was tested by the reporter. No PR was filed, by the way.
1997-02-07 11:41:45 +00:00
Joerg Wunsch
a2f36095e2 The worm(4) driver needs a bdev major # now, too. 1997-02-06 22:20:33 +00:00
Justin T. Gibbs
a42f819712 Initialization of a variable got lost in the last commit when I moved
a piece of code into a subroutine.
1997-02-03 17:24:25 +00:00
Justin T. Gibbs
c646d245b2 Fix an oversight in the handling of non-tagged abort requests. We need
to search the QINFIFO to remove any possible command that is waiting
otherwise our abort request may not be held up still waiting for the
first command to complete.
1997-02-03 16:29:07 +00:00
Justin T. Gibbs
8ecec21da6 White space cleanup and other cosmetic style changes.
Fix a few panics during error recovery:
1) Stupid mistake in the "no SCB match handler"  where I was using the wrong
   variable (busy_scbid instead of scb_index).
2) Unbusy the target of an abort request if the command we are trying to
   abort is an untagged transaction.  If we don't, we get a fatal NO_MATCH_BUSY
   condition which "should never happen".
3) When an abort completes, turn off ahc->in_timeout or else the next timeout
   will hit the protective "scb timesout again" panic.
4) Fix a typo that caused the requeued "abort" SCB to have its TAG_ENB and
   disconnect bits to be cleared (missing ~) so that devices would complain
   about overlapped commands.

Be sure to turn off the unexpected busfree interrupt after we do a bus
reset since we are expecting the bus to go free in that case.

Return XS_TIMEOUT instead of XS_DRIVERSTUFFUP in certain scenarios.  XS_TIMEOUT
allows for retries, XS_DRIVERSTUFFUP does not.

Allow commands with SDTR and WDTR negotiation to be tagged.  The SCSI II spec
says that you probably should not do this for fear of hitting bogus devices.
The driver did this in the past for almost two years without any problem,
and not doing it causes problems during error recovery to a tag capable device
as the number of openings is higher than two and we'll start sending it
tagged commands causing "overlapped commands attempted" type errors.  The
real fix needs to happen in the generic SCSI layer which can limit the
number and type of transactions to a device during error recovery efficiently.

Give ourselves at least 100ms to perform a request sense instead of relying
on the original timeout to be long enough to complete this new command as
well as the one that generated the condition.

Removed some redundant code.
1997-02-03 02:16:16 +00:00
KATO Takenori
d5605f2a31 Deleted i386_cpus[]. i386_cpus[] is a static variable in identcpu.c.
Found-by: lint
1997-02-02 10:43:35 +00:00
Joerg Wunsch
c37ddbb8bd Correct the usage of fea0. It's an EISA driver now, so the ISA usage
is bogus.

Also, correct a stale comment about non-existing EISA support.
1997-02-01 19:53:12 +00:00
Bruce Evans
d1adf9f099 Fixed the SMC fifo bug fix. sioopen() hung while input was streaming in
with <= 100 usec between each character arrival time.  This didn't happen
until rev.1.75 of clock.c because DELAY(100) used to delay for closer to
80 usec than 100 usec, and the minimum time between character arrivals is
87.8 usec at the maximum supported speed of 115200 bps 8N1.

Clear DCD timestamp flag on close (the input timestamp flag is already
cleared).
1997-02-01 16:04:16 +00:00
David Greenman
e4c46b5e82 Removed PG_N from here, too. Some machines don't like it and it's unnecessary. 1997-01-30 20:22:02 +00:00
David Greenman
3def491346 Removed unnecessary PG_N flag from device memory mappings. This is handled
by the CPU/chipset already and was apparantly triggering a hardware bug that
causes strange parity errors.
1997-01-30 19:36:58 +00:00
Søren Schmidt
ac59a2c67c Fixed the "switch to next screen" command (normally bound to the
key "print scrn".
It used to stop at the first non-open vty, now it skips the non-open
ones and thereby enable one to cycle around all open vty by pressing
"print scrn".
1997-01-30 15:12:17 +00:00
Kazutaka YOKOTA
50c193eb05 Removed reference to PSM_NO_RESET which is no longer available. 1997-01-30 11:59:36 +00:00
Bruce Evans
49a116737e Estimate an initial overhead of 0 usec instead of 20 usec in DELAY().
I have code to calibrate the overhead fairly accurately, but there
is little point in using it since it is most accurate on machines
where an estimate of 0 works well.  On slow machines, the accuracy
of DELAY() has a large variance since it is limited by the resolution
of getit() even if the initial delay is calibrated perfectly.

Use fixed point and long longs to speed up scaling in DELAY().
The old method slowed down a lot when the frequency became variable.
Assume the default frequency for short delays so that the fixed
point calculation can be exact.

Fast scaling is only important for small delays.  Scaling is done
after looking at the counter and outside the loop, so it doesn't
decrease accuracy or resolution provided it completes before the
delay is up.  The comment in the code is still confused about this.
1997-01-29 22:51:44 +00:00
Bruce Evans
160da193e0 Fixes and workarounds for Hayes ESP:
- don't uselessly initialize the fifo "DMA" bit at attach time.
- initialize the fifo "DMA" bit at open time.  Without this, the device
  interrupts for every character received, reducing input performance
  to that of an 8250.
- don't uselessly initialize the fifo trigger level to 8 (scaled to
  256) at attach time.
- don't scale the fifo trigger level to 512 bytes.  The driver's pseudo-
  dma buffer has size 256, so it can't handle bursts of size 512 or 256.
  It should be able to handle the second lowest ftl (2 scaled to 64).
- don't reset the fifos in siostop().  Reset triggers a hardware bug
  involving wedging of the output interrupt bit  This workaround
  unfortunately requires ESP support to be configured.
1997-01-29 21:50:02 +00:00
Bruce Evans
26add14927 Disabled logging of masked exceptions on exit. Keep the side effect of
saving the state (see rev.1.17).
1997-01-29 13:46:28 +00:00
Justin T. Gibbs
54dd351d93 Add 1997 to my copyright.
If we can, use timeouts instead of DELAYs when dealing with a bus reset.
This prevents us from holding up the whole machine for a noticible amount
of time (especially for a real time app).

Make a pass over the timeout/error handling code.  Aborts are more
reliable.  We actually handle parity errors correctly now instead of
locking up the bus.  Added code to properly clean up disconnected SCBs
down on the card during error handling.  Improved robustness in several
areas.

If we are using defaults, but are an Ultra card, negotiate at 20MHz instead
of 10.

Don't attempt to handle any commands for 100ms after a reset has occured.
This is the minimum time before a target will respond to selection.  Also
disable the busfree interrupt before doing a bus reset.  This prevents the
driver from getting confused by an "unexpected busfree".
1997-01-29 05:27:03 +00:00
Bruce Evans
d73ffacdf6 Removed bogus options CHILD_MAX and OPEN_MAX. 1997-01-27 12:39:39 +00:00
Bruce Evans
488600a422 Added KBD_MAXRETRY and PSM_NO_RESET. 1997-01-27 11:54:56 +00:00
Bruce Evans
4bc24b97bc Added lots of undocumented options KBD*, MSG*, NBUF, NMBCLUSTERS, PSM*,
SEM* and SHM*.  These are already supported in the options files.  I
mostly used the default value plus 1.  This ensures that the LINT kernel
depends on the options headers.
1997-01-27 11:37:16 +00:00
Bruce Evans
4123678332 Sync with <pci/pcibus.h>. pcibus.c unfortunately still compiled (with
only 3 or 4 warnings) when pb_maxirq went away.
1997-01-25 18:51:01 +00:00
Justin T. Gibbs
c2f69d249e 93cx6.c:
Style nit.  Backslashes in macro weren't aligned.

aic7xxx.c:
Preserve the value of STPWEN in SXFRCTL1 during initialization.  STPWEN
controls low byte termination and is setup by the PCI probe front end.
1997-01-24 21:59:32 +00:00
Bruce Evans
f42cf36fa8 Fixed some formatting bugs (mostly regressions in rev.1.48). Replaced
some magic numbers by pmap constants.  Cosmetic.
1997-01-24 20:37:57 +00:00
Bruce Evans
d9cca175bc Initialize CR0_MP in setregs() in case npx0 is disabled or not configured.
Disabling npx0 works right now.

Don't reference `npxdriver' if npx0 is not configured.  Not configuring
npx0 doesn't quite work yet.

Don't clear potential non-npx pcb flags in setregs().
1997-01-24 19:01:54 +00:00
David E. O'Brien
8819cbef39 KNF style police.
Reported by:	Bruce
Thanks to:	Bruce for also providing a diff.
1997-01-24 12:39:11 +00:00
Søren Schmidt
0d3f983ad2 Add save/restore cursor as pr SCO screen(HW) manpage.
Fix ESC[2J to not move cursor home
Clear mouse cutmarking on more cases.
Minor changes by me.

Submitted by:	ache
1997-01-23 20:00:45 +00:00
Garrett Wollman
6a4c899092 Put newlines after log messages.
Submitted by:	seki@sysrap.cs.fujitsu.co.jp PR#2563 (but the patch didn't
		apply)
1997-01-23 16:17:09 +00:00
John Dyson
7e64cb7a96 Remove some dead code from trapwrite.
Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1997-01-23 01:30:59 +00:00
Justin T. Gibbs
71318ca3ea Remove some unnecessary overhead in the command complete processing. It
should be nearly impossible to overflow the QOUTFIFO (worst case 9 command
have to complete with at least 6 of them requiring paging on an aic7850),
so don't take the additional PIO hit to guard against this condition.  If we
don't see our interrupt in time, the system has bigger problems elsewhere.
If this ever does happen, the timeout handler will notice and retry the
command.

Remove the ABORT_TAG sequencer interrupt handler.  This condition can't happen
with the new SCB paging scheme.

Fix a few bugs noticed by Dan Eischen <deischen@iworks.InterWorks.org>
that could prevent ULTRA from being negotiated to drives above ID 7 and
also could allow an SCB to be passed to ahc_done twice during error recovery.

Fix a bug notice by Rory Bolt <rory@atBackup.com>.  It turns out that a
sequencer reset will actually start the sequencer running regardless of the
state of the pause bit.  This could lead to strange problems with loading
the sequencer.
1997-01-22 18:05:31 +00:00
John Dyson
8130eff80a Fix I386 copyout support. The new page-table management code will
not lazy-fault page table pages.  Update the copyout support to take
that into account.  This should fix some segfault problems on such
machines.

After a short test period, we'll move this into 2.2.

Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1997-01-22 06:15:27 +00:00
Søren Schmidt
dc31ce3ddb Fix the bug that caused CTRL & ALT keys to be hanging sometimes after
an X seesion. Really stupid error of me, and I've been looking at
this code SO many times. Thanks to Kazutaka YOKOTA for seeing this..

Submitted by:	Kazutaka YOKOTA
1997-01-20 08:05:15 +00:00
Søren Schmidt
cf35b775cb Oops, the position of the savefont code was wrong, cur_console
wasn't set yet.
1997-01-19 17:34:14 +00:00
David E. O'Brien
bcd60335fc Add bits to identify AMD K5 and K6 cpu's.
Tested only on my AMD K5 PR-133.  Bit values for K6 taken from AMD document
on how to test such things.

2.2 Candidate.
1997-01-19 01:56:55 +00:00