]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAdd 3 new cards that I found today in akihabara...
Warner Losh [Wed, 11 Mar 2009 07:22:11 +0000 (07:22 +0000)]
Add 3 new cards that I found today in akihabara...

Toshiba LANCT00A
TDK LAK-CD011
TJ PTJ-LAN/T PC-NIC ENCC 990010759-001A

15 years agoHack: *Temporarily* disable reading extended attributes from disk, as
Tim Kientzle [Wed, 11 Mar 2009 05:11:57 +0000 (05:11 +0000)]
Hack: *Temporarily* disable reading extended attributes from disk, as
it seems to be badly broken on ZFS.

15 years agoMFp4 //depot/projects/usb 158981,159016,159024
Andrew Thompson [Wed, 11 Mar 2009 04:58:21 +0000 (04:58 +0000)]
MFp4 //depot/projects/usb 158981,159016,159024

Sync support for ATMEGA DCI parts.

Submitted by: Hans Petter Selasky

15 years agoFix a possible NULL pointer access at controller attach.
Andrew Thompson [Wed, 11 Mar 2009 04:56:30 +0000 (04:56 +0000)]
Fix a possible NULL pointer access at controller attach.

Submitted by: Hans Petter Selasky

15 years agoChange the PVO zone for fictitious pages to the unmanaged PVO zone, to match
Nathan Whitehorn [Wed, 11 Mar 2009 03:19:19 +0000 (03:19 +0000)]
Change the PVO zone for fictitious pages to the unmanaged PVO zone, to match
the unmanaged flag set in the PVO attributes. Without doing this,
pmap_remove() could try to remove fictitious pages (like those created
by mmap of physical memory) from the wrong UMA zone, causing a panic.

Reported by: Justin Hibbits
MFC after: 1 week

15 years agoo disallow write to RedBoot and FIS directory partitions; these are painful
Sam Leffler [Wed, 11 Mar 2009 01:12:52 +0000 (01:12 +0000)]
o disallow write to RedBoot and FIS directory partitions; these are painful
  to resurrect (maybe honor foot shooting bit in kern.geom_debugflags)
o fix match macro so we now recognize we want to merge FIS dir with RedBoot
  config parameters even if we don't actually do it

15 years agoAdd INP_INHASHLIST flag for inpcb->inp_flags to indicate whether
Robert Watson [Wed, 11 Mar 2009 00:29:22 +0000 (00:29 +0000)]
Add INP_INHASHLIST flag for inpcb->inp_flags to indicate whether
or not the inpcb is currenty on various hash lookup lists, rather
than using (lport != 0) to detect this.  This means that the full
4-tuple of a connection can be retained after close, which should
lead to more sensible netstat output in the window between TCP
close and socket close.

MFC after: 2 weeks

15 years agoswitch to !legacy usb stack
Sam Leffler [Wed, 11 Mar 2009 00:12:45 +0000 (00:12 +0000)]
switch to !legacy usb stack

15 years agoPrefer ENETDOWN to ENXIO when returning queuing errors due to a link
Robert Watson [Tue, 10 Mar 2009 22:35:45 +0000 (22:35 +0000)]
Prefer ENETDOWN to ENXIO when returning queuing errors due to a link
down, interface down, etc, with if_cxgb's if_transmit routine.

MFC after: 3 days
Reviewed by: kmacy

15 years agochoose the size of the last region for d_stripsize instead of the first;
Sam Leffler [Tue, 10 Mar 2009 22:29:42 +0000 (22:29 +0000)]
choose the size of the last region for d_stripsize instead of the first;
this fixes geom_redboot on boards that have multiple parts/regions as it
uses the value to locate the FIS directory which is in the last erase
region of flash

15 years agoRestore blank line removed when fixing my earlier botch. Never do
Warner Losh [Tue, 10 Mar 2009 22:04:52 +0000 (22:04 +0000)]
Restore blank line removed when fixing my earlier botch.  Never do
just one last change before bed...

Pointy had to: imp

15 years agoconfigure flash support
Sam Leffler [Tue, 10 Mar 2009 21:49:51 +0000 (21:49 +0000)]
configure flash support

15 years agoadd IXP4XX_FLASH_SIZE config knob that can be used to override the default
Sam Leffler [Tue, 10 Mar 2009 21:49:22 +0000 (21:49 +0000)]
add IXP4XX_FLASH_SIZE config knob that can be used to override the default
flash size; this is necessary at the moment because we map all of flash at
boot, eventually we'll do this on the fly

15 years agomap CS0 on 2358 so flash is accessible
Sam Leffler [Tue, 10 Mar 2009 21:47:17 +0000 (21:47 +0000)]
map CS0 on 2358 so flash is accessible

15 years ago- Make maxpipekva a signed long rather than an unsigned long as overflow
John Baldwin [Tue, 10 Mar 2009 21:28:43 +0000 (21:28 +0000)]
- Make maxpipekva a signed long rather than an unsigned long as overflow
  is more likely to be noticed with signed types.
- Make amountpipekva a long as well to match maxpipekva.

Discussed with: bde

15 years agoIn the ABI shim for vfs.bufspace, rather than truncating values larger than
John Baldwin [Tue, 10 Mar 2009 21:27:15 +0000 (21:27 +0000)]
In the ABI shim for vfs.bufspace, rather than truncating values larger than
INT_MAX to INT_MAX, just go ahead and write out the full long to give an
error of ENOMEM to the user process.

Requested by: bde

15 years agoReflect license change from NetBSD.
Xin LI [Tue, 10 Mar 2009 21:13:26 +0000 (21:13 +0000)]
Reflect license change from NetBSD.

Obtained from: NetBSD

15 years agoMake sure HID has a default usage, this fixes recent mouse problems.
Andrew Thompson [Tue, 10 Mar 2009 19:35:41 +0000 (19:35 +0000)]
Make sure HID has a default usage, this fixes recent mouse problems.

Tested by: Renato Botelho
Tested by: beech (earlier version)
Submitted by: Hans Petter Selasky

15 years agomark device capable of vlan-size frames
Sam Leffler [Tue, 10 Mar 2009 19:35:37 +0000 (19:35 +0000)]
mark device capable of vlan-size frames

Obtained from: netbsd

15 years agoUpdate the Chelsio driver to the latest bits from Chelsio
George V. Neville-Neil [Tue, 10 Mar 2009 19:22:45 +0000 (19:22 +0000)]
Update the Chelsio driver to the latest bits from Chelsio

Firmware upgraded to 7.1.0 (from 5.0.0).
T3C EEPROM and SRAM added; Code to update eeprom/sram fixed.
fl_empty and rx_fifo_ovfl counters can be observed via sysctl.
Two new cxgbtool commands to get uP logic analyzer info and uP IOQs
Synced up with Chelsio's "common code" (as of 03/03/09)

Submitted by:  Navdeep Parhar at Chelsio
Reviewed by: gnn
MFC after: 2 weeks

15 years agoturn off inclusion of FCS in rx'd frames; we don't use it anywhere and
Sam Leffler [Tue, 10 Mar 2009 19:18:11 +0000 (19:18 +0000)]
turn off inclusion of FCS in rx'd frames; we don't use it anywhere and
dhclient gets annoyed when it receives FCS in frames via bpf

15 years agoo add missing bus_release_resource and bus_deactivate_resource that just
Sam Leffler [Tue, 10 Mar 2009 19:15:35 +0000 (19:15 +0000)]
o add missing bus_release_resource and bus_deactivate_resource that just
  operate on the resource (we have no local resources to manage); this
  fixes drivers that alloc/release resources in their probe method and
  then do it again in attach
o while here add some prints to catch failures and massage style a bit

15 years ago- Remove code to set SAVENAME for CREATE or RENAME requests that get a -ve
John Baldwin [Tue, 10 Mar 2009 18:41:06 +0000 (18:41 +0000)]
- Remove code to set SAVENAME for CREATE or RENAME requests that get a -ve
  hit in the name cache.  cache_lookup() doesn't actually return ENOENT
  for such requests to force the filesystem to do an explicit lookup, so
  this was effectively dead code.
- Grab the nfsnode mutex while writing to n_dmtime.  We don't grab the lock
  when comparing the time against the cached directory mod time (just as
  we don't when comparing ctime's for +ve name cache hits) since the
  attribute caching is already racy for NFS clients as it is.

Discussed with: bde

15 years agoRemove unused v6 macro aliases for inpcb fields:
Robert Watson [Tue, 10 Mar 2009 17:57:41 +0000 (17:57 +0000)]
Remove unused v6 macro aliases for inpcb fields:

        in6p_ip6_nxt
        in6p_vflag
        in6p_flags
        in6p_socket
        in6p_lport
        in6p_fport
        in6p_ppcb

Remove unused v6 macro aliases for inpcb flags:

        IN6P_HIGHPORT
        IN6P_LOWPORT
        IN6P_ANONPORT
        IN6P_RECVIF
        IN6P_MTUDISC
        IN6P_FAITH
        IN6P_CONTROLOPTS

References to in6p_lport and in6_fport in sockstat are also replaced with
normal inp_lport and inp_fport references.

MFC after: 3 days
Reviewed by: bz

15 years agoComplete removal of cardbus_write_ivar which was left hanging.
George V. Neville-Neil [Tue, 10 Mar 2009 17:54:04 +0000 (17:54 +0000)]
Complete removal of cardbus_write_ivar which was left hanging.

15 years agoDon't print inm_print() chatter when KTR_IGMPV3 is not enabled
Bruce M Simpson [Tue, 10 Mar 2009 17:48:49 +0000 (17:48 +0000)]
Don't print inm_print() chatter when KTR_IGMPV3 is not enabled
in the KTR_COMPILE mask.

Found by: gnn

15 years agobring in ddb "show gpio" support from Cambria branch
Sam Leffler [Tue, 10 Mar 2009 17:19:45 +0000 (17:19 +0000)]
bring in ddb "show gpio" support from Cambria branch

15 years agoSmall cleanup of memory resource allocation from Cambria branch:
Sam Leffler [Tue, 10 Mar 2009 17:16:16 +0000 (17:16 +0000)]
Small cleanup of memory resource allocation from Cambria branch:
o encode need for A4 bus space tag hackery according to the memory
  address; checking for "uart" breaks down with the GPS chip support
  which is also a uart but does not require the same hackery
o encode the correct memory window instead of carving up all of i/o
  space, potentially with a larger window than a device should have;
  this likely should be handled in the drivers by using a proper bus
  alloc call but since some drivers depend on the bus support to figure
  this out we cannot simply mod them
o add optional GPS and RS485 support (conditionally as the support
  isn't ready yet)

15 years ago- Remove a recently added comment from kernel_sysctlbyname() that isn't
John Baldwin [Tue, 10 Mar 2009 17:00:28 +0000 (17:00 +0000)]
- Remove a recently added comment from kernel_sysctlbyname() that isn't
  needed.
- Move the release of the sysctl sx lock after the vsunlock() in
  userland_sysctl() to restore the original memlock behavior of
  minimizing the amount of memory wired to handle sysctl requests.

MFC after: 1 week

15 years agocatch up with r189306; handle delayed activation of resources
Sam Leffler [Tue, 10 Mar 2009 16:42:49 +0000 (16:42 +0000)]
catch up with r189306; handle delayed activation of resources

Submitted by: jhb

15 years agoRemove these files, they refer to module bundles that do not exist anymore.
Andrew Thompson [Tue, 10 Mar 2009 15:54:37 +0000 (15:54 +0000)]
Remove these files, they refer to module bundles that do not exist anymore.

15 years agoUpdate libusb.3 name and add mlinks for usb.3 and libusb20.3
Andrew Thompson [Tue, 10 Mar 2009 15:49:43 +0000 (15:49 +0000)]
Update libusb.3 name and add mlinks for usb.3 and libusb20.3

15 years agoAdd an ABI compat shim for the vfs.bufspace sysctl for sysctl requests that
John Baldwin [Tue, 10 Mar 2009 15:26:50 +0000 (15:26 +0000)]
Add an ABI compat shim for the vfs.bufspace sysctl for sysctl requests that
try to fetch it as an int rather than a long.  If the current value is
greater than INT_MAX it reports a value of INT_MAX.

15 years agoUpdate top and systat for vfs.bufcache now being a long rather than an int.
John Baldwin [Tue, 10 Mar 2009 15:25:19 +0000 (15:25 +0000)]
Update top and systat for vfs.bufcache now being a long rather than an int.

15 years agoWhen attaching a geli on boot make sure that it is detached
Guido van Rooij [Tue, 10 Mar 2009 15:23:43 +0000 (15:23 +0000)]
When attaching a geli on boot make sure that it is detached
upon last close. (needed for a gmirror to properly shutdown
upon reboot when a geli is on top the gmirror)

15 years agoWhen swap resides on a mirror and it is not stopped, the mirror
Guido van Rooij [Tue, 10 Mar 2009 15:19:49 +0000 (15:19 +0000)]
When swap resides on a mirror and it is not stopped, the mirror
is degraded upon the next reboot and will have to be rebuild.
Thus call swapoff when rebooting (read: when stopping swap1)

15 years agoAdd tcpp -- TCP parallelism microbenchmark.
Robert Watson [Tue, 10 Mar 2009 14:52:17 +0000 (14:52 +0000)]
Add tcpp -- TCP parallelism microbenchmark.

This tool creates large numbers of TCP connections, each of which will
transmit a fixed amount of data, between client and server hosts.  tcpp can
use multiple workers (typically up to the number of hardware cores), and can
use multiple source IPs in order to use an expanded port/IP 4-tuple space to
avoid problems from reusing 4-tuples too quickly.  Aggregate bandwidth use
will be reported after a client run.

While by no means a perfect tool, it has proven quite useful in generating
and optimizing TCP stack lock contention by easily generating high-intensity
workloads.  It also proves surprisingly good at finding device driver bugs.

15 years agoDo not use bypass for vop_vptocnp() from nullfs, call standard
Konstantin Belousov [Tue, 10 Mar 2009 14:35:21 +0000 (14:35 +0000)]
Do not use bypass for vop_vptocnp() from nullfs, call standard
implementation instead. The bypass does not assume that returned vnode
is only held.

Reported by: Paul B. Mahol <onemda gmail com>, pluknet <pluknet gmail com>
Reviewed by: jhb
Tested by: pho, pluknet <pluknet gmail com>

15 years agoBe compatible with LibUSB from sourceforge and close the handle after reset
Andrew Thompson [Tue, 10 Mar 2009 14:29:34 +0000 (14:29 +0000)]
Be compatible with LibUSB from sourceforge and close the handle after reset

Submitted by: Hans Petter Selasky

15 years agoDisable zerocopy by default for now. It's causing some problems in pcap
Christian S.J. Peron [Tue, 10 Mar 2009 14:28:19 +0000 (14:28 +0000)]
Disable zerocopy by default for now.  It's causing some problems in pcap
consumers which fork after the shared pages have been setup.  pflogd(8)
is an example.  The problem is understood and there is a fix coming in
shortly.

Folks who want to continue using it can do so by setting

net.bpf.zerocopy_enable

to 1.

Discussed with: rwatson

15 years agoWhen freeing all the resources of the card, it is better to turn off
Warner Losh [Tue, 10 Mar 2009 12:10:50 +0000 (12:10 +0000)]
When freeing all the resources of the card, it is better to turn off
the PORTEN and MEMEN bits in the command register than to zero the
bars.

Use pci_write_ivar directly instead of a one-line wrapper that adds no
value.

Track verbosity changes in pci.

Remove a stray blank line.

15 years agoMerge r183430 from vendor/top/dist to head/contrib/top, although with
Robert Watson [Tue, 10 Mar 2009 11:46:41 +0000 (11:46 +0000)]
Merge r183430 from vendor/top/dist to head/contrib/top, although with
record-only mergeinfo because an automated merge is confused by the
flattening that took place:

  Move install to install-sh to prevent name-clashes.

MFC after: 3 days

15 years agoMake a 1:1 mapping between syscons stats and terminal emulators.
Ed Schouten [Tue, 10 Mar 2009 11:28:54 +0000 (11:28 +0000)]
Make a 1:1 mapping between syscons stats and terminal emulators.

After I imported libteken into the source tree, I noticed syscons didn't
store the cursor position inside the terminal emulator, but inside the
virtual terminal stat. This is not very useful, because when you
implement more complex forms of line wrapping, you need to keep track of
more state than just the cursor position.

Because the kernel messages didn't share the same terminal emulator as
ttyv0, this caused a lot of strange things, like kernel messages being
misplaced and a missing notification to resize the terminal emulator for
kernel messages never to be resized when using vidcontrol.

This patch just removes kernel_console_ts and adds a special parameter
to te_puts to determine whether messages should be printed using regular
colors or the ones for kernel messages.

Reported by: ache
Tested by: nyan, garga (older version)

15 years agoRestore the return statement. It was accidentally removed by rev 188429.
Yoshihiro Takahashi [Tue, 10 Mar 2009 11:14:03 +0000 (11:14 +0000)]
Restore the return statement.  It was accidentally removed by rev 188429.

15 years agoRemove now-unused INP_UNMAPPABLEOPTS.
Robert Watson [Tue, 10 Mar 2009 11:04:19 +0000 (11:04 +0000)]
Remove now-unused INP_UNMAPPABLEOPTS.

MFC after: 3 days
Discussed with: bz

15 years agoRename files that collide on case-insensitive file systems by encoding
Robert Watson [Tue, 10 Mar 2009 09:33:22 +0000 (09:33 +0000)]
Rename files that collide on case-insensitive file systems by encoding
colliding upper case letters as the lower case letter with a '_' in
front.

MFC after: 3 days
Discussed with: ed
Spotted by: Michael David Crawford <mdc at prgmr.com>

15 years agoFix a buglet in revision 189401: when restoring a 64-bit BAR,
Marcel Moolenaar [Tue, 10 Mar 2009 06:21:52 +0000 (06:21 +0000)]
Fix a buglet in revision 189401: when restoring a 64-bit BAR,
write the upper 32-bits in the adjacent bar. The consequences
of the buglet were severe enough though: a machine check.

15 years agoEliminate the last use of the recursive mapping to access user-space page
Alan Cox [Tue, 10 Mar 2009 02:12:03 +0000 (02:12 +0000)]
Eliminate the last use of the recursive mapping to access user-space page
table pages.  Now, all accesses to user-space page table pages are
performed through the direct map.  (The recursive mapping is only used
to access kernel-space page table pages.)

Eliminate the TLB invalidation on the recursive mapping when a user-space
page table page is removed from the page table and when a user-space
superpage is demoted.

15 years agoadd cfid and geom_redboot
Sam Leffler [Mon, 9 Mar 2009 23:25:34 +0000 (23:25 +0000)]
add cfid and geom_redboot

15 years agoadd geom_redboot, a geom module that exports RedBoot FIS partitions as named
Sam Leffler [Mon, 9 Mar 2009 23:18:36 +0000 (23:18 +0000)]
add geom_redboot, a geom module that exports RedBoot FIS partitions as named
slices in dev/redboot/*

15 years agoFix up the entries for libusb, it seems it existed back in 2002 so it was
Andrew Thompson [Mon, 9 Mar 2009 23:18:07 +0000 (23:18 +0000)]
Fix up the entries for libusb, it seems it existed back in 2002 so it was
getting removed again.

Reported by: Steve Kargl

15 years agoAdd cfid, a disk interface to CFI flash devices; this enables construction
Sam Leffler [Mon, 9 Mar 2009 23:16:02 +0000 (23:16 +0000)]
Add cfid, a disk interface to CFI flash devices; this enables construction
of flash-based filesystems.

Note this is not interlocked against the raw CFI device.

15 years agoreplace if_watchdog w/ private callout; probably can merge this with the
Sam Leffler [Mon, 9 Mar 2009 23:10:19 +0000 (23:10 +0000)]
replace if_watchdog w/ private callout; probably can merge this with the
calibration work sometime in the future

15 years agoremove ar9160Detach; it does nothing
Sam Leffler [Mon, 9 Mar 2009 23:04:06 +0000 (23:04 +0000)]
remove ar9160Detach; it does nothing

15 years agoFix uninitialized use of ifp for ii.
Bruce M Simpson [Mon, 9 Mar 2009 22:54:17 +0000 (22:54 +0000)]
Fix uninitialized use of ifp for ii.

Found by: Peter Holm

15 years agoFix spelling.
Andrew Thompson [Mon, 9 Mar 2009 22:43:00 +0000 (22:43 +0000)]
Fix spelling.

15 years agoUpdate 20090309 to say that libmap.conf entries for libusb are no longer needed.
Andrew Thompson [Mon, 9 Mar 2009 22:42:01 +0000 (22:42 +0000)]
Update 20090309 to say that libmap.conf entries for libusb are no longer needed.

15 years agoAdd type specific suspend/resume ata channel functions. Add checks to avoid
Alexander Motin [Mon, 9 Mar 2009 20:48:57 +0000 (20:48 +0000)]
Add type specific suspend/resume ata channel functions. Add checks to avoid
crash on detached channel resume. Add placeholder for possible type-specific
suspend/resume routines.

15 years agoMFp4 //depot/projects/usb 158942,158948
Andrew Thompson [Mon, 9 Mar 2009 20:08:08 +0000 (20:08 +0000)]
MFp4 //depot/projects/usb 158942,158948

Allow USB to be compiled without ugen support.

Submitted by: Hans Petter Selasky

15 years agoFix musb_otg.h include filename.
Andrew Thompson [Mon, 9 Mar 2009 20:05:46 +0000 (20:05 +0000)]
Fix musb_otg.h include filename.

Submitted by: Hans Petter Selasky

15 years ago- Fix a typo.
Stanislav Sedov [Mon, 9 Mar 2009 19:56:37 +0000 (19:56 +0000)]
- Fix a typo.

Spotted by: Steve Kargl <sgk@troutmask.apl.washington.edu>

15 years agoDon't call into the TTY layer when inside kdb.
Ed Schouten [Mon, 9 Mar 2009 19:46:19 +0000 (19:46 +0000)]
Don't call into the TTY layer when inside kdb.

We should just leave the underlying TTY objects alone when scrolling
around in KDB. It should be handled by Syscons exclusively.

Reported by: pluknet gmail com

15 years agoAdjust some variables (mostly related to the buffer cache) that hold
John Baldwin [Mon, 9 Mar 2009 19:35:20 +0000 (19:35 +0000)]
Adjust some variables (mostly related to the buffer cache) that hold
address space sizes to be longs instead of ints.  Specifically, the follow
values are now longs: runningbufspace, bufspace, maxbufspace,
bufmallocspace, maxbufmallocspace, lobufspace, hibufspace, lorunningspace,
hirunningspace, maxswzone, maxbcache, and maxpipekva.  Previously, a
relatively small number (~ 44000) of buffers set in kern.nbuf would result
in integer overflows resulting either in hangs or bogus values of
hidirtybuffers and lodirtybuffers.  Now one has to overflow a long to see
such problems.  There was a check for a nbuf setting that would cause
overflows in the auto-tuning of nbuf.  I've changed it to always check and
cap nbuf but warn if a user-supplied tunable would cause overflow.

Note that this changes the ABI of several sysctls that are used by things
like top(1), etc., so any MFC would probably require a some gross shims
to allow for that.

MFC after: 1 month

15 years ago- Point libusb users to the ports collection UPDATING file.
Stanislav Sedov [Mon, 9 Mar 2009 19:22:45 +0000 (19:22 +0000)]
- Point libusb users to the ports collection UPDATING file.

15 years agoMove the debug.hashstat sysctl tree under DIAGNOSTIC. I measured the
John Baldwin [Mon, 9 Mar 2009 19:04:53 +0000 (19:04 +0000)]
Move the debug.hashstat sysctl tree under DIAGNOSTIC.  I measured the
debug.hashstat.rawnchash sysctl in particular as taking 7 milliseconds on
a 3GHz Intel Xeon (4x2) running 7.1.  It accounted for almost a quarter of
the total runtime of 'sysctl -a'.  It also performs lots of copyout's while
holding the namecache lock (this does not attempt to fix that).

MFC after: 2 weeks

15 years agoMerge IGMPv3 and Source-Specific Multicast (SSM) to the FreeBSD
Bruce M Simpson [Mon, 9 Mar 2009 17:53:05 +0000 (17:53 +0000)]
Merge IGMPv3 and Source-Specific Multicast (SSM) to the FreeBSD
IPv4 stack.

Diffs are minimized against p4.
PCS has been used for some protocol verification, more widespread
testing of recorded sources in Group-and-Source queries is needed.
sizeof(struct igmpstat) has changed.

__FreeBSD_version is bumped to 800070.

15 years agoMark the bsdextended rules sysctl as being mpsafe.
Christian S.J. Peron [Mon, 9 Mar 2009 17:42:18 +0000 (17:42 +0000)]
Mark the bsdextended rules sysctl as being mpsafe.

Discussed with: rwatson

15 years agoCommit missed file in r189587, update directory name for libusb.
Andrew Thompson [Mon, 9 Mar 2009 17:38:14 +0000 (17:38 +0000)]
Commit missed file in r189587, update directory name for libusb.

Spotted by: rdivacky

15 years ago- Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORT
John Baldwin [Mon, 9 Mar 2009 17:16:29 +0000 (17:16 +0000)]
- Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORT
  in make.conf or src.conf.
- When GPT is enabled (which it is by default), use memory above 1 MB and
  leave the memory from the end of the bss to the end of the 640k window
  purely for the stack.  The loader has grown and now it is much more
  common for the heap and stack to grow into each other when both are
  located in the 640k window.

PR: kern/129526
MFC after: 1 week

15 years agolibusb20 is now installed as libusb, remove the version number from the
Andrew Thompson [Mon, 9 Mar 2009 17:09:46 +0000 (17:09 +0000)]
libusb20 is now installed as libusb, remove the version number from the
directory name.

15 years agoInstall libusb20.so.1 as libusb.so.1, there will be a followup commit to the
Andrew Thompson [Mon, 9 Mar 2009 17:05:31 +0000 (17:05 +0000)]
Install libusb20.so.1 as libusb.so.1, there will be a followup commit to the
ports tree so that programs use libusb from the base by default. Thanks to
Stanislav Sedov for sorting out the ports build.

Bump __FreeBSD_version to 800069

Help and testing by: stas

15 years agoAdd igmp(4) man page, do not connect to build yet.
Bruce M Simpson [Mon, 9 Mar 2009 16:51:40 +0000 (16:51 +0000)]
Add igmp(4) man page, do not connect to build yet.

15 years agoMFp4 //depot/projects/usb@158916
Andrew Thompson [Mon, 9 Mar 2009 15:25:46 +0000 (15:25 +0000)]
MFp4 //depot/projects/usb@158916

USB mouse patch to address complicated data reporting descriptors.

Reported by: Boris Kotzev
Submitted by: Hans Petter Selasky

15 years agoPrefer prototypes to k&r definitions.
Warner Losh [Mon, 9 Mar 2009 13:32:19 +0000 (13:32 +0000)]
Prefer prototypes to k&r definitions.

15 years agoMake generic_intr routines match prototype.
Warner Losh [Mon, 9 Mar 2009 13:30:00 +0000 (13:30 +0000)]
Make generic_intr routines match prototype.

15 years ago__LP64__ is what's defined, not _LP64_, according to the manual (and
Warner Losh [Mon, 9 Mar 2009 13:29:13 +0000 (13:29 +0000)]
__LP64__ is what's defined, not _LP64_, according to the manual (and
also experience).

15 years agoFix prototypes to be consistent.
Warner Losh [Mon, 9 Mar 2009 13:27:33 +0000 (13:27 +0000)]
Fix prototypes to be consistent.

15 years agoo Add declarations for a few more nodes widely used.
Warner Losh [Mon, 9 Mar 2009 13:26:55 +0000 (13:26 +0000)]
o Add declarations for a few more nodes widely used.
o Minor formatting nit.

15 years agoremove now-redunant cardbus attachment lines.
Warner Losh [Mon, 9 Mar 2009 13:25:34 +0000 (13:25 +0000)]
remove now-redunant cardbus attachment lines.

15 years agoremove now-redunant cardbus attachment.
Warner Losh [Mon, 9 Mar 2009 13:23:54 +0000 (13:23 +0000)]
remove now-redunant cardbus attachment.

15 years agoFix a long-standing bug in newbus. It was introduced when subclassing
Warner Losh [Mon, 9 Mar 2009 13:20:23 +0000 (13:20 +0000)]
Fix a long-standing bug in newbus.  It was introduced when subclassing
was introduced.  If you have a bus, say cardbus, that is derived from
a base-bus (say PCI), then ordinarily all PCI drivers would attach to
cardbus devices.  However, there had been one exception: kldload
wouldn't work.

The problem is in devclass_add_driver.  In this routine, all we did
was call to the pci device's BUS_DRIVER_ADDED routine.  However, since
cardbus bus instances had a different devclass, none of them were
called.

The solution is to call all subclass devclasses, recursively down the
tree, of the class that was loaded.  Since we don't have a 'children
class' pointer, we search the whole list of devclasses for a class
whose parent matches.  Since just done a kldload time, this isn't as
bad as it sounds.  In addition, we short-circuit the whole process by
marking those classes with subclasses with a flag.  We'll likely have
to reevaluate this method the number of devclasses with subclasses
gets large.

This means we can remove the "cardbus" lines from all the PCI drivers
since we have no cardbus specific attach device attachments in the
tree.

# Also: minor tweak to an error message

15 years agoUse a u_int for p_lock instead of a char: this avoids a (somewhat
Robert Watson [Mon, 9 Mar 2009 13:12:48 +0000 (13:12 +0000)]
Use a u_int for p_lock instead of a char: this avoids a (somewhat
unlikely but not impossible given modern thread counts) wrap-around,
and the compiler was padding it out to an int (at least) anyway.

MFC after: 3 days (but confirm ABI impact)

15 years agoTrim comments about the MP-safety of various bits of the amd64/i386
Robert Watson [Mon, 9 Mar 2009 13:11:16 +0000 (13:11 +0000)]
Trim comments about the MP-safety of various bits of the amd64/i386
system call entry path and i386 IP checksum generation: we now assume
all code is MPSAFE unless explicitly marked otherwise.  Remove XXX
Giant comments along similar lines: the code by the comments either
doesn't need or doesn't want Giant (especially the NMI handler).

MFC after: 3 days

15 years agoRemove two now-defunct KSE fields from struct thread: td_uuticks and
Robert Watson [Mon, 9 Mar 2009 11:18:41 +0000 (11:18 +0000)]
Remove two now-defunct KSE fields from struct thread: td_uuticks and
td_usticks.

15 years agoAdd a new thread-private flag, TDP_AUDITREC, to indicate whether or
Robert Watson [Mon, 9 Mar 2009 10:45:58 +0000 (10:45 +0000)]
Add a new thread-private flag, TDP_AUDITREC, to indicate whether or
not there is an audit record hung off of td_ar on the current thread.
Test this flag instead of td_ar when auditing syscall arguments or
checking for an audit record to commit on syscall return.  Under
these circumstances, td_pflags is much more likely to be in the cache
(especially if there is no auditing of the current system call), so
this should help reduce cache misses in the system call return path.

MFC after:      1 week
Reported by:    kris
Obtained from:  TrustedBSD Project

15 years agoFor IP1001 PHYs, read auto-negotiation advertisement register to
Pyun YongHyeon [Mon, 9 Mar 2009 08:17:46 +0000 (08:17 +0000)]
For IP1001 PHYs, read auto-negotiation advertisement register to
get default next page configuration. While I'm here explicitly set
IP1000PHY_ANAR_CSMA bit. This bit is read-only and always set
by hardware so setting it has no effect but it would clear the
intention. With this change controllers that couldn't establish
1000baseT link should work.

PR: kern/130846

15 years agoUse mii_phy_add_media() and remove setting each media type.
Pyun YongHyeon [Mon, 9 Mar 2009 08:09:06 +0000 (08:09 +0000)]
Use mii_phy_add_media() and remove setting each media type.
While I'm here, don't set mii_anegticks as it's set by
mii_phy_add_media().

15 years agoFor unknown speed, explicitly set IFM_NONE.
Pyun YongHyeon [Mon, 9 Mar 2009 08:01:40 +0000 (08:01 +0000)]
For unknown speed, explicitly set IFM_NONE.

15 years agoReport current link state while auto-negotiation is in progress.
Pyun YongHyeon [Mon, 9 Mar 2009 07:56:40 +0000 (07:56 +0000)]
Report current link state while auto-negotiation is in progress.

15 years agoConsistently use kdev for the kernel device.
Robert Noland [Mon, 9 Mar 2009 07:55:18 +0000 (07:55 +0000)]
Consistently use kdev for the kernel device.

Submitted by: vehemens <vehemens@verizon.net>
MFC after: 3 days

15 years agoClean up the printing on amd64. Should also be consistent on i386.
Robert Noland [Mon, 9 Mar 2009 07:50:27 +0000 (07:50 +0000)]
Clean up the printing on amd64.  Should also be consistent on i386.

MFC after: 3 days

15 years agoThere is no need to sync these buffers to swap.
Robert Noland [Mon, 9 Mar 2009 07:49:13 +0000 (07:49 +0000)]
There is no need to sync these buffers to swap.

MFC after: 3 days

15 years agoChange the flags to bus_dmamem around to allow it to sleep waiting for
Robert Noland [Mon, 9 Mar 2009 07:47:03 +0000 (07:47 +0000)]
Change the flags to bus_dmamem around to allow it to sleep waiting for
resources during allocation, but not during map load.  Also, zero the
buffers here.

MFC after: 3 days

15 years agoFix the flags to bus_dmamem_* to allow the allocation to sleep while
Robert Noland [Mon, 9 Mar 2009 07:38:22 +0000 (07:38 +0000)]
Fix the flags to bus_dmamem_* to allow the allocation to sleep while
waiting for resources.  It is really the load that we can't defer.
BUS_DMA_NOCACHE belongs on bus_dmamap_load() as well.

MFC after: 3 days

15 years ago -Make the PCI(E)/AGP calculations consistent
Robert Noland [Mon, 9 Mar 2009 07:33:35 +0000 (07:33 +0000)]
-Make the PCI(E)/AGP calculations consistent
-Calculate the scratch address correctly

MFC after: 10 days

15 years agoCall the right function for the right chipset.
Robert Noland [Mon, 9 Mar 2009 07:24:32 +0000 (07:24 +0000)]
Call the right function for the right chipset.

MFC after: 10 days

15 years agoAdd a new tunable hw.re.prefer_iomap which disables memory register
Pyun YongHyeon [Mon, 9 Mar 2009 06:02:55 +0000 (06:02 +0000)]
Add a new tunable hw.re.prefer_iomap which disables memory register
mapping. The tunable is OFF for all controllers except RTL8169SC
family. RTL8169SC seems to require more magic to use memory
register mapping. r187483 added a fix for RTL8169SCe controller but
it does not looke like fix other variants of RTL8169SC.

Tested by: Gavin Stone-Tolcher g.stone-tolcher <> its dot uq dot edu dot au

15 years agoDon't ignore other fcntl functions, directly call __sys_fcntl if
David Xu [Mon, 9 Mar 2009 05:54:43 +0000 (05:54 +0000)]
Don't ignore other fcntl functions, directly call __sys_fcntl if
WITHOUT_SYSCALL_COMPAT is not defined.

Reviewed by: deischen

15 years agoA system with plenty of memory would not require so much swap for generic
Xin LI [Mon, 9 Mar 2009 05:41:04 +0000 (05:41 +0000)]
A system with plenty of memory would not require so much swap for generic
usage.

Discussed with: dillon

15 years agoChange pmap_enter_quick_locked() so that it uses the kernel's direct map
Alan Cox [Mon, 9 Mar 2009 03:35:25 +0000 (03:35 +0000)]
Change pmap_enter_quick_locked() so that it uses the kernel's direct map
instead of the pmap's recursive mapping to access the lowest level of the
page table when it maps a user-space virtual address.