Commit Graph

41915 Commits

Author SHA1 Message Date
Poul-Henning Kamp
dee34ca4fc Add a close() method to a swapdev.
Add a GEOM based backend.

Remove the device/VOP_SPECSTRATEGY() based backend.
2003-08-30 16:44:26 +00:00
Poul-Henning Kamp
20da9c2eaf Protect the swapdevice tailq with a mutex.
Store the udev_t we will report to userland in the swdevt.
2003-08-30 16:10:28 +00:00
Poul-Henning Kamp
59efee01a3 Continue the objectification of the swapdev backends:
Remove the vnode and dev_t fields and replace them with a void *.

Introduce separate strategy functions for devices and regular (NFS)
vnodes.

For devices we don't need the vnode v_numoutput stuff.

Add a generic swaponsomething() function to add a swapdevice and
split the remainder of swaponvp() into swaponvp() and swapondev()
which calls this backend.
2003-08-30 11:33:25 +00:00
Poul-Henning Kamp
4b03903a46 Make the strategy function a method of the individual swapdev. 2003-08-30 09:42:00 +00:00
Poul-Henning Kamp
2f249180f5 Consistent use modern function definitions 2003-08-30 08:32:42 +00:00
Mark Murray
024351e027 Style fixes of the whitespace variety. Fix long lines and tabs. 2003-08-30 08:10:58 +00:00
Søren Schmidt
d7d54aa109 Add pst as a module 2003-08-30 08:01:05 +00:00
Warner Losh
0c15221610 More debug under boot verbose. 2003-08-29 23:25:00 +00:00
Warner Losh
b9baf113c1 Fix comment. 2003-08-29 23:24:41 +00:00
Alan Cox
411d10a600 Migrate the sf_buf allocator that is used by sendfile(2) and zero-copy
sockets into machine-dependent files.  The rationale for this
migration is illustrated by the modified amd64 allocator.  It uses the
amd64's direct map to avoid emphemeral mappings in the kernel's
address space.  On an SMP, the emphemeral mappings result in an IPI
for TLB shootdown for each transmitted page.  Yuck.

Maintainers of other 64-bit platforms with direct maps should be able
to use the amd64 allocator as a reference implementation.
2003-08-29 20:04:10 +00:00
Robert Watson
b50a132f22 More checking of M_PREPEND() return values: pass through link-layer
Appletalk code.  These changes are untested since I don't have
an Appletalk environment.
2003-08-29 19:27:09 +00:00
Robert Watson
2166ffe8e1 Introduce error checking for calls to M_PREPEND():
ether_output() when prepending netatalk AFA_PHASE2 llc headers (TRYWAIT).
  ether_output() when prepending ethernet header to a frame (DONTWAIT).
2003-08-29 19:12:18 +00:00
Hidetoshi Shimokawa
16acf1a3f1 Fix byte order of multi-byte scsi_status information. 2003-08-29 13:36:17 +00:00
Warner Losh
d029ead3cb When we went to the set_flags interface for the memory resource, we
switched from PCCARD_MEM_FOO to PCCARD_A_MEM_FOO, yet we didn't change
exca in all the right places.  Do so now.  Also use PCCARD_WIDTH_AUTO
rather than the magic cookie 0.
2003-08-29 05:27:36 +00:00
Nate Lawson
ad1fdf57d2 Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own. This
change also disables interrupts around non-S4 suspends whereas before we
did not do this.  Our version of AcpiEnterSleepStateS4bios was almost
identical to the ACPICA version.
2003-08-29 04:02:19 +00:00
Orion Hodson
99e082c84d Add Creative SB AudioPCI CT4730 rev A.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:27:26 +00:00
Orion Hodson
6f0182bd0c Add Creative EV1938.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:24:08 +00:00
Robert Watson
953222e210 Remove extra tabs indenting MAC library calls; they were there to
line up the function names in an earlier generation of the API when
some of the functions returned structure pointers.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-08-29 02:43:57 +00:00
Warner Losh
f8ba3dc6cb Remove unneeded field after CIS changes. 2003-08-29 00:25:50 +00:00
Marcel Moolenaar
23562e4bc6 In vnode_pager_generic_putpages(), change the printf format specifier
to long and explicitly cast field dirty of struct vm_page to unsigned
long. When PAGE_SIZE is 32K, this field is actually unsigned long.
2003-08-29 00:16:30 +00:00
Alan Cox
2370c6d40c Recent pmap changes permit the use of a more precise locking assertion
in vm_page_lookup().
2003-08-28 23:23:04 +00:00
Alan Cox
5d167c620a Eliminate the direct uses of vm_page_lookup() on the pte object. Instead,
apply PHYS_TO_VM_PAGE() to the physical address obtained from the page
table.

(This is based upon similar changes made to the amd64 and i386 pmaps and
a part of a long-term campaign to eliminate pte objects.)

Tested by:	wilko
2003-08-28 23:12:28 +00:00
Robert Watson
f19389746e Remove redundant initialization of rti; SLIST_FOREACH does that for
us.
2003-08-28 22:15:05 +00:00
John Baldwin
729d7ffbcf - Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.
- Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds
  the header type.
- Replace several magic numbers with appropriate constants for the header
  type register and a couple of PCI_FUNCMAX.
- Merge to amd64 the fix to the i386 bridge code to skip devices with
  unknown header types.

Requested by:	imp (1, 2)
2003-08-28 21:22:25 +00:00
John Baldwin
86889ca086 Add constants for capability IDs and header types.
Submitted by:	Samy Al Bahra <samy@kerneled.com>
2003-08-28 20:59:31 +00:00
Marcel Moolenaar
9e8147f3af In bufdone(), change the format specifier for m->valid and m->dirty to
a long type and explicitly cast m->valid and m->dirty to unsigned long.
When PAGE_SIZE is 32K, these fields are in fact unsigned long.
2003-08-28 19:58:11 +00:00
David E. O'Brien
d4aeb0ed01 Add sound support for the AMD64 8111 chip.
PR:		kern/55932
Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-08-28 19:21:21 +00:00
Nate Lawson
5a4d072c93 Minor style cleanups. 2003-08-28 16:30:31 +00:00
Nate Lawson
cacbbaa703 Style cleanups. 2003-08-28 16:26:24 +00:00
Nate Lawson
be2b179704 Style and whitespace changes. Also, make the ivar functions non-inline
since inlining failed due to the size of BUS_*
2003-08-28 16:06:30 +00:00
Alexander Kabaev
772a9659d9 Do not return with vnode interlock held.
Reviewed by:	rwatson
2003-08-28 15:48:15 +00:00
Yoshihiro Takahashi
65463a6400 Merged from sys/dev/sio/sio.c revisions 1.403 and 1.404. 2003-08-28 11:20:54 +00:00
Søren Schmidt
d7e9ef77f8 Be more carefull on nulling the ATAPI magic for fake slave.
Skip polling devices that keeps returning 0xff early (ie no HW there).
2003-08-28 09:15:05 +00:00
Søren Schmidt
07844fe49c Make sure to call start when retrying. 2003-08-28 08:22:53 +00:00
Jeff Roberson
9dbfeb0ae6 - Move BX_BKGRDWAIT and BX_BKGRDINPROG to BV_ and the b_vflags field.
- Surround all accesses of the BKGRD{WAIT,INPROG} flags with the vnode
   interlock.
 - Don't use the B_LOCKED flag and QUEUE_LOCKED for background write
   buffers.  Check for the BKGRDINPROG flag before recycling or throwing
   away a buffer.  We do this instead because it is not safe for us to move
   the original buffer to a new queue from the callback on the background
   write buffer.
 - Remove the B_LOCKED flag and the locked buffer queue.  They are no longer
   used.
 - The vnode interlock is used around checks for BKGRDINPROG where it may
   not be strictly necessary.  If we hold the buf lock the a back-ground
   write will not be started without our knowledge, one may only be
   completed while we're not looking.  Rather than remove the code, Document
   two of the places where this extra locking is done.  A pass should be
   done to verify and minimize the locking later.
2003-08-28 06:55:18 +00:00
Warner Losh
39c50d587a A number of minor fixes to the mapping of memory. This should help
reading the CIS on some cards.  However, not all just yet.  This makes
at least some of the xircom cards that weren't working to work.  It
doesn't make my home and away card work, however.

o Don't get the card offset wrong.  This is the biggest hassle for
  reading the CIS.  The old code was just so wrong I can't believe that
  it worked at all.
o Don't set the bit that allows/forces 16-bit memory access to the
  memory.  It is hard coded with 0x80.
o Don't need to slow down memory access with wait-states.  OLDCARD didn't
  need them and it doesn't hurt anything.
o remove bogus grousying in comment.
2003-08-28 05:01:11 +00:00
Thomas Quinot
c8fb1af26c Add missing braces. Fixes boot-time kernel panic with ATAng and ATAPI/CAM.
Reviewed by:	roberto
2003-08-28 03:56:04 +00:00
Nate Lawson
b5b965a529 Remove a duplicate comment.
Pointed out by:	bde
2003-08-28 03:54:49 +00:00
Marcel Moolenaar
fccf82902d The valid field in struct vm_page can be of type unsigned long when
32K pages are selected. In spec_getpages() change the printf format
specifier and add an explicit cast so that we always print the field
as a long type.
2003-08-28 01:52:14 +00:00
Jeff Roberson
7637e5854b - Clean-up comments that refer to the use of B_LOCKED. 2003-08-28 00:56:39 +00:00
Jeff Roberson
7abc12de03 - In LCK_BUF() simply change the owner of the buf to the kernel.
- In ULCK_BUF we no longer need to acquire the lock, just write the buf out.
 - The combination of these changes eliminates one more use of B_LOCKED which
   is in the way of making the buffer cache SMP safe.  In the long term
   ext2fs should probably not try to optimize the use of their metadata bufs
   with a private cache.  This will starve the rest of the system for buffers
   in the extreme case.

Discussed with:	bde (A long time ago..)
Tested on:	md disk/x86
2003-08-28 00:52:23 +00:00
Warner Losh
289dc689c6 Fix location of $FreeBSD$ from last commit. 2003-08-27 23:30:01 +00:00
Prafulla Deuskar
3a47a99d78 Add support for new devices.
Bug Fixes:
	- Allow users to use LAA
	- Remember promiscuous mode settings while bridging
	- Allow gratuitous arp's to be sent

PR:		52966/54488
MFC after:	1 week
2003-08-27 21:52:37 +00:00
Søren Schmidt
61f07fc6ca Return the translated result code from ATA/ATAPI commands. 2003-08-27 15:27:56 +00:00
Søren Schmidt
1d68703f6a Hopefully Fix problem with probing some ATAPI devices, while still
trying to avoid the "fake slave" problem.
2003-08-27 11:21:30 +00:00
Martin Blapp
4a80e74bf3 All davicom cards seem to need DC_TX_ALIGN. 2003-08-27 08:13:34 +00:00
Hidetoshi Shimokawa
b87da29dd4 Reserve 184 for dumb console driver(dcons) which can be found in
ports/devel/dcons.
2003-08-27 07:35:12 +00:00
Warner Losh
a1e145b47d add debug to pcic memory mapping routine 2003-08-27 04:17:02 +00:00
Robert Watson
a6a65b05d5 Fix a mac_policy_list reference to be a mac_static_policy_list
reference: this fixes mac_syscall() for static policies when using
optimized locking.

Obtained from:	TrustedBSD Project
Sponosred by:	DARPA, Network Associates Laboratories
2003-08-26 17:29:02 +00:00
Jacques Vidrine
1855be730c Revision 1.126 broke the interface of the bktr driver's
METEORSSIGNAL ioctl.  Applications use this ioctl with the value
METEOR_SIG_MODE_MASK (0xFFFF0000, -65536) to reset signal delivery,
but revision 1.126 caused the driver to return EINVAL in this case.
Interestingly, the same METEORSSIGNAL ioctl in the meteor driver uses
0 to reset signal delivery.

This commit allows METEOR_SIG_MODE_MASK as a synonym for 0 in the
bktr driver, and restructures the code a bit so that it is otherwise
identical between the bktr and meteor drivers.
2003-08-26 16:57:24 +00:00