]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoRename all symbols in libmp(3) to mp_*, just like Solaris.
Ed Schouten [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
Alexander Motin [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 Schouten [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
Andrew Thompson [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 Schouten [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.
Alexander Motin [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 Leffler [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 Leffler [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
Andriy Gapon [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 Rao [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
Roman Divacky [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 Schouten [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 Schouten [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
John Baldwin [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 Schouten [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 Schouten [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
Andriy Gapon [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
Andriy Gapon [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,
Andriy Gapon [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
Andriy Gapon [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 Schouten [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 Schouten [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 Schouten [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:
Robert Watson [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 Schouten [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 Schouten [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 Schouten [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 Leffler [Thu, 26 Feb 2009 06:16:15 +0000 (06:16 +0000)]
add more gpio registers

15 years agoFix typo in comments in r189023.
Maxim Sobolev [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
Jung-uk Kim [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.
Robert Noland [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.
Robert Noland [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
Robert Noland [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.
Robert Noland [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
Robert Noland [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.
Robert Noland [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.
Robert Noland [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.
Robert Noland [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.
Robert Noland [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.
Robert Noland [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
Alan Cox [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.
Maxim Sobolev [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
Pyun YongHyeon [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.
Andrew Thompson [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
Andrew Thompson [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.
Andrew Thompson [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.
John Baldwin [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()
Konstantin Belousov [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
Konstantin Belousov [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 *.
Konstantin Belousov [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.
Konstantin Belousov [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
Roman Divacky [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.
Andrew Thompson [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 Schouten [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 Schouten [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.
Andrew Thompson [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.
Ruslan Ermilov [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.
Ruslan Ermilov [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
John Baldwin [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 Leffler [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
Robert Watson [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
Andrew Thompson [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.
Andrew Thompson [Tue, 24 Feb 2009 04:16:19 +0000 (04:16 +0000)]
Fix compiler warning.

15 years agoMFp4 //depot/projects/usb@157974
Andrew Thompson [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
Andrew Thompson [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
Andrew Thompson [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
Andrew Thompson [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
Andrew Thompson [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
Andrew Thompson [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
Andrew Thompson [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

15 years agomove attach debug msg to the rf backend
Sam Leffler [Tue, 24 Feb 2009 01:16:40 +0000 (01:16 +0000)]
move attach debug msg to the rf backend

15 years agoAdd PCIE power control api:
Sam Leffler [Tue, 24 Feb 2009 01:07:06 +0000 (01:07 +0000)]
Add PCIE power control api:
o add ah_configPCIE and ah_disablePCIE for drivers to configure PCIE
  power save operation (modeled after ath9k, may need changes)
o add private state flag to indicate if device is PCIE (replaces private
  hack in 5212 code)
o add serdes programming ini bits for 5416 and later parts and setup
  for each part (5416 and 9160 logic hand-crafted from existing routines);
  5212 remains open-coded but is now hooked in via ah_configPCIE
o add PCIE workaround gunk
o add ar5416AttachPCIE for iodomatic code used by 5416 and later parts

15 years agoInstall the old usb headers under /usr/include/legacy/dev/usb as they are
Andrew Thompson [Tue, 24 Feb 2009 00:53:10 +0000 (00:53 +0000)]
Install the old usb headers under /usr/include/legacy/dev/usb as they are
needed by the hal port. This will be removed before 8.0.

Add an exclusion to kdump as some structs will be redefined.

Requested by: marcus

15 years agoExclude ndis from the LINT build as it currently breaks the build, patches to
Andrew Thompson [Tue, 24 Feb 2009 00:39:48 +0000 (00:39 +0000)]
Exclude ndis from the LINT build as it currently breaks the build, patches to
move to the new usb stack are in progress.

15 years agoFill in gpio support for 5416 and later parts:
Sam Leffler [Tue, 24 Feb 2009 00:33:08 +0000 (00:33 +0000)]
Fill in gpio support for 5416 and later parts:
o add output mux support
o gpio pin count is chip-dependent
o 9280 and 9285 do input handling different
o hookup gpio interrupts
o no need to save/restore soft led state around reset

15 years agomisc fixups, mostly for code not compiled yet
Sam Leffler [Tue, 24 Feb 2009 00:29:32 +0000 (00:29 +0000)]
misc fixups, mostly for code not compiled yet

15 years ago5416 and later parts mux the gpio outputs; extend the api to include
Sam Leffler [Tue, 24 Feb 2009 00:12:16 +0000 (00:12 +0000)]
5416 and later parts mux the gpio outputs; extend the api to include
a signal type that's used to select the appropriate mux

15 years agomove eeprom attach above first reset as the reset code checks the
Sam Leffler [Tue, 24 Feb 2009 00:03:14 +0000 (00:03 +0000)]
move eeprom attach above first reset as the reset code checks the
eeprom contents for 9280 and later parts

15 years agoattach methods don't need to be public, make 'em static
Sam Leffler [Mon, 23 Feb 2009 23:58:37 +0000 (23:58 +0000)]
attach methods don't need to be public, make 'em static

15 years ago5416 and later parts get the radio rev differently; add ar5416GetRadioRev
Sam Leffler [Mon, 23 Feb 2009 23:54:08 +0000 (23:54 +0000)]
5416 and later parts get the radio rev differently; add ar5416GetRadioRev
to do it the right way

15 years agoremove private copies of gpio methods that were needed when the hal
Sam Leffler [Mon, 23 Feb 2009 23:48:17 +0000 (23:48 +0000)]
remove private copies of gpio methods that were needed when the hal
was an independent entity

15 years agoMake sure at least two tx slots are free before sending the mbuf since an
Andrew Thompson [Mon, 23 Feb 2009 23:46:56 +0000 (23:46 +0000)]
Make sure at least two tx slots are free before sending the mbuf since an
additional frame may be sent for 80211 protection.

15 years agoprint mac+rf part names; drop the printing 2ghz rf stuff (might come back)
Sam Leffler [Mon, 23 Feb 2009 23:41:12 +0000 (23:41 +0000)]
print mac+rf part names; drop the printing 2ghz rf stuff (might come back)

15 years agoPut debug.vm_lowmem sysctl under DIAGNOSTIC.
Robert Watson [Mon, 23 Feb 2009 23:30:17 +0000 (23:30 +0000)]
Put debug.vm_lowmem sysctl under DIAGNOSTIC.

Submitted by: sam
MFC after: 3 days

15 years agoUse the correct config names for the netgraph bluetooth modules.
Andrew Thompson [Mon, 23 Feb 2009 23:12:01 +0000 (23:12 +0000)]
Use the correct config names for the netgraph bluetooth modules.

15 years agoInclude audit.h so that the system call path protected by NFS_LEGACYRPC
Robert Watson [Mon, 23 Feb 2009 23:04:15 +0000 (23:04 +0000)]
Include audit.h so that the system call path protected by NFS_LEGACYRPC
can audit its arguments.

Submitted by: Jaakko Heinonen <jh at saunalahti.fi>
MFC after: 1 week
X-MFC-note: MFC with r188311

15 years agoAdd a debugging sysctl, debug.vm_lowmem, that when assigned a value of
Robert Watson [Mon, 23 Feb 2009 23:00:12 +0000 (23:00 +0000)]
Add a debugging sysctl, debug.vm_lowmem, that when assigned a value of
1 will trigger a pass through the VM's low-memory handlers, such as
protocol and UMA drain routines.  This makes it easier to exercise
these otherwise rarely-invoked code paths.

MFC after: 3 days

15 years agoAssert the radix head lock in in6_rtqkill().
Robert Watson [Mon, 23 Feb 2009 22:58:59 +0000 (22:58 +0000)]
Assert the radix head lock in in6_rtqkill().

MFC after: 3 days

15 years agoIn in_rtqkill(), assert the radix head lock, and pass RTF_RNH_LOCKED
Robert Watson [Mon, 23 Feb 2009 22:57:55 +0000 (22:57 +0000)]
In in_rtqkill(), assert the radix head lock, and pass RTF_RNH_LOCKED
to in_rtrequest(); the radix head lock is already acquired before
rnh_walktree is called in in_rtqtimo_one().  This avoids a recursive
acquisition that is no longer permitted in 8.x due to use of an rwlock
for the radix head lock.

Reported by: dikshie <dikshie at gmail.com>
MFC after: 3 days

15 years ago- comment out slhci in NOTES for the moment
Andrew Thompson [Mon, 23 Feb 2009 22:56:03 +0000 (22:56 +0000)]
- comment out slhci in NOTES for the moment
- rearrange the ucom entry so its recognised by config(8)

15 years agoRemove ugen from NOTES, its no longer an optional device.
Andrew Thompson [Mon, 23 Feb 2009 22:49:43 +0000 (22:49 +0000)]
Remove ugen from NOTES, its no longer an optional device.

15 years agoBring SATA revision reporting into conformance with SATA-IO guidelines.
Alexander Motin [Mon, 23 Feb 2009 22:29:38 +0000 (22:29 +0000)]
Bring SATA revision reporting into conformance with SATA-IO guidelines.

15 years agoFix non-AHCI channels detection on combined JMicron controllers,
Alexander Motin [Mon, 23 Feb 2009 22:13:05 +0000 (22:13 +0000)]
Fix non-AHCI channels detection on combined JMicron controllers,
broken by r188694.

15 years agoMove the uaudio and ata-usb drivers into their correct locations.
Andrew Thompson [Mon, 23 Feb 2009 21:19:18 +0000 (21:19 +0000)]
Move the uaudio and ata-usb drivers into their correct locations.

15 years agoRight now, when trying to unmount a device that's already gone,
Edward Tomasz Napierala [Mon, 23 Feb 2009 21:09:28 +0000 (21:09 +0000)]
Right now, when trying to unmount a device that's already gone,
msdosfs_unmount() and ffs_unmount() exit early after getting ENXIO.
However, dounmount() treats ENXIO as a success and proceeds with
unmounting.  In effect, the filesystem gets unmounted without closing
GEOM provider etc.

Reviewed by: kib
Approved by: rwatson (mentor)
Tested by: dho
Sponsored by: FreeBSD Foundation

15 years agoMove two missed usb drivers out to the graveyard location under sys/legacy/dev.
Andrew Thompson [Mon, 23 Feb 2009 21:07:20 +0000 (21:07 +0000)]
Move two missed usb drivers out to the graveyard location under sys/legacy/dev.

15 years agoRefactor, moving error checking outside of the
Edward Tomasz Napierala [Mon, 23 Feb 2009 20:56:27 +0000 (20:56 +0000)]
Refactor, moving error checking outside of the
'if (mp->mnt_flag & MNT_SOFTDEP)' conditional.  No functional
changes.

Reviewed by: kib
Approved by: rwatson (mentor)
Tested by: pho
Sponsored by: FreeBSD Foundation

15 years agoFix comment: we write the trap vector to SPRG3, not SPRG0.
Nathan Whitehorn [Mon, 23 Feb 2009 19:31:48 +0000 (19:31 +0000)]
Fix comment: we write the trap vector to SPRG3, not SPRG0.

15 years agoFix spelling (again).
Andrew Thompson [Mon, 23 Feb 2009 19:30:00 +0000 (19:30 +0000)]
Fix spelling (again).

Spotted by: Fabian Keil

15 years agoFix spelling.
Andrew Thompson [Mon, 23 Feb 2009 19:28:29 +0000 (19:28 +0000)]
Fix spelling.

Spotted by: Fabian Keil