Commit Graph

27376 Commits

Author SHA1 Message Date
Mike Smith
832183ba00 Retarget the resource parser slightly. We only fetch current resources
for the device now (we should really just be parsing a passed-in resource
buffer).

Wrap long lines so this is (more) readable.

Support Address16 and Address32 resources, in the CONSUMER case.

Support DRQs so that we can handle ISA devices.

Support ExtendedIrqs (we ignore most of their attributes)

Add a placeholder device for system memory and system resources.  This
takes the place of the nexus placeholder, which only attaches to ISA.
2001-08-30 00:49:34 +00:00
Mike Smith
d5519f129a Note that now that some ISA devices will attach to ACPI, we need to
keep the ivar indexes that ISA uses free.
2001-08-30 00:45:42 +00:00
Mike Smith
2668fa394a Don't parse our resources ourself, the ACPI core code must do it. 2001-08-30 00:45:12 +00:00
Mike Smith
93b9ee69f5 Nuke the (fairly bogus) attachment of *all* ACPI devices to ISA. 2001-08-30 00:44:29 +00:00
Mike Smith
f48bf2d715 Add missing acpi_disabled() call so that this driver can be disabled. 2001-08-30 00:44:01 +00:00
Mike Smith
ad41f9a8f7 Teach the loader how to find the system ACPI information, and autoload
the ACPI module if the system apperars to be ACPI compliant.

This is an initial cut; the load should really be done by Forth support
code, and we should check both the BIOS build date and a blacklist.
2001-08-30 00:42:12 +00:00
Mike Barcroft
03516cfeb0 o Remove some GCCisms in src/powerpc/include/endian.h.
o Unify <machine/endian.h>'s across all architectures.
o Make bswapXX() functions use a different spelling of u_int16_t and
  friends to reduce namespace pollution.  The bswapXX() functions
  don't actually exist, but we'll probably import these at some
  point.  Atleast one driver (if_de) depends on bswapXX() for big
  endian cases.
o Deprecate byteorder(3) prototypes from <sys/types.h>, these are
  now prototyped indirectly in <arpa/inet.h>.
o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these
  are now typedef'd in <arpa/inet.h>.
o Change byteorder(3) prototypes to use standards compliant uint32_t
  (spelled __uint32_t to reduce namespace pollution).
o Document new preferred headers and standards compliance.

Discussed with:	bde
PR:		29946
Reviewed by:	bmilekic
2001-08-30 00:04:19 +00:00
Jayanth Vijayaraghavan
e7e2b80184 when newreno is turned on, if dupacks = 1 or dupacks = 2 and
new data is acknowledged, reset the dupacks to 0.
The problem was spotted when a connection had its send buffer full
because the congestion window was only 1 MSS and was not being incremented
because dupacks was not reset to 0.

Obtained from:		Yahoo!
2001-08-29 23:54:13 +00:00
Scott Long
36e0bf6e9c Mega update to the aac driver.
1.  Correctly handle commands initiated by the adapter.  These commands
    are defered to a kthread responsible for their processing, then are
    properly returned to the controller.
2.  Add/remove disk devices when notified by the card that a container was
    created/deleted/offline.
3.  Implement crashdump functionality.
4.  Support all ioctls needed for the management CLI to work.  The linux
    version of this app can be found at the Dell or HP website.  A native
    version will be forthcoming.

MFC-after:	4.4-RELEASE
2001-08-29 23:34:05 +00:00
Warner Losh
9a25341262 First, The Ricoh 5C47x chips don't have the disable the 3e0 bits.
Second, the TI 1130 need to have the PCI_INTR set, not cleared.

This gets Soren's machine working with NEWCARD again.

# The whole initialization is a mess and needs to be organized ala OLDCARD.
2001-08-29 20:33:08 +00:00
Andrew Gallatin
055d495677 Fix linux_getcwd() so that if the cwd isn't cached (__getcwd() fails),
the cwd is looked up inside the kernel. The native getcwd() in libc
handles this in userland if __getcwd() fails.

Obtained from: NetBSD via OpenBSD
Tested by: Chris Casey <chriss@phys.ksu.edu>, Markus Holmberg <markush@acc.umu.se>
Reviewed by: Darrell Anderson <anderson@cs.duke.edu>
PR: kern/24315
2001-08-29 19:05:27 +00:00
Andrey A. Chernov
159247784c smbfs_advlock: simplify overflow checks (copy from kern_lockf.c)
minor formatting issues to minimize differences
2001-08-29 18:59:04 +00:00
Andrey A. Chernov
c8e7634357 advlock: simplify overflow checks 2001-08-29 18:53:53 +00:00
Andrey A. Chernov
63347f1e8f lseek: simplify overflow checks 2001-08-29 18:35:53 +00:00
Robert Watson
b24a8ce37a o Introduce support for _CAPABILITY_NEEDMACROS, reducing namespace
pollution for non-POSIX.1e macros.
o Introduce CAP_UNITE(), CAP_NONZERO().
o Disable aspects of CAP_SETPCAP, which is Linux-specific (in particular,
  remove it from CAP_ALL_ON).
o Improve commenting.

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-29 18:01:41 +00:00
Robert Watson
3c4543e046 o Reduce gratuitous whitespace difference from Darwin. 2001-08-29 17:18:04 +00:00
Warner Losh
51af6062b4 Note the status of the card, so we don't print inserted lines twice on
boot.
2001-08-29 15:54:12 +00:00
Peter Wemm
df55753880 Fix the ogetkerninfo() syscall handling of sizes for
KINFO_BSDI_SYSINFO.  This supposedly fixes Netscape 3.0.4 (bsdi binary)
on -current.  (and is also applicable to RELENG_4)

PR:		25476
Submitted by:	Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>
2001-08-29 11:47:53 +00:00
Cameron Grant
edecdda7b9 tweaks to reduce latency/pauses in output 2001-08-29 09:17:43 +00:00
George C A Reid
0a1e38d38a Add support for the Acer Labs M5451 chip.
Submitted by:	Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
2001-08-29 09:04:22 +00:00
Warner Losh
0f78b1c02b Add some seat belts. If we set the error rc, then return it and don't
pretend things succeeded.  This can happen if the address returned
form bus_alloc_resource for the cis memory is occupied by some of
thing.
2001-08-29 05:11:44 +00:00
Cameron Grant
a32858897e add some extra diagnostic info to sndstat output. 2001-08-29 02:49:54 +00:00
Cameron Grant
9924faf6e7 * change buffering method a bit
* swap record/mic channels
* initialise all channels
* align dma buffers to 8 bytes

Submitted by:	Katsurajima Naoto <raven@katsurajima.seya.yokohama.jp>
(mostly)
2001-08-29 02:31:03 +00:00
Brian Somers
546a92c4d4 OR M_WAITOK with M_ZERO in malloc()s args for clarity. 2001-08-28 23:58:32 +00:00
Robert Watson
d3406ed07a o Remove P_CAN_* constants, as they are no longer being used.
Obtained from:	TrustedBSD Project
2001-08-28 21:46:20 +00:00
Robert Watson
7fd6a9596d o Improve the style of a number of routines and comments in kern_prot.c,
with regards to redundancy, formatting, and style(9).

Submitted by:	bde
2001-08-28 16:35:33 +00:00
Warner Losh
d3b6477a19 It turns out that while Toshiba laptops don't want to route interrupts
multiple times, others do.  The last strategy, which was to assume
that already routed interrupts were good and just return them doesn't
work for some laptops.  So, instead, we have a new strategy: we notice
that we have an interrupt that's already routed.  We go ahead and try
to route it, none the less.  We will assume that it is correctly
routed, even if the route fails.  We still assume that other failures
in the bios32 call are because the interrupt is NOT routed.

Note: some laptops do not support the bios32 interface to PCI BIOS and
we need to call it via the INT 2A interface.  That is another windmill
to till at later.

Also correct a minor typo and minor whitespace nits.

Strong MFC candidate.
2001-08-28 16:35:01 +00:00
Søren Schmidt
a8ae536239 Update the Promise TX2 code to DTRT and not what I guessed earlier.
Allow tagged queing on the Promise TX2 as it seems to work.

Cudos to promise for making the most simple to program ATA chip.
2001-08-28 13:36:06 +00:00
Søren Schmidt
b4fa8260b8 Add support for yet another VIA '686 combination. 2001-08-28 08:59:17 +00:00
Warner Losh
40e285969e wi driver now includes pci.h, so we need to generate it to generate it. 2001-08-28 05:28:40 +00:00
Warner Losh
47e83d86d1 Make this compile when there is no pci bus in your kernel.
Note: This should be multiple files, but since it is also broken in
stable, I thought I'd do a fix that could be MFC'd.

This is a MFC candidate.
2001-08-28 05:26:43 +00:00
Robert Watson
4bcbade869 Fix typos in recent comments.
Submitted by:	dd
2001-08-28 05:16:19 +00:00
Bill Paul
d93d282620 Add support for the 3c656B cardbus adapter. This is one half of a
dual function card. It needs pretty much the same flags as the 656C,
except that it seems to need both the INVERT_MII_PWR and INVERT_LED_PWR
flags set. Tested with cardbus in -current as of today.

Also added support for the 3c656, which looks to be the same as
the 656B, except it doesn't need the EEPROM_8BIT flag. I think. This
one is untested, but the added support should not break any of the
other cards.
2001-08-28 00:40:18 +00:00
Jesper Skriver
3b8123b72c When net.inet.tcp.icmp_may_rst is enabled, report ECONNREFUSED not ENETRESET
to the application as a RST would, this way we're compatible with the most
applications.

MFC candidate.

Submitted by:	Scott Renfro <scott@renfro.org>
Reviewed by:	Mike Silbersack <silby@silby.com>
2001-08-27 22:10:07 +00:00
Warner Losh
d626906b0c MFS: IRQ ordering, PRVERB and more whining in pcibios_get_version on failure.
Check return value from bios32.

[[ Yes, I was bad and committed this to stable first.  I should have done
   the commit in the other order. ]]
2001-08-27 20:44:38 +00:00
Warner Losh
3577f582a0 Ugggg. I thought I'd already committed this to -current:
If the intline is 0 or 255, then it needs an interrupt routed.  Some
Sony laptops improperly flag devices that need an interrupt with 0 :-(.
2001-08-27 20:42:07 +00:00
Maxim Sobolev
166cd0b42f OOPS, remove local change that somehow slipped into a commit (I swear that
I already deleted it some time ago). This should fix problem people have with
unsefined reference to `MD_PRELOAD_COMPRESSED'.

Submitted by:	Manfred Antar <null@pozo.com>
2001-08-27 17:48:37 +00:00
Andrey A. Chernov
0ca2edaf6d Back out prev. change. According to bde:
_POSIX_SOURCE means POSIX.1-1990, not the current version of POSIX.
2001-08-27 17:05:29 +00:00
Andrey A. Chernov
3e05884b94 EOVERFLOW is POSIXed, so move it out #ifndef _POSIX_SOURCE section 2001-08-27 16:48:34 +00:00
Jonathan Lemon
00c4116b3e Systems based on the ICH2/ICH2-M chip from Intel have a defect where
the chip can cause a PCI protocol violation in under certain scenarios.
The workaround is to rewrite the EEPROM to disable Dynamic Standby Mode.

Once the EEPROM is rewritten, the system needs to be rebooted in order
to pick up the new settings.

This has been tested on several ICH2/ICH2-M systems, found in 815E based
boards, and usually identified by the presence of the 82562 ET/EM PHY.

Thanks to: Mike Tansca, Paul Saab for samples of the problematic boards.
2001-08-27 16:07:12 +00:00
Robert Watson
3b243b7292 Generally improve documentation of kern_prot.c:
o Add comments for:
  - kern.security.suser_permitted
  - p_cansee()
  - p_cansignal()
  - p_cansched()
  - kern.security.unprivileged_procdebug_permitted
  - p_candebug()

Update copyright.

Obtained from:	TrustedBSD
2001-08-27 16:01:52 +00:00
Warner Losh
a828573f43 Fix typo in my last commit 2001-08-27 15:18:26 +00:00
Maxim Sobolev
9d4b594558 - On module unload try to detach all configured disks and let unload proceed
if all disks were detached sucessfully;
- use consistent style for return statements and fix several others style
  inconsistencies.

Reviewed by:	ru
Approved by:	phk
2001-08-27 13:25:47 +00:00
Jonathan Chen
71e7902026 Make pccard_product_lookup non-static again...
When something is exported, do not mark it as static for no apparent reason...

Broken by: me
2001-08-27 11:28:00 +00:00
Jonathan Chen
472ce770c4 Fix the hack that allocates memory when the bios haven't already done so.
We can't rely on rman to give us a useable memory window if we tell it to
do auto-allocation.  This should probably be fixed on the pci bus/rman side.
2001-08-27 11:23:05 +00:00
Peter Wemm
5d8600f9d5 Correctly #ifdef COMPAT_43 around osendsig() prototype. 2001-08-27 06:19:18 +00:00
Peter Wemm
0f7289022b If a file has been completely unlinked, stop automatically syncing the
file.  ffs will discard any pending dirty pages when it is closed,
so we may as well not waste time trying to clean them.  This doesn't
stop other things from writing it out, eg: pageout, fsync(2) etc.
2001-08-27 06:09:56 +00:00
Peter Wemm
9d170964e4 There is nothing more embarresing than having three goes at correcting
typos in the same paragraph.  s/in in/in/

Submitted by:	iedowse
2001-08-27 05:18:12 +00:00
Peter Wemm
76cb0cadf1 Enable hardwiring of things like tunables from embedded enironments
that do not start from loader(8).
2001-08-27 05:11:53 +00:00
Warner Losh
fb141a4c6c CL-PD6729 and CLPD-6730 chips (the only ones with I/O bars in the pci
config space that I'm aware of) work.  I'm committing this from such
a machine.

Remove warning about I/O based bridges.  Warn users that the PCI routing
of interrupts still doesn't work for these cards.
2001-08-27 01:59:57 +00:00
Warner Losh
db3e31829d Note difficulties we had in OLDCARD using NEWCARD's methods of debouncing card event interrupts. 2001-08-27 01:30:46 +00:00
Kelly Yancey
b530a320f8 Add interfaces for SCSI LOG SELECT and LOG SENSE commands.
Reviewed by:	ken
2001-08-27 01:29:30 +00:00
Warner Losh
533dc59976 More notes to the reader about issues in pccard code here. 2001-08-27 01:24:33 +00:00
Warner Losh
fe63bdcc6a Merge notes, but not code, from my latest tree on pccard_function_init and pccard_function_free 2001-08-27 01:18:21 +00:00
Cameron Grant
4f4449e01c now we have the rate feeder, we don't need to constrain the default channel
speed.  however, continue to do so for record channels until the feederchain
builder is fixed.
2001-08-27 01:02:13 +00:00
Warner Losh
afd9750bfd A number of fixes for the TI-1130 and ISA interrupt routing cases:
o For TI PCI-1130, you need to set bit 5 of register 91 if you want
  ANY pci interrupts.  Then set bits 3 and/or 4 as appropriate.  This
  will fix those people with 1030, 1130 and 1131 in their machines
  trying to do PCI interrupts.
o Fix case where we were trying to automatically fail back to ISA
  interrupt routing.  We were dereferencing a NULL pointer.  This
  was true of ANY chipset.
o The bus_setup_intr method needs to be pcic_setup_intr so that "FAST"
  interrupts fail on PCI case (modems act flakey if we don't force
  them to fall back to normal interrupts).  Also needed so that the
  proper ISA IRQ can be set in the ExCA register.  This fixes the
  people whose ISA routing was failing[*].
o When we find a generic yenta/pccard bridge, go ahead and print its
  vendor ID in boot verbose.

Machine with theses symptoms and a serial console by: jedgar

[*] Looks like my pc98 machine has some interrupt source on IRQ 15
that gave about 30 interrupts per second, which masked this problem on
my PC-9821Nr15.
2001-08-27 01:00:27 +00:00
Cameron Grant
52eb6afd0c MFS rev 1.8.2.8:
release resources on detach

Submitted by:	"Christopher N . Harrell" <cnh@netvmg.com>
2001-08-27 00:54:26 +00:00
Jonathan Chen
63fa9f4c0d Part two of this NEWCARD update:
Briefly, the significant changes include:
 * Way better resource management in pccbb, pccard and cardbus.
 * pccard hot-removal now appears to work.
 * support pre-fetchable memory in cardbus.
 * update cardbus to support new pci bus interface functions.
 * Fix CIS reading to no longer use rman_get_virtual().

What's not there, but in the works:
 * pccard needs to do interrupt properly and not read the ISR on single
   function cards.
 * real resource management for pccard
 * a complete implementation of CIS parsing
 * need to look into how to correctly use mutex in pccbb
2001-08-27 00:09:42 +00:00
Jonathan Chen
c83acdc307 Non-functional changes to NEWCARD stuff.
This is the first part of a two-part update to NEWCARD.  Changes in this
commit are non-functional, and includes the following:
 * indentation and other changes to meet style(9).
 * other minor style consistancy changes
 * addition of comments
 * renaming of device_t variables to be consistant across all of NEWCARD.

(note that not all style violations are fixed in this commit -- those that
 aren't will be clobbered by the next commit.)
2001-08-26 23:56:49 +00:00
Jonathan Chen
255b159f5f Non-functional changes to NEWCARD stuff.
This is the first part of a two-part update to NEWCARD.  Changes in this
commit are non-functional, and includes the following:
 * indentation and other changes to meet style(9).
 * other minor style consistancy changes
 * addition of comments
 * renaming of device_t variables to be consistant across all of NEWCARD.

(note that not all style violations are fixed in this commit -- those that
 aren't will be clobbered by the next commit.)
2001-08-26 23:55:34 +00:00
Mike Smith
4c1cdee628 Updates to match the ACPI CA 20010816 import:
- New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size.
 - New debug level/subsystem codes.
2001-08-26 22:50:15 +00:00
Mike Smith
2780a616d6 Nuke the Windows platform defines; we don't need them. 2001-08-26 22:46:28 +00:00
Mike Smith
9d7b18c207 Merge local changes. 2001-08-26 22:45:42 +00:00
Mike Smith
d142fbb1b8 This commit was generated by cvs2svn to compensate for changes in r82367,
which included commits to RCS files with non-trunk default branches.
2001-08-26 22:28:18 +00:00
Mike Smith
2ee2f9cb74 Vendor import of the Intel ACPI CA 20010816 update. 2001-08-26 22:28:18 +00:00
Peter Wemm
d675a0adcc I missed a typo in the last commit: s/whach/which/
Submitted by:	bde
2001-08-26 21:55:54 +00:00
Peter Wemm
4ea059e15f The EXTENDED_GEOMETRY flag is really bit 7. This affects >2GB drives.
PR:		29454
Submitted by:	Rob Manchester <rmanches@vmware.com>
2001-08-26 21:51:35 +00:00
Ian Dowse
be70fc04ce Stop using dirhash when a directory is removed, and ensure that we
never attempt to hash directories once they are deleted. This fixes
a problem where operations on a deleted directory could trigger
dirhash sanity panics.
2001-08-26 20:47:19 +00:00
George C A Reid
874f2e78b4 Add support for the SiS 7018
PR:		30100
Submitted by:	Ada Lim <adal@cse.unsw.edu.au>
2001-08-26 19:15:28 +00:00
Andrey A. Chernov
fcbe9614ef Cosmetique & style fixes from bde 2001-08-26 10:28:58 +00:00
Andrey A. Chernov
c4778eed9f Cosmetique & style fixes from bde 2001-08-26 10:23:49 +00:00
Bill Fumerola
52cf11d8a1 the IP_FW_GET code in ip_fw_ctl() sizes a buffer to hold information
about rules and dynamic rules. it later fills this buffer with these
rules.

it also takes the opporunity to compare the expiration of the dynamic
rules with the current time and either marks them for deletion or simply
charges the countdown.

unfortunatly it does this all (the sizing, the buffer copying, and the
expiration GC) with no spl protection whatsoever. it was possible for
the dynamic rule(s) to be ripped out from under the request before it
had completed, resulting in corrupt memory dereferencing.

Reviewed by:	ps
MFC before:	4.4-RELEASE, hopefully.
2001-08-26 10:09:47 +00:00
Benno Rice
035dbc3cb5 Pass NULL instead of MAXPHYS to the DMA allocation method. Be a bit more
verbose if we fail to allocate the DMA buffer.
2001-08-26 07:07:47 +00:00
Warner Losh
f711f84740 Stop dereferencing 'r' unconditionally. Maybe it is NULL when ISA
mode and using polling mode.
2001-08-26 04:05:07 +00:00
Ian Dowse
2ed42812bd When compacting directories, ufs_direnter() always trusted DIRSIZ()
to supply the number of bytes to be bcopy()'d to move an entry. If
d_ino == 0 however, DIRSIZ() is not guaranteed to return a sensible
length, so ufs_direnter could end up corrupting a directory during
compaction. In practice I believe this can only happen after fsck_ffs
has fixed a previously-corrupted directory.

We now deal with any mid-block unused entries specially to avoid
using DIRSIZ() or bcopy() on such entries. We also ensure that the
variables 'dsize' and 'spacefree' contain meaningful values at all
times. Add a few comments to describe better this intricate piece
of code.

The special handling of mid-block unused entries makes the dirhash-
specific bugfix in the previous revision (1.53) now uncecessary,
so this change removes it.

Reviewed by:	mckusick
2001-08-26 01:25:12 +00:00
Warner Losh
826fac3f15 Fix last second typo 2001-08-25 22:53:47 +00:00
Warner Losh
1fa93154aa Back out the isa/pci string reporting. It may cause panics. 2001-08-25 22:45:45 +00:00
Warner Losh
c98c9548b1 The tunable is hw.pcic.irq, but the hw.pcic.override_irq was how it was
reported in sysctl.
2001-08-25 22:39:44 +00:00
Warner Losh
5cb1fce026 Fix cut-and-paste-o that Nate found. We were setting csc_route twice,
rather than setting it once and setting func_route when we can't route
PCI interrupts.
2001-08-25 22:04:00 +00:00
Brian Somers
86b2fc4de5 TUNSIFINFO now expects IFF_MULTICAST to be OR'd with either IFF_POINTOPOINT
or IFF_BROADCAST.  If it's not, the IFF_MULTICAST is removed.

This is in line with how NetBSD & OpenBSD do it.
2001-08-25 09:12:57 +00:00
Peter Wemm
359ebc389c Argh! Revert accidental commit. 2001-08-25 07:42:27 +00:00
Warner Losh
0b370908b2 First cut at getting the ISA routing working. If we can't route a PCI
interrupt for the CSC interrupt, then we revert to ISA.  If we didn't
have an interrupt set up with hw.pcic.irq, then do polling.

Also, don't complain about ignoring function 1 for any devices except
pcic devices.  This would normally only show up if someone set
hw.pcic.ignore_function_1=1.

MFC: as soon as I can test it on some troublesome laptops.
2001-08-25 06:40:00 +00:00
Peter Wemm
3516c025ff Implement idle zeroing of pages. I've been tinkering with this
on and off since John Dyson left his work-in-progress.

It is off by default for now.  sysctl vm.zeroidle_enable=1 to turn it on.

There are some hacks here to deal with the present lack of preemption - we
yield after doing a small number of pages since we wont preempt otherwise.

This is basically Matt's algorithm [with hysteresis] with an idle process
to call it in a similar way it used to be called from the idle loop.

I cleaned up the includes a fair bit here too.
2001-08-25 05:00:44 +00:00
Peter Wemm
547a9e66fd vm_page_zero_idle() is no longer MD. 2001-08-25 04:54:25 +00:00
Peter Wemm
e220a92985 Remove a reference to MAP_INHERIT. 2001-08-25 04:27:40 +00:00
Julian Elischer
15dac10b05 Add another comment.
check for 'teh's this time..
2001-08-25 02:44:38 +00:00
Peter Wemm
268bdb43f9 Optionize UPAGES for the i386. As part of this I split some of the low
level implementation stuff out of machine/globaldata.h to avoid exposing
UPAGES to lots more places.  The end result is that we can double
the kernel stack size with 'options UPAGES=4' etc.

This is mainly being done for the benefit of a MFC to RELENG_4 at some
point.  -current doesn't really need this so much since each interrupt
runs on its own kstack.
2001-08-25 02:20:02 +00:00
Peter Wemm
61af199168 s/teh/the/ 2001-08-25 02:06:59 +00:00
Julian Elischer
6a9344d45a Add an explanatory note that would have saved me an hour or two
of confusion had it been there when I started reading the code..
2001-08-25 01:16:47 +00:00
Matt Jacob
38db9454de John Polstra
bogus additional write to WXREG_IMASK that enabled *all* interrupt causes
while I was trying to disable the chip. Oops.
2001-08-24 23:08:13 +00:00
Bosko Milekic
76dcbd6f9f Force a commit on kern_mutex.c to explain reason for last commit but while
I'm at it also add a comment in mtx_validate() explaining the purpose
of the last change.

Basically, this fixes booting kernels compiled with MUTEX_DEBUG. What used
to happen is before we setidt from init386() [still using BTX idt], we
called mtx_init() on several mutex locks, notably Giant and some others.
This is a problem for MUTEX_DEBUG because it enables mtx_validate() which
calls kernacc(), some of which in turn requires Giant.
Fix by calling kernacc() from mtx_validate() only if (!cold).
2001-08-24 23:00:59 +00:00
Bosko Milekic
ab07087e16 *** empty log message *** 2001-08-24 22:53:45 +00:00
Matthew Dillon
2ee4dc6565 Add INHERIT_XXX defines for minherit() system call.
Remove MAP_INHERIT - it is no longer supported.
2001-08-24 19:48:07 +00:00
Matthew Dillon
676274db9b Remove support for the badly broken MAP_INHERIT (from -current only). 2001-08-24 19:29:56 +00:00
Matthew Dillon
c45da89917 Remove MAP_NOEXTEND. It came from 4.4-lite and not only was never
implemented, but mmap()'s default behavior is *already* to not extend
files.  Only write() or ftruncate() can extend a file.
2001-08-24 18:22:46 +00:00
John Baldwin
6385dec00e Style nits:
- Don't use punctuation or newlines in panic messages.
- Remove excess blank lines.

Requested and partially submitted by:	bde
2001-08-24 17:46:58 +00:00
Warner Losh
d625c99d74 Explain what we're doing in pcic_pci_shutdown a little better. Try to
explain the subtle side effects that are going to happen and why we go
ahead and ack the interrupt source.  This stuff is tricky to get
right.

Also, emperical tests have shown that doing a shutdown in attach to be
ineffectual, so remove it from there.  Analysis of the code paths
shows that nearly identical writes to these registers happen in later
parts of the code.  The hanging problem on thinkpads when we change
the interrupt routing type is something else.
2001-08-24 17:29:42 +00:00
John Baldwin
e5dfa86a70 Axe a commented, unused #define related to the old giant lock. 2001-08-24 16:52:31 +00:00
John Baldwin
134b29765c INTREN() and INTRDIS() have been MP safe for a while. Don't say that they
are "soon to be" MP safe in the comments.
2001-08-24 16:51:47 +00:00
John Baldwin
a0f831f573 Remove references to the old giant kernel lock in various comments. 2001-08-24 16:46:15 +00:00
Peter Pentchev
ccdbd10cb7 Prevent passing a null pointer as a filename to vn_open(),
if for some reason expand_name() failed to build a core file name.

PR:		29931
Submitted by:	Foldi Tamas <crow@kapu.hu>
Reviewed by:	dd, -arch
MFC after:	1 month
2001-08-24 15:49:30 +00:00
Andrey A. Chernov
5215e1ea12 Copy from kern_lockf.c: remove extra check 2001-08-24 10:22:16 +00:00
Andrey A. Chernov
dc6e1079e6 Remove extra check unneded now 2001-08-24 10:20:26 +00:00
Peter Wemm
c1c2006ca7 Export the actual KERNBASE to the symbol table. We can use nlist() to get
this without having to second guess it in userland.
2001-08-24 08:29:54 +00:00
Peter Wemm
5897d41109 Move cpu_fxsr definition to C code (so debug info is generated) and where
it is easily #ifdef'ed so that we dont miss unintentional references to it.
2001-08-24 08:27:24 +00:00
Warner Losh
662460d3d5 Move code to shutdown the pcic_pci_shutdown. Call it on system
shutdown and also before we get going with the device initialization.
This may fix the hangs some people are seeing on warmboot.  It appears
that some machines will reset the cardbus bridge on boot, while others
don't.  So we turn off the card, and ack the interrupts (which likely
is a nop in the shutdown case since we're still fielding interrupts).
This should turn off the interrupts.

Since I don't have hardware that hangs on reboot, I'm committing this
without testing that aspect of the patch (it causes no harm on my
Dell).
2001-08-24 07:43:35 +00:00
Warner Losh
9bec31a4c0 Two fixes. First, put into place a more generic chipset specific
initialization structure.  Warn the user for those chipsets that
aren't yet customized that they might not work.  Second, try to power
off the slot on attach and ack the interrupts.  I don't know, but this
might solve the hangs that people will see on Thinkpads if they set
hw.pcic.init_routing=1.
2001-08-24 07:30:18 +00:00
Nick Sayer
2afcd749c7 Get rid of redundant device_set_desc. Both the PCI and PCCARD versions
do this in the probe routine now.
2001-08-24 05:47:50 +00:00
Nick Sayer
fa081a357e In order for the MA301 to pass interrupts from the PCCard, you must
go into the PLX 9052's interrupt control register and turn on the magic
interrupt enable bit.

Partial thanks are due to OpenBSD for pointing out that the chip is a
PLX 9052 and pointing me to the datasheet PDF.
2001-08-24 02:14:26 +00:00
Robert Watson
670f6b2fc6 o Clarify comments in vaccess_acl_posix1e() ACL evaluation routine so
as to improve readability and accuracy.

Obtained from:	TrustedBSD Project
2001-08-24 01:41:42 +00:00
Nick Sayer
15d2a7c783 if_wi can be either pci (without pccard) or pccard 2001-08-23 23:58:49 +00:00
John Baldwin
b0b7cb508c Use witness_upgrade/downgrade for sx_try_upgrade/downgrade. 2001-08-23 22:51:22 +00:00
John Baldwin
8df70cb7a9 Whitespace nit. 2001-08-23 22:47:51 +00:00
John Baldwin
c19fe5e261 Add witness_upgrade() and witness_downgrade() for handling upgrades and
downgrades of shared/exclusive locks.
2001-08-23 22:47:05 +00:00
John Baldwin
d7c4536a55 Convert some KASSERT()'s into if (foo) panic() because they are testing
how locks are managed by the rest of the kernel, not verifying the internal
integrity of witness itself.
2001-08-23 22:44:47 +00:00
Dima Dorfman
98ec4706ee Correct the comment about bpfattach() to match reality.
PR:		29967
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-08-23 22:38:08 +00:00
Dima Dorfman
745bab7f84 Correct a typo in a comment: FIN_WAIT2 -> FIN_WAIT_2
PR:		29970
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-08-23 22:34:29 +00:00
John Baldwin
1432aa0c5e Add a new kernel option RESTARTABLE_PANICS. If this option is present,
then one can restart from a panic by resetting the panicstr variable to
NULL.  This commit conditionalizes the previously committed functionality
on this variable.  It also removes the __dead2 attribute from the panic()
function so that when one continues from a panic() the behavior will
be predictable.
2001-08-23 20:32:21 +00:00
Bill Paul
645ed1a78b Fix a bug in the ste_setmulti() routine. The NIC has 4 16-bit multicast
hash registers, not 2 32-bit ones. This would prevent the multicasr filter
from being programmed correctly in some cases.
2001-08-23 18:22:55 +00:00
Andrey A. Chernov
f6bf1abc1b Stupid error from my side in prev. commit: || -> && 2001-08-23 18:02:29 +00:00
John Baldwin
e2870579fa Clear the sx_xholder pointer when downgrading an exclusive lock. 2001-08-23 17:57:37 +00:00
Andrey A. Chernov
5d97bedb22 vn_stat(): if va_size (u_quad_t) > OFF_MAX, return EOVERFLOW, don't copy it
blindly to st_size
2001-08-23 17:56:48 +00:00
Andrey A. Chernov
2a31175b6e Copy yet one check for SEEK_END overflow 2001-08-23 17:12:42 +00:00
Andrey A. Chernov
6fb9fbceab Add yet one check for SEEK_END overflow 2001-08-23 17:09:23 +00:00
Andrey A. Chernov
db106eff39 lseek: fix check for vattr.va_size overflow. Check suggested by bde simple not
works with unsigned types.
2001-08-23 17:01:25 +00:00
Andrey A. Chernov
e02faad5ca Implement l_len<0 per POSIX check.
Check for valid l_whence too.
2001-08-23 16:13:59 +00:00
Andrey A. Chernov
ea4313e351 Copy my newly introduced l_len<0 'oops' fix from kern_lockf.c 2001-08-23 16:06:14 +00:00
Andrey A. Chernov
62be011ebd Oops, fix my broken handling of new l_len<0 case 2001-08-23 16:00:27 +00:00
Andrey A. Chernov
e3e2c03de3 Copy POSIX l_len<0 handling from kern_lockf.c 2001-08-23 15:44:24 +00:00
Andrey A. Chernov
f510e1c2ec Originally BSD return EINVAL for l_len < 0, but now POSIX wants it too,
so implement POSIX l_len < 0 handling.
2001-08-23 15:40:30 +00:00
Andrey A. Chernov
bbf6984cec Cosmetique: correct English in comments
non-cosmetique: add missing break; - original code was broken here
2001-08-23 14:45:31 +00:00
Andrey A. Chernov
6d24c65d96 Cosmetique: correct English in comments
Pointed by:	bde
2001-08-23 14:41:39 +00:00
Andrey A. Chernov
6c3f4fef64 Even better move: suppose that server is able to handle SEEK_END,
so check arguments for all but not SEEK_END case, leaving SEEK_END
handling for server
2001-08-23 14:21:26 +00:00
Andrey A. Chernov
e018907ed4 Apparently SEEK_END locking not supported by NFS. Previous variant
returns EINVAL in that case, change it to EOPNOTSUPP.
2001-08-23 14:09:16 +00:00
Andrey A. Chernov
b82f5b624c Cosmetique: more <sys/*> into one group, separate include families by
blank line
2001-08-23 13:51:17 +00:00
Andrey A. Chernov
fb2f187058 Move <machine/*> after <sys/*>
Pointed by:	bde
2001-08-23 13:27:58 +00:00
Andrey A. Chernov
b44af710d3 Move <machine/*> after <sys/*>
Pointed by:	bde
2001-08-23 13:21:17 +00:00
Andrey A. Chernov
4b207d9868 Move <machine/*> after <sys/*>
Add missing fdrop() before EOVERFLOW

Pointed by:	bde
2001-08-23 13:19:32 +00:00
Cameron Grant
4132a3b206 the feederchain builder is currently broken for recording channels. disable
it until it is fixed.  this limits recording to native formats and speeds
only.
2001-08-23 12:27:27 +00:00
Cameron Grant
334326a17f handle bogus values passed to SOUND_PCM_WRITE_CHANNELS/SNDCTL_DSP_CHANNELS
ioctls better- if 0 is passed, return the current setting.  if 1 or 2 are
passed, behave accordingly.  treat values >2 as 2.

PR:		kern/29964
2001-08-23 12:21:12 +00:00
Cameron Grant
48875621e1 make the 4dwave nx chip work
Submitted by:	Philippe Anel <xigh@noos.fr>
2001-08-23 12:02:29 +00:00
Cameron Grant
92f39b2c05 MFS: make SNDCTL_DSP_SETTRIGGER work 2001-08-23 11:58:38 +00:00
Cameron Grant
1662598f0c MFS: allow multiple opens of mixer devices 2001-08-23 11:56:07 +00:00
Cameron Grant
67b1dce3bc many changes:
* add new channels to the end of the list so channels used in order of
addition

* de-globalise definition of struct snddev_info and provide accessor
functions where necessary.

* move the $FreeBSD$ tag in each .c file into a macro and allow the
/dev/sndstat handler to display these when set to maximum verbosity to aid
debugging.

* allow each device to register its own sndstat handler to reduce the amount
of groping sndstat must do in foreign structs.
2001-08-23 11:30:52 +00:00
Andrey A. Chernov
4779017439 adv. lock:
copy EOVERFLOW handling code from main variant
fix type of 'size' arg
2001-08-23 08:54:22 +00:00
Andrey A. Chernov
e9d095afdc adv. lock:
detect off_t overflow _before_ it occurse and return EOVERFLOW instead of
EINVAL
2001-08-23 08:20:21 +00:00
Andrey A. Chernov
69cc1d0d7f Detect off_t EOVERFLOW of start/end offsets calculations for adv. lock,
as POSIX require.
2001-08-23 07:42:40 +00:00
Nick Sayer
499147571e Oops. The new pci_ids array should be static. 2001-08-23 03:06:16 +00:00
Peter Wemm
85ceedd60f Fix a #endif misplacement in 1.231 due to misapplied patch
Pointy hat to: peter
2001-08-23 01:50:31 +00:00
Peter Wemm
66875a2aff Fix a comment error that was fixed in the pc98 version. hw.maxmem is
really hw.physmem.
2001-08-23 01:49:12 +00:00