]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoEnhance the safety of the -U option:
Doug Barton [Sat, 16 May 2009 22:22:31 +0000 (22:22 +0000)]
Enhance the safety of the -U option:
1. In several places make sure that the mtree database is not empty using
the -s argument to test instead of -f. (I thought I'd already changed this,
but obviously not.)
2. When deriving the list of changed files use a colon-delimited list.
3. If the list of changed files is empty, unset the variable, and test
for a non-empty CHANGED in diff_loop() before entering that routine.

Enhance the speed of the -U option by using an internal case statement
instead of echoing the variable to an external grep for every file.

Fix indentation on one line.

15 years agoDrop clause 3 of the license as per rev. 1.35 from OpenBSD.
Christian Brueffer [Sat, 16 May 2009 22:18:58 +0000 (22:18 +0000)]
Drop clause 3 of the license as per rev. 1.35 from OpenBSD.

Obtained from: OpenBSD
MFC after: 3 days

15 years agocorrect range in comment
Kip Macy [Sat, 16 May 2009 22:08:00 +0000 (22:08 +0000)]
correct range in comment
pointed out by alc

15 years agoupdate vm map comment
Kip Macy [Sat, 16 May 2009 22:00:13 +0000 (22:00 +0000)]
update vm map comment

pointed out by Larry Rosenman

15 years agoSync up to rev. 1.25 from OpenBSD:
Christian Brueffer [Sat, 16 May 2009 21:38:55 +0000 (21:38 +0000)]
Sync up to rev. 1.25 from OpenBSD:

1.19: nop
1.20: nop
1.21: nop
1.22: typo fixed
1.23: license clauses 3 and 4 nuked
1.24: nop
1.25: Sun Crypto Accelerator 1000 has a 5821 chip on it

Obtained from: OpenBSD
MFC after: 3 days

15 years agoAdd -L to the mtree invocation to chase symbolic links that are present
Doug Barton [Sat, 16 May 2009 21:32:09 +0000 (21:32 +0000)]
Add -L to the mtree invocation to chase symbolic links that are present
in "Service jails."

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>

15 years agoIncrease default kernel map to 512GB
Kip Macy [Sat, 16 May 2009 20:57:08 +0000 (20:57 +0000)]
Increase default kernel map to 512GB

I briefly discussed this with alc. It could lead to problems for greater than 64GB.
However, that seems unlikely in practice.

15 years ago1. New feature; option to have the script loop until a specified hostname
Doug Barton [Sat, 16 May 2009 20:55:28 +0000 (20:55 +0000)]
1. New feature; option to have the script loop until a specified hostname
(localhost by default) can be successfully looked up. Off by default.
2. New feature: option to create a forwarder configuration file based on
the contents of /etc/resolv.conf. This allows you to utilize a local
resolver for better performance, less network traffic, custom zones, etc.
while still relying on the benefits of your local network resolver.
Off by default.
3. Add named-checkconf into the startup routine. This will prevent named
from trying to start in a situation where it would not be possible to do
so.

15 years ago- allow forced unmounts
Kip Macy [Sat, 16 May 2009 20:33:13 +0000 (20:33 +0000)]
- allow forced unmounts
- don't assume snapshot was auto-mounted

15 years agoTrim trailing whitespace from the end of a line
Doug Barton [Sat, 16 May 2009 20:26:01 +0000 (20:26 +0000)]
Trim trailing whitespace from the end of a line

15 years agoonly use direct map if system has more than 2GB
Kip Macy [Sat, 16 May 2009 20:09:07 +0000 (20:09 +0000)]
only use direct map if system has more than 2GB

15 years agoapply band-aid to x86_64 systems with more physical memory than kmem by allocating...
Kip Macy [Sat, 16 May 2009 19:17:15 +0000 (19:17 +0000)]
apply band-aid to x86_64 systems with more physical memory than kmem by allocating from the direct map

15 years agoSomewhere between 2.6.23 and 2.6.27, Linux added SOCK_CLOEXEC and
Dmitry Chagin [Sat, 16 May 2009 18:48:41 +0000 (18:48 +0000)]
Somewhere between 2.6.23 and 2.6.27, Linux added SOCK_CLOEXEC and
SOCK_NONBLOCK flags, that allow to save fcntl() calls.

Implement a variation of the socket() syscall which takes a flags
in addition to the type argument.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoReturn EINVAL in case when the incorrect or unsupported
Dmitry Chagin [Sat, 16 May 2009 18:46:51 +0000 (18:46 +0000)]
Return EINVAL in case when the incorrect or unsupported
type argument is specified.

Do not map type argument value as its Linux values are
identical to FreeBSD values.

Approved by: kib (mentor)

15 years agoUse the protocol family constants for the domain argument validation.
Dmitry Chagin [Sat, 16 May 2009 18:44:56 +0000 (18:44 +0000)]
Use the protocol family constants for the domain argument validation.
Return immediately when the socket() failed.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoEmulate SO_PEERCRED socket option.
Dmitry Chagin [Sat, 16 May 2009 18:42:18 +0000 (18:42 +0000)]
Emulate SO_PEERCRED socket option.
Temporarily use 0 for pid member as the FreeBSD does not cache remote
UNIX domain socket peer pid.

PR: kern/102956
Reviewed by: rwatson
Approved by: kib (mentor)
MFC after: 1 month

15 years ago- Fix spelling.
Ulf Lilleengen [Sat, 16 May 2009 15:21:08 +0000 (15:21 +0000)]
- Fix spelling.

15 years agoo Add missed semicolon in action script.
Maxim Konovalov [Sat, 16 May 2009 15:12:56 +0000 (15:12 +0000)]
o Add missed semicolon in action script.

PR: conf/134579
Submitted by: Lucius Windschuh
MFC after: 1 week

15 years agoAdd bwi(4) and urtw(4).
Christian Brueffer [Sat, 16 May 2009 12:12:31 +0000 (12:12 +0000)]
Add bwi(4) and urtw(4).

15 years agoMake the HARDWARE section ready for the automatic hardware notes generation,
Christian Brueffer [Sat, 16 May 2009 12:11:06 +0000 (12:11 +0000)]
Make the HARDWARE section ready for the automatic hardware notes generation,
fix the date format.

15 years agoAdd support for booting from raidz1 and raidz2 pools.
Doug Rabson [Sat, 16 May 2009 10:48:20 +0000 (10:48 +0000)]
Add support for booting from raidz1 and raidz2 pools.

15 years agoAdd a manpage for the bwi(4) driver.
Christian Brueffer [Sat, 16 May 2009 10:42:00 +0000 (10:42 +0000)]
Add a manpage for the bwi(4) driver.

15 years agoFixed the Null callback RPCs so that they work with the new krpc. This
Rick Macklem [Sat, 16 May 2009 03:12:55 +0000 (03:12 +0000)]
Fixed the Null callback RPCs so that they work with the new krpc. This
required two changes: setting the program and version numbers before
connect and fixing the handling of the Null Rpc case in newnfs_request().

Approved by: kib (mentor)

15 years agoRemove do-nothing code that was required to dirty the old buffer on Alpha.
Dag-Erling Smørgrav [Fri, 15 May 2009 21:34:58 +0000 (21:34 +0000)]
Remove do-nothing code that was required to dirty the old buffer on Alpha.

Coverity ID: 838
Approved by: jhb, alc

15 years agoAdd a missing break in a switch statement.
Christian Brueffer [Fri, 15 May 2009 21:06:28 +0000 (21:06 +0000)]
Add a missing break in a switch statement.

Found with: Coverity Prevent(tm)
CID: 4302
MFC after: 2 weeks

15 years agoReduce diff against my local version: replace malloc+memset() cases to calloc().
Xin LI [Fri, 15 May 2009 19:41:10 +0000 (19:41 +0000)]
Reduce diff against my local version: replace malloc+memset() cases to calloc().

15 years agoMove the nfsstat structure and proc/op number definitions on the
Rick Macklem [Fri, 15 May 2009 19:33:59 +0000 (19:33 +0000)]
Move the nfsstat structure and proc/op number definitions on the
experimental nfs subsystem from sys/fs/nfs/nfs.h and sys/fs/nfs/nfsproto.h
to sys/fs/nfs/nfsport.h and rename nfsstat to ext_nfsstat. This was done
so that src/usr.bin/nfsstat.c could use it alongside the regular nfs
include files and struct nfsstat.

Approved by: kib (mentor)

15 years agoDevfs replaces file ops vector with devfs-specific one in devfs_open(),
Konstantin Belousov [Fri, 15 May 2009 19:23:05 +0000 (19:23 +0000)]
Devfs replaces file ops vector with devfs-specific one in devfs_open(),
before the struct file is fully initialized in vn_open(), in particular,
fp->f_vnode is NULL. Other thread calling file operation before f_vnode
is set results in NULL pointer dereference in devvn_refthread().

Initialize f_vnode before calling d_fdopen() cdevsw method, that might
set file ops too.

Reported and tested by: Chris Timmons <cwt networks cwu edu>
(RELENG_7 version)
MFC after: 3 days

15 years agoUpdate the KVM backend for malloc stats to catch up to the internal structure
John Baldwin [Fri, 15 May 2009 18:25:44 +0000 (18:25 +0000)]
Update the KVM backend for malloc stats to catch up to the internal structure
BI change from the addition of DTrace malloc(9) probes.

Submitted by: Ben Kelly  ben of wanderview dot com

15 years agoThe module name convention is foo, not if_foo.
Warner Losh [Fri, 15 May 2009 17:02:11 +0000 (17:02 +0000)]
The module name convention is foo, not if_foo.

15 years agoCleanup module declarations:
Warner Losh [Fri, 15 May 2009 16:38:42 +0000 (16:38 +0000)]
Cleanup module declarations:
Use "bwi" consistently
No need to have separate cardbus attachment
No need to declare a module version

15 years agoModify the diskless booting code in sys/fs/nfsclient to be compatible
Rick Macklem [Fri, 15 May 2009 16:03:11 +0000 (16:03 +0000)]
Modify the diskless booting code in sys/fs/nfsclient to be compatible
with what is in sys/nfsclient, so that it will at least build now.

Approved by: kib (mentor)

15 years agoRevert r192094. The revision caused problems for sysctl(3) consumers
Konstantin Belousov [Fri, 15 May 2009 14:41:44 +0000 (14:41 +0000)]
Revert r192094. The revision caused problems for sysctl(3) consumers
that expect that oldlen is filled with required buffer length even when
supplied buffer is too short and returned error is ENOMEM.

Redo the fix for kern.proc.filedesc, by reverting the req->oldidx when
remaining buffer space is too short for the current kinfo_file structure.
Also, only ignore ENOMEM. We have to convert ENOMEM to no error condition
to keep existing interface for the sysctl, though.

Reported by: ed, Florian Smeets <flo kasimir com>
Tested by: pho

15 years agoTurn consolectl into a simple device node, not a TTY.
Ed Schouten [Fri, 15 May 2009 14:30:37 +0000 (14:30 +0000)]
Turn consolectl into a simple device node, not a TTY.

Apart from the 16 virtual terminals, Syscons allocates two device nodes
that should not really be TTYs, even though they are. One of them is
consolectl. In RELENG_7 and before, these device nodes are used in
single user mode. After I simplified input path, we only use this device
node to call ioctl() on (moused, Xorg, vidcontrol).

When you call ioctl() on consolectl, it will behave the same as being
called on the first window.

15 years agoThis driver can be loaded as a module now.
Christian Brueffer [Fri, 15 May 2009 13:26:54 +0000 (13:26 +0000)]
This driver can be loaded as a module now.

MFC after: 3 days

15 years agoXref missing wlan drivers.
Christian Brueffer [Fri, 15 May 2009 10:11:54 +0000 (10:11 +0000)]
Xref missing wlan drivers.

15 years agoSort SEE ALSO section, remove trailing dot.
Christian Brueffer [Fri, 15 May 2009 10:06:33 +0000 (10:06 +0000)]
Sort SEE ALSO section, remove trailing dot.

15 years agoFix name for driver to assign to the SPI device.
Warner Losh [Fri, 15 May 2009 04:49:20 +0000 (04:49 +0000)]
Fix name for driver to assign to the SPI device.

15 years agoEliminate unnecessary clearing of the page's dirty mask from various
Alan Cox [Fri, 15 May 2009 04:33:35 +0000 (04:33 +0000)]
Eliminate unnecessary clearing of the page's dirty mask from various
getpages functions.

Eliminate a stale comment.

15 years agoAllow a comma-separated list of network interfaces to be specified via the
Colin Percival [Fri, 15 May 2009 00:18:31 +0000 (00:18 +0000)]
Allow a comma-separated list of network interfaces to be specified via the
netDev option in install.cfg.

Submitted by: randi
MFC after: 1 week

15 years agoAs the comment says, close() frees the variable, record. So we obtain
Xin LI [Thu, 14 May 2009 23:09:33 +0000 (23:09 +0000)]
As the comment says, close() frees the variable, record.  So we obtain
the length by evaluating the value from the copy, cbuf instead.  This
fixes a crash caused by previous commit (use-after-free)

Submitted by: Dimitry Andric <dimitry andric com>
Pointy hat to: delphij

15 years agoSome comment/space changes (FALLTHRU -> FALLTHROUGH, space after while).
Xin LI [Thu, 14 May 2009 22:36:56 +0000 (22:36 +0000)]
Some comment/space changes (FALLTHRU -> FALLTHROUGH, space after while).

15 years agoTry to workaround a race where bge_stop() may sneak in when bge_rxeof()
Xin LI [Thu, 14 May 2009 22:33:37 +0000 (22:33 +0000)]
Try to workaround a race where bge_stop() may sneak in when bge_rxeof()
drops and re-grabs the softc mutex in the middle, resulting in kernel
trap 12.  This may happen when a lot of traffic is being hammered on
one bge(4) interface while the system is shutting down.

Reported by: Alexander Sack <pisymbol gmail com>
PR: kern/134548
MFC After: 2 weeks

15 years ago- Use a separate sx lock to try to limit the number of concurrent userland
John Baldwin [Thu, 14 May 2009 22:01:32 +0000 (22:01 +0000)]
- Use a separate sx lock to try to limit the number of concurrent userland
  sysctl requests to avoid wiring too much user memory.  Only grab this
  lock if the user's old buffer is larger than a page as a tradeoff to
  allow more concurrency for common small requests.
- Just use a shared lock on the sysctl tree for user sysctl requests now.

MFC after: 1 week

15 years agoTrim the default set of device hints on i386 and amd64:
John Baldwin [Thu, 14 May 2009 21:53:35 +0000 (21:53 +0000)]
Trim the default set of device hints on i386 and amd64:
- Remove vga0 and the disabled uart2/uart3 hints from both platforms.
- Remove hints for ISA adv0, bt0, aha0, aic0, ed0, cs0, sn0, ie0, fe0, and
  le0 from i386.  All these hints were marked 'disabled' and thus already
  did not work "out of the box".

Discussed with: imp

15 years agoApply changes to the experimental nfs server so that it uses the security
Rick Macklem [Thu, 14 May 2009 21:39:08 +0000 (21:39 +0000)]
Apply changes to the experimental nfs server so that it uses the security
flavors as exported in FreeBSD-CURRENT. This allows it to use a
slightly modified mountd.c instead of a different utility.

Approved by: kib (mentor)

15 years agoStaticize two functions not used outside of in_pcb.c: in_pcbremlists() and
Robert Watson [Thu, 14 May 2009 20:59:36 +0000 (20:59 +0000)]
Staticize two functions not used outside of in_pcb.c: in_pcbremlists() and
db_print_inpcb().

MFC after: 1 month

15 years agoChange the file names in the comments in sys/fs/nfs/nfs_var.h so
Rick Macklem [Thu, 14 May 2009 20:39:09 +0000 (20:39 +0000)]
Change the file names in the comments in sys/fs/nfs/nfs_var.h so
that they are the names used in FreeBSD-CURRENT. Also shuffled a
few entries around, so that they under the correct comment.

Approved by: kib (mentor)

15 years agoFreeBSD right now support 32 CPUs on all the architectures at least.
Attilio Rao [Thu, 14 May 2009 17:43:00 +0000 (17:43 +0000)]
FreeBSD right now support 32 CPUs on all the architectures at least.
With the arrival of 128+ cores it is necessary to handle more than that.
One of the first thing to change is the support for cpumask_t that needs
to handle more than 32 bits masking (which happens now).  Some places,
however, still assume that cpumask_t is a 32 bits mask.
Fix that situation by using always correctly cpumask_t when needed.

While here, remove the part under STOP_NMI for the Xen support as it
is broken in any case.

Additively make ipi_nmi_pending as static.

Reviewed by: jhb, kmacy
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>

15 years agoAvoid floating point arithmetic while calculating iquiry length.
Maksim Yevmenkin [Thu, 14 May 2009 17:10:19 +0000 (17:10 +0000)]
Avoid floating point arithmetic while calculating iquiry length.

Submitted by: Iain Hibbert < plunky -at- rya-online -dot- net >
MFC after: 1 week

15 years agoImprove style(9)
Rafal Jaworowski [Thu, 14 May 2009 16:56:56 +0000 (16:56 +0000)]
Improve style(9)

15 years agoPowerPC common SMP startup and time base rework.
Rafal Jaworowski [Thu, 14 May 2009 16:48:25 +0000 (16:48 +0000)]
PowerPC common SMP startup and time base rework.

- make mftb() shared, rewrite in C, provide complementary mttb()
- adjust SMP startup per the above, additional comments, minor naming
  changes
- eliminate redundant TB defines, other minor cosmetics

Reviewed by: marcel, nwhitehorn
Obtained from: Freescale, Semihalf

15 years agoadd missing type for SYSCTL_PROC items; w/o a type you can view the value
Sam Leffler [Thu, 14 May 2009 16:25:57 +0000 (16:25 +0000)]
add missing type for SYSCTL_PROC items; w/o a type you can view the value
but not change it

15 years agocorrect handling of ctl frames: the sender's address is always i_addr2 for
Sam Leffler [Thu, 14 May 2009 16:23:24 +0000 (16:23 +0000)]
correct handling of ctl frames: the sender's address is always i_addr2 for
frames we should expect to process (old code was trying to handle frames
we should never see--like ACK)

Reviewed by: thompsa, cbzimmer

15 years agoMFi386: revision 192050
Yoshihiro Takahashi [Thu, 14 May 2009 16:01:29 +0000 (16:01 +0000)]
MFi386: revision 192050

  Implement simple machine check support.

15 years ago- Add a void pointer to the ata-pci controller softc to allow
John Baldwin [Thu, 14 May 2009 14:57:13 +0000 (14:57 +0000)]
- Add a void pointer to the ata-pci controller softc to allow
  chipset-specific code to attach chipset-specific data.
- Use chipset-specific data in the acard and promise chipsets rather than
  changing the ivars of ATA PCI devices.  ivars are reserved for use by the
  parent bus driver and are _not_ available for use by devices directly.
  This fixes a panic during sysctl -a with certain Promise controllers with
  ACPI enabled.

Reviewed by: mav
Tested by: Magnus Kling (kingfon @ gmail) (on 7)
MFC after: 3 days

15 years agoCompare the correct variable against NULL.
Christian Brueffer [Thu, 14 May 2009 13:32:33 +0000 (13:32 +0000)]
Compare the correct variable against NULL.

Reviewed by: scottl
Found with: Coverity Prevent(tm)
CID: 821
MFC after: 2 weeks

15 years agoRemove usb_ethersubr.c missed reference -- we don't build ousb
Robert Watson [Thu, 14 May 2009 12:39:22 +0000 (12:39 +0000)]
Remove usb_ethersubr.c missed reference -- we don't build ousb
with LINT, so the tinderbox didn't pick this up.

15 years agoDo not advance req->oldidx when sysctl_old_user returning an
Konstantin Belousov [Thu, 14 May 2009 10:54:57 +0000 (10:54 +0000)]
Do not advance req->oldidx when sysctl_old_user returning an
error due to copyout failure or short buffer.

The later breaks the usermode iterators of the sysctl results that pack
arbitrary number of variable-sized structures. Iterator expects that
kernel filled exactly oldlen bytes, and tries to interpret half-filled
or garbage structure at the end of the buffer. In particular,
kinfo_getfile(3) segfaulted.

Reported and tested by: pho
MFC after: 3 weeks

15 years agoRemove an unused variable.
Christian Brueffer [Thu, 14 May 2009 09:28:02 +0000 (09:28 +0000)]
Remove an unused variable.

Found with: Coverity Prevent(tm)
CID: 1167

15 years agoSet crashinfo_enable to "YES" by default.
Craig Rodrigues [Thu, 14 May 2009 08:26:20 +0000 (08:26 +0000)]
Set crashinfo_enable to "YES" by default.
During bootup, if /etc/rc.d/savecore detects a core dump file
on the dump device, the core file will be saved, and the crashinfo
script will be run to generate a human-readable report.

This will make it easier for end-users to provide feedback to
developers about kernel crashes.

Reviewed by: jhb

15 years agoIgnore the INADDR_ANY address inserted/deleted by DHCP when installing a loopback...
Qing Li [Thu, 14 May 2009 05:27:09 +0000 (05:27 +0000)]
Ignore the INADDR_ANY address inserted/deleted by DHCP when installing a loopback route
to the interface address.

15 years agoCall drbr_stats_update to update ifp stats directly when we bypass the buf_ring on...
Kip Macy [Thu, 14 May 2009 03:33:04 +0000 (03:33 +0000)]
Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit

15 years ago - Implement a lockless file descriptor lookup algorithm in
Jeff Roberson [Thu, 14 May 2009 03:24:22 +0000 (03:24 +0000)]
 - Implement a lockless file descriptor lookup algorithm in
   fget_unlocked().
 - Save old file descriptor tables created on expansion until
   the entire descriptor table is freed so that pointers may be
   followed without regard for expanders.
 - Mark the file zone as NOFREE so we may attempt to reference
   potentially freed files.
 - Convert several fget_locked() users to fget_unlocked().  This
   requires us to manage reference counts explicitly but reduces
   locking overhead in the common case.

15 years agoFactor out platform dependent things unrelated to device drivers into a
Nathan Whitehorn [Thu, 14 May 2009 00:34:26 +0000 (00:34 +0000)]
Factor out platform dependent things unrelated to device drivers into a
new platform module. These are probed in early boot, and have the
responsibility of determining the layout of physical memory, determining
the CPU timebase frequency, and handling the zoo of SMP mechanisms
found on PowerPC.

Reviewed by: marcel, raj
Book-E parts by: raj

15 years agoSnip redundant assignment.
Dag-Erling Smørgrav [Wed, 13 May 2009 22:31:25 +0000 (22:31 +0000)]
Snip redundant assignment.

Approved by: scottl
MFC after: 2 weeks
Coverity ID: 3863

15 years agoApply a one line change to nfs_clbio.c (which is largely a copy
Rick Macklem [Wed, 13 May 2009 21:18:34 +0000 (21:18 +0000)]
Apply a one line change to nfs_clbio.c (which is largely a copy
of sys/nfsclient/nfs_bio.c) to track the change recently committed
by acl for nfs_bio.c.

Approved by: kib (mentor)

15 years ago- Set MAC address in ateinit, so it can be changed later.
Stanislav Sedov [Wed, 13 May 2009 21:01:10 +0000 (21:01 +0000)]
- Set MAC address in ateinit, so it can be changed later.

15 years ago- Style(9) and consistency nitpicking.
Stanislav Sedov [Wed, 13 May 2009 20:29:53 +0000 (20:29 +0000)]
- Style(9) and consistency nitpicking.

Reviewed by: imp

15 years agoKeep this line shorter than 80 columns.
Ed Schouten [Wed, 13 May 2009 19:29:50 +0000 (19:29 +0000)]
Keep this line shorter than 80 columns.

15 years ago- Make SPI bus bridge be non-arch dependent by using more generic
Oleksandr Tymoshenko [Wed, 13 May 2009 18:42:49 +0000 (18:42 +0000)]
- Make SPI bus bridge be non-arch dependent by using more generic
    name

Reviewed by: imp

15 years ago- Remove nonexistent header file from includes list
Oleksandr Tymoshenko [Wed, 13 May 2009 18:31:28 +0000 (18:31 +0000)]
- Remove nonexistent header file from includes list

15 years agoEnsure the bmRequestType is the right type for the incoming control request.
Andrew Thompson [Wed, 13 May 2009 18:26:55 +0000 (18:26 +0000)]
Ensure the bmRequestType is the right type for the incoming control request.

Submitted by: Hans Petter Selasky

15 years agoAdd parenthesis around the xfer macro argument.
Andrew Thompson [Wed, 13 May 2009 18:25:14 +0000 (18:25 +0000)]
Add parenthesis around the xfer macro argument.

Submitted by: Hans Petter Selasky

15 years agoMake sure collections have the usage field set.
Andrew Thompson [Wed, 13 May 2009 18:06:52 +0000 (18:06 +0000)]
Make sure collections have the usage field set.

Submitted by: Hans Petter Selasky

15 years agoCheck the correct variable for IO_NDELAY.
Andrew Thompson [Wed, 13 May 2009 18:05:40 +0000 (18:05 +0000)]
Check the correct variable for IO_NDELAY.

Submitted by: Hans Petter Selasky

15 years agoAdd debug lines for fullspeed and highspeed xfer completion.
Andrew Thompson [Wed, 13 May 2009 18:04:51 +0000 (18:04 +0000)]
Add debug lines for fullspeed and highspeed xfer completion.

Submitted by: Hans Petter Selasky

15 years agoSync to P4
Andrew Thompson [Wed, 13 May 2009 18:03:23 +0000 (18:03 +0000)]
Sync to P4

Add umass quirks for Alcor AU6390, Cypress PATA 6830XX and MPMan MPF400.

Submitted by: Hans Petter Selasky

15 years agoThe transfer must return USB_ERR_CANCELLED when the device is gone due to the
Andrew Thompson [Wed, 13 May 2009 17:58:37 +0000 (17:58 +0000)]
The transfer must return USB_ERR_CANCELLED when the device is gone due to the
way usb drivers work.

Submitted by: Hans Petter Selasky

15 years agoImplement simple machine check support for amd64 and i386.
John Baldwin [Wed, 13 May 2009 17:53:04 +0000 (17:53 +0000)]
Implement simple machine check support for amd64 and i386.
- For CPUs that only support MCE (the machine check exception) but not MCA
  (i.e. Pentium), all this does is print out the value of the machine check
  registers and then panic when a machine check exception occurs.
- For CPUs that support MCA (the machine check architecture), the support is
  a bit more involved.
  - First, there is limited support for decoding the CPU-independent MCA
    error codes in the kernel, and the kernel uses this to output a short
    description of any machine check events that occur.
  - When a machine check exception occurs, all of the MCx banks on the
    current CPU are scanned and any events are reported to the console
    before panic'ing.
  - To catch events for correctable errors, a periodic timer kicks off a
    task which scans the MCx banks on all CPUs.  The frequency of these
    checks is controlled via the "hw.mca.interval" sysctl.
  - Userland can request an immediate scan of the MCx banks by writing
    a non-zero value to "hw.mca.force_scan".
  - If any correctable events are encountered, the appropriate details
    are stored in a 'struct mca_record' (defined in <machine/mca.h>).
    The "hw.mca.count" is a count of such records and each record may
    be queried via the "hw.mca.records" tree by specifying the record
    index (0 .. count - 1) as the next name in the MIB similar to using
    PIDs with the kern.proc.* sysctls.  The idea is to export machine
    check events to userland for more detailed processing.
  - The periodic timer and hw.mca sysctls are only present if the CPU
    supports MCA.

Discussed with: emaste (briefly)
MFC after: 1 month

15 years agoGarbage collect now-unused NETISR_FORCEQUEUE, which overrode the global
Robert Watson [Wed, 13 May 2009 17:22:33 +0000 (17:22 +0000)]
Garbage collect now-unused NETISR_FORCEQUEUE, which overrode the global
direct dispatch policy for specific protocols (NETISR_USB).  We leave
the additional 'flags' argument to netisr_register() for the time being,
even though it is no longer required.

15 years agoRemove now-unused NETISR_USB.
Robert Watson [Wed, 13 May 2009 17:17:05 +0000 (17:17 +0000)]
Remove now-unused NETISR_USB.

15 years agoGarbage collect legacy upgt driver now that it is available in the new
Robert Watson [Wed, 13 May 2009 17:11:25 +0000 (17:11 +0000)]
Garbage collect legacy upgt driver now that it is available in the new
USB implementation.

Garbage collect legacy USB ethernet framework now that it is unused.

15 years agoAdd a comment to motivate my last change.
Nathan Whitehorn [Wed, 13 May 2009 16:19:05 +0000 (16:19 +0000)]
Add a comment to motivate my last change.

Suggested by: sam, imp

15 years agoifp->if_softc is managed entirely by the driver. We never set it to
Warner Losh [Wed, 13 May 2009 14:43:26 +0000 (14:43 +0000)]
ifp->if_softc is managed entirely by the driver.  We never set it to
NULL or change it.  We initialize it before we set if_ioctl.  It can
therefore never be NULL, and most other drivers don't bother with this
sanity check.

15 years agoAdd a short delay after programming PHY registers to give some time for
Nathan Whitehorn [Wed, 13 May 2009 14:25:55 +0000 (14:25 +0000)]
Add a short delay after programming PHY registers to give some time for
the engine to catch up. This prevents a machine check exception from
illegal memory requests with a BCM4318.

15 years agoFix print_syscall_ret parameter order.
Diomidis Spinellis [Wed, 13 May 2009 13:00:52 +0000 (13:00 +0000)]
Fix print_syscall_ret parameter order.

15 years agoFix compilation error introduced in r192025.
Diomidis Spinellis [Wed, 13 May 2009 12:43:37 +0000 (12:43 +0000)]
Fix compilation error introduced in r192025.

15 years agoFix memory leak in an error case.
Christian Brueffer [Wed, 13 May 2009 08:50:13 +0000 (08:50 +0000)]
Fix memory leak in an error case.

Found with: Coverity Prevent(tm)
CID: 371
MFC after: 2 weeks

15 years agoCorrect a rare use-after-free error in pmap_copy(). This error was
Alan Cox [Wed, 13 May 2009 07:42:53 +0000 (07:42 +0000)]
Correct a rare use-after-free error in pmap_copy().  This error was
introduced in amd64 revision 1.540 and i386 revision 1.547.  However, it
had no harmful effects until after a recent change, r189698, on amd64.
(In other words, the error is harmless in RELENG_7.)

The error is triggered by the failure to allocate a pv entry for the one
and only mapping in a page table page.  I am addressing the error by
changing pmap_copy() to abort if either pv entry allocation or page
table page allocation fails.  This is appropriate because the creation of
mappings by pmap_copy() is optional.  They are a (possible) optimization,
and not a requirement.

Correct a nearby whitespace error in the i386 pmap_copy().

Crash reported by: jeff@
MFC after: 6 weeks

15 years agoEliminate page queues locking from bufdone_finish() through the
Alan Cox [Wed, 13 May 2009 05:39:39 +0000 (05:39 +0000)]
Eliminate page queues locking from bufdone_finish() through the
following changes:

Rename vfs_page_set_valid() to vfs_page_set_validclean() to reflect
what this function actually does.  Suggested by: tegge

Introduce a new version of vfs_page_set_valid() that does no more than
what the function's name implies.  Specifically, it does not update
the page's dirty mask, and thus it does not require the page queues
lock to be held.

Update two of the three callers to the old vfs_page_set_valid() to
call vfs_page_set_validclean() instead because they actually require
the page's dirty mask to be cleared.

Introduce vm_page_set_valid().

Reviewed by: tegge

15 years agoFix copy-paste bug in NGM_NETFLOW_SETCONFIG argument size verification.
Alexander Motin [Wed, 13 May 2009 02:26:34 +0000 (02:26 +0000)]
Fix copy-paste bug in NGM_NETFLOW_SETCONFIG argument size verification.

PR: kern/134220
Submitted by: Eugene Mychlo
MFC after: 1 week

15 years agoEliminate duplicate error messages from "tar c".
Tim Kientzle [Wed, 13 May 2009 00:04:08 +0000 (00:04 +0000)]
Eliminate duplicate error messages from "tar c".

Reported by: pav@

15 years agoRemove unused variables.
Christian Brueffer [Tue, 12 May 2009 23:22:58 +0000 (23:22 +0000)]
Remove unused variables.

Found with: Coverity Prevent(tm)
CID: 544, 545

15 years agoRemove unused variables.
Christian Brueffer [Tue, 12 May 2009 22:11:02 +0000 (22:11 +0000)]
Remove unused variables.

Found with: Coverity Prevent(tm)
CID: 4285, 4286

15 years ago- Resurrect the debug printf message I accidentally dropped
Stanislav Sedov [Tue, 12 May 2009 21:28:41 +0000 (21:28 +0000)]
- Resurrect the debug printf message I accidentally dropped
  in the previous commit.
- Use device_printf instead of printf.
- Put all printfs in the interrupt handler under bootverbose.

15 years ago- Eliminate extra register reads by using a variable to store
Stanislav Sedov [Tue, 12 May 2009 21:14:36 +0000 (21:14 +0000)]
- Eliminate extra register reads by using a variable to store
  registers contents.
- Use memory barriers to preserve the order of buffer space operations.
  This might be needed if we'll ever use this driver on architectures
  where ordering is not guaranteed.

15 years agoCorrect r190283 (partially reverting it) as on sparc64 BUS_DMA_NOCACHE
Marius Strobl [Tue, 12 May 2009 20:56:34 +0000 (20:56 +0000)]
Correct r190283 (partially reverting it) as on sparc64 BUS_DMA_NOCACHE
actually is only valid for bus_dmamap_load().

MFC after: 3 days

15 years agoAdd -c option to summarize number of calls, errors, and system time.
Diomidis Spinellis [Tue, 12 May 2009 20:42:12 +0000 (20:42 +0000)]
Add -c option to summarize number of calls, errors, and system time.

Reviewed by: alfred

15 years agoRemove unused variable.
Christian Brueffer [Tue, 12 May 2009 19:33:36 +0000 (19:33 +0000)]
Remove unused variable.

Found with: Coverity Prevent(tm)
CID: 549