Commit Graph

117397 Commits

Author SHA1 Message Date
imp
9dab83f7b6 MFC: Merge resource fixes for pci devices on pci0 for ioport.
Approved by: re (scottl)
2005-09-18 02:55:10 +00:00
mjacob
d8758cacdd MFC 1.156 (mjacob). Original log:
>Make the exploring of all luns supported by an HBA more of a
>tunable (until we get REPORT LUNS in place).
>
>If we're probing luns, and each probe succeeds, we keep going past
>lun 7 if we're a SCSI3 or better device (until we fail to probe).
>
>If we're probing luns, and a probe fails, we only keep going if
>we're quirked *for* it (CAM_QUIRK_HILUNS), and if we're not quirked
>*against* it (CAM_QUIRK_NOHILUNS), or we're a SCSI3 or better device
>and the tunable (kern.cam.cam_srch_hi) is set non-zero.

Approved by: re (scottl)
2005-09-18 02:29:27 +00:00
garys
6456e1714b MFC 1.21
Approved by:	re
2005-09-17 17:12:18 +00:00
delphij
80a9b1b6e7 Oops, actually MFC 1.89 (by kan) which was missed in previous commit:
Handle a race condition where NULLFS vnode can be cleaned while threads
can still be asleep waiting for lowervp lock.

Tested by:	kkenn
Discussed with: ssouhlal, jeffr

(this is an early MFC for inclusion in the upcoming 6.0-BETA5)

Approved by:	re (scottl)
2005-09-17 15:51:41 +00:00
tegge
2adf020846 MFC: Break out of loop if next buffer pointer has become invalid while
flushing current buffer.

Approved by:	re (scottl)
2005-09-17 15:51:12 +00:00
delphij
691b9ef2ea MFC 1.88 (by ssouhlal):
Use vput() instead of vrele() in null_reclaim() since the lower vnode
is locked.

MFC 1.89 (by kan):

Handle a race condition where NULLFS vnode can be cleaned while threads
can still be asleep waiting for lowervp lock.

Tested by:	kkenn
Discussed with: ssouhlal, jeffr

(rev. 1.89 is an early MFC for inclusion in the upcoming 6.0-BETA5)

Approved by:	re (scottl)
2005-09-17 15:48:05 +00:00
cperciva
06a2ac2c20 MFC revision 1.3:
Log:
  Handle circular dependencies properly (via errx(3)) rather than dumping
  core.  This bug was made visible by a recent change to the audio/timidity++
  port, which now has itself as a run dependency.

Approved by:	re (scottl)
2005-09-17 15:43:40 +00:00
garys
6b6e972dd7 MFC 1.25
Approved by: re
2005-09-17 15:27:27 +00:00
mlaier
2280df04e8 MFC: if_pfsync.c, 1.23:
Stop leaking a lock.  This used to cause a propagate_priority() page fault
  when setting syncdev and syncpeer.

  Reported by:    Dominic Marks

Approved by:	re (scottl)
2005-09-17 15:19:38 +00:00
bz
3c69b86852 MFC: rev. 1.111
Fix panic when kernel compiled without INET6 by rejecting
IPv6 opcodes which are behind #if(n)def INET6 now.

PR:		kern/85826
Approved by:	re (scottl)
2005-09-17 13:43:36 +00:00
jkoshy
e3724c7825 MFC { r1.4, r1.5 "pmcstat_log.c" }
- Determine where the runtime loader got mapped to when a dynamically
   linked process was exec()'ed, and map samples in that address range
   into the appropriate buckets in the runtime loader's profile.

 - Fix a bug that caused generated gmon.out profiles to be out of
   whack.  Use saturating arithmetic when incrementing a bucket.

 - Improve a few comments.

Approved by:	re (scottl)
2005-09-17 13:04:10 +00:00
brian
031028efba MFC: Add a -h option to tell cmp not to follow symbolic links.
Approved by:	re (scottl)
Sponsored by:	Sophos/ActiveState
2005-09-17 11:33:41 +00:00
imp
8ee500f0f6 MFC: pccard updates
o New APIs to access CIS, attribute memory and pccard registers
o Lock ed driver
o Support more cards in ed, ep, sn, xe
o Use new APIs to get MAC address right more often.

Approved by: re (scottl)
2005-09-17 04:01:05 +00:00
cvs2svn
21f17fbdbc This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-09-17 03:36:48 +00:00
ps
37a466b452 MFC: rev 1.66
Don't allow ioctl commands to be interrupted by the user.

Approved by:	re (scottl)
2005-09-16 18:04:10 +00:00
ps
586b207d6c MFC: rev 1.67
Print the actual disk device we failed to complete i/o on.

Approved by:	re (scottl)
2005-09-16 18:02:38 +00:00
ps
78fb6b493a MFC:
Ignore mutex asserts when we're dumping as well.  This allows me
to panic a system from DDB when INVARIANTS is compiled into the
kernel on a scsi system.

Approved by:	re (scottl)
2005-09-16 18:01:55 +00:00
ps
e3bf992684 MFC:
Add support for HP branded 2610SA

Approved by:	re (scottl)
2005-09-16 18:00:59 +00:00
ps
dd3828a625 MFC:
There's no reason to check the valence.  This allows ciss to work
on the P600.

Approved by:	re (scottl)
2005-09-16 17:59:48 +00:00
ps
98caabe274 MFC: rev 1.283
Remove a KASSERT in the sack path that fails because of a interaction
between sack and a bug in the "bad retransmit recovery" logic. This is
a workaround, the underlying bug will be fixed later.

Approved by:	re (scottl)
2005-09-16 17:58:54 +00:00
ps
665c764c1a MFC: rev 1.20
For FreeBSD 4 binaries, when trying to read from a device that does
not exsist, do not have ioctl return an error, but instead set -1
in the data returned to the user.  This allows the HP bios flash
utilities to work without requiring changes to their code.

Approved by:	re (scottl)
2005-09-16 17:58:06 +00:00
rwatson
f32e67ff68 Merge fifo_vnops.c:1.124 from HEAD to RELENG_6:
Trim down now (believed to be) unused fifo_ioctl() and
  fifo_kqfilter() VOP implementations, since they in theory are used
  only on open file descriptors, in which case the ioctls are via
  fifo_ioctl_f() and kqueue requests are via fifo_kqfilter_f().
  Generate warnings if they are entered for now.  These printf()
  calls should become panic() calls.

  Annotate and re-implement fifo_ioctl_f(): don't arbitrarily
  forward ioctls to the socket layer, only forward the ones we
  explicitly support for fifos.  In the case of FIONREAD, don't
  forward the request to the write socket on a read-write fifo, or
  the read result is overwritten.  Annotate a nasty case for the
  undefined POSIX O_RDWR on fifos, in which failure of the second
  ioctl will result in the socket pair being in an inconsistent
  state.

  Assert copyright as I find myself rewriting non-trivial parts of
  fifofs.

Approved by:	re (scottl)
2005-09-16 14:03:57 +00:00
rwatson
ae28f5cb27 Merge fifo_vnops.c:1.122 from HEAD to RELENG_6:
Annotate two issues:

  1) fifo_kqfilter() is not actually ever used, it likely should be GC'd.

  2) fifo_kqfilter_f() doesn't implement EVFILT_VNODE, so detecting events
     on the underlying vnode for a fifo no longer works (it did in 4.x).
     Likely, fifo_kqfilter_f() should forward the request to the VFS using
     fp->f_vnode, which would work once fifo_kqfilter() was detached from
     the vnode operation vector (removing the fifo override).

  Discussed with: phk

Approved by:	re (scottl)
2005-09-16 14:03:10 +00:00
rwatson
f254bafe68 Merge fifo_vnops.c:1.123 from HEAD to RELENG_6:
As a result of kqueue locking work, socket buffer locks will always
  be held when entering a kqueue filter for fifos via a socket buffer
  event: as such, assert the lock unconditionally rather than acquiring
  it conditionally.

Approved by:	re (scottl)
2005-09-16 13:36:44 +00:00
rwatson
504a02736d Merge fifo_vnops.c:1.121 from HEAD to RELENG_6:
Introduce no-op nosup fifo kqueue filter and detach routine, which are
  used when a read filter is requested on a write-only fifo descriptor, or
  a write filter is requested on a read-only fifo descriptor.  This
  permits the filters to be registered, but never raises the event, which
  causes kqueue behavior for fifos to more closely match similar semantics
  for poll and select, which permit testing for the condition even though
  the condition will never be raised, and is consistent with POSIX's notion
  that a fifo has identical semantics to a one-way IPC channel created
  using pipe() on most operating systems.

  The fifo regression test suite can now run to completion on HEAD without
  errors.

Approved by:	re (kensmith)
2005-09-15 20:53:56 +00:00
rwatson
6f1fd55954 Merge if.c:1.246 from HEAD to RELENG_6:
In netkqfilter(), return EINVAL instead of 1 (EPERM) when a filter type
  is requested on a network interface file descriptor that is
  non-applicable.

Approved by:	re (kensmith)
2005-09-15 20:53:22 +00:00
rwatson
7d516f2454 Merge vfs_subr.c:1.646 from HEAD to RELENG_6:
In vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an unsupported
  kqueue filter type is requested on a vnode.

Approved by:	re (kensmith)
2005-09-15 20:52:53 +00:00
rwatson
6a6cd36b7c Merge fifo_vnops.c:1.120 from HEAD to RELENG_6:
When a request is made to register a filter on a fifo that doesn't
  apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
  it as EINVAL, not by returning 1 (EPERM).

Approved by:	re (kensmith)
2005-09-15 20:50:31 +00:00
rwatson
6185980a8f Merge fifo_vnops.c:1.119 from HEAD to RELENG_6:
Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
  according to POSIX, not to mention the fact that it doesn't make sense
  (and hence isn't really implemented).  This causes the fifo_misc
  regression test to succeed.

Approved by:	re (scottl)
2005-09-15 20:50:04 +00:00
rwatson
dcebacb956 Merge fifo_vnops.c:1.118 from HEAD to RELENG_6:
Only poll the fifo for read events if the fifo is attached to a readable
  file descriptor.  Otherwise, the read end of a fifo might return that it
  is writable (which it isn't).

  Only poll the fifo for write events if the fifo attached to a writable
  file descriptor.  Otherwise, the write end of a fifo might return that
  it is readable (which it isn't).

  In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
  has undefined behavior), we poll for both.

Approved by:	re (kensmith)
2005-09-15 20:28:56 +00:00
rwatson
8c6b46594b Merge fifo_vnops.c:1.117 from HEAD to RELENG_6:
After going to some trouble to identify only the write-related events
  to poll the write socket for, the fifo polling code proceeded to poll
  for the complete set of events.  Use 'levents' instead of 'events' as
  the argument to poll, and only poll the write socket if there is
  interest in write events.

Approved by:	re (kensmith)
2005-09-15 20:28:27 +00:00
rwatson
5e1c31f370 Merge fifo_vnops.c:1.116 from HEAD to RELENG_6:
When a writer opens a fifo, wake up the read socket for read, not the
  write socket.

Approved by:	re (kensmith)
2005-09-15 20:27:56 +00:00
rwatson
7881b52021 Merge fifo_vnops.c:1.115 from HEAD to RELENG_6:
Add an assertion that fifo_open() doesn't race against other threads
  while sleeping to allocate fifo state: due to using the vnode lock to
  serialize access to a fifo during open, it shouldn't happen (tm).

Approved by:	re (kensmith)
2005-09-15 20:27:25 +00:00
rwatson
2c116f6385 Merge fifo_vnops.c:1.114 from HEAD to RELENG_6:
Rather than reaching into the internals of the UNIX domain socket code
  by calling uipc_connect2() to connect two socket endpoints to create a
  fifo, call soconnect2().

Approved by:    re (kensmith)
2005-09-15 20:26:19 +00:00
jhb
b84a032305 MFC: Fixup locking and mark MPSAFE.
Approved by:	re (kensmith)
2005-09-15 19:16:29 +00:00
jkoshy
c252d46167 MFC r1.12:
``Process one NMI interrupt per handler invocation as the processor
  buffers pending NMIs from multiple interrupting PMCs and delivers
  them serially.''

Approved by:	re (kensmith)
2005-09-15 15:48:16 +00:00
pjd
bf411a0ae5 MFC: sys/geom/eli/g_eli.c 1.12,1.13
- Don't forget to initialize crp_etype field.

  Reported by:	Nick Evans <nevans@syphen.net>

- Fix copy&paste typo.

Approved by:	re (scottl)
2005-09-15 14:17:31 +00:00
pjd
1bd06e2421 MFC: sbin/geom/class/eli/geom_eli.c 1.4
Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.

Found by:	regression tests
Approved by:	re (scottl)
2005-09-15 14:12:54 +00:00
pjd
21628eb54c MFC: sys/dev/bge/if_bge.c 1.94
When bge_stop() is called from bge_detach(), mii is already NULL, so check
before trying to use it.
This fix allows to 'kldunload if_bge' without panicing.

Reviewed by:	bz
Approved by:	re (scottl)
2005-09-15 14:10:41 +00:00
marcel
b5bca4807d Mega-MFC:
o  Manpage type fix:
	kgdb/kgdb.1: 1.8

o  Unwind across trapframes:
	kgdb/kgdb.h: 1.3
	kgdb/kthr.c: 1.3
	kgdb/main.c: 1.9
	kgdb/trgt.c: 1.4
	kgdb/trgt_alpha.c: 1.3, 1.4
	kgdb/trgt_amd64.c: 1.3, 1.4, 1.5
	kgdb/trgt_i386.c: 1.3, 1.4, 1.5
	kgdb/trgt_ia64.c: 1.3, 1.4
	kgdb/trgt_sparc64.c: 1.4, 1.5, 1.6
	libgdb/Makefile: 1.10
	libgdb/frame-unwind.diff: 1.1

Approved by: re (scottl)
2005-09-15 05:32:11 +00:00
marius
59728c6ce0 MFC: 1.26
Add gem(4) to the list of devices supporting VLAN-sized frames natively
(since sys/dev/gem/if_gem.c rev. 1.34, MFC'ed in rev. 1.29.2.4).

Approved by:	re (scottl)
2005-09-14 21:26:09 +00:00
marius
6b28541ecc MFC: 1.34
- Allow for VLAN-sized frames and set IFCAP_VLAN_MTU.
- On resume all registers have to be initialized again like after
  power-on so reset sc_inited in gem_suspend() in order get all of
  the registers set next time gem_init_regs() is called.
- On at least some ERI and GEM revisions GEM_MAC_RX_OVERFLOW happen
  often due to a silicon bug and re-initializing is all we can do
  about these errors so make handling them non-verbose.
- Remove a superfluous memset(3) call in gem_meminit(), all elements
  are initialized to 0 anyway.

Approved by:	re (scottl)
2005-09-14 21:23:50 +00:00
marius
965ad6c04f MFC: 1.10
As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

Approved by:	re (scottl)
2005-09-14 21:21:45 +00:00
delphij
4f84dc1091 MFC 1.118:
When padding with zero, do pad after prefixes rather than padding
before prefixes.

Use cases:
	printf("%05d", -42);   -->   "00-42"   (should be "-0042")
	printf("%#05x", 12);   -->   "000xc"   (should be "0x00c")

Submitted by:	Oliver Fromme
PR:		kern/85520
Approved by:	re (kensmith)
2005-09-14 02:45:50 +00:00
marcel
48c62c6836 Mega-MFC: Add SMP support and enable it by default. This includes:
conf/GENERIC: 1.73, 1.53
	ia64/exception.S: 1.57
	ia64/interrupt.c: 1.50, 1.51
	ia64/machdep.c: 1.201, 1.202
	ia64/mp_machdep.c: 1.56, 1.57, 1.58
	ia64/pmap.c: 1.161, 1.162, 1.164, 1.165, 1.166
	ia64/sal.c: 1.15
	ia64/trap.c: 1.114, 1.115
	ia64/vm_machdep.c: 1.91, 1.92
	include/ia64_cpu.h: 1.20
	include/param.h: 1.21
	include/pmap.h: 1.25
	include/proc.h: 1.15
	include/smp.h: 1.10

Approved by: re (kensmith, scottl -- thanks!)
2005-09-13 21:07:14 +00:00
marcel
fcaf44b211 MFC 1.20: Remove the execute permission for stacks.
Approved by: re (blanket)
2005-09-13 20:54:00 +00:00
thompsa
12b6d396b7 MFC: if_bridge.c, r1.21; if_ethersubr.c, r1.198; in6_ifattach.c, r1.28;
nd6.c, r1.55; nd6_nbr.c, r1.33

> Add support for multicast to the bridge and allow inet6 addresses to be
> assigned to the interface.
>
> IPv6 auto-configuration is disabled. An IPv6 link-local address has a
> link-local scope within one link, the spec is unclear for the bridge case and
> it may cause scope violation.
>
> An address can be assigned in the usual way;
>   ifconfig bridge0 inet6 xxxx:...
>
> Tested by:      bmah
> Reviewed by:    ume (netinet6)
> Approved by:    mlaier (mentor)

Approved by:	re (kensmith), mlaier (mentor)
2005-09-13 18:02:39 +00:00
jkoshy
ca6608f391 MFC r1.9: Improve an error message.
Approved by:	re (kensmith)
2005-09-13 15:23:26 +00:00
glebius
173514a44a MFC 1.141:
- Do not hold route entry lock, when calling arprequest(). One such
    call was introduced by me in 1.139, the other one was present before.
  - Do all manipulations with rtentry and la before dropping the lock.
  - Copy interface address from route into local variable before dropping
    the lock. Supply this copy as argument to arprequest().

  (LOR Ids in original commit message.)

Approved by:	re (scottl)
2005-09-13 14:37:58 +00:00
maxim
caa0680e7f MFC rev. 1.10: postpone a temporary file creation until we realize
if ipfw(4) ever used.

Approved by:	re (scottl)
2005-09-13 14:34:11 +00:00