]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMFV of tzdata2009n
Edwin Groothuis [Mon, 28 Sep 2009 21:53:28 +0000 (21:53 +0000)]
MFV of tzdata2009n

Pakistan will go out DST on 1 October.
Headsup for changes in Argentina.

14 years agoImport of tzdata2009n:
Edwin Groothuis [Mon, 28 Sep 2009 21:46:54 +0000 (21:46 +0000)]
Import of tzdata2009n:

Pakistan will go out of DST on 1 October 2009.
Heads up for upcoming changes in Argentina.

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoDGE-560SX is now supported.
Pyun YongHyeon [Mon, 28 Sep 2009 21:15:57 +0000 (21:15 +0000)]
DGE-560SX is now supported.

14 years agoAdd DGE-560SX(Yukon XL) to the supported device list. Many thanks
Pyun YongHyeon [Mon, 28 Sep 2009 21:11:31 +0000 (21:11 +0000)]
Add DGE-560SX(Yukon XL) to the supported device list. Many thanks
to "Eugene Perevyazko <john <> dnepro dot net>" who kindly gave
remote access to system with DGE-560SX.

14 years agoAdd workaround for Yukon XL which has hardware bug that can't flush
Pyun YongHyeon [Mon, 28 Sep 2009 21:07:19 +0000 (21:07 +0000)]
Add workaround for Yukon XL which has hardware bug that can't flush
FIFO.

14 years agoAdd hack to pass controller specific information to phy driver.
Pyun YongHyeon [Mon, 28 Sep 2009 21:03:28 +0000 (21:03 +0000)]
Add hack to pass controller specific information to phy driver.
Unlike most other PHYs there is no easy way to know which media
type the PHY supports on Marvell PHYs. MIIF_HAVEFIBER flags is now
passed via bus-specific instance variable of a device. While I'm
here add 88E1112 specific work around to set SIGDET polarity low.
Many thanks "Eugene Perevyazko <john <> dnepro dot net>" who kindly
gave remote access to system with DGE-560SX.

14 years agoFix MIB statistics clear routine. This should fix alignment errors on sparc64.
Pyun YongHyeon [Mon, 28 Sep 2009 20:03:37 +0000 (20:03 +0000)]
Fix MIB statistics clear routine. This should fix alignment errors on sparc64.

Reported by: Garrett Damore < gdamore <> opensolaris dot org >

14 years agoSome fiber PHY(88E1112) does not seem to set resolved speed so
Pyun YongHyeon [Mon, 28 Sep 2009 19:53:53 +0000 (19:53 +0000)]
Some fiber PHY(88E1112) does not seem to set resolved speed so
always assume we've got IFM_1000_SX.

14 years agoDon't encode model id twice.
Pyun YongHyeon [Mon, 28 Sep 2009 19:48:17 +0000 (19:48 +0000)]
Don't encode model id twice.

Reported by: Kristof Provost <kristof <> sigsegv dot be>

14 years agoIt seems some 82559ER controllers do not support Rx checksum
Pyun YongHyeon [Mon, 28 Sep 2009 19:40:16 +0000 (19:40 +0000)]
It seems some 82559ER controllers do not support Rx checksum
offloading. Datasheet said nothing about the limitation of 82559ER
except WOL. Explicitly disable Rx checksum offloading for
controllers that is known to lack the capability.

PR: kern/138135
Tested by: Gooderum, Mark < mgooderum <> websense dot com >

14 years agoRemove unnecessary device reinitialization.
Pyun YongHyeon [Mon, 28 Sep 2009 19:33:52 +0000 (19:33 +0000)]
Remove unnecessary device reinitialization.

14 years agoSet the prison in NFS anon and GSS SVC creds (as I indended to in r197581).
Jamie Gritton [Mon, 28 Sep 2009 18:55:29 +0000 (18:55 +0000)]
Set the prison in NFS anon and GSS SVC creds (as I indended to in r197581).

Reviewed by: marcel

14 years agoBack out r197581, which replaced this file witk sys/kern/vfs_export.c.
Jamie Gritton [Mon, 28 Sep 2009 18:54:26 +0000 (18:54 +0000)]
Back out r197581, which replaced this file witk sys/kern/vfs_export.c.

Who knew that "svn export" was an actual command, or that I would have
vfs_export.c stuck in my mind deep enough to type "export" instead of
"commit"?

Pointy Hat to:  jamie

14 years agoSet the prison in NFS anon and GSS SVC creds.
Jamie Gritton [Mon, 28 Sep 2009 18:07:16 +0000 (18:07 +0000)]
Set the prison in NFS anon and GSS SVC creds.

Reviewed by: marcel
MFC after: 3 days

14 years agoTemporarily disable the use of 1GB page mappings by the direct map. There
Alan Cox [Mon, 28 Sep 2009 17:10:27 +0000 (17:10 +0000)]
Temporarily disable the use of 1GB page mappings by the direct map.  There
are currently two problems with the use of 1GB page mappings by the direct
map.  First, at least one device driver uses pmap_extract() rather than
DMAP_TO_PHYS() to translate a direct map address to a physical address.
Unfortunately, neither pmap_extract() nor pmap_kextract() yet support 1GB
page mappings.  Second, pmap_bootstrap() needs to interrogate the MTRRs to
ensure that a 1GB page mapping doesn't span two MTRRs of different types.

Reported and tested by: Daniel O'Connor
MFC after: 3 days

14 years agoAdd two new fcntls to enable/disable read-ahead:
Xin LI [Mon, 28 Sep 2009 16:59:47 +0000 (16:59 +0000)]
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.

Submitted by: Igor Sysoev <is rambler-co ru>
Reviewed by: kib@
MFC after: 1 month

14 years agoUse correct sizeof() object for klist 'list'. Currently, struct klist
Xin LI [Mon, 28 Sep 2009 10:22:46 +0000 (10:22 +0000)]
Use correct sizeof() object for klist 'list'.  Currently, struct klist
contained only SLIST_HEAD as its member, thus sizeof(struct klist) would
equal to sizeof(struct klist *), so this change makes the code more
correct in terms of semantics, but should be a no-op to compiler at this
time.

Reported by: MQ <antinvidia at gmail com>

14 years agoFixed a markup bug.
Ruslan Ermilov [Mon, 28 Sep 2009 09:49:48 +0000 (09:49 +0000)]
Fixed a markup bug.

14 years agoAdd back endpoint swap detection that was disabled in an earlier driver
Andrew Thompson [Mon, 28 Sep 2009 08:18:14 +0000 (08:18 +0000)]
Add back endpoint swap detection that was disabled in an earlier driver
conversion.

Submitted by: Hans Petter Selasky

14 years agoAdd new FTDI IDs.
Andrew Thompson [Mon, 28 Sep 2009 08:15:26 +0000 (08:15 +0000)]
Add new FTDI IDs.

Submitted by: Maks Verver, Arrigo Marchiori

14 years agoUse a 2 clause BSD-style license instead of stating the code as public
Xin LI [Mon, 28 Sep 2009 08:14:15 +0000 (08:14 +0000)]
Use a 2 clause BSD-style license instead of stating the code as public
domain, as requested by core@ and reviewed by the author.

14 years agoAdd experimental support for usb serial console and polled mode during DDB.
Andrew Thompson [Mon, 28 Sep 2009 08:13:50 +0000 (08:13 +0000)]
Add experimental support for usb serial console and polled mode during DDB.

Submitted by: Hans Petter Selasky

14 years agoAdd a config number quirk for the ELSA_MODEM1
Andrew Thompson [Mon, 28 Sep 2009 08:09:11 +0000 (08:09 +0000)]
Add a config number quirk for the ELSA_MODEM1

Submitted by: Stefan Bethke

14 years agoadd more device IDs
Andrew Thompson [Mon, 28 Sep 2009 08:07:20 +0000 (08:07 +0000)]
add more device IDs

Reported by: Mike Tancsa
Submitted by: Hans Petter Selasky

14 years agoAllow setting of MAC address for AXE based ethernet adapters.
Andrew Thompson [Mon, 28 Sep 2009 08:05:14 +0000 (08:05 +0000)]
Allow setting of MAC address for AXE based ethernet adapters.

Submitted by: yongari

14 years agoIncrease the rx buffer size to 16384 bytes, this increases RX performance from
Andrew Thompson [Mon, 28 Sep 2009 08:03:52 +0000 (08:03 +0000)]
Increase the rx buffer size to 16384 bytes, this increases RX performance from
50Mbps to 220Mbps on PLANEX GU-1000T.

Submitted by: yongari

14 years ago- Remove SAMSUNG_YP_U2 now that it is in the cam layer
Andrew Thompson [Mon, 28 Sep 2009 08:00:17 +0000 (08:00 +0000)]
- 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

14 years agoMFp4
Andrew Thompson [Mon, 28 Sep 2009 07:57:23 +0000 (07:57 +0000)]
MFp4

Add new usbdev entries for Marvell, FTDI, Option and Western.

14 years agoAdd basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.
Andrew Thompson [Mon, 28 Sep 2009 07:53:55 +0000 (07:53 +0000)]
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

14 years agoAdd extra safety locking when clobbering xfer->flags_int.started in start and
Andrew Thompson [Mon, 28 Sep 2009 07:46:22 +0000 (07:46 +0000)]
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

14 years agoCorrect buffer sizes used so that they match. The old code could give the
Andrew Thompson [Mon, 28 Sep 2009 07:42:59 +0000 (07:42 +0000)]
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

14 years agoStatic'ify internal methods and use prototype.
Xin LI [Mon, 28 Sep 2009 07:42:52 +0000 (07:42 +0000)]
Static'ify internal methods and use prototype.

14 years agoAdd support for USB language selection.
Andrew Thompson [Mon, 28 Sep 2009 07:41:17 +0000 (07:41 +0000)]
Add support for USB language selection.

PR: usb/138563
Reported by: Bruce Cran
Submitted by: Hans Petter Selasky

14 years agoFix NULL-pointer dereference in usb_endpoint_foreach().
Andrew Thompson [Mon, 28 Sep 2009 07:39:51 +0000 (07:39 +0000)]
Fix NULL-pointer dereference in usb_endpoint_foreach().

PR: usb/138389
Submitted by: Patroklos Argyroudis at census, inc

14 years agoAdd support for ChipHead 341 serial port adapter.
Andrew Thompson [Mon, 28 Sep 2009 07:32:11 +0000 (07:32 +0000)]
Add support for ChipHead 341 serial port adapter.

Submitted by: Hans Petter Selasky

14 years agoClear all interrupts rather than just SETUP packet.
Andrew Thompson [Mon, 28 Sep 2009 07:10:32 +0000 (07:10 +0000)]
Clear all interrupts rather than just SETUP packet.

Submitted by: Hans Petter Selasky

14 years agoSimplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
Andrew Thompson [Mon, 28 Sep 2009 07:09:17 +0000 (07:09 +0000)]
Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
statements to zero.

Submitted by: Hans Petter Selasky

14 years agoImport two PCI quirks from Linux
Andrew Thompson [Mon, 28 Sep 2009 07:06:47 +0000 (07:06 +0000)]
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

14 years agoMFp4 @ 168387
Andrew Thompson [Mon, 28 Sep 2009 07:01:54 +0000 (07:01 +0000)]
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

14 years agoSilence warning printed by getfsspec(3) when /etc/fstab does not exist
Colin Percival [Mon, 28 Sep 2009 03:32:35 +0000 (03:32 +0000)]
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

14 years agoFethch more information from IDENTIFY result.
Alexander Motin [Sun, 27 Sep 2009 22:00:26 +0000 (22:00 +0000)]
Fethch more information from IDENTIFY result.

14 years ago- Add share/nls/gl_ES.ISO8859-1, which I forgot in my last commit
Gabor Kovesdan [Sun, 27 Sep 2009 21:27:11 +0000 (21:27 +0000)]
- 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)

14 years agoAdd a simple C program to check mmap calls to various different addresses.
Bjoern A. Zeeb [Sun, 27 Sep 2009 21:03:33 +0000 (21:03 +0000)]
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)

14 years ago- When we run our trap cleanup handler, echo that we are running this
Simon L. B. Nielsen [Sun, 27 Sep 2009 21:01:07 +0000 (21:01 +0000)]
- 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

14 years agoReport SATA 3.x devices.
Alexander Motin [Sun, 27 Sep 2009 20:50:54 +0000 (20:50 +0000)]
Report SATA 3.x devices.

14 years agoAdd more defines from recent and not only specs.
Alexander Motin [Sun, 27 Sep 2009 20:48:10 +0000 (20:48 +0000)]
Add more defines from recent and not only specs.

14 years agoAdd support for VT200-style mouse input.
Ed Schouten [Sun, 27 Sep 2009 18:19:41 +0000 (18:19 +0000)]
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)

14 years agoDo not allow mmap with the MAP_FIXED argument to map at address zero.
Simon L. B. Nielsen [Sun, 27 Sep 2009 14:49:51 +0000 (14:49 +0000)]
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

14 years agoCopy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
Jung-uk Kim [Sun, 27 Sep 2009 14:00:16 +0000 (14:00 +0000)]
Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
install apm(8) and apm_bios.h on amd64.

14 years agoAdd '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
Yoshihiro Takahashi [Sun, 27 Sep 2009 13:24:34 +0000 (13:24 +0000)]
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

14 years ago- Add Galician NLS catalog
Gabor Kovesdan [Sun, 27 Sep 2009 13:16:38 +0000 (13:16 +0000)]
- Add Galician NLS catalog

14 years agoprinterr_reply() has never been used for as long as we've had this code in
Dag-Erling Smørgrav [Sat, 26 Sep 2009 23:05:01 +0000 (23:05 +0000)]
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".

14 years agoUse ipv6if() when $rtadvd_interfaces="AUTO".
Hiroki Sato [Sat, 26 Sep 2009 19:00:47 +0000 (19:00 +0000)]
Use ipv6if() when $rtadvd_interfaces="AUTO".

14 years agoMove rc.d/{stf,faith} to just before rc.d/routing.
Hiroki Sato [Sat, 26 Sep 2009 19:00:20 +0000 (19:00 +0000)]
Move rc.d/{stf,faith} to just before rc.d/routing.

Pointed out by: tegge

14 years agoFix several logic bugs in the previous IPv6 variable change and
Hiroki Sato [Sat, 26 Sep 2009 18:59:00 +0000 (18:59 +0000)]
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).

14 years agoEnsure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
Pawel Jakub Dawidek [Sat, 26 Sep 2009 18:23:16 +0000 (18:23 +0000)]
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

14 years agoMake malloc(3) superpage aware. Specifically, if getpagesizes(3) returns
Alan Cox [Sat, 26 Sep 2009 18:20:40 +0000 (18:20 +0000)]
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

14 years agoPromote the cpu_class local variable to global and expose it in md_var.h
Rui Paulo [Sat, 26 Sep 2009 16:37:23 +0000 (16:37 +0000)]
Promote the cpu_class local variable to global and expose it in md_var.h

Reviewed by: freebsd-arm

14 years agoAdd 256 color support.
Ed Schouten [Sat, 26 Sep 2009 15:26:32 +0000 (15:26 +0000)]
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>

14 years agoProperly get out of origin mode if the cursor has to move outside of it.
Ed Schouten [Sat, 26 Sep 2009 15:07:11 +0000 (15:07 +0000)]
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

14 years agoGet rid of now deprecated SCS wrappers.
Ed Schouten [Sat, 26 Sep 2009 15:03:42 +0000 (15:03 +0000)]
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.

14 years agoMake the fuzzer a bit more useful by forcing 7-bit data into it.
Ed Schouten [Sat, 26 Sep 2009 15:00:42 +0000 (15:00 +0000)]
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.

14 years agolindev(4) [1] is supposed to be a collection of linux-specific pseudo
Bjoern A. Zeeb [Sat, 26 Sep 2009 12:45:28 +0000 (12:45 +0000)]
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

14 years agoHandle cases where virtual (GFS) vnodes are referenced when doing forced
Pawel Jakub Dawidek [Sat, 26 Sep 2009 00:10:45 +0000 (00:10 +0000)]
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

14 years agoOn lookup error VFS expects *vpp to be set to NULL, be sure to do that.
Pawel Jakub Dawidek [Sat, 26 Sep 2009 00:08:44 +0000 (00:08 +0000)]
On lookup error VFS expects *vpp to be set to NULL, be sure to do that.

MFC after: 3 days

14 years agoUse traverse() function to find and return mount point's vnode instead of
Pawel Jakub Dawidek [Sat, 26 Sep 2009 00:07:14 +0000 (00:07 +0000)]
Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

MFC after: 3 days

14 years ago- Don't depend on value returned by gfs_*_inactive(), it doesn't work
Pawel Jakub Dawidek [Sat, 26 Sep 2009 00:04:30 +0000 (00:04 +0000)]
- 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

14 years agoWipe out mergeinfo.
Dag-Erling Smørgrav [Fri, 25 Sep 2009 23:14:43 +0000 (23:14 +0000)]
Wipe out mergeinfo.

14 years agoOther minor style issues.
Dag-Erling Smørgrav [Fri, 25 Sep 2009 23:03:24 +0000 (23:03 +0000)]
Other minor style issues.

14 years agoSlight style cleanup.
Dag-Erling Smørgrav [Fri, 25 Sep 2009 22:20:30 +0000 (22:20 +0000)]
Slight style cleanup.

14 years agoFix couple of style nits missed in the previous commit.
Jung-uk Kim [Fri, 25 Sep 2009 20:06:31 +0000 (20:06 +0000)]
Fix couple of style nits missed in the previous commit.

14 years ago- Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]
Jung-uk Kim [Fri, 25 Sep 2009 19:49:07 +0000 (19:49 +0000)]
- Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]
- Clear all registers before calling real mode interrupt handlers as we did
for dpms and vesa and re-enable the function as it should be fixed by this.
- Tidy up register access.  For example, when we call INT 0x15, AH=0xc0,
we used to initialize AX=0xc000 to clear AL at the same time but it is
very confusing.  We don't have to do this any more because we are explicitly
clearing all registers now.
- Check size of system configuration table although it is almost always 8.
This is to make sure we are not reading some random low physical memory.
Hopefully it is just zero in that case. :-)
- Fix some style nits and add more comments.

Submitted by: paradox (ddkprog yahoo com)[1]

14 years agoFletcher4 is not the default checksum algorithm.
Pawel Jakub Dawidek [Fri, 25 Sep 2009 18:24:21 +0000 (18:24 +0000)]
Fletcher4 is not the default checksum algorithm.

MFC after: 3 days

14 years agoSwitch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
Pawel Jakub Dawidek [Fri, 25 Sep 2009 18:19:50 +0000 (18:19 +0000)]
Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
be a bit weak and OpenSolaris also switched to fletcher4.

PR: kern/139072
Reported by: Daniel Grund <bugs@dgrund.de>
MFC after: 3 days

14 years agoReject some VESA graphics modes if the controller does not have enough
Jung-uk Kim [Fri, 25 Sep 2009 18:08:38 +0000 (18:08 +0000)]
Reject some VESA graphics modes if the controller does not have enough
memory to support them.  Some adapters have expansible memory slots but
video mode table is static.  In this case, unusable modes may be reported.

Submitted by: paradox (ddkprog yahoo com) (initial patch)

14 years ago- Reduce BIOS memory mapping. We want 1MB of physical memory, not 12MB[1].
Jung-uk Kim [Fri, 25 Sep 2009 17:56:32 +0000 (17:56 +0000)]
- Reduce BIOS memory mapping.  We want 1MB of physical memory, not 12MB[1].
- Remove CS and IP registers from x86bios.h.  They have no use for us.
- Adjust register dump to make it little bit more useful for debugging.

Submitted by: paradox (ddkprog yahoo com)[1] (initial version)

14 years agoMerge r194204 from amd64/i386:
Marius Strobl [Fri, 25 Sep 2009 17:08:51 +0000 (17:08 +0000)]
Merge r194204 from amd64/i386:

Enable PRINTF_BUFR_SIZE by default.

PR: 139134
MFC after: 3 days

14 years agoAdd a new escape sequence to switch between cons25 and xterm.
Ed Schouten [Fri, 25 Sep 2009 13:51:01 +0000 (13:51 +0000)]
Add a new escape sequence to switch between cons25 and xterm.

Just run this to switch to xterm:

printf '\e[=T'

If you get bored and want to switch back to cons25, run this:

printf '\e[=1T'

I can now send an email to the lists, asking whether people are
interested in trying the xterm emulator.

14 years agoConformance: ignore {delete,insert} line while outside the scrolling region.
Ed Schouten [Fri, 25 Sep 2009 11:58:51 +0000 (11:58 +0000)]
Conformance: ignore {delete,insert} line while outside the scrolling region.

I noticed a small inconsistency in delete and insert line between xterm
and libteken. libteken allows these actions to happen while the cursor
is placed outside the scrolling region, while xterm does not.

This behaviour seems to be VT100-like. Confirmation:

http://www.vt100.net/docs/vt102-ug/chapter5.html
"This sequence is ignored when cursor is outside scrolling region."

MFC after: 1 month

14 years agoFix LINT build.
Xin LI [Fri, 25 Sep 2009 02:19:57 +0000 (02:19 +0000)]
Fix LINT build.

14 years agodon't report error if key was deleted.
David Xu [Fri, 25 Sep 2009 00:15:30 +0000 (00:15 +0000)]
don't report error if key was deleted.

PR: threads/135462

14 years agoIn function do_rw_wrlock, when a writer got an error and before returning,
David Xu [Fri, 25 Sep 2009 00:03:13 +0000 (00:03 +0000)]
In function do_rw_wrlock, when a writer got an error and before returning,
check if there are readers blocked by us via URWLOCK_WRITE_WAITERS flag,
and resume the readers. The error must be EAGAIN, otherwise there must
have memory problem, and nobody can rescue the buggy application.

The revision 197445 might be reverted.

14 years agoDump real mode registers under bootverbose to help debugging BIOS emulator.
Jung-uk Kim [Thu, 24 Sep 2009 22:42:35 +0000 (22:42 +0000)]
Dump real mode registers under bootverbose to help debugging BIOS emulator.

14 years agoAdd __unused.
Ed Schouten [Thu, 24 Sep 2009 20:34:44 +0000 (20:34 +0000)]
Add __unused.

It turns out my previous commit does survive a buildkernel, but not
compilation of the individual test tools that use WARNS=6.

14 years agoMake SCS work in 8-bit mode.
Ed Schouten [Thu, 24 Sep 2009 20:33:14 +0000 (20:33 +0000)]
Make SCS work in 8-bit mode.

This means we can finally do things like VT100 box drawing when using
Syscons (8-bit characters). As far as I know, the only remaining issue
is the absense of proper escape sequences for special keyboard
characters (cursor, F1 to F12, etc) and xterm emulation should be ready
for general use.

Enabling xterm would have the following advantages:

- Easier possible migration to Unicode. cons25 termcap entries are very
  8-bit centric. They use things like CP437 characters for box drawing,
  etc.

- Better support for SSH'ing to other operating systems/devices. Most
  switches use VT100-style admin interfaces.

- Reduced bandwidth, because applications can now use things like
  scrolling regions.

- You can finally use applications like dtach(1) on both the console and
  inside an xterm.

14 years agoInitialize registers to zero before calling the interrupt handlers inside
Jung-uk Kim [Thu, 24 Sep 2009 20:23:24 +0000 (20:23 +0000)]
Initialize registers to zero before calling the interrupt handlers inside
emulator as we did in r197424 for vesa.

Submitted by: paradox (ddkprog yahoo com)

14 years agoSome broken VESA BIOSes, e.g., IBM T23, return wrong value from
Jung-uk Kim [Thu, 24 Sep 2009 20:10:00 +0000 (20:10 +0000)]
Some broken VESA BIOSes, e.g., IBM T23, return wrong value from
vesa_bios_get_line_length() in graphics mode.  Always calculate the value
from known video info instead.

Submitted by: paradox (ddkprog yahoo com)

14 years agor197444 unnecessarily changed positions of these files. Re-sort.
Jung-uk Kim [Thu, 24 Sep 2009 19:42:56 +0000 (19:42 +0000)]
r197444 unnecessarily changed positions of these files.  Re-sort.

14 years ago- Use FreeBSD function naming convention.
Jung-uk Kim [Thu, 24 Sep 2009 19:24:42 +0000 (19:24 +0000)]
- Use FreeBSD function naming convention.
- Change x86biosCall() to more appropriate x86bios_intr().[1]

Discussed with: delphij, paradox (ddkprog yahoo com)
Submitted by: paradox (ddkprog yahoo com)[1]

14 years agoAlign Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
Pyun YongHyeon [Thu, 24 Sep 2009 17:53:00 +0000 (17:53 +0000)]
Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
Also align setup descriptor on 32 bytes boundary. Tx buffer have no
alignment limitation so create dmamap without alignment
restriction[1]. Rx buffer still seems to require 4 bytes alignment
limitation but we can simply use MCLBYTES for size to map the
buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated
with m_getcl(9).
de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers,
increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES.
While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore.

This should fix de(4) breakage introduced after r176206.

Submitted by: jhb [1]
Reported by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >
Tested by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >,
Takahashi Yoshihiro < nyan <> jp dot freebsd dot org >

14 years agoDestroy dmamap in dma cleanup.
Pyun YongHyeon [Thu, 24 Sep 2009 17:11:41 +0000 (17:11 +0000)]
Destroy dmamap in dma cleanup.

14 years agoConsistently use bus_addr_t.
Pyun YongHyeon [Thu, 24 Sep 2009 17:07:04 +0000 (17:07 +0000)]
Consistently use bus_addr_t.

14 years agoDo not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
Alexander Motin [Thu, 24 Sep 2009 17:03:32 +0000 (17:03 +0000)]
Do not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
driver load. This fixes crash on atapicam module load on systems,
where some ata channels (usually ata1) was probed, but failed to attach.

Reviewed by: jhb, imp
Tested by: many

14 years agoUse __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
Pyun YongHyeon [Thu, 24 Sep 2009 16:57:35 +0000 (16:57 +0000)]
Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
alignment fixup code for received frames on strict alignment
architectures.

14 years agoRemove unnecessary locking from attach(). This fixes a LOR between the
John Baldwin [Thu, 24 Sep 2009 16:51:56 +0000 (16:51 +0000)]
Remove unnecessary locking from attach().  This fixes a LOR between the
acpi_ibm lock and the sysctl lock.

MFC after: 3 days

14 years agoBefore calling vflush(FORCECLOSE) mark file system as unmounted so the
Pawel Jakub Dawidek [Thu, 24 Sep 2009 15:56:26 +0000 (15:56 +0000)]
Before calling vflush(FORCECLOSE) mark file system as unmounted so the
following vnops will fail. This is very important, because without this change
vnode could be reclaimed at any point, even if we increased usecount. The only
way to ensure that vnode won't be reclaimed was to lock it, which would be very
hard to do in ZFS without changing a lot of code. With this change simply
increasing usecount is enough to be sure vnode won't be reclaimed from under
us. To be precise it can still be reclaimed but we won't be able to see it,
because every try to enter ZFS through VFS will result in EIO.

The only function that cannot return EIO, because it is needed for vflush() is
zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks
z_teardown_lock and never returns EIO.

MFC after: 3 days

14 years agoClose race in zfs_zget(). We have to increase usecount first and then
Pawel Jakub Dawidek [Thu, 24 Sep 2009 15:49:15 +0000 (15:49 +0000)]
Close race in zfs_zget(). We have to increase usecount first and then
check for VI_DOOMED flag. Before this change vnode could be reclaimed
between checking for the flag and increasing usecount.

MFC after: 3 days

14 years agoAdd a backtrace to the "fpudna in kernel mode!" case, to help track down
Ed Maste [Thu, 24 Sep 2009 14:26:42 +0000 (14:26 +0000)]
Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.

Reviewed by: bde

14 years agoUpdate the includes to two more levels of subdirs.
Rui Paulo [Thu, 24 Sep 2009 11:11:00 +0000 (11:11 +0000)]
Update the includes to two more levels of subdirs.

MFC after: 1 week

14 years agonumber of cleanups in i386 and amd64 pci md code
Andriy Gapon [Thu, 24 Sep 2009 07:11:23 +0000 (07:11 +0000)]
number of cleanups in i386 and amd64 pci md code

o introduce PCIE_REGMAX and use it instead of ad-hoc constant
o where 'reg' parameter/variable is not already unsigned, cast it to
  unsigned before comparison with maximum value to cut off negative
  values
o use PCI_SLOTMAX in several places where 31 or 32 were explicitly used
o drop redundant check of 'bytes' in i386 pciereg_cfgread() - valid
  values are already checked in the subsequent switch

Reviewed by: jhb
MFC after: 1 week