Commit Graph

71816 Commits

Author SHA1 Message Date
Sean Bruno
4470fe9dbe Minor updates as a precursor to fixing sbp_targ
firewire.c -- expand a comment and repair a typo
sbp.h -- define Logical Unit Reset so it can be used in sbp_targ

Reviewed by:	scottl@freebsd.org
2009-04-07 02:33:46 +00:00
Weongyo Jeong
9284d50989 Add an entry for the uath(4) module. 2009-04-07 01:37:50 +00:00
Marko Zec
1ed81b739e First pass at separating per-vnet initializer functions
from existing functions for initializing global state.

        At this stage, the new per-vnet initializer functions are
	directly called from the existing global initialization code,
	which should in most cases result in compiler inlining those
	new functions, hence yielding a near-zero functional change.

        Modify the existing initializer functions which are invoked via
        protosw, like ip_init() et. al., to allow them to be invoked
	multiple times, i.e. per each vnet.  Global state, if any,
	is initialized only if such functions are called within the
	context of vnet0, which will be determined via the
	IS_DEFAULT_VNET(curvnet) check (currently always true).

        While here, V_irtualize a few remaining global UMA zones
        used by net/netinet/netipsec networking code.  While it is
        not yet clear to me or anybody else whether this is the right
        thing to do, at this stage this makes the code more readable,
        and makes it easier to track uncollected UMA-zone-backed
        objects on vnet removal.  In the long run, it's quite possible
        that some form of shared use of UMA zone pools among multiple
        vnets should be considered.

	Bump __FreeBSD_version due to changes in layout of structs
	vnet_ipfw, vnet_inet and vnet_net.

Approved by:	julian (mentor)
2009-04-06 22:29:41 +00:00
John Baldwin
3429118095 When a stale file handle is encountered, purge all cached information about
an NFS node including the access and attribute caches.  Previously the NFS
client only purged any name cache entries associated with the file.

PR:		kern/123755
Submitted by:	Jaakko Heinonen  jh of saunalahti fi
Reported by:	Timo Sirainen  tss of iki fi
Reviewed by:	rwatson, rmacklem
MFC after:	1 month
2009-04-06 21:11:08 +00:00
John Baldwin
6e57ff1890 Add opt_kdtrace.h to fix standalone module build. 2009-04-06 20:17:28 +00:00
John Baldwin
a58158ef08 Change the default timeout for caching attributes of a directory in the NFS
client from 30 seconds to 3 seconds.  After the recent changes to add
caching of negative name cache lookups, a negative name cache hit will
persist until the client notices the parent directory has changed.  The
higher the attribute cache timeout on directories, the longer that can take,
so lower the default timeout for directories to match that of regular files.

Suggested by:	bde, mohans
MFC after:	1 month
2009-04-06 19:12:47 +00:00
Ed Schouten
2dae467d61 Reduce the dcons polling frequency to 25 Hz.
It makes little sense to use 100 Hz polling in dcons. We cannot live
without polling, because that's just how dcons works. It polls the
buffer filled by the firewire hardware. 25 Hz is probably enough for
most use cases.

Discussed with:	rwatson
Tested by:	kan
2009-04-06 13:09:02 +00:00
Weongyo Jeong
e4873cff7d connect uath(4) to the build. uath(4) should work on all architectures. 2009-04-06 12:43:40 +00:00
Robert Watson
4b4e58badf Add SDT DTrace probes for namei():
vfs:namei:lookup:entry takes parent directory vnode pointer, path to
    look up, and lookup flags.
  vfs:namei:lookup:return takes an error value, and if successful, the
    returned vnode pointer.

MFC after:      1 month
2009-04-06 10:32:40 +00:00
Alexander Kabaev
9ec7a1f568 Fix logic in MOD_LOAD handler to call dcons_attach after all successful
dcons_drv_init invocations. Testing return value for 0 does not work for
cases where dcons_drv_init was called already as part of low level
console initialization.
2009-04-06 02:29:28 +00:00
Andrew Thompson
6830af1a05 Remove usb_sw_transfer.[ch] which are now empty after r190735. 2009-04-06 00:32:54 +00:00
Andrew Thompson
fde875265f Provide a better commit log for r190735, forced by making a whitespace change.
Refactor how we interface with the root HUB. This is achieved by making a
direct call from usb2_do_request to the host controller for root hub requests,
this call will perform the controller specific register read/writes and return
the error code.

This cuts out a lot of code in the host controller files and saves one thread
per USB bus.

Submitted by:	Hans Petter Selasky
2009-04-06 00:22:49 +00:00
Alexander Kabaev
024a4bd626 If KTR_SUBSYS is compiled in, it does not necessarily mean that user
is interested in being spammed by mcast-related printfs.

Use proper check against ktr_mask instead KTR_COMPILE.
2009-04-05 23:25:06 +00:00
Ed Schouten
d2a0bb0803 Remove if_ppp(4) and if_sl(4).
Not only did these two drivers depend on IFF_NEEDSGIANT, they were
broken 7 months ago during the MPSAFE TTY import. if_ppp(4) has been
replaced by ppp(8). There is no replacement for if_sl(4).

If we see regressions in for example the ports tree, we should just use
__FreeBSD_version 800045 to check whether if_ppp(4) and if_sl(4) are
present. Version 800045 is used to denote the import of MPSAFE TTY.

Discussed with: rwatson, but also rwatson's IFF_NEEDSGIANT emails on the
                lists.
2009-04-05 22:08:18 +00:00
Nathan Whitehorn
029c6e958c Fix the build when KDB is disabled. The second instance of rfi in
trap_subr.S that is patched at runtime to rfid on 64-bit systems
is inside KDB-specific code, so don't patch it without KDB.
2009-04-05 21:52:13 +00:00
Nathan Whitehorn
8446b20662 Add an Open Firmware access module for real-mode OF accesses to the PowerPC
build. This is required for the IBM Mambo simulator, as well as a variety
of non-Apple PowerPC hardware.
2009-04-05 18:40:15 +00:00
Andrew Thompson
5cbbd666e1 Catch up with usb2_config struct layout changes. 2009-04-05 18:26:19 +00:00
Andrew Thompson
9f2b42e596 MFp4 //depot/projects/usb@160056
Remove code for unused and unlikely quirk, "uq_power_claim"

Submitted by:	Hans Petter Selasky
2009-04-05 18:22:13 +00:00
Andrew Thompson
afa07055be MFp4 //depot/projects/usb@160052
Wait until line configuration is complete before starting data transfers.

Submitted by:	Hans Petter Selasky
2009-04-05 18:22:03 +00:00
Andrew Thompson
de967835e0 MFp4 //depot/projects/usb@159995
- add support for more complicated HID descriptors which can have multiple
  definitions of the same field.
- remove old modulo patch in ums, which I think is due to bad HID parsing,
  which should be fixed now.

Reported by:	netchild
Submitted by:	Hans Petter Selasky
2009-04-05 18:21:51 +00:00
Andrew Thompson
65fd114d53 MFp4 //depot/projects/usb@159992
at91_udp.c does not exist anymore, it is now replaced by at91dci in
src/sys/dev/usb/controller. Also remove the ohci_atmelarm.c because it is also
included in src/sys/conf/files

Submitted by:	Sylvestre Gallon
2009-04-05 18:21:40 +00:00
Andrew Thompson
03797f3300 MFp4 //depot/projects/usb@159948
Add more debugging output on enumeration failures.

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:31 +00:00
Andrew Thompson
4565300d56 MFp4 //depot/projects/usb@159946
Some cancelable flags are always true.  Substitute these away. These cancelable
flags were mostly useful with the root HUB which is now handled differently.

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:21 +00:00
Andrew Thompson
3b01d5130c MFp4 //depot/projects/usb@159926
Minor code factorisation in atmegadci.c

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:08 +00:00
Andrew Thompson
c48fb077ea MFp4 //depot/projects/usb@159925
Cast variables properly for non-32-bit platforms.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:58 +00:00
Andrew Thompson
3930731567 MFp4 //depot/projects/usb@159922
Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:49 +00:00
Andrew Thompson
4eae601ebd MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
  "usb2_config" has a new field called "usb_mode" which select for which mode
  the current xfer entry is active. Options are: a) Device mode only b) Host
  mode only (default-by-zero) c) Both modes.  This change was scripted using
  the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
  the code for the function uses less memory than the table itself.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:38 +00:00
Andrew Thompson
3b52b6f172 MFp4 //depot/projects/usb@159908
Reduce the amount of memory used by better sizing buffer arrays.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:24 +00:00
Andrew Thompson
51ec16035f MFp4 //depot/projects/usb@159897
Add new endpoint direction values for use with usb2_config

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:13 +00:00
Andrew Thompson
63521bbc5a MFp4 //depot/projects/usb@159871
- bugfixes after the memory usage reduction patch
- Use "udev->pipes_max" instead of USB_EP_MAX
- Use correct "bmRequestType" for getting the config descriptor.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:03 +00:00
Andrew Thompson
bdd4120608 MFp4 //depot/projects/usb@159866
- memory usage reduction by only allocating the required USB pipes and USB
  interfaces.
- cleanup some USB parsing functions to be more flexible.

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:52 +00:00
Andrew Thompson
0ed53d4515 MFp4 //depot/projects/usb@159864
Fix possible deadlock with UGEN at detach.

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:42 +00:00
Andrew Thompson
dab47558c8 MFp4 //depot/projects/usb@159863
Speed up the endpoint descriptor search

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:30 +00:00
Andrew Thompson
7efaaa9a91 MFp4 //depot/projects/usb@159811
First patch in a series of memory save patches.

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:19 +00:00
Andrew Thompson
ab32485fd9 MFp4 //depot/projects/usb@159806
Properly name usb2_uref_location() so that it is not confused with
usb2_unref_location() .

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:10 +00:00
Andrew Thompson
9e6e0ec449 MFp4 //depot/projects/usb@159797
Remove unused field in "struct usb2_pipe".

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:00 +00:00
Andrew Thompson
684e3f2245 MFp4 //depot/projects/usb@159700
Get rid of the last CALLOUT_RETURNUNLOCKED reference.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:47 +00:00
Andrew Thompson
72b532e501 MFp4 //depot/projects/usb@159677
Remove redundant locking.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:36 +00:00
Andrew Thompson
eb846b4eb5 MFp4 //depot/projects/usb@159674
Fix more corner cases around reception of SETUP packets.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:25 +00:00
Andrew Thompson
f3464815ee MFp4 //depot/projects/usb@159673
Fix a corner case around stalling SETUP packets in device side mode.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:16 +00:00
Andrew Thompson
df075012e8 MFp4 //depot/projects/usb@159671
Fix interrupt register setting on the atmegadci controller.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:07 +00:00
Andrew Thompson
01e1df136a MFp4 //depot/projects/usb@159562
Reapply r190173 with compilation fixed on 64bit arches.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:01 +00:00
Dmitry Chagin
cd899aad76 Fix KBI breakage by r190520 which affects older linux.ko binaries:
1) Move the new field (brand_note) to the end of the Brandinfo structure.
2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer
   is valid.
3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old
   modules won't have the flag set, so the new field brand_note would be
   ignored.

Suggested by:	jhb
Reviewed by:	jhb
Approved by:	kib (mentor)
MFC after:	6 days
2009-04-05 09:27:19 +00:00
Alan Cox
beb3c3a9c5 Retire VM_PROT_READ_IS_EXEC. It was intended to be a micro-optimization,
but I see no benefit from it today.

VM_PROT_READ_IS_EXEC was only intended for use on processors that do not
distinguish between read and execute permission.  On an mmap(2) or
mprotect(2), it automatically added execute permission if the caller
specified permissions included read permission.  The hope was that this
would reduce the number of vm map entries needed to implement an address
space because there would be fewer neighboring vm map entries that differed
only in the presence or absence of VM_PROT_EXECUTE.  (See vm/vm_mmap.c
revision 1.56.)

Today, I don't see any real applications that benefit from
VM_PROT_READ_IS_EXEC.  In any case, vm map entries are now organized
as a self-adjusting binary search tree instead of an ordered list.  So,
the need for coalescing vm map entries is not as great as it once was.
2009-04-04 23:12:14 +00:00
Marcel Moolenaar
e9b3f3045d Perform a dummy stwcx. when we switch contexts. The context
being switched out may hold a reservation. The stwcx. will
clear the reservation. This is architecturally recommended.

The scenario this addresses is as follows:
1. Thread 1 performs a lwarx and as such holds a reservation.
2. Thread 1 gets switched out (before doing the matching
   stwcx.) and thread 2 is switched in.
3. Thread 2 performs a stwcx. to the same reservation granule.
   This will succeed because the processor has the reservation
   even though thread 2 didn't do the lwarx.

Note that on some processors the address given the stwcx. is
not checked. On these processors the mere condition of having
a reservation would cause the stwcx. to succeed, irrespective
of whether the addresses are the same. The dummy stwcx. is
especially important for those processors.
2009-04-04 22:23:03 +00:00
Marcel Moolenaar
b6f38367b7 Add sysarch.h. It's included by drm(4). 2009-04-04 22:05:36 +00:00
Marcel Moolenaar
b30f4a0436 First round of cleanups. There's a lot of NetBSDism in this header. 2009-04-04 22:03:19 +00:00
Marcel Moolenaar
48d6f243a6 Implement kernel core dump support for Book-E processors.
Both raw physical memory dumps and virtual minidumps are
supported. The default being minidumps.

Obtained from:	Juniper Networks
2009-04-04 22:01:43 +00:00
Alexander Kabaev
bb6418cbe3 Revert change 190655 temporarily. It breaks many setups where nullfs is
used and needs to be revisited.
2009-04-04 17:48:38 +00:00
Nathan Whitehorn
7bf5cfedfb Modularize the Macintosh built-in ATA along the lines of the rest of the
ATA system as an optional atamacio device.

PR:             powerpc/133161
Submitted by:   Bruce Cran
2009-04-04 17:05:17 +00:00