Commit Graph

12042 Commits

Author SHA1 Message Date
Peter Wemm
524d1bc175 Uncomment prototype for elf_loadmodule 1998-09-30 19:25:26 +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
KATO Takenori
b3c2b0173a Sync with sys/i386/i386/machdep.c revision 1.311. 1998-09-30 13:21:44 +00:00
Peter Wemm
6b7a14ce57 Make the ELF kernel build produce a dynamic executable (!). This enables
the in-kernel linker to access the _DYNAMIC data for doing loadable elf
modules.  The alpha kernel is already done this way, I've borrowed some of
the hacks from there.

This is primarily aimed at the 3-stage boot process which is intended to
be able to do pre-loading of kernel modules.

Note that the entry point isn't 0xf0100000 any more, it'll be a little
further on - but this value is stored in the headers.  I don't think this
will be a problem, but I'm sure somebody will tell me if it is. :-)

I'm not sure if btxboot is going to like this, it doesn't do proper ELF
header checking and assumes that there are exactly two program header
entries and that they are both PT_LOAD entries - a bad assumption.
1998-09-30 12:14:39 +00:00
Justin T. Gibbs
013a898f40 Remove SCSI support as the only driver in this kernel config, aic, is not
currently supported by CAM.
1998-09-30 03:48:23 +00:00
John Fieber
f18bad6e73 Add several missing ioctl handlers. One needed by Sybase, the others
found while looking for the one.
1998-09-30 01:42:53 +00:00
Kirk McKusick
df077352a7 Do not allow a mounted on directory to be rmdir'ed. This removal can
happen when an NFS exported filesystem tries to remove a locally
mounted on directory.
PR:		kern/7272
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
1998-09-30 00:53:40 +00:00
Warner Losh
6a04333133 Perform a hard reset on cards when the command fails. This should help
those people that have cards that become wedged when a bogus command is
issued that are too wedged to have a soft reset help.
1998-09-30 00:10:44 +00:00
Kirk McKusick
b5cf6d7984 In nfs_link(), check for a cross-device mount *before* looking
in the v_data field.
Obtained from: Charles Hannum, via Frank van der Linden <frank@wins.uva.nl>
1998-09-29 23:39:37 +00:00
Kirk McKusick
d25ad74791 Missing vput when cross-device link error is detected in nfs_link. 1998-09-29 23:29:48 +00:00
Kirk McKusick
b6b74f2f4e During truncation, have to notify the VM about the new size
of the NFS file *before* doing the nfs_vinvalbuf operation.
Otherwise some invalid data may show up in an mmap.
1998-09-29 23:28:32 +00:00
Kirk McKusick
e68e908bda Frank sez: 'It fixes a problem with servers that return 0 values
for some of the fsinfo RPC fields. It is strictly speaking not
wrong to do this, as the spec says that "it is expected that a
server will make a best effort at supporting all the attributes",
but pretty unusual. You guessed it, it's NT servers that do it.'
Obtained from: Frank van der Linden <frank@wins.uva.nl>
1998-09-29 23:15:53 +00:00
Kirk McKusick
35800d700a Do not need (or want) to take a reference on an NFS file that
is being deleted due to an forcible unmount. The problem is
that vgone calls vclean() which then calls calls nfs_inactive()
with VXLOCK set on the vnode. Nfs_inactive() was calling vget()
to get a reference on the vnode, which in turn hung on VXLOCK.
Nfs_inactive() now checks v_usecount to make sure that the vnode
is not coming from vclean() before it does a vget().
1998-09-29 23:15:25 +00:00
Kirk McKusick
96438eb911 The code checks each fragment mark to see if it's valid; if the fragment
is less than NFS_MINPACKET or greater than NFS_MAXPACKET in size, it
barfs and, I think, drops the connection.

However, there's no guarantee that in a multi-fragment RPC, all the
fragments will be at least as large as NFS_MINPACKET.

In fact, with the version of "tclnfs" we have here, which supports NFS
over TCP, at least when built under SunOS 4.1.3 (i.e., with 4.1.3's
user-mode ONC RPC library), I can *repeatably* cause "tclnfs" to send a
request with more than one fragment, one of which is only 8 bytes long.
I just do a 3877-byte write to a file, at an offset of 0.

The check that "slp->ns_reclen" is greater than or equal to
NFS_MINPACKET serves no useful purpose - if the NFS server code can't
handle packets < NFS_MINPACKET bytes, it can't handle them over *any*
protocol, so the check has to be done above the RPC-over-TCP layer - and
should be removed.
Obtained from: Fix from Guy Harris, forwarded by Rick Macklem.
1998-09-29 22:33:05 +00:00
Kenneth D. Merry
e5b118dd3d In the bootverbose case, print out error messages for all errors that will
not be retried again, even if the SF_NO_PRINT flag is set.

Reviewed by:	gibbs
1998-09-29 22:11:30 +00:00
Andrey A. Chernov
6b491db1bd vm86_datacall: always use workaround since temp. malloced buffer or stack
area can be passed (and mapped to page1!) as vesa.c does. Use contigmalloc
now to get proper alignment. Bump max buffer size to PAGE_SIZE
1998-09-29 22:06:33 +00:00
Kirk McKusick
1cda241131 Mark directory buffers that have no valid data with B_INVAL
so that they are not put in the cache.
1998-09-29 22:01:10 +00:00
Kirk McKusick
113b88d241 When adding data to a buffer, we need to clear the B_NEEDCOMMIT flag
which says that the data is on server but not committed.
1998-09-29 21:46:54 +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
0e4c0f17f3 Move workaround about page aligned data buffer directly to vm86_datacall,
it is impossible to use this func otherwise, i.e. all vesa calls are
potentially broken. Max arg size limited to 1024 for now, bump it, if needed.
1998-09-29 20:36:31 +00:00
Robert V. Baron
ecee3646ce Fixes for lkm:
1. use VFS_LKM vs ACTUALLY_LKM_NOT_KERNEL
2. don't pass -DCODA to lkm build
1998-09-29 20:19:45 +00:00
Jonathan Lemon
9379f795cd Don't erase curproc when making a vm86() call. The previous behavior
was a pessimization that broke schedcpu(). (It caused the process to
be remrq()'d).
Reviewed by:	Tor Egge
1998-09-29 18:01:18 +00:00
Andrzej Bialecki
faa5f8d8da Make #define NO_SWAPPING a normal kernel config option.
Reviewed by:	jkh
1998-09-29 17:33:59 +00:00
Andrzej Bialecki
c796cfa18a Make #define NO_SWAPPING a normal kernel config option.
Warn unsuspecting users against current DEVFS pitfalls.

Reviewed by:	jkh
1998-09-29 17:33:45 +00:00
Andrzej Bialecki
dede34d355 Add sysctl 'machdep.msgbuf_clear'. Setting it to anything causes the
kernel message buffer to be cleared. It comes handy in situations when
the only logging facility you have is the msgbuf.

Reviewed by:	jkh
1998-09-29 11:20:16 +00:00
Bruce Evans
2e8bf20912 Fixed printf format errors. u_long is not necessarily suitable for casting
pointers to, and %d is not suitable for printing uint32_t's.
1998-09-29 09:18:08 +00:00
Bruce Evans
894e2bd49e FIxed printf format errors (an new one that is only detected on systems
with pointers smaller than u_longs, and 2 possibly-truncating casts in
the same printf).
1998-09-29 09:14:52 +00:00
Peter Wemm
a7de32b2aa The bootinfo struct was getting clobbered or not passed through correctly.
Presumably VTOP doesn't work for static objects.
The easiest way to get it working was to reserve some space after the
environment strings and copy the bootinfo struct there.
Also, set RB_BOOTINFO, it's needed.

I got the code to load and run an unmolested kernel OK for the first time
with this system a few minutes ago - at last!.  I did have to stop it
looking at the floppy though as BTX was trapping a mode 14 fault when
it look for /boot/boot.conf when no disk was in the drive. (I'm booting
from a scsi disk (bios disk 0x80)).

Now to teach it about ELF and modules :-)
1998-09-29 09:11:49 +00:00
Bruce Evans
0c71101cb7 Don't pretend to support ix86's with 16-bit ints by using longs just
to ensure 32-bit variables.  Doing so broke ix86's with 64-bit longs.
1998-09-29 09:06:00 +00:00
Bruce Evans
9702cd0422 Fixed initialization of new inodes. ext2fs doesn't clear inodes when
they are deleted, so inodes must be cleared when they are reused, but
we didn't clear the indirect blocks.  This caused serious filesystem
corruption.
1998-09-29 08:07:32 +00:00
Warner Losh
8d74c4aa15 Several minor cleanups, inspired by bug reports and the old driver:
o Unlock mailbox interface if we have a new card.  Before only newer cards
  (B or newer) that had the BIOS disabled would probe.  Cards with the
  BIOS enabled would fail to probe in the mailbox initialization code.
o Increase the number of ccbs and sg to 17 from 16 to support 64k I/O
  on a non page aligned boundary.  Ideas for dynamic determination of this
  value welcomed, as more of these are better.
o Took credit for this driver, even though I derived it from Justin's code.
  Made sure that Justin's copyright from bt.c was preserved, along with
  his name, since the error handling code is nearly identical.  Add my
  own, identical copyright.  Point people to aha_isa.c.

Cards tested: 1542C and 1542CF.  The B and CP might work now as well,
but logistical problems precluded me from testing them this evening
(if you have jumper settings for the B card, please send me private
mail).
1998-09-29 06:50:21 +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
Robert V. Baron
6e3a3f387c John Dyson approved of this solution; make vnode_pager_input_old set m->valid 1998-09-28 23:58:10 +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
Peter Wemm
38e1ef0f4a Only bcopy the correct amount of data from the buffer in case it is ever
in an overrun situation.
1998-09-28 22:04:54 +00:00
Peter Wemm
29a1d9c4e6 Use the variable with the path in it for the error message. 1998-09-28 22:03:01 +00:00
Peter Wemm
699f872732 Reactivate the a.out kernel loader code. 1998-09-28 22:01:20 +00:00
Peter Wemm
3165db6cbf Missing return value that was kinda important. 1998-09-28 21:59:21 +00:00
Peter Wemm
5eec23025f Argh, I don't believe how much time I wasted looking for this...
Bytes of extended memory = (extkb * 1024), not (extkb + 1024)
1998-09-28 21:39:11 +00:00
Robert V. Baron
059b1b8277 Cleanup and fix THE bug 1998-09-28 20:52:58 +00:00
Peter Wemm
80c4ff739a The comconsole mode is accessed as 'comconsole' not 'com'. 1998-09-28 20:17:05 +00:00
Peter Wemm
35f4587669 MBR magic is 0x55aa not 0xffaa. 1998-09-28 20:08:34 +00:00
Peter Wemm
3cae2e80aa Precedence bug (?) causing probe problems. 1998-09-28 20:07:39 +00:00
Peter Wemm
b9b5f72bb6 Fix (?) EISA interrupt configuration based on observation of what we've
seen in practice.  The MPspec is ambiguous and/or contradicts itself.
We now look at the ELCR to determine the trigger mode (edge/level) of an
interrupt tagged as "conforming" in the mptable.  EISA interrupts appear
to be presented to the APIC as active high in all cases (they are level
inverted) that we've seen, so use this for the 'conforming' level case.

Of note, the system I'm using has 2 PCI cards in it, and the PCI cards
interrupts (5 and 9) appear in the ELCR register as level sensitive and the
mptable lists 5 and 9 as coming from the EISA bus.  The PCI interrupts
are active-high by the time they reach the APIC even though they are
electrically active low at the slot.

We should still work should somebody implement this on motherboards
differently in the future as long as the mptable is clear about the
trigger/polarity.

Current should work on Holm Tiffe's machine now.

Based on code from: Tor.Egge@fast.no
1998-09-28 13:47:23 +00:00
Peter Wemm
eb70c7babf Back out rev 1.6 (temporarily at least). <machine/asmacros.h> is used
here for getting the #defines for the removal of the leading '_' in symbols
in the assembler code.  We could probably #include <machine/asnames.h>
instead, but everything else seems to use asmacros.h directly as well.
Once we convert symbols, this becomes irrelevant.
1998-09-28 12:20:46 +00:00
KATO Takenori
2b336086eb Sync with sys/i386/i386/userconfig.c revision 1.110. 1998-09-28 08:26:10 +00:00
KATO Takenori
6a75025663 Sync with sys/i386/i386/machdep.c revision 1.310. 1998-09-28 08:25:29 +00:00
KATO Takenori
f36effada3 Sync with sys/i386/conf/options.i386 revision 1.89. 1998-09-28 08:23:26 +00:00
KATO Takenori
b68e295760 Sync with sys/i386/conf/SMP-GENERIC revision 1.16. 1998-09-28 08:20:55 +00:00
Greg Lehey
3d8357b49c Include vinum in SUBDIR 1998-09-28 05:38:52 +00:00
Greg Lehey
759ae89394 Correct calculation of revive blocksize
Submitted by: Chris Csanady
1998-09-28 04:24:10 +00:00
Greg Lehey
02d719b0f5 Get include paths right 1998-09-28 04:21:20 +00:00
Jonathan Lemon
95b246f166 Use defines APM_BIOS and SYSTEM_BIOS instead of hardcoding 0x53 and 0x15. 1998-09-28 03:41:12 +00:00
Tor Egge
a16edda365 Initialize pcb_mpnest to 1 in the child process in cpu_fork(). This should
fix the 50% idle problem that the ELF /sbin/init triggered.  The problem
appeared when the last context switch before a fork() call was due to
the kernel faulting in user pages via normal page faults (e.g. copyin).
Reviewed by:	Peter Wemm <peter@netplex.com.au>
1998-09-28 03:34:39 +00:00
Tor Egge
8fce521a54 Use correct virtual address when configuring the per CPU idle page directory
for a vm86 call under SMP.
1998-09-28 03:26:22 +00:00
David Greenman
ce65e68c03 Be more selctive about when we clear p->valid.
Submitted by:	John Dyson <toor@dyson.iquest.net>
1998-09-28 02:40:11 +00:00
Joseph Koshy
71c1bf9fa5 strings' -> strings -aout -n 3'
Pointer out by:	Ben Smithurst <ben@scientia.demon.co.uk> and
		<des@freebsd.org>
1998-09-27 11:47:24 +00:00
Doug Rabson
63bbbfc70e Update SimOS scsi driver to use CAM. 1998-09-26 14:49:26 +00:00
Doug Rabson
6ecd6bbf9b Don't try to attach an isa bus if there isn't one. 1998-09-26 14:48:19 +00:00
Doug Rabson
6f19d636a6 Merge changes from i386/isa/sio.c up to revision 1.215. 1998-09-26 14:47:16 +00:00
Doug Rabson
e37c045536 Add hooks so that the alpha can detect which disk has the root partition. 1998-09-26 14:37:49 +00:00
Doug Rabson
fb44081bd0 Don't set script to vaddr2 on the alpha - it can't access scripts in device
memory using simple pointers.
1998-09-26 14:29:59 +00:00
Doug Rabson
e0dd9c3ed8 Dike out some obsolete defines which referenced ih_next and ih_prev from
struct ipovly (they don't exist anymore because they don't work when
pointers are 64bit).
1998-09-26 14:26:59 +00:00
Doug Rabson
da653c6148 Start using the new SWI registration system instead of hardwiring everything. 1998-09-26 14:25:32 +00:00
Peter Wemm
d4a2828cde Underlying ,v files were copied and detagged. Re-commit old versions
onto the head revision.  (mainly using sys/bus.h etc for alpha)
1998-09-26 14:00:29 +00:00
Bruce Evans
6674be30f6 Updated ext2_reload() and ext2_sync(). Locking was broken, and MNT_LAZY
syncs weren't optimized properly (they probably still aren't, but are bug
for bug compatible with ffs).  These fixes are mostly academic, since
ext2fs is too broken to mount read-write (it apparently doesn't clear
indirect blocks).

Obtained from:	mostly from Lite2
1998-09-26 12:42:17 +00:00
Doug Rabson
b1a0cced61 Automatically detect which disk was booted and change the root to that disk. 1998-09-26 12:22:53 +00:00
Doug Rabson
e24168e6c3 * Add old UFS compatibility code to alpha/boot1.
* Fix a raft of warnings, printf and otherwise.
* Allocate the correct amount in mod_searchmodule to prevent an overflow.
* Fix the makefiles so they work outside my home directory (oops).
1998-09-26 10:51:38 +00:00
Bruce Evans
7cff8977ca Fixed missing newlines in messages in ext2_check_descriptors().
Fixed vnode and memory leaks after an unlikely (?) error in
ext2_mountfs().

Fixed an unconditional memory leak in ext2_unmount().
1998-09-26 07:16:41 +00:00
Bruce Evans
a094db128f Fixed clean flag handling:
Fixes for bugs not shared with ffs:
- don't mount unclean filesystems rw unless forced to.
- accept EXT2_ERROR_FS (treat it like !EXT2_VALID_FS).  We still don't set
  this or honour the maximal mount count.
- don't attempt to print the name of the mount point when mounting an
  unclean file system, since the name of the previous mount point is
  unknown and the name of the current mount point is still "".

Fixes for bugs shared with ffs until recently:
- don't set the clean flag on unmount of an initially-unclean filesystem
  that was (forcibly) mounted rw.
- set the clean flag on rw -> ro update of a mounted initially-clean
  filesystem.
- fixed some style bugs (mostly long lines).

The fixes are slightly simpler than for ffs, because the relevant on-disk
state is not a simple boolean variable, and the superblock has a core-only
extension.

Obtained from:	parts from ffs_vfsops.c, parts from NetBSD
1998-09-26 06:18:59 +00:00
Bruce Evans
0922cce61c Fixed clean flag handling:
- don't set the clean flag on unmount of an unclean filesystem that was
  (forcibly) mounted rw.
- set the clean flag on rw -> ro update of a mounted initially-clean
  filesystem.
- fixed some style bugs (mostly long lines).

This uses the fs_flags field and FS_UNCLEAN state bit which were
introduced in the softdep changes.  NetBSD uses extra state bits in
fs_clean.

Reviewed by:	luoqui
1998-09-26 04:59:42 +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
Mike Smith
4f75af298c Recover the arguments passed in from the previous load stage, use them to set
the default console.
Print malloc stats from the new libstand allocator.
1998-09-26 01:31:10 +00:00
Mike Smith
2fc3f8fb29 The BIOS can't perform a floppy operation where the destination crosses
a physical 64k boundary.  Allocate a bounce buffer for such a transaction.
1998-09-26 01:30:20 +00:00
Mike Smith
e12d0ec43a console.c
Allow the MI code to override the preferred console (eg. so that
	an RB_SERIAL flag from the i386 boot2 can override the default
	first active console)

isapnp.c
	Use the standard format for ISA PnP IDs.

pnp.c
	Allow trailing comments on lines, be less picky about line
	contents.

ls.c
	Cosmetic error message fix.

panic.c
	Print the right arguments.
1998-09-26 01:29:13 +00:00
Dag-Erling Smørgrav
b9546bc180 Silence a harmless warning. 1998-09-26 00:55:53 +00:00
Matthew Dillon
ff8fae607b PR: kern/7418
Reviewed by:	Luoqi Chen <luoqi@watermarkgroup.com>

    Fixed problem where write()s can get lost due to buffers flagged B_DELWRI
    being improperly released in brelse().
1998-09-26 00:12:35 +00:00
Justin T. Gibbs
03e3511b47 Correct problems with xpt_set_transfer_settings and async transfer
negotiation changes with wildcarded paths.
1998-09-25 22:35:56 +00:00
Robert V. Baron
34b01b8c34 lkm for coda 1998-09-25 17:51:44 +00:00
Robert V. Baron
435385d6ae Don't lose this file 1998-09-25 17:40:50 +00:00
Robert V. Baron
6a6e8b2134 Put "stray" printouts under DIAGNOSTIC. Make everything build
with DEBUG on.  Add support for lkm.  (The macro's don't work
for me; for a good chuckle look at the end of coda_fbsd.c.)
1998-09-25 17:38:32 +00:00
Peter Wemm
10baba4b95 Goodbye BOUNCE_BUFFERS, for a hack it has served us well.
The last consumer of this code (the old SCSI system) has left us and
the CAM code does it's own bouncing.  The isa dma system has been
doing it's own bouncing for a while too.

Reviewed by:	core
1998-09-25 17:34:49 +00:00
Bill Paul
97e28a9d67 Apply patch graciously provided by Jason Wright <jason@thought.net> from
the OpenBSD group to fix a problem with the default ifmedia not being
set properly in some cases with a 3c905B, leading to a panic in ifmedia_set().

Also apply a patch to force the transmit start routine to check the
transmitter to make sure it isn't wedged if the outbound tx queue appears
full. This seems to cure some problems with 'watchdog timeout' errors
cropping up in some cases. I tried to do this before by checking for the
IFF_OACTIVE flag on entry to xl_start(), but if the IFF_OACTIVE flag is
set, ether_output() won't even call xl_start(). It should work now.

Lastly, increase the size of the TX queue from 10 descriptors to 16 to
hopefully make it less likely that the TX queue will fill up.
1998-09-25 17:34:19 +00:00
Peter Wemm
c7f3e669b7 Make these compile when there is an obj dir. 1998-09-25 17:14:16 +00:00
Kazutaka YOKOTA
a3cd018562 Cosmetic change: adjust copyright notice. 1998-09-25 11:55:46 +00:00
Kazutaka YOKOTA
60d4fee48a Slightly adjust the description on SC_ALT_SEQACCESS in the previous
commit.
1998-09-25 11:38:30 +00:00
Jordan K. Hubbard
85e3676076 Match LINT with SC_BAD_FLICKER change.
Submitted by:	Sheldon Hearn <axl@iafrica.com>
1998-09-25 11:00:11 +00:00
Jordan K. Hubbard
7337727eca Add entry for ThunderLAN NIC. 1998-09-25 09:04:24 +00:00
Justin T. Gibbs
f0adc79010 Fix a few problems with the tag delay code:
- Tagged devices were limited to one transaction (oops)
 - We revert to untagged with a tag delay if the user changed the
   transfer negotiation values (via perhaps camcontrol some day).
 - xpt_async did not use the expanded path in some cases which could
   cause a panic.
1998-09-24 22:43:54 +00:00
Nate Williams
cf0ee54fec - Fix a bug where a "power_off_slot' timeout was not cancelled when the
computer 'suspended', although the slot was powered off.  There was a
  race where the slow could be powered off *after* it was assigned a
  new driver when the computer was 'resumed'.

Noticed by:	Brian Somers <brian@Awfulhak.org>
1998-09-24 17:56:31 +00:00
Bill Paul
9460731153 Small tweak: force another reset of the adapter after probing for all the
PHYs in tl_attach(). This is mainly to suck away any possible stray
interrupts.

This prevents an intermittent problem on some systems where the adapter
probes correctly but yields a device timeout (and possible subsequent adapter
check) when configured. When I originally tested the driver, I ifconfig'ed
the interface after the system had already been booted and didn't notice
any problems, but when configuring the interface immediately at startup,
it would occasionally timeout and hang, until an adapter check interrupt
came along and reset things again. I'm not exactly sure if this is a
general problem of just something peculiar to this hardware (there are
three devices, including the tlan, all on IRQ 11) but the extra reset
shouldn't hurt anything. (It works fine with my 100Mbps Olicom adapter too.)

Thanks to Mark Taylor from Cybernet (mtaylor@cybernet.com) for allowing
me remote access to a Compaq system for debugging purposes.
1998-09-24 17:14:23 +00:00
Peter Wemm
05209199cf Minimal change for #if __FreeBSD__ >= 3 to check __FreeBSD_version instead. 1998-09-24 16:00:30 +00:00
Luoqi Chen
e266594c25 Eliminate a race in VOP_FSYNC() when softupdates is enabled.
Submitted by:	Kirk McKusick	<mckusick@McKusick.COM>
Two minor changes are also included,
1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set,
   vn_lock should always succeed in these cases.
2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount
   a little more unstable. It also keeps us in sync with other BSDs.
Suggested by:	Bruce Evans	<bde@zeta.org.au>
1998-09-24 15:02:46 +00:00
Peter Wemm
de77c42832 Change #if __FreeBSD__ >= 3 to #if __FreeBSD_version >= 300000 to aid
bootstrapping from a 2.2.x system.
1998-09-24 13:31:01 +00:00
Jordan K. Hubbard
9587f05dcb MF22: revert time bogon. 1998-09-24 13:25:43 +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
Bruce Evans
dade759d9f Don't redefine kernel. Makefile.i386 now defines it.
Removed some unused includes.
1998-09-24 10:22:21 +00:00
Mike Smith
09d2cff163 Fix type 0 configuration accesses, and use a virtual rather than physical
address for the LCA PCI configuration register address.

FreeBSD/Alpha now boots on the NoName (aka AXPpci 33, Alpha PC), and probably
also on the Multia (mine hasn't arrived yet, so I can't tell for sure).

Submitted by:	Doug Rabson <dfr@freebsd.org>
1998-09-23 21:23:51 +00:00
Jordan K. Hubbard
c9297a7328 return time in proper format for linux. 1998-09-23 14:50:26 +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
Kazutaka YOKOTA
3cd3a6936b Remove the -b boot option. It is no longer necessary now that the VESA
BIOS support is optionally available for syscons.
1998-09-23 06:50:45 +00:00
Bill Paul
b078a935b6 Overhaul the ThunderLAN driver. This update includes the following
changes:

- Cleaned up register access macros so that they work like the XL
  driver macros (you can switch from PIO to memory-mapped mode
  using a single #define -- default is still memory mapped mode).
  The old 'struct overlayed onto the memory mapped register space'
  cruft has been removed.

- Improved multicast filter code. The ThunderLAN has four entry
  perfect filter table in addition to the 64-bit hash table: we need
  one of the perfect filter entries for the station address, but we
  can use the other three for multicast filtering. We arrange to put
  the first three multicast group addresses in the perfect filter
  slots so that commonly joined groups like the all hosts group and
  the all routers group can be filtered without using up bits in the
  hash table.

  Note: in FreeBSD 3.0, multicast groups are stored in a doubly
  linked list, however new entries are added at the head of the list
  (thereby pushing existing entries down towards the tail). We want
  to update the filter starting from the oldest entry to the newest
  since the all hosts group is always joined first. This means we
  really want to start from the tail of the list, not the head, but
  to find the tail we first have to traverse the list all the way to
  the end and then add entries working backwards. This is a bit of a
  kludge and could be inefficient if the list is long.

- Cleaned up autonegotiation code: tl_autoneg() wasn't always setting
  modes correctly.

- Cleaned up ifmedia update and status routines as well.

- Added tl_hardreset() routine to initialize the internal PHY according
  to the ThunderLAN manual.

- Did away with the kludge where PHYs were treated as separate logical
  interfaces. This didn't really work, especially in the case of the
  newer Olicom 2326 adapters which use a Micro Linear ML6692 PHY which
  provides only 100Mbps support, relying on the internal PHY for 10Mbps
  support (both PHYs share the RJ45 port, with the 6692 doing all the
  autonegotiation work). This kludge resulted from my misunderstanding
  of the operation of the Compaq Netelligent Dual Port card (the tlan
  manual mentions multiple channels, but in a different context; this
  got me a little confused). The driver has been reported to work
  correctly with the dual port card.

- Added dio_getbit/dio_setbit/dio_read/dio_write functions which carefully
  set the ThunderLAN's indirectly accessed internal registers. This makes
  the EEPROM reading code more reliable.

Hopefully I won't have to touch this again before 3.0 goes out the door.
I plan to import the 2.2.x version sometime this week.

Approved-by: jkh
1998-09-23 05:08:54 +00:00
Kenneth D. Merry
54cbee5db2 Treat not ready errors (asc 0x04) as non-fatal errors for attach. We
already allowed medium not present type errors (0x3a), but some Philips and
HP WORM drives return 0x04,0x00 when you issue a read capacity without
media in the drive.
1998-09-23 03:17:08 +00:00
Justin T. Gibbs
fd21cc5ee0 Allow 5 untagged commands to go to a device before enabling tags after
enabling transfer negotiations, a BDR, or a bus reset to allow the controller
driver to negotiate without tagged messages getting in the way.  Some
devices are confused by attempts to negotiate and tag at the same time.
Some controllers (e.g. BT MultiMaster with certain firmware revs) will
never negotiate if you don't give them an untagged "window" to perform
negotiation in.

Bump the maximum tag count to 255.  The system reclaims unused tag space
as the tag count is dropped anyway, so we might as well try the max.

We should probably use a larger type than u_int8_t to hold our tag value
as SCSI over certain mediums allows for higher values.

Reviewed by:	 Kenneth Merry <ken@FreeBSD.org>
1998-09-23 03:03:19 +00:00
Kenneth D. Merry
aec4b791c5 A fix from Justin for the NCR bug that caused panics on 875 (and possibly
other) chips.

The script pointer was getting set to NULL instead of the right value.

Submitted by:	gibbs
1998-09-22 21:42:46 +00:00
Kenneth D. Merry
f24c39c7d5 Add several quirks:
Western Digital Enterprise drives have sorry performance (1.5MB/sec versus
8MB/sec) when doing tagged queueing.  Disable tagged queueing for them.

Submitted by:	Andrew Gallatin <gallatin@cs.duke.edu>

Some Sony CDROM drives don't like it when we probe more than one LUN.

Verified by:    Jean-Marc Zucconi <jmz@FreeBSD.ORG>

Some Sony CD-R's don't like multi-LUN probing either.

Submitted by:   Parag Patel <parag@cgt.com>
1998-09-22 20:41:12 +00:00
KATO Takenori
42d36a9a0b Sync with sys/i386/isa/clock.c revision 1.127. 1998-09-22 16:12:00 +00:00
KATO Takenori
91dc9190a6 Sync with sys/i386/conf/majors.i386 revision 1.50. 1998-09-22 16:11:38 +00:00
KATO Takenori
a80a8d7271 Sync with sys/i386/conf/Makefile.i386 revision 1.124. 1998-09-22 16:11:08 +00:00
KATO Takenori
77c2f3685e Sync with sys/i386/conf/GENERICupgrade revision 1.3. 1998-09-22 16:10:40 +00:00
John Birrell
3ab87a0f91 Post C-day sync with GENERIC. 1998-09-22 11:13:14 +00:00
Justin T. Gibbs
6d21c6f373 Bring back the cleanups from revs 1.121 and rev.1.122 of ncr.c.
Noticed by: bde
1998-09-22 04:56:08 +00:00
Justin T. Gibbs
02f822dd7d dpt.h:
Bump the lun field in the eata ccb to 5 bits.  We still only
	use 3 of them, but we may use the rest at a later date.

dpt_scsi.c:
	Default to only 32 S/G segments.

	Bzero our CCB array after allocation.
1998-09-22 04:55:07 +00:00
Justin T. Gibbs
53b062d3cc cam.c:
Clear up trailing NULs in cam_strvis.

cam_xpt.c:
	Nuke an experimental quirk entry for the Toshiba 3401.  The real
	problem with this device turned out to be a bug in the aic7xxx
	driver that was fixed months ago.

	Add a quirk entry to inhibit multiple lun scanning and serial number
	probing of DPT RAID volumes.  My DPT controller hangs up solid when
	I do either of these things to a RAID 1 volume.
1998-09-22 04:53:23 +00:00
Mike Smith
26dd997fbe New major for 3dfx driver. 1998-09-21 22:04:07 +00:00
Justin T. Gibbs
0f39fbdeb5 Correct twin channel operation. 1998-09-21 16:46:13 +00:00
Bruce Evans
5b036e2b3c Fixed missing dependencies of genassym.o, gensetdefs.o and vers.o
on opt_global.h.  This actually matters for genassym.o (it depends
on at least SMP).

Don't undefine KERNEL for compiling genassym.c.  genassym.o really
depends on KERNEL, and the prototype mismatches that required
undefining KERNEL in rev.1.49 no longer exist.

Compile gensetdefs* with the same flags as genassym*.  External
`gen' programs such linux_genassym should also use these flags
(${GEN_CFLAGS}).

Fixed missing dependency generation for gensetdefs.o.  C sources
for external `gen' programs should be added to GEN_CFILES to get
their dependencies generated.

Cleaned up flags definitions and use.  All of ${CFLAGS} is now
passed to mkdep and the assembler (both are actually variants of
${CC} and will ignore the irrelevant flags).
1998-09-21 06:39:11 +00:00
Bruce Evans
641fc5df83 Clean aicasm's lex and yacc generated source files. 1998-09-21 04:41:11 +00:00
Justin T. Gibbs
bd6bae2166 Remove unused variables and functions.
In the rejected message handler, it was possible for us to confuse a
rejected SDTR or WDTR for a rejected tag.
1998-09-20 23:30:14 +00:00
Kenneth D. Merry
8dc6f245bc Alpha patches for the NCR driver from Doug Rabson. I've tested these on an
NCR 810a, and they seem to work fine on the i386 as well.

Reviewed by:	gibbs
Submitted by:	dfr
1998-09-20 22:54:28 +00:00
Kenneth D. Merry
050279e55a Some fixes to the CD driver that may fix PR kern/7996. The data direction
flags on some of the operations in the driver weren't quite right.  Also,
clean up scsi_cd.h, change u_char to u_int8_t.

I'm surprised this problem didn't show up sooner.  (the code has been in
there almost a year and a half)

PR:		        7996
Reviewed by:	        ken
Submitted (mostly) by:	gibbs
1998-09-20 22:48:15 +00:00
Doug Rabson
453455282c Make the alpha bootstrap build again, fix some warning and change sdboot to daboot. 1998-09-20 21:46:19 +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
58bcaed08c vpo now compiles with CAM, #!CAM# removed. 1998-09-20 17:15:25 +00:00
Dmitrij Tejblum
a511bf18fe Fix precedence bug, so that kernel dump works. 1998-09-20 16:50:31 +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
Nicolas Souchu
71705a23fc - port of vpo code to CAM
- ppbus was released before checking if still in disk_mode by vpoio and immio:
  the microseq (in_disk_mode) was never executed. Fixed.

- nlptintr() renamed to nlpt_intr(). spltty() inserted in nlptintr() before
  nlpt_intr() call
1998-09-20 14:41:54 +00:00
KATO Takenori
e0029f2568 Sync with sys/i386/isa/clock.c revision 1.126. 1998-09-20 10:51:57 +00:00
KATO Takenori
47d002cf75 Sync with sys/i386/conf/files.i386 revision 1.205. 1998-09-20 10:50:18 +00:00
Justin T. Gibbs
3e82ad76da Re-enable the advansys driver. 1998-09-20 07:20:19 +00:00
Justin T. Gibbs
1da3ff4eea Drop the maximum SG count to 32 from 1024. We can't make use of all of
those extra ones yet, anyway.

In dpttimeout, expect that the controller will complete aborted CCBs through
the interrupt handler.  This corrects a panic that was caused by completing
the same transaction twice during timeout recovery.

Honor the tag times types expressed by the user and pass them down to
the controller.
1998-09-20 07:19:53 +00:00
Justin T. Gibbs
0c4930f525 Don't invalidate devices due to unexpected unit attention errors. In
a perfect world, we'd notice the UA and do some device validation to ensure
that the device hasn't changed.  We may get this before the year ends,
but not before 3.0R.  This change gives the adminstrator ample ammunition
to take off a foot or two, but hey this *is* UN*X.
1998-09-20 07:17:11 +00:00
Justin T. Gibbs
e471e974cc cam_xpt.c:
Add quirk entry for a Samsung drive that doesn't like experiencing
	the queue full condition.

	Bump the timeouts for all probe activities to 60s.  We don't know
	what the seletion timeout (or equivelent on other mediums) is
	for controllers, which can make the transactions at the tail
	end of a parallel probe take a while to complete.  The DPT
	seems to be a card that takes a long time to see a selection timeout.

cam_periph.c:
	Don't call a device "gone" after a single selection timeout.  We
	need to come up with a better policy.  Until that time, you'll
	have to manually re-scan a bus via camcontrol for the system to
	decide that a device is really gone.  This should give devices
	experiencing temporary insanity to escape death.
1998-09-20 07:14:36 +00:00
Bruce Evans
4af2cddffe Removed unused file. 1998-09-20 06:28:10 +00:00
Bruce Evans
9547f2c6d9 Remove unused file. It was missing about half the necessary entries. 1998-09-20 06:23:58 +00:00
Bruce Evans
3a049d0356 Removed entries for dead SLICE files.
Removed commented out entries for dead networking files (netccitt etc.).
Uncommented entries for zombie networking files (netns).
1998-09-20 06:17:49 +00:00
Bruce Evans
35b47c4228 Remove vestiges of SLICE code.
Forgotten by:	sos
1998-09-20 06:04:56 +00:00
Bruce Evans
4c7304dd15 Remove unused file. 1998-09-20 05:54:38 +00:00
Justin T. Gibbs
8726fc121b On wide cards with firmware revisions < 5.06L, we have to infer that
wide targets are in fact running wide since the "setup info" command
for these revisions does not fill out the wide negotiation bits.
1998-09-20 05:08:15 +00:00
Justin T. Gibbs
ebeec632cd Correct a bug in the timeout handler. When queuing a BDR response to
a timeout, we must remove the pending SCB from the disconnected list
or risk list corruption when our BDR request using the same SCB is placed
on the waiting list.

Eradicate some silly uses of u_int8_t that just serve to slow the code down.
1998-09-20 05:06:10 +00:00
Justin T. Gibbs
c279502fc6 Correct compilation with option DIAGNOSTIC set.
Upgrade to the latest firmware.
1998-09-20 05:04:05 +00:00
Justin T. Gibbs
ecdf111388 Only deregister out configuration hook manually if there are no SCSI
busses to configure.
1998-09-20 05:03:34 +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
John Polstra
cc59ec0b9e Null-terminate the message for a warning symbol in the __warn_references()
macro for ELF.  Ian@cygnus.com says that is the proper way to use
the ".gnu.warning.SYMBOL" sections.  However, he has accepted Doug
Rabson's BFD patch anyway.
1998-09-20 03:24:55 +00:00