Commit Graph

145350 Commits

Author SHA1 Message Date
thompsa
4eafa084fe Move the NORELEASE check to after the recurse count decrement and bailout, this
is not counted as actually releasing the lock.
2009-02-28 19:10:43 +00:00
thompsa
15bfb6156f A couple of style nits in the last commit
- unwrap short lines
 - move variable initialisation out of the declaration.
2009-02-28 17:20:00 +00:00
thompsa
ea8d02b4dd - Remove the usb interface number from the device nodes as it is not needed.
- Do not recreate the device nodes in set_alt_interface as the endpoints do not
  change.

Submitted by:	Hans Petter Selasky
2009-02-28 17:14:03 +00:00
ed
322413c46c Add memmove() to the kernel, making the kernel compile with Clang.
When copying big structures, LLVM generates calls to memmove(), because
it may not be able to figure out whether structures overlap. This caused
linker errors to occur. memmove() is now implemented using bcopy().
Ideally it would be the other way around, but that can be solved in the
future. On ARM we don't do add anything, because it already has
memmove().

Discussed on:	arch@
Reviewed by:	rdivacky
2009-02-28 16:21:25 +00:00
ed
1c22aa10af Fix compilation of newkey(8) with WITHOUT_NIS=yes.
Increasing WARNS seems to have broken compilation of this utility.
Instead of lowering WARNS, just fix to code to compile properly.

Submitted by:	<bf2006a yahoo com>
Tested by:	bms
2009-02-28 16:16:37 +00:00
das
906af9736a Use getline() instead of fgets(). This enables nl(1) to handle
arbitrarily long lines and embedded NULs. The new functionality is
nugatory, but adding it is a simple way to improve the exposure of
getline() in -CURRENT.
2009-02-28 15:53:36 +00:00
ed
51d425ac0e Replace bcopy() calls inside the TTY layer with memcpy()/strlcpy().
In all these cases the buffers never overlap. Program names are also
likely to be shorter, so use a regular strlcpy() to copy p_comm.
2009-02-28 14:20:26 +00:00
mav
b342cbbd7a Rework device probing by moving ata_getparam() call from ata_identify() to
drivers' probe routines. It allows not to sleep and so not drop Giant inside
ata_identify() critical section and so avoid crash if it reentered on
request timeout. Reentering of probe call checked inside of it.

Give device own knowledge about it's type (ata/atapi/atapicam). It is not
a good idea to ask channel status for device type inside ata_getparam().

Add softc memory deallocation on device destruction.
2009-02-28 11:25:05 +00:00
rwatson
24ca141ec7 Remove PRIV_ROOT -- all system privileges must now be explicitly named
in support of forthcoming work on a fine-grained privilege mechanism.

Facilitated by:	bz, thompsa, rink
2009-02-28 10:44:39 +00:00
ed
00646e6e14 Fix compilation of fstat.
The udev should now be obtained from the dosmount instead of the denode.
2009-02-28 10:40:37 +00:00
ed
f05698585d Add missing POSIX 1003.1-2008 open(2) flag; O_TTY_INIT.
On FreeBSD, this is the default behaviour. According to the spec, we may
give this flag a value of zero, but I'd rather not do this. If we define
it to a non-zero value, we can always change default behaviour without
changing the ABI. This is very unlikely to happen, though.
2009-02-28 10:10:30 +00:00
das
b2ec174608 Tests for getdelim(). 2009-02-28 06:39:39 +00:00
das
d6c4fb135e Add a file containing tests for simple format specifiers.
Currently it only has tests for a few sign issues with integer
formats, including PR 131880.
2009-02-28 06:37:10 +00:00
das
efea0f4e75 Tests for wcscasecmp(), wcsnlen(), and stpncpy(). 2009-02-28 06:34:04 +00:00
das
3f9ccbd00f Make `less -R' not crash all the time. 2009-02-28 06:27:23 +00:00
das
e5de8b5d17 Replace a dozen lines of code with a call to strnlen() / wcsnlen(). 2009-02-28 06:06:57 +00:00
das
ebb4763b7f Add restrict qualifiers.
I missed this file in my previous commit.
2009-02-28 06:05:37 +00:00
das
a67fbaa46c - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),
wcscasecmp(), and wcsncasecmp().
- Make some previously non-standard extensions visible
  if POSIX_VISIBLE >= 200809.
- Use restrict qualifiers in stpcpy().
- Declare off_t and size_t in stdio.h.
- Bump __FreeBSD_version in case the new symbols (particularly
  getline()) cause issues with ports.

Reviewed by:	standards@
2009-02-28 06:00:58 +00:00
das
b739b3fb48 Define a macro for POSIX.1-2008 here until a future groff import
includes one.
2009-02-28 05:47:41 +00:00
das
9b6954ebe0 Add visibility constants for POSIX.1-2008. 2009-02-28 05:24:05 +00:00
das
28465baaf0 Add restrict qualifiers to the parameters to strlcpy() and strlcat().
The annotation mainly just serves as a hint that they're not intended
for use with overlapping strings.
2009-02-28 05:15:02 +00:00
das
d6bc3f67e8 Mark memmem() __pure. 2009-02-28 05:08:35 +00:00
das
8f720cc667 Make sure %zd treats negative arguments properly on 32-bit platforms.
Fix harmless but related bugs in %_$zd and %_$tu.

PR:		131880
MFC after:	1 week
2009-02-28 04:58:18 +00:00
rnoland
ddd5c68e84 Initialize the vblank structures at load time. Previously we did this
at irq install/uninstall time, but when we vt switch, we uninstall the
irq handler.  When the irq handler is reinstalled, the modeset ioctl
happens first.  The modeset ioctl is supposed to tell us that we can
disable vblank interrupts if there are no active consumers.  This will
fail after a vt switch until another modeset ioctl is called via dpms
or xrandr.  Leading to cases where either interrupts are on and can't
be disabled, or worse, no interrupts at all.

MFC after:	2 weeks
2009-02-28 02:37:55 +00:00
rnoland
e9bc5839af Add a tuneable to allow disabling msi on drm at runtime.
Suggested by:	jhb@

MFC after:	2 weeks
2009-02-27 23:50:55 +00:00
mav
84d24fa527 Copy/paste bug fix for previos commit. 2009-02-27 23:49:26 +00:00
imp
4d511e5cfe Move to new usb stack that puts the front-end bus attachments with the
usb stack rather than with the rest of the processor support code.
Not sure that's a good idea, as we were moving away from it, but this
fixes the build in the mean time so we can have that discussion.
2009-02-27 23:12:28 +00:00
thompsa
0f725fd6ff Change the last references to PRIV_ROOT. /dev/usb used to be world writable so
further root checks were needed, this isnt the case anymore but just change it
to PRIV_DRIVER until it can be investigated later.

Spotted by:	rwatson
2009-02-27 22:12:15 +00:00
thompsa
8dd229ff64 Remove ic_update_mcast calls that are not implemented.
Spotted by:	sam
Pointy hat:	me
2009-02-27 21:50:15 +00:00
thompsa
4e68a558e5 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
2009-02-27 21:14:29 +00:00
rrs
57c49bea03 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
2009-02-27 20:54:45 +00:00
jhb
90499e3f8e - 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
2009-02-27 20:00:15 +00:00
mav
9456dca639 Merge rev. 188615, 188812 changes from old-USB to USB2 driver. 2009-02-27 19:27:33 +00:00
sam
44622ab7e9 really enable usb1 2009-02-27 19:26:23 +00:00
davidch
e039f0dcb5 - 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
2009-02-27 19:25:06 +00:00
sam
8499a8b51c 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
2009-02-27 19:23:55 +00:00
sam
f6a89b7745 o add -HEAD to avoid build conflicts
o switch to a more common flash config
2009-02-27 19:21:35 +00:00
sam
1d7238f9d6 add -HEAD to avoid build conflicts 2009-02-27 19:20:57 +00:00
thompsa
7a32705dbf Make a note about USB /dev changes. 2009-02-27 17:32:49 +00:00
avg
53ca38295e 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)
2009-02-27 17:29:48 +00:00
avg
8a71ee729e 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)
2009-02-27 17:29:31 +00:00
thompsa
1f16c7700d 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)
2009-02-27 17:27:16 +00:00
ed
03a6b7577d Remove empty directory structure.
Submitted by:	Pawel Worach <pawel worach gmail com>
2009-02-27 16:01:40 +00:00
thompsa
1e203e5f95 Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.
Submitted by:	daichi
Pointy hat:	me
2009-02-27 15:30:42 +00:00
bz
df2be82cec 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.
2009-02-27 14:12:05 +00:00
bz
5e1ae496af Move the include of vinet.h further up before the ipfilter includes. 2009-02-27 13:29:18 +00:00
ed
f02ef8e872 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>
2009-02-27 13:28:54 +00:00
bz
710220924b Shuffle the vimage.h includes or add where missing. 2009-02-27 13:22:26 +00:00
ed
2078a09b34 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
2009-02-27 12:50:25 +00:00
raj
50b3c45b0e Prefer register usage style to be more consistent with the rest of the
trap_subr.S code.
2009-02-27 12:18:17 +00:00