]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
14 years agoMFC r197298:
rmacklem [Thu, 15 Oct 2009 19:50:00 +0000 (19:50 +0000)]
MFC r197298:
Change the default transport protocol for use by the Mount protocol
and the NFS Null RPC done by mount_nfs from UDP to TCP, so that it is
consistent with the kernel, which already uses NFS over TCP by
default. Without this change, doing an NFS mount
against a server that only supports UDP results in an unusable
mount point if a transport protocol option wasn't specified for the
mount.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198150 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdd a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
rwatson [Thu, 15 Oct 2009 14:39:59 +0000 (14:39 +0000)]
Add a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
can access NFS client symbols.

Discussed with: kib
Reported by: markm
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198133 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197868.
tuexen [Wed, 14 Oct 2009 17:26:05 +0000 (17:26 +0000)]
MFC r197868.
Use correct arguments when calling SCTP_RTALLOC().
Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix typo which has survived amazingly long!
eri [Wed, 14 Oct 2009 15:32:46 +0000 (15:32 +0000)]
Fix typo which has survived amazingly long!

Reviewed by: mlaier(mentor)
Approved by: re(kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197958:
kib [Wed, 14 Oct 2009 14:26:19 +0000 (14:26 +0000)]
MFC r197958:
In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196439:
dougb [Wed, 14 Oct 2009 03:31:37 +0000 (03:31 +0000)]
MFC r196439:

Fix the typo mentioned in the PR, and one additional.
Fix caps while I'm here.

PR: conf/138087
Submitted by: Chris Petrik <c.petrik.sosa@gmail.com>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197476:
attilio [Tue, 13 Oct 2009 13:03:31 +0000 (13:03 +0000)]
MFC r197476:
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.

Approved by: re (kib), davidxu

git-svn-id: svn://svn.freebsd.org/base/stable/8@198030 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197942:
kib [Tue, 13 Oct 2009 09:24:51 +0000 (09:24 +0000)]
MFC r197942:
Refine r195509, instead of checking that vnode type is VBAD, that is
set quite late in the revocation path, properly verify that vnode is
not doomed before calling VOP.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198025 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197142:
hrs [Mon, 12 Oct 2009 21:08:38 +0000 (21:08 +0000)]
MFC r197142:

Document accept_rev_ethip_ver and send_rev_ethip_ver flags of
EtherIP (gif(4) + if_bridge(4)).

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198004 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197898:
pjd [Mon, 12 Oct 2009 21:08:06 +0000 (21:08 +0000)]
MFC r197898:

If provider is open for writing when we taste it, skip it for classes that
depend on on-disk metadata. This was we won't attach to providers that are used
by other classes. For example we don't want to configure partitions on da0 if
it is part of gmirror, what we really want is partitions on mirror/foo.

During regular work it works like this: if provider is open for writing a class
receives the spoiled event from GEOM and detaches, once provider is closed the
taste event is send again and class can rediscover its metadata if it is still
there.  This doesn't work that way when new class arrives, because GEOM gives
all existing providers for it to taste, also those open for writing. Classes
have to decided on their own if they want to deal with such providers (eg.
geom_dev) or not (classes modified by this commit).

Reported by: des, Oliver Lehmann <lehmann@ans-netz.de>
Tested by: des, Oliver Lehmann <lehmann@ans-netz.de>
Discussed with: phk, marcel
Reviewed by: marcel
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197896:
pjd [Mon, 12 Oct 2009 21:03:07 +0000 (21:03 +0000)]
MFC r197896:

Export disk serial numbers for adaX disks.

Reviewed by: mav
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197831,r197842,r197843,r197860,r197861:
pjd [Mon, 12 Oct 2009 20:36:55 +0000 (20:36 +0000)]
MFC r197831,r197842,r197843,r197860,r197861:

r197831:

Fix situation where Mac OS X NFS client creates a file and when it tries
to set ownership and mode in the same setattr operation, the mode was
overwritten by secpolicy_vnode_setattr().

PR: kern/118320
Submitted by: Mark Thompson <info-gentoo@mark.thompson.bz>

r197842:

Fix white-spaces.

r197843:

On FreeBSD it is enough to report provider removal when orphan event is
received, we don't have to do it on every ENXIO error in I/O path.
Solaris has no GEOM so they have to handle it in a less clean way.

r197860:

File system owner is when uid matches and jail matches.

r197861:

Allow file system owner to modify system flags if securelevel permits.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@198001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197803, r197824, r197910:
attilio [Mon, 12 Oct 2009 16:05:31 +0000 (16:05 +0000)]
MFC r197803, r197824, r197910:
Per their definition, atomic instructions used in conjuction with
memory barriers should also ensure that the compiler doesn't reorder paths
where they are used.  GCC, however, does that aggressively, even in
presence of volatile operands.  The most reliable way GCC offers for avoid
instructions reordering is clobbering "memory".
Not all our memory barriers, right now, clobber memory for GCC-like
compilers.
Fix these cases.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197985 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197812:
rdivacky [Mon, 12 Oct 2009 15:46:17 +0000 (15:46 +0000)]
MFC r197812:

Fix tcsh losing history when tcsh terminates because the pty beneath it
is closed.

Diagnosed by Ted Anderson:

New signal queuing logic was introduced in 6.15 and allows the signal handlers
to be run explicitly by calling handle_pending_signals, instead of
immediately when the signal is delivered.  This function is called at
various places, typically when receiving a EINTR from a slow system call
such as read or write.  In the pty exit case, it was called from xwrite,
called from flush, while printing the "exit" message after receiving EOF
when reading from the pty (note that the read did not return EINTR but
zero bytes, indicating EOF).  The SIGHUP handler, phup(), called
rechist, which opened the history file and began writing the merged
history to it.  This process invoked flush recursively to actually write
the data.  In this case, however, the flush noticed it was being called
recursively and decided fail by calling stderror.

My conclusion was that the signal was being handled at a bad time.  But
whether to fix flush not to care about the recursive call, or to handle
the signal some other time and when to handle it, was unclear to me.
However, by adding an extra call to handle_pending_signals, just after
process() returns to main(), I was able to avoid the truncated history
after network outages and similar failures.  I verified this fix in
version 6.17.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197982 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197643, r197735:
attilio [Mon, 12 Oct 2009 15:32:00 +0000 (15:32 +0000)]
MFC r197643, r197735:
When releasing a read/shared lock we need to use a write memory barrier
in order to avoid, on architectures which doesn't have strong ordered
writes, CPU instructions reordering.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196700:
trasz [Sun, 11 Oct 2009 18:14:18 +0000 (18:14 +0000)]
MFC r196700:

Manual page for mfiutil(8) is in section 8 now.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197966 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197835:
simon [Sun, 11 Oct 2009 16:52:24 +0000 (16:52 +0000)]
MFC r197835:
- Document that 'Dell PowerEdge R710' has bce(4) supported NIC.
- Bump document date.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197964 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196483,r196634:
jilles [Sun, 11 Oct 2009 16:35:12 +0000 (16:35 +0000)]
MFC r196483,r196634:
sh: Fix crash when undefining or redefining a currently executing function

Add a reference count to function definitions.
Memory may leak if a SIGINT arrives in interactive mode at exactly the wrong
time, this will be fixed later by changing SIGINT handling.

PR: bin/137640
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197959 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix mergeinfo for r196843 (r196518) and r196997 (r196519).
des [Sat, 10 Oct 2009 21:10:49 +0000 (21:10 +0000)]
Fix mergeinfo for r196843 (r196518) and r196997 (r196519).

Folks, *please* use 'svn merge' instead of applying patches manually!

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC change 197721:
marcel [Sat, 10 Oct 2009 18:24:54 +0000 (18:24 +0000)]
MFC change 197721:
Fix RTS/CTS flow control, broken by the TTY overhaul.  The new TTY
interface is fairly simple WRT dealing with flow control, but
needed 2 new RX buffer functions with "get-char-from-buf" separated
from "advance-buf-pointer" so that the pointer could be advanced
only when ttydisc_rint() succeeded.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197312
brueffer [Fri, 9 Oct 2009 13:52:49 +0000 (13:52 +0000)]
MFC: r197312

Fix setfib(1) section number.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197907 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197310
brueffer [Fri, 9 Oct 2009 13:46:55 +0000 (13:46 +0000)]
MFC: r197310

Fix mdoc, typos, contractions.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197906 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197300
brueffer [Fri, 9 Oct 2009 13:41:53 +0000 (13:41 +0000)]
MFC: r197300

Various mdoc, spelling etc fixes.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197905 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197276
brueffer [Fri, 9 Oct 2009 13:36:14 +0000 (13:36 +0000)]
MFC: r197276

Correct a sysctl name.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197904 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197275
brueffer [Fri, 9 Oct 2009 13:31:36 +0000 (13:31 +0000)]
MFC: r197275

Fix an xref.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197903 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197274
brueffer [Fri, 9 Oct 2009 13:25:45 +0000 (13:25 +0000)]
MFC: r197274

Fix the example, -w is the right switch for write failure probability.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r197814 from head to stable/8:
rwatson [Fri, 9 Oct 2009 09:18:22 +0000 (09:18 +0000)]
Merge r197814 from head to stable/8:

  Remove tcp_input lock statistics; these are intended for debugging only
  and are not intended to ship in 8.0 as they dirty additional cache
  lines in a performance-critical per-packet path.

Approved by: re (kib, bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197727:
bz [Thu, 8 Oct 2009 20:58:09 +0000 (20:58 +0000)]
MFC r197727:
  Put #ifdef INET around parts of the FLOWTABLE code, to unbreak
  nooptions INET kernel builds.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197869 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197662:
kib [Thu, 8 Oct 2009 11:28:32 +0000 (11:28 +0000)]
MFC r197662:
Do not dereference vp->v_mount without holding vnode lock and checking
that the vnode is not reclaimed.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197855 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r197795 from head to stable/8:
rwatson [Thu, 8 Oct 2009 11:07:15 +0000 (11:07 +0000)]
Merge r197795 from head to stable/8:

  In tcp_input(), we acquire a global write lock at first only if a
  segment is likely to trigger a TCP state change (i.e., FIN/RST/SYN).
  If we later have to upgrade the lock, we acquire an inpcb reference
  and drop both global/inpcb locks before reacquiring in-order.  In
  that gap, the connection may transition into TIMEWAIT, so we need
  to loop back and reevaluate the inpcb after relocking.

  Reported by:        Kamigishi Rei <spambox at haruhiism.net>
  Reviewed by:        bz

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197854 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: revision 197730
nyan [Wed, 7 Oct 2009 14:14:05 +0000 (14:14 +0000)]
MFC: revision 197730

  unifdef NFSCLIENT because the nlm depends on the nfsclient even if NFSCLIENT
  is not defined.

  Now the nfslockd module works with the nfsclient module.

  Reviewed by: kib

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197836 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197725:
dougb [Tue, 6 Oct 2009 22:15:12 +0000 (22:15 +0000)]
MFC r197725:

The 6bone was decommissioned on 6/6/06, so remove references to it.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197821 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197625: Fix using lp(1) without the new -t option after r194171.
jilles [Tue, 6 Oct 2009 21:23:49 +0000 (21:23 +0000)]
MFC r197625: Fix using lp(1) without the new -t option after r194171.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197815 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197696
qingli [Tue, 6 Oct 2009 20:33:02 +0000 (20:33 +0000)]
MFC r197696

Remove a log message from production code. This log message can be
triggered by a misconfigured host that is sending out gratuious ARPs.
This log message can also be triggered during a network renumbering
event when multiple prefixes co-exist on a single network segment.

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197813 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197695
qingli [Tue, 6 Oct 2009 19:44:44 +0000 (19:44 +0000)]
MFC 197695

Previously, if an address alias is configured on an interface, and
this address alias has a prefix matching that of another address
configured on the same interface, then the ARP entry for the alias
is not deleted from the ARP table when that address alias is removed.
This patch fixes the aforementioned issue.

PR: kern/139113
Reviewed by: bz
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197687
qingli [Tue, 6 Oct 2009 18:47:02 +0000 (18:47 +0000)]
MFC r197687

The flow-table associates TCP/UDP flows and IP destinations with
specific routes. When the routing table changes, for example,
when a new route with a more specific prefix is inserted into the
routing table, the flow-table is not updated to reflect that change.
As such existing connections cannot take advantage of the new path.
In some cases the path is broken. This patch will update the affected
flow-table entries when a more specific route is added. The route
entry is properly marked when a route is deleted from the table.
In this case, when the flow-table performs a search, the stale
entry is updated automatically. Therefore this patch is not
necessary for route deletion.

Reviewed by: bz, kmacy
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197810 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoProperly record merginfo for r197681 into lib/libc instead of lib/libc/gen.
marcus [Tue, 6 Oct 2009 17:10:38 +0000 (17:10 +0000)]
Properly record merginfo for r197681 into lib/libc instead of lib/libc/gen.
Kib didn't see the previous commit before I committed it.  I had assumed
implicit approval when he requested the merginfo.  So pointhats to me
all around.  This commit was reviewed by kib.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197403, r197644, r197654, and r197659
cokane [Tue, 6 Oct 2009 16:05:06 +0000 (16:05 +0000)]
MFC: r197403, r197644, r197654, and r197659

Fix some unexpected potential NULL de-references in kernel mode due to
usage of pre-8.0 wifi operations with the ndis driver wrapping a Win32/64
wifi driver.

Submitted by: Paul B Mahol <onemda@gmail.com>
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197806 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdd merginfo for the _pthread_stubs.c commit which merged r197681 to stable/8.
marcus [Mon, 5 Oct 2009 20:38:36 +0000 (20:38 +0000)]
Add merginfo for the _pthread_stubs.c commit which merged r197681 to stable/8.

Requested by:   kib
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197792 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197461:
yongari [Mon, 5 Oct 2009 19:29:25 +0000 (19:29 +0000)]
MFC r197461:
  Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
  alignment fixup code for received frames on strict alignment
  architectures.

MFC r197463:
  Consistently use bus_addr_t.

MFC r197464:
  Destroy dmamap in dma cleanup.

MFC r197465:
  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 >
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197787 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC:197645
gallatin [Mon, 5 Oct 2009 14:28:23 +0000 (14:28 +0000)]
MFC:197645
Two more mxge watchdog fixes

1) Restore the PCI Express control register after a watchdog
   reset.  This is required because the device will come out
   of watchdog reset with the pectl reg at its default state,
   and important BIOS configuration (like max payload size)
   could be lost.

2) Call mxge_start_locked() for every tx queue before dropping
   the lock in the watchdog handler.   This is required, as
   the queue's buf ring may have filled during the reset.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197773 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: revision 197709
nyan [Mon, 5 Oct 2009 14:03:26 +0000 (14:03 +0000)]
MFC: revision 197709

  Fix build nfscl and/or nfsd.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197771 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: rev. 197681
marcus [Sun, 4 Oct 2009 21:46:43 +0000 (21:46 +0000)]
MFC: rev. 197681

Correct the pthread stub prototype for pthread_mutexattr_settype to allow for
the type argument.  This is known to fix some pthread_mutexattr_settype()
invocations, especially when it comes to pulseaudio.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197758 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197682
thompsa [Sun, 4 Oct 2009 19:03:32 +0000 (19:03 +0000)]
MFC r197682

 EHCI Hardware BUG workaround

 The EHCI HW can use the qtd_next field instead of qtd_altnext when a short
 packet is received. This contradicts what is stated in the EHCI datasheet.
 Also the total-bytes field in the status field of the following TD gets
 corrupted upon reception of a short packet!  We work this around in software by
 not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been
 seen on multiple INTEL based EHCI chips.  Other vendors have not been tested
 yet.

 - Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not
   applications using LibUSB v0.1, v1.2 and v2.0.
 - Mass Storage (umass) is affected.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197751 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197663:
kib [Sun, 4 Oct 2009 12:20:59 +0000 (12:20 +0000)]
MFC r197663:
As a workaround, for Intel CPUs, do not use CLFLUSH in
pmap_invalidate_cache_range() when self-snoop is apparently not reported
in cpu features.

Approved by: re (bz, kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197744 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197661:
kib [Sun, 4 Oct 2009 12:14:49 +0000 (12:14 +0000)]
MFC r197661:
Move the annotation for vm_map_startup() immediately before the function.

Approved by: re (bz, kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197743 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197660:
kib [Sun, 4 Oct 2009 12:11:44 +0000 (12:11 +0000)]
MFC r197660:
Fix typo.

Approved by: re (bz, kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoThis commit adds subdirectory mergeinfo which was intentionally
delphij [Sun, 4 Oct 2009 09:57:39 +0000 (09:57 +0000)]
This commit adds subdirectory mergeinfo which was intentionally
ommitted from previous changeset.

Requested by: kib
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197739 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC revision 197683:
delphij [Sun, 4 Oct 2009 09:07:29 +0000 (09:07 +0000)]
MFC revision 197683:

Return EOPNOTSUPP instead of EINVAL when doing chflags(2) over an old
format ZFS, as defined in the manual page.

Submitted by: pjd (response of my original patch but bugs are mine)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197738 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: revision 197657
nyan [Sat, 3 Oct 2009 14:38:22 +0000 (14:38 +0000)]
MFC: revision 197657

  MFi386: revision 197653

    Improve 802.11s comment.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197490
marius [Fri, 2 Oct 2009 18:33:40 +0000 (18:33 +0000)]
MFC: r197490

Merge r194204 from amd64/i386:

Enable PRINTF_BUFR_SIZE by default.

PR: 139134
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197716 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197711:
simon [Fri, 2 Oct 2009 17:58:47 +0000 (17:58 +0000)]
MFC r197711:

Add no zero mapping feature.

NOTE: Unlike in the other branches where this change will be "merged"
to, the 'no zero mapping' is enabled by default in stable/8.

Errata: FreeBSD-EN-09:05.null
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197714 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197580
alc [Fri, 2 Oct 2009 05:11:46 +0000 (05:11 +0000)]
MFC r197580
  Temporarily disable the use of 1GB page mappings by the direct map.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: revision 197535
nyan [Thu, 1 Oct 2009 14:42:55 +0000 (14:42 +0000)]
MFC: revision 197535

  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

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197581, r197583, r197584:
jamie [Thu, 1 Oct 2009 13:11:45 +0000 (13:11 +0000)]
MFC r197581, r197583, r197584:

  Set the prison in NFS anon and GSS SVC creds.

Reviewed by: marcel
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197667 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197653:
rpaulo [Thu, 1 Oct 2009 10:06:09 +0000 (10:06 +0000)]
MFC r197653:
  Improve 802.11s comment.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoRemove an extra 'S' that snuck in.
kensmith [Wed, 30 Sep 2009 12:53:21 +0000 (12:53 +0000)]
Remove an extra 'S' that snuck in.

Submitted by: danfe
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoUpdate description of debugging support.
kensmith [Tue, 29 Sep 2009 19:57:06 +0000 (19:57 +0000)]
Update description of debugging support.

Submitted by: ivoras (but heavily modified)
Pointy hat: me
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197297
dougb [Tue, 29 Sep 2009 18:44:34 +0000 (18:44 +0000)]
MFC r197297

Add a knob to show 'Starting foo:' messages when faststart is used,
such as at boot time.

MFC 197619

By popular acclaim, enable "Starting foo:" messages by default

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMention 802.11s D3.03 support.
rpaulo [Tue, 29 Sep 2009 12:20:10 +0000 (12:20 +0000)]
Mention 802.11s D3.03 support.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoUpdate 802.11s mesh support to draft 3.03. This includes a revised frame
rpaulo [Tue, 29 Sep 2009 12:18:23 +0000 (12:18 +0000)]
Update 802.11s mesh support to draft 3.03. This includes a revised  frame
format for peering and changes to the PERR frames.
Note that this is incompatible with the previous code.

Reviewed by: sam
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,
pjd [Tue, 29 Sep 2009 10:53:06 +0000 (10:53 +0000)]
MFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,
r197512, r197513, r197514, r197515, r197525:

r197287:

Purge namecache for the file system being rolled back, so it doesn't point at
invalid vnodes after the rollback resulting in EIO errors when trying to access
files which are in the namecache.

Reported by: des

r197289:

Purge file system namecache when receiving incremental stream and rolling back
to it.

r197351:

Purge namecache in the same place OpenSolaris does.

r197426:

Restore BSD behaviour - when creating new directory entry use parent directory
gid to set group ownership and not process gid.

This was overlooked during v6 -> v13 switch.

PR: kern/139076
Reported by: Sean Winn <sean@gothic.net.au>

r197458:

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.

r197459:

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.

r197497:

Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
be a bit weak and OpenSolaris also switched to fletcher4.

r197498: head/cddl/contrib/opensolaris

Fletcher4 is not the default checksum algorithm.

r197512:

- 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

r197513:

Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

r197514:

On lookup error VFS expects *vpp to be set to NULL, be sure to do that.

r197515:

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

r197525:

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>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC
gallatin [Mon, 28 Sep 2009 23:48:16 +0000 (23:48 +0000)]
MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197341.
tuexen [Mon, 28 Sep 2009 18:32:28 +0000 (18:32 +0000)]
MFC r197341.
Fix errnos.

Approved by: re (bz), rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197390:
kib [Mon, 28 Sep 2009 11:31:21 +0000 (11:31 +0000)]
MFC r197390:
Remove forward_roundrobin().

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197401
marius [Fri, 25 Sep 2009 19:59:18 +0000 (19:59 +0000)]
MFC: r197401

- According to Linux, the ALi M5451 can do 31-bit DMA instead of just
  30-bit like the reset of the controllers supported by this driver.
  Actually ALi M5451 can be setup up to generate 32-bit addresses by
  setting the 31st bit via the accompanying ISA bridge, which allows
  it to work in sparc64 machines whose IOMMU require at least 32-bit
  DMA. Even though other architectures would also benefit from 32-bit
  DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't
  generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT
  results in a buffer in the 32-bit range.
- According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of
  ALi M5451 is fixed to 64k and in fact using the default size of 4k
  causes the chip to overrun the mapping, triggering uncorrectable
  DMA errors on sparc64.
- The 4DWAVE DX and NX require the recording buffer to be 8-byte
  aligned so adjust the bus_dma_tag_create(9) accordingly.
- Unlike the rest of the controllers supported by this driver, the
  ALi M5451 only has 32 hardware channels instead of 64 so limit the
  loop in tr_intr() accordingly. [1]

Submitted by: yongari [1]
Reviewed by: yongari (superset of what is committed)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoRemove constraint, requiring request data to fulfill controller's
mav [Fri, 25 Sep 2009 18:07:23 +0000 (18:07 +0000)]
Remove constraint, requiring request data to fulfill controller's
alignment requirements. It is busdma task, to manage proper alignment by
loading data to bounce buffers.

PR: kern/127316
Reviewed by: current@
Tested by: Ryan Rogers
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev. 197462:
mav [Fri, 25 Sep 2009 18:04:55 +0000 (18:04 +0000)]
MFC rev. 197462:
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
Approved by:    re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev 197449:
marcel [Fri, 25 Sep 2009 17:48:30 +0000 (17:48 +0000)]
MFC rev 197449:
Don't create more partitions than can fit in the table by checking
that the index is within bounds.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197491 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
marius [Fri, 25 Sep 2009 16:45:27 +0000 (16:45 +0000)]
- Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
  the work area was totally unsynchronized which means this driver only
  had a chance of working on x86 when no bounce buffers were involved,
  which isn't that likely given that support for 64-bit DMA is currently
  broken throughout ata(4).
- Add necessary little-endian conversion of accesses to the work area,
  making this driver work on big-endian hosts. While at it, use the
  alignment-agnostic byte order encoders in order to be on the safe side.
- Clear the reserved member of the SG list entries in order to be on the
  safe side. [1]

Submitted by: yongari [1]
Reviewed by: yongari
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197415:
jhb [Fri, 25 Sep 2009 15:14:11 +0000 (15:14 +0000)]
MFC 197415:
The elements in the component arrays may be direct Package objects rather
than references to objects.  In that case, simply use the Package directly.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197410:
jhb [Fri, 25 Sep 2009 15:08:26 +0000 (15:08 +0000)]
MFC 197410:
- Split the logic to parse an SMAP entry out into a separate function on
  amd64 similar to i386.  This fixes a bug on amd64 where overlapping
  entries would not cause the SMAP parsing to stop.
- Change the SMAP parsing code to do a sorted insertion into physmap[]
  instead of an append to support systems with out-of-order SMAP entries.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197406:
jhb [Fri, 25 Sep 2009 14:58:00 +0000 (14:58 +0000)]
MFC 197406:
Don't reread the command register to see if enabling I/O or memory
decoding "took".  Other OS's that I checked do not do this and it breaks
some amdpm(4) devices.  Prior to 7.2 we did not honor the error returned
when this failed anyway, so this in effect restores previous behavior.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196990:
brooks [Thu, 24 Sep 2009 21:35:13 +0000 (21:35 +0000)]
MFC r196990:
cr_groups is no longer embedded in struct ucred and is instead stored
in a seperate array.  As such we need to use kvm_read rather than bcopy
to populate the ki_groups field.

This fixes a crash when running ps -ax on a coredump.

Reported by: brucec
Tested by: brucec
MFC after: 3 days
Approved by: re@ (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197269:
brooks [Thu, 24 Sep 2009 21:32:56 +0000 (21:32 +0000)]
MFC r197269:
Allocate space for the group array in a static credential used in
the quota code.  One case was correctly handled in r194498, but
this one was missed.

PR: kern/138657
Tested by: PR submitter
MFC after: 3 days
Approved by: re@ (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197473 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197259
sepotvin [Thu, 24 Sep 2009 20:43:08 +0000 (20:43 +0000)]
MFC r197259

The buffer returned by fgetln is not a "C" string and might not be NUL
terminated. Make sure that it is before using it.

Reviewed by:    marck@
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197322 and r197374
nyan [Thu, 24 Sep 2009 15:34:18 +0000 (15:34 +0000)]
MFC: r197322 and r197374

  Revision: 197322
  Log:
    Correct BIOS header sanitizing on pc98.

  Revision: 197374
  Log:
    Disable a check on a disk size because it's too strict.  This change is
    to avoid using incorrect geometry.

   It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.

   Reviewed by: rink

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197457 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197445:
attilio [Thu, 24 Sep 2009 08:35:17 +0000 (08:35 +0000)]
MFC r197445:
Let fall down in the hard path (thus handling shared waiters wakeup
correctly) for the shared waiters also in the rwlock held in shared mode
as well, fixing possible deadlocks.

Please note that this is a special condition as we want this fix in
before RC2 as we assume it is critical and so it has been handled
as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
is assumed.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197350:
jhb [Wed, 23 Sep 2009 15:56:09 +0000 (15:56 +0000)]
MFC 197350:
Re-remove the IBM0057 ID used for PS/2 mouse controllers.  The asl for the
61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
to other systems.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197440 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197348:
kib [Wed, 23 Sep 2009 13:49:41 +0000 (13:49 +0000)]
MFC r197348:
For a.out and pre-8 ELF binaries, allow the mmap of zero length.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197368
marius [Wed, 23 Sep 2009 10:12:58 +0000 (10:12 +0000)]
MFC: r197368

- Update the list of known-working machines based on feedback for 7.2.
- Update the V440 entry regarding added support for the on-board NICs
  in 8.0.

Approved by: re (kib), blackend

git-svn-id: svn://svn.freebsd.org/base/stable/8@197427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197190:
rpaulo [Tue, 22 Sep 2009 20:31:32 +0000 (20:31 +0000)]
MFC 197190:
 Make the sudden motion sensor work on older models and add a bit of
 debugging.

 Submitted by: Christoph Langguth <christoph at rosenkeller.org>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdd missing mergeinfo for MFC of r196588.
blackend [Mon, 21 Sep 2009 06:47:00 +0000 (06:47 +0000)]
Add missing mergeinfo for MFC of r196588.

Pointy Hat: blackend
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197364
qingli [Sun, 20 Sep 2009 17:46:56 +0000 (17:46 +0000)]
MFC r197364

A wrong variable is used when setting up the interface
address route, which broke source address selection in
some code paths.

Submitted by: noted by bz
Reviewed by: hrs
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMove mergeinfo for 197260-197263 up to sys/.
jhb [Sat, 19 Sep 2009 15:48:59 +0000 (15:48 +0000)]
Move mergeinfo for 197260-197263 up to sys/.

Approved by: re (mergeinfo blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197099: pci(4): don't perform maximum register number check
avg [Sat, 19 Sep 2009 08:13:10 +0000 (08:13 +0000)]
MFC r197099: pci(4): don't perform maximum register number check

Different sub-kinds of PCI buses may have different rules and
thus it is up for the bus backends to do proper input checks.
For example, PCIe allows configuration register numbers < 0x1000,
while for PCI proper the limit is 0x100.
And, in fact, the buses already do the checks.

Reviewed by: jhb
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197080
nwhitehorn [Sat, 19 Sep 2009 01:49:36 +0000 (01:49 +0000)]
MFC r197080

Add a few SCSI controllers to GENERIC that can be found in Powermacs.
This allows installation onto SCSI disks as shipped, for example,
as an option with the Powermac G3.

PR: powerpc/138543
Reviewed by: grehan
Approved by: re (kib)
Obtained from: sparc64

git-svn-id: svn://svn.freebsd.org/base/stable/8@197321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196993
nwhitehorn [Sat, 19 Sep 2009 01:48:12 +0000 (01:48 +0000)]
MFC r196993

Remove some debugging (KTR_VERBOSE) that crept into ppc GENERIC long ago
and is present on no other architectures by default.

Reviewed by: grehan
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge change r197208 from head to stable/8:
ken [Fri, 18 Sep 2009 20:35:05 +0000 (20:35 +0000)]
Merge change r197208 from head to stable/8:

Fix some instances where CAM rescans get hung up or take a long time to
complete.

Also, allow xpt_rescan() to rescan a LUN instead of a full bus.

Sponsored by: Copan Systems, Inc.
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197156
nyan [Thu, 17 Sep 2009 14:12:21 +0000 (14:12 +0000)]
MFC: r197156

  MFi386:

  Move the loader's entry point to 0x200000.  This change is also needed
  for pc98.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoGet ready for 8.0-RC1 builds.
kensmith [Thu, 17 Sep 2009 14:05:06 +0000 (14:05 +0000)]
Get ready for 8.0-RC1 builds.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC revs 197129,197130,197132:
bms [Thu, 17 Sep 2009 13:41:59 +0000 (13:41 +0000)]
MFC revs 197129,197130,197132:
 Fixes to mcast userland API.
--
  Fix an API issue in leave processing for IPv4 multicast groups.
   * Do not assume that the group lookup performed by imo_match_group()
     is valid when ifp is NULL in this case.
   * Instead, return EADDRNOTAVAIL if the ifp cannot be resolved for the
     membership we are being asked to leave.

  Caveat user:
   * The way IPv4 multicast memberships are implemented in the inpcb layer
     at the moment, has the side-effect that struct ip_moptions will
     still hold the membership, under the old ifp, until ip_freemoptions()
     is called for the parent inpcb.
   * The underlying issue is: the inpcb layer does not get notification
     of ifp being detached going away in a thread-safe manner.
     This is non-trivial to fix.
--
  Fix an obvious logic error in the IPv4 multicast leave processing,
  where the filter mode vector was not updated correctly after the leave.
--
  Tighten input checking in inp_join_group():
   * Don't try to use the source address, when its family is unspecified.
   * If we get a join without a source, on an existing inclusive
     mode group, this is an error, as it would change the filter mode.

  Fix a problem with the handling of in_mfilter for new memberships:
   * Do not rely on imf being NULL; it is explicitly initialized to a
     non-NULL pointer when constructing a membership.
   * Explicitly initialize *imf to EX mode when the source address
     is unspecified.
  This fixes a problem with in_mfilter slot recycling in the join path.
--
  Don't allow joins w/o source on an existing group.
  This is almost always pilot error.

  We don't need to check for group filter UNDEFINED state at t1,
  because we only ever allocate filters with their groups, so we
  unconditionally reject such calls with EINVAL.
  Trying to change the active filter mode w/o going through IP_MSFILTER
  is also disallowed.

  Deals with the case described in PR 137164 upfront, cumulative
  with the fix in svn rev 197132 which only calls imo_match_source()
  if the source address family was not unspecified.
--

Revision 197136 has a text conflict, however it is a comment only change.

PR: 137164, 138689, 138690, 138691
Submitted by: Stef Walter (with fixups)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197280 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197077: pci: remove definitions of duplicate constants
avg [Thu, 17 Sep 2009 12:41:27 +0000 (12:41 +0000)]
MFC r197077: pci: remove definitions of duplicate constants

Suggested by: jhb
Reviewed by: jhb
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197176:
zec [Thu, 17 Sep 2009 11:03:37 +0000 (11:03 +0000)]
MFC r197176:

  Lock the ifnet list while iterating over it.

  Submitted by: julian
  MFC after:    3 days

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
kientzle [Thu, 17 Sep 2009 06:31:59 +0000 (06:31 +0000)]
MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge rev 197263:
scottl [Thu, 17 Sep 2009 05:30:55 +0000 (05:30 +0000)]
Merge rev 197263:

- Enable MSI support (MSIX support was already present)
- Performance improvements

Approved by: re
Obtained from: Yahoo!

git-svn-id: svn://svn.freebsd.org/base/stable/8@197265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r197260, r197261, r197262
scottl [Thu, 17 Sep 2009 05:27:32 +0000 (05:27 +0000)]
Merge r197260, r197261, r197262

- Prevent a panic on modern controllers by increasing CISS_MAX_PHYSTGT to 256
- Fix MSI and PERFORMANT interrupt programming.  Fixes hang on boot.
- Fix locking bugs in ioctl handler

Most of this has been soaking at Yahoo for several months, if not longer.  The
quick MFC is due to the impending 8.0-RC1 build.

Approved by: re
Obtained from: Yahoo!

git-svn-id: svn://svn.freebsd.org/base/stable/8@197264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197257:
tuexen [Wed, 16 Sep 2009 14:47:50 +0000 (14:47 +0000)]
MFC 197257:
Fix a bug reported by Daniel Mentz:
When authenticating DATA chunks some DATA chunks
might get stuck when the MTU gets decreased via
an ICMP message.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFixes two bugs:
tuexen [Wed, 16 Sep 2009 13:44:12 +0000 (13:44 +0000)]
Fixes two bugs:
1) A lock issue, if we ever had to try again
   we would double lock the INP lock.
2) We were allowing (at wrap) associd 0... which really
   we cannot allow since 0 normally means in most socket
   API calls that we are wishing to effect something on
   the INP not TCB.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197049:
kib [Wed, 16 Sep 2009 13:24:37 +0000 (13:24 +0000)]
MFC r197049:
Calculate the amount of bytes to copy for select filedescriptor masks
taking into account size of fd_set for the current process ABI.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f