Commit Graph

21642 Commits

Author SHA1 Message Date
Sheldon Hearn
fcb2a26dfc Synchronize the poll() prototype with the one provided in the
poll(2) manual page.

PR:		20677
Submitted by:	"Ralf S. Engelschall" <rse@engelschall.com>
2000-08-21 12:25:09 +00:00
Nick Hibma
50b37103a2 Fix up the command in the destination buffer, not the source.
This makes the conversion from Test-Unit-Ready to Start-Stop-Unit in the case
of SCSI (Iomega Zip drive) actually work.
2000-08-21 09:39:07 +00:00
Poul-Henning Kamp
055aefb1bc Add dummy opt_devfs.h file. 2000-08-21 07:45:37 +00:00
Cameron Grant
513693be6c rework feeder sytem to allow feeders in klds
modify driver capability reporting format to list every audio format
seperately- required for above and because we could not previously indicate
that mono was unsupported.

there should be no functional impact.
2000-08-20 22:18:56 +00:00
Poul-Henning Kamp
3f54a085a6 Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)
Remove old DEVFS support fields from dev_t.

  Make uid, gid & mode members of dev_t and set them in make_dev().

  Use correct uid, gid & mode in make_dev in disk minilayer.

  Add support for registering alias names for a dev_t using the
  new function make_dev_alias().  These will show up as symlinks
  in DEVFS.

  Use makedev() rather than make_dev() for MFSs magic devices to prevent
  DEVFS from noticing this abuse.

  Add a field for DEVFS inode number in dev_t.

  Add new DEVFS in fs/devfs.

  Add devfs cloning to:
        disk minilayer (ie: ad(4), sd(4), cd(4) etc etc)
        md(4), tun(4), bpf(4), fd(4)

  If DEVFS add -d flag to /sbin/inits args to make it mount devfs.

  Add commented out DEVFS to GENERIC
2000-08-20 21:34:39 +00:00
Hajimu UMEMOTO
e0faad6850 Add UNIX domain socket feature to pccardd. This makes pccard
related PAO3/ports such as gxcardmon work.

Reviewed by:	imp
Obtained from:	PAO3
2000-08-20 16:16:57 +00:00
Nick Hibma
59e8700a14 Unbreak LINT. 2000-08-20 15:30:15 +00:00
Poul-Henning Kamp
4fe6d43729 Fix typo in last commit. 2000-08-20 11:46:39 +00:00
Poul-Henning Kamp
e39c53eda5 Centralize the canonical vop_access user/group/other check in vaccess().
Discussed with: bde
2000-08-20 08:36:26 +00:00
David Malone
a893217258 A slight restyling of the previous fix and make the way the
reference count is initialised to zero to be more kosher.

Reviewed by:	Bosko Milekic <bmilekic@technokratis.com>
Spotted by:	jdp and Jake Burkholder <jburkhol@home.com> respectively
2000-08-20 00:02:48 +00:00
John Polstra
2550f17d1c Fix logic error which caused a page fault in kernel mode immediately
on boot up.

Submitted by:	Bosko Milekic <bmilekic@technokratis.com>
2000-08-19 23:50:41 +00:00
Bruce Evans
4153a3a323 Fixed a missing splx() in if_addmulti(). Was broken in rev.1.28. 2000-08-19 22:10:10 +00:00
Warner Losh
c0c32537e3 Don't build pccard for now until I can resolve the linker interaction
issue that I'm seeing.
2000-08-19 19:26:03 +00:00
Warner Losh
9489712614 Work around a possible kernel linker bug. It appears that the data
elements defined by foo_if.c aren't sharable amoung modules (I'm
working on a bug report for it now), or else I don't understand
something.  It showed up as kobj functions not being called.

In any event, link in the pcic and pccard parts of the modules to work
around the problem for now.
2000-08-19 19:25:23 +00:00
Warner Losh
c8ce264e17 o Move to using PCCARD_SOFTC(dev)
o fill in the size of the actual softc, rather than 1 in data structure
o minor debugging improvements.
2000-08-19 19:22:04 +00:00
Warner Losh
943e2bf6f6 o move to using PCIC_SOFTC(dev) to get the softc
o move pcic_deactivate into pcic_detach
o Better debug messages
2000-08-19 19:20:25 +00:00
Cameron Grant
fa06efc7e6 fix SNDCTL_DSP_GETODELAY
PR:		kern/20340
Submitted by:	Takashi SHIRAI <shirai@nintendo.co.jp>
2000-08-19 18:29:46 +00:00
Cameron Grant
4e77c04865 don't complain about bad irqs if using a shared irq 2000-08-19 18:22:20 +00:00
Cameron Grant
becc0678b7 Recognize ESS 1888 in Dell Latitude XPi
PR:		kern/18714
Submitted by:	Sean O'Connell <sean@stat.Duke.EDU>
2000-08-19 18:17:15 +00:00
Yoshihiro Takahashi
ac1140b8d5 Disabled serial console. 2000-08-19 10:19:43 +00:00
David Malone
a5c4836d39 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
Warner Losh
546eb2b18e Call bus_generic_detach on pcic before deleting the children. This
has the side effect of detaching the children before I delete them.
When I put the last commits in a loop for loop it died after 5 or so
iterations.  After this change, I lasted 50 before I stopped the test.
2000-08-19 05:01:07 +00:00
Warner Losh
2a30553ef2 Remove pcic_isa_identify. I don't think it is needed.
Add pcic_detach which removes all of the pcic's children.

This lets me load/unload pcic multiple times w/o having multiple
instances of each slot attached to pcic.
2000-08-19 04:47:09 +00:00
Mike Smith
8ade16819d Increase the default NAPIC from 1 to 2 as a bandaid until we allocate
these dynamically (ie. typically you shouldn't have to set NAPIC at all)
2000-08-18 20:09:15 +00:00
Poul-Henning Kamp
39f70682ae Introduce vop_stdinactive() and make it the default if no vop_inactive
is declared.

Sort and prune a few vop_op[].
2000-08-18 10:01:02 +00:00
KATO Takenori
a19d469b8a Merged from sys/i386/i386/machdep.c revision 1.402. 2000-08-18 09:22:01 +00:00
David Malone
432b948f76 The slip driver used to allocate a mbuf cluster without attaching
it to a mbuf. This patch makes it attach it to mbuf.  This patch
is in preperation for Bosko Milekic's mbuf external reference
counting patches.

PR:		19866 (first stage)
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by:	alfred
2000-08-18 08:02:31 +00:00
Brian S. Dean
39a59b1de6 Don't let an illegal value for dr7 get set, which can lead to an
unexpected TRCTRAP.

Reported by: John W. De Boskey <jwd@FreeBSD.org>
2000-08-17 14:35:23 +00:00
Yoshihiro Takahashi
82583dd564 - Fixed the conversion to bus_space interface.
- Added PC-98 Cbus devices support.
  The original patch is submitted by chi@bd.mbn.or.jp (Chiharu Shibata)
- Removed old ed driver.
2000-08-17 12:15:45 +00:00
Warner Losh
928db2a912 Add support for loading this as a module (before there were some
problems).  Also pick an irq if one isn't specified.  Ditto for
memory.

Add additional printfs in the error paths.  These will disappear in time.

There are still some panics, but this is a good checkpoint.
2000-08-17 05:52:18 +00:00
John Baldwin
e25cb01d28 Add in a hack that installs 'src/sys/${MACHINE_ARCH}/GENERIC.hints' as
/boot/device.hints in the bin dist during releases so that current snapshots
have a chance of booting up ok after installing.  The real fix for this
problem is to rewrite userconfig in Forth, stick it in the loader, axe
userconfig from the kernel, and extract the hints from the booted kernel in
sysinstall similar to the way we generate /boot/kernel.conf right now.  For
now, however, this will have to do.
2000-08-17 05:43:41 +00:00
Brian Feldman
9b96968623 Fix a couple cases where p_trespass wasn't transitioned into place.
Make RTP_SET (rtprio) only accessible to real root, not root in jails.
2000-08-16 23:28:54 +00:00
Tor Egge
d9b05734cc Prepare for a cleanup of pmap module API pollution introduced by the
suggested fix in PR 12378.

Keep track of all existing pmaps independent of existing processes.

This allows for a process to temporarily connect to a different address
space without the risk of missing an update of the original address space if
the kernel grows.

pmap_pinit2() is no longer needed on the i386 platform but is left as a
stub until the alpha pmap code is updated.

PR:		12378
2000-08-16 21:24:44 +00:00
Darren Reed
6c292daf22 backout previous change for now 2000-08-16 13:59:50 +00:00
Darren Reed
48f0e05128 add extern for inetsw 2000-08-16 13:54:56 +00:00
Jun-ichiro itojun Hagino
0150f3ec9b add missing splx(), when outgoing interface queue is full on tunnelled
IPsec packet output.  KAME PR 280.
2000-08-16 09:56:45 +00:00
Søren Schmidt
b0bb0aeb95 Rearrange the probe a bit, hopefully this will help to eleminate
some of the fake devices sometimes seen on single device ATA
channels.

Proberly fail on failures in ata-disk.c, retry instead of hang.

Cleanup the VIA probe/init code a bit.

Fix a couble of missing free's in atapi-cd.c in the changer code.
2000-08-16 07:09:04 +00:00
Greg Lehey
7a598eabdd open_drive:
Add support for AMD RAID controllers as "disks".

Requested-by:  Marius Bendiksen <mbendiks@eunet.no>

  Remove potential panic when attempting to open non-existent drivers.

init_drive: Return error codes correctly.  Previously it would
            occasionally return 0.  The error was redetected
            elsewhere, but this was causing a number of confusing
            error messages.
2000-08-16 04:31:37 +00:00
Peter Wemm
d7db4e569d Add another USR modem.
PR: 20621
Submitted by: Masanori Taira <mtaira@logicaleffect.com>
2000-08-15 21:03:28 +00:00
Kris Kennaway
0f336aa5db Install mode 644, not mode 664 during kernel compile. Yes, Peter, I am
psycho :-)
2000-08-15 11:06:56 +00:00
KATO Takenori
77dff523b3 Fixed determination method for sector size of the 2nd IDE HDD. 2000-08-15 08:17:03 +00:00
Jun-ichiro itojun Hagino
d1d1144bd7 repair endianness issue in IN_MULTICAST().
again, *BSD difference...

From: Nick Sayer <nsayer@quack.kfu.com>
2000-08-15 07:34:08 +00:00
Archie Cobbs
56045c6673 Add three more control messages to complement their opposites:
NGM_ETHER_SET_ENADDR, NGM_ETHER_GET_PROMISC, and NGM_ETHER_GET_AUTOSRC.
Alter parsing algorithm so the EN address really looks like one.
2000-08-15 01:05:50 +00:00
Archie Cobbs
66ce51cec7 Export the functionality of SIOCSIFLLADDR with if_setlladdr()
and add some more rigorous sanity checking in the process.

Reviewed by:	freebsd-net
2000-08-15 00:48:38 +00:00
Ruslan Ermilov
a05f06d79f Fixed PunchFW code segmentation violation bug.
Reported by:	Christian Schade <chris@cube.sax.de>
2000-08-14 15:24:47 +00:00
Ruslan Ermilov
b834663f47 Use queue(3) LIST_* macros for doubly-linked lists. 2000-08-14 14:18:16 +00:00
Atsushi Onoe
e05d1af60e awictl configuration interface is never used and now it is replaced by
wicontrol(8).
2000-08-14 14:10:10 +00:00
Atsushi Onoe
7b2182ad4e add dev/awi/awi_wicfg.c to support wi(4) compatible configuration interface.
add dev/awi/awi_wep.c to support WEP for awi.
add dependency for awi to crypto/rc4/rc4.c
2000-08-14 13:45:42 +00:00
Atsushi Onoe
3b65d03e0a Add support for WEP functionality.
Add support for wi(4) compatible configuration interface.  It enables
wicontrol(8) to configure some 802.11 specific parameters.
Some minor fixes from NetBSD.
Obtained from:  NetBSD current
2000-08-14 13:42:38 +00:00
Atsushi Onoe
853f381335 Change the argument for SIOCG80211NWID/SIOCS80211NWID to include the
length of NWID.  This breaks binary compatibility but only the awi driver
refers this ioctl; no userland tools refers it.
Add WEP stuff.
Obtained from:	NetBSD current
2000-08-14 13:29:49 +00:00
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