Commit Graph

21642 Commits

Author SHA1 Message Date
KATO Takenori
64145a4abe Merged from sys/i386/i386/machdep.c revision 1.401. 2000-08-14 07:27:10 +00:00
Atsushi Onoe
149348ccc3 This file contains a shim just for NetBSD, and not used in FreeBSD at all. 2000-08-14 05:44:35 +00:00
Seigo Tanimura
8f4fec9c36 Newbusify ed driver.
Partly submitted by:	alex
2000-08-14 04:31:07 +00:00
Nick Sayer
6ba60b3c4a This patch appears to solve the problems with recording resulting
in bogus hwptr warnings. Further comments sought on -hackers
were not forthcoming. I can only hope that calling DELAY() like
this doesn't cause any heartburn.
2000-08-13 19:20:02 +00:00
Nick Hibma
74bd1c1038 CAM, the module: scbus, da, cd, and st wrapped in one module.
Make the umass driver depend on this module.

Makes it possible to compile the kernel without SCSI support and load it
when for example a USB floppy is conencted.
2000-08-13 18:49:40 +00:00
Nick Hibma
028d28adb8 From NetBSD:
Make it possible to move a device to its unconfigured state by
using config #0.

Add some comments.

Change error reporting in port reset function.

usbd_devinfo_vp(): search the know devs array also if the device doesn't
return product description (e.g. Kye's Genius NetScroll mouse returns
vendor, but not product); the strings returned by device are still
preferred to those in the array, though
2000-08-13 18:39:24 +00:00
Nick Hibma
3f0148fee0 Add more CDC defines. 2000-08-13 18:23:07 +00:00
Nick Hibma
048f89016c Fake the Power On command on the virtual hub.
This removes the two IOERROR's on startup a many has been seeing on UHCI
controllers.

Taken from NetBSD.
2000-08-13 18:21:18 +00:00
Hajimu UMEMOTO
8ad6d022ca Add output of per battery information to apm(1).
New ioctl APMIO_GETPWSTATUS is introduced.

Reviewed by:	-mobile and -current folks (no objection)
2000-08-13 17:05:27 +00:00
Alexander Langer
6d04301d4f Add PAO devices supported by drivers. 2000-08-13 14:25:33 +00:00
Søren Schmidt
710591b796 Fix off by one error in track# calculation. 2000-08-13 09:08:19 +00:00
John Baldwin
597d9a21d9 Include machine/cputypes.h so we get the cpu_class variable. This is needed
if I386_CPU is defined in the kernel config file.
2000-08-13 05:17:46 +00:00
Darren Reed
5e90b39cba resolve conflicts 2000-08-13 04:31:06 +00:00
Bruce Evans
c6e4d7c5ba Fixed null pointer panic for accessing "meminfo" when there is no swap. 2000-08-12 21:08:42 +00:00
Hajimu UMEMOTO
1469c4346f Make compilable with -DIPFILTER.
Because I don't use ipfilter at all, this is not tested.
I don't know if ipfilter is work for IPv6.

Submitted by:	yoshiaki@kt.rim.or.jp
2000-08-12 18:14:13 +00:00
KATO Takenori
9300e1bae2 Merged from sys/boot/i386/Makefile.inc revision 1.2. 2000-08-12 07:37:19 +00:00
KATO Takenori
e2c9a41a3c Merged from sys/i386/i386/machdep.c revision 1.400. 2000-08-12 07:35:12 +00:00
Peter Wemm
5aef48a16b Add -mpreferred-stack-boundary=2 to CFLAGS for i386. This and libstand
reduces /boot/loader from 163840 bytes to 155648 and pxeboot from 165888
bytes to 157696 bytes.
2000-08-11 23:23:20 +00:00
Peter Wemm
babff34a27 Oops, forgot this file. Log message for completeness:
Clean up some low level bootstrap code:

- stop using the evil 'struct trapframe' argument for mi_startup()
  (formerly main()).  There are much better ways of doing it.
- do not use prepare_usermode() - setregs() in execve() will do it
  all for us as long as the p_md.md_regs pointer is set.  (which is
  now done in machdep.c rather than init_main.c.  The Alpha port did it
  this way all along and is much cleaner).
- collect all the magic %cr0 etc register settings into one place and
  have the AP's call that instead of using magic numbers (!!) that keep
  changing over and over again.
- Make it safe to call kthread_create() earlier, including during the
  device probe sequence.  It doesn't need the callback mechanism that
  NetBSD's version uses.
- kthreads created this way are root-less as they exist before the root
  filesystem is mounted.  init(1) is set up so that it aquires the root
  pointers prior to running.  If other kthreads want filesystem acccess
  we can make this code more generic.
- set all threads start times once we have decided what time it is.
- init uses a trampoline rather than the evil prepare_usermode() hack.
- kern_descrip.c has a couple of tweaks to deal with forking when there
  is no rootdir or cwd etc.
- adjust the early SYSINIT() sequence so that a few prereqisites are in
  place. eg: make sure the run queue is initialized before doing forks.

With this, the USB code can easily create a kthread to do the device
tree discovery.  (I have tested it, it works nicely).

There are still some open issues before this is truely useful.
- tsleep() does not like working before the clock is running.  It
  sort-of tries to spin wait, but it can do more useful things now.
- stopping a kthread in kld code at unload time is "interesting" but
  we have a solution for that.

The Alpha code needs no changes for this.  It already uses pretty much the
same strategies, but a little cleaner.
2000-08-11 18:54:47 +00:00
Bill Paul
069363018f Fix a bug brought to light by the people working on SMPng. I don't quite
understand exactly what it is about SMPng that tickles this bug. What I
do know is that the foo_init() routine in most drivers is often called
twice when an interface is brought up. One time is due to the ifconfig(8)
command calling the SIOCSIFFLAGS ioctl to set the IFF_UP flag, and another
is probably due to the kernel calling ifp->if_init at some point. In any
case, the SMPng changes seem to affect the timing of these two events in
such a way that there is a significant delay before any packets are sent
onto the wire after the interface is first brought up. This manifested
itself locally as an SMPng test machine which failed to obtain an address
via DHCP when booting up.

It looks like the second call to fxp_init() is happening faster now than
it did before, and I think it catches the chip while it's in the process
of dealing with the configuration command from the first call. Whatever
the case, a FXP_CSR_SCB_CNA interrupt event is now generated shortly after
the second fxp_init() call. (This interrupt is apparently never generated
by a non-SMPng kernel, so nobody noticed.)

There are two problems with this: first, fxp_intr() does not handle the
FXP_CSR_SCB_CNA interrupt event (it never tests for it or does anything
to deal with it), and second, the meaning of FXP_CSR_SCB_CNA is not
documented in the driver. (Apparently it means "command unit not active.")
Bad coder. No biscuit.

The fix is to have the FXP_CSR_SCB_CNA interrupt handled just like the
FXP_SCB_STATACK_CXTNO interrupt. This prevents the state machine for
the configuration/RX filter programming stuff from getting wedged for
several seconds and preventing packet transmission.

Noticed by: jhb
2000-08-11 17:47:55 +00:00
Nick Hibma
cad823f463 Fix indentation ruined by previous commit. 2000-08-11 16:37:43 +00:00
Warner Losh
2c6b3ec454 Define get_memory_offset method 2000-08-11 15:51:51 +00:00
Jun-ichiro itojun Hagino
42915d02a3 backout ND6_USE_RTSOCK change in previous 2000-08-11 12:29:04 +00:00
Jun-ichiro itojun Hagino
2022007008 avoid duplicated rtfree() on default router list change (could cause panic).
sync with kame 1.46 -> 1.47.
2000-08-11 12:27:07 +00:00
Søren Schmidt
ae97e232fb Backout the tsleep on probe, it breaks in resume mode as tsleep
not always has a context to sleep on.
Back to the drawing board...
2000-08-11 10:34:22 +00:00
Daniel C. Sobral
e7b7c050c7 Add missing "is".
PR:		20524
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-08-11 10:32:23 +00:00
Søren Schmidt
071e6e581e Add support for accessing individual tracks on a CD.
This is done by misusing the device minor a bit to encode the
track no there.

So to read track #4 just use /dev/acdNt4 where N is the device #.

The driver no automatically sets the blocksize (sectorsize) to
what the track is set to in the TOC.

This has the nice effect that you can now rip audioi tracks
by simply doing:

dd if=/dev/acdNt2 of=audiotrack2.raw bs=2352

it cant be much simpler than that :)

NOTE: the original acdNa & acdNc device still work as usual,
except the blocksize is set according to track0.
2000-08-11 09:21:36 +00:00
Peter Wemm
37b087a645 Clean up some low level bootstrap code:
- stop using the evil 'struct trapframe' argument for mi_startup()
  (formerly main()).  There are much better ways of doing it.
- do not use prepare_usermode() - setregs() in execve() will do it
  all for us as long as the p_md.md_regs pointer is set.  (which is
  now done in machdep.c rather than init_main.c.  The Alpha port did it
  this way all along and is much cleaner).
- collect all the magic %cr0 etc register settings into one place and
  have the AP's call that instead of using magic numbers (!!) that keep
  changing over and over again.
- Make it safe to call kthread_create() earlier, including during the
  device probe sequence.  It doesn't need the callback mechanism that
  NetBSD's version uses.
- kthreads created this way are root-less as they exist before the root
  filesystem is mounted.  init(1) is set up so that it aquires the root
  pointers prior to running.  If other kthreads want filesystem acccess
  we can make this code more generic.
- set all threads start times once we have decided what time it is.
- init uses a trampoline rather than the evil prepare_usermode() hack.
- kern_descrip.c has a couple of tweaks to deal with forking when there
  is no rootdir or cwd etc.
- adjust the early SYSINIT() sequence so that a few prereqisites are in
  place. eg: make sure the run queue is initialized before doing forks.

With this, the USB code can easily create a kthread to do the device
tree discovery.  (I have tested it, it works nicely).

There are still some open issues before this is truely useful.
- tsleep() does not like working before the clock is running.  It
  sort-of tries to spin wait, but it can do more useful things now.
- stopping a kthread in kld code at unload time is "interesting" but
  we have a solution for that.

The Alpha code needs no changes for this.  It already uses pretty much the
same strategies, but a little cleaner.
2000-08-11 09:05:12 +00:00
Paul Saab
646cf5017b Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server.  Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.
2000-08-11 08:36:17 +00:00
Paul Saab
f6940c1842 Pass along the interesting variables we were given from DHCP so we
can utilize them in the kernel and with kenv.
2000-08-11 05:31:59 +00:00
Archie Cobbs
a604c8808e Oops, previous commit fixed a bug that was already fixed before.
Back it out.
2000-08-10 23:04:46 +00:00
Archie Cobbs
0521578550 Add new control message to atomically get and clear statistics. 2000-08-10 22:52:40 +00:00
Archie Cobbs
a8f6d55e95 Increase the maximum allowable datagram length. 2000-08-10 22:51:57 +00:00
Archie Cobbs
cac2a7de76 "u_int32_t" should have been "int32_t". 2000-08-10 22:51:26 +00:00
Archie Cobbs
7133ac27ef Use a bigger buffer for NGM_BINARY2ASCII conversion, to handle really
long ASCII control messages.
2000-08-10 22:50:38 +00:00
Archie Cobbs
656485a2c6 - Add new control message NGM_VJC_GET_CONFIG
- Implement control message ASCII'fication for all control messages
2000-08-10 22:48:03 +00:00
Archie Cobbs
57b57be3ec Take advantage of the new unsigned and hex integer types. 2000-08-10 22:45:54 +00:00
Archie Cobbs
8fccb7e954 - Make statistics unsigned.
- Add new control message to atomically get and clear statistics.
2000-08-10 22:44:41 +00:00
Archie Cobbs
7b3bf3f9aa - Add new unsigned and hex integer parse types
- Fix bug in commented example code
2000-08-10 22:43:38 +00:00
Archie Cobbs
8db3c6cd29 - Add new unsigned and hex integer parse types; this allows simplifying
the bytearray parse type.
- Allocate (larger) temporary work buffer dynamically instead of on the
  stack when comparing to the default value.
2000-08-10 22:42:25 +00:00
Hajimu UMEMOTO
0f6b9b3fe2 Make ip6fw zero work.
PR:		bin/20522
2000-08-10 20:41:33 +00:00
Archie Cobbs
7b38c4e4d9 RFC 1661 requires that all LCP packets are sent with no address and
control field compression. The ng_ppp(4) node correctly follows this
rule. However, PPPoE is an exception: when doing PPPoE *all* frames
are sent with address and control field compression.

Alter this node's behavior so that when an outgoing frame is received,
any leading address and control field bytes are removed. This makes
this node compatible with ng_ppp(4).
2000-08-10 20:05:12 +00:00
Warner Losh
2563e6f5b8 Add some infrastructure support for dealing with large attribute
memory space needed by the raylink driver (in progress, nearing
completion).

This is a minorly cleaned up diff from Duncan to help him reduce the
diffs from stock FreeBSD.

Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
2000-08-10 17:35:11 +00:00
Tor Egge
4428d39d63 Don't skip IOAPIC id conflict detection when only one pci bus is present.
PR:		20312
Reviewed by:	Steve Roome <steve@sse0691.bri.hp.com>
2000-08-10 17:33:24 +00:00
Søren Schmidt
4466a3504d Fix the ICH2 ATA100 support, and proberly downgrade the chip setup when
going to slower DMA modes on all Intel chips.
2000-08-10 07:34:49 +00:00
Archie Cobbs
1baeddb81b In a struct sockaddr, sa->sa_len can be zero if uninitialized.
Make sure that this doesn't cause a problem when parsing.
2000-08-09 23:57:44 +00:00
Nick Sayer
fc35953a16 Missed a step when activating the solo driver. 2000-08-09 20:28:19 +00:00
Cameron Grant
4873b46dc7 change irq handling slightly
add another non-ac97 256av
2000-08-09 18:51:27 +00:00
Cameron Grant
071280d442 MFS: module macro changes 2000-08-09 18:46:48 +00:00
Nick Hibma
b40a42fbe8 Finally got my brain around what a SIM UNIT number is and how it differs
from the SCSI id it has. (this avoids the confusing umass-sim32 device. It
should have been umass-sim0 all along (there is only one), and if it is
spoken to as a SCSI device the sim should be umass32.

Make the rescan actually work. We need to fill in a target and lun wildcard
and not the SCSI id of the SIM.

Add a seatbelt.
2000-08-09 17:41:11 +00:00
Nick Hibma
02211bae3b Avoid a '"fd" is usurping ...' message.
PR:		20348
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-08-09 12:45:04 +00:00
Ruslan Ermilov
0eb10a0963 - Do not modify Peer's Call ID in outgoing Incoming-Call-Connected
PPTP control messages.

- Cosmetics: replace `GRE link' with `PPTP link'.

Reviewed by:	Erik Salander <erik@whistle.com>
2000-08-09 11:25:44 +00:00
Nick Sayer
0edeb3dc90 A couple of cosmetic fixes, plus a biggie: When checking the DMA
position, channel 1's dma position register must be quiescent. So
the driver will spl, pause the DMA, delay a bit and hold as still as
possible while snapping the picture.

I'm sure there HAS to be a better way to do this, but if there is, it's
not documented.

So far as I can tell, this fixes recording, which means the Solo is open
for business.
2000-08-09 07:14:56 +00:00
Tor Egge
3c2498c0d3 Don't set flags on the mount structure before all permission checks have
been done.

Don't allow multiple mount operations with MNT_UPDATE at the same
time on the same mount point.  When the first mount operation
completed, MNT_UPDATE was cleared in the mount structure, causing
the second to complete as if it was a no-update mount operation
with the following bad side effects:

        - mount structure inserted multiple times onto the mountlist
        - vp->v_mountedhere incorrectly set, causing next namei
          operation walking into the mountpoint to crash with
          a locking against myself panic.

Plug a vnode leak in case vinvalbuf fails.
2000-08-09 01:57:11 +00:00
Archie Cobbs
3b49655c07 Fix bug where bundle-level receive statistics were not getting updated. 2000-08-09 01:43:21 +00:00
Cameron Grant
1874ec255c MFS: sync with peter's isadma fixup 2000-08-09 01:22:09 +00:00
Cameron Grant
ba90ebe703 activate via82c686 audio driver 2000-08-09 01:08:59 +00:00
Cameron Grant
fb9f118e6f new driver: via 82c686 chipset audio
not personally tested, but i'm assured it works

Submitted by:	David Jones <dej@ox.org>
PR:		kern/20161
2000-08-09 00:55:55 +00:00
Cameron Grant
5fd7b0878e warn if hwptr goes backwards 2000-08-09 00:42:00 +00:00
Tor Egge
b5ee7ec63a Initialize *countp to 0 in stub for softdep_flushworklist().
This allows ffs_fsync() to break out of a loop that might otherwise
be infinite on kernels compiled without the SOFTUPDATES option.
The observed symptom was a system hang at the first unmount attempt.
2000-08-09 00:41:54 +00:00
Peter Wemm
3dd0dbfeb9 MF4: fix style(9) whitespace breakage. 2000-08-08 23:53:11 +00:00
Matt Jacob
36875740cc Don't attempt to actually read SAF-TE temperature objects- nobody seems
to be obeying the original spec as to what the numeric value means.

Temperature flags are unaffected- these are still the 'pseudo-thermometers'
and overtemp/undertemp warnings will be caught and translated to SES objects
here.

PR:	20475
2000-08-08 23:00:11 +00:00
Robert Watson
00d322883a o Add POSIX1E_CAPABILITY_EXTATTR_NAME, a string constant for the
extended attribute name used to store capabilities for binaries in
  FFS.
o Uncomment CAP_SETPCAP because, unfortunately, it is useful when
  developing and testing, as well as in practice for a system not
  fully capability-enabled.
o Synch up prototypes with the implementation, reducing diffs and
  making the patches for capabilities more accessible and less
  dastardly.

Obtained from:	TrustedBSD Project
2000-08-08 18:47:59 +00:00
Robert Watson
e6a9ab52db o Introduce vn_extattr_{get,set}, wrapper routines for VOP_GETEXTATTR
and VOP_SETEXTATTR to simplify calling from in-kernel consumers,
  such as capability code.  Both accept a vnode (optionally locked,
  with ioflg to indicate that), attribute name, and a buffer + buffer
  length in UIO_SYSSPACE.  Both authorize the call as a kernel request,
  with cred set to NULL for the actual VOP_ calls.

Obtained from:	TrustedBSD Project
2000-08-08 17:15:32 +00:00
Søren Schmidt
bfc0a42650 Fix braino in the tsleep call, ata_delayed_attach might be a NULL
pointer..
2000-08-08 14:57:36 +00:00
Yoshihiro Takahashi
a0a9cf6e5b Merged from sys/i386/conf/GENERIC revisions 1.266 and 1.267. 2000-08-08 11:57:09 +00:00
Yoshihiro Takahashi
4e281f317d Merged from sys/i386/conf/GENERIC.hints revision 1.3. 2000-08-08 11:56:45 +00:00
Yoshihiro Takahashi
94be196610 Changed default cursor shape to non-blink mode.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-08-08 09:28:32 +00:00
Yoshihiro Takahashi
ec6d58d33f Fixed PC-9821 NOTE supports with LINE30 mode.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-08-08 09:17:15 +00:00
Kelly Yancey
7c43028b0d Fix the comments to properly document the PQ_MEDIUMCACHE and
PQ_NORMALCACHE options.

PR:		20409
Submitted by:	Tony Finch <dot@dotat.at>
2000-08-08 08:13:01 +00:00
Robert Nordier
ff7ed3a234 Typo/spelling fixes. 2000-08-08 07:20:25 +00:00
Kenneth D. Merry
ca2b07ad41 The Yamaha CDR100 doesn't seem to like multi-LUN probing.
PR:		kern/20347
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-08-08 06:49:33 +00:00
Kelly Yancey
7e32b20d95 This is an overhaul of the mode page handling in camcontrol as well as
related patches. These include:
	* Mode page editting can be scripted. This involves two
	  things: first, if stdin is not a tty, changes are read from
	  stdin rather than invoking $EDITOR. Second, and more
	  importantly, not all modepage entries must be included in the
	  change set. This means that camcontrol can now gracefully handle
	  more intrusive editting from the $EDITOR, including removal or
	  rearrangement of lines. It also means that you can do stuff
	  like:
		# echo "WCE: 1" | camcontrol modepage da3 -m 8 -e
		# newfs /dev/da3
		# echo "WCE: 0" | camcontrol modepage da3 -m 8 -e
	* Range-checking on user-supplied input values. modeedit.c now
	  uses the field width specifiers to determine the maximum
	  allowable value for a field. If the user enters a value larger
	  than the maximum, it clips the value to the max and warns the
	  user. This also involved patching cam_cmdparse.c to be more
	  consistent with regards to the "count" parameter to arg_put
	  (previously is was the length of strings and 1 for all integral
	  types). The cam_cdbparse(3) man page was also updated to reflect
	  the revised semantics.
	* In the process, I removed the 64 entry limit on mode pages (not
	  that we were even close to hitting that limit). This was a nice
	  side-effect of the other changes.
	* Technically, the new mode editting functionality allows editting
	  of character array entries in mode pages (type 'c' or 'z'),
	  however since buff_encode doesn't grok them it is currently
	  useless.
	* Camcontrol gained two new options related to mode pages: -l and
	  -b. The former lists all available mode pages for a given
	  device. The latter forces mode page display in binary format
	  (the default when no mode page definition was found in
	  scsi_modes).
	* Added support for mode page names to scsi_modes. Allows names to
	  be displayed alongside mode numbers in the mode page
	  listing. Updated scsi_modes to use the new functionality. This
	  also adds the semicolon into the scsi_modes syntax as an
	  optional mode page definition terminator. This is needed to name
	  pages without providing a page format definition.
	* Updated scsi_all.h to include a structure describing mode page
	  headers.
	* Added $FreeBSD$ line to scsi_modes.

Inspired by:	dwhite
Reviewed by:	ken
2000-08-08 06:24:17 +00:00
Archie Cobbs
8a660c773a Fix a bug where we were accessing already free'd memory during node shutdown.
Detected via:	0xdeadc0de
2000-08-07 22:41:12 +00:00
Archie Cobbs
4b39c3c7b3 Add three new control messages to the ng_ether(4) netgraph node type:
NGM_ETHER_GET_ENADDR:	Get the device's Ethernet address
    NGM_ETHER_SET_PROMISC:	Enable/disable promiscuous mode
    NGM_ETHER_SET_AUTOSRC:	Enable/disable packet source address override
2000-08-07 18:52:26 +00:00
Peter Wemm
d27e361b58 Fix some warnings. Here are more part-time volatiles - ie: data that
lives in memory and is sometimes busmastered to/from the controller.
I believe these are all ok.
2000-08-07 18:44:05 +00:00
Jonathan Lemon
a114459191 Make the kqueue socket read filter honor the SO_RCVLOWAT value.
Spotted by:  "Steve M." <stevem@redlinenetworks.com>
2000-08-07 17:52:08 +00:00
Bill Paul
bf64541762 Close PR 20438. Make fix for preserving LED settings conditional on
presence Intel 21143 chip.
2000-08-07 17:03:20 +00:00
Jonathan Lemon
ad91b6a280 Fix bug with timeout; previously, when attempting to poll the kqueue by
passing a zero-valued timeout, the code would always sleep for one tick.
Change code to avoid calling tsleep if we have no intention of sleeping.

Bring in bugfix from sys_select.c, r1.60 which also applies here.

Modify error handling slightly; passing in an invalid fd will now result
in EBADF returned in the eventlist, while an attempt to change a knote
which does not exist will result in ENOENT being returned.  Previously
such attempts would fail silently without notification.

Pointed out by: nicolas.leonard@animaths.com
	        Rick Reed (rr@yahoo-inc.com)
2000-08-07 16:45:42 +00:00
Ruslan Ermilov
934a4fb381 Adjust TCP checksum rather than compute it afresh.
Submitted by:	Erik Salander <erik@whistle.com>
2000-08-07 09:51:04 +00:00
Brian Feldman
7adddcb393 Back this one out until I can fix _all_ of the headers. The headers sure
are shpxed quite nicely.
2000-08-07 03:54:25 +00:00
Tor Egge
5d25b0f6fb Add workaround for livelock problem when starting APs.
With more than 1 AP present, an AP could fail to properly release
the mp lock before waiting for smp_started to become nonzero.

With early startup of APs, the BSP could fail to properly release
the mp lock before waiting for smp_started to become nonzero.
2000-08-07 02:28:37 +00:00
Nick Hibma
9bd863570a Save and restore the registers SOF and FRAMENUMBER on suspend. In some
cases the registers are not correctly set on resume.

This solves the problem of USB failing after resuming a machine.

Submitted by:	mike+fbsd@medianstrip.net
PR:		18261
2000-08-07 00:04:53 +00:00
Nick Hibma
2a46959d8e Regen. 2000-08-06 23:27:36 +00:00
Nick Hibma
6ba97967be New ids
Submitted by:	Scott Long
PR:		18897
2000-08-06 23:26:58 +00:00
Nick Hibma
85dff41567 Some new ids, from NetBSD 2000-08-06 23:22:13 +00:00
Cameron Grant
90d27234a9 sync CCR register definitions with creative sources 2000-08-06 20:58:11 +00:00
Søren Schmidt
ab418d7db3 Add experimental code for ATA100 support on:
Promise Ultra100 / Fasttrak100
HighPoint HPT370 controllers (fx Abit KA7-100 onboard ctrl, Abit HotRod 100)
Intel ICH2 (Intel 815E based motherboards)

So far I can read >90MB/s on the Promise and the HPT370.
I can write >64MB/s on the promise and >50MB/s on the HPT370 so it seems
writing is still done in ATA66 mode :(
The ICH2 support is untested as of yet...
2000-08-06 19:51:58 +00:00
Søren Schmidt
19095fd23c Use tsleep instead od DELAY in probe when not in boot.
This fixes the uptil 30s hangs on PCCARD ata device probes.
2000-08-06 19:10:05 +00:00
Coleman Kane
5915158066 Cleaning conflicting module tree. Use modules/3dfx instead. 2000-08-06 19:08:55 +00:00
Coleman Kane
c546ab551c Fix clean to remove pci.h
Numerous style fixes

Submitted by:	Marcel Moolenaar <marcel@cup.hp.com>
2000-08-06 18:56:46 +00:00
Cameron Grant
6c1146c0b8 fix the staticy sound issue
use timer instead of per-channel interrupts

do playback like the linux driver - may fix nmi-with-ecc issue
2000-08-06 18:10:05 +00:00
Søren Schmidt
0ec4d7b5b0 Remove sequence checking in the burner support.
This was really a leftover from the wormcontrol days, it is no longer
needed when using burncd.
2000-08-06 18:03:42 +00:00
Søren Schmidt
e7d1a5c2b1 Be a bit more restrictive in using multisector transfers. 2000-08-06 18:01:47 +00:00
KATO Takenori
c4082e99a4 - Fixed missing initialization of current device number.
- Fixed comment.

Pointed out by:	nyan
2000-08-06 14:35:37 +00:00
Paul Saab
c206a8609e Change the behavior of isa_nmi to log an error message instead of
panicing and return a status so that we can decide whether to drop
into DDB or panic.  If the status from isa_nmi is true, panic the
kernel based on machdep.panic_on_nmi, otherwise if DDB is
enabled, drop to DDB based on machdep.ddb_on_nmi.

Reviewed by:	peter, phk
2000-08-06 14:17:21 +00:00
Brian Feldman
fd514e8278 None of select.h needs to be exposed to !_KERNEL. 2000-08-06 02:14:52 +00:00
Tor Egge
e666f57c3e Be more verbose when changing APIC ID on an IO APIC.
Don't allow cpu entries in the MP table to contain APIC IDs out of range.

Don't write outside array boundaries if an IO APIC entry in the MP table
contains an APIC ID out of range.

Assign APIC IDs for all IO APICs according to section 3.6.6 in the
Intel MP spec:

  - If the current APIC ID on an IO APIC doesn't conflict with other
    IO APICs or CPUs, that APIC ID should be used.  The copy of the MP
    table must be updated if the corresponding APIC ID in the MP table
    is different.

  - If the current APIC ID was in conflict with other units, the
    corresponding APIC ID specified in the MP table is checked for conflict.

  - If a conflict is still found then fall back to using a new unique ID.
    The copy of the MP table must be updated.

  - IDs out of range is considered to be in conflict.

During these operations, the IO_TO_ID array cannot be used, since any
conflict would have caused information loss.  The array is then corrected,
since all APIC ID conflicts should have been resolved.

PR:	20312, 18919
2000-08-06 00:04:03 +00:00
Archie Cobbs
9dcab5306e Fix misspelling. 2000-08-05 20:17:04 +00:00
John Baldwin
ab9e9f9d2d Argh! Fix a brainfart of mine. In the old boot0, we relocated ourself
to 0x600 via a 'rep movsw'.  Once that was done, %cx was zero, so we could
simply use 'movb' to update the lower byte of %cx in preparation for
zeroing out the fake partition entry used to boot to other drives via F5.
Well, in the new boot0, we don't actually relocate ourselves, instead it
is easier to create the fake partition entry first and then just use it to
get the BIOS to load all of boot0 into memory at 0x600.  However, since we
aren't doing the relocate code anymore, we don't know that %cx == 0 when
we hit the 'movb' to setup %cx for clearning the fake partition entry.
Thus, if %ch != 0 when the BIOS started boot0, then it would end up zeroing
a lot more memory than just 8 words.  The solution is to do a word move of
$8 into %cx.

Debugging help from:	David Wolfskill <dhw@whistle.com>
2000-08-04 22:37:21 +00:00
Mitsuru IWASAKI
8000a5797e Cleanup debug messages and Add some enhancements from linux on
display control by apm -d.
 - Remove APM_DEBUG to avoid re-build kernel with such a unspported optioin.
 - Introduce new denug flag `debug.apm_debug' which can be controlled by
   sysctl interface and loader by setting like "debug.apm_debug=1", you
   will get debug messages from APM driver.
 - Add some enhancements from linux on display control by apm -d.  I'm
   expecting that we can see some improvements on some laptops where
   apm -d doesn't work correctly so far.

Reviewed by:	-mobile and -current folks (no objection)
Suggested by:	Susumu WAKABAYASHI <susumu@wakabaya.net>
2000-08-04 20:28:53 +00:00
Nick Hibma
adeb72abfb Finally make the module dependencies work. kern_linker.c now allows
modules to depend on modules in the same file (uhub depends on usb) or
even on themselves (usb on usb, makes the define in usb_port.h a lot
less convoluted).

Use ANSI prototypes.
2000-08-04 19:05:49 +00:00
Bill Paul
8ebe5155fa *smack* #if 0, not #ifdef 0. 2000-08-04 18:17:45 +00:00
Bill Paul
624539bb38 The check_extport() function appears to have some new code in it that checks
the scratch RAM for data normally found in the SEEPROM (presumably in the
event that the SEEPROM is unavailable or can't be read). This code causes
a spontaneous reboot on monster.osd.bsdi.com, which has an embedded aic7880
controller. The problem appears to happen either when it writes to the
SCBPTR port and then reads from the SCB_CONTROL port. Somewhere during
the inb/outb operations, the system has a heart attack and restarts.

This code looks very suspicious, particularly since it has unconditionalized
debug mesages such as "Got here!" and "And it even worked!". With this
block #ifdef'ed out, the machine boots and runs properly. I stronly suggest
that it stay #ifdef'ed out until it's properly tested.
2000-08-04 18:09:56 +00:00
David E. O'Brien
2111e67c80 Fix this so it is a Makefile and not a shell script -- now issuing `make'
a second time does not rebuild the binary.
2000-08-04 08:30:00 +00:00
KATO Takenori
a2c06ee095 Commented out xe device because it depend on PCMCIA stuff. 2000-08-04 08:29:50 +00:00
KATO Takenori
c1e8fc20ac Merged from sys/i386/isa/clock.c revision 1.155. 2000-08-04 08:15:45 +00:00
Mike Smith
786cd128a8 Add support for 2.x/3.x firmware adapters which are too old to have a
memory-mapped register window.  This closes the last known issue with
2.x vintage adapters.
2000-08-04 06:52:00 +00:00
John Baldwin
2efeedfd4b Fix some of the arcdisk devsw functions to catch up with warning fixes in
<stand.h>.  Also, since bcache_strategy() used to not have a prototype,
arcdisk happily called bcache_strategy() with 6 parameters instead of 7,
leaving out the disk unit number, which is the 2nd parameter.  Add in the
unit number to the bcache_strategy() call to fix this.
2000-08-04 05:25:36 +00:00
John Baldwin
00dc3782f7 Bring back the perform() function. However, conditionionalize it on
BOOT_FORTH as it is only used if BOOT_FORTH is not defined.
2000-08-04 05:23:41 +00:00
Archie Cobbs
7734ea0612 Improve performance in the case where ip_output() returns an error.
When this happens, we know for sure that the packet data was not
received by the peer. Therefore, back out any advancing of the
transmit sequence number so that we send the same data the next
time we transmit a packet, avoiding a guaranteed missed packet and
its resulting TCP transmit slowdown.

In most systems ip_output() probably never returns an error, and
so this problem is never seen. However, it is more likely to occur
with device drivers having short output queues (causing ENOBUFS to
be returned when they are full), not to mention low memory situations.

Moreover, because of this problem writers of slow devices were
required to make an unfortunate choice between (a) having a relatively
short output queue (with low latency but low TCP bandwidth because
of this problem) or (b) a long output queue (with high latency and
high TCP bandwidth). In my particular application (ISDN) it took
an output queue equal to ~5 seconds of transmission to avoid ENOBUFS.
A more reasonable output queue of 0.5 seconds resulted in only about
50% TCP throughput. With this patch full throughput was restored in
the latter case.

Reviewed by:	freebsd-net
2000-08-03 23:23:36 +00:00
Warner Losh
116c1d9d81 Merge from GENERIC. Mostly reenable some devices and add SOFTUPDATES
and RANDOMDEV to the list.  STill need to do more merging, but for now
things are better.
2000-08-03 21:51:03 +00:00
Jeffrey Hsu
775304e896 Make check for empty list in STAILQ_LAST() more readable. 2000-08-03 17:31:56 +00:00
Jeffrey Hsu
51b86781c0 Modify to use fixed STAILQ_LAST().
Reviewed by:	dfr
2000-08-03 16:37:46 +00:00
Jeffrey Hsu
5434d3f744 Restore STAILQ_LAST() semantics to match that of TAILQ_LAST()
and CIRCLEQ_LAST().  Return the last element instead of a pointer
to the next field of the last element.

Reviewed by:	dfr
2000-08-03 16:36:40 +00:00
Ruslan Ermilov
cec335f937 Make netstat(1) to be aware of divert(4) sockets. 2000-08-03 14:09:52 +00:00
MIHIRA Sanpei Yoshiro
e52508ae0b Add the ESS Solo-1 to generic chip match.
Solo-1 Datasheet(vendor/device info at P.33)
http://www.alsa-project.org/alsa/ftp/manuals/ess/DsSolo1.pdf
2000-08-03 13:46:52 +00:00
KATO Takenori
aa4e20f5bd - Fixed %si (offset to partition table) in boot.
- Fixed comment.
2000-08-03 13:01:45 +00:00
John Baldwin
eb37712079 Fix the more obvious warnings to deal with my earlier warning cleanups. 2000-08-03 09:49:44 +00:00
John Baldwin
4ae4202e70 Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.
2000-08-03 09:14:02 +00:00
John Baldwin
c2fa9f3e89 Fix several BDECFLAGS warnings. Also, actually use the 'verbose' parameter
for lsdev when printing out slice information.  Now, you only get the
sizes and LBA's of slices if you use 'lsdev -v'.
2000-08-03 09:09:49 +00:00
David E. O'Brien
92a4949b42 * Create entire directory path for modules.
* Don't ignore error returns.
2000-08-03 09:06:53 +00:00
KATO Takenori
1ee980919d - Fixed pointer to the partition table in the buffer.
- Use shift by %cl instead of five shifts by 1.
2000-08-03 09:00:19 +00:00
Sheldon Hearn
1445fdb0f5 Don't bitch when trying to create a ${DESTDIR}/modules which already
exists.
2000-08-03 08:24:42 +00:00
Matt Jacob
3ea883b46d Add a comment as to where stdarg.h applies. 2000-08-03 03:05:50 +00:00
John Baldwin
7d615c1d8b Use <machine/stdarg.h> instead of <stdarg.h> so that this will compile.
While I'm at it, move the #include line up to the top of the file.
2000-08-03 02:47:06 +00:00
Peter Wemm
0d864285a2 Make the pfil.c code conditional on either option PFIL_HOOKS or IPFILTER.
The previous line was an AND.  This change means you can compile in the
pfil_hook stuff and make it available for other users besides ipfilter.
2000-08-03 02:03:30 +00:00
Nick Sayer
05a1fdb459 Simplex devices will always report EBUSY on 2nd (and subsequent)
opens if the reference count is not decremented on close.

Note that this may result in the reference count being corrupted
on full duplex devices (due to mismatching opens/closes), but the
code doesn't use the reference count for anything on full duplex
devices.
2000-08-02 22:47:44 +00:00
Nick Sayer
3ac1ca3363 1. Increase the size of the DMA buffer.
2. Offer half duplex with both playback and record on channel 1 or
full duplex with playback always on channel 2 as a compile-time option.

3. 16 bit record output is byte swapped for some dumb reason. Report the _BE
AFMTs for recording.
2000-08-02 22:45:57 +00:00
Peter Wemm
2c7f8b4ebd Fix self referential dependencies. eg: uhub was packaged along with
usb, all in usb.ko.  uhub depends on usb.  The bug was that the preload
processing only adds a module to the list once it's internal dependencies
are resolved... Since it was not "seeing" the internal usb module it
believed that uhub had a missing dependency.
2000-08-02 21:08:53 +00:00
Peter Wemm
af4b2d2d1c Fix the SYSINIT() bubble sort. This was fixed in kern_linker.c already. 2000-08-02 21:05:21 +00:00
Nick Sayer
a7e1150660 Undo some of my own damage. With this patch, it appears that both
recording and playback now work correctly.
2000-08-02 19:37:43 +00:00
Bill Paul
6f069b494a Add support for the Netgear GA620T copper gigabit card. 2000-08-02 18:49:17 +00:00
Bill Paul
abe1d92e0a Add call to bus_generic_attach() at the end of sk_attach(). It turns out that
if you kldload this driver, all the subordinate devices are probed/attached
as expected. But this is not the case when the driver is statically compiled
into the kernel. Since I do most of my testing with modules, I failed to
notice this. I'm not sure if it's intended behavior or not. I think it may
be, but it seems a little counter-intuitive.
2000-08-02 18:19:00 +00:00
Bill Paul
c400cb27d2 Grrrr. Add definition for DC_WDOG_CTLWREN. I made this change yesterday
but stupidly only commited to if_dc.c.
2000-08-02 16:31:11 +00:00
Nick Sayer
bb7f26c3d9 Fix channel 1 playback the rest of the way. There are a couple of
hiccups, but playback now proceeds mostly normally using both channel 1
and 2.
2000-08-02 15:09:39 +00:00
KATO Takenori
b160feebb5 Commented out card and pcic devices because they are broken in pc98 port. 2000-08-02 09:05:26 +00:00
KATO Takenori
e9b13dd6ec Added PC-98 HDD boot manager. The boot0 is the `IPL' which occupies
sector 0 of a disk and boot0.5 is the `boot selector' which starts
from address 0x400.  The IPL loads boot0.5 and boot0.5 loads bootblock
of a slice.

The boot manager stuff was developed by me (kato) with Borland C++,
and then, translated into bcc in the ports collection by Nokubi-san.
After that, boot0 has been translated into gas with the .code16
directive by Takahashi-san (nyan) and boot0.5 has been rewritten in
gas by me.
2000-08-02 08:46:08 +00:00
Nick Sayer
19a0702e86 Get playback on channel 1 closer to working. 8 bit samples work.
16 bit samples have some sort of choppiness, the nature of which
is not completely clear, but it clearly has something to do with
dma buffer synchronization. But at least channel 1 makes noise now.
2000-08-02 08:01:00 +00:00
Nick Sayer
8eb3acc9be Fix channel 1, sort of. recording now generates IRQs and the output
appears to be the correct length, but quality of output has not yet
been tested. Also, full duplex audio (that is, playback on channel 1)
does not yet work. Two constants and I am there!

Obtained from:	major hints from ALSA
2000-08-02 06:36:55 +00:00
Peter Wemm
b17ec36839 GRRR! Fix the 'panic: ip6_init' caused by darrenr's incomplete changes
for the pfil hooks.  The protosw and ip6protosw structures were out of
sync with each other. :-(
2000-08-02 01:02:42 +00:00
Nick Sayer
302ec06f61 Hook up the ESS solo driver in the correct branch this time. 2000-08-01 22:44:18 +00:00
Nick Sayer
6bfa991145 The solo driver now works for playback, so far as I can tell.
recording is still broken, but IMHO that's enough to at least
"hook it up" to the rest of the kernel/module builds.
2000-08-01 22:42:22 +00:00
Nick Hibma
6939e9446e Sync with NetBSD:
K&R style function headers -> ANSI.
2000-08-01 22:40:23 +00:00
Bill Paul
8273d5f8b1 Apply patch supplied by John Hood <jhood@sitaranetworks.com> to fix problems
with LEDs on some cards being stomped on when clearing the "jabber disable"
bit. Using DC_SETBIT() has an unwanted side effect of setting a write enable
bit in the watchdog timer register which we really want to be cleared when
we do a write.
2000-08-01 19:34:13 +00:00
Ollivier Robert
c34f578dd2 Change __FreeBSD_Version into the proper __FreeBSD_version.
Submitted by:	Alain.Thivillon@hsc.fr (Alain Thivillon) (for ip_fil.c)
2000-08-01 17:14:38 +00:00
Ollivier Robert
8694d8e912 Fix the lockmgr panic everyone is seeing at shutdown time.
vput assumes curproc is the lock holder, but it's not true in this case.

Thanks a lot Luoqi !

Submitted by:	luoqi
Tested by:	phk
2000-08-01 14:15:07 +00:00
Matt Jacob
c7d5594134 Add in macros && masks so that mailbox command errors can be
selectively printed/supressed in isp_mboxcmd.
2000-08-01 06:55:08 +00:00
Matt Jacob
d0d5832ac7 Major whacking for core version 2.0. A major motivator for 2.0 and these
changes is that there's now a Solaris port of this driver, so some things
in the core version had to change (not much, but some).

In order, from the top.....:

A lot of error strings are gathered in one place at the head of the file.
This caused me to rewrite them to look consistent (with respect to
things like 'Port 0x%' and 'Target %d' and 'Loop ID 0x%x'.

The major mailbox function, isp_mboxcmd, now takes a third argument,
which is a mask that selectively says whether mailbox command failures
will be logged. This will substantially reduce a lot of spurious noise
from the driver.

At the first run through isp_reset we used to try and get the current
running firmware's revision by issuing a mailbox command. This would
invariably fail on alpha's with anything but a Qlogic 1040 since SRM
doesn't *start* the f/w on these cards. Instead, we now see whether we're
sitting ROM state before trying to get a running BIOS loaded f/w version.

All CFGPRINTF/PRINTF/IDPRINTF macros have been replaced with calls to
isp_prt. There are seperate print levels that can be independently
set (see ispvar.h), which include debugging, etc.

All SYS_DELAY macros are now USEC_DELAY macros. RQUEST_QUEUE_LEN and
RESULT_QUEUE_LEN now take ispsoftc as a parameter- the Fibre Channel
cards and the Ultra2/Ultra3 cards can have 16 bit request queue entry
indices, so we can make a 1024 entry index for them instead of the
256 entries we've had until now.

A major change it to fix isp_fclink_test to actually only wait the
delay of time specified in the microsecond argument being passed.
The problem has always been that a call to isp_mboxcmd to get he
current firmware state takes an unknown (sometimes long) amount of
time- this is if the firmware is busy doing PLOGIs while we ask
it what's up. So, up until now, the usdelay argument has been
a joke. The net effect has been that if you boot without being plugged
into a good loop or into a switch, you hang. Massively annonying, and
hard to fix because the actual time delta was impossible to know
from just guessing. Now, using the new GET_NANOTIME macros, a precise
and measured amount of USEC_DELAY calls are done so that only the
specified usecdelay is allowed to pass. This means that if the initial
startup of the firmware if followed by a call from isp_freebsd.c:isp_attach
to isp_control(isp, ISP_FCLINK_TEST, &tdelay) where tdelay is 2 * 1000000,
no more than two seconds will actually elapse before we leave concluding
that the cable is unhooked. Jeez. About time....

Change the ispscsicmd entry point to isp_start, and the XS_CMD_DONE
macro to a call to the platform supplied isp_done (sane naming).

Limit our size of request queue completions we'll look at at interrupt
time. Since we've increased the size of the Request Queue (and the
size of the Response Queue proportionally), let's not create an
interrupt stack overflow by having to keep a max completion list
(forw links are not an option because this is common code with
some platforms that don't have link space in their XS_T structures).
A limit of 32 is not unreasonable- I doubt there'd be even this many
request queue completions at a time- remember, most boards now use
fast posting for normal command completion instead of filling out
response queue entries.

In the isp_mboxcmd cleanup, also create an array of command
names so that "ABOUT FIRMWARE" can be printed instead of "CMD #8".

Remove the isp_lostcmd function- it's been deprecated for a while.
Remove isp_dumpregs- the ISP_DUMPREGS goes to the specific bus
register dump fucntion.

Various other cleanups.
2000-08-01 06:51:05 +00:00
Matt Jacob
b09b009594 Core version 2.0 rewrite. In this file we replace isp_tdebug with
isp_prt calls. We now use an argument to the  ISPCTL_FCLINK_TEST
call. We change all IDPRINTF macros to isp_prt calls. We add
the isp_prt function here.
2000-08-01 06:31:44 +00:00
Matt Jacob
18ccaecd45 Core version 2.0 cleanup/rewrite. Things get rearranged and changed
quite a bit so that all of the ports have a similar set of required
macros/definitions (and in similar places in the isp_<platform>.h
file).

Some new macros/functions added- Mailbox Acquire/Relase macros,
NANOTIME macros, SNPRINTf and STRNCAT. MemoryBarrier beomes
MEMORYBARRIER with much stronger types.
2000-08-01 06:29:55 +00:00
Matt Jacob
16dd34376c Remove isp_prtstst (now in case statement in isp.c). Remove
isp2100_fw_statename as an INLINE (now a function in isp.c). Remove
isp2100_pdb_statename (unused). Redo all ISP_SCSI_XFER_T as XS_T types.
Change all RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN macros to take a parameter.
Add isp_print_bytes function.
2000-08-01 06:26:04 +00:00
Matt Jacob
10549c059a Remove isp_tdebug. Change all PRINTF macros to the now common
isp_prt logging function.
2000-08-01 06:24:01 +00:00
Matt Jacob
69fbe07a2e Fix typo. Remove isp_tdebug (we'll use ISP_LOGTDEBUG2 in isp->isp_dblev
as a selector now). Change DFLT_CMD_CNT to a fixed amount for now.
2000-08-01 06:23:24 +00:00
Matt Jacob
a6db0ba6d3 Add in lengths of SBus or PCI registers. 2000-08-01 06:21:21 +00:00
Matt Jacob
53cff3bb65 Rewrite for version 2.0. Some structural changes, but also
a substantial amount of commenting about what each platform
specific definitions are supposed to be.
2000-08-01 06:10:21 +00:00
Matt Jacob
d02373f1a0 Part of major rewrite for core version 2.0- clarification of
mdvec structure, removal of printf/CFGPRINTF in place of isp_prt
calls. Parameterization of RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN.
2000-08-01 05:16:49 +00:00
Coleman Kane
9a63bf73d2 Bring tdfx_pci.c in sync with some patches I have been testing. Adds better
stability for the Voodoo3/Banshee cards than there was before. Still has a
little way to go before it is completely fixed for those cards though.
2000-08-01 05:10:29 +00:00
Jonathan Lemon
1dfd47607b Back out rev 1.12; its not clear that this is the right thing to do,
and in any event, it wasn't done correctly in the first place.
2000-08-01 04:27:50 +00:00
Nick Sayer
80a8e065eb Reverse the sense of the signed/unsigned formatting bit.
This dramatically cleans up playback quality, at least with mxaudio.
2000-08-01 04:18:15 +00:00
Andrey A. Chernov
2e8c7ccd99 Back out opt_ipfilter.h creation I add recently and add -DIPFILTER=1
to CFLAGS instead
According to other sources, opt_ipfilter.h not supposed to be included for
modules
2000-08-01 00:44:42 +00:00
Andrey A. Chernov
e7278dcf6f Replace nonexistent !defined(_LKM) by !defined(KLD_MODULE) 2000-08-01 00:40:32 +00:00
Andrey A. Chernov
8f3a320a76 Check IPFILTER (options IPFILTER generates) instead of NIPFILTER 2000-08-01 00:12:27 +00:00
Andrey A. Chernov
a7d5eaeb8f Fix prev. commit: NIPFILTER -> IPFILTER 2000-08-01 00:10:08 +00:00
Andrey A. Chernov
a089741a74 Add missing '0' to FreeBSD_version test: 50011 -> 500011 2000-08-01 00:04:24 +00:00
Andrey A. Chernov
71e631c2bd Generate opt_ipfilter.h to fix 'make depend' 2000-07-31 23:58:38 +00:00
Andrey A. Chernov
c85540dd55 Nonexistent <sys/pfil.h> -> <net/pfil.h>
Kernel 'make depend' fails otherwise
2000-07-31 23:41:47 +00:00
Andrey A. Chernov
d61dfe72b6 Nonexistent "ipfilter.h" -> "opt_ipfilter.h"
Kernel 'make depend' fails otherwise
2000-07-31 23:35:08 +00:00
Nick Sayer
3a5ed3c526 Add the module Makefile for the newly committed ESS solo sound driver.
It will be connected to the parent Makefile after more testing.
2000-07-31 17:22:30 +00:00
Cameron Grant
fd1aaeccce almost-there ess solo-1 driver, committed so people can tell me why it
doesn't generate irqs.
2000-07-31 16:17:40 +00:00
Luoqi Chen
3fb50adb4c Handle write page faults (both write only or read-modify-write) as MI vm
write-only faults.  This would allow write-only mmapped regions to function
correctly.
2000-07-31 14:47:14 +00:00
Sheldon Hearn
71845bffc3 Whitespace only:
Fix an overlong line and trailing whitespace that crept in, in the
previous commit.
2000-07-31 13:49:21 +00:00
Darren Reed
c4ac87ea1c activate pfil_hooks and covert ipfilter to use it 2000-07-31 13:11:42 +00:00
Nick Hibma
7cce89994a Support for the Panasonic / Matshita USB FDD.
Submitted by:		SAKIYAMA Nobuo <sakichan@lares.dti.ne.jp>
PR:			kern/20300
2000-07-31 12:40:26 +00:00
Alfred Perlstein
9ad48853de mbstat should be a read-only sysctl.
Submitted by: Bosko Milekic <bmilekic@dsuper.net>
2000-07-31 09:24:32 +00:00
Paul Saab
030f7b3faa Remove unnecessary call to splnet when setting an accept filter
since we are already at splnet.
2000-07-31 08:23:43 +00:00
Cameron Grant
5151584d21 add suspend/resume for yamaha chips
Submitted by:	Ira L Cooper <ira@MIT.EDU>
2000-07-30 21:15:35 +00:00
Poul-Henning Kamp
0825a8a33f Allow use of TSC even if APM is compiled in but disabled. 2000-07-30 21:05:22 +00:00
Cameron Grant
1c60ef3f3c fix a potential local DoS attack 2000-07-30 19:38:26 +00:00
Cameron Grant
e04387c95a fix a bug where opening /dev/dsp twice resulted in it being busy until reboot 2000-07-30 19:36:13 +00:00
Steve Price
bf11d3dcda Spell the word 'limited' with only one 't'. 2000-07-30 17:54:34 +00:00
Yoshihiro Takahashi
0100579d5b Merged from sys/dev/syscons/scterm-sc.c revisions from 1.8 to 1.12. 2000-07-30 08:12:08 +00:00
Yoshihiro Takahashi
87cd59ec7c Merged from sys/dev/syscons/syscons.c revision 1.344. 2000-07-30 07:59:19 +00:00
Yoshihiro Takahashi
78a9e97b3a Merged from sys/boot/i386/btx/btx/btx.s revisions from 1.18 to 1.22. 2000-07-30 07:45:02 +00:00
Cameron Grant
3c1b957d66 do the ac97 init delay for all chips and increase it to 500ms 2000-07-30 02:33:37 +00:00
Peter Wemm
3a285cc807 Regen. (Fix SYS_exit) 2000-07-29 10:07:38 +00:00
Peter Wemm
4e0f152bbe Sigh. Fix SYS_exit problems. I misunderstood the significance of these
trailing options.
2000-07-29 10:05:25 +00:00
Paul Saab
0e461cb7e2 Remove this file incase of further confusion. 2000-07-29 04:09:07 +00:00
David E. O'Brien
f6dc8d17b1 Move RAID controllers to the same position as in i386 GENERIC. 2000-07-29 02:13:42 +00:00
David E. O'Brien
ff6804717c Revert previous commit. Not all RAID controllers are SCSI. 2000-07-29 02:12:44 +00:00
David E. O'Brien
c79ef5d331 Move the RAID controllers next to the SCSI controllers. 2000-07-29 02:00:28 +00:00
Nick Sayer
82902fa3d8 Make the bridge_refresh operation automatic when ethernet interfaces
are attached or detached.
2000-07-29 02:00:12 +00:00
David E. O'Brien
73c9daf94f Add the RAID controller that are known to work (or did on last test).
Reviewed by: 	msmith
2000-07-29 01:59:32 +00:00
David E. O'Brien
cf10fa4fcd Comment out ncr' as sym' handles all that `ncr' does.
(only commented out to make it easy for people to find it that really
 wants it.)

Asked for by:	Peter
2000-07-29 01:31:09 +00:00
Peter Wemm
69065e880a Regenerate with makesyscalls.sh 2000-07-29 00:21:50 +00:00
Peter Wemm
ac2b067b9a Change the 'exit()' system call to 'sys_exit()'. This avoids overlapping
gcc's internal exit() prototypes and the (futile) hackery that we did to
try and avoid warnings.  main() was renamed for similar reasons.
Remove an exit related hack from makesyscalls.sh.
2000-07-29 00:16:28 +00:00
Peter Wemm
d244b0e95b "Fix" cast qualifier warnings using the uintptr_t intermediate trick. 2000-07-28 23:30:30 +00:00
Peter Wemm
5dec52bada Fix the #ifdef VFS_AIO to not compile a whole bunch of unused stuff in the
!VFS_AIO case.  Lots of things have hooks into here (kqueue, exit(),
 sockets, etc), I elected to keep the external interfaces the same
 rather than spread more #ifdefs around the kernel.
2000-07-28 23:10:10 +00:00
Peter Wemm
58c9d62373 Fix a warning re: a potentially unused pccard helper function 2000-07-28 23:00:00 +00:00
Peter Wemm
abe0ccd784 Fix warning - isa/isavar.h is a prerequisite for isa/pnpvar.h 2000-07-28 22:58:28 +00:00
Peter Wemm
f7ce4efc8a Fix a const related warning. 2000-07-28 22:41:56 +00:00
Peter Wemm
93e8459a02 Fix some style nits.
Fix(?) some compile warnings regarding const handling.
2000-07-28 22:40:04 +00:00
Peter Wemm
c828c7b784 Fix warnings - make kevent args in comment match those in syscalls.master.
Deal with consts.
2000-07-28 22:32:25 +00:00
Peter Wemm
68e530258a Minor tweak - removed unused variable 'struct mount *mp'; 2000-07-28 22:28:05 +00:00
Peter Wemm
6ee6b42ef7 Minor change: fix warning - move a 'struct vnode *vp' declaration inside a
#ifdef DIAGNOSTIC to match its corresponding usage.
2000-07-28 22:27:00 +00:00
Peter Wemm
b31ae1adc5 Fix a warning that has been annoying me for some time:
"kern/sys_generic.c:358: warning: cast discards qualifiers from pointer
   target type"
The idea for using the uintptr_t intermediate cast for de-constifying
a pointer was hinted at by bde some time ago.
2000-07-28 22:17:42 +00:00
Peter Wemm
bb663856f8 Minor cleanups:
- remove unused variables (fix warnings)
 - use a more consistant ansi style rather than a mixture
 - remove dead #if 0 code and declarations
2000-07-28 22:03:08 +00:00
Robert Watson
fc3345a4a7 o Modify extattr_{set,get}() syscalls so that partial reads and writes
with an error condition such as EINTR, EWOULDBLOCK, and ERESTART,
  are reported to the application, not silently conceal.  This
  behavior was copied from the {read,write}v() syscalls, and is
  appropriate there but not here.
o Correct a bug in extattr_delete() wherein the LOCKLEAF flag is
  passed to the wrong argument in namei(), resulting in some
  unexpected errors during name resolution, and passing in an unlocked
  vnode.

Obtained from:	TrustedBSD Project
2000-07-28 19:52:38 +00:00
Sheldon Hearn
1b2fbe6ff9 Rename the loadable nullfs kernel module: null -> nullfs 2000-07-28 11:54:09 +00:00
KATO Takenori
1fb2276093 Merged from sys/dev/syscons/syscons.c revision 1.345. 2000-07-28 09:36:37 +00:00
Jeroen Ruigrok van der Werven
a66233226c Fix if_types.h as per the IANA assignments with regard to IPv6.
gif/faith/stf moved to 0xfN entries, since their previous location
is allocated to some other interfaces.
Also add the IFT_PVC, which is the ATM PVC subinterface from ALTQ.

This also syncs us up a bit to NetBSD again.

This change requires a total recompilation of all kmem users, as
itojun told me.

Next in line is synching to the IANI SMI list.

Approved by:	itojun
2000-07-28 06:20:11 +00:00
Kazutaka YOKOTA
fc581b6bf6 Fix GENERIC_MOUSE_ENTRY.
Submitted by: Graham Wheeler <gram@cequrux.com> and gibbs
2000-07-28 03:48:46 +00:00
Justin T. Gibbs
957790c3e6 ahc_pci.c:
Disable "cache line streaming" for aic7890/91 Rev A chips.  I
	have never seen these chips fail using this feature, but
	some of Adaptec's regression tests have.

	Explicitly set "cache line streaming" to on for aic7896/97
	chips.  This was happening before, but this documents the
	fact that these chips will not function correctly without
	CACHETHEEN set.

aic7xxx.h:
	Add new bug types.

	Fix a typo in a comment.

aic7xxx.reg:
	Add a definition for the SHVALID bit in SSTAT3 for Ultra2/3
	chips.  This bit inicates whether the bottom most (current)
	element in the S/G fifo has exhausted its data count.

aic7xxx.seq:
	Be more careful in how we turn off the secondary DMA channel.
	Being less careful may hang the PCI bus arbitor that negotiates
	between the two DMA engines.

	Remove an unecessary and incorrect flag set operation in
	the overrun case.

	On Ultra2/3 controllers, clear the dma FIFO before starting
	to handle an overrun.  We don't want any residual bytes from
	the beginning of the overrun to cause the code that shuts
	down the DMA engine from hanging because the FIFO is not
	(and never will be) empty.

	If the data fifo is empty by the time we notice that a
	read transaction has completed, there is no need to
	hit the flush bit on aic7890/91 hardware that will not
	perform an auto-flush.  Skip some cycles by short circuiting
	the manual flush code in this case.

	When transitioning out of data phase, make sure that we
	have the next S/G element loaded for the following
	reconnect if there is more work to do.  The code
	would do this in most cases before, but there was
	a small window where the current S/G element could
	be exhausted before our fetch of the next S/G element
	completed.  Since the S/G fetch is already initiated
	at this point, it makes sense to just wait for the
	segment to arrive instead of incuring even more latency
	by canceling the fetch and initiating it later.

	Fast path the end of data phase handling for the last
	S/G segment.   In the general case, we might have
	worked ahead a bit by stuffing the S/G FIFO with
	additional segments.  If we stop before using them
	all, we need to fixup our location in the S/G stream.
	Since we can't work past the last S/G segment, no
	fixups are ever required if we stop somewhere in
	that final segment.

	Fix a little buglet in the target mode dma bug handler.
	We were employing the workaround in all cases instead
	of only for the chips that require it.

	Fix the cause of SCB timeouts and possible "lost data"
	during read operations on the aic7890.  When sending
	a data on any Ultra2/3 controller, the final segment
	must be marked as such so the FIFO will be flushed and
	cleaned up correctly when the transfer is ended.  We
	failed to do this for the CDB transfer and so, if
	the target immediately transfered from command to data
	phase without an intervening disconnection, the first
	segment transferred would be any residual bytes from
	the cdb transfer.  The Ultra160 controllers for some
	reason were not affected by this problem.

Many Thanks to Tor Egge for bringing the aic7890 problem
to my attention, providing analysis, as well as a mechanism
to reproduce the problem.
2000-07-27 23:17:52 +00:00
Jonathan Lemon
ab2adc20f2 Have kevent() automatically restart if interrupted by a signal. If this
is not desired, then the user can register an EV_SIGNAL filter to
explicitly catch a signal event.

Change requested by: jayanth, ps, peter
		     "Why is kevent non-restartable after a signal?"
2000-07-27 23:06:14 +00:00
Jonathan Lemon
1277c3bac4 The DEC version of the Smart controller has its configuration information
stored at a different location in the PCI space, so adjust accordingly.

Also, when using more than two smart controllers in one machine, the
disks were assigned the wrong drive number; fix this as well.
2000-07-27 22:24:44 +00:00
Poul-Henning Kamp
f4bac0e6c6 Remove stale, unused and bogus root device hunting code. 2000-07-27 18:18:47 +00:00
Jeroen Ruigrok van der Werven
3759e79c20 Document the 0x12258086 PCI id.
This is in fact an Intel Orion chipset (82454KX/GX) which has been used
in HP NetServer's LS4 range.
HP Probably relabeled the DID.  That's the only explanation I can find
plausible to this `mystery'.
2000-07-27 09:54:50 +00:00
Brian Feldman
f623957fef -mkdir the ${DESTDIR}/modules directory upon modules-install in case it
doesn't exist.  This could bite you by allowing you merrily install your
modules one on top of the other as the regular file ${DESTDIR}/modules
and think it completed properly...
2000-07-27 03:50:25 +00:00
Brian Feldman
3c89e357f0 Distinguish between whether ktraceing was enabled before an IO
operation or after it.  If the ktrace operation was enabled while the
process was blocked doing IO, the race would allow it to pass down
invalid (uninitialized) data and panic later down the call stack.
2000-07-27 03:45:18 +00:00
Marcel Moolenaar
4c02bded00 Remove the only use of SCARG and perform dead code elimination. 2000-07-27 01:22:24 +00:00
Bill Paul
51a4eb4bed Use a custom Tigon 2 firmware image, hopefully temporarily. This is
the 12.4.11 firmware with a few changes to the link handling code merged
in from the 12.4.13 release. I'm doing this because the 12.4.13 firmware
doesn't seem to handle 10/100 link settings properly on 1000baseT cards.
Note that the revision codes still identify the firmware as 12.4.13
because both ti_fw2.h and ti_fw.h have to have the same revision values,
and I wanted to keep the 12.4.13 firmware for Tigon 1 cards.

It's nice to have firmware source.
2000-07-26 23:55:34 +00:00
Archie Cobbs
642e43b39b Add address translation support for RTSP/RTP used by RealPlayer and
Quicktime streaming media applications.

Add a BUGS section to the man page.

Submitted by:	Erik Salander <erik@whistle.com>
2000-07-26 23:15:46 +00:00
Kirk McKusick
a6c8be39c9 Disable LK_CANRECURSE on buffer locks. The recusion is needed only for
certain uses of snapshots and currently appears to be causing some
other problems. So for now, I am reverting to the old semantics until
I have had time to investigate what is causing the other problems.
2000-07-26 23:10:02 +00:00
Kirk McKusick
3592b7155c Clean up the snapshot code so that it no longer depends on the use of
the SF_IMMUTABLE flag to prevent writing. Instead put in explicit
checking for the SF_SNAPSHOT flag in the appropriate places. With
this change, it is now possible to rename and link to snapshot files.
It is also possible to set or clear any of the owner, group, or
other read bits on the file, though none of the write or execute
bits can be set. There is also an explicit test to prevent the
setting or clearing of the SF_SNAPSHOT flag via chflags() or
fchflags(). Note also that the modify time cannot be changed as
it needs to accurately reflect the time that the snapshot was taken.

Submitted by:	Robert Watson <rwatson@FreeBSD.org>
2000-07-26 23:07:01 +00:00
Robert Watson
3ce7b7aa84 o Lock vnode before calling extattr_* VOP's, and modify vnode spec to
allow for that.
o Remember to call NDFREE() if exiting as a result of a failed
  vn_start_write() when snapshotting.

Reviewed by:	mckusick
Obtained from:	TrustedBSD Project
2000-07-26 20:29:20 +00:00
John Baldwin
13f5bcc90d Remove the SHM_PHYS_BACKED option.
Approved by:	peter (in principle)
2000-07-26 19:40:42 +00:00
John Baldwin
446af86da3 Document the SYSV IPC kernel options. Also, remove the SHM_PHYS_BACKED
option as it is no longer used.

PR:		docs/20080
Submitted by:	Michael Robinson <robinson@netrinsics.com>
2000-07-26 19:39:46 +00:00
Poul-Henning Kamp
a0580699e1 Fix the "mfs_badop[vop_getwritemount] = 45" messages. 2000-07-26 17:53:04 +00:00
Nick Hibma
9d6eda11bc Remove the preliminary support for ATAPI. It does not work and breaks
(physically) IBM Microdrives.
2000-07-26 01:01:01 +00:00
Nick Sayer
b14e438ed8 Change to support vmware... SIOCSIFADDR on the character device
sets the (notional) "remote" ethernet address.

Submitted by:	vsilyaev@mindspring.com
2000-07-25 23:50:30 +00:00
John Baldwin
edf6db6217 style(9)'ify all the function prototypes by protecting all the parameter
names with a leading underscore.  Notably, the 'stat' parameter in the
kld_stat() prototype conflicted with stat() and generated a BDE warning.

Approved by:	peter
2000-07-25 22:58:52 +00:00
Mark Murray
7aa4389a6c o Fix a horrible bug where small reads (< 8 bytes) would return the
wrong bytes.

o Improve the public interface; use void* instead of char* or u_int64_t
  to pass arbitrary data around.
Submitted by:	kris ("horrible bug")
2000-07-25 21:18:47 +00:00
Justin T. Gibbs
f94bf02fdb Properly handle the case where the residual is 0, but, as the target
didn't bother to send a saved data pointers after the last transfer,
is not recorded in sgptr.  This was only a problem if the target
reported non-zero status as we always check the residual in that case.
2000-07-25 20:40:34 +00:00
Archie Cobbs
da010626df Followup to previous commit..
- It's worthwhile to use untimeout(9), even though we must still protect
  against "false" timeouts, because most of the time it saves having to
  handle a dummy timeout event.
- Slight tweaks to the delayed ACK algorithm paramters.
2000-07-25 18:57:20 +00:00
Kirk McKusick
54e53ebda7 Now that buffer locks can be recursive, we need to delete the panics
that complain about them.

Obtained from:	Brian Fundakowski Feldman <green@FreeBSD.org>
2000-07-25 18:28:46 +00:00
Jeroen Ruigrok van der Werven
8259bcdff2 Document IPFILTER_DEFAULT_BLOCK.
PR:		20075
Submitted by:	Arjan de Vet <Arjan.deVet@adv.iae.nl>
2000-07-25 15:40:19 +00:00
Hajimu UMEMOTO
8bf72aef7c Workaround to avoid panic during detach pccard nic. 2000-07-25 11:21:01 +00:00
Bill Fumerola
78a40870e5 s%LINT%NOTES%g 2000-07-25 08:25:48 +00:00
Paul Saab
42f6636213 kern_accf.c is now uipc_accf.c after repo copy. 2000-07-25 07:32:15 +00:00
Kirk McKusick
aec3bbe11c Do not need vrele(nd.ni_vp) as that is done by NDFREE(&nd, 0);
Submitted by:	Peter Holm <pho@freebsd.org>
2000-07-25 05:38:54 +00:00
Kirk McKusick
55ba28c60a Add stub for softdep_flushworklist() so that kernels compiled
without the SOFTUPDATES option will load correctly.

Obtained from:	John Baldwin <jhb@bsdi.com>
2000-07-25 05:28:59 +00:00
Kirk McKusick
d56bdab31c Eliminate periodic 'mfs_badop[vop_getwritemount] = 45' messages.
Submitted by:	Sheldon Hearn <sheldonh@uunet.co.za>
2000-07-25 05:11:57 +00:00
Robert Watson
e2e45aa8a0 o Add missing function return types from capability syscall call stubs,
fix compiler warning.

Submitted by:	jake
2000-07-25 03:37:36 +00:00
Archie Cobbs
678f9e335e Several fixes:
- Fix slowness when operating over fast connections, where the timeout(9)
  granularity is on the same order of magnitude as the round trip time.
  timeout(9) can happen up to 1 tick early, which was causing receive
  ack timeouts to happen too early, causing bogus "lost" packets.
- Increase the local time counter to 64 bits to avoid roll-over.
- Keep statistics on memory allocation failures.
- Add a new option to always include the ack when sending data packets.
  Might be useful in high packet loss situations. Might not.
2000-07-25 00:23:19 +00:00
Justin T. Gibbs
c27eebfde8 aic7xxx.c:
Correct the BUILD_TCL macro.  It was placing the target id
	in the wrong bits.  This was only an issue for adapters that
	do not perform SCB paging (aha-3940AUW for instance).

	Don't bother inlining ahc_index_busy_tcl.  It is never
	used in a performance critical path and is a bit chunky.

	Correct ahc_index_busy_tcl to deal with "busy target tables"
	embedded in the latter half of 64byte SCBs.

	Don't initialize the busy target table to its empty state
	until after we have finished extracting configuration
	information from chip SRAM.  In the common case of using
	16 bytes of chip SRAM to do untagged target lookups,
	we were trashing the last 8 targets configuration data.
	(actually only target 8 because of the bug in the
	BUILD_TCL macro).

	Cram the "bus reset delivered" message back under bootverbose.

	Fix the cleanup of the SCB busy target table when aborting
	commands.  If the lun is wildcarded, we must loop through
	all possible luns.

aic7xxx.h:
	Only bother supporting 64 luns right now.  It doesn't seem
	like either this driver or any peripherals will be doing
	information unit transfers (where the lun number is a
	32 bit integer) any time soon.

aic7xxx.seq:
	Fix support for the aic7895.  We must flush the data
	FIFO if performing a manual transfer that is not
	a multiple of 8 bytes.  We were doing this quite
	regularly for embedded cdbs.

	Manaually flush the fifo on earlier adapters when
	dealing with embedded cdbs too.  We were stuffing
	the FIFO with 16 bytes instead, but triggering
	the flush is more efficient and allows us to
	remove two instructions from the "copy_to_fifo"
	routine.
2000-07-24 22:27:40 +00:00
Mitsuru IWASAKI
df56ce3e40 Fix a bug so that we have correct number of pccard instances in pcic_attach().
pcic_attach() got a wrong pointer to pcic_slots since device haven't
set correct unit number yet, so always accessed elements of pcic_slots
which belong to pcic0 (unit number 0).

Now we set unit number to pcic device first, then access to pcic_slots
based on the unit number we've just set.
2000-07-24 21:44:00 +00:00
Kenneth D. Merry
cf8432359c Allocate major number 153 for the character device interface for the ti(4)
driver.
2000-07-24 21:21:03 +00:00
Poul-Henning Kamp
2eaaa4dea8 Allocate major 152 to ACPI.
Requested by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
2000-07-24 19:00:18 +00:00
Nick Sayer
6d57c73f9c Sundry changes to debugging code.
Add spl/splx to various sensitive spots
Change semantics of the vmnet version of the device to keep VMware happy
(don't junk state when the device is closed)

Submitted by:	vsilyaev@mindspring.com
2000-07-24 15:32:26 +00:00
Sheldon Hearn
c146223678 When manual pages are moved or removed, MANX should be changed
to NOMAN.

Reported by:	bde
2000-07-24 13:52:07 +00:00