Commit Graph

19846 Commits

Author SHA1 Message Date
Nick Hibma
e5399702e8 Print the PCI resources even if they are disabled. This shows more clearly
when the BIOS is forgetful about initialising the USB controllers.
2000-03-18 19:18:36 +00:00
Jeroen Ruigrok van der Werven
bc0e3a03b5 Put the undocumented options back at the bottom as per old
practice.

Place the debug options above the undocumented options.
2000-03-18 18:39:02 +00:00
Joerg Wunsch
5f830ea2cd Make the Y-E Data PCMCIA floppy of the Toshiba Libretto work under
-current.  It doesn't work yet as stable as the 3.x/PAO version of the
driver does, however, i get occasional `FDC direction bit not set' and
other weird messages, but it basically works at least.

The old (defunct) #ifdef FDC_YE stuff has been eliminated completely
now, PCMCIA-FDC specific functions have been implemented differently
where needed.

Unfortunately, due to the fact that the traditional PeeCee FDC with
its funny non-contiguous register space (one register for WD1003
harddisk controllers is interleaved into the FDC register set), and
Peter's subsequent changes involving two different bus space handles
for normal FDCs, the changes required for the Y-E stuff are more
complex than i'd love them to be.  I've done my best to keep the logic
for normal FDCs intact.

Since the Y-E FDC seems to lose interrupts after a FDC reset
sometimes, i've also replaced the timeout logic in fd_turnoff() to
generate an artificial pseudo interrupt in case of a timeout while the
drive has still outstanding transfers waiting.  This avoids the total
starvation of the driver that could be observed with highly damaged
media under 3.x/PAO.  This part of the patch has been revied by bde
previously.

I've fixed a number of occasions where previous commits have been
missing the encapuslation of ISA DMA related functions inside
FDC_NODMA checks.

I've added one call to SET_BCDR() during preparation of the format
floppy operation.  Floppy formatting has been totally broken before in
3.x/PAO (garbage ID fields have been written to the medium, causing
`wrong cylinder' errors upon media reading).  This is just black
magic, i don't have the slightes idea _why_ this needs to be but just
copied over the hack that has been used by the PAO folks in the normal
read/write case anyway.

The entired device_busy() stuff seems to be pointless to me.  In any
case, i had to add device_unbusy() calls symmetrical to the
device_busy() calls, otherwise the PCMCIA floppy driver could never be
deactivated.  (As it used to be, it caused a `mark the device busier
and busier' situation.)  IMHO, all block device drivers should be
marked busy based on active buffers still waiting for the driver, so
the device_unbusy() calls should probably go to biodone().  Only one
other driver (whose name escapes me at the moment) uses device_busy()
calls at all, so i question the value of all this...

I think this entire `device busy' logic simply doesn't fit for PCMCIA
&al.  It cannot be the decision of some piece of kernel software to
declare a device `busy by now, you can't remove it', when the actual
physical power of removing it is the user pulling the card.  The
kernel simply has to cope with the removal, however busy the device
might have been by the time of the removal, period.  Perhaps a force
flag needs to be added?

Upon inserting the card a second time, i get:

WARNING: "fd" is usurping "fd"'s cdevsw[]
WARNING: "fd" is usurping "fd"'s bmaj

I suspect this is related to the XXX comment at the call to
cdevsw_add().  Does anybody know what the correct way is to cleanup
this?
2000-03-18 18:27:01 +00:00
Nick Hibma
bc51947397 The completely rewritten USB Mass Storage driver. It supports the following
devices:

Tested:
   Zip 100 USB drive
   Y-E Data USB floppy drive

Untested: (let me know whether or not it works!)
   TEAC USB floppy drive
   Zip 250 USB drive
2000-03-18 17:33:41 +00:00
Jeroen Ruigrok van der Werven
5d6f1468bb Document three debug options: npx, bus and vfs locks debugging. 2000-03-18 17:30:12 +00:00
Kazutaka YOKOTA
02572fd86e - `Newbus'ified the mse driver. 2000-03-18 15:43:13 +00:00
Kazutaka YOKOTA
8c219e162a - Fix bugs when painting border and the mouse cursor in the raster
text mode.
2000-03-18 15:28:48 +00:00
Kazutaka YOKOTA
3346e881c1 - Add Support for the following PS/2 mice:
- Microsoft IntelliMouse Explorer: 2 buttons on top, 2 side buttons
    and a wheel which also acts as the middle button.  The mouse is
    recognized as "IntelliMouse Explorer".
  - Genius NetScroll Optical: 2 buttons on top, 2 side buttons and a
    wheel which also acts as the middle button.  The mouse is recognized
    as "NetMouse/NetScroll Optical".
  - MouseSystems SmartScroll Mouse (OEM from Genius?): 3 buttons on top,
    1 side button and a wheel.  The mouse is recognized as Genius
    "NetScroll".
  - IBM ScrollPoint: 2 buttons on top and a stick between the buttons.
    The stick can perform "horizontal scroll" in W*ndows environment.
    The horizontal movement of the stick is detected.  It is currently
    mapped to the Z axis movement in the same way as the first wheel.
    The mouse is recognized as "MouseMan+", as it is considered to be
    a variation of MouseMan.
  - A4 Tech 4D and 4D+ mice. These mice have two wheels! The movement
    of the second wheel is reported as the Z axis movement in the
    same way as the first wheel. These mice are recognized as "4D
    Mouse" and "4D+ Mouse".
  - Tweak IntelliMouse support code a bit so that less-than-compatible
    wheel mice can work properly with the psm driver.
- Add driver configuration flags which correspond to the kernel
  options PSM_HOOKRESUME and PSM_RESETAFTERSUSPEND, so that we don't
  need to recompile the kernel when we need these functions.
- Properly keep track of the irq resource.
- Add a watchdog timer in case interrupts are lost (experimental).
- Add `detach' function (experimental).
2000-03-18 15:21:40 +00:00
Kazutaka YOKOTA
6f6fe825bd - `Newbus'ified the driver.
- Properly keep track of resources (I/O ports and irq).
- Use bus_space_read/write() to access the ports.
- Add PnP IDs.
- Add a watchdog timer in case interrupts are lost (experimental).
- Add `detach' function (experimental).
2000-03-18 15:13:30 +00:00
Nick Hibma
31bfa89e41 Get rid of the last remnants of powerhook abuse. 2000-03-18 14:54:54 +00:00
Bill Fenner
95b2b777b5 Make sure to free the socket in soabort() if the protocol couldn't
free it (this could happen if the protocol already freed its part
 and we just kept the socket around to make sure accept(2) didn't block)
2000-03-18 08:56:56 +00:00
Matt Jacob
a4135b96f1 Alpha 8200: redo files arrangement for 8200 support. There sort of
still *is* a problem about how to get an mcclock attached w/o an
ISA declaration though.
2000-03-18 08:05:27 +00:00
Matt Jacob
d06b99eb3f Alpha 8200: remove the SIMOS usage of zs_cnattach- we have a real
zs_cnattach now.
2000-03-18 08:04:23 +00:00
Matt Jacob
c7790ceee2 Alpha 8200: Redo console attachment to be more 'normal'. Make sure the
halt function *stays* halted.
2000-03-18 08:03:48 +00:00
Matt Jacob
d0366c9108 Alpha 8200: redo prom console code to be more up to date, etc. This
is now a functional PROM console (previously broken). Do the correct
promcnatach && CONS_DRIVER dance.
2000-03-18 08:02:35 +00:00
Matt Jacob
583759a807 Alpha 8200: add DEC_KN8AE (TurboLaser) platform option. 2000-03-18 08:01:34 +00:00
Matt Jacob
e562365e1e Alpha 8200: Add prototype from promcnattach. 2000-03-18 08:00:51 +00:00
Matt Jacob
6499b39e60 Alpha 8200: Add in a dummy child of dwlpx so that we can make the leap
from DWLPX to PCI space. Just a methods holder such that we have a parent
which is a "pcib" and we create a child which is a "pci". Add the appropriate
ivar code (which is for a hose #).
2000-03-18 08:00:13 +00:00
Matt Jacob
9ca20275e0 Alpha 8200: Do some compilation cleanup. Conditionalize some IDE stuff
based upon presence/absence of ISA (there is no ISA bus on an 8200- okay,
well, there *could* be one in a DWLPX tray, but we don't support it)).

Most importantly change the interrupt resource map to cover a whole 16
bits. The 8200 uses 16 bit interrupt vectors which we construct that
contain the I/O-board, hose, an pci slot in them, and then we write these
vectors into the appropriate DWLPX registers. At any rate, a flat array
of 64 'IRQs' isn't enough.
2000-03-18 07:57:58 +00:00
Matt Jacob
8ad895a6a9 Alpha 8200: Reinsert licence from NetBSD that should have been there
to begin with. Redo newbus attachment code so that all the DMA mapping
and further pci attachment is done right. Insert config space functions
(jeez- how do you do type 1 cycles?). Do the interrupt setups, etc.
Basically, this is the core I/O module for 8200s, even though logically
it's the 3rd level down from the nominal principle backplane bus
(turbolaser). Still to be done here: S/G code isn't done yet, so we
better live with 2GB or less primary memory.
2000-03-18 07:54:11 +00:00
Matt Jacob
c6c4384666 Alpha 8200: Remove clause 3 of licence. Clean up code slightly. 2000-03-18 07:50:58 +00:00
Matt Jacob
6beeb2a4cd Alpha 8200: Remove clause 3 of licence. Redo KFTXX bus attachment
code (merge in progress made in NetBSD since the initial import to
FreeBSD). Create dwlpx as the child device. Of course, if we had
more h/w and time, we could find out whether the child device was
a FutureBus module, etc...Anyone ever actually seen one?
2000-03-18 07:49:53 +00:00
Matt Jacob
3c87339922 Alpha 8200: Remove clause 3 of licence and and some KFTXX defines. 2000-03-18 07:48:15 +00:00
Matt Jacob
9132772537 Alpha 8200: minor formatting tweaks; removal of clause 3 of licence. 2000-03-18 07:46:34 +00:00
Matt Jacob
eaef8d3ef1 Alpha 8200: Rework to get working properly with real h/w. This isn't a
clean MI/MD driver, but it *does* actually work at this time. Updated
to use new make_dev stuff. A CONS_DRIVER declaration is also put in
so that this can be the real console for the 8200s.
2000-03-18 07:46:05 +00:00
Matt Jacob
cf80414e14 Alpha 8200: Ooops on last delta- real changes include redoing bus attachment
code and interrupt mapping code.
2000-03-18 07:44:18 +00:00
Matt Jacob
db50341ca1 Alpha 8200: Some minor formatting tweaks and removal of clause 3 of licence. 2000-03-18 07:42:13 +00:00
Matt Jacob
34a2da7f9a Alpha 8200: add a dummy driver for TLSB CPU nodes. Not so dummy, actually,
as you have to hook a GBus into it.
2000-03-18 07:40:17 +00:00
Matt Jacob
23959069d6 Alpha 8200: Add in variables and defines for DWLPX PCI controllers. 2000-03-18 07:30:06 +00:00
Matt Jacob
67795722e9 Alpha8200: Update this stub memory board driver for using newbus. 2000-03-18 07:28:27 +00:00
Robert Watson
8ed3828c3b Introduce a new bd_seesent flag to the BPF descriptor, indicating whether or
not the current BPF device should report locally generated packets or not.
This allows sniffing applications to see only packets that are not generated
locally, which can be useful for debugging bridging problems, or other
situations where MAC addresses are not sufficient to identify locally
sourced packets.  Default to true for this flag, so as to provide existing
behavior by default.

Introduce two new ioctls, BIOCGSEESENT and BIOCSSEESENT, which may be used
to manipulate this flag from userland, given appropriate privilege.

Modify bpf.4 to document these two new ioctl arguments.

Reviewed by:	asmodai
2000-03-18 06:30:42 +00:00
Mike Smith
da8bb3a3bf Update to the latest development version of the Mylex driver. Changes in
this version include:

 - Support for version 2.x firmware (2.42 or later recommended).  This
   means we are the only open-source driver supporting these adapters.
   This code has only been tested on a Digital KZPCA adapter in an Alpha
   system, but is believed to be correct.  NOTE: EISA adapters are not
   yet supported.

 - Support the BIOS/Firmware initialisation handshake protocol.  This
   allows the driver to bring the card up to operational state even if
   the BIOS can't be run (eg. if it's an x86 BIOS in an Alpha system).

 - A working command pasthrough interface.  This allows a user-space
   configuration tool (under development) to issue arbitrary commands
   to the controller or to devices in the system.
2000-03-18 02:01:37 +00:00
Bill Paul
726fcd3955 Add another device/vendor code combination to support yet another
KLSI-based device (Skymaster DHU-0404).
2000-03-18 01:36:37 +00:00
Bill Paul
827a61b63d Update Tigon firmware yet again, this time to version 12.3.20. 2000-03-18 01:30:36 +00:00
Chris Costello
b081a64afb In vn_isdisk(), check whether vp->v_rdev is NULL. If it is, then
return ENXIO (Device not configured).  Without this, vn_isdisk()
could (and did in the case of lstat() under fdesc) pass a NULL pointer
to devsw(), which caused a page fault.

Reviewed by:	alfred
2000-03-18 01:27:44 +00:00
Poul-Henning Kamp
63909a9015 Newer ciscos have become more picky, and will not accept the MULTICAST bit
being set for unicast packets.
2000-03-17 17:06:33 +00:00
Yoshihiro Takahashi
1bb26f3a43 Fixed header file path and added necessary file. 2000-03-17 12:56:23 +00:00
Yoshihiro Takahashi
b0198bb46f Sync with sys/boot/i386/libi386/biosdisk.c revision 1.27 and 1.28.
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
2000-03-17 12:38:36 +00:00
Yoshihiro Takahashi
05f94cca19 Sync with sys/i386/i386/userconfig.c revision 1.175 and 1.176. 2000-03-17 12:24:59 +00:00
Yoshihiro Takahashi
54bfac8fdc Backed out ppc0 flags addtion. It isn't necessary without PPC_PROBE_CHIPSET
option.

Pointed out by:	peter
2000-03-17 11:37:03 +00:00
Kirk McKusick
584508a741 Use 64-bit math to calculate if we have hit our freespace limit.
Necessary for coherent results on filesystems bigger than 0.5Tb.
2000-03-17 03:44:47 +00:00
Yoshihiro Takahashi
2b60363d7f Fixed to probe extended memory for over 256M or under 64M.
Submitted by:   chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-16 12:14:00 +00:00
Yoshihiro Takahashi
49c57093b7 Changed key assign for PC-98.
shift+TAB  : BackTab
HELP       : End
STOP       : ScrollLock
shift+STOP : ScreenSaver
GRPH +STOP : Suspend(susp)
COPY       : NextScreen(nscr)
ctrl +COPY : Debug
NFER       : Meta

Submitted by:   chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-16 12:10:43 +00:00
Yoshihiro Takahashi
a97d495cb9 Fixed to support old parallel interface.
Submitted by:   chi@bd.mbn.or.jp (Chiharu Shibata)
2000-03-16 12:06:29 +00:00
Yoshihiro Takahashi
13b6f8f604 Added 'flags 0x40' to ppc0. 2000-03-16 12:03:36 +00:00
Yoshihiro Takahashi
1a9a318055 Changed sio1 flags to 0x12000010 to enable serial console.
Submitted by:   IMAI Takeshi <take-i@ceres.dti.ne.jp>
2000-03-16 11:53:16 +00:00
Nick Hibma
846664235c Instead of using the next unit available, use the first unit available.
This avoids the unit number from going up indefinitely when
diconnecting and connecting 2 devices alternately.

Noticed by: nsayer (quite a while ago)

And stop calling DEVICE_NOMATCH at probe repeatedly. This stops the
message on the PCI VGA board from being printed when loading a PCI driver.
2000-03-16 09:32:59 +00:00
Nick Hibma
e2dbd15f2e Please welcome the URio driver. Written by
Iwasa Kazmi <kzmi\@ca2.so-net.ne.jp>
2000-03-16 09:16:14 +00:00
Poul-Henning Kamp
db5f635acc Eliminate the undocumented, experimental, non-delivering and highly
dangerous MAX_PERF option.
2000-03-16 08:51:55 +00:00
Jason Evans
5968536749 Add the _POSIX_SEMAPHORES feature flag. 2000-03-16 02:26:00 +00:00
Matt Jacob
17d75f8ecb Alpha 8200 port: Until we fix things better, determine which alpha CPU
platform we're running on so we know how many bits to reserve at the top
end for the 'hose' value. It turns out that there's *just* enough room
to support all possible hoses on TurboLaser.
Reviewed by:	gallatin@freebsd.org, dfr@free3bsd.org
2000-03-15 23:50:31 +00:00
Nick Hibma
e96441b1ee Add a quirk entry for Y-E Data USB floppy drive.
Driver follows in the next few days.
2000-03-15 22:44:03 +00:00
Nick Hibma
e557a32190 Add the TD's to the hash when they are created not when they are used.
This makes it possible to handle the done queue even when the end of tail
TD has ended up on the done queue as well (the xfer in this case is NULL
but the next field is valid, so we simply skip that element.

Make sure we mark all the handled transfers as handled.

Stop using powerhooks. They are a NetBSD-ism.
2000-03-15 22:27:24 +00:00
Nick Hibma
d0ba6675ce Add an ID for the SiS 5571.
Remove the unnecessary use of parent.
2000-03-15 22:26:17 +00:00
Nick Hibma
330dc9152d powerhooks no longer used 2000-03-15 22:15:21 +00:00
Nick Hibma
49d89e0791 Make the makefile work properly. 2000-03-15 22:13:50 +00:00
Nick Hibma
8be178756c Do not use the powerhooks at all, instead of abusing and empty #define. 2000-03-15 22:12:47 +00:00
Nick Hibma
efb572af98 Spelling mistake 2000-03-15 22:11:00 +00:00
Nick Hibma
799c4480f9 Never stop the control pipe 2000-03-15 22:09:53 +00:00
Nick Hibma
fa55e6183a Add urio (143) 2000-03-15 22:06:01 +00:00
Nick Hibma
bf20c30848 Regen. 2000-03-15 22:04:01 +00:00
Peter Wemm
8af444f84f Remove stray pointers to wdc; it was removed a while back. 2000-03-15 21:58:58 +00:00
Peter Wemm
931fe729ca Remove left over pci_ide* after wd removal. 2000-03-15 21:58:27 +00:00
Nick Hibma
0cdabce076 Various typo's.
One minor nit. The speed was displayed wrong when below 1Mb/s.
2000-03-15 21:55:48 +00:00
Peter Wemm
645e837fbe Remove left over files from wd; Since pc98 still uses some of them those
were copied.  Some cleanup is still needed there, ie: unifdef -DPC98 etc.
2000-03-15 21:55:43 +00:00
Peter Wemm
2a72e5e1c1 Move the files.* references to wdc files to the pc98 location after the
repo copy.
2000-03-15 21:53:12 +00:00
Nick Hibma
c7c6f59635 Add Y-E Data floppy drive. 2000-03-15 21:53:09 +00:00
Nick Hibma
14a069312d Update the e-mail address to a valid one. 2000-03-15 21:50:41 +00:00
Mike Smith
0cb0254b78 Trim a couple of over-long strings
Submitted by:	des
2000-03-15 21:24:40 +00:00
Matt Jacob
0b69cead4d roll platform versions to 5.0 2000-03-15 18:49:44 +00:00
John Baldwin
7be31bb1b2 Remove some extra spammage that made it into this commit. This will be
revisited later with a better fix, or at least one that compiles. :)

Approved by:	dcs
2000-03-15 16:36:55 +00:00
Kirk McKusick
15e549f668 Bug fixes for currently harmless bugs that could rise to bite
the unwary if the code were called in slightly different ways.

1) In ufs_bmaparray() the code for calculating 'runb' will stop one block
short of the first entry in an indirect block. i.e. if an indirect block
contains N block numbers b[0]..b[N-1] then the code will never check if
b[0] and b[1] are sequential. For reference, compare with the equivalent
code that deals with direct blocks.

2) In ufs_lookup() there is an off-by-one error in the test that checks
if dp->i_diroff is outside the range of the the current directory size.
This is completely harmless, since the following while-loop condition
'dp->i_offset < endsearch' is never met, so the code immediately
does a second pass starting at dp->i_offset = 0.

3) Again in ufs_lookup(), the condition in a sanity check is wrong
for directories that are longer than one block. This bug means that
the sanity check is only effective for small directories.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-03-15 07:18:15 +00:00
Kirk McKusick
9f043878d0 Use 64-bit math to decide if optimization needs to be changed.
Necessary for coherent results on filesystems bigger than 0.5Tb.

Submitted by:	Paul Saab <ps@yahoo-inc.com>
2000-03-15 07:08:36 +00:00
Brian Feldman
3841bf81f7 I _HATE_ crashes. The lptread() call needs to check LP_BYPASS, because
if one tries to use read() on an LP_BYPASS'd dev_t, the softc will be
initialized mainly with NULLs, so...
2000-03-15 03:23:04 +00:00
Daniel C. Sobral
7b12e51659 Pass an unit number to bcache_strategy, so it can flush the cache when
necessary. Pass an absolute block number too, instead of receiving a
relative one in realstrategy(), as bcache_strategy() requires this.

The fix is sligthly different from the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:58:45 +00:00
Daniel C. Sobral
a5686d2f66 bcache_strategy() now receives an unit number, and keep track of what
was the last unit number received. If it changes, it flushes the cache.
Add bcache_flash().

The actual fix is sligthly different from the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:56:12 +00:00
Daniel C. Sobral
fbc9fa5059 Pass unit number to bcache_strategy(), so that the cache can be
flushed if the unit changes. Compute the absolute offset before
bcache_strategy() instead of after.

The actual fix is sligthly different for the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:53:34 +00:00
Archie Cobbs
c64c1c76b4 Have MGETHDR() always initialize m->m_pkthdr.rcvif to NULL.
In the past, not doing this has caused several hard to find
networking bugs, and the minor slowdown is deemed worthwhile.

Reviewed by:	wollman
2000-03-14 20:49:27 +00:00
Jeroen Ruigrok van der Werven
5949020620 Remove further vestiges of wd.
Submitted by:	sos
2000-03-14 17:21:17 +00:00
Jeroen Ruigrok van der Werven
4a447c7023 Get rid of wdc.
Submitted by:	Damieon Stark <visigoth@telemere.net>
2000-03-14 17:01:03 +00:00
Søren Schmidt
000da71aa4 Fix the spelling, and some minor tweaks on the ata device... 2000-03-14 16:47:59 +00:00
Jun Kuriyama
dc76063419 Print "previous type" correctly when INVARIANTS is defined.
Reviewed by:	current@FreeBSD.org
2000-03-14 14:58:04 +00:00
Bruce Evans
05ecdd7037 Don't try so hard to make the lower 16 bits of fsids unique. It tended
to recycle full fsids after only 16 mount/unmount's.  This is probably
too often for exported fsids.  Now we recycle the full fsids only
after 2^16 mount/ umount's and only ensure uniqueness in the lower 16
bits if there have been <= 256 calls to vfs_getnewfsid() since the
system started.
2000-03-14 14:19:49 +00:00
Ruslan Ermilov
d137714f11 Fix reporting of src and dst IP addresses for ICMP and generic IP packets.
PR:		17319
Submitted by:	Mike Heffner <spock@techfour.net>
2000-03-14 14:11:53 +00:00
Jeroen Ruigrok van der Werven
612a914d90 Remove wd entries.
Reviewed by:	sos
Approved by:	sos, phk, peter
2000-03-14 13:23:10 +00:00
Jeroen Ruigrok van der Werven
b2381471b9 Remove the wd driver from the i386 kernel options. 2000-03-14 13:18:14 +00:00
Jeroen Ruigrok van der Werven
844a81a990 Remove unused options.
Reviewed by:	sos
Approved by:	sos, phk, peter
2000-03-14 12:55:23 +00:00
Brian S. Dean
56fc73ff9b In 'ipcperm()', only call 'suser()' if it is actually required.
Previously, it was being called whether it was needed or not and the
ASU flag was being set (as a side affect of calling 'suser()') in
cases where superuser privileges were not actually needed.  This was
all pointed out to me by Bruce Evans.

Reviewed by:	bde
2000-03-13 23:00:08 +00:00
Archie Cobbs
a7dc837919 - Document updates in iface netgraph node type functionality
- Remove makefile hacks for opt_inet.h, etc: the KLD now supports
  whatever address families your kernel was compiled with automagically
2000-03-13 19:19:48 +00:00
Archie Cobbs
15ba31b9ad Updates to the ng_iface(8) netgraph node type:
- Make iface nodes removable on shutdown since FreeBSD now supports
    removable interfaces
  - Simplify supporting new protocols using family_enqueue(); add a
    few new ones including IPv6
  - Add support for configurable interface mode using new
    NGM_IFACE_POINT2POINT and NGM_IFACE_BROADCAST control messages
  - Remove NGM_IFACE_GET_IFADDRS control message; it just duplicates
    the functionality of SIOCGIFCONF
2000-03-13 19:18:10 +00:00
Archie Cobbs
9a9a26fd5a Some minor prototype tweaks. 2000-03-13 19:05:11 +00:00
Archie Cobbs
af207f2160 Use snprintf() instead of sprintf(). 2000-03-13 18:54:10 +00:00
Archie Cobbs
c1b9e5f25b Fix typo: "ng_parse_fixedsstring_info" -> "ng_parse_fixedstring_info" 2000-03-13 18:50:38 +00:00
Bill Fumerola
1df05fbeab Welcome to 5.0-CURRENT. (__FreeBSD_version = 500000)
Approved by:	jkh, phk
2000-03-13 18:44:36 +00:00
Archie Cobbs
ef02c1e500 Fix typo.
Reported by:	Robert Swindells <swindellsr@genrad.co.uk>
2000-03-13 18:29:58 +00:00
Matt Jacob
6ca3a52f59 Don't do bus resets for ULTRA2 or later cards because what seems to
happen currently is that several commands issued *after* the bus reset are
then reported destroyed.
2000-03-13 16:30:00 +00:00
Bruce Evans
03e4dc0805 Fixed a spelling error that disabled the rc driver. 2000-03-13 15:29:47 +00:00
Nick Sayer
c36837a8d8 Fix some style bugs. The long line is in a chunk of code that's
being rewritten, though.

Submitted by:	bde
2000-03-13 15:27:19 +00:00
Bruce Evans
311b554beb Disabled the optimization of not doing an invltlb_1pg() when changing
pte's from zero.  The TLB is supposed to be invalidated when pte's are
changed _to_ zero, but this doesn't occur in all cases for global pages
(PG_G stops invltlb() from working, and invltlb_1pg() is not used
enough).

PR:		14141, 16568
Submitted by:	dillon
2000-03-13 14:47:46 +00:00
Matthew N. Dodd
01f1828bbb Add 'bootverbose' debug messages to assist with tracking down problems
some users have encountered.
2000-03-13 12:27:21 +00:00
Søren Schmidt
0d611a6c29 Cleanup sweep. 2000-03-13 12:27:11 +00:00
Matthew N. Dodd
c7a9e0529c Initial ifmedia support. Once I figure out autoselection I'll put the
rest of the code in (so changing media actually works.)

Add a few more register definitions for use with this and other new code.

Print a few details in the probe message; this should be useful in
bug reports and such but should not add to the clutter.
2000-03-13 12:23:32 +00:00
Søren Schmidt
cfb21bbb7d Enable disksort the right way both on ATA disks and ATAPI devices. 2000-03-13 12:04:58 +00:00
Matthew N. Dodd
958795f321 Copy how everyone else is doing packet transmission. (NetBSD mostly)
I've been running this for a month or so and have had no problems with it
and if I recall it was my last speed tweak.  Holler if this breaks anything.
2000-03-13 11:59:21 +00:00
Matthew N. Dodd
6629a1f812 Follow the docs a bit more in epstop() with respect to delays.
Trivial formatting.
2000-03-13 11:55:09 +00:00
Matthew N. Dodd
4a18218d69 Get rid of table lookup in favor of just subtracting. Everyone else
does it like this and I see no point in being different.
2000-03-13 11:51:44 +00:00
Matthew N. Dodd
d718250d48 Call epstop() in ep_attach(). While this shouldn't be necessary we'll
do it just in case.  (Actually, with PCMCIA cards we can get in a state
where it may be required.)
2000-03-13 11:48:03 +00:00
Matthew N. Dodd
4fa28dd1c6 Set the RF_SHAREABLE flage when we allocate an IRQ. 2000-03-13 11:43:53 +00:00
Ruslan Ermilov
ef61e9f97d Remove option MD5, it has been standardized almost two years ago. 2000-03-13 11:37:43 +00:00
Poul-Henning Kamp
4108e7b995 Remove #ifdef UVM stuff which will never be relevant. 2000-03-13 11:12:30 +00:00
Poul-Henning Kamp
7de472559c Remove unused 3rd argument from vsunlock() which abused B_WRITE. 2000-03-13 10:47:24 +00:00
Poul-Henning Kamp
d8b47cbb70 Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.
Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.
2000-03-13 10:19:32 +00:00
Yoshinobu Inoue
3f30603cfb Backout the previous change to __KAME_VERSION (FreeBSD4.x addition),
because this is now 5.0-current.
2000-03-13 10:07:30 +00:00
Warner Losh
02c988c53e Add another Linksys OUI.
PR:		16922
Submitted by:	takawata@shidahara1.planet.sci.kobe-u.ac.jp
2000-03-13 09:42:09 +00:00
Poul-Henning Kamp
5111e26e96 Updates for new FALC chips and other nits.
(And try to make it first post-freeze commit :-)
2000-03-13 09:13:36 +00:00
Jordan K. Hubbard
420e39abee Welcome to 5.0-current!
"First commit" claimed by:	jkh :)
2000-03-13 09:13:01 +00:00
Søren Schmidt
8048917432 Backout the previous fix, it is _not_ that easy too fix.
Leave it as is for 4.0 the real solution comes later.
2000-03-13 09:10:25 +00:00
Duncan Barclay
4ba3ca53cb * add the start_join_net - done
*	i needed it anyway
 * remove startccs and startcmd - done
 *	as those were used for the NetBSD start timeout
 * multicast - done but UNTESTED
 *	I don't have the ability/facilty to test this
 * rxlevel - done
 *	stats reported via raycontrol
 * getparams ioctl - done
 *	reported via raycontrol
 * start_join_done needs a restart in download_done - done
 *	now use netbsd style start up

removed spare timerh

implemented start_assoc in ray_ccs_done

bit more knfing
2000-03-12 22:54:29 +00:00
Duncan Barclay
2143635f71 structure for error counters added 2000-03-12 22:52:00 +00:00
Duncan Barclay
aadc434b25 Use ssid length from 80211.h
moved and extended ioctl's

added string and size definitions for raycontrol
2000-03-12 22:51:33 +00:00
Yoshinobu Inoue
eb7006c008 Change __KAME_VERSION value. Added the word "FreeBSD4.x" to identify the
system with other platform and/or other version of FreeBSD, which is also
integrated KAME code based on another date.

Approved by: jkh
2000-03-12 20:27:26 +00:00
Bruce Evans
61214975da Try harder to make the lower 16 bits of fsids unique. The vfs type
number was packed very wastefully, giving perfect non-uniqeness in
the lower 16 bits of fsids for filesystems with the same vfs type.
This made linux_stat() return perfectly non-unique (broken) 16-bit
st_dev's for nfs mount points, and effectively reduced mntid_base to
8 bits so that the vfs_getnewfsid() looped endlessly when there are
already 256 mounted filesystems with the required vfs type.

Approved by:	jkh
2000-03-12 14:23:21 +00:00
Søren Schmidt
4c435787ab Dont call ad_start unless the controller is idle.
This effectively nullified the usefullness of disksort().
2000-03-12 13:56:05 +00:00
KATO Takenori
5a9a82e820 Merged from sys/isa/sio.c revision 1.291. 2000-03-12 13:14:51 +00:00
Greg Lehey
b6c7afd32c sdio: If sd I/O fails because of an I/O error, set the sd state
correctly.

Reported-by:	phk
Approved-by:	jkh
2000-03-12 05:05:41 +00:00
Chris Piazza
4951dddb33 Recognize newer NVidia graphics cards. (GeForce and Quadro families)
Approved by:	jkh
2000-03-12 01:24:15 +00:00
Yoshinobu Inoue
820b57927e Disable IPv4 over IPv4 tunnel on the 6to4 interface for better security.
Approved by: jkh
2000-03-11 22:11:57 +00:00
Yoshinobu Inoue
dd251c3820 Forbid include of netinet6/ip6.h from user-land, and if included,
print an error message which say, "include netinet/ip6.h".
This is postponed to apply to avoid tcpdump compile error.
Now apply this because tcpdump has been already fixed.

Approved by: jkh

Obtained from: KAME project
2000-03-11 20:44:53 +00:00
Warner Losh
633f93bee5 Fix crashes on card eject for pccard modems. We check for NULL when
we get the com address.  If so, we go ahead and return.  Bruce thinks
there's a bug in the pccard layer that it terminates devices with
extreme prejustice rather than letting them deside for themselves when
to terminate (and he's likely right).  This fix doesn't change that,
but instead works around it by checking for NULL pointers at more
places than before.

The detach routine still calls functions at interrupt level that
aren't reentrant.  In theory this could cause a problem, but none
showed up in practice.  Future versions should correct this problem,
likely by making the detach process a thread/process at the pccard
level.  NEWCARD will do this, and the current pccard layer should
likely be modified to that as well, should it live long enough.

A few style nits of the same form that were in my original patch sent
off to bde were also fixed as part of this process.  Mostly use of
!ptr and return ENOPARENS.

This should prevent a crash on suspend with an active ppp link as
well, but that wasn't tested.

Reviewed by:	bde
Approved by:	jkh
2000-03-11 20:22:09 +00:00
Yoshinobu Inoue
8fca8c97c6 Replace m_pkthdr.rcvif with oif when oif is not NULL, to count
icmp6 error statistics based on sending interface.
This also prevent kernel panic when rcvif is not initialized after M_PKTHDR().
(The initialization issue also need to be fixed in the future.)

Approved by: jkh

Submitted by: k-sugyou@kame.net
2000-03-11 20:03:22 +00:00
Yoshinobu Inoue
19a938aa3d Fix sockaddr_storage related macro definition, as ss_family member type change.
(Currently, no effect but for future portability)

Approved by: jkh

Reviewed by: bde
2000-03-11 19:51:04 +00:00
Duncan Barclay
0f5987ecaf Remove old hand crafted version of start_join_net for download. 2000-03-11 13:34:13 +00:00
Duncan Barclay
ec1be5631b Start to use ray_start_join_net (my old code removed on next checkin)
requires current and desired network parameters, so I have created a network parameter structure and used two on them in the softc. This gives a bit of room of expansion. Re-wrote the update check in _net to work with this.

Tidyed up softc due to above.

Removed startccs and startcmd as they were only used by NetBSDs startup timeout.
2000-03-11 13:25:33 +00:00
Yoshinobu Inoue
4739b8076f IPv6 6to4 support.
Now most big problem of IPv6 is getting IPv6 address
   assignment.
   6to4 solve the problem. 6to4 addr is defined like below,

          2002: 4byte v4 addr : 2byte SLA ID : 8byte interface ID

   The most important point of the address format is that an IPv4 addr
   is embeded in it. So any user who has IPv4 addr can get IPv6 address
   block with 2byte subnet space. Also, the IPv4 addr is used for
   semi-automatic IPv6 over IPv4 tunneling.

   With 6to4, getting IPv6 addr become dramatically easy.
   The attached patch enable 6to4 extension, and confirmed to work,
   between "Richard Seaman, Jr." <dick@tar.com> and me.

Approved by: jkh

Reviewed by: itojun
2000-03-11 11:17:24 +00:00
Kazutaka YOKOTA
a68d00e3fe One more patch for the atkbd driver. It will make sure that the
keyboard port and interrupt is enabled and the driver is attached even
when the keyboard itself is not present when the system is booting.
(This has been the behavior through out 2.X and 3.X, but is somehow
broken in 4.0.)

# I certainly don't recommend people to `hot-plug' the AT keyboard,
# because the interface isn't designed for hot-plugging and such act
# will often break the keyboard controller.  But, so many people want to
# do that anyway...

Approved by: jkh
2000-03-11 07:44:10 +00:00
Mike Smith
510a809e64 Teach the 'dc' driver how to pick up settings left over by the
SRM on alpha systems.  This is an expedient if not entirely
elegant solution to the problem.

Submitted by:	gallatin
Approved by:	jkh
2000-03-11 05:20:56 +00:00
Robert Watson
76ec7b2f60 The function arpintr() incorrectly checks m->m_len to detect incomplete
ARP packets. This can incorrectly reject complete frames since the frame
could be stored in more than one mbuf.

The following patches fix the length comparisson, and add several
diagnostic log messages to the interrupt handler for out-of-the-norm ARP
packets. This should make ARP problems easier to detect, diagnose and
fix.

Submitted by:	C. Stephen Gunn <csg@waterspout.com>
Approved by:	jkh
Reviewed by:	rwatson
2000-03-11 00:24:29 +00:00
Søren Schmidt
924f6734a5 Cosmetics.. 2000-03-10 22:10:34 +00:00
Archie Cobbs
8081ce2ea7 Correct man page title. 2000-03-10 20:38:24 +00:00
Martin Cracauer
0c14a6606b Change the default FPU control word so that exceptions for new
processes are now masked until set by fpsetmask(3).

Submitted by:	bde
Approved by:	jkh, bde
2000-03-10 17:56:33 +00:00
KATO Takenori
e299a9db22 Merged from sys/isa/sio.c revisions 1.289 and 1.290. 2000-03-10 10:34:36 +00:00
Alan Cox
af25d10c91 shmat: If VM_PROT_READ_IS_EXEC is defined and prot includes VM_PROT_READ,
VM_PROT_EXECUTE must be added to prot before calling vm_map_find.

Without this change, an mprotect on a shmat'ed region fails (when
it shouldn't).  This bug was reported Feb 28 by Brooks Davis
<brooks@one-eyed-alien.net> on -hackers.

Reviewed by:	bde
Approved by:	jkh
2000-03-10 09:11:24 +00:00
Søren Schmidt
643b70ec9d Dont call make_dev until we are sure the device is there, this prevents
panic'ing when the device is tried accessed later.
2000-03-10 08:09:53 +00:00
Warner Losh
595166f0f7 Add support for PnP ISA cards, and some laptop PnP support:
o break out some of the probe routine the allocation of resources
  into an attach routine
o Recognize PnP ids
o Allocate IRQ per card rather than per system
o Better polling reporting
o Remove unneeded include files in slot.h
o store a pseudo unit number on each device we find.
o Pass a unit number to interrupt/timeout routine and use it for polling
  the hardware.

Tested on: My VAIO and with the Linksys pccard reader.
Approved by: jkh
2000-03-10 05:43:29 +00:00
Warner Losh
8663154bbc Correct PnP ids for pcic-like cards.
Approved by: jkh
2000-03-10 05:26:32 +00:00
Duncan Barclay
5a5368a86c Use the ccs update command mechanism for dowloading parameters on startup 2000-03-09 21:34:47 +00:00
Hellmuth Michaelis
17df19190a Fix a problem which caused i/o resource allocation conflict of this
particular ISDN card with the 2nd IDE controller and/or other cards
depending on configuration.

The amount of i/o ports allocated are reduced from 0x40 per range to
0x20 per range.

Submitted by:	Andrew Gordon <arg@arg1.demon.co.uk>
Approved by:	jkh
2000-03-09 20:57:47 +00:00
Robert Watson
c8cf61e182 Introduce ethernet bridge support for if_dc
Approved by:	jkh
2000-03-09 19:28:19 +00:00
Matthew Dillon
b39d4d2060 In the 'found' case for ufs_lookup() the underlying bp's data was
being accessed after the bp had been releaed.  A simple move of the
    brelse() solves the problem.

Approved by: jkh
Submitted by:  Ian Dowse <iedowse@maths.tcd.ie>
2000-03-09 18:54:59 +00:00
Marcel Moolenaar
3c1124cfdf Fix bug in linux_wait4 and linux_waitpid where garbage in the status
argument could panic the kernel.

Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Prompted by: jkh, gallatin
Approved by: prompters
2000-03-09 17:52:01 +00:00
Masahide MAEKAWA
c62c0f3f76 Add vendor/device ID for Corega FEther USB-TX.
Submitted by:	iwasaki
Approved by:	jkh
2000-03-09 16:35:21 +00:00
Jonathan Lemon
5e3488e373 Add Compaq `ida' driver to GENERIC, update it's LINT entry.
Approved by:	jordan
2000-03-09 16:32:56 +00:00
Masahide MAEKAWA
45c784a50b Regen. 2000-03-09 16:29:49 +00:00
Masahide MAEKAWA
ceb48d11a3 Add Corega FEther USB-TX.
Submitted by:	iwasaki
Approved by:	jkh
2000-03-09 16:28:58 +00:00
Yoshinobu Inoue
8692c02553 Enable SCM_RIGHTS on alpha. Allocate necessary buffer as conversion between
int and struct file *.

Approved by: jkh

Submitted by: brian
Reviewed by: bde, brian, peter
2000-03-09 15:15:27 +00:00
Nick Sayer
9deb82d478 Implement Linux BLKGETSIZE ioctl, and open the door to implementing
other BLK.* ioctls should the desire arize.

Approved by:	jkh (via dufault)
2000-03-09 15:14:14 +00:00
Yoshinobu Inoue
f63e7634ac Initialize mbuf pointer at getting ipsec policy.
Without this, kernel will panic at getsockopt() of IPSEC_POLICY.
Also make compilable libipsec/test-policy.c which tries getsockopt() of
IPSEC_POLICY.

Approved by: jkh

Submitted by: sakane@kame.net
2000-03-09 14:57:16 +00:00
Yoshinobu Inoue
690a43db7e Update icmp node info query message bit order of query types,
according to draft-ietf-ipngwg-icmp-name-lookups-04 to 05 change.
This is necessary before 4.0, because,
  -This change is non backword compatible
  -Other KAME derived platforms applied 05
  -Author of the draft said he never do backword imcompatible changes
   again.

Approved by: jkh

Obtained from: KAME project
2000-03-09 14:47:21 +00:00
Bruce Evans
a4fcac54a1 Fixed a null pointer panic for dumpon(8) on a nonexistent device whose
driver uses the new disk layer.

Reviewed by:	phk
Approved by:	jkh
2000-03-09 12:40:41 +00:00
Bruce Evans
d1a417f17e Don't forget to check for unsupported features when updating. It was
possible to defeat the check for rw incompatibilty by mounting ro and
updating to rw.

Approved by:	jkh
2000-03-09 05:21:10 +00:00
Seigo Tanimura
ca6da1de5e Add the logical ID of Avance Logic ALS100. The vendor ID is also
checked, which was introduced in 1.18.

PR:		kern/16487
Submitted by:	Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
Approved by:	jkh
2000-03-09 02:13:21 +00:00
Mike Smith
99f0866f12 Remove the PCI device class and all the PCI-only devices. With the newbus
conversion this no longer works, and userconfig is not expected to ever
again be used for these devices.

Approved by:	jkh
2000-03-09 01:27:55 +00:00
Duncan Barclay
d9c7d1a456 Mega additions of NetBSD code - most of the NetBSD code is now in here, if
not actually used yet. This created a lot of prototypes.

I moved code around so that the functions are in the same order as NetBSD - this helps diff a lot.

Things that are missing are the TX routine and ifmedia stuff and ioctls

Not all of the stuff is enabled - we are missing calls in ccs_done and ioctl.

Promiscious mode is working.

Am almost ready to use the NetBSD start up routine - essentially all I need
to do is not use a seperate timer to call download_timo.

Other misc. things:
	callout_stop is a newish feature for cancelling a timer without
	argument checking it.

	tried to add a sysctl knob but it doesn't work in the module

	enabled infrastructure code to call netbsd bits.
2000-03-08 23:28:06 +00:00
Jonathan Lemon
e7e1e770ed Cosmetic fix: "id" -> "idad" for devstat.
Missed in prior (approved) commit by: jlemon
2000-03-08 21:10:15 +00:00
Jonathan Lemon
a17e9eac9c Changes for IDA driver 2000-03-08 16:17:06 +00:00
Jonathan Lemon
ee7eb00e05 Add support for older EISA compaq cards and newer Smart 4200 cards.
Change disk names to `idad' to avoid naming conflicts with the controller,
and enable the new disk code to pick up the drives.

Tested by:  	david.w.james@bt.com  (existing compaq support)
Reviewed by:	msmith
Approved by:	jordan
2000-03-08 16:16:31 +00:00
Duncan Barclay
6cc8b85b99 Fix cock up with test on start address.
This code sent out to alpha testers.
2000-03-08 08:53:36 +00:00
Nik Clayton
9e54a8cebb Document the discard device appearing as 'ds0', 'ds1', etc.
PR:             docs/16994
Submitted by:   Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-03-07 13:56:37 +00:00
Duncan Barclay
bd0f7bd72d Added reset code and converted many panics into call to reset.
Finished ray_stop and ray_unload.

A little more macro tidying.
2000-03-05 22:24:30 +00:00
Duncan Barclay
1942c15d8e Minor tidy up. 2000-03-05 22:04:09 +00:00
Søren Schmidt
aaa29cf209 Fix the CD driver so that the last blocks can be read even if
a blocksize != 2k is used.
Update the timeout code to try fallback to PIO if problems
arise in DMA mode.
2000-03-05 16:52:26 +00:00
Cameron Grant
1a7d73a130 Partial fix: the following patch correctly configures the card for dual
channel DMA. The problem was that the SDC bit (0x04) can only be set in
the MCE state.

PR:		kern/16587
Submitted by:	Matthew Reimer <mreimer@vpop.net>
Approved by:	jkh (in person)
2000-03-05 15:51:09 +00:00
Peter Wemm
d365f16644 Recognize another modem, "PMC2430 - Pace 56 Voice Internal Modem"
Submitted by:	Mark Ovens <mark@ukug.uk.freebsd.org>
2000-03-05 14:44:05 +00:00
Duncan Barclay
ca0f567e91 Moved a lot of my inline comments to head of code and documented
card configuration hassles.

Added a TODO list so I don't forget to finish stuff.

Tidyed up a lot of XXX.

Tidy'd and documented debugging - all DPRINTF have a debug level associated.
RAY_DEBUG = 1, will log packet errors.

#if protect common memory hacking

Don't rely on pccardd for common memory settings.

Added a simple transmit mode - reasonable performance but not great. Will do a version of the NetBSD chained buffers soon. Yup we have two way transmisson!

Fix a stupid bug in the common memory code - the ioctl call was
hidden behind a debug test!
2000-03-05 14:39:23 +00:00
Duncan Barclay
c74a1b1d16 Tidy up.
Add TX tib structure.
2000-03-05 14:29:29 +00:00
Duncan Barclay
e6ae459351 Mostly notes and minor style changes whilst I was travelling. 2000-03-03 17:07:42 +00:00
Yoshinobu Inoue
7d0d8dc306 CMSG_XXX macros alignment fixes to follow RFC2292.
Approved by: jkh

Submitted by: Partly from tech@openbsd
Reviewed by: itojun
2000-03-03 11:13:12 +00:00
Bruce Evans
fc47f29c64 MFS (ext2_lookup.c 1.17.2.2, ext2_vnops.c 1.42.2.2: fix "filetype" support).
Approved by:	jkh
2000-03-03 08:00:27 +00:00
Peter Dufault
6d9a8d3e8f I applied the wrong patch set. Back out anything associated
with the known bogus currtpriority.  This undoes the previous changes to
sys/i386/i386/trap.c, sys/alpha/alpha/trap.c, sys/sys/systm.h

Now we have the patch set approved by bde.

Approved by:	bde
2000-03-02 22:03:49 +00:00
Peter Dufault
383774c417 Patches that eliminate extra context switches in FIFO case.
Fixes p1003_1b regression test in the simple case of no RR and
FIFO processes competing.

Reviewed by:	jkh, bde
2000-03-02 16:20:07 +00:00
Nick Hibma
290c9a02c3 Fix flushing of the clists before deleting them. Stops the machine
from panicing when disconnecting a USB Wacom Graphire tablet.

jhk approved the fix some time ago, but I forgot to actually commit the
thing.

Reported by:	Dirk van Gulik <dirkx@webweaving.org>
Approved by:	jhk
2000-03-02 16:01:53 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Greg Lehey
e7a1a7d809 Fix a problem with device number parsing, which caused da10 to map to
da1, and da11 to da2.

Reported by:  Dan Nelson <dnelson@emsphone.com>

Implicitly-approved-by:	 jkh
2000-03-02 07:46:10 +00:00
Peter Wemm
fee576b2e5 Fix two more problems with freeing the softc data manually. subr_bus.c
is responsible for this and this will lead to malloc 'freeing already
free' type panics.  One was in the probe code, the other was in the
pccard eject? code.

Not explicitly approved by: jkh (but the first is fallout from subr_bus.c
rev 1.54 which was an approved commit, the second is the same problem)
2000-03-02 03:45:41 +00:00
Justin T. Gibbs
58d246367e adv_pci.c:
adw_pci.c:
	Update comments describing supported chips/cards.

adwcam.c:
adwlib.c:
adwlib.h:
	Handle more error return codes from the firmware.

	Break out the bus reset code into its own function.

	Usa a constant for the bus reset hold delay.

	Fix an interrupt race problem in adw_idle_cmd_send by
	incorporating the poll loop for command completion.

Approved by:	jkh@FreeBSDorg
2000-03-02 00:08:35 +00:00
Poul-Henning Kamp
1285d5557c Fix a initialization bug.
Report xmit queue length.
Remove old magic and clean up some printfs.
2000-03-01 21:04:54 +00:00
Peter Wemm
a6b8513096 Don't free(sc) before returning an error from probe, it does not "belong"
to us, subr_bus.c will free it.  This bug (panic: freeing already free)
was exposed by kern/subr_bus.c rev 1.54

Not explicitly approved by: jkh (but this is a showstopper and fallout of
the above approved change)
2000-03-01 19:30:36 +00:00
Søren Schmidt
b744c0fdc6 Spell construct right. 2000-03-01 14:39:51 +00:00
KATO Takenori
f1b7989974 Merged from sys/i386/isa/isa_compat.h revision 1.27. 2000-03-01 08:56:47 +00:00
KATO Takenori
bb8a9f4d25 Merged from sys/i386/i386/userconfig.c revision 1.174. 2000-03-01 08:55:23 +00:00
KATO Takenori
ce4274863e Merged from sys/i386/i386/machdep.c revisions 1.384 and 1.385. 2000-03-01 08:53:59 +00:00
KATO Takenori
9c675e3c19 Merged from sys/i386/conf/GENERIC revisions 1.243, 1.244 and 1.245. 2000-03-01 08:52:28 +00:00
KATO Takenori
7fb0223fd0 Merged from files.i386 rev 1.307. 2000-03-01 08:50:05 +00:00
Sheldon Hearn
7a4cd69f7a Disconnect pcfclock from the build until it works on the Alpha. 2000-03-01 07:42:09 +00:00
Greg Lehey
2903a30d77 Set default revive block size to 64 kB.
Implicitly-sanctioned-by:	jkh
2000-03-01 07:25:46 +00:00
Greg Lehey
c6dd6dd0d0 Tidy up splbio() protection.
Tidy up locking.  Previously we were taking two locks for a parity
block, and only releasing one of them.

Implicitly-sanctioned-by:	jkh
2000-03-01 07:25:07 +00:00
Greg Lehey
bd685df802 vinumstrategy: Don't count the read and written bytes before they're
transferred, do it in complete_rqe instead.

launch_requests: Replace the inadvertently removed splbio() around the
                 main loop.  It may not be necessary, but the biggest
                 test of this stuff are IDE disks, which I'm not
                 using.

                 Remove throttling code, I'm pretty sure it's not
                 needed any more.

		 Don't set B_ORDERED, it's not necessary either.

Objected-to-by: alfred

build_rq_buffer: Don't lose the B_ORDERED bit, it still has some
		 residual meaning.  To do this right, Vinum needs to
		 look at the B_ORDERED bit and order the transfer
		 across all disks involved.  That's an exercise for
		 another day.

Objected-to-by: alfred

Implicitly-sanctioned-by:	jkh
2000-03-01 07:24:26 +00:00
Greg Lehey
38a54177c5 Add keywords raid4 and partition.
Implicitly-sanctioned-by:	jkh
2000-03-01 07:23:40 +00:00
Greg Lehey
7d6abd1af3 complete_rqe: Handle volume read stats here with other objects.
Previously vinumstrategy counted the bytes before they were hatched,
giving rise to strangenesses when a read failed.

Implicitly-sanctioned-by:	jkh
2000-03-01 07:23:13 +00:00
Archie Cobbs
33d0e2a76d The "sdl_family" field in a "struct sockaddr_dl" will be equal
to AF_LINK, not AF_DLI, as stated in the comment. Fix the comment.

Reviewed by:	wollman
2000-03-01 02:46:25 +00:00
Brian S. Dean
e777d9c31a Fix a superuser credential check.
Reviewed by:	phk
Approved by:	jkh
2000-02-29 22:58:59 +00:00
Søren Schmidt
7caf73fb3c Add DVD-RAM support.
The driver constructs a fake disklabel that makes the 'a' partition
cover the entire DVD-RAM disk. This cannot be changed from the user
side. This solution was chosen because most DVD-RAM will have a
UDF (or until we have that CD9660) filesystem on it covering the
entire disk, its not really thought as a real random access device.

This might change over time, but for now this is what we have, and
it is compatible with CDROM's etc, that makes using the minidisk
subsystem less than ideal, because of !modulo BDEV_SIZE blocks.
2000-02-29 22:00:53 +00:00
Bill Fumerola
958b92d24d Add a little more history of when netgraph appeared in FreeBSD.
Reviewed by:	asmodai
2000-02-29 18:32:26 +00:00
Luigi Rizzo
da3fc682a7 Fix panic when doing keep-state and "forward".
Removed a redundant check.
Also move check for expired rules before using them.
Sorry for the whitespace changes.

Approved-by: jordan
2000-02-29 17:51:25 +00:00
Søren Schmidt
41ef40c93d Only read user data when blocksize != 2048, this "read the works"
sneaked in sometime which is not what the average user wants.
2000-02-29 16:11:18 +00:00
Sheldon Hearn
cb166ce422 Enable pcfclock as a kernel loadable module.
PR:		16804
Submitted by:	sascha@schumann.cx
Approved by:	jkh (release engineer)
2000-02-29 10:57:42 +00:00
Bill Fumerola
2394baefd8 'driver support' -> 'driver supports' 2000-02-29 10:02:29 +00:00
Doug Rabson
1d9a6ae08b If a driver probe fails, unset it from the device. This fixes a problem
with certain multiport cards.

Approved by: jkh
2000-02-29 09:36:25 +00:00
Doug Rabson
db1d02f417 * Fix the memory probing code so that it sees all memory clusters, not
just the first one.
* Don't reserve extra memory for the prom console unless the platform
  actually uses it.
* Fix some historical confusion and a minor bug in the message buffer
  initialisation.

Submitted by: gallatin for the prom console part
Approved by: jkh
2000-02-29 08:48:10 +00:00
Greg Lehey
2cd253ad0f Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.

Set DRIVE_MAXACTIVE and VINUM_MAXACTIVE to 30000, effectively
disabling the request limitation code.  This code was added as an
attempt to escape from a bug which seems to have gone away, and it's
very likely I'll remove the code Real Soon Now, but I don't want to do
it just yet.

struct drive: Remove references to vnode pointers, including debug
output.  Vinum now talks directly to the device driver.  Instead, add
a dev_t.

enum plexorg: Add an instance for RAID-4.

Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.

Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.

Approved-by:  jkh
2000-02-29 06:17:26 +00:00
Greg Lehey
536aceefa2 plex_org: Add case for RAID-4.
Approved-by:  jkh
2000-02-29 06:16:44 +00:00
Greg Lehey
5823cef910 set_drive_state: update subdisk states more correctly.
set_sd_state: update the state of a subdisk in a multi-plex volume
more correctly.

update_plex_state: Bring the plex up correctly when the last subdisk
comes up.

checksdstate: Update comments.

vpstate: Don't return an "up" state on a degraded, unattached plex.

start_object: Return a sensible error message when trying to revive a
subdisk whose drive is down.  Previously it returned EBUSY.

Approved-by:  jkh
2000-02-29 06:16:06 +00:00
Greg Lehey
ea77bd8579 Fix horrible, embarrassing breakage which caused occasional panics and
data corruption.  It's a wonder it worked at all.

Led-on-the-right-path-by:  dillon

revive_block: Add treatment for RAID-4.

Add function parityrebuild, called by revive_block and parityops.

Approved-by:  jkh
2000-02-29 06:15:26 +00:00
Greg Lehey
25ac879b0c launch_requests: If too many requests are active, include PCATCH in
the tsleep call flags.

Submitted-by:  Bernd Walter <ticso@cicely.de>

Remove references to vnode pointers, including debug output.  Vinum
now talks directly to the device driver.

bre: Add case for RAID-4.

sdio: Don't try to write to a down drive.  Set the sd state instead.

Approved-by:  jkh
2000-02-29 06:14:44 +00:00
Greg Lehey
857b0d4e21 Add support for RAID-4. This is the only change which is needed for
RAID-4 support: the rest is just configuration management.

Requested-by:	peter
Approved-by:	jkh
2000-02-29 06:14:06 +00:00
Greg Lehey
e08bedf9bf Malloc: Save the caller's file name in the correct entry. 2000-02-29 06:13:24 +00:00
Greg Lehey
6992cfe973 Add keywords 'partition' and 'raid4'.
Approved-by:  jkh
2000-02-29 06:13:02 +00:00
Greg Lehey
74a2966a34 Modify comments to indicate that RAID-5 functions also apply to
RAID-4.

Approved-by:  jkh
2000-02-29 06:12:34 +00:00
Greg Lehey
e862b9e36a open_drive: open drives directly rather than going via namei and
vn_open.  This is necessary in order to be able to open drives before
the root file system is mounted.  This also involves restructuring the
drive struct, which no longer contains a vnode pointer.  Instead,
open_drive sets an open flag.  It's a horrible kludge, and I'll gladly
borrow a Danish axe and hack it in little pieces when devfs comes.

read_drive, write_drive, drive_io_done: Replace with driveio.  The
function names are now macros.

driveio: Fix horrible, embarrassing breakage which was the reason why
read_drive and write_drive existed in the first place.

Code-torn-to-shreds-by:  dillon

format_config: Don't save config of objects in referenced state.  They
get rebuilt automatically.

Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.

Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.

Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.

vinum_scandisk: Don't free memory twice on error, once is enough.

Approved-by:  jkh
2000-02-29 06:11:13 +00:00
Greg Lehey
09ebc38020 Remove references to vnode pointers, including debug output. Vinum
now talks directly to the device driver.

Approved-by:  jkh
2000-02-29 06:10:21 +00:00
Greg Lehey
3e0311b705 Remove declarations of read_drive and write_drive and replace them
with macros.

Add declaration for parityrebuild, a new function.

Approved-by:  jkh
2000-02-29 06:09:41 +00:00
Greg Lehey
e435b3206e Add support for RAID-4, even though it is inferior in almost every way
to RAID-5.  peter claims that it might be faster for sequential
reading, since the drive caches don't trip over the parity blocks.  I
have seen no evidence to support this, but it's a trivial change.

Requested-by:	peter

Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.

Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.

atoi(): Remove, nobody was talking to it.

give_sd_to_drive: If no space is available, make the subdisk down,
don't delete it.

Change the manner in which the subdisk count was maintained to avoid
cases where the count was not adjusted correctly.

config_drive: Check if we have subdisks referencing us, and add them
if so.  This fixes problems which arose when a drive is replaced in a
running system.

config_sd: Add support for a keyword 'partition', whose meaning will
	   be revealed in the fullness of time.

Cosmetic: Shorten some console messages.

Approved-by:  jkh
2000-02-29 06:08:33 +00:00
Greg Lehey
7a7d8290f0 Change the startup sequence of the vinum volume from SI_SUB_DRIVERS
to SI_SUB_VINUM, thus making it possible for Vinum to access I/O
devices and start.

Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR with
VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively.

Style fixes: replace NULL with 0 where appropriate.

Submitted-by: Charlie Root <root@sms-1.follo.net> (yup, that's all I
	      have to go on).

Approved-by:	jkh
2000-02-29 06:07:39 +00:00
Greg Lehey
cb357bf915 Cosmetic changes.
Approved-by:	jkh
2000-02-29 06:07:01 +00:00
Matt Jacob
eb76ec8076 Add in mailbox return codes for failed fabric logins (port_id_used,
loop_id_used, etc...)

Do a more precise structure for Get All Next name server responses.

Approved: jkh
2000-02-29 05:54:48 +00:00
Matt Jacob
adde48b322 Minor non-FreeBSD changes (keeping source sync'd).
Approved: jkh
2000-02-29 05:53:41 +00:00
Matt Jacob
40cfc8fe8e Prettier print of fabric devices being attached- say what kind of
port they are (e.g., F_Port vs. N_Port).

Approved: jkh
2000-02-29 05:53:10 +00:00
Matt Jacob
cf74f2682e Slightly cleaner fabric support (whiter whites! redder reds!).. No,
seriously- only attempt to logout a previously logged in fabric device.

Fix a longstanding bug for aborting overtime commands- handle halves
have always been reversed.

Clean up some error messages to indicate channel number.

Approved:jkh
2000-02-29 05:52:14 +00:00
Matt Jacob
2e56bc770d Clean up defines for correct 12160/1080 exclusion. Final 4.0.
approved: JKH
2000-02-29 05:48:46 +00:00
Matt Jacob
44b0af2592 Some minor fixing - final for 4.0. Debugging messages toned down a bit.
Approved: jkh
2000-02-29 05:45:50 +00:00
Greg Lehey
047e0b4e52 Add SI_SUB_VINUM startup sequence for Vinum. This is part of Vinum
root file system support.

Approved-by:	 jkh
2000-02-29 01:57:33 +00:00
Paul Saab
f885f63606 Limit the maximum permissible TCP window size to 65535 octets if
window scaling is disabled.

PR:		kern/16914
Submitted by:	Jayanth Vijayaraghavan <jayanth@yahoo-inc.com>
Reviewed by:	wollman
Approved by:	jkh
2000-02-28 21:18:21 +00:00
Brian S. Dean
2265d5e30d Reset the hardware debug registers when exec'ing a new image.
Reviewed by:	bde,jlemon
Approved by:	jkh
2000-02-28 19:48:51 +00:00
Guido van Rooij
b3f1e629e9 This fixes a problem where the SIOCGIFCONF ioctl goes wrong. This
is triggered when qmail is used with INET6 enabled.  The bug
manifests itself in that the space variable can become negative
and that in the comparison in the guards of the 2 loops, this was
not noticed because sizeof() returns an unsigned and thus the signed
variable gets promoted to unsigned. I decided not to make space
unsigned because I think we should guard against this from happening.
Thus panic() in case space becomes negative.

Approved by:	jkh
2000-02-28 19:30:25 +00:00
Marcel Moolenaar
dba5ab6662 Fix accept(2) behavior in that accepted sockets don't inherit the
parents flags.

Note on the PR:
The PR contains another patch that's not being committed without
further background information. The PR stays open for now.

PR: 16946 (Victor A. Salaman <salaman@teknos.com>)
Prompted by: msmith
Indirect/implicit approval: jkh (shoot me if I'm wrong :-)
2000-02-28 18:58:59 +00:00
Bruce Evans
71c458de9d Fixed configuration of fast interrupts for the pci cy driver. They were
an early newbus casualty.  The fix in rev.1.28 didn't work because the
most important part of it used a wrong macro name.

Approved by:	jkh
2000-02-28 08:12:24 +00:00
Bruce Evans
ce7a637f11 Fixed configuration of fast interrupts for the isa cy driver. They were
an early newbus casualty.  The isa compatibility cruft turned out to be
well suited for this fix.

Approved by:	jkh
2000-02-28 07:52:22 +00:00
Paul Saab
77ac690c97 Update a comment in elf_coredump to reflect that if you madvise
with MADV_NOCORE, its address space is also excluded from a core
file.

Pointed out by:	alc
2000-02-28 06:36:45 +00:00
Paul Saab
9730a5daab Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).
This
This feature allows you to specify if mmap'd data is included in
an application's corefile.

Change the type of eflags in struct vm_map_entry from u_char to
vm_eflags_t (an unsigned int).

Reviewed by:	dillon,jdp,alfred
Approved by:	jkh
2000-02-28 04:10:35 +00:00
Brian Feldman
76e964f1f5 Fix a repetition typo about the settings the settings.
Submitted by:	Kris Dow <kris@vilnya.demon.co.uk>
2000-02-28 03:02:17 +00:00
Alfred Perlstein
47a11f04b3 -it do, among other things, clear out any
+it does, amongst other things, clear out any

The old sentance didn't seem to make sense.
2000-02-28 00:31:18 +00:00
Duncan Barclay
a7049e2bfd Completed start/join code (well only infrastructure mode)
Added receive code and support for Webgear encapsulation.

More debugging macros/functions.

conditionalised timeout for start/join network

conditonalised attribute/common memory hacks

identified tracking code with XXX_TRACK

sorted out initialistion of instance structure to some extent

finished docuementing the start/join sequence
2000-02-27 19:52:29 +00:00
Duncan Barclay
3a28c0ff4e Initial import 2000-02-27 19:47:06 +00:00
Yoshinobu Inoue
90da21c697 Wrap if_up() by splnet.
Approved by: jkh

Submitted by: peter
2000-02-27 18:36:30 +00:00
Yoshinobu Inoue
e7e3ecb6c3 At detaching IPv6 raw socket, also finish IPv6 multicast router.
Approved by: jkh

Submitted by: fenner
2000-02-27 18:35:10 +00:00
Søren Schmidt
cb66e8d4e3 Fix the problem that caused the boot to fail when modules were loaded.
Real braino, confuses two different softc types, I wonder how this
could ever work :(
2000-02-27 12:41:07 +00:00
Brian Feldman
60bfc3b09b Do some cleanups of the IPv6 stuff. This is a non-functional change.
Approved by:	jkh
2000-02-27 07:35:42 +00:00
Kris Kennaway
0990cf946f Crank __FreeBSD_version for OpenSSH
Approved by:	jkh
2000-02-27 06:42:14 +00:00
Jordan K. Hubbard
2217c725f9 Enable IPv6 options 2000-02-26 22:13:21 +00:00
Jordan K. Hubbard
0dab491675 Enable IPv6 support by default. 2000-02-26 22:09:31 +00:00
Poul-Henning Kamp
90a822243f Implement queue-limiting based on bandwidth.
Approved by:	jkh
2000-02-26 18:28:24 +00:00
Duncan Barclay
32c1df1038 Snap shot check in.
The code doesn't compile (I'll do that in a minute), but functionally
it gets to receveing the interrupt from the start or join net command.

There is a lot of code to deal with the limitations of the PCCard memory
mapping code - I'm changing some of it hence the check in to preserve something
that worked.
2000-02-26 14:49:24 +00:00
Matthew N. Dodd
a535079a85 MCA is supported to some extent. Modify a comment that claims otherwise.
Approved by: 	jkh
2000-02-26 05:07:05 +00:00
Jordan K. Hubbard
8d0bf3d6f8 Add new oid, debug.boothowto. This allows userland apps to see
how the kernel was booted and perhaps do conditional things
based upon it (sysinstall, for example, will now turn Debug mode
on automatically if boot -v was done).

Submitted by:	msmith
Suggested by:	ulf
2000-02-25 11:43:08 +00:00
Kazutaka YOKOTA
9e6f8bee0e Do not add children (atkbd and psm) if they are disabled.
Approved by: jkh
2000-02-25 11:40:31 +00:00
Søren Schmidt
1a488af60f Add (partial) support for the Cypress ATA controller.
Call intr_teardown on detach.

Always add non masterdevice from unit 2 upwards.

Update to the pccard code, at least some cards are now working,
more testing to follow.
2000-02-25 09:48:23 +00:00
Boris Popov
ce0d1c79c3 Fix the loader to handle module dependencies properly. More fixes
will be provided after modmetadata appears in the kernel.

Reviewed by:	msmith
Approved by:	jkh
2000-02-25 05:10:44 +00:00
John Polstra
7e4977c94e Fix two bugs in the fault handler for copy{in,out} and friends.
First, it was failing to reset the PCB's pcb_onfault member to NULL.
Under some really obscure circumstances this might cause a wild jump
within the kernel when a panic would otherwise occur.  Second, the
handler was loading the GP register needlessly and with an incorrect
value.

Reviewed by:	Doug Rabson <dfr>
Approved by:	Jordan Hubbard <jkh>
2000-02-25 03:26:10 +00:00
Matthew Dillon
f8fa53397f Fix a 'freeing free block' panic in UFS. The problem occurs when the
filesystem fills up.  If the first indirect block exists and FFS is able
    to allocate deeper indirect blocks, but is not able to allocate the
    data block, FFS improperly unwinds the indirect blocks and leaves a
    block pointer hanging to a freed block.  This will cause a panic later
    when the file is removed.  The solution is to properly account for the
    first block-pointer-to-an-indirect-block we had to create in a balloc
    operation and then unwind it if a failure occurs.

Detective work by: Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by: mckusick, Ian Dowse <iedowse@maths.tcd.ie>
Approved by: jkh
2000-02-24 20:43:20 +00:00
Yoshinobu Inoue
0b97e97cd2 Add length check to sbcreatecontrol().
Now this check is necessary because IPv6 source routing might use
  control data bigger than MLEN. (e.g. 16bytes IPv6 addr x 23 hops)
  Actually mbuf cluster should be used in uipc_socket.c:sbcreatecontrol()
  and uipc_syscalls.c:sockargs() when data size is bigger then MLEN,
  and such patches were already in KAME environment and have been
  confirmed to work well. I just forgot to merge them into 4.0, sorry.

  For safety, I'll postpone such patches until after 4.0 release.
  The effect of postponement is followings.
    -Ping6 source routing hops are limitted to around 6 or so.
    -If some apps do setsockopt IPV6_RTHDR and try to receive
     incoming IPv6 source routing info, it can't receive more
     than 6 hops source routing info.
     (But currently, no apps seems to be doing it.)

Approved by: jkh
2000-02-24 19:21:26 +00:00
Doug Rabson
ac19291f35 Add a workaround to allow us to detect the second pci bus on an HP
Netserver LS/2.

Approved by: jkh
2000-02-23 20:25:06 +00:00
Guido van Rooij
6d37c73e26 Remove option IPFILTER_KLD. In case you wanted to kldload ipfilter,
the module would only work in kernels built with this option.

Approved by:	jkh
2000-02-23 20:11:57 +00:00
Guido van Rooij
7830d3c3a1 Remove option IPFILTER_KLD. In case you wanted to kldload ipfilter,
the module would only work in kernels built with this option.
2000-02-23 20:10:53 +00:00
Jason Evans
dd85920a4f Add the VFS_AIO config option and leave it off by default. Unless the
VFS_AIO option is specified, all aio-related syscalls return ENOSYS.

The aio code is very fragile right now, and is unsuitable for default
inclusion in a production shell box.

Approved by:	jkh
2000-02-23 07:44:25 +00:00
Bill Fumerola
bebfe1cadb o No need to print the vendor/device ID for things that matched succesfully.
o ``<device name>'' versus ``device name'' for things that fall under nomatch.

Reviewed by:	dfr (in principle)
Approved by:	Baron von Hubbard
2000-02-22 21:44:39 +00:00
Søren Schmidt
9bd1c89ad3 Add UDMA66 support to the Intel ICH chip.
Submitted by: sakichan@lares.dti.ne.jp
2000-02-22 20:37:01 +00:00
Robert Watson
0f71afb31e After much consulting with bde, concluded that this fix was the best fix
to the current jail/chflags interactions.  This fix conditionalizes ``root
behavior'' in the chflags() case on not being in jail, so attempts to
perform a chflags in a jail are limited to what a normal user could do.
For example, this does allow setting of user flags as appropriate, but
prohibits changing of system flags.

Reviewed by:	bde
2000-02-22 03:56:58 +00:00
Bill Fumerola
a91df2ff09 Add the ESS Maestro and the ATI Mobility-1 to the generic chip match and
the vga match (respectivly, though they aren't much different anymore..)

These can be found on newer Dell laptops.

Approved by: Sir Hubbard
2000-02-21 21:46:19 +00:00
Søren Schmidt
456b5ad253 Fix the changer code, dont wait for device ready on unload, it
wont become ready as there is no media - doh.

Update the command name reporting.
2000-02-21 18:41:05 +00:00
Brian S. Dean
80275388cb Fix an __asm operand constraint which broke the -O3 and -O0 builds.
Submitted by:	Seigo Tanimura <tanimura@freebsd.org>
Approved by:	jkh
2000-02-21 13:06:50 +00:00
Warner Losh
da144b9373 /tmp/msg 2000-02-21 06:52:20 +00:00
Gary Jennejohn
4f9d49f140 Newbus-ify the USR Sportster TA Intern driver.
Enable the driver in sys/conf/files.i386.

In isa/isavar.h increase ISA_NPORT from 32 to 50. This is required
because this brain-damaged card maps 49 (!) port ranges. This does
not have a negative impact because this value only specifies the maximum
number of entries in a linked list and not the size of an array which
is allocated in all drivers.

The register/fifo access routines were not newbus-ified because
1) I knew that the old code worked and is simpler and more efficient
2) the if_ed driver does something similar and
3) the newbus macros collapse to inb/outb anyway.

Reviewed and tested by:	hm
Approved by:	jkh
2000-02-21 02:10:10 +00:00
Andrey A. Chernov
df2ef4c180 Fix possible SLIOCSUNIT panic
PR:		16564
Submitted by:	ru
Approved by:	jkh
2000-02-20 21:03:53 +00:00
Brian S. Dean
de8050f9b8 Don't forget to reset the hardware debug registers when a process that
was using them exits.

Don't allow a user process to cause the kernel to take a TRCTRAP on a
user space address.

Reviewed by:	jlemon, sef
Approved by:	jkh
2000-02-20 20:51:23 +00:00
Peter Wemm
6ecfb1da44 Followup to previous commit; change fd_mask from signed to unsigned as
it should have been to start with.  The implications of that are not
pleasant when combined with >> as it breaks on multiples of NFDBITS.
Right shifting of a signed value fills with a copy of the sign bit,
not a zero.

Reported by:	bde
2000-02-20 15:01:37 +00:00
Duncan Barclay
83463004f1 Skeleton framework for network driver and initial probing of device. 2000-02-20 14:56:17 +00:00
Nick Hibma
418a4537cf Update the documentation to reflect Bill Paul's latest changes. 2000-02-20 14:41:54 +00:00
Nick Hibma
5e78bf3190 Move the warning on wrong IRQ values to the right place, before any
resource allocation is attempted.

It will present the user with a message that he has to switch on USB
support in his BIOS.
2000-02-20 14:22:44 +00:00
Peter Wemm
f082218c18 Fix select(2) for the Alpha. (!!) It was never returning true for
fd's in the range of 32-63, 96-127 etc.  The first problem was the
FD_*() macros were shifting a 32 bit integer "1" left by more than
32 bits.  The same problem happened in selscan().  ffs() also takes
an int argument and causes failure.  For cases where int == long
(ie: the usual case for x86, but not always as gcc can have long
being a 64 bit quantity) ffs() could be used.

Reported by:	Marian Stagarescu <marian@bile.skycache.com>
Reviewed by:	dfr, gallatin (sys/types.h only)
Approved by:	jkh
2000-02-20 13:36:26 +00:00
Søren Schmidt
a6e23e28c1 Hide the "devclass_alloc_unit: %s%d already exists, using next available..."
behind bootverbose

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

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

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

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

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

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

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

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

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

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

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

Lots of cosmetic fixes here and there.

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

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

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

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

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

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

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

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

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

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

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

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

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

o Remove a disconserting printf() left over from NetBSD

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

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

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

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

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

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

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

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

approved: jkh

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

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

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

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

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

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

Approved by: jkh

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Also fix apps which includes invalid header files.

Approved by: jkh

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

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

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

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

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

Approved-by: jordan
2000-02-10 14:19:53 +00:00