]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoRemove ic_update_mcast calls that are not implemented.
thompsa [Fri, 27 Feb 2009 21:50:15 +0000 (21:50 +0000)]
Remove ic_update_mcast calls that are not implemented.

Spotted by: sam
Pointy hat: me

15 years agoPartial sync to //depot/projects/usb
thompsa [Fri, 27 Feb 2009 21:14:29 +0000 (21:14 +0000)]
Partial sync to //depot/projects/usb

- Reissue the ctrl request on failure
- Ensure Tx and ctrl requests are not interleaved
- Add promisc callbacks

Obtained from: Hans Petter Selasky

15 years agoFix the add stream feature of strm-reset to really work:
rrs [Fri, 27 Feb 2009 20:54:45 +0000 (20:54 +0000)]
Fix the add stream feature of strm-reset to really work:
 - Fix the copy, we can't do a blind copy but must transfer
   the data from the old to the new.
 - Fix the ACK processing so we properly stop retransmitting
   the thing.
 - Fix it so if we get a retran we will properly reply with
   the saved response without doing anything.

MFC after: 1 month

15 years ago- Hold a reference on the cdev a filesystem is mounted from in the mount.
jhb [Fri, 27 Feb 2009 20:00:15 +0000 (20:00 +0000)]
- Hold a reference on the cdev a filesystem is mounted from in the mount.
- Remove the cdev pointers from the denode and instead use the mountpoint's
  reference to call dev2udev() in getattr().

Reviewed by: kib, julian

15 years agoMerge rev. 188615, 188812 changes from old-USB to USB2 driver.
mav [Fri, 27 Feb 2009 19:27:33 +0000 (19:27 +0000)]
Merge rev. 188615, 188812 changes from old-USB to USB2 driver.

15 years agoreally enable usb1
sam [Fri, 27 Feb 2009 19:26:23 +0000 (19:26 +0000)]
really enable usb1

15 years ago- Update copyright to 2009.
davidch [Fri, 27 Feb 2009 19:25:06 +0000 (19:25 +0000)]
- Update copyright to 2009.
- Only enable split header operation when ZERO_COPY_SOCKETS is enabled in
  the kernel.

Submitted by: davidch
MFC after: 1 week

15 years agoo enable PREEMPTION
sam [Fri, 27 Feb 2009 19:23:55 +0000 (19:23 +0000)]
o enable PREEMPTION
o turn off a bunch of stuff that's unlikely to be used
o add flash support
o use mii instead of miibus to save space
o enable tdma support
o configure legacy usb as usb2 works only on 2348 w/ 64M configs

15 years agoo add -HEAD to avoid build conflicts
sam [Fri, 27 Feb 2009 19:21:35 +0000 (19:21 +0000)]
o add -HEAD to avoid build conflicts
o switch to a more common flash config

15 years agoadd -HEAD to avoid build conflicts
sam [Fri, 27 Feb 2009 19:20:57 +0000 (19:20 +0000)]
add -HEAD to avoid build conflicts

15 years agoMake a note about USB /dev changes.
thompsa [Fri, 27 Feb 2009 17:32:49 +0000 (17:32 +0000)]
Make a note about USB /dev changes.

15 years agonewfs_msdos: allow to work with media that doesn't have any CHS params
avg [Fri, 27 Feb 2009 17:29:48 +0000 (17:29 +0000)]
newfs_msdos: allow to work with media that doesn't have any CHS params

Either use parameters provided by user or make them up.
The code for faking CHS params is borrowed from disklabel code.
The logic for using user-provided and auto-guessed parameters is not
perfect, so to speak.

PR: bin/121182
Approved by: jhb (mentor)

15 years agoudf_readatoffset: return correct size and data pointer for data in fentry
avg [Fri, 27 Feb 2009 17:29:31 +0000 (17:29 +0000)]
udf_readatoffset: return correct size and data pointer for data in fentry

This should help correct reading of directories with data located
in fentry.

Submitted by: bde
Approved by: jhb (mentor)

15 years agoChange USB over to make_dev() for all device nodes, previously it hooked into
thompsa [Fri, 27 Feb 2009 17:27:16 +0000 (17:27 +0000)]
Change USB over to make_dev() for all device nodes, previously it hooked into
the devfs clone handler to open the (invisible) devices on the fly.

The /dev entries are layed out as follows,

 /dev/usbctl      = master device
 /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>)
 /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint

This also removes the custom permissions model from USB.  Bump
__FreeBSD_version to 800066.

Submitted by: rink (earlier version)

15 years agoRemove empty directory structure.
ed [Fri, 27 Feb 2009 16:01:40 +0000 (16:01 +0000)]
Remove empty directory structure.

Submitted by: Pawel Worach <pawel worach gmail com>

15 years agoFix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.
thompsa [Fri, 27 Feb 2009 15:30:42 +0000 (15:30 +0000)]
Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.

Submitted by: daichi
Pointy hat: me

15 years agoFor all files including net/vnet.h directly include opt_route.h and
bz [Fri, 27 Feb 2009 14:12:05 +0000 (14:12 +0000)]
For all files including net/vnet.h directly include opt_route.h and
net/route.h.

Remove the hidden include of opt_route.h and net/route.h from net/vnet.h.

We need to make sure that both opt_route.h and net/route.h are included
before net/vnet.h because of the way MRT figures out the number of FIBs
from the kernel option. If we do not, we end up with the default number
of 1 when including net/vnet.h and array sizes are wrong.

This does not change the list of files which depend on opt_route.h
but we can identify them now more easily.

15 years agoMove the include of vinet.h further up before the ipfilter includes.
bz [Fri, 27 Feb 2009 13:29:18 +0000 (13:29 +0000)]
Move the include of vinet.h further up before the ipfilter includes.

15 years agoRemove redundant code in printf() and vprintf().
ed [Fri, 27 Feb 2009 13:28:54 +0000 (13:28 +0000)]
Remove redundant code in printf() and vprintf().

printf() and vprintf() are exactly the same, except the way arguments
are passed. Just like we see in other pieces of code (i.e. libc's
printf()), implement printf() using vprintf().

Submitted by: Christoph Mallon <christoph mallon gmx de>

15 years agoShuffle the vimage.h includes or add where missing.
bz [Fri, 27 Feb 2009 13:22:26 +0000 (13:22 +0000)]
Shuffle the vimage.h includes or add where missing.

15 years agoRevert previous commit to subr_prf.c and make it more tidy.
ed [Fri, 27 Feb 2009 12:50:25 +0000 (12:50 +0000)]
Revert previous commit to subr_prf.c and make it more tidy.

As mentioned by bz and bde, the change I made wasn't the proper way to
fix. Inspired by bde's patch, perform some small cleanups to uprintf().

Reviewed by: bz

15 years agoPrefer register usage style to be more consistent with the rest of the
raj [Fri, 27 Feb 2009 12:18:17 +0000 (12:18 +0000)]
Prefer register usage style to be more consistent with the rest of the
trap_subr.S code.

15 years agoMake Book-E debug register state part of the PCB context.
raj [Fri, 27 Feb 2009 12:08:24 +0000 (12:08 +0000)]
Make Book-E debug register state part of the PCB context.

Previously, DBCR0 flags were set "globally", but this leads to problems
because Book-E fine grained debug settings work only in conjuction with the
debug master enable bit in MSR: in scenarios when the DBCR0 was set with
intention to debug one process, but another one with MSR[DE] set got
scheduled, the latter would immediately cause debug exceptions to occur upon
execution of its own code instructions (and not the one intended for
debugging).

To avoid such problems and properly handle debugging context, DBCR0 state
should be managed individually per process.

Submitted by: Grzegorz Bernacki gjb ! semihalf dot com
Reviewed by: marcel

15 years agoFix up some ioctl permissions issues long overlooked.
rnoland [Fri, 27 Feb 2009 06:01:42 +0000 (06:01 +0000)]
Fix up some ioctl permissions issues long overlooked.

Submitted by: jkim@
MFC after: 2 weeks

15 years agofix build
sam [Fri, 27 Feb 2009 05:22:11 +0000 (05:22 +0000)]
fix build

15 years agofix build
sam [Fri, 27 Feb 2009 05:22:00 +0000 (05:22 +0000)]
fix build

15 years agoReplace clone_setcallback() with a new function clone_setdefcallback()
rpaulo [Fri, 27 Feb 2009 00:31:34 +0000 (00:31 +0000)]
Replace clone_setcallback() with a new function clone_setdefcallback()
that selects a callback from an interface prefix name. This allows us to
report a meaningful error when the user types 'ifconfig wlan0 create',
for example, and also kills some redundant code.

Reviewed by:    sam (earlier version)

15 years agoRollback rev. 189093.
mav [Thu, 26 Feb 2009 23:21:32 +0000 (23:21 +0000)]
Rollback rev. 189093.

mtx_lock() is not needed there as callout initialized with callout_init_mtx().
Sorry.

Submitted by: Ian Dowse

15 years agoUnhide IDENTIFY command timeouts when verbose messages enabled.
mav [Thu, 26 Feb 2009 23:07:40 +0000 (23:07 +0000)]
Unhide IDENTIFY command timeouts when verbose messages enabled.
I think it should be suitable for debugging.

15 years agoRestore mtx_lock() call on ata_timeout(), dropped (I think accidentally)
mav [Thu, 26 Feb 2009 22:26:07 +0000 (22:26 +0000)]
Restore mtx_lock() call on ata_timeout(), dropped (I think accidentally)
during commit 3 years ago.

15 years agoRename all symbols in libmp(3) to mp_*, just like Solaris.
ed [Thu, 26 Feb 2009 21:43:15 +0000 (21:43 +0000)]
Rename all symbols in libmp(3) to mp_*, just like Solaris.

The function pow() in libmp(3) clashes with pow(3) in libm. We could
rename this single function, but we can just take the same approach as
the Solaris folks did, which is to prefix all function names with mp_.

libmp(3) isn't really popular nowadays. I suspect not a single
application in ports depends on it. There's still a chance, so I've
increased the SHLIB_MAJOR and __FreeBSD_version.

Reviewed by: deischen, rdivacky

15 years agoRemove direct ata_completed() call options from ata_finish(), except for the
mav [Thu, 26 Feb 2009 21:33:48 +0000 (21:33 +0000)]
Remove direct ata_completed() call options from ata_finish(), except for the
kernel dumping case.

ata_completed() may initiate ata_reinit() on error, that may lead to drives
attach or detach. Attach and detach are sending requests to drives and sleep
waiting for results. But ata_finish() can be called directly from
interrupt handler where sleeping is prohibited, so we must break this chain
somewhere. This place seems to fit best.

15 years agoFix LLVM compiler errors related to K&R declarations with ANSI prototypes.
ed [Thu, 26 Feb 2009 20:59:05 +0000 (20:59 +0000)]
Fix LLVM compiler errors related to K&R declarations with ANSI prototypes.

Submitted by: Pawel Worach <pawel.worach@gmail.com>

15 years agoAllow the old usb stack to compile by adding the appropriate -I foo, this must
thompsa [Thu, 26 Feb 2009 20:54:43 +0000 (20:54 +0000)]
Allow the old usb stack to compile by adding the appropriate -I foo, this must
go before the standard -I$S to have the search happen before /sys/.

Make this conditional on 'makeoptions WITH_LEGACY=1' in the kernel config.

Prodded by: sam

15 years agoUse ANSI function declarations in librpcsvc.
ed [Thu, 26 Feb 2009 20:32:11 +0000 (20:32 +0000)]
Use ANSI function declarations in librpcsvc.

When compiling librpcsvc with LLVM, we get a compiler error, because
hexval() uses an ANSI prototype, but a K&R declaration. I could have
just changed hexval(), but I'd rather keep this consistent. It's not
that much code.

Submitted by: Pawel Worach <pawel worach gmail com>

15 years agoAdd MSI blacklisting support.
mav [Thu, 26 Feb 2009 20:00:14 +0000 (20:00 +0000)]
Add MSI blacklisting support.

Disable MSI for nVidia MCP51 controller. Enabling MSI there leads to
unexpected errors and timeouts, that should not happen even if interrupts
are not working completely.

15 years agouse mii instead of miibus to not pull in useless phy code
sam [Thu, 26 Feb 2009 19:47:11 +0000 (19:47 +0000)]
use mii instead of miibus to not pull in useless phy code

15 years agoadd updatep[12] that grok the partitioning we use and use gpart
sam [Thu, 26 Feb 2009 19:44:52 +0000 (19:44 +0000)]
add updatep[12] that grok the partitioning we use and use gpart
instead of boot0cfg to switch the active partition

15 years agoudf_readatoffset: read through directory vnode, do not read > MAXBSIZE
avg [Thu, 26 Feb 2009 18:58:41 +0000 (18:58 +0000)]
udf_readatoffset: read through directory vnode, do not read > MAXBSIZE

Currently bread()-ing through device vnode with
(1) VMIO enabled,
(2) bo_bsize != DEV_BSIZE
(3) more than 1 block
results in data being incorrectly cached.
So instead a more common approach of using a vnode belonging to fs is now
employed.
Also, prevent attempt to bread more than MAXBSIZE bytes because of
adjustments made to account for offset that doesn't start on block
boundary.
Add expanded comments to explain the calculations.
Also drop unused inline function while here.

PR: kern/120967
PR: kern/129084

Reviewed by: scottl, kib
Approved by: jhb (mentor)

15 years ago[1] When showing threads, the thread name just appears if the comm
attilio [Thu, 26 Feb 2009 18:01:07 +0000 (18:01 +0000)]
[1] When showing threads, the thread name just appears if the comm
label is choosen as last printout (ucomm suffers of this such bug
too).  That bug is caused by the fact that the fixed size of
printout doesn't leave enough space for them to be printed out.
Implement ucomm and comm commands with a dynamic size lenght for
buffers.

[2] On AMD64 architecture pointers don't have enough chars space to
be shown (8 chars while they need 16).  Fix them by providing
a variadic space so that it fits well on both 64 and 32 bits
architectures.

[3] Check a return value of malloc() that wasn't checked before.

PR: bin/128841, bin/128842
Reviewed by: jhb, emaste
Sponsored by: Sandvine Incorporated

15 years agoAdd a missing parameter to ruserpass(). According to C99 6.9.1p7
rdivacky [Thu, 26 Feb 2009 17:46:54 +0000 (17:46 +0000)]
Add a missing parameter to ruserpass(). According to C99 6.9.1p7
K&R function is not a prototype but this is a bad style. GCC accepts
this other compilers warn or reject this.

Approved by: kib (mentor)

15 years agoRemove unneeded pointer `ndp'.
ed [Thu, 26 Feb 2009 16:32:48 +0000 (16:32 +0000)]
Remove unneeded pointer `ndp'.

Inside do_execve(), we have a pointer `ndp', which always points to
`&nd'. I can imagine a primitive (non-optimizing) compiler to really
reserve space for such a pointer, so just remove the variable and use
`&nd' directly.

15 years agoRemove even more unneeded variable assignments.
ed [Thu, 26 Feb 2009 15:51:54 +0000 (15:51 +0000)]
Remove even more unneeded variable assignments.

kern_time.c:
- Unused variable `p'.

kern_thr.c:
- Variable `error' is always caught immediately, so no reason to
  initialize it. There is no way that error != 0 at the end of
  create_thread().

kern_sig.c:
- Unused variable `code'.

kern_synch.c:
- `rval' is always assigned in all different cases.

kern_rwlock.c:
- `v' is always overwritten with RW_UNLOCKED further on.

kern_malloc.c:
- `size' is always initialized with the proper value before being used.

kern_exit.c:
- `error' is always caught and returned immediately. abort2() never
  returns a non-zero value.

kern_exec.c:
- `len' is always assigned inside the if-statement right below it.

tty_info.c:
- `td' is always overwritten by FOREACH_THREAD_IN_PROC().

Found by: LLVM's scan-build

15 years agoDon't throw away upper 32-bits of the HT MSI address window. In practice
jhb [Thu, 26 Feb 2009 14:32:14 +0000 (14:32 +0000)]
Don't throw away upper 32-bits of the HT MSI address window.  In practice
this is harmless since the address window for MSI on x86 is in the lower
4 GB.

Submitted by: mav
MFC after: 1 week

15 years agoRemove unneeded variable `ocn_mute'.
ed [Thu, 26 Feb 2009 13:01:45 +0000 (13:01 +0000)]
Remove unneeded variable `ocn_mute'.

Found by: LLVM's scan-build

15 years agoRemove unused variables `p' and unneeded assignments of `rval'.
ed [Thu, 26 Feb 2009 13:00:13 +0000 (13:00 +0000)]
Remove unused variables `p' and unneeded assignments of `rval'.

Found by: LLVM's scan-build

15 years agoudf: add read-ahead support modeled after cd9660
avg [Thu, 26 Feb 2009 12:33:22 +0000 (12:33 +0000)]
udf: add read-ahead support modeled after cd9660

Reviewed by: scottl
Approved by: jhb (mentor)

15 years agoudf_map: return proper error code instead of leaking an internal one
avg [Thu, 26 Feb 2009 12:33:17 +0000 (12:33 +0000)]
udf_map: return proper error code instead of leaking an internal one

Incidentally this also allows for small files with data embedded into
fentry to be mmap-ed.

Approved by: jhb (mentor)

15 years agoudf_read: correctly read data from files with data embedded into fentry,
avg [Thu, 26 Feb 2009 12:33:12 +0000 (12:33 +0000)]
udf_read: correctly read data from files with data embedded into fentry,

... as opposed to files with data in extents.
Some UDF authoring tools produce this type of file for sufficiently small
data files.

Approved by: jhb (mentor)

15 years agoudf_strategy: tiny optimization of logic, calculations; extra diagnostics
avg [Thu, 26 Feb 2009 12:33:02 +0000 (12:33 +0000)]
udf_strategy: tiny optimization of logic, calculations; extra diagnostics

Use bit-shift instead of division/multiplication.
Act on error as soon as it is detected.
Report attempt to read data embedded in file entry via regular way.
While there, fix lblktosize macro and make use of it.

No functionality should change as a result.

Approved by: jhb (mentor)

15 years agoRemove redundant assignment of `p'.
ed [Thu, 26 Feb 2009 12:12:34 +0000 (12:12 +0000)]
Remove redundant assignment of `p'.

`p' is already initialized with `td->td_proc'. Because td is always
curthread, it is safe to initialize it without any locks.

Found by: LLVM's scan-build

15 years agoRemove redundant assignment of `s'.
ed [Thu, 26 Feb 2009 12:06:46 +0000 (12:06 +0000)]
Remove redundant assignment of `s'.

The variable is already initialized to `nptr'.

Found by: LLVM's scan-build

15 years agoRemove unneeded variable assignment.
ed [Thu, 26 Feb 2009 12:02:38 +0000 (12:02 +0000)]
Remove unneeded variable assignment.

The ts variable is always initialized a few lines below.

Found by: LLVM scan-build

15 years agoAdd static tracing for privilege checking:
rwatson [Thu, 26 Feb 2009 10:56:13 +0000 (10:56 +0000)]
Add static tracing for privilege checking:

  priv:kernel:priv_check:priv_ok fires for granted privileges
  priv:kernel:priv_check:priv_errr fires for denied privileges

The first argument is the requested privilege number.  The naming
convention is a little different from the OpenSolaris equivilent
because we can't have '-' in probefunc names, and our privilege
namespace is different.

MFC after: 1 week

15 years agoSilence compiler warning inside our ^T handler.
ed [Thu, 26 Feb 2009 10:38:19 +0000 (10:38 +0000)]
Silence compiler warning inside our ^T handler.

It turns out we're casting fixpt_t* to int*.

Spotted by: clang

15 years agoUse unsigned longs for the TTY's sysctl stats.
ed [Thu, 26 Feb 2009 10:28:32 +0000 (10:28 +0000)]
Use unsigned longs for the TTY's sysctl stats.

Spotted by: clang

15 years agoDon't use PTY name as format string, even though it isn't insecure here.
ed [Thu, 26 Feb 2009 10:14:10 +0000 (10:14 +0000)]
Don't use PTY name as format string, even though it isn't insecure here.

It's guaranteed that the `name' variable always contains a string of the
form pty[l‐sL‐S][0‐9a‐v], but I'd rather keep the compiler happy (LLVM).

15 years agoadd more gpio registers
sam [Thu, 26 Feb 2009 06:16:15 +0000 (06:16 +0000)]
add more gpio registers

15 years agoFix typo in comments in r189023.
sobomax [Wed, 25 Feb 2009 22:24:56 +0000 (22:24 +0000)]
Fix typo in comments in r189023.

15 years agoEnable support for PAT_WRITE_PROTECTED and PAT_UNCACHED cache modes
jkim [Wed, 25 Feb 2009 20:26:48 +0000 (20:26 +0000)]
Enable support for PAT_WRITE_PROTECTED and PAT_UNCACHED cache modes
unconditionally on amd64.  On i386, we assume PAT is usable if the CPU
vendor is not Intel or CPU model is newer than Pentium IV.

Reviewed by: alc, jhb

15 years agoThe GM45 handles vblank differently. Pull the changes from Intel in.
rnoland [Wed, 25 Feb 2009 20:24:13 +0000 (20:24 +0000)]
The GM45 handles vblank differently.  Pull the changes from Intel in.

MFC after: 2 Weeks

15 years agoRemove D_NEEDGIANT.
rnoland [Wed, 25 Feb 2009 18:56:49 +0000 (18:56 +0000)]
Remove D_NEEDGIANT.

MFC after: 2 weeks

15 years agoTurn on MSI if the card supports it. There is a blacklist for chips
rnoland [Wed, 25 Feb 2009 18:54:35 +0000 (18:54 +0000)]
Turn on MSI if the card supports it.  There is a blacklist for chips
which report that they are capable of MSI, but don't work correctly.

MFC after: 2 weeks

15 years agoPrepare the radeon driver for MSI support.
rnoland [Wed, 25 Feb 2009 18:50:35 +0000 (18:50 +0000)]
Prepare the radeon driver for MSI support.

MFC after: 2 weeks

15 years agoAdd some vblank related debugging and replace the DRM_WAIT_ON macro
rnoland [Wed, 25 Feb 2009 18:48:33 +0000 (18:48 +0000)]
Add some vblank related debugging and replace the DRM_WAIT_ON macro
with a localized version.

MFC after: 2 weeks

15 years agoThis was part of a sync to the code that Intel is shipping in linux.
rnoland [Wed, 25 Feb 2009 18:44:50 +0000 (18:44 +0000)]
This was part of a sync to the code that Intel is shipping in linux.

- Remove the old TTM interface
- Move register definitions to i915_reg.h
- Overhaul the irq handler

MFC after: 2 weeks

15 years agoThe i915 driver was the only consumer of locked task support.
rnoland [Wed, 25 Feb 2009 18:25:47 +0000 (18:25 +0000)]
The i915 driver was the only consumer of locked task support.

Now that it doesn't use it anymore, get right of the taskqueue
and locked task support.

MFC after: 2 weeks

15 years agoThe vblank_swap ioctl was fundamentally race prone. Get rid of it.
rnoland [Wed, 25 Feb 2009 18:22:57 +0000 (18:22 +0000)]
The vblank_swap ioctl was fundamentally race prone.  Get rid of it.

MFC after: 2 weeks

15 years agoThere is no reason to hold the lock here.
rnoland [Wed, 25 Feb 2009 18:19:16 +0000 (18:19 +0000)]
There is no reason to hold the lock here.

When I was LOCK_PROFILING this was pretty high up and there is no
reason for it.

MFC after: 2 weeks

15 years agoRemove the PZERO priority from mtx_sleep.
rnoland [Wed, 25 Feb 2009 18:16:50 +0000 (18:16 +0000)]
Remove the PZERO priority from mtx_sleep.

MFC after: 2 weeks

15 years agoPrior to r188331 a map entry's last read offset was only updated by a hard
alc [Wed, 25 Feb 2009 07:52:53 +0000 (07:52 +0000)]
Prior to r188331 a map entry's last read offset was only updated by a hard
fault.  In r188331 this update was relocated because of synchronization
changes to a place where it would occur on both hard and soft faults.  This
change again restricts the update to hard faults.

15 years agoMake machdep.hyperthreading_enabled tunable working with the SCHED_ULE.
sobomax [Wed, 25 Feb 2009 01:49:01 +0000 (01:49 +0000)]
Make machdep.hyperthreading_enabled tunable working with the SCHED_ULE.
Unlike with SCHED_BSD, however, it can only be set to 0 at boot time,
it's not possible to change it at runtime.

Reviewed by: jhb
MFC after: 1 month

15 years agoUpdate to latest 3Com firmware image. The latest fimware is
yongari [Wed, 25 Feb 2009 01:12:56 +0000 (01:12 +0000)]
Update to latest 3Com firmware image. The latest fimware is
required to make 3CR990 familiy controllers run on NV flash
firmware version 03.001.008.
The latest firmware added HMAC digest information so teach txp(4)
to pass them to sleep image before downloading is started.

While I'm here restore previous IMR/IER register if firmware
downloading have failed.

PR: kern/89876, kern/132047

15 years agoUpdate paths for ehci_ixp4xx.c in the old and new stacks.
thompsa [Tue, 24 Feb 2009 23:34:02 +0000 (23:34 +0000)]
Update paths for ehci_ixp4xx.c in the old and new stacks.

15 years agoFix path and config name for ehci_mbus.c
thompsa [Tue, 24 Feb 2009 23:30:52 +0000 (23:30 +0000)]
Fix path and config name for ehci_mbus.c

15 years agoThese are no longer needed.
thompsa [Tue, 24 Feb 2009 23:27:59 +0000 (23:27 +0000)]
These are no longer needed.

15 years agoFix some more issues with the real mode BTX.
jhb [Tue, 24 Feb 2009 23:11:15 +0000 (23:11 +0000)]
Fix some more issues with the real mode BTX.

The old BTX passed the general purpose registers from the 32-bit client to
the routines called via virtual 86 mode.  The new BTX did the same thing.
However, it turns out that some instructions behave differently in virtual 86
mode and real mode (even though this is under-documented).  For example, the
LEAVE instruction will cause an exception in real mode if any of the upper
16-bits of %ebp are non-zero after it executes.  In virtual 8086 mode the
upper 16-bits are simply ignored.  This could cause faults in hardware
interrupt handlers that inherited an %ebp larger than 0xffff from the 32-bit
client (loader, boot2, etc.) while running in real mode.

To fix, when executing hardware interrupt handlers provide an explicit clean
state where all the general purpose and segment registers are zero upon
entry to the interrupt handler.  While here, I attempted to simplify the
control flow in the 'intusr' code that sets up the various stack frames
and exits protected mode to invoke the requested routine via real mode.

A huge thanks to Tor Egge (tegge@) for debugging this issue.

Submitted by: tegge
Reviewed by: tegge
Tested by: bz
MFC after: 1 week

15 years agoRevert the addition of the freelist argument for the vm_map_delete()
kib [Tue, 24 Feb 2009 20:57:43 +0000 (20:57 +0000)]
Revert the addition of the freelist argument for the vm_map_delete()
function, done in r188334. Instead, collect the entries that shall be
freed, in the deferred_freelist member of the map. Automatically purge
the deferred freelist when map is unlocked.

Tested by: pho
Reviewed by: alc

15 years agoAdd the assertion macros for the map locks. Use them in several map
kib [Tue, 24 Feb 2009 20:43:29 +0000 (20:43 +0000)]
Add the assertion macros for the map locks. Use them in several map
manipulation functions.

Tested by: pho
Reviewed by: alc

15 years agoUse vm_map_entry_t instead of explicit struct vm_map_entry *.
kib [Tue, 24 Feb 2009 20:27:48 +0000 (20:27 +0000)]
Use vm_map_entry_t instead of explicit struct vm_map_entry *.

Reviewed by: alc

15 years agoUpdate the comment after the r188334.
kib [Tue, 24 Feb 2009 20:23:16 +0000 (20:23 +0000)]
Update the comment after the r188334.

Reviewed by: alc

15 years agoChange the functions to ANSI in those cases where it breaks promotion
rdivacky [Tue, 24 Feb 2009 18:09:31 +0000 (18:09 +0000)]
Change the functions to ANSI in those cases where it breaks promotion
to int rule. See ISO C Standard: SS6.7.5.3:15.

Approved by: kib (mentor)
Reviewed by: warner
Tested by: silence on -current

15 years agoThis copy of usbdevs is unused.
thompsa [Tue, 24 Feb 2009 17:26:37 +0000 (17:26 +0000)]
This copy of usbdevs is unused.

15 years agoAlso use proper capitalisation of FreeBSD in other source files.
ed [Tue, 24 Feb 2009 17:15:29 +0000 (17:15 +0000)]
Also use proper capitalisation of FreeBSD in other source files.

Approved by: thompsa

15 years agoUse my address of the FreeBSD project in the copyright statement in USB2.
ed [Tue, 24 Feb 2009 17:10:43 +0000 (17:10 +0000)]
Use my address of the FreeBSD project in the copyright statement in USB2.

If I remember correctly, our policy was to use FreeBSD with proper
capitalisation in our email addresses. Fix this in Nick Hibma's address
as well.

15 years agodelete-old does not recursively delete dirs so list all its contents too.
thompsa [Tue, 24 Feb 2009 16:47:59 +0000 (16:47 +0000)]
delete-old does not recursively delete dirs so list all its contents too.

Spotted by: naddy

15 years agoWith only one threading library, simplify the logic of setting SHLIBDIR.
ru [Tue, 24 Feb 2009 16:23:34 +0000 (16:23 +0000)]
With only one threading library, simplify the logic of setting SHLIBDIR.

15 years agoRestore the install location of libssp.so.0.
ru [Tue, 24 Feb 2009 16:14:15 +0000 (16:14 +0000)]
Restore the install location of libssp.so.0.

Noticed by: tegge

15 years agoBring back the code to prime the ACCESS cache when fetching attributes for
jhb [Tue, 24 Feb 2009 16:01:56 +0000 (16:01 +0000)]
Bring back the code to prime the ACCESS cache when fetching attributes for
an NFS file.  Now the priming is conditional on  a new
vfs.nfs.prime_access_cache sysctl.  For now I've left the default setting
to disabling the priming.

Requested by:  scottl

15 years agofix typo's
sam [Tue, 24 Feb 2009 15:43:42 +0000 (15:43 +0000)]
fix typo's

15 years agoIn tcp_usr_shutdown() and tcp_usr_send(), I missed converting NULL
rwatson [Tue, 24 Feb 2009 11:17:50 +0000 (11:17 +0000)]
In tcp_usr_shutdown() and tcp_usr_send(), I missed converting NULL
checks for the tcpcb, previously used to detect complete disconnection,
with INP_DROPPED checks.  Correct that, preventing shutdown() from
improperly generating a TCP segment with destination IP and port of
0.0.0.0:0.

PR: kern/132050
Reported by: david gueluy <david.gueluy at netasq.com>
MFC after: 3 weeks

15 years agoMFp4 //depot/projects/usb@158015
thompsa [Tue, 24 Feb 2009 05:35:48 +0000 (05:35 +0000)]
MFp4 //depot/projects/usb@158015

Add support for the Sael M460 3G modem.

Submitted by: Hans Petter Selasky

15 years agoFix compiler warning.
thompsa [Tue, 24 Feb 2009 04:16:19 +0000 (04:16 +0000)]
Fix compiler warning.

15 years agoMFp4 //depot/projects/usb@157974
thompsa [Tue, 24 Feb 2009 03:43:05 +0000 (03:43 +0000)]
MFp4 //depot/projects/usb@157974

Add support for setting and getting the USB template value through libusb20 and
usbconfig.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@157958
thompsa [Tue, 24 Feb 2009 03:41:52 +0000 (03:41 +0000)]
MFp4 //depot/projects/usb@157958

- We don't need to exit the Giant mutex when sleeping. This is done
  automatically. Replace Giant by NULL mutex for all control requests in the
  enumeration path.
- Optimise away duplicate alternate interface selection requests in USB Host
  mode.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@157909
thompsa [Tue, 24 Feb 2009 03:40:48 +0000 (03:40 +0000)]
MFp4 //depot/projects/usb@157909

Changes to make implementing USB NDIS easier.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@157855
thompsa [Tue, 24 Feb 2009 03:40:09 +0000 (03:40 +0000)]
MFp4 //depot/projects/usb@157855

Document short_frames_ok.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@157853
thompsa [Tue, 24 Feb 2009 03:39:13 +0000 (03:39 +0000)]
MFp4 //depot/projects/usb@157853

Clean up old way of polling the USB hardware.  The existing polling support was
a bit hackish.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@157847
thompsa [Tue, 24 Feb 2009 03:38:24 +0000 (03:38 +0000)]
MFp4 //depot/projects/usb@157847

Improvements to "usb2_transfer_setup()" and "usb2_transfer_unsetup()". Set
"ppxfer[n]" when the transfer setup is complete to prevent races.  Remove
redundant NULL-checks from "usb2_transfer_unsetup()".

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb; 157814, 157863, 157868
thompsa [Tue, 24 Feb 2009 03:34:05 +0000 (03:34 +0000)]
MFp4 //depot/projects/usb; 157814, 157863, 157868

- The software computed HID size is not always correct, because the algoritm
  does not handle unsorted HID descriptors.
- Change the way we obtain the report ID.
- Use the X/Y/Z+button locations instead for report ID source for ums.
- Add more range checks.
- Remove Microsoft Mouse quirks. If the positions are moduloed the report
  length multiplied by 8, the values seem correct.
- Some minor style changes.

Submitted by: Hans Petter Selasky