Commit Graph

36547 Commits

Author SHA1 Message Date
Scott Long
dc67dad8b1 Add a routine for testing memory mapped register access.
This will hopefully detect things like buggy via chipsets
so that the OSM can fallback to using I/O mapped access
when memory mapped I/O simply will not work.

Approved by:	re (blanket)
2002-11-30 19:13:55 +00:00
Scott Long
24dd01c695 Always compile in the AHC_ALLOW_MEMIO code, but only try MEMIO if
AHC_ALLOW_MEMIO is set, or the hint hint.ahc.N.allow_memio=1 is
set in the bootloader.

Make use of ah?_pci_test_register_access().

Approved by:	re (blanket)
2002-11-30 19:11:44 +00:00
Scott Long
a3a33a2bcb Handle changes to SCB_CONTROL, scb->flags and SEQ_FLAGS
Approved by:	re (blanket)
2002-11-30 19:08:58 +00:00
Scott Long
3cb8be933d Use the new ahc_scb_timer_reset API
Remove AHC_ALLOW_MEMIO

Approved by:	re (blanket)
2002-11-30 19:06:24 +00:00
Kirk McKusick
31574422a3 Add a check to disable the previous patch so that future filesystems
that choose to place their superblocks in non-standard locations will
not get them smashed.

Sponsored by:   DARPA & NAI Labs.
2002-11-30 19:04:57 +00:00
Kirk McKusick
c6964d3bc9 Remove a race condition / deadlock from snapshots. When
converting from individual vnode locks to the snapshot
lock, be sure to pass any waiting processes along to the
new lock as well. This transfer is done by a new function
in the lock manager, transferlockers(from_lock, to_lock);
Thanks to Lamont Granquist <lamont@scriptkiddie.org> for
his help in pounding on snapshots beyond all reason and
finding this deadlock.

Sponsored by:   DARPA & NAI Labs.
2002-11-30 19:00:51 +00:00
Scott Long
b8e89ffabc Add support for the Olivetti branded EISA boards.
Approved by:	re (blanket)
2002-11-30 18:00:43 +00:00
Alan Cox
0d51d232e5 Assert that the page queues lock is held in pmap_page_exists_quick().
Approved by:	re (blanket)
2002-11-30 17:46:59 +00:00
Kirk McKusick
63cf5b0ee2 Fix two deadlocks in snapshots:
1) Release the snapshot file lock while suspending the system. Otherwise
   a process trying to read the lock may block on its containing directory
   preventing the suspension from completing. Thanks to Sean Kelly
   <smkelly@zombie.org> for finding this deadlock.

2) Replace some bdwrite's with bawrite's so as not to fill all the
   buffers with dirty data. The buffers could not be cleaned as the
   snapshot vnode was locked hence the system could deadlock when
   making snapshots of really massive filesystems. Thanks to
   Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> for figuring
   this out.

Sponsored by:   DARPA & NAI Labs.
2002-11-30 07:27:12 +00:00
Warner Losh
304f10ce4a devd kernel improvements:
1) Record all device events when devctl is enabled, rather than just when
   devd has devctl open.  This is necessary to prevent races between when
   a device arrives, and when devd starts.
2) Add hw.bus.devctl_disable to disable devctl, this can also be set as a
   tunable.
3) Fix async support. Reset nonblocking and async_td in open.  remove
   async flags.
4) Free all memory when devctl is disabled.

Approved by: re (blanket)
2002-11-30 00:49:43 +00:00
Mike Barcroft
b8001d2f15 Conditionalize a GCCism.
Approved by: re
2002-11-29 23:49:27 +00:00
Marcel Moolenaar
4ea25f94be Implement bus_space_subregion(). Identical to i386.
Approved by: re (carte blanc)
2002-11-29 20:14:03 +00:00
Marcel Moolenaar
ddc6d86ca3 Better handle sparse physical memory: Don't use the address range
as a measure for available memory to scale the VHPT. Instead, use
the previously determined Maxmem.

Approved by: re (carte blanc)
2002-11-29 20:10:21 +00:00
Kirk McKusick
fa5d33e242 Check to make sure that the fs_sblockloc field was properly updated
before using it to write the superblock. This is to guard against
accidentally trashing the disklabel if the superblock format missed
being upgraded by the new kernel.

Reported by:	Sam Leffler <sam@errno.com>
Sponsored by:   DARPA & NAI Labs.
Approved by:	Murray Stokely <murray@FreeBSD.org>
2002-11-29 19:20:15 +00:00
Yaroslav Tykhiy
b7c8a7976f Release the reference to the peripheral if returning a error.
That reference is to be held only if daopen() has been successful
and until daclose() releases it.  daclose() won't be called if
daopen() has failed, though.

Approved by:	re, njl
MFC after:	1 week
2002-11-29 15:40:10 +00:00
Mike Barcroft
af084166b5 Fix the standards case by referring to __fds_bits instead of fds_bits
in FD_*() macros.

Submitted by:	Marc Recht <marc@informatik.uni-bremen.de>
Approved by:	re
2002-11-28 15:34:32 +00:00
Mike Barcroft
dda9f92465 Remove the <sys/types.h> prerequisite for <ucontext.h> by including
<sys/_types.h> in <sys/signal.h>.

Approved by:	re
2002-11-28 15:32:49 +00:00
Alan Cox
fdff30d256 Use pmap_remove_all() instead of pmap_remove() before freeing the page
in vm_pgmoveco(); the page may have more than one mapping.  Hold the page
queues lock when calling pmap_remove_all().

Approved by:	re (blanket)
2002-11-28 08:44:26 +00:00
Alan Cox
e80b7b691e Lock page field accesses in mincore().
Approved by:	re (blanket)
2002-11-28 08:01:39 +00:00
Robert Watson
69e979c3c4 Reclaim major number 182 which I allocated for mdsio. It was decided
that this should become a line discipline for sio rather than a
separate driver.
2002-11-28 04:29:52 +00:00
Scott Long
29dcbe8760 Revisit the printf format fixes for alpha. intmax_t doesn't exist in
RELENG_4, so cast to u_long in order to stay compatible.

Approved by: re	(blanket)
2002-11-28 04:09:29 +00:00
Marcel Moolenaar
aef78848af Remove a left-over virtual mapping of uncached I/O port space.
Previous kernels unwantingly depended on this mapping, but as
of version 1.123 of src/sys/ia64/ia64/machdep.c this dependency
has been removed. Consequently, one has to update the kernel
before updating the loader. The documented/recommended upgrade
will suffice in this case.

Due to a visible (from the kernels point of view) change in
behaviour, bump the loader version number from 0.3 to 1.0.

Approved by: re (carte blanc)
2002-11-28 03:25:51 +00:00
Noriaki Mitsunaga
e8c1847f37 Uncomment out the lines of {ncv,ncr53c500,tmc18c30}_pccard.c .
They now support NEWCARD and compiles with GENERIC kernel.

Approved by:	re
2002-11-28 01:17:48 +00:00
Noriaki Mitsunaga
3e4be4cbf1 o Changes to support NEWCARD.
o Add needed headers.
        o Add stg_products[] product data and stg_match() function.
        o Change stg_pccard_method[] to support both OLDCARD and NEWCARD.

Approved by:	re
2002-11-28 01:15:01 +00:00
Noriaki Mitsunaga
4a42958a2b o Changes to support NEWCARD.
o Add needed headers.
        o Add ncv_products[] product data and ncv_match() function.
        o Change ncv_pccard_method[] to support both OLDCARD and NEWCARD.

Suggestion for REX-5572 matching part by imp.

Approved by:	re
2002-11-28 01:13:58 +00:00
Noriaki Mitsunaga
922019c24b o Changes to support NEWCARD.
o Add needed headers.
	o Add nsp_producs[] product data and nsp_match() function.
	o Change nsp_pccard_method[] to support both OLDCARD and NEWCARD.
	o Add warning to fall back to PIO mode when it cannot use SMIT mode.
	  This is needed because memories are not allocated with NEWCARD now.

Submitted by:	takawata
Approved by:	re
2002-11-28 01:09:29 +00:00
Noriaki Mitsunaga
a11d8d7097 regen to 1.38
Reviewed by:	imp
Approved by:	re
2002-11-28 01:00:40 +00:00
Noriaki Mitsunaga
3c3dc1cf2e o Add PC-Cards' ID or CIS strings which are supported by ncv, nsp,
or stg driver. They are,

Macnica mPS110, PANASONIC(KME) KXLC004, Qlogic Fast SCSI,
Workbit Ultra Ninja-16, (ID based)

Future Domain SCSI2GO, IBM SCSI PCMCIA card, I-O DATA CBSC16,
Macnica mPS100, Newmedia BASICS-SCSI, RATOC REX-5536, RATOC REX-5536AM,
RATOC REX-5536M, RATOC REX5572, Workbit NinjaSCSI-3
(CIS based)

  Note: We need vendor IDs WORKBIT2 and IODATA3 which is -1, since some
        cards does not have IDs in the CIS and fails to be probed without
	this fake vendor IDs.

o Change the strings of RATOC REX_R280 from REX-R280 to REX-R280/REX-9530.
  This reminds us that REX-R280 and REX-R9530 have same ID (same product).

Reviewed by:	imp
Approved by:	re
Obtained from:	/etc/defaults/pccard.conf,
		List of CIS tupples by Toshihiko ARAI and PAO project:
			http://www.linkclub.or.jp/~clover/cis/
Change suggestion by:	HASEGAWA Tomoki <thasegawa@mta.biglobe.ne.jp>
			for I-O DATA CBSC16 entry
2002-11-28 00:57:47 +00:00
John Baldwin
a303783836 Enable UFS2 support in boot1. Just as with sparc64 the same boot1 works
great with both UFS1 and UFS2 filesystems.

Approved by:	re
2002-11-27 20:13:15 +00:00
Alan Cox
85e0124324 Hold the page queues lock when performing pmap_clear_modify().
Approved by:	re (blanket)
2002-11-27 19:51:48 +00:00
Mitsuru IWASAKI
21b5fd3cfd Resolve conflicts arising from the ACPI CA 20021118 import. 2002-11-27 18:09:20 +00:00
Mitsuru IWASAKI
360aac4e22 This commit was generated by cvs2svn to compensate for changes in r107325,
which included commits to RCS files with non-trunk default branches.
2002-11-27 18:07:48 +00:00
Mitsuru IWASAKI
716b1ee2b9 Vendor import of the Intel ACPI CA 20021118 drop.
Approved by:	re
2002-11-27 18:07:48 +00:00
Warner Losh
3a28284461 Need more parens here.
Approved by: re (blanket)
2002-11-27 17:30:41 +00:00
Robert Drehmel
f85a961930 Do not set a variable (vp->p_pollinfo) to NULL if we know
it already has that value.

Approved by:	re
2002-11-27 16:45:54 +00:00
David E. O'Brien
6380ce4de1 Fix for non-GCC compilers.
Approved by:	re (jhb)
2002-11-27 16:28:18 +00:00
Maxim Konovalov
8819f45b51 Small SO_RCVTIMEO and SO_SNDTIMEO values are mistakenly taken to be zero.
PR:		kern/32827
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
Approved by:	re (jhb)
MFC after:	2 weeks
2002-11-27 13:34:04 +00:00
Mitsuru IWASAKI
3fd2b0260e Disable debug output from acpi_pci_link.
There were no serious problem reports on this in spite of my concern.

To get debug output from acpi_pci_link, just enable bootverbose flag
in usual manner (boot -v).

Approved by:	re
2002-11-27 09:32:24 +00:00
Alan Cox
3a199de3d9 Hold the page queues lock while performing pmap_page_protect().
Approved by:	re (blanket)
2002-11-27 08:03:24 +00:00
Scott Long
7fc23fe669 Minor updates to the aicasm:
aicasm_gram.y:
	Use a direct move from allzeros to emulate a
	mvi of 0.

aicasm_insformat.h:
	sync $Id$

aicasm_symbol.c:
	Minor header change.

Approved by:	re (blanket)
2002-11-27 07:06:43 +00:00
Warner Losh
e7b01d0727 Xircom cards store the MAC address in the CIS, so get it from the new
pci_get_ether accesor, which gets it from the CIS for cardbus cards
(and from other pci-like buses via whatever mechanism is used there).

Submitted by: sam
Approved by: re (blanket)
2002-11-27 07:04:10 +00:00
Warner Losh
fbe9cff112 Implement PCI_IVAR_ETHADDR. Cardbus has the MAC addr in the CIS,
sometimes, so return it when requested and it does.  Also a little
more infrastructure for a few other things.

Submitted by: sam
Approved by: re (blanket for NEWCARD)
2002-11-27 06:56:29 +00:00
Warner Losh
ba5fc4eed2 Add a new cardbus specific ivar: PCI_IVAR_ETHADDR. Some pci-like
buses support querying the MAC address in a standard-for-that-bus way.
The base pci bus returns NULL for this IVAR always.

Submitted by: sam
Approved by: re (blanket for NEWCARD)
2002-11-27 06:41:28 +00:00
Warner Losh
53662117cc MFp4:
Fix a bug with the 3.3V code for the ricoh bridges.  I got the bit
detect backwards.  Also, we can only detect 3.3V cards when the GPI
interrupt is disabled.  So when it is enabled assume 5.0V card.

Obtained from: NetBSD (takemura-san from patches by ngc@ff.iij4u.or.jp)
Approved by: re (blanket)
2002-11-27 06:04:49 +00:00
Tim J. Robbins
fef82663b8 o Initialise each mbuf's m_len to 0 in m_getm(); mb_put_mem() depends
on this.
o Update the `cur' pointer in the cluster loop in m_getm() to avoid
  incorrect truncation and leaked mbufs.

Reviewed by:	bmilekic
Approved by:	re
2002-11-27 04:26:00 +00:00
Warner Losh
647501a046 Make the rman_{get,set}_* macros into real functions. The macros
create an ABI that encodes offsets and sizes of structures into client
drivers.  The functions isolate the ABI from changes to the resource
structure.  Since these are used very rarely (once at startup), the
speed penalty will be down in the noise.

Also, add r_rid to the structure so that clients can save the 'rid' of
the resource in the struct resource, plus accessor functions.  Future
additions to newbus will make use of this to present a simplified
interface for resource specification.

Approved by: re (jhb)
Reviewed by: jhb, jake
2002-11-27 03:55:22 +00:00
Kirk McKusick
ada981b228 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
Tim J. Robbins
bd32b70236 Fix a fatal typo introduced in revision 1.13 that caused the mbuf chains to
be created incorrectly for requests larger than NB_SORECEIVE_CHUNK bytes.

Approved by:	re
2002-11-26 23:53:28 +00:00
Julian Elischer
f2ec255a33 fixes for this driver:
1) "ubt" driver did not work when system is booted with the device attached
2) missing "break;" in ubt_rcvmsg() function;

Submitted by: Maksim Yevmenkin <Maksim.Yevmenkin@cw.com>
Approved by: re (jhb)
2002-11-26 18:30:45 +00:00
Cameron Grant
00acb1337e (hopefully) fix build breakage some people are seeing
Approved by:	re
2002-11-26 18:16:27 +00:00