57156 Commits

Author SHA1 Message Date
jhb
2e5043cc5f MFC: Don't send interrupts to CPUs disabled via lapic hints. 2007-02-12 21:20:43 +00:00
jhb
cb722c46dc MFC: Do not set B_NOCACHE on buffers when releasing them in flushbuflist().
If B_NOCACHE is set the pages of vm backed buffers will be invalidated.
However clean buffers can be backed by dirty VM pages so invalidating them
can lead to data loss.
Add support for flush dirty page in the data invalidation function
of some network file systems.

This fixes data losses during vnode recycling (and other code paths
using invalbuf(*,V_SAVE,*,*)) for data written using an mmaped file.
2007-02-12 19:08:29 +00:00
bms
faed5d8543 MFC rev 1.39:
When fast-forwarding is enabled, do not forward directed IPv4 broadcasts
  to locally attached broadcast networks.

  Note well: This relies on the layer 2 route cloning behaviour in BSD.

PR:		98799
Tested by:	Dmitry Sergienko
2007-02-12 12:52:54 +00:00
rink
c81047efc7 MFC: Add support for the NetCell NC3000/5000 series SATA RAID cards.
Reviewed by:	sos
Approved by:	imp (mentor)
2007-02-11 23:46:45 +00:00
marius
7ec0f46fc4 MFC: 1.24, 1.26
- In rlphy_service() for the MII_TICK case don't bother to check whether
  the currently selected media is of type IFM_AUTO as auto-negotiation
  doesn't need to be kicked anyway.
- In rlphy_status() just use if_dname instead of determining the name
  of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)).
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia().
- Fix some whitespace nits and remove commented out code that just can't
  be used with RealTek PHYs.
2007-02-11 18:10:58 +00:00
marius
7cb4ef7aa4 MFC: 1.17
- In qsphy_service() for the MII_TICK case don't bother to check whether
  the currently selected media is of type IFM_AUTO as auto-negotiation
  doesn't need to be kicked anyway.
- Don't set MIIF_NOISOLATE so qsphy(4) can be used in configurations
  with multiple PHYs. There doesn't seem to be a problem with isolating
  QS6612 per se nor in combination with the NICs they're used with.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia().

Obtained from:	NetBSD (except for the first item)
2007-02-11 18:05:42 +00:00
marius
a3a91a7ee7 MFC: 1.26, 1.28
- Don't add IFM_NONE when used in combination with pcn(4) as for MII
  loopback to work PCnet chips additionally need to be placed into
  external loopback mode which pcn(4) doesn't do so far.
- In nsphy_service() just use if_dname instead of determining the name
  of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)).
- Don't set MIIF_NOISOLATE, except for when used in combination with a
  NIC that wedges when isolating the PHYs, so nsphy(4) can be used in
  configurations with multiple PHYs.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia() (requires the MIIF_FORCEANEG
  added in sys/dev/mii/mii_physubr.c 1.22.2.3, sys/dev/mii/miivar.h
  1.15.14.2).
- Implement a separate nsphy_reset(). There are two reasons for this:
  1) This PHY can take an inordinate amount of time to reset if media
     is attached; under fairly normal circumstances up to nearly one
     second. This is because it appears to go through an implicit auto-
     negotiation cycle as part of the reset.
  2) During reset and auto-negotiation, the BMCR will clear the reset
     bit before the process is complete. It will return 0 until the
     process is complete and it's safe to access the PHY again.

  This is the first of two changes required to make the combination of
  Am79c971 and DP83840A found on certain HP cards and on-board in IBM
  machines work.
- Fix some whitespace nits.

Based on:	NetBSD (except for the first and second item)
2007-02-11 18:03:22 +00:00
marius
98ca286af2 MFC: if_pcn.c 1.74, 1.79 (sort of), 1.80; if_pcnreg.h 1.14
- Fix obsolete comment.
- Extend references to lnc(4) by references to le(4) as the constraint
  described in the comment applies to the latter as well.
- Don't bother to include IDs of PCnet chips which are not supported
  by this driver and largely are not even PCI devices in pcn_chipid.
- Use device_printf(9)/if_printf(9) rather than implementing their
  functionality with printf(9).
- Sprinkle some const.
2007-02-11 17:21:59 +00:00
marius
a0702ffa80 MFC: 1.23
- Rely on mii_phy_add_media() setting mii_anegticks as appropriate.
- Fix some whitespace nits.
2007-02-11 16:21:04 +00:00
marius
04350d1b84 MFC: 1.17, 1.19
- Don't set MIIF_NOISOLATE so lxtphy(4) can be used in configurations
  with multiple PHYs. There doesn't seem to be a problem with isolating
  LXT970 per se nor in combination with the NICs they're used with and
  lxtphy(4) was already adding IFM_NONE anyway.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia().
- Fix some whitespace nits.

Obtained from:	NetBSD
2007-02-11 16:09:11 +00:00
marius
e59aeef3a1 MFC: acphy.c 1.17, amphy.c 1.18, brgphy.c 1.35, ciphy.c 1.3, dcphy.c 1.29,
exphy.c 1.20, lxtphy.c 1.15, nsphy.c 1.24, pnaphy.c 1.16, pnphy.c 1.19,
     qsphy.c 1.15, rgephy.c 1.7, rlphy.c 1.22, tlphy.c 1.19, ukphy.c 1.18,
     xmphy.c 1.18

Use ansi function definitions in preference to K&R to reduce diffs
with NetBSD (and cause it looks cooler).
2007-02-11 16:01:37 +00:00
marius
b876cc585a MFC: bmtphy.c 1.11, gentbi.c 1.2, mii_physubr.c 1.27
Analogous to mii_add_media(), factor out the code for checking whether
the BMSR contains any media at all to mii_phy_add_media(). The majority
of the drivers currently using mii_phy_add_media() were missing such a
check anyway though.
2007-02-11 15:29:35 +00:00
marius
6fcc9d8d49 MFC: mii_physubr.c 1.26, miivar.h 1.19
- Add a MIIF_FORCEANEG flag which forces an auto-negotiation to always
  take place if IFM_AUTO is selected. This allows drivers like nsphy(4),
  which need to force writing the ANAR according to the BMSR, to take
  advantage of mii_phy_setmedia(). [1]
- In mii_phy_reset() once the current media is set don't isolate the PHY
  corresponding to the instance of the currently selected media rather
  than unconditionally not isolating the PHY corresponding to instance 0.
  This saves a isolation-unisolation-cycle of the PHY corresponding to
  the currently selected media for the case were it isn't instance 0.
- Fix some whitespace nits. [1]

Obtained from:	NetBSD [1]
2007-02-11 15:09:50 +00:00
mohans
efe37ef4d8 Add missing MNT_ILOCK around some mnt_kern_flag accesses. 2007-02-11 03:43:34 +00:00
mohans
9708438daf MFC:
Fix for problems that occur when all mbuf clusters migrate to the mbuf packet
zone. Cluster allocations fail when this happens. Also processes that may have
blocked on cluster allocations will never be woken up. Thanks to rwatson for
an overview of the issue and pointers to the mbuma paper and his tool to dump
out UMA zones.

Reviewed by: andre@
2007-02-11 03:31:19 +00:00
mohans
6953d0a187 MFC :
Fix for a bug where only one process (of multiple) blocked on
maxpages on a zone is woken up, with the rest never being woken up as
a result of the ZFLAG_FULL flag being cleared. Wakeup all such blocked
procsses instead. This change introduces a thundering herd, but since
this should be relatively infrequent, optimizing this (by introducing
a count of blocked processes, for example) may be premature.

Reviewd by: ups@
2007-02-11 03:13:54 +00:00
mohans
f035099ad1 MFC:
Fixes up the handling of shared vnode lock lookups in the NFS client,
adds a FS type specific flag indicating that the FS supports shared
vnode lock lookups, adds some logic in vfs_lookup.c to test this flag
and set lock flags appropriately.

This change fixes the general problem of cascading vnode locks when an
NFS server goes down.

Ideally, we wouldn't need these changes, as enabling shared vnode lock
lookups globally would work. Unfortunately, UFS, for example isn't
ready for shared vnode lock lookups, crashing pretty quickly.

This change is the result of discussions with Stephan Uphoff (ups@).
Thanks to Kris for shaking out several bugs in NFS with shared vnode
lock lookups in current. MFC'ed per Kris' request.

Reviewed by:	ups@
2007-02-11 03:07:46 +00:00
mlaier
60bd24580f MFC:
Add ALTQ support for aue(4).

  Tested by:	Greg Hennessy, Volker
2007-02-10 15:17:34 +00:00
jhb
eaf2392a3d MFC: Add constants for PCIY_VENDOR, PCIY_DEBUG, and PCIY_EXPRESS. 2007-02-09 14:43:45 +00:00
jhb
773c3e841b MFC: Change the PCI-X register constants to be relative to the PCI-X PCI
capability and expand the constants some.  Update ahc(4) to track the
changes.
2007-02-09 14:42:58 +00:00
jhb
1548aae0d1 MFC: Fix the subvendor ID for PCI-PCI bridges. 2007-02-09 14:23:01 +00:00
jhb
90320f6b25 MFC: Style fix: s/#define<space>/#define<tab>/. 2007-02-09 14:16:30 +00:00
jhb
c6204cb72a MFC 1.52 - 1.54: Add SDHC subclass, MSI-X and HT register constants. 2007-02-09 14:11:54 +00:00
cognet
305aeaa054 MFC rev 1.77:
Do not forget to call pmap_free_l2_bucket() in pmap_remove_pages().
This can fix the pmap-related panics reported on arm.
2007-02-09 00:19:58 +00:00
bmah
e022f5f5ee MFC: Revert nd6.c revs. 1.67, 1.68, 1.69, 1.70 in an attempt to unbreak
IPv6 over point-to-point gif(4) tunnels.

(On this branch, the affected revisions are 1.48.2.14 and 1.48.2.15.)

	nd6.c	1.73 -> 1.74
2007-02-08 22:52:56 +00:00
jhb
856fba47dd MFC: Fix GDB_BUFSZ. 2007-02-08 17:45:50 +00:00
jhb
a5f7c166df MFC 1.18: Fix a typo in the device table that prevented 5708S adapters
from being probed.
2007-02-08 16:18:02 +00:00
bms
3ae0521288 MFC rev 1.29:
Fix an incorrect TCP-MD5 key length check for the !FAST_IPSEC case.

PR:		104422, 107520
MFC after:	3 days
2007-02-08 12:46:14 +00:00
rodrigc
73c0af221a MFC 1.61:
Add noatime to the list of mount options that msdosfs accepts.

  PR:             108896
  Submitted by:   Eugene Grosbein <eugen grosbein pp ru>
2007-02-08 02:44:19 +00:00
le
b7b1f1f872 Grrr, missed a revision in the last MFC. 2007-02-07 20:03:17 +00:00
le
192003d9cc MFC:
Add support for various 3G datacards.
2007-02-07 19:52:33 +00:00
ume
407638c786 MFC 1.75: ng_iface requiers neighbor cache as well. 2007-02-06 14:45:51 +00:00
rodrigc
fd8119e876 MFC: 1.142
Check the actual sector size of the underlying media before mounting.
Prevents a kernel panic if you try to "mount_cd9660 /dev/acd0 /mnt" while
an audio CD is in the CD-ROM drive.

PR:	92269
2007-02-06 02:37:42 +00:00
flz
78398faeff MFC: Add support for another ATI IGP 340M (RS200M) AGP bridge.
src/sys/pci/agp_ati.c: rev 1.2 -> 1.3

PR:		kern/100958
Submitted by:	Kazuo Dohzono <dohzono@axion-software.com>
2007-02-05 12:29:46 +00:00
kib
d7bcc82daf MFC
rev. 1.50 of src/sys/fs/deadfs/dead_vnops.c
rev. 1.97 of src/sys/kern/vfs_lookup.c

Introduce mp_crossmp placeholder vnode to fix LOR in vfs_lookup().
2007-02-05 11:38:26 +00:00
cvs2svn
71665d8ac5 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2007-02-04 13:31:06 +00:00
ariff
8795d08768 Partial MFC (buffer.h 1.14, buffer.c 1.30)
Fix huge memory leak within sound buffer (during channel destruction,
buffer resizing, etc.) that was here since eon. Free all (unmanaged)
allocated buffer through sndbuf_destroy() in case we forgot to call
sndbuf_free(). For a managed buffer (mostly hw specific managed buffer),
either provide CHANNEL_FREE() method with appropriate return value to
invoke semi-automatic sndbuf_free() or simply do it on their own. If
everything is failed, sndbuf_destroy() will come to the rescue as a
final measure.
2007-02-04 06:17:48 +00:00
ariff
418c9685e5 Partial MFC (revision 1.27)
Fix apparent memory leak (during vchan destruction) that was here
since eon.
2007-02-04 06:17:14 +00:00
flz
935e1afada MFC: Merge from DRM upstream:
- Add support for Intel 965 Express chipsets.
  - Add support for R200 vertex programs, along with minor bugfixes.
  - Add support for vblank synchronization to pipe B of Intel hardware
    (laptop screens).

      src/sys/dev/drm/i915_drm.h: rev 1.3 -> 1.4
      src/sys/dev/drm/radeon_drm.h: rev 1.13 -> 1.14
      src/sys/dev/drm/i915_irq.c: rev 1.3 -> 1.4
      src/sys/dev/drm/radeon_state.c: rev 1.21 -> 1.22
      src/sys/dev/drm/i915_dma.c: rev 1.3 -> 1.4
      src/sys/dev/drm/radeon_cp.c: rev 1.18 -> 1.19
      src/sys/dev/drm/drmP.h: rev 1.16 -> 1.17
      src/sys/dev/drm/drm_drv.c: rev 1.5 -> 1.6
      src/sys/dev/drm/mach64_drm.h: rev 1.2 -> 1.3
      src/sys/dev/drm/drm_pciids.h: rev 1.6 -> 1.7
      src/sys/dev/drm/i915_drv.h: rev 1.3 -> 1.4
      src/sys/dev/drm/radeon_drv.h: rev 1.15 -> 1.16
2007-02-03 20:01:54 +00:00
bms
329fe14135 MFC:
Drop all received data mbufs from a socket's queue if the MT_SONAME
 mbuf is dropped, to preserve the invariant in the PR_ADDR case.

PR:		kern/38495
Submitted by:	James Juran
Reviewed by:	sam, rwatson
Obtained from:	NetBSD
2007-02-03 04:01:22 +00:00
alc
846a78de78 MFC revisions 1.308, 1.309, and 1.312
Pass VM_PROT_EXECUTE to vm_fault() instead of VM_PROT_READ if the page
  fault was caused by an instruction fetch.

  Differentiate between data and instruction fetch in the fatal
  page fault trap handler.
2007-02-03 03:14:21 +00:00
alc
ff34e3f308 MFC revision 1.133
Define the additional page fault error codes that are implemented
  by amd64.
2007-02-03 02:57:02 +00:00
remko
30c3499120 MFC:
Fix a typo in ata-queue.c

  PR:             kern/107100
  Submitted by:   Stephen J. Roznowski <sjr at comcast dot net>
  Approved by:    sos

and

  Add the SMART command to the ATA instruction set.
  When the disk has an error, it will now print SMART
  instead of 'Unknown CMD'.

  PR:             kern/93368
  Submitted by:   Garry Belka <garry at NetworkPhysics dot COM>
  Approved by:    sos

Approved by:	sos (implicitly with the previous two commits)
2007-02-02 07:42:44 +00:00
marcel
e4364e042f MFC rev 1.2: remove stale header. 2007-02-02 04:25:01 +00:00
yongari
9635466fac MFC if_re.c rev 1.76 to RELENG_6.
Don't set RL_CFG1_FULLDUPLEX bit. The RL_CFG1_FULLDUPLEX bit in
  config register 1 is only valid on 8129.
2007-02-02 00:48:55 +00:00
ru
183af56462 - Don't forget to reset the M_VLANTAG when removing a tag,
otherwise bad things may happen.  [1]

- More diff redux to HEAD.

Submitted by:	Vsevolod Lobko [1]
2007-02-01 14:32:37 +00:00
mpp
96deb45592 MFC: Quota system cleanup & disallow negative ids when accouting for
quota usage.

ffs/ffs_alloc.c rev 1.143
ffs/ffs_snapshot.c rev 1.132
ufs/quota.h rev 1.29
ufs/ufs_quota.c rev 1.86 - 1.88
ufs/ufs_vfsops.c rev 1.48
2007-02-01 04:45:43 +00:00
mohans
77c4a0dce1 MFC: Fix for a vnode lock leak in nfs_create() in the event of an error.
Spotted by ups@.
2007-01-31 23:11:15 +00:00
jhb
fc9639c0ea MFC: Fix compile with BCE_DEBUG. 2007-01-31 22:57:10 +00:00
jhb
6121ceb695 MFC: Add a locked variant of bce_ifmedia_upd() and add missing locking
to bce_ifmedia_upd().
2007-01-31 22:55:08 +00:00