This makes bridge port status reflect both the state of the interface
from software (up/down) and the carrier. It makes STP handle link failure
(cable breakage, etc). The original concept comes from a
Mark Ruijter <bridge@siennax.com> who implemented it differently.
My way is simpler and requires no polling.
Obviously, this link state detection will only work if the network card
handles the events properly.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Need to propagate MTU changes that the bridge does to it's pseudo interface
up to others. There ends up being a double call to br_min_mtu() but that's
harmless.
Cleans up the EXPORT_SYMBOLS including dev_change_flags which is used by vlan.
Shouldn't be basing exports on kernel config options like this.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Tommi Virtanen [Wed, 28 Jul 2004 11:54:13 +0000 (04:54 -0700)]
[BRIDGE]: Fix typo in br_stp.c
Signed-off-by: Tommi Virtanen <tv@tv.debian.net> Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
This qdisc code has several inline functions for locking that is only
used when adding/deleting queuing disciplines; so make them functions
instead. The new qdisc_lock_tree encapsulates the locking used throughout
this code.
Also qdisc_run() is only called from net/core/dev.c so it should be
defined there.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Wed, 28 Jul 2004 02:01:51 +0000 (19:01 -0700)]
[AH6]: Get things working again.
Re: [AH6] Disable mutable bits after AH header
Unfortunately I broke ah6_input() in that patch. Thanks to Miyazawa-san
for notifying me of the problem.
In that patch I removed the nh_offset parameter to ipv6_clear_mutable_options.
That broke ah6_input() because it relies on that variable to set the nexthdr.
The following patch fixes this by moving this work out to the caller
xfrm6_rcv() where the information is already available. It also removes
an unnecessary call to ip6_find_1stfragopt() in xfrm6_rcv() since nhoffp
already points to the nexthdr preceding the current header.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
[PATCH] prism54 Fix initialization with older firmware
* In the card initialization routine, we try to set the
output power. For firmware < 1.0.4.3, this leads to a
worrying "mgt_commit has failed .." in the log although
the device continues to react normally.
Fix is simple, do not try to configure output power.
(which I believe we should not be doing anyway as it is
probably against local country regulations)
* Reintroduce pushing 0 into the TRDY_TIMEOUT and RETRY_TIMEOUT
registers. Make this configurable with module parameter
init_pcitm.
* We now have the ludicrous situation that some hardware setups
require this (not even pushing 0xFF helps), whilst others
don't care either way (the majority), and yet others bork
if anything is pushed into these regs.
If anybody can explain this (including Conexant :-) ), my ears
are open.
[PATCH] prism54 Fix reference to uninitialized pointer
* oid_mgt.c is calling islpci_mgt_transaction passing the address
of a pointer to the management frame. This is not being
initialized by the caller. The callee only updates this
pointer when successful. When not, boom.
* Being ultracautious again, not only initialize in the caller,
also null out the pointer unconditionally in the callee.
Alexander Viro [Mon, 26 Jul 2004 14:04:13 +0000 (07:04 -0700)]
[PATCH] broken stuff marked as such in Kconfig
a) ppc KGDB builds only on two subarch; say so in Kconfig
b) ide-pmac.c can't be a module; make it dependent on IDE=y.
c) a bunch of isdn drivers is broken on ppc; marked as such
d) oaknet is broken; marked as such (includes on files that do not
exist, etc.)
e) buslogic and cyber2000 are broken on sparc64
f) s3trio framebuffer is broken
g) usual 8250-based serial is broken on sparc64; in principle it might
be worth supporting (there are PCI cards of that sort), for now marked as
broken (no asm/serial.h, to start with).
Alexander Viro [Mon, 26 Jul 2004 14:03:51 +0000 (07:03 -0700)]
[PATCH] asm-ppc/reg.h namespace pollution fixes
asm-ppc/reg.h defines pollutes namespace like there's no tomorrow;
among other things there are
LR
SR0...SR15
DEC
etc.
That breaks quite a few drivers that should otherwise work on ppc. SR...
and LR were never used by ppc code; commented out in reg.h (note that
they are just aliases for SPRN_SR... and SPRN_LR). RPA commented out and
its instances in ppc code (all four of them) replaced with SPRN_RPA. Ditto
for DEC. The rest of the offenders (DAR and PVR) are left alone for now and
#undef'ed in drivers in question.
We probably want to rip all these guys out of reg.h and convert ppc users
to SPRN_... forms - file ends up included in alot of places and namespace
pollution like that is a Bad Thing(tm).
Alexander Viro [Mon, 26 Jul 2004 14:03:29 +0000 (07:03 -0700)]
[PATCH] pointer-to-int conversion fixes
Assorted pointer-to-int fixes:
a) some places want to take pointer modulo alignment or extract
integer that was cast to pointer (which is legitimate), but do that via
wrong cast, triggering sparse warnings.
b) usual %x (int)ptr -> %p ptr fixes
Alexander Viro [Mon, 26 Jul 2004 14:02:32 +0000 (07:02 -0700)]
[PATCH] cciss compat ioctl fix
cciss compat ioctls were broken (mixing kernel and userland pointers);
fixed (and cleaned up) by switch to compat_alloc_user_space() and elimination
of set_fs().
Alexander Viro [Mon, 26 Jul 2004 14:02:20 +0000 (07:02 -0700)]
[PATCH] annotations for arch/ppc and include/asm-ppc
Usual set - explicit -D<arch>=1 for sparse, __sighandler_t / __sigrestore_t
annotated, annotations in arch/ppc/kernel/*, etc. - same as for other platforms
Alexander Viro [Mon, 26 Jul 2004 14:01:57 +0000 (07:01 -0700)]
[PATCH] CONFIG_MCOUNT fix for sparc64
CONFIG_MCOUNT on sparc64 is currently broken; we have both mcount and _mcount
declared (and aliased to each other), but end up exporting the wrong one. As
the result, with that option all modules get unresolved symbol.
Alexander Viro [Mon, 26 Jul 2004 14:00:34 +0000 (07:00 -0700)]
[PATCH] NULL noise removal in drivers/net/*
That definitely duplicates a bunch of stuff in pending patches from various
folks, but since it's all trivial 0->NULL replacements and patches are still
not submitted and/or merged...
Alexander Viro [Mon, 26 Jul 2004 14:00:21 +0000 (07:00 -0700)]
[PATCH] mtd fixes
Assorted mtd fixes.
a) NULL noise removal
b) %p pointer instead of %x (int)pointer in printks
c) missed iovec->kvec replacements (basically, fixing merge problems)
d) fixed type for (unused) last argument in doc_{read,write}_ecc()
e) sanitized some comparisons.
Alexander Viro [Mon, 26 Jul 2004 14:00:10 +0000 (07:00 -0700)]
[PATCH] impi annotation
drivers/char/ipmi/* annotated, structure shared between kernel and
userland (ioctls) split in two.
ACPI callback in the same code used to have wrong type - it should've been
void (...), not u32 (...). Fixed.
Alexander Viro [Mon, 26 Jul 2004 13:59:59 +0000 (06:59 -0700)]
[PATCH] bpck6 compile fix on ppc
bpck6 was b0rken on ppc in rather amusing way - it used
typedef struct ... PPC;
which doesn't mix with having PPC (pre)defined to 1. Fixed by renaming private
typedef in question.
Alexander Viro [Mon, 26 Jul 2004 13:59:03 +0000 (06:59 -0700)]
[PATCH] misc sound/* fixes
a) ALSA variant of wavefront didn't compile on gcc 2.x with debugging
turned on - authors heard something about variadic macros on gcc 2.x,
but screwed it up. Fixed.
b) au88x0 relied on char being signed in non-trivial ways. On ppc it's
not true. Fixed by explicit use of s8 (which is what that code really
wants).
filemap_populate and shmem_populate must install even a linear file_pte,
in case there was a nonlinear page or file_pte already installed there:
could only happen if already VM_NONLINEAR, but no need to check that.
Alexander Viro [Sun, 25 Jul 2004 04:12:16 +0000 (21:12 -0700)]
[PATCH] sparse: simplify and tighten sparse typechecking
This takes advantage of the simplified typeof semantics of sparse
address spaces, (should be enough for alpha, i386, ppc, ppc64, sparc,
sparc64, x86_64 - most of them didn't actually need anything to be done)
and couple of missing annotations that got caught by that.
Anton Blanchard [Sat, 24 Jul 2004 15:31:11 +0000 (08:31 -0700)]
[NET]: Use NET_IP_ALIGN in acenic.
Use NET_IP_ALIGN in acenic driver. Also remove the 16 byte padding,
caches can be anywhere from 16 to 256 bytes and the skb should be
cacheline aligned already.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Sat, 24 Jul 2004 15:26:27 +0000 (08:26 -0700)]
[AH6]: Replace skb by iph in clear_mutable_options.
This patch replaces the skb argument in ipv6_clear_mutable_options() by
an ipv6hdr. Doing so allows us to point skb->nh elsewhere when calling
this function.
I've also thrown in some obvious clean-ups for that function.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
Herbert Xu [Sat, 24 Jul 2004 15:24:48 +0000 (08:24 -0700)]
[AH4]: Save daddr iff options are present.
This is a little optimisation for AH4. When I moved the tunnel code out,
I put the daddr copying code on the main path which is unnecessary since
daddr is only mutable if IP options are present.
This patch moves the saving and restoring of daddr under the check for
the existence of IP options.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
Anton Blanchard [Sat, 24 Jul 2004 02:39:20 +0000 (19:39 -0700)]
[PATCH] ppc64: exception path optimisations
- We were statically predicting syscalls would be 32bit which meant every
64bit syscall was guaranteed to be mispredicted. Just let the hardware
predict this one.
- We shouldnt use blrl for indirect function calls, it is unlikely to be
predicted correctly and corrupts the link prediction stack. We should
use bctrl instead.
- Statically predict a branch in the system call path, favouring calls from
userspace.
- Remove static prediction in pagefault path, hardware prediction should do
a better job here.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[SCTP] Mark chunks as ineligible for fast retransmit after they are
retransmitted. Also mark any chunks that could not be fit in the
PMTU sized packet as ineligible for fast retransmit.