Commit Graph

1899 Commits

Author SHA1 Message Date
David Greenman b64b660cd3 Made "NMBCLUSTERS" calculation dynamic and fixed bogus use of "NMBCLUSTERS"
in machdep.c (it should use the global nmbclusters). Moved the calculation
of nmbclusters into conf/param.c (same place where nmbclusters has always
been assigned), and made the calculation include an extra amount based
on "maxusers". NMBCLUSTERS can still be overrided in the kernel config
file as always, but this change will make that generally unnecessary. This
fixes the "bug" reports from people who have misconfigured kernels seeing
the network hang when the mbuf cluster pool runs out.

Reviewed by:	John Dyson
1995-05-25 07:41:28 +00:00
David Greenman 3e47ca0577 Enclosed is a patch for if_ze.c which will allow it to operate with
the National Semiconductor InfoMover PCMCIA cards also. In tests on a
NE4100 on Jordan's laptop here, the ze driver works fine with that
card.

Reviewed by:	Jordan Hubbard, Rod Grimes, and me
Submitted by:	Gary Palmer
1995-05-24 20:33:42 +00:00
Søren Schmidt ad828abe4b Fixed problem with "char" cursor..
Submitted by:	ache
1995-05-21 18:30:05 +00:00
Poul-Henning Kamp 75e21a4e1e Now I could finally test this change: bad144 is now relative to the
partition.
1995-05-21 03:27:13 +00:00
Poul-Henning Kamp 4977228d33 Make the "information" slice printfs if(bootverbose).
Fix the message about Ontrack.
1995-05-18 22:45:35 +00:00
David Greenman 5eb46edfb0 Added "BROKEN_KEYBOARD_RESET" option to disable using the keyboard reset
in cpu_reset(). Some MBs don't deal with this properly.

Submitted by:	Rod Grimes
1995-05-18 09:17:07 +00:00
David Greenman 4039006ad7 Changed read_csr and write_csr to static so that they don't clash
with another driver.

Reviewed by:	Paul Richards
Submitted by:	Brian Litzinger
1995-05-17 13:15:35 +00:00
Bruce Evans ec0896af08 Reviewed by: phk
serial_putchar() always hung if it was called and the serial port existed,
so booting with -h hung when the above bug was fixed.  Previously, setting
-h did nothing but -h was sometimes the default due to the stack garbage
bug.
1995-05-17 07:39:43 +00:00
Bruce Evans 4061e47297 Reviewed by: phk
Submitted by:	DI. Christian Gusenbauer <cg@scotty.edvz.uni-linz.ac.at>

The `howto' arg to boot() was not supplied, so it was stack garbage (actually
the return address in the boot program).  I didn't use the submitted fix.
1995-05-17 07:37:53 +00:00
David Greenman 57cb71573d Fixes to the aic7xxx sequencer code and device driver from Justin Gibbs:
1) If a target initiated a sync negotiation with us and happened to chose a
value above 15, the old code inadvertantly truncated it with an "& 0x0f".
If the periferal picked something really bad like 0x32, you'd end up with
an offset of 2 which would hang the drive since it didn't expect to ever
get something so low.  We now do a MIN(maxoffset, given_offset).

2) In the case of Wide cards, we were turning on sync transfers after a
sucessfull wide negotiation.  Now we leave the offset alone in the per
target scratch space (which implies asyncronous transfers since we initialize
it that way) until a syncronous negotation occurs.

3) We were advertizing a max offset of 15 instead of 8 for wide devices.

4) If the upper level SCSI code sent down a "SCSI_RESET", it would hang the
system because we would end up sending a null command to the sequencer.  Now
we handle SCSI_RESET correctly by having the sequencer interrupt us when it
is about to fill the message buffer so that we can fill it in ourselves.
The sequencer will also "simulate" a command complete for these "message only"
SCBs so that the kernel driver can finish up properly.  The cdplay utility
will send a "SCSI_REST" to the cdplayer if you use the reset command.

5) The code that handles SCSIINTs was broken in that if more than one type
of error was true at once, we'd do outbs without the card being paused.
The else clause after the busfree case was also an accident waiting to
happen.  I've now turned this into an if, else if, else type of thing, since
in most cases when we handle one type of error, it should be okay to ignore
the rest (ie if we have a SELTO, who cares if there was a parity error on
the transaction?), but the section should really be rewritten after 2.0.5.
This fix was the least obtrusive way to patch the problem.

6) Only tag either SDTR or WDTR negotiation on an SCB.  The real problem is
that I don't account for the case when an SCB that is tagged to do a particular
type of negotiation completes or SELTOs (selection timeout) without the
negotiation taking place, so the accounting of sdtrpending and wdtrpending
gets screwed up.  In the wide case, if we tag it to do both wdtr and sdtr,
it only performs wdtr (since wdtr must occur first and we spread out the
negotiation over two commands) so we always have sdtrpending set for that
target and we never do a real SDTR.  I fill properly fix the accounting
after 2.0.5 goes out the door, but this works (as confirmed by Dan) on
wide targets.

Other stuff that is also included:

1) Don't do a bzero when recycling SCBs.  The only thing that must explicitly
be set to zero is the scb control byte which is done in ahc_get_scb.  We also
need to set the SG_list_pointer and SG_list_count to 0 for commands that do
not transfer data.

2) Mask the interrupt type printout for the aic7870 case.  The bit we were
using to determine interrupt type is only valid for the aic7770.


Submitted by:	Justin Gibbs
1995-05-17 07:06:02 +00:00
David Greenman 60f6659f70 Changes to support the "new" bad144. Adds a "BADSCAN" ioctl and support.
Reviewed by:	Bruce Evans
Submitted by:	Poul-Henning Kamp
1995-05-16 07:52:17 +00:00
David Greenman 30fd0561cd Added apersand constraint to make sure that the source and destination
registers aren't combined.

Reviewed by:	Bruce Evans and David Greenman
Submitted by:	John Dyson
1995-05-14 22:25:11 +00:00
David Greenman 14c77d8a98 After carefully reading three reference documents, and analyzing
the 802.3 frames generated by the DC21040 (which does automatic padding
of less-than-minimum frames) and the frames generated by the 'ed'
driver, I've found that there is indeed a bug in the size of "ETHER_MIN_LEN"
as reported by several people, John Hay being the most recent. The driver
was actually setting the length to 6+6+2+50 (64 bytes), which when adding
in the CRC (which is automatically appended to the frame and not included
in the length), the minimum frame is 4 bytes larger than it is supposed to
be. All of this is confirmed by tcpdump showing 50 bytes of data for
minimum frames from the 'ed' cards and 46 bytes from 'de' cards. This
analysis has also revealed that there is garbage in the un-filled in
portion at the end of the minimum frames from the 'ed' driver; I don't
plan to fix this.
1995-05-14 11:01:20 +00:00
David Greenman a401ebbe32 Changed swap partition handling/allocation so that it doesn't
require specific partitions be mentioned in the kernel config
file ("swap on foo" is now obsolete).

From Poul-Henning:

The visible effect is this:

As default, unless
        options "NSWAPDEV=23"
is in your config, you will have four swap-devices.
You can swapon(2) any block device you feel like, it doesn't have
to be in the kernel config.

There is a performance/resource win available by getting the NSWAPDEV right
(but only if you have just one swap-device ??), but using that as default
would be too restrictive.

The invisible effect is that:

Swap-handling disappears from the $arch part of the kernel.
It gets a lot simpler (-145 lines) and cleaner.

Reviewed by:	John Dyson, David Greenman
Submitted by:	Poul-Henning Kamp, with minor changes by me.
1995-05-14 03:00:10 +00:00
Jordan K. Hubbard c25cfd0b0d "1 easy fix in 10 excrutiating steps"
A phone call from Manfred quickly pointed up the fact that I got the conflict
check backwards.  NOW we implement the conflict checking correctly!  Wheesh!
1995-05-13 00:09:38 +00:00
David Greenman 404abd2138 Only use card's soft-configured irq if no irq was specified in the kernel
config file. This should fix a number of complaints regarding the auto
detection behavior.
1995-05-12 22:39:40 +00:00
Garrett Wollman 5bb4f73817 The death of `options NODUMP'. Now the dump area can be dynamically
configured (and unconfigured) on the fly.  A sysctl(3) MIB variable is
provided to inspect and modify the dump device setting.
1995-05-12 19:17:31 +00:00
Bill Paul dbda9e5ed2 - Add an entry to allow swapping on a vn device (if one is configured).
- Do the right thing when booting in NFS diskless mode, which is nothing.
  Make the default unconfigured entries for swdevt[0] and dumplo something
  that swapconf() will ignore and not choke on (the swap setup is done
  in nfs_vfsops.c when booting diskless).
1995-05-12 16:11:07 +00:00
Andrey A. Chernov d0930614cc Add 'rc' line 1995-05-12 15:17:55 +00:00
Andrey A. Chernov dc02f1c279 RISCom/8 driver 1995-05-12 15:09:29 +00:00
Garrett Wollman 1d86aba60b Make `make links' work by leaving swapkernel.c off out of the links processing
(it is never generic).
1995-05-11 19:48:45 +00:00
Rodney W. Grimes b2b795f07c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
Poul-Henning Kamp 303fd456bf Use spc, not spt, DUH! Thanks Bruce!
Submitted by:	bde
1995-05-11 16:19:50 +00:00
Bruce Evans d81fba0cda Add variable `idelayed' and macros setdelayed() and schedsofttty()
to access it.  setdelayed() actually ORs the bits in `idelayed' into
`ipending' and clears `idelayed'.

Call setdelayed() every (normal) clock tick to convert delayed
interrupts into pending ones.

Drivers can set bits in `idelayed' at any time to schedule an interrupt
at the next clock tick.  This is more efficient than calling timeout().
Currently only software interrupts can be scheduled.
1995-05-11 07:44:40 +00:00
Jordan K. Hubbard c77a009363 Move conflicts flag to the end. 1995-05-11 07:41:52 +00:00
Bruce Evans 0ee893eb32 Add loadandclear(). It atomically loads a value from memory, clears the
value in memory and returns the original value.
1995-05-11 07:24:35 +00:00
Jordan K. Hubbard da8d0268df Pass me the pointed chapeau - this typo somehow got through my testing. 1995-05-11 05:20:43 +00:00
Bill Paul 2c739e6439 If you config a kernel with 'config kernel swap generic' and try to
boot diskless with it, you get a panic because setconf() is only
called for mountroot == ffs_mountroot. It really needs to be called
no matter what manner of rootfs we have. I can't really say if
swapgeneric will work with a CD-ROM though. (I get the feeling I'm
the only one who uses swapgeneric these days anyway.)
1995-05-11 02:50:11 +00:00
Jordan K. Hubbard 9cc347481f Remove all vestiges of the ALLOW_CONFLICT_FOO evil and replace it with
something slightly less evil - a per device conflict flag.
1995-05-11 02:15:55 +00:00
Garrett Wollman c9cd353a18 Delete two debugging printfs that mistakenly crept in. 1995-05-11 00:16:44 +00:00
Garrett Wollman 748e0b0acc Make networking domains drop-ins, through the magic of GNU ld. (Some day,
there may even be LKMs.)  Also, change the internal name of `unixdomain'
to `localdomain' since AF_LOCAL is now the preferred name of this family.
Declare netisr correctly and in the right place.
1995-05-11 00:13:26 +00:00
Rodney W. Grimes 3e0b4dc1f6 Submitted by: wpaul (with 2 lines moved by rgrimes)
Add support for kern_devconf structure.
1995-05-10 15:19:29 +00:00
Rodney W. Grimes 2d9d0204f7 Fix -Wformat warnings, still need to do something about %b and pointer
type args.
1995-05-09 12:26:00 +00:00
Rodney W. Grimes 14b77878bb Rewrite the MCD_TRACE macro to be a varargs macro so that the extraneous
arguments to printf could be fixed.

Correct all but 1 -Wformat warning.  Some would have caused garbage to
be printed due to missing args!
1995-05-09 11:39:40 +00:00
Poul-Henning Kamp e34fb4afd7 Cleanup to the INET part of lpt.c.
Reviewed by:	phk
Submitted by:	pst
1995-05-09 01:33:16 +00:00
Paul Traina 255aed5d97 Correction, Jim Lowe is the author... Getting code to work right is far
easier than writing the comments. :-(
1995-05-08 19:42:00 +00:00
Paul Traina adc5e4f1f7 Update copyright notice to properly reflect that this was original work
by James Miller (sorry Jim).
1995-05-08 19:34:16 +00:00
Bruce Evans dac9a9e66d Fix numerous bugs in wdsize().
It closed the wrong device (usually the B partition instead of the C
partition).
It closed a device without having opened it.
It didn't open a device often enough.  This caused swap partitions on
slices other than the first slice looked at to be unavailable for swapping.
It didn't check the device number sufficiently.
1995-05-08 16:48:23 +00:00
Jordan K. Hubbard e1c3886b0d The value -1 is special. Allow it.
Submitted by:	bde
1995-05-08 06:14:16 +00:00
Poul-Henning Kamp 0f15ab39ec Make disk.c smart enough to handle disk with "OnTrack Disk manager".
Make it complain if people try to boot from a partition which extends
past 1024 cylinders.  This is better than a random reset...
1995-05-08 02:02:56 +00:00
Andrey A. Chernov e73e1e3715 Add hook for pstat -t 1995-05-07 23:00:02 +00:00
Jordan K. Hubbard 09d9aeaab3 Add additional check for IRQ > 15. This code still needs a lot of work!
Remove silly "Naffy, the Wonder Porpoise" attribution and add more
justifiable (and overdue) attribution to Bruce Evans.  Look at it
as a delete and add operation batched together, not a substitution. :-)
1995-05-07 19:45:49 +00:00
Jordan K. Hubbard 2a281ee780 Duh! Get the section number for config(8) right! :) 1995-05-07 18:24:43 +00:00
Jordan K. Hubbard 9024554c25 If user specifies IRQ 2, remap it to IRQ 9 with a warning.
Suggested by:	rgrimes
1995-05-07 18:23:58 +00:00
Bruce Evans ee4415d3df Fix style inconsistencies in the last few commits. 1995-05-07 07:06:36 +00:00
Bruce Evans 6d3fd1b72c Submitted by: john@physiol.su.oz.au (John Mackin)
Fix handling of sense errors.  Nonexistent media and end of media were
mishandled.
1995-05-07 06:54:01 +00:00
Paul Traina da4ae79d98 Major cleanup up SunOS/VAT driver emulation code, added a BSD style copyright
notice, performed all of the structural changes necessary to get this thing
to work with the unidirectional-DMA version of voxware.

This work is -not- complete,  but it's in far better shape than it was,  and
I may not touch it again for another few months.
1995-05-07 06:38:49 +00:00
Joerg Wunsch 85827d9c13 Restructured the floppy tape probe.
The ``flags 1'' in the fdc line is now only needed for owners of an
Insight tape (perhaps there aren't any?  Mine is disfunctional).  All
other probes are safe wrt. to the motor-control line of floppy disk
drives.  Document the flag in LINT finally.
1995-05-06 19:34:28 +00:00
David Greenman f73bbaf2fa Fix spelling error. Commented out ISO and ISO related things until I
either fix it or we decide to remove it. It requires implementing PCB
hashing to get it to compile and likely a lot more to get it to work..
1995-05-05 07:47:44 +00:00
David Greenman 9714de6a38 Check for 0 before dividing by it. Patch from Paul Traina, modified
slightly by me.
1995-05-05 06:15:11 +00:00