Commit Graph

19367 Commits

Author SHA1 Message Date
Søren Schmidt
a6e23e28c1 Hide the "devclass_alloc_unit: %s%d already exists, using next available..."
behind bootverbose

Approved by: jkh
2000-02-20 10:07:28 +00:00
Sheldon Hearn
4ca7c740a6 Fix buffer overrun in pcfclock_read(). The submitter is the original
author of the affected code.

PR:		16552
Submitted by:	Sascha Schumann <sascha@schumann.cx>
Approved by:	jkh
2000-02-20 09:08:33 +00:00
Kenneth D. Merry
955f7e7474 Fix 'camcontrol inquiry'. The inquiry data structure changes (increased to
256 bytes) caused it to break on many devices.

The SCSI spec says that for commands with 8-bit length fields, a value of 0
means 256 bytes.  As it turns out, many devices don't deal with that
properly.  Some interpret the 0 as 0, and return no data.  Others return
more than 256 bytes of data, and cause an overrun.

The fix is to tell the device we've only allocated SHORT_INQUIRY_LENGTH (36
bytes) of inquiry data, instead of sizeof(struct scsi_inquiry_data).

camcontrol.c:		Change inq_len in the call to scsi_inquiry() to
			SHORT_INQUIRY_LENGTH, and add a long comment
			explaining the reason for the change.

scsi_all.h:		Add a comment above the definitinon of
			SHORT_INQUIRY_LENGTH alerting people that it is
			both the initial probe inquiry length, and the
			minimum amount of data needed for scsi_print_inquiry()
			to function.

scsi_all.c:		Add a comment about SHORT_INQUIRY_LENGTH being the
			minimum amount of data needed for
			scsi_print_inquiry() to function.

Reviewed by:	gibbs
Approved by:	jkh
Reported by:	"John W. DeBoskey" <jwd@unx.sas.com>
2000-02-20 04:42:44 +00:00
Robert Watson
41ecf3565f Disable chflags() from within jail() so that root within jail can't make
a mess in securelevel environments.  Results in one warning during
/etc/rc as it attempts to remove file flags, but this is harmless.

Approved by:	High Lord Hubbard
2000-02-20 01:10:36 +00:00
Doug Rabson
6874d62958 Remove the vga-pci driver. It serves no purpose and it hides the hardware
from useful drivers such as the 3D DRI drivers I will be porting for
hardware accelerated OpenGL. The hardware will still be reported during
boot using the nomatch system.

Approved by: jkh
2000-02-19 09:44:06 +00:00
Søren Schmidt
47351d2774 Update the ata driver to take more advantage of newbus, this
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, more to come on that)

Support the CMD646 chip which is used on many alphas, sadly only
in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes.

Lots of cosmetic fixes here and there.

Sorry for the size of this megapatchfromhell but it was not
possible otherwise...

newbus patches based on work from: dfr (Doug Rabson)
2000-02-18 20:57:33 +00:00
Mike Smith
a3c8168096 Increase the time we spend waiting for the controller to become ready to
accept a new command; in high load cases it may be too busy for the old
value.

This loop needs something to tie it to real time, rather than just the CPU's
ability to fetch from the L1 data cache, but this hack works for now.

Approved by:	jkh
2000-02-17 23:33:57 +00:00
Mike Smith
bb328b87c1 Change the mountroot prompt to something that doesn't look at all like a
firmware prompt.  Several sleepy folk mistook the '>>>' for the SRM
prompt, which was never the desired idea.

Submitted by:	Andrew Gallatin <gallatin@cs.duke.edu>
Approved by:	jkh
2000-02-17 23:32:08 +00:00
Bruce Evans
90bb57afd9 Don't include <machine/ipl.h> in <sys/systm.h> in the i386 case. This
fixes some namespace pollution in general and breakage of modules that
aren't in the sys tree in particular (<machine/ipl.h> includes further
headers that aren't installed under /usr/include).

Reimplemented SPLASSERT() so that it is more machine independent and
less bloated and doesn't require the <machine/ipl.h> include spam.
In particular, don't assume that `cpl' can be printed using %08x
format.  The alpha arch doesn't even have `cpl'.  SPLASSERT() was
harmless on alphas because it isn't actually used.
2000-02-17 18:37:45 +00:00
KATO Takenori
df16ced79a Merged from sys/isa/sio.c rev 1.288. 2000-02-17 15:09:12 +00:00
KATO Takenori
baf67f3c77 Synced with sys/i386/i386/userconfig.c rev 1.173. 2000-02-17 14:45:05 +00:00
Warner Losh
e6157956d2 Add the VIA 82C596B PCI ISA south bridge on my ASUS P3V133.
Approved by: jkh
2000-02-17 06:12:16 +00:00
Mike Smith
51b5739aaf Close a file descriptor leak in the code which loads file objects.
Submitted by:	Paul Saab <paul@mu.org>
Approved by:	jkh
2000-02-17 02:19:19 +00:00
Matthew Dillon
1f6889a1eb Fix null-pointer dereference crash when the system is intentionally
run out of KVM through a mmap()/fork() bomb that allocates hundreds
    of thousands of vm_map_entry structures.

    Add panic to make null-pointer dereference crash a little more verbose.

    Add a new sysctl, vm.max_proc_mmap, which specifies the maximum number
    of mmap()'d spaces (discrete vm_map_entry's in the process).  The value
    defaults to around 9000 for a 128MB machine.  The test is scaled for the
    number of processes sharing a vmspace (aka linux threads).  Setting
    the value to 0 disables the feature.

PR: kern/16573
Approved by: jkh
2000-02-16 21:11:33 +00:00
Justin T. Gibbs
945111e5a7 Remove a diagnostic printf.
Noticed by:	 imp@FreeBSD.org
2000-02-16 18:41:00 +00:00
John Baldwin
536fcb08bf This patch to BTX fixes several small things:
1) Fix a bug in the int15 function 87 emulation where we only copied half
   of what the BIOS asked for.  This caused the Mylex RAID adapter to go
   haywire and start trashing memory when you tried to boot from it.
2) Don't use interrupt 19 to reboot.  Instead, set the reboot flag to a warm
   boot and jump to the BIOS's reboot handler.  int 19 doesn't clear memory
   or restore the interrupt vector table, and thus really isn't safe.  For
   example, when booting off of PXE, the PXE BIOS eats up a chunk of memory
   for its internal data and structures.  Since we rebooted via int 19,
   using the 'reboot' command in the loader resulted in that memory not
   being reclaimed by the BIOS.  Thus, after a few PXE boots, the system
   was out of lower memory.
3) Catch any int 19 calls made by a BTX client or a user pressing
   Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly.  This
   fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting
   the user with a BTX fault.

Approved by:	jkh
Found by:	1) by msmith
2000-02-16 07:00:16 +00:00
Kazutaka YOKOTA
528b8853bb Make it clear that 'options XSERVER' is for pcvt and not for syscons.
Submitted by: Doug Barton <Doug@gorean.org>
Approved by: jkh
2000-02-16 04:27:04 +00:00
Matthew N. Dodd
8d5d0412c0 Track if_i{bytes,packets,errors}.
Approved by: 	jkh
2000-02-16 04:04:36 +00:00
Matt Jacob
af077239b6 Include the file that defines PCIM_CMD_BUSMASTEREN. 2000-02-16 02:22:37 +00:00
Mike Smith
7af42aebc4 Ensure that the busmaster enable bit is set; we can't assume that all
BIOS code will get this right (and some certainly doesn't).

Submitted by:	W. Gerald Hicks <jhix@mindspring.com>
Approved by:	jkh
2000-02-16 01:12:09 +00:00
Joerg Wunsch
2c6610f343 Hide the boring `not probed (disabled)'' messages behind bootverbose'.
This unspams the boot messages, concentrating on the drivers that have
actually been probed.

This basically resurrects revision 1.106 from old /sys/i386/isa/isa.c.

Reviewed by:	jkh, dfr
2000-02-15 19:23:34 +00:00
Andrew Gallatin
128f43c891 o Wilko Bulte has tested our AlphaServer 1000A ("Noritake") support
code & it survives a buildworld.  So remove the dire warnings about
  Noritake support being untested.

o Remove a disconserting printf() left over from NetBSD

Approved by: 	jkh
2000-02-15 18:47:51 +00:00
Jordan K. Hubbard
7db56b4c3e Add userconfig entries for the new atapi devices.
Submitted by:	Dan Papasian <bugg@bugg.strangled.net>
2000-02-15 18:33:25 +00:00
Bruce Evans
34ae9210dd Fixed regressions in rev.1.274:
1) Non-AST4 multiport cards were broken by bypassing the code that changes
   `idev' to the multiport master device.
2) AST4 multiport cards apparently were broken by inverting the test for
   the master device having an irq.
3) Error handling for nonexistent master devices was broken by removing a
   check for a null pointer.
4) `int' error codes returned by bus_get_resource() were assigned directly
   to the boolean variable com->no_irq.  Probably harmless, since the
   boolean is implemented as a u_char.

Submitted by:	part 1) by Chris Radek <cradek@in221.inetnebr.com>
		part 2) by yokota
Approved by:	jkh
2000-02-15 17:29:09 +00:00
Poul-Henning Kamp
693e27d473 Don't try to account for the partial quantum unless the process is
curproc.  This only makes any difference on SMP, where we used a
(potentially very bogus) switchtime from our own CPU to calculate
resource usage on another CPU.

This should remove some if not all calcru() related warnings on SMP.

Approved by:		jkh
2000-02-15 09:02:07 +00:00
Martin Cracauer
30de91e8b8 Allow comments in interpreter specification lines as in
#! /bin/sh # -*- perl -*-

This is simply "delete everything after the next '#', not counting the
first char in the line". No effort has been made to allow quoting,
backslash escaping or '#' in interpreter names.

The complies to POSIX 1003.2 in that Posix says the implementation is
free to choose whatever it likes.

PR:		bin/16393
2000-02-15 08:49:57 +00:00
Matt Jacob
a6dd44dea5 Add comments about 12160 options.
Approved: jkh
2000-02-15 01:08:27 +00:00
Matt Jacob
b6f774e39b Fix ITDEBUG macro.
Approved: jkh
2000-02-15 00:54:26 +00:00
Matt Jacob
14a3729325 Correctly identify which bus of dual bus SCSI adapters some target mode
commands (enable/disable/modify lun && immediate notify) we're talking about.

Approved: jkh
2000-02-15 00:53:49 +00:00
Matt Jacob
d667c06c77 Clean up some target mode debug messages. Fix (finally, I believe)
Andrew's problems with SCSI on some alphas- do not call isp_update
directly to update parameters- just mark them as being ready to
update for the next command- the system would just hang on a READ
CAPACITY for a drive. Really annoying because it wouldn't even timeout
(and it has a timeout) so either the SET PARAMETERS call was nuking
things or the f/w was really dropping the ball.

approved: jkh

Reviewed by:	gallatin@freebsd.org
2000-02-15 00:52:52 +00:00
Matt Jacob
e142669a43 If the CDB length is greater than 12 for parallel SCSI, ispscsicmd has
made the initial queue entry a EXTENDED CMD queue entry, so we have to
go straight to continuation segments for any data segments.

approved: jkh
2000-02-15 00:50:01 +00:00
Matt Jacob
fe4d046167 Clean out residual bogosity for fast posting stuff- ISP_NO_FASTPOST_SCSI
is gone as a define. We just don't support fast posting for anything less
than the 1240/1080/1280/12160 or Fibre Channel cards.

Put in support for CDB's larger than 12 bytes for parallel SCSI (up to 44
bytes are allowed).

Approved: jkh
2000-02-15 00:35:00 +00:00
Cameron Grant
73bd6f4aab fix ess end-of-buffer repeating
Submitted by:	nhibma
Approved by:	jkh
2000-02-14 23:37:02 +00:00
Peter Wemm
e463cfe7b6 Fix is_splxxx() warnings when not compiled with INVARIANT_SUPPORT.
Approved by:	jkh
2000-02-14 06:11:53 +00:00
Peter Wemm
194a0b6c97 Avoid a panic in __getcwd(2) when combined with umount -f. 2000-02-14 06:09:01 +00:00
Duncan Barclay
91a2dd11db Initial import 2000-02-13 21:07:25 +00:00
Gerard Roudier
7a35ada03e Simplifications:
- Remove all the code intended to deal with experimental
  C1010 revisions. This code got useless due to commercial
  chip revisions having been fixed.
Fixes:
- Rewrite/rework the WSR condition handling.
  Previous drivers snooped on the BUS through the SBDL IO
  register and this has been discovered to trigger a spurious
  SCSI parity error when WSR had been set by chip and cleared
  by SCRIPTS prior to reading SBDL bit [0...7].
  On the other hand, the C1010 does not use the SWIDE register
  when synchronous data transfers are taking place and
  requires a CHMOV (1) WHEN DATA_IN to be performed in order
  to move to memory the residual byte when WSR is set and
  the residual byte is useful data.
  BTW, the new WSR handling by the driver is simpler.
- No longer attempt to read from SCRIPTS the SBDL register.
  This is intended to avoid to be victimized again by any other
  issue regarding the handling of this register by 8xx chips.
Miscellaneous:
- The driver is now able to handle the WSR + IGN RESIDUE
  condition at the end of a DATA IN I/O without need of a
  programmed interrupt. It is a minor? optimization.
- A few other minor cosmetic changes.

This driver version fixes notably a permanent SCSI parity
error condition at boot that can be triggerred due to recent
changes in cam_xpt.c between 1.79 and 1.80.
Changes in CAM/XPT are fine, but the new handling of the full
INQUIRY may trigger the driver problem when a target returned
an odd value in the `additionnal length' field of the INQUIRY
response.

The diff against previous driver version is large, but it
consists approximatively in:
- 350 lignes removed and not compiled in previous drivers
  (They addressed experimental C1010 revisions)
- 250 lignes added or changed, half being comments or empty
  lines.
So, in fact, the real changes are about 120 lines of source.
About 80 lines address SCRIPTS changes and about 40 lines
address C code changes.

Approved by: jkh

New WSR handling reviewed by Pamela Delaney <pam.delaney@lsil.com>
(For back-porting to Linux sym53c8xx driver 1.6x series)
2000-02-13 12:14:07 +00:00
Poul-Henning Kamp
f1220da49c Fix sign reversal in adjtime(2).
Approved by:	jkh
2000-02-13 10:56:32 +00:00
Doug Rabson
9a1498a435 Fix an uninitialised variable which affected probing on some machines.
Approved by: jkh
Reviewed by: gallatin
2000-02-13 09:49:05 +00:00
Peter Wemm
56d8a1e30d Oops, forgot this from the previous commit. Remove obsolete #ifdef ISO.
Approved by:	jkh
2000-02-13 03:55:16 +00:00
Peter Wemm
242c5536ea Clean up some loose ends in the network code, including the X.25 and ISO
#ifdefs.  Clean out unused netisr's and leftover netisr linker set gunk.
Tested on x86 and alpha, including world.

Approved by:	jkh
2000-02-13 03:32:07 +00:00
Peter Wemm
84a5b01504 Fix two warnings. 2000-02-13 03:03:31 +00:00
David E. O'Brien
ed0010ed09 Document the support in the kernel for hardware debug registers on the
ix86 platform which allows for hardware watchpoints, etc...

Submitted by:	Brian Dean <brdean@unx.sas.com>
2000-02-12 18:33:54 +00:00
Doug Rabson
eb06360f04 Add functions which allow i/o memory to be accessed without forcing a
memory barrier (needed for XFree86 4.0).

Approved by: jkh
2000-02-12 14:57:01 +00:00
Robert Watson
83f1e257e0 Yet-another-update: rename ``kern.prison'' to a new sysctl root entry,
``jail'', and move the set_hostname_allowed sysctl there, as well as
fixing a bug in the sysctl that resulted in jails being over-limited
(preventing them from reading as well as writing the hostname).  Also,
correct some formatting issues, courtesy bde :-).

Reviewed by:	phk
Approved by:	jkh
2000-02-12 13:41:56 +00:00
Peter Wemm
be3448f6ad The Leadtek Winfast TV2000 has one of the FM capable Tuners. Don't
default to a non-FM tuner or FM radio is non-functional.

Approved by:	jkh
2000-02-12 08:49:21 +00:00
Peter Wemm
be6ccf3f6c Do a trivial conversion of xrpu to newbus.
Reviewed by:	phk  ("commit it!" :-)
Pre-Approved by: jkh
2000-02-12 07:56:44 +00:00
Matt Jacob
960f6939af Add in 12160 (Ultra3) support. Redo things to use the newbus code.
Approved: jkh@freebsd.org

PR:		16141
2000-02-11 19:45:17 +00:00
Matt Jacob
66dcc0e99f Turn back on fast posting- the code that turns it off (for 1020/1040) is
now in isp.c

Approved: jkh@freebsd.org
2000-02-11 19:37:56 +00:00
Matt Jacob
af4d01494d Correct a minor typo in error message.
Approved: jkh@freebsd.org
2000-02-11 19:36:30 +00:00
Matt Jacob
c2e7467339 Add in new async mbox defines for 2200- point to point stuff.
Add in definitions for the extended initialization control block
(2200 only again).

Approved: jkh@freebsd.org
2000-02-11 19:35:42 +00:00
Matt Jacob
c211f23b90 Add in 12160 (Ultra3) NVRAM definitions.
Approved: jkh@freebsd.org
2000-02-11 19:34:33 +00:00
Matt Jacob
fd589c2e36 Add in 12160 (Ultra3) firmware. Gawd, this file is bulky.
Approved: jkh@freebsd.org
2000-02-11 19:32:51 +00:00
Matt Jacob
0f38a25b52 Restructure nvram reading routine to split out to separate functions
for 1020/1X80/12160/2X00- for readability. Add in 12160 (Ultra3)
support- but not with PPR just yet.  Fix and clarify fetching of
return parameter for getting firmware rev which for the 2200 contains
the connection topology (Private Loop (NL-port), N-port, FL-port,
F-port). Synthesize the connection topology for the 2100 which can
only be Private Loop or FL-port. Handle a couple of new async
mailbox commands which signify connection in Point-to-Point mode
(N-port or F-port) or indicate various toe stubbing getting to same.

Approved: jkh@freebsd.org
2000-02-11 19:31:32 +00:00
Matt Jacob
83fbc5665e Add 12160 (Ultra3) defines. Add config option flag for forcing point-to-point
instead of FC-AL (2200 only).

Approved: jkh@freebsd.org
2000-02-11 19:25:01 +00:00
Luigi Rizzo
f42c0d553a Forgot one line: don't try to match flags when looking for a flow.
Approved-by: jordan
2000-02-11 13:23:14 +00:00
KATO Takenori
6ccd04a652 Synced with sys/dev/syscons/syscons.c rev 1.336. 2000-02-11 08:54:56 +00:00
KATO Takenori
2611194fd9 Synced with sys/dev/syscons/scterm-sc.c rev 1.4. 2000-02-11 08:54:16 +00:00
Søren Schmidt
32c3d17908 That "NO DRIVER" panic fix wasn't good enough... 2000-02-11 07:37:00 +00:00
Mike Smith
208cc52f94 When allocating resources in the following cases:
- trying for a fit for a PnP configuration from a device
 - soaking up resources from a configuration that were not allocated by
   the driver

do not attempt to activate them.  Only a device driver that is aware of
the nature of the resource and its suitability can be certain that
activating a resource, particularly a memory resource, is a safe thing
to do.

This was prompted by the discovery that many systems report all physical
memory through a PNP0c02 device; activating this resource maps all
physical memory into the kernel's virtual space, either blowing out the
kernel pagetable or in the worst case causing a panic in pmap_mapdev()
if the system has too much physical memory.

Authorised by:	jkh
Reviewed by:	dfr
2000-02-11 04:35:07 +00:00
Kazutaka YOKOTA
aec1fa1ca3 - Be slightly more cautious and try to make more sure the keyboard
input queue is emptied when initializing the keyboard controller.
- Remove an unnecessary `if' statement.

Approved by: jkh
2000-02-11 01:22:30 +00:00
Kazutaka YOKOTA
40de16e3c3 - Don't reset text colors when changing the video mode.
Approved by: jkh
2000-02-11 01:20:34 +00:00
Kazutaka YOKOTA
ade2307229 - Fix text cursor logic so that multiple instances of the "normal" cursor
won't appear on the screen, and "blinking" and "destructive" cursor
  won't appear in the vty for which the text cursor is currently hidden.

Approved by: jkh
2000-02-11 01:19:44 +00:00
Guido van Rooij
a993ad154a Re add rev 1.11 diffs to ip_fil.h Also discover that I did not undefine
CVS_FUBAR (which no longer exists) and thus forgot to add $FreeBSD's.
Add them.

Approved by: jkh (is part of ipfilter upgrade)
2000-02-10 21:29:11 +00:00
Yoshinobu Inoue
f7d7fca7fd Prototype fix for IPsec authentication related functions
Some of IPsec authentication related functions should have
  'const' for its 2nd argument, but not now.
  But if someone try to use them, and passed const data for
  those functions, then much bogus compile warnings will be
  generated.
  So those funcs prototype should be modified.

Requested by: archie
Approved by: jkh
2000-02-10 19:35:53 +00:00
Yoshinobu Inoue
1aa540eb03 Forbid include of soem inet6 header files from wrong place
KAME put INET6 related stuff into sys/netinet6 dir, but IPv6
  standard API(RFC2553) require following files to be under sys/netinet.
    netinet/ip6.h
    netinet/icmp6.h
  Now those header files just include each following files.
    netinet6/ip6.h
    netinet6/icmp6.h

  Also KAME has netinet6/in6.h for easy INET6 common defs
  sharing between different BSDs, but RFC2553 requires only
  netinet/in.h should be included from userland.
  So netinet/in.h also includes netinet6/in6.h inside.

  To keep apps portability, apps should not directly include
  above files from netinet6 dir.
  Ideally, all contents of,
    netinet6/ip6.h
    netinet6/icmp6.h
    netinet6/in6.h
  should be moved into
    netinet/ip6.h
    netinet/icmp6.h
    netinet/in.h
  but to avoid big changes in this stage, add some hack, that
    -Put some special macro define into those files under neitnet
    -Let files under netinet6 cause error if it is included
     from some apps, and, if the specifal macro define is not
     defined.
     (which should have been defined if files under netinet is
     included)
    -And let them print an error message which tells the
     correct name of the include file to be included.

  Also fix apps which includes invalid header files.

Approved by: jkh

Obtained from: KAME project
2000-02-10 19:33:58 +00:00
Robert Watson
5bdee2c5d5 Fix sysctl namespace for jail: move the kern.jailcansethostname to
kern.prison.set_hostname_allowed, off of the kern.prison node.  Future
jail twiddles should be placed in this namespace.
2000-02-10 18:51:58 +00:00
Nick Hibma
8f9683e20c Correctly handle the conversion from virtual to physical addresses. The
problem was basically (for offset > 4096):

	vtophys(addr) + offset != vtophys(addr + offset)

Also, use TD's with a maximum size of 4k instead of 8kb for OHCI
controllers.

This problem occurs in drivers that use large transfer sizes:
umass, host2host and ethernet with jumbo frames.
2000-02-10 18:50:19 +00:00
Luigi Rizzo
9fcc079584 Move definition of fw_enable from ip_fw.c to ip_input.c
so we can compile kernels without IPFIREWALL .

Reported-by: Robert Watson
Approved-by: jordan
2000-02-10 17:56:01 +00:00
Luigi Rizzo
6355710df8 Whoops... forgot braces in a conditional
Revealed-by: diff with -STABLE version (the advantage of having
    multiple lines of development...)
Approved-by: jordan
2000-02-10 16:50:53 +00:00
Luigi Rizzo
6bc748b057 Support the net.inet.ip.fw.enable variable, part of
the recent ipfw modifications.

Approved-by: jordan
2000-02-10 14:19:53 +00:00
Luigi Rizzo
03c612662b Support for stateful (dynamic) ipfw rules. They are very
similar to ipfilter's keep-state.

Look at the updated ipfw(8) manpage for details.

Approved-by: jordan
2000-02-10 14:17:40 +00:00
Robert Watson
6c144e7521 Introduce a new sysctl, kern.jailcansethostname, which determines whether
or not a process in a jail, with privilege, may set the jail's hostname.
Defaults to 1, which permits this.  May be set to 0 by a process with
appropriate privilege outside of jail.  Preventing hostname renaming
from within a jail is currently required to make jails manageable, as they
a currently identifiable only by hostname using /proc, which may be
modified without this sysctl being set to 0.  This will be documented
in upcoming man commits.

Authorized by:	jkh, the ever-patient
2000-02-10 05:32:03 +00:00
Bill Fumerola
ce0c0d9da9 kbdcontrol isn't in everyones path(read: non-root people), so specify
an absolute path for us mere mortals.

Approved by:	jkh
2000-02-10 01:42:04 +00:00
Bill Paul
74ea2d6f60 Update the Tigon driver to use the 12.3.18 firmware release from Alteon.
(No changes to the driver code itself.)

Approved by: jkh
2000-02-10 00:37:48 +00:00
Justin T. Gibbs
85ac786b13 Kill the "unpause_always" argument to unpause_sequencer(). The reasons
for optimizing the unpause operation no-longer exist, and this is much
safer.

When restarting the sequencer, reconstitute the free SCB list on the card.
This deals with a single instruction gap between marking the SCB as free
and actually getting it onto the free list.

Reduce the number of transfer negotiations that occur.  In the past, we
renegotiated after every reported check condition status.  This ensures
that we catch devices that have unexpectidly reset.  In this situation,
the target will always report the check condition before performing a
data-phase.  The new behavior is to renegotiate for any check-condition where
the residual matches the orginal data-length of the command (including
0 length transffers).  This avoids renegotiations during things like
variable tape block reads, where the check condition is reported only
to indicate the residual of the read.

Revamp the parity error detection logic.  We now properly report and
handle injected parity errors in all phases.  The old code used to hang
on message-in parity errors.

Correct the reporting of selection timeout errors to the XPT.  When
a selection timeout occurs, only the currently selecting command
is flagged with SELTO status instead of aborting all currently active
commands to that target.

Fix flipped arguments in ahc_match_scb and in some of the callers of this
routine.  I wish that gcc allowed you to request warnings for enums passed
as ints.

Make ahc_find_msg generically handle all message types.

Work around the target mode data-in wideodd bug in all non-U2 chips.
We can now do sync-wide target mode transfers in target mode across the
hole product line.

Use lastphase exclusively for handling timeouts.  The current phase
doesn't take the bus free state into account.

Fix a bug in the timeout handler that could cause corruption of the
disconnected list.

When sending an embedded cdb to a target, ensure that we start on a
quad word boundary in the data-fifo.  It seems that unaligned stores
do not work correctly.
2000-02-09 21:25:00 +00:00
Justin T. Gibbs
1907f932b8 Fix parity error detection logic for aic7880 and aic7895 chips during
the probe of external SRAM.

Approved by: jkh@FreeBSD.org
2000-02-09 21:00:22 +00:00
Guido van Rooij
6cd756a2b5 Bring over ipfilter v3_3_8 kernel sources, including merging the
local modifications.
Also fix initializing fr_running in KLD case.
Rename ipl_inited to fr_runninhg in mlfk_ipl

Approved by: jkh
2000-02-09 20:56:36 +00:00
Andrew Gallatin
da4009202a Allow allows peer pci buses which are directly connected to the RCC host pci
chipset to be probed & attached on newer Dell PowerEdge servers, such as
the 2400 and 4400.

Reviewed by: 	dfr, msmith, jlemon
Tested by:	hnokubi@yyy.or.jp (in a previous incantation)
Approved by:	jkh
2000-02-09 20:05:30 +00:00
Ruslan Ermilov
a6120246a2 Support the new ata(4) syntax, while providing backward compatibility for wd(4).
Reviewed by:	jkh, msmith, sos
Approved by:	jkh
2000-02-09 19:23:46 +00:00
Matthew N. Dodd
d00d79c12c Remove the old copy of this file. It is now active in its new location.
Implicit Approval by:	 jkh
2000-02-09 04:18:41 +00:00
Matthew N. Dodd
978d4f5bc8 Complete the repo-copy of ida_pci.c to sys/dev/ida/
Implicit Approval by:	 jkh
2000-02-09 04:17:10 +00:00
Robert Watson
35a0a88fda Correct an oversight in jail() that allowed processes in jail to access
ptys in ways that might be unethical, especially towards processes not in
jail, or in other jails.

Submitted by:	phk
Reviewed by:	rwatson
Approved by:	jkh
2000-02-09 03:32:11 +00:00
Yoshinobu Inoue
a683a7dd4f Avoid kernel panic when tcp rfc1323 and rfc1644 options are enabled
at the same time.

   When rfc1323 and rfc1644 option are enabled by sysctl,
   and tcp over IPv6 is tried, kernel panic happens by the
   following check in tcp_output(), because now hdrlen is bigger
   in such case than before.

/*#ifdef DIAGNOSTIC*/
        if (max_linkhdr + hdrlen > MHLEN)
                panic("tcphdr too big");
/*#endif*/

   So change the above check to compare with MCLBYTES in #ifdef INET6 case.
   Also, allocate a mbuf cluster for the header mbuf, in that case.

Bug reported at KAME environment.
Approved by: jkh

Reviewed by: sumikawa
Obtained from: KAME project
2000-02-09 00:34:40 +00:00
Nicolas Souchu
249a96889e Fix system hang when printer locks on missing paper
(also called the "printer fiasco")

Approved by: jkh
2000-02-08 21:46:27 +00:00
Poul-Henning Kamp
9b6d9dba20 Also allow non-rot processes to setproctitle()
Submitted by:	Paul Saab <paul@mu.org>
Approved by:	jkh
2000-02-08 19:54:15 +00:00
Søren Schmidt
1af69d6936 Probe cosmetics. 2000-02-08 18:38:39 +00:00
Søren Schmidt
cc8baa1136 The bde script has a bug, I used a patch from it verbatim, bad idea....
Fixed...
2000-02-08 16:39:11 +00:00
Luigi Rizzo
25a3a898ca Update bridging code to the one already in -stable (this was
forgotten some time ago...).

Approved-by: jordan
2000-02-08 14:53:55 +00:00
Søren Schmidt
e8359a57de Do refcounting of open devices (more) correctly.
count_dev funtion by phk.
2000-02-07 23:05:40 +00:00
Søren Schmidt
a9ec39136b Dont panic if no sub-driver is found. 2000-02-07 22:57:11 +00:00
Søren Schmidt
77145a3388 Unbreak addump, now dumping works again. 2000-02-07 22:56:32 +00:00
Nick Hibma
4f2e8d6383 Add PCI Id's for i810 chipsets.
PR:		16517
Submitted by:	SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp>
Approved by:	jhk
2000-02-07 12:50:33 +00:00
Matthew N. Dodd
5326b23cd6 m_pullup() frees the supplied mbuf on failure; we don't need to try
and do this ourselves.

Approved by:	jkh
Noticed by:	Mike Spengler <mks@networkcs.com>
2000-02-07 06:18:38 +00:00
Yoshinobu Inoue
648c4d3822 IPv6 prefix assignment bug fixes.
(1)When all related IPv6 addresses are removed,
       then remove the associated IPv6 prefix.
    (2)When multiple IPv6 link local addrs exist for a same
       interface , then let its IPv6 prefix have multiple
       interface id, and create multiple IPv6 global addrs with same
       interface id.
    (3)When a new IPv6 link local addr is assigned for an
       interface, then let its IPv6 prefix also have the
       interface id of the new IPv6 link local addr, and
       create new IPv6 global addrs with same interface id.

Approved by: jkh
2000-02-07 01:45:30 +00:00
Yoshinobu Inoue
836b116ab0 Permit site local addr in IPv6 source address selection rule.
KAME source addr selection rule had a problem to treat IPv6 site
  local addr.
  The rule is completely rewritten recently and the above problem
  is also fixed, but rewriting same code part in freebsd4.0 is too
  dangerous in this stage, so just add workaround to avoid
  the problem. Just add code for IPv6 site local addresses into IPv6
  source addr selection algorythm part.
2000-02-07 01:32:41 +00:00
Nick Hibma
3a119ee1e2 Don't use tsleep when cold booting. It is called before bus->use_polling
is initialised by usb_init.

This might solve problems with some controllers not being initiliased
properly, because a delay was effectively a tsleep that returned
immediately.

Approved by:	jhk
2000-02-06 14:59:00 +00:00
Nick Hibma
16422b76f1 Correctly handle suspend and resume in APM.
Up to now, errors from DEVICE_SUSPEND(root_bus) were ignored. The fix for
this problem (the introduction of defaults for device methods) has been
committed months ago by Doug Rabson.

Second, the suspended devices were not always properly resumed on error.

Third, swapped the order for calling restore hooks and restore methods, to
be in line with the cases above.

Reviewed by:	Doug Rabson
Approved by:	jhk
2000-02-06 14:57:05 +00:00
Nick Hibma
ef4da90333 Disable the generation of SMIs (System Management Interrupts). Always set
the PIRQD bit.

This fixes the problem of uhub0 hanging forever during boot when USB
keyboard support is switched on in the BIOS on motherboards with Intel
chipsets (UHCI).

Approved by:	The Sheep
2000-02-06 14:52:27 +00:00
KATO Takenori
080be1dd6a Synced with sys/boot/i386/loader/Makefile rev 1.41. 2000-02-05 02:21:31 +00:00
KATO Takenori
48ca6b1019 Synced with sys/i386/conf/GENERIC revision 1.241.
Approved by:	jkh
2000-02-05 00:43:04 +00:00
Luigi Rizzo
2dea85d508 Add a NOFORTH variable so we can build a smaller loader without
Forth support, for use with PicoBSD

Approved-By: jordan
2000-02-04 20:57:09 +00:00
Luigi Rizzo
9fbf0caaac Fix a (mostly harmless) scheduling-in-the-past problem with
dummynet (already fixed in -stable, was waiting for Jordan's
approval due to the code freeze).

Reported-By: Mike Tancsa
Approved-By: Jordan
2000-02-04 16:45:33 +00:00
Justin T. Gibbs
4bb38e7b78 Fix indentation.
Overlooked by:	n_himba@FreeBSD.org but not bde@FreeBSD.org
2000-02-04 14:25:24 +00:00
Nick Hibma
3cbd7cadf5 Unbreak LINT (missing curly brace).
Broken by:	gibbs
2000-02-04 14:14:51 +00:00
Søren Schmidt
96ebd6d1fc fix support for shared IRQ's.
fix support for multiple HPT & Promise controllers.

support mixed 33/66 devices on the Promise 66 controllers.

fix the refcount stuff in the atapi drivers.

misc cleanups.
2000-02-04 10:20:22 +00:00
Nick Hibma
b70b9ce019 Commit missing bits, forgotten when committing support for suspend/resume
for USB.

Call uhci_power when suspending and resuming.

Approved by: The One.
2000-02-04 10:18:37 +00:00
Jordan K. Hubbard
4a04162824 Clean up POSIX options, syncronize generics. 2000-02-04 07:02:53 +00:00
Matt Jacob
0f819b8832 Add a quirk type (and one for ARCHIVE Python's) that disables the
dummy read at sa_mount that attempts to latch up density. This breaks
on at least one drive and sends it into the weeds.

Approved:	jkh
2000-02-03 18:29:25 +00:00
Justin T. Gibbs
31fef9fb1a Update copyright license terms to match the reset of the aic7xxx dirver. 2000-02-03 16:54:11 +00:00
Justin T. Gibbs
b27f40c064 Add support for the AdvanSys ASC38C0800 Ultra2 chipset. Preliminary
support is also included for the ASC38C1600 Ultra160 chipset, but
as firmware is not yet available for this chip, it is disabled.

Approved by: jkh@FreeBSD.org
2000-02-03 16:34:57 +00:00
KATO Takenori
3c21e97804 Synced with sys/i386/conf/GENERIC rev 1.240.
Approved by:	jkh
2000-02-03 10:46:28 +00:00
Matthew N. Dodd
4af90a4da4 Make sure that the entire header is in the first mbuf before we
attempt to copy the ethernet header forward and otherwise encapsulate
a packet for output.

This fixes the panic when using VLAN devices on hardware that doesn't
do 802.1Q tagging onboard.  (That is to say, all drivers except the Tigon.)

My tests consisted of telnet, ttcp, and a pingflood of packets
between 1 and 1600 (plus headers) bytes.

MFC to follow in 1 week.

Approved by:	jkh
2000-02-03 07:44:39 +00:00
Archie Cobbs
b12cbc348c The flags PKT_ALIAS_PUNCH_FW and PKT_ALIAS_PROXY_ONLY were both
being defined as 0x40.  Change the former to be 0x100.

Submitted by:	Erik Salander <erik@whistle.com>
Approved by:	jkh
2000-02-02 23:49:32 +00:00
Brian Somers
21b9df573d Mention what PKT_ALIAS_PROXY_ONLY does.
Prompted by: archie
2000-02-02 23:42:06 +00:00
Bill Paul
6f76cb1e28 Add support for WEP (encryption) for silver and gold WaveLAN/IEEE turbo cards.
Also update wicontrol to enable/disable encryption, set WEP keys and set the
TX key index. Silver cards only have 40-bit keys. This is something of a quick
hack, but it works well enough for me to commit this from the LinuxWorld
exhibit floor.

The WEP support only shows up if you have a card that supports it.

Would have been approved by: jkh, if he hadn't wandered off somewhere
Approved in his place by: msmith, who's standing right here
2000-02-02 17:59:13 +00:00
Peter Wemm
872309ccd4 Update the pci->pcic compatability module to newbus. This is a simple
conversion to eliminate the compatability shims without making any
significant changes.  This eliminates the shim warnings.

Obtained from:	n_himba (tweaked by me, don't blame him for this)
Approved by:	jkh
2000-02-02 16:49:21 +00:00
Robert Watson
b7a5f3ca1b Remove static qualifier from vgonel, as it is needed by the Arla folk
outside of vfs_subr.c.

Submitted by:	Assar Westerlund <assar@sics.se>
Reviewed by:	rwatson
Approved by:	jkh
2000-02-02 07:07:17 +00:00
Peter Wemm
483df2dd3b Spell "pci_delete_resource" correctly.
Approved by:	jkh (who must be very sick of requests now :-)
2000-02-01 18:02:12 +00:00
Matthew N. Dodd
1e8a96dc02 if_fpa is included when 'device fpa' is present, not 'device fea'.
Approved by:	jkh
2000-02-01 16:47:34 +00:00
Nick Sayer
651e921455 Avoid passing an uninitialized structure member to the real
READSUBCHANNEL ioctl. This makes vmware work with SCSI CDROM
drives.

Approved by:	jkh
2000-02-01 16:20:24 +00:00
Yoshinobu Inoue
3411310dfb Add workaround for fxp issue at interface initialization with IPv6.
Some LAN card chip for fxp is known to cause problem at
  interface initialization with IPv6 enabled. It happens at
  some delicate timing.
  And also, just adding some DELAY before IPv6 address
  autoconfiguration is known to avoid the problem.

  Complete fix is changing the driver not to use interrupt at
  multicast filter initialization, but trying such change in
  this stage will be dangerous.

  So I add some DELAY() only inside #ifdef INET6 part,
  as temporal workaround only for 4.0.

Approbed by: jkh

Noticed by: Mattias Pantzare <pantzer@ludd.luth.se>

Obtained from: openbsd-tech mailing list
2000-02-01 15:49:37 +00:00
Nick Hibma
764d1fc491 da0 -> da 2000-02-01 09:32:04 +00:00
KATO Takenori
c03afedeb6 Synced with sys/i386/isa/isa_compat.h rev 1.18.
Approved by:	jkh
2000-02-01 09:00:09 +00:00
KATO Takenori
fbaefbb0a1 Synced with sys/i386/isa/wd.c revision 1.219.
Approved by:	jkh
2000-02-01 08:57:21 +00:00
KATO Takenori
2c46e1df9d Synced with sys/i386/isa/mse.c, npx.c and spkr.c revisions 1.49, 1.80
and 1.45, respectively.

Approved by:	jkh
2000-02-01 08:54:14 +00:00
Justin T. Gibbs
aac5584a61 Remove a spurious printf left in from debugging.
PR: 16642
2000-02-01 00:43:58 +00:00
Nick Hibma
9a69e6509a bus_release_resource is spellt like bus_release_resource not like
bus_delete_resource.

Fixes a problem when the probe succeeded, but the attach failed. The
release of the resources was done inproperly.

Approved by:	jkh
2000-01-31 14:05:21 +00:00
Kirk McKusick
4434ff1d38 When writing out bitmap buffers, need to skip over ones that already
have a write in progress. Otherwise one can get in an infinite loop
trying to get them all flushed.

Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>
2000-01-30 20:32:59 +00:00
Peter Wemm
d2b4236a60 Don't refer to TABLDISC in the comments here.
Submitted by:	bde
Approved by:	jkh
2000-01-30 10:14:13 +00:00
Bruce Evans
d02b52e7b5 Fixed longstanding brokenness of wddump() in LBA mode. LBA mode may now
be safe enough to recommend for working around the problem with CHS mode
normally being limited to 65536*16*63 sectors.

Fixed bitrot in related debugging code.

Fixed related style bugs.

Removed another vestige of bad144 support.
2000-01-30 07:58:14 +00:00
Jason Evans
268b25e18a Do not use 'alias' as a macro parameter name for __strong_reference(),
since the word 'alias' appears in the macro body.

Approved by:	jkh
2000-01-30 07:54:05 +00:00
John Baldwin
4e60d653ce Fix bogon in previous commit. Re-enable Forth in the loader.
Noticed by:	dcs
Approved by:	jkh
2000-01-30 06:56:27 +00:00
Yoshinobu Inoue
158316667c Fix kernel build breakage.
ip6_fw.c also needs ipv6firewall options. Sorry for the problem.

Submitted by: Jim Bloom <bloom@acm.org>
2000-01-30 03:52:28 +00:00
Jason Evans
7d1c6de8b7 Add __strong_reference(). 2000-01-29 22:51:16 +00:00
Søren Schmidt
4de1cbfab9 cosmetic changes only. 2000-01-29 22:38:36 +00:00
Peter Wemm
4486cd7990 Use config's tools rather than #if's. 2000-01-29 18:54:12 +00:00
Nick Hibma
5a250db943 Get the KASSERT right. 2000-01-29 18:53:42 +00:00
Peter Wemm
5775b1a2b6 Tidy up stray or bogus #if NFOO > 0 and #include "foo.h". 2000-01-29 18:48:30 +00:00
Peter Wemm
96e00123b4 Remove a rather bizzare set of #ifdefs and #defines that all worked out
to be a NO-OP.
2000-01-29 18:44:01 +00:00
Peter Wemm
1c6f64061c Remove #if NDGB > 0 and #if NDGM > 0 2000-01-29 18:42:45 +00:00
Peter Wemm
cc5bdb7978 Remove a somewhat odd #if that is always true (NOLTR will be always
1 or more if this file is being compiled)
2000-01-29 18:38:31 +00:00
Peter Wemm
86edd75342 Remove #include "eisa.h" and #if NEISA > 0 2000-01-29 18:22:33 +00:00
Peter Wemm
d835c5043b Remove unneeded #include "eisa.h" and #if NEISA > 0 2000-01-29 18:21:21 +00:00
Peter Wemm
e0c121beaf Remove #if NGIF > 0 and #if NFAITH > 0 as config already checks this. 2000-01-29 18:10:39 +00:00
Peter Wemm
68b538c712 Remove 'conflicts' token - it has been effectively doing absolutely
nothing for quite some time.  The only thing that cared was userconfig,
but it was for one invisible device so we never saw it's effects.
2000-01-29 18:07:07 +00:00
Nick Hibma
c50e6e7a39 Fix debugging output. The TDs are linked through the dnext field, not
nexttd.
2000-01-29 18:01:15 +00:00
Peter Wemm
af88e209a2 Zap isa_device -> id_conflicts. The sole user of it (userconfig) never
actually used it since the only device that specified it (vga0) was marked
as "FLG_INVISIBLE" in userconfig and therefore never shown.

Suggested by:	bde
2000-01-29 18:01:10 +00:00
Peter Wemm
81bb901ed1 Add some more comments about sound card bridge devices and their
relationship with pcm and other things like newmidi.
2000-01-29 17:56:23 +00:00
Peter Wemm
afa0d59d93 Still allow sbc/gusc/csa to perform as bridge devices (eg: to newmidi)
without pcm being present.
2000-01-29 17:48:28 +00:00