Commit Graph

149962 Commits

Author SHA1 Message Date
Andrew Thompson
655dc9d00a Add experimental support for usb serial console and polled mode during DDB.
Submitted by:	Hans Petter Selasky
2009-09-28 08:13:50 +00:00
Andrew Thompson
063e119dcd Add a config number quirk for the ELSA_MODEM1
Submitted by:	Stefan Bethke
2009-09-28 08:09:11 +00:00
Andrew Thompson
adedd2deb5 add more device IDs
Reported by:	Mike Tancsa
Submitted by:	Hans Petter Selasky
2009-09-28 08:07:20 +00:00
Andrew Thompson
87832c5e33 Allow setting of MAC address for AXE based ethernet adapters.
Submitted by:	yongari
2009-09-28 08:05:14 +00:00
Andrew Thompson
3ac526e01e Increase the rx buffer size to 16384 bytes, this increases RX performance from
50Mbps to 220Mbps on PLANEX GU-1000T.

Submitted by:	yongari
2009-09-28 08:03:52 +00:00
Andrew Thompson
a4fcd5cae9 - Remove SAMSUNG_YP_U2 now that it is in the cam layer
- Add quirk from Tobias Grosser for Western Mypassword

Submitted by:	Hans Petter Selasky
2009-09-28 08:00:17 +00:00
Andrew Thompson
30c257f8ae MFp4
Add new usbdev entries for Marvell, FTDI, Option and Western.
2009-09-28 07:57:23 +00:00
Andrew Thompson
4076dd2309 Add basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.
http://www.usb.org/developers/devclass_docs/NCM10.zip

Submitted by:	Hans Petter Selasky
2009-09-28 07:53:55 +00:00
Andrew Thompson
a872528155 Add extra safety locking when clobbering xfer->flags_int.started in start and
stop functions, because xfer->flags_int is also updated by the USB controller,
under the controller lock.

Submitted by:	Hans Petter Selasky
2009-09-28 07:46:22 +00:00
Andrew Thompson
35e0e60378 Correct buffer sizes used so that they match. The old code could give the
impression that a overflow situation existed but was not possible.

Reported by:	kib
Submitted by:	Hans Petter Selasky
2009-09-28 07:42:59 +00:00
Xin LI
9534110f48 Static'ify internal methods and use prototype. 2009-09-28 07:42:52 +00:00
Andrew Thompson
7a918edff2 Add support for USB language selection.
PR:		usb/138563
Reported by:	Bruce Cran
Submitted by:	Hans Petter Selasky
2009-09-28 07:41:17 +00:00
Andrew Thompson
a9e267575b Fix NULL-pointer dereference in usb_endpoint_foreach().
PR:		usb/138389
Submitted by:	Patroklos Argyroudis at census, inc
2009-09-28 07:39:51 +00:00
Andrew Thompson
3bfbd845ff Add support for ChipHead 341 serial port adapter.
Submitted by:	Hans Petter Selasky
2009-09-28 07:32:11 +00:00
Andrew Thompson
33ea13230a Clear all interrupts rather than just SETUP packet.
Submitted by:	Hans Petter Selasky
2009-09-28 07:10:32 +00:00
Andrew Thompson
2094ecda08 Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
statements to zero.

Submitted by:	Hans Petter Selasky
2009-09-28 07:09:17 +00:00
Andrew Thompson
6450e5babf Import two PCI quirks from Linux
- Add quirk for ATI SB600 and SB700 to free SMB controller
 - Correct schedule sleep time to 10us on the VIA ehci controller

Reported by:	Dorian B<FC>ttner, Andriy Gapon
Submitted by:	Hans Petter Selasky
2009-09-28 07:06:47 +00:00
Andrew Thompson
d88688c7da MFp4 @ 168387
- clean up USB detach logic. There seems to be some problems detaching multiple
  USB HUBs connected in series from the root.

- after this patch the rule is:
  1) Always use device_detach() on the USB HUB first.
  2) Never just device_delete_child() on the USB HUB, because that function
  will traverse to all the device leaves and free them first, and then the USB
  stack will free the devices twice which doesn't work very well.

- make sure the did DMA delay gets set after the timeout has elapsed to make
  logic more clear. There is no functional difference.

Submitted by:	Hans Petter Selasky
2009-09-28 07:01:54 +00:00
Colin Percival
ca82268b2a Silence warning printed by getfsspec(3) when /etc/fstab does not exist
fstab: /etc/fstab:0: No such file or directory
and from dump(8) when setfsent(3) fails due to /etc/fstab not existing:
  DUMP: Can't open /etc/fstab for dump table information: No such...

This makes daily and security periodic runs somewhat cleaner in jails
which lack /etc/fstab files.

MFC after:	1 month
2009-09-28 03:32:35 +00:00
Alexander Motin
7365f12882 Fethch more information from IDENTIFY result. 2009-09-27 22:00:26 +00:00
Gabor Kovesdan
d0a021b7bf - Add share/nls/gl_ES.ISO8859-1, which I forgot in my last commit
Submitted by:	Andrzej Tobola <ato@iem.pw.edu.pl> (via private mail)
2009-09-27 21:27:11 +00:00
Bjoern A. Zeeb
76e2ffb5a5 Add a simple C program to check mmap calls to various different addresses.
The most important test is the mapping fixed at address 0 depending on the
new sysctl.

Things will be updated and possibly converted to m4/.t style once the
details about the kernel patch will be shaken out.

Submitted by:	simon (initial version)
2009-09-27 21:03:33 +00:00
Simon L. B. Nielsen
3d5812a230 - When we run our trap cleanup handler, echo that we are running this
handler to make it more clear why we are 'suddenly' running df,
  umount, and mdconfig.
- Remove trap handler again after we have unconfigured the memory
  device etc.  Before we could end up running the trap handler if a
  later stage failed, which was a bit confusing and not really useful.

MFC after:	2 weeks
2009-09-27 21:01:07 +00:00
Alexander Motin
14a0f03de2 Report SATA 3.x devices. 2009-09-27 20:50:54 +00:00
Alexander Motin
4598c08b9b Add more defines from recent and not only specs. 2009-09-27 20:48:10 +00:00
Ed Schouten
53e69c0c2a Add support for VT200-style mouse input.
Right now if applications want to use the mouse on the command line,
they use sysmouse(4) and install a signal handler in the kernel to
deliver signals when mouse events arrive. This conflicts with my plan to
change to TERM=xterm, so implement proper VT200-style mouse input.

Because mouse input is now streamed through the TTY, it means you can
now SSH to another system on the console and use the mouse there as
well. The disadvantage of the VT200 mouse protocol, is that it doesn't
seem to generate events when moving the cursor. Only when pressing and
releasing mouse buttons.

There are different protocols as well, but this one seems to be most
commonly supported.

Reported by:	Paul B. Mahol <onemda gmail com>
Tested with:	vim(1)
2009-09-27 18:19:41 +00:00
Simon L. B. Nielsen
27bfa95847 Do not allow mmap with the MAP_FIXED argument to map at address zero.
This is done to make it harder to exploit kernel NULL pointer security
vulnerabilities.  While this of course does not fix vulnerabilities,
it does mitigate their impact.

Note that this may break some applications, most likely emulators or
similar, which for one reason or another require mapping memory at
zero.

This restriction can be disabled with the security.bsd.mmap_zero
sysctl variable.

Discussed with:	rwatson, bz
Tested by:	bz (Wine), simon (VirtualBox)
Submitted by:	jhb
2009-09-27 14:49:51 +00:00
Jung-uk Kim
71f99e637a Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
install apm(8) and apm_bios.h on amd64.
2009-09-27 14:00:16 +00:00
Yoshihiro Takahashi
e8c2bc2b71 Add '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
(the default is 1).

This makes the nfslockd module works for NFS client.

Reviewed by:	dfr
MFC after:	3 days
2009-09-27 13:24:34 +00:00
Gabor Kovesdan
bc65e45307 - Add Galician NLS catalog 2009-09-27 13:16:38 +00:00
Dag-Erling Smørgrav
2db2319de5 printerr_reply() has never been used for as long as we've had this code in
our tree (13+ years).  This is an excellent argument for aggressive use
of "static".
2009-09-26 23:05:01 +00:00
Hiroki Sato
97c8942c91 Use ipv6if() when $rtadvd_interfaces="AUTO". 2009-09-26 19:00:47 +00:00
Hiroki Sato
27fa984efd Move rc.d/{stf,faith} to just before rc.d/routing.
Pointed out by:	tegge
2009-09-26 19:00:20 +00:00
Hiroki Sato
2e77c5abfb Fix several logic bugs in the previous IPv6 variable change and
re-add $ipv6_enable support for backward compatibility.  From
UPDATING:

 1. To use IPv6, simply define $ifconfig_IF_ipv6 like $ifconfig_IF
    for IPv4.  For aliases, $ifconfig_IF_aliasN should be used.
    Note that both variables need the "inet6" keyword at the head.

    Do not set $ipv6_network_interfaces manually if you do not
    understand what you are doing.  It is not needed in most cases.

    $ipv6_ifconfig_IF and $ipv6_ifconfig_IF_aliasN still work, but
    they are obsolete.

 2. $ipv6_enable is obsolete.  Use $ipv6_prefer and/or
    "inet6 accept_rtadv" keyword in ifconfig(8) instead.

    If you define $ipv6_enable=YES, it means $ipv6_prefer=YES and
    all configured interfaces have "inet6 accept_rtadv" in the
    $ifconfig_IF_ipv6.  These are for backward compatibility.

 3. A new variable $ipv6_prefer has been added.  If NO, IPv6
    functionality of interfaces with no corresponding
    $ifconfig_IF_ipv6 is disabled by using "inet6 ifdisabled" flag,
    and the default address selection policy of ip6addrctl(8)
    is the IPv4-preferred one (see rc.d/ip6addrctl for more details).
    Note that if you want to configure IPv6 functionality on the
    disabled interfaces after boot, first you need to clear the flag by
    using ifconfig(8) like:

         ifconfig em0 inet6 -ifdisabled

    If YES, the default address selection policy is set as
    IPv6-preferred.

    The default value of $ipv6_prefer is NO.

 4. If your system need to receive Router Advertisement messages,
    define "inet6 accept_rtadv" in $ifconfig_IF_ipv6.  The rc(8)
    scripts automatically invoke rtsol(8) when the interface becomes
    UP.  The Router Advertisement messages are used for SLAAC
    (State-Less Address AutoConfiguration).
2009-09-26 18:59:00 +00:00
Pawel Jakub Dawidek
5ff124a953 Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
This completes the fix from r185586.

PR:		kern/139059
Reported by:	Daniel Braniss <danny@cs.huji.ac.il>
Submitted by:	Jaakko Heinonen <jh@saunalahti.fi>
Tested by:	Daniel Braniss <danny@cs.huji.ac.il>
MFC after:	3 days
2009-09-26 18:23:16 +00:00
Alan Cox
b8947edcb6 Make malloc(3) superpage aware. Specifically, if getpagesizes(3) returns
a large page size that is greater than malloc(3)'s default chunk size but
less than or equal to 4 MB, then increase the chunk size to match the large
page size.

Most often, using a chunk size that is less than the large page size is not
a problem.  However, consider a long-running application that allocates and
frees significant amounts of memory.  In particular, it frees enough memory
at times that some of that memory is munmap()ed.  Up until the first
munmap(), a 1MB chunk size is just fine; it's not a problem for the virtual
memory system.  Two adjacent 1MB chunks that are aligned on a 2MB boundary
will be promoted automatically to a superpage even though they were
allocated at different times.  The trouble begins with the munmap(),
releasing a 1MB chunk will trigger the demotion of the containing superpage,
leaving behind a half-used 2MB reservation.  Now comes the real problem.
Unfortunately, when the application needs to allocate more memory, and it
recycles the previously munmap()ed address range, the implementation of
mmap() won't be able to reuse the reservation.  Basically, the coalescing
rules in the virtual memory system don't allow this new range to combine
with its neighbor.  The effect being that superpage promotion will not
reoccur for this range of addresses until both 1MB chunks are freed at some
point in the future.

Reviewed by:	jasone
MFC after:	3 weeks
2009-09-26 18:20:40 +00:00
Rui Paulo
98c53ad360 Promote the cpu_class local variable to global and expose it in md_var.h
Reviewed by:	freebsd-arm
2009-09-26 16:37:23 +00:00
Ed Schouten
56a4365bde Add 256 color support.
It is quite inconvenient that if an application for xterm uses 256 color
mode, text suddenly starts to blink (because of ;5; in the middle).
We'd better just implement 256 color mode and add a conversion routine
from 256 to 8 color mode, which doesn't seem to be too bad in practice.

Remapping colors is done quite simple. If one of the channels is most
actively represented, primary colors are used. If two channels are most
actively represented, secondary colors are used. If all three channels
are equal (gray), it picks between black and white.

Reported by:	Paul B. Mahol <onemda gmail com>
2009-09-26 15:26:32 +00:00
Ed Schouten
f311d56014 Properly get out of origin mode if the cursor has to move outside of it.
In some cases events may occur that move the cursor outside the
scrolling region while in origin mode, which is normally not possible.
Events like these include:

- Alignment test.
- Restore cursor.

Properly switch off origin mode in these cases.

MFC after:	1 month
2009-09-26 15:07:11 +00:00
Ed Schouten
cd531e74e9 Get rid of now deprecated SCS wrappers.
We always build SCS, even when processing 8-bit data. There is no reason
why we should be able to disable it now.
2009-09-26 15:03:42 +00:00
Ed Schouten
a78f7fafc0 Make the fuzzer a bit more useful by forcing 7-bit data into it.
Getting valid UTF-8 sequences is quite unlikely, so we'd better just
convert data to 7 bits and make it extra likely for escape sequences to
occur.
2009-09-26 15:00:42 +00:00
Bjoern A. Zeeb
4507f02e0e lindev(4) [1] is supposed to be a collection of linux-specific pseudo
devices that we also support, just not by default (thus only LINT or
module builds by default).

While currently there is only "/dev/full" [2], we are planning to see more
in the future.  We may decide to change the module/dependency logic in the
future should the list grow too long.

This is not part of linux.ko as also non-linux binaries like kFreeBSD
userland or ports can make use of this as well.

Suggested by:	rwatson [1] (name)
Submitted by:	ed [2]
Discussed with:	markm, ed, rwatson, kib (weeks ago)
Reviewed by:	rwatson, brueffer (prev. version)
PR:		kern/68961
MFC after:	6 weeks
2009-09-26 12:45:28 +00:00
Pawel Jakub Dawidek
ab711589df Handle cases where virtual (GFS) vnodes are referenced when doing forced
unmount. In that case we cannot depend on the proper order of invalidating
vnodes, so we have to free resources when we have a chance.

PR:		kern/139062
Reported by:	trasz
MFC after:	3 days
2009-09-26 00:10:45 +00:00
Pawel Jakub Dawidek
a0b238644a On lookup error VFS expects *vpp to be set to NULL, be sure to do that.
MFC after:	3 days
2009-09-26 00:08:44 +00:00
Pawel Jakub Dawidek
a99aaff645 Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

MFC after:	3 days
2009-09-26 00:07:14 +00:00
Pawel Jakub Dawidek
1aba32d9b4 - Don't depend on value returned by gfs_*_inactive(), it doesn't work
well with forced unmounts when GFS vnodes are referenced.
- Make other preparations to GFS for forced unmounts.

PR:		kern/139062
Reported by:	trasz
MFC after:	3 days
2009-09-26 00:04:30 +00:00
Dag-Erling Smørgrav
bc5fd90972 Wipe out mergeinfo. 2009-09-25 23:14:43 +00:00
Dag-Erling Smørgrav
95f1d628d9 Other minor style issues. 2009-09-25 23:03:24 +00:00
Dag-Erling Smørgrav
ebb2b0f28a Slight style cleanup. 2009-09-25 22:20:30 +00:00
Jung-uk Kim
7ca724d57b Fix couple of style nits missed in the previous commit. 2009-09-25 20:06:31 +00:00