linux-2.6
15 years agoTI DaVinci EMAC: Remove print_mac, DECLARE_MAC_BUF
Chaithrika U S [Thu, 4 Jun 2009 04:54:29 +0000 (21:54 -0700)] 
TI DaVinci EMAC: Remove print_mac, DECLARE_MAC_BUF

Use printk format specifier for MAC address.
Remove DECALRE_MAC_BUF and print_mac() usage in the driver.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: Only wake up writers
Herbert Xu [Thu, 4 Jun 2009 04:45:55 +0000 (21:45 -0700)] 
tun: Only wake up writers

When I added socket accounting to tun I inadvertently introduced
spurious wake-up events that kills qemu performance.  The problem
occurs when qemu polls on the tun fd for read, and then transmits
packets.  For each packet transmitted, we will wake up qemu even
if it only cares about read events.

Now this affects all sockets, but it is only a new problem for
tun.  So this patch tries to fix it for tun first and we can then
look at the problem in general.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vxy/lksctp-dev
David S. Miller [Thu, 4 Jun 2009 04:43:52 +0000 (21:43 -0700)] 
Merge branch 'net-next' of git://git./linux/kernel/git/vxy/lksctp-dev

15 years agoipv4: remove ip_mc_drop_socket() declaration from af_inet.c.
Rami Rosen [Thu, 4 Jun 2009 04:43:26 +0000 (21:43 -0700)] 
ipv4: remove ip_mc_drop_socket() declaration from af_inet.c.

ip_mc_drop_socket() method is declared in linux/igmp.h, which
is included anyhow in af_inet.c. So there is no need for this declaration.
This patch removes it from af_inet.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogso: Stop fraglists from escaping
Herbert Xu [Thu, 4 Jun 2009 04:20:51 +0000 (21:20 -0700)] 
gso: Stop fraglists from escaping

As it stands skb fraglists can get past the check in dev_queue_xmit
if the skb is marked as GSO.  In particular, if the packet doesn't
have the proper checksums for GSO, but can otherwise be handled by
the underlying device, we will not perform the fraglist check on it
at all.

If the underlying device cannot handle fraglists, then this will
break.

The fix is as simple as moving the fraglist check from the device
check into skb_gso_ok.

This has caused crashes with Xen when used together with GRO which
can generate GSO packets with fraglists.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: minor aq100x phy fixes
Divy Le Ray [Wed, 3 Jun 2009 06:19:15 +0000 (06:19 +0000)] 
cxgb3: minor aq100x phy fixes

Use generic MDIO generic values.
Based on Ben Hutchings'review comments.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Update FW to 7.4.0
Divy Le Ray [Wed, 3 Jun 2009 13:38:59 +0000 (13:38 +0000)] 
cxgb3: Update FW to 7.4.0

Update FW to 7.4.
Bump up driver revision.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: support non-blocking version of the new sctp_connectx() API
Vlad Yasevich [Mon, 1 Jun 2009 16:41:15 +0000 (12:41 -0400)] 
sctp: support non-blocking version of the new sctp_connectx() API

Prior implementation of the new sctp_connectx() call that returns
an association ID did not work correctly on non-blocking socket.
This is because we could not return both a EINPROGRESS error and
an association id.  This is a new implementation that supports this.

Originally from Ivan Skytte Jørgensen <isj-sctp@i1.dk

Signed-off-by: Ivan Skytte Jørgensen <isj-sctp@i1.dk
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix to choose alternate destination when retransmit ASCONF chunk
Wei Yongjun [Tue, 12 May 2009 13:52:51 +0000 (21:52 +0800)] 
sctp: fix to choose alternate destination when retransmit ASCONF chunk

RFC 5061 Section 5.1 ASCONF Chunk Procedures said:

B4)  Re-transmit the ASCONF Chunk last sent and if possible choose an
     alternate destination address (please refer to [RFC4960],
     Section 6.4.1).  An endpoint MUST NOT add new parameters to this
     chunk; it MUST be the same (including its Sequence Number) as
     the last ASCONF sent.  An endpoint MAY, however, bundle an
     additional ASCONF with new ASCONF parameters with the next
     Sequence Number.  For details, see Section 5.5.

This patch fix to choose an alternate destination address when
re-transmit the ASCONF chunk, with some dup codes cleanup.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix sack_timeout sysctl min and max types
Jean-Mickael Guerin [Tue, 12 May 2009 22:03:20 +0000 (00:03 +0200)] 
sctp: fix sack_timeout sysctl min and max types

sctp_sack_timeout is defined as int, but the sysctl's maxsize is set
to sizeof(long) and the min/max are defined as long.

Signed-off-by: jean-mickael.guerin@6wind.com
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix panic when T4-rto timer expire on removed transport
Wei Yongjun [Sun, 26 Apr 2009 15:14:42 +0000 (23:14 +0800)] 
sctp: fix panic when T4-rto timer expire on removed transport

If T4-rto timer is expired on a removed transport, kernel panic
will occur when we do failure management on that transport.
You can reproduce this use the following sequence:

Endpoint A                           Endpoint B
(ESTABLISHED)                        (ESTABLISHED)

            <-----------------      ASCONF
                                    (SRC=X)
ASCONF        ----------------->
(Delete IP Address = X)
            <-----------------      ASCONF-ACK
                                    (Success Indication)
            <-----------------      ASCONF
                                    (T4-rto timer expire)

This patch fixed the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix panic when T2-shutdown timer expire on removed transport
Wei Yongjun [Sun, 26 Apr 2009 15:13:35 +0000 (23:13 +0800)] 
sctp: fix panic when T2-shutdown timer expire on removed transport

If T2-shutdown timer is expired on a removed transport, kernel
panic will occur when we do failure management on that transport.
You can reproduce this use the following sequence:

  Endpoint A                           Endpoint B
  (ESTABLISHED)                        (ESTABLISHED)

                <-----------------      SHUTDOWN
                                        (SRC=X)
  ASCONF        ----------------->
  (Delete IP Address = X)
                <-----------------      ASCONF-ACK
                                        (Success Indication)
                <-----------------      SHUTDOWN
                                        (T2-shutdown timer expire)
This patch fixed the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix to only enable IPv6 address support on PF_INET6 socket
Wei Yongjun [Tue, 7 Apr 2009 08:35:11 +0000 (16:35 +0800)] 
sctp: fix to only enable IPv6 address support on PF_INET6 socket

If socket is create by PF_INET type, it can not used IPv6 address
to send/recv DATA. So only enable IPv6 address support on PF_INET6
socket.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix a typo in net/sctp/sm_statetable.c
Wei Yongjun [Tue, 7 Apr 2009 08:36:14 +0000 (16:36 +0800)] 
sctp: fix a typo in net/sctp/sm_statetable.c

Just fix a typo in net/sctp/sm_statetable.c.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix the error code when ASCONF is received with invalid address
Wei Yongjun [Thu, 16 Apr 2009 06:21:02 +0000 (14:21 +0800)] 
sctp: fix the error code when ASCONF is received with invalid address

Use Unresolvable Address error cause instead of Invalid Mandatory
Parameter error cause when process ASCONF chunk with invalid address
since address parameters are not mandatory in the ASCONF chunk.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix report unrecognized parameter in ACSONF-ACK
Wei Yongjun [Tue, 7 Apr 2009 07:44:29 +0000 (15:44 +0800)] 
sctp: fix report unrecognized parameter in ACSONF-ACK

RFC5061 Section 5.2.  Upon Reception of an ASCONF Chunk

V2)  In processing the chunk, the receiver should build a
     response message with the appropriate error TLVs, as
     specified in the Parameter type bits, for any ASCONF
     Parameter it does not understand.  To indicate an
     unrecognized parameter, Cause Type 8 should be used as
     defined in the ERROR in Section 3.3.10.8, [RFC4960].  The
     endpoint may also use the response to carry rejections for
     other reasons, such as resource shortages, etc., using the
     Error Cause TLV and an appropriate error condition.

So we should indicate an unrecognized parameter with error
SCTP_ERROR_UNKNOWN_PARAM in ACSONF-ACK chunk, not
SCTP_ERROR_INV_PARAM.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agosctp: fix error cause codes of ADD-IP extension
Wei Yongjun [Tue, 7 Apr 2009 07:41:39 +0000 (15:41 +0800)] 
sctp: fix error cause codes of ADD-IP extension

RFC5061 had changed the error cause codes for Dynamic Address
Reconfiguration As the following:

       Cause Code
       Value          Cause Code
       ---------      ----------------
       0x00A0          Request to Delete Last Remaining IP Address
       0x00A1          Operation Refused Due to Resource Shortage
       0x00A2          Request to Delete Source IP Address
       0x00A3          Association Aborted Due to Illegal ASCONF-ACK
       0x00A4          Request Refused - No Authorization

This patch fix the error cause codes.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
15 years agonet/ucc_geth: Add SGMII support for UEC GETH driver
Haiying Wang [Tue, 2 Jun 2009 04:04:15 +0000 (04:04 +0000)] 
net/ucc_geth: Add SGMII support for UEC GETH driver

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofsl_pq_mido: Set the first UCC as the mii management interface master
Haiying Wang [Tue, 2 Jun 2009 04:04:14 +0000 (04:04 +0000)] 
fsl_pq_mido: Set the first UCC as the mii management interface master

Current code makes the UCC whose register range includes the current mdio
register to be the MII managemnt interface master of the QE. If there is more
than one mdio bus for QE, the UCC of the last mdio bus will be the MII
management interface master which will make the primary mdio bus working
unproperly, e.g. can not get the right clock. Normally the primary mdio bus is
the first UEC's mdio bus.
This patch allows the first UCC to be the MII management interface master of the
multiple UCC mdio buses.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/phy/marvell: update m88e1111 support for SGMII mode
Haiying Wang [Tue, 2 Jun 2009 04:04:13 +0000 (04:04 +0000)] 
net/phy/marvell: update m88e1111 support for SGMII mode

Disable fiber/copper auto selection for Marvell m88e1111 SGMII support.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: skb cleanup
Eric Dumazet [Tue, 2 Jun 2009 05:20:21 +0000 (05:20 +0000)] 
net: skb cleanup

Can remove anonymous union now it has one field.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: skb->dst accessors
Eric Dumazet [Tue, 2 Jun 2009 05:19:30 +0000 (05:19 +0000)] 
net: skb->dst accessors

Define three accessors to get/set dst attached to a skb

struct dst_entry *skb_dst(const struct sk_buff *skb)

void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)

void skb_dst_drop(struct sk_buff *skb)
This one should replace occurrences of :
dst_release(skb->dst)
skb->dst = NULL;

Delete skb->dst field

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: skb->rtable accessor
Eric Dumazet [Tue, 2 Jun 2009 05:14:27 +0000 (05:14 +0000)] 
net: skb->rtable accessor

Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb

Delete skb->rtable field

Setting rtable is not allowed, just set dst instead as rtable is an alias.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: add _skb_dst opaque field
Eric Dumazet [Tue, 2 Jun 2009 05:13:45 +0000 (05:13 +0000)] 
net: add _skb_dst opaque field

struct sk_buff uses one union to define dst and rtable fields.

We want to replace direct access to these pointers by accessors.

First patch adds a new "unsigned long _skb_dst;" opaque field
in this union.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: bump the version number
Bruce Allan [Tue, 2 Jun 2009 11:29:56 +0000 (11:29 +0000)] 
e1000e: bump the version number

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: workaround a Tx hang on 82577/82578
Bruce Allan [Tue, 2 Jun 2009 11:29:37 +0000 (11:29 +0000)] 
e1000e: workaround a Tx hang on 82577/82578

With bi-directional stress traffic, the receiver could hang causing the
hardware to stop and a "Detected Tx Unit Hang" message dumped to the system
logfile.  Temporarily workaround this issue by disabling Tx flow control by
default.  The issue is currently being investigated and a follow-on patch
will be provided to revert this when it is resolved.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: add support for 82577/82578 GbE LOM parts
Bruce Allan [Tue, 2 Jun 2009 11:29:18 +0000 (11:29 +0000)] 
e1000e: add support for 82577/82578 GbE LOM parts

This patch provides support for the next generation Intel desktop
and mobile gigabit ethernet LOM adapters.  These adapters are the
follow-on parts to the LOMs tied to the prior ICH chipsets and are
comprised of a MAC in the PCH chipset and an external PHY (82577 for
mobile and 82578 for desktop versions).  New features consist of PHY
wakeup to save power by completely turning off the MAC while in Sx
state, and 4K jumbo frames.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: specify max supported frame size in adapter struct
Bruce Allan [Tue, 2 Jun 2009 11:28:58 +0000 (11:28 +0000)] 
e1000e: specify max supported frame size in adapter struct

By putting the maximum frame size supported by the hardware into the
adapter structure, the change_mtu entry point function can be cleaned
up of checks for all the different max frame sizes supported by

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: correct flow control thresholds
Bruce Allan [Tue, 2 Jun 2009 11:28:39 +0000 (11:28 +0000)] 
e1000e: correct flow control thresholds

The flow control thresholds, i.e. high and low watermarks of the Rx
FIFO for when the hardware should transmit PAUSE frames (XON and XOFF,
respectively), need to be tuned for more efficient use of the FIFO.
The logic to set the thresholds for parts that support early-receive
(ERT) was also wrong in that it should check whether jumbo frames are
in use.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: do not attempt to disable smart powerdown if not supported
Bruce Allan [Tue, 2 Jun 2009 11:28:20 +0000 (11:28 +0000)] 
e1000e: do not attempt to disable smart powerdown if not supported

During reset, the driver was attempting to disable the Smart Powerdown
feature even if the part does not support Smart Powerdown.  Check for
support before attempting to disable the feature.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: enable CRC stripping by default
Bruce Allan [Tue, 2 Jun 2009 11:28:01 +0000 (11:28 +0000)] 
e1000e: enable CRC stripping by default

CRC stripping should be enabled by default but was not if it was not
specified as a module parameter.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 3 Jun 2009 09:43:41 +0000 (02:43 -0700)] 
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/forcedeth.c

15 years agomlx4_en: Updated driver version
Yevgeny Petrilin [Mon, 1 Jun 2009 23:29:42 +0000 (23:29 +0000)] 
mlx4_en: Updated driver version

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: Added vlan_features support
Yevgeny Petrilin [Mon, 1 Jun 2009 23:28:29 +0000 (23:28 +0000)] 
mlx4_en: Added vlan_features support

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: multiqueue support
Yevgeny Petrilin [Mon, 1 Jun 2009 23:24:07 +0000 (23:24 +0000)] 
mlx4_en: multiqueue support

By default the driver opens 8 TX queues (defined by MLX4_EN_NUM_TX_RINGS).
If the driver is configured to support Per Priority Flow Control, we open
8 additional TX rings.
dev->real_num_tx_queues is always set to be MLX4_EN_NUM_TX_RINGS.
The mlx4_en_select_queue() function uses standard hashing (skb_tx_hash)
in case that PPFC is not supported or the skb contain a vlan tag,
otherwise the queue is selected according to vlan priority.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: Coalescing target is equal for all mtu's
Yevgeny Petrilin [Mon, 1 Jun 2009 23:23:13 +0000 (23:23 +0000)] 
mlx4_en: Coalescing target is equal for all mtu's

The interrupt moderation should not depend on number of incoming
bytes, but on number of incoming packets.
The previous scheme caused very high interrupts rate for small
messages when big MTU was configured.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: Work with part of the ports.
Yevgeny Petrilin [Mon, 1 Jun 2009 23:22:18 +0000 (23:22 +0000)] 
mlx4_en: Work with part of the ports.

If the initialization of one of the ports failed,
there is no need to fail the other one as well.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en renamed en_params.c to en_ethtool.c
Yevgeny Petrilin [Mon, 1 Jun 2009 23:21:20 +0000 (23:21 +0000)] 
mlx4_en renamed en_params.c to en_ethtool.c

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: Moved all module parameters handling to en_main.c
Yevgeny Petrilin [Mon, 1 Jun 2009 23:20:18 +0000 (23:20 +0000)] 
mlx4_en: Moved all module parameters handling to en_main.c

en_params.c file now only handles Ethtool functionality

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: Giving interface name in debug messages
Yevgeny Petrilin [Mon, 1 Jun 2009 20:27:13 +0000 (20:27 +0000)] 
mlx4_en: Giving interface name in debug messages

For each debug message, the message will show interface name in case
that the net device was registered, and PCI bus ID with port number
if we were not registered yet. Messages that are not port/netdev specific
stayed in the old format

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic...
Minoru Usui [Tue, 2 Jun 2009 09:17:34 +0000 (02:17 -0700)] 
net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup

This patch fixes a bug which unconfigured struct tcf_proto keeps
chaining in tc_ctl_tfilter(), and avoids kernel panic in
cls_cgroup_classify() when we use cls_cgroup.

When we execute 'tc filter add', tcf_proto is allocated, initialized
by classifier's init(), and chained.  After it's chained,
tc_ctl_tfilter() calls classifier's change().  When classifier's
change() fails, tc_ctl_tfilter() does not free and keeps tcf_proto.

In addition, cls_cgroup is initialized in change() not in init().  It
accesses unconfigured struct tcf_proto which is chained before
change(), then hits Oops.

Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Tested-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: add missing length check to e1000 receive routine
Neil Horman [Tue, 2 Jun 2009 08:29:58 +0000 (01:29 -0700)] 
e1000: add missing length check to e1000 receive routine

Patch to fix bad length checking in e1000.  E1000 by default does two
things:

1) Spans rx descriptors for packets that don't fit into 1 skb on recieve
2) Strips the crc from a frame by subtracting 4 bytes from the length prior to
doing an skb_put

Since the e1000 driver isn't written to support receiving packets that span
multiple rx buffers, it checks the End of Packet bit of every frame, and
discards it if its not set.  This places us in a situation where, if we have a
spanning packet, the first part is discarded, but the second part is not (since
it is the end of packet, and it passes the EOP bit test).  If the second part of
the frame is small (4 bytes or less), we subtract 4 from it to remove its crc,
underflow the length, and wind up in skb_over_panic, when we try to skb_put a
huge number of bytes into the skb.  This amounts to a remote DOS attack through
careful selection of frame size in relation to interface MTU.  The fix for this
is already in the e1000e driver, as well as the e1000 sourceforge driver, but no
one ever pushed it to e1000.  This is lifted straight from e1000e, and prevents
small frames from causing the underflow described above

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv4: New multicast-all socket option
Nivedita Singhvi [Thu, 28 May 2009 07:00:46 +0000 (07:00 +0000)] 
ipv4: New multicast-all socket option

After some discussion offline with Christoph Lameter and David Stevens
regarding multicast behaviour in Linux, I'm submitting a slightly
modified patch from the one Christoph submitted earlier.

This patch provides a new socket option IP_MULTICAST_ALL.

In this case, default behaviour is _unchanged_ from the current
Linux standard. The socket option is set by default to provide
original behaviour. Sockets wishing to receive data only from
multicast groups they join explicitly will need to clear this
socket option.

Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>
Signed-off-by: Christoph Lameter<cl@linux.com>
Acked-by: David Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: ipv4/ip_sockglue.c cleanups
Eric Dumazet [Tue, 2 Jun 2009 07:42:16 +0000 (00:42 -0700)] 
net: ipv4/ip_sockglue.c cleanups

Pure cleanups

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIPv6: Print error value when skb allocation fails
Brian Haley [Tue, 2 Jun 2009 07:20:26 +0000 (00:20 -0700)] 
IPv6: Print error value when skb allocation fails

Print-out the error value when sock_alloc_send_skb() fails in
the IPv6 neighbor discovery code - can be useful for debugging.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoforcedeth: add phy_power_down parameter, leave phy powered up by default (v2)
Ed Swierk [Tue, 2 Jun 2009 07:19:52 +0000 (00:19 -0700)] 
forcedeth: add phy_power_down parameter, leave phy powered up by default (v2)

Add a phy_power_down parameter to forcedeth: set to 1 to power down the
phy and disable the link when an interface goes down; set to 0 to always
leave the phy powered up.

The phy power state persists across reboots; Windows, some BIOSes, and
older versions of Linux don't bother to power up the phy again, forcing
users to remove all power to get the interface working (see
http://bugzilla.kernel.org/show_bug.cgi?id=13072).  Leaving the phy
powered on is the safest default behavior.  Users accustomed to seeing
the link state reflect the interface state and/or wanting to minimize
power consumption can set phy_power_down=1 if compatibility with other
OSes is not an issue.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agousb: gadget: f_phonet: fix memory allocation sizes
Rémi Denis-Courmont [Mon, 1 Jun 2009 01:18:57 +0000 (01:18 +0000)] 
usb: gadget: f_phonet: fix memory allocation sizes

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agof_phonet: no need to check for carrier - scheduler does it internally
Rémi Denis-Courmont [Mon, 1 Jun 2009 01:18:56 +0000 (01:18 +0000)] 
f_phonet: no need to check for carrier - scheduler does it internally

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agof_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Rémi Denis-Courmont [Mon, 1 Jun 2009 01:18:55 +0000 (01:18 +0000)] 
f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback

Network device TX is never run in IRQ context, and skb is freed outside
of the IRQ-disabling spin lock. So checking for IRQ was a waste of time
here.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoPhonet: fix accounting race between gprs_writeable() and gprs_xmit()
Rémi Denis-Courmont [Mon, 1 Jun 2009 00:35:16 +0000 (00:35 +0000)] 
Phonet: fix accounting race between gprs_writeable() and gprs_xmit()

In the unlikely event that gprs_writeable() and gprs_xmit() check for
writeability at the same, we could stop the device queue forever.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Mon, 1 Jun 2009 21:32:08 +0000 (14:32 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

15 years agoatl1c_main.c: add wait_for_idle routine
Joe Perches [Sun, 31 May 2009 20:44:54 +0000 (20:44 +0000)] 
atl1c_main.c: add wait_for_idle routine

Slight refactoring of duplicated wait for idle checks
Spelling fix

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: jie.yang@atheros.com
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago3c509: Add missing EISA IDs
Maciej W. Rozycki [Mon, 1 Jun 2009 10:12:04 +0000 (03:12 -0700)] 
3c509: Add missing EISA IDs

Several EISA device IDs for 3c509 family network cards are missing from
the driver, making the cards unusable in their EISA mode.  Here's a fix to
add them based on the EISA configuration files distributed by 3Com and our
eisa.ids database.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIPv6: Add 'autoconf' and 'disable_ipv6' module parameters
Brian Haley [Mon, 1 Jun 2009 10:07:33 +0000 (03:07 -0700)] 
IPv6: Add 'autoconf' and 'disable_ipv6' module parameters

Add 'autoconf' and 'disable_ipv6' parameters to the IPv6 module.

The first controls if IPv6 addresses are autoconfigured from
prefixes received in Router Advertisements.  The IPv6 loopback
(::1) and link-local addresses are still configured.

The second controls if IPv6 addresses are desired at all.  No
IPv6 addresses will be added to any interfaces.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocpmac: prevent fatal exception in cpmac_end_xmit
Stefan Weil [Sun, 31 May 2009 10:59:15 +0000 (10:59 +0000)] 
cpmac: prevent fatal exception in cpmac_end_xmit

We should not be stopping the subqueues in cpmac_end_xmit
but rather test the status of them. Replace the calls to
netif_subqueue_stop by __netif_subqueue_stopped. This
fixes an unrecoverable exception from happening when
running the driver.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocpmac: remove unused variable.
Florian Fainelli [Sun, 31 May 2009 10:57:07 +0000 (10:57 +0000)] 
cpmac: remove unused variable.

This patch removes the unused variables in
cpmac_hw_error, cpmac_tx_timeout and cpmac_probe.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocan: sja1000: generic OF platform bus driver
Wolfgang Grandegger [Sat, 30 May 2009 07:55:50 +0000 (07:55 +0000)] 
can: sja1000: generic OF platform bus driver

This patch adds a generic driver for SJA1000 chips on the OpenFirmware
platform bus found on embedded PowerPC systems. You need a SJA1000 node
definition in your flattened device tree source (DTS) file similar to:

  can@3,100 {
   compatible = "nxp,sja1000";
   reg = <3 0x100 0x80>;
   interrupts = <2 0>;
   interrupt-parent = <&mpic>;
   nxp,external-clock-frequency = <16000000>;
  };

See also Documentation/powerpc/dts-bindings/can/sja1000.txt.

CC: devicetree-discuss@ozlabs.org
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocan: sja1000: stop misusing member base_addr of struct net_device
Wolfgang Grandegger [Sat, 30 May 2009 07:55:49 +0000 (07:55 +0000)] 
can: sja1000: stop misusing member base_addr of struct net_device

As discussed on the netdev mailing list, the member "base_addr" of
"struct net_device" should not be (mis)used to store the virtual
address to the SJA1000 register area. According to David Miller,
it's only use is to allow ISA and similar primitive bus devices to
have their I/O ports changed via ifconfig. The virtual address is
now stored in the private data structure of the SJA1000 device and
the callback functions use "struct sja1000_priv" instead of the
unneeded "struct net_device".

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocan: some fixes and cleanups to the initial device driver interface
Wolfgang Grandegger [Sat, 30 May 2009 07:55:48 +0000 (07:55 +0000)] 
can: some fixes and cleanups to the initial device driver interface

This patch fixes a few errors sneaked into the initial version of the
device driver interface.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMAINTAINERS: take maintainership of the cpmac Ethernet driver
Florian Fainelli [Mon, 1 Jun 2009 09:43:17 +0000 (02:43 -0700)] 
MAINTAINERS: take maintainership of the cpmac Ethernet driver

This patch adds me as the maintainer of the CPMAC (AR7)
Ethernet driver.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: unset IFF_XMIT_DST_RELEASE for qeth and ipoib
Eric Dumazet [Sun, 31 May 2009 06:04:46 +0000 (23:04 -0700)] 
net: unset IFF_XMIT_DST_RELEASE for qeth and ipoib

Last two drivers that need skb->dst in their start_xmit() function

Tell dev_hard_start_xmit() to no release it by unsetting  IFF_XMIT_DST_RELEASE

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agousbnet: ratelimit warning messages invoked from callback handler
André Goddard Rosa [Sat, 30 May 2009 05:13:58 +0000 (22:13 -0700)] 
usbnet: ratelimit warning messages invoked from callback handler

Warning messages coming from rtl8150 driver can flood the console
and make a DTV/set-top-box unable to decode video/audio frames.

'Pegasus' driver handles this situation similarly, preventing this
from happening there.

It happens with a low cost BCM MIPS embedded platform, whenever
timeout errors were coming from usbnet device, making platform
unusable for viewer watching.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofec: Add FEC support for MX35 processor
Fabio Estevam [Wed, 27 May 2009 03:41:39 +0000 (03:41 +0000)] 
fec: Add FEC support for MX35 processor

Add FEC support for MX35 processor.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda-usb: suspend/resume support
Tadashi Abe [Mon, 25 May 2009 20:53:27 +0000 (20:53 +0000)] 
irda-usb: suspend/resume support

This patch adds power management suspend/resume hooks for irda-usb.

Signed-off-by: Tadashi Abe <tabe@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomac8390: use printk MAC address format
Finn Thain [Mon, 25 May 2009 16:52:47 +0000 (16:52 +0000)] 
mac8390: use printk MAC address format

mac8390: use printk MAC address format

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: convert unicast addr list
Jiri Pirko [Fri, 22 May 2009 23:22:17 +0000 (23:22 +0000)] 
net: convert unicast addr list

This patch converts unicast address list to standard list_head using
previously introduced struct netdev_hw_addr. It also relaxes the
locking. Original spinlock (still used for multicast addresses) is not
needed and is no longer used for a protection of this list. All
reading and writing takes place under rtnl (with no changes).

I also removed a possibility to specify the length of the address
while adding or deleting unicast address. It's always dev->addr_len.

The convertion touched especially e1000 and ixgbe codes when the
change is not so trivial.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
 drivers/net/bnx2.c               |   13 +--
 drivers/net/e1000/e1000_main.c   |   24 +++--
 drivers/net/ixgbe/ixgbe_common.c |   14 ++--
 drivers/net/ixgbe/ixgbe_common.h |    4 +-
 drivers/net/ixgbe/ixgbe_main.c   |    6 +-
 drivers/net/ixgbe/ixgbe_type.h   |    4 +-
 drivers/net/macvlan.c            |   11 +-
 drivers/net/mv643xx_eth.c        |   11 +-
 drivers/net/niu.c                |    7 +-
 drivers/net/virtio_net.c         |    7 +-
 drivers/s390/net/qeth_l2_main.c  |    6 +-
 drivers/scsi/fcoe/fcoe.c         |   16 ++--
 include/linux/netdevice.h        |   18 ++--
 net/8021q/vlan.c                 |    4 +-
 net/8021q/vlan_dev.c             |   10 +-
 net/core/dev.c                   |  195 +++++++++++++++++++++++++++-----------
 net/dsa/slave.c                  |   10 +-
 net/packet/af_packet.c           |    4 +-
 18 files changed, 227 insertions(+), 137 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: use bond_is_lb() when it's appropriate
Jiri Pirko [Wed, 27 May 2009 05:42:36 +0000 (05:42 +0000)] 
bonding: use bond_is_lb() when it's appropriate

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/firmare: Ignore .cis files
Matt Kraai [Sat, 30 May 2009 05:06:33 +0000 (22:06 -0700)] 
net/firmare: Ignore .cis files

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoath1e: add new device id for asus hardware
Greg Kroah-Hartman [Sat, 30 May 2009 05:04:54 +0000 (22:04 -0700)] 
ath1e: add new device id for asus hardware

Gary Lin reports that a new device id needs to be added to the atl1e in
order to get some new Asus hardware to work properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomlx4_en: Fix a kernel panic when waking tx queue
Yevgeny Petrilin [Mon, 25 May 2009 20:57:21 +0000 (20:57 +0000)] 
mlx4_en: Fix a kernel panic when waking tx queue

When the transmit queue gets full we enable interrupts for TX completions
There was a race that we handled the TX queue both from the interrupt context
and from the transmit function. Using "spin_trylock_irq()" ensures this
doesn't happen.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 30 May 2009 04:56:19 +0000 (21:56 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agocxgb3: add support for the Aquantia 10G-BT phy
Divy Le Ray [Fri, 29 May 2009 12:52:49 +0000 (12:52 +0000)] 
cxgb3: add support for the Aquantia 10G-BT phy

Add support for the Aquantia AQ1002 10G-BaseT phy.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Add Aeluros 2020 phy support
Divy Le Ray [Fri, 29 May 2009 12:52:44 +0000 (12:52 +0000)] 
cxgb3: Add Aeluros 2020 phy support

Add support for the AEL2020 phy.
Add PCI IDs of the boards using this phy.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: move away from LLTX
Divy Le Ray [Fri, 29 May 2009 12:52:38 +0000 (12:52 +0000)] 
cxgb3: move away from LLTX

cxgb3 no longer advertizes LLTX.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: bfin_mac: add Blackfin MII bus to platform bus to allow DSA access
Graf Yang [Fri, 29 May 2009 03:41:48 +0000 (03:41 +0000)] 
netdev: bfin_mac: add Blackfin MII bus to platform bus to allow DSA access

When we register the MII bus to the platfrom bus, the Distributed Switch
Architecture can hook in transparently.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: bfin_mac: fix performance issue found by netperf
Michael Hennerich [Fri, 29 May 2009 03:41:15 +0000 (03:41 +0000)] 
netdev: bfin_mac: fix performance issue found by netperf

- Remove dead long delay
- Use proper defines
- Remove broken implementation of the TX DMA Data Alignment TXDWA feature

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB
Sonic Zhang [Fri, 29 May 2009 03:40:43 +0000 (03:40 +0000)] 
netdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB

Writes to the DMA descriptors may sit in the internal Blackfin data buffers
and not actually be available when the DMA engine goes to fetch them.  This
does not typically happen, but when dealing with short/fast packets such as
UDP and polling KGDB, this occurs much more frequently.  Same goes for
heavy loads as seen by netperf tests or large scp transfers.  So force the
buffers to drain with SSYNC otherwise we get random malformed packets.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: bfin_mac: drop useless IRQF_SHARED from Blackfin EMAC interrupt
Michael Hennerich [Fri, 29 May 2009 03:39:45 +0000 (03:39 +0000)] 
netdev: bfin_mac: drop useless IRQF_SHARED from Blackfin EMAC interrupt

The IRQ used by the Blackfin EMAC is internal to the peripheral and cannot
be used to generate any other interrupt, so there is no point in marking it
as IRQF_SHARED.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoveth: dont release skb->dst in veth_xmit()
Eric Dumazet [Fri, 29 May 2009 22:15:30 +0000 (15:15 -0700)] 
veth: dont release skb->dst in veth_xmit()

No need to release skb->dst, its now done by core network.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: fix loop in ofo handling code and reduce its complexity
Ilpo Järvinen [Fri, 29 May 2009 22:02:29 +0000 (15:02 -0700)] 
tcp: fix loop in ofo handling code and reduce its complexity

Somewhat luckily, I was looking into these parts with very fine
comb because I've made somewhat similar changes on the same
area (conflicts that arose weren't that lucky though). The loop
was very much overengineered recently in commit 915219441d566
(tcp: Use SKB queue and list helpers instead of doing it
by-hand), while it basically just wants to know if there are
skbs after 'skb'.

Also it got broken because skb1 = skb->next got translated into
skb1 = skb1->next (though abstracted) improperly. Note that
'skb1' is pointing to previous sk_buff than skb or NULL if at
head. Two things went wrong:
- We'll kfree 'skb' on the first iteration instead of the
  skbuff following 'skb' (it would require required SACK reneging
  to recover I think).
- The list head case where 'skb1' is NULL is checked too early
  and the loop won't execute whereas it previously did.

Conclusion, mostly revert the recent changes which makes the
cset very messy looking but using proper accessor in the
previous-like version.

The effective changes against the original can be viewed with:
  git-diff 915219441d566f1da0caa0e262be49b666159e17^ \
net/ipv4/tcp_input.c | sed -n -e '57,70 p'

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortl8187: add USB ID for Linksys WUSB54GC-EU v2 USB wifi dongle
John W. Linville [Wed, 27 May 2009 07:21:57 +0000 (09:21 +0200)] 
rtl8187: add USB ID for Linksys WUSB54GC-EU v2 USB wifi dongle

http://bugzilla.kernel.org/show_bug.cgi?id=13383

Reported-by: Przemyslaw Kulczycki <azrael@autocom.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoat76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scan
John W. Linville [Thu, 28 May 2009 09:39:02 +0000 (11:39 +0200)] 
at76c50x-usb: avoid mutex deadlock in at76_dwork_hw_scan

http://bugzilla.kernel.org/show_bug.cgi?id=13312

at76_dwork_hw_scan holds a mutex while calling ieee80211_scan_completed,
which then calls at76_config which needs the same mutex.  This reworks
the ordering to not hold the lock while calling ieee80211_scan_completed.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac8390: fix build with NET_POLL_CONTROLLER
Finn Thain [Thu, 28 May 2009 02:05:53 +0000 (02:05 +0000)] 
mac8390: fix build with NET_POLL_CONTROLLER

Fix the build for CONFIG_NET_POLL_CONTROLLER that I broke with
217cbfa856dc1cbc2890781626c4032d9e3ec59f ("mac8390: fix regression
caused during net_device_ops conversion").

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: link fault fixes
Divy Le Ray [Thu, 28 May 2009 11:23:08 +0000 (11:23 +0000)] 
cxgb3: link fault fixes

Do not call t3_link_fault() under spinlock, as it calls msleep().
Besides, only the access to pi->link_fault needs to be serialized.

Also initialize local variables before checking the link status,
link state fields might otherwise end up containing garbage.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: fix dma mapping regression
Divy Le Ray [Thu, 28 May 2009 11:23:02 +0000 (11:23 +0000)] 
cxgb3: fix dma mapping regression

Commit 5e68b772e6efd189d6aca76f6872fb75d51ace60
  cxgb3: map entire Rx page, feed map+offset to Rx ring.

introduced a regression on platforms defining DECLARE_PCI_UNMAP_ADDR()
and related macros as no-ops.

Rx descriptors are fed with the a page buffer bus address + page chunk offset.
The page buffer bus address is set and retrieved through
pci_unamp_addr_set(), pci_unmap_addr().
These functions being meaningless on x86 (if CONFIG_DMA_API_DEBUG is not set).
The HW ends up with a bogus bus address.

This patch saves the page buffer bus address for all plaftorms.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: allow bond in mode balance-alb to work properly in bridge -try4.3
Jiri Pirko [Thu, 28 May 2009 01:05:00 +0000 (01:05 +0000)] 
bonding: allow bond in mode balance-alb to work properly in bridge -try4.3

[PATCH net-next] bonding: allow bond in mode balance-alb to work properly in bridge -try4.3

(updated)
changes v4.2 -> v4.3
- memcpy the address always, not just in case it differs from master->dev_addr
- compare_ether_addr_64bits() is not used so there is no direct need to make new
  header file (I think it would be good to have bond stuff in separate file
  anyway).

changes v4.1 -> v4.2
- use skb->pkt_type == PACKET_HOST compare rather then comparing skb dest addr
  against skb->dev->dev_addr

The problem is described in following bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=487763

Basically here's what's going on. In every mode, bonding interface uses the same
mac address for all enslaved devices (except fail_over_mac). Only balance-alb
will simultaneously use multiple MAC addresses across different slaves. When you
put this kind of bond device into a bridge it will only add one of mac adresses
into a hash list of mac addresses, say X. This mac address is marked as local.
But this bonding interface also has mac address Y. Now then packet arrives with
destination address Y, this address is not marked as local and the packed looks
like it needs to be forwarded. This packet is then lost which is wrong.

Notice that interfaces can be added and removed from bond while it is in bridge.

***
When the multiple addresses for bridge port approach failed to solve this issue
due to STP I started to think other way to solve this. I returned to previous
solution but tweaked one.

This patch solves the situation in the bonding without touching bridge code.
For every incoming frame to bonding the destination address is compared to
current address of the slave device from which tha packet came. If these two
match destination address is replaced by mac address of the master. This address
is known by bridge so it is delivered properly. Note that the comparsion is not
made directly, it's used skb->pkt_type == PACKET_HOST instead. This is "set"
previously in eth_type_trans().

I experimentally tried that this works as good as searching through the slave
list (v4 of this patch).

Jirka

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agokorina: periodically poll the media
Florian Fainelli [Thu, 28 May 2009 00:58:41 +0000 (00:58 +0000)] 
korina: periodically poll the media

This patch makes the korina driver poll the media
for link change. This is actually required on
Mikrotik RB532 (not RB532A) for korina to
operate properly.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: replace dma_sync_single with dma_sync_single_for_cpu
FUJITA Tomonori [Wed, 27 May 2009 15:10:42 +0000 (15:10 +0000)] 
net: replace dma_sync_single with dma_sync_single_for_cpu

This replaces dma_sync_single() with dma_sync_single_for_cpu() because
dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says:

/* Backwards compat, remove in 2.7.x */
#define dma_sync_single dma_sync_single_for_cpu
#define dma_sync_sg dma_sync_sg_for_cpu

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: unset IFF_XMIT_DST_RELEASE in ipgre_tunnel_setup()
Eric Dumazet [Thu, 28 May 2009 22:35:10 +0000 (22:35 +0000)] 
net: unset IFF_XMIT_DST_RELEASE in ipgre_tunnel_setup()

ipgre_tunnel_xmit() might need skb->dst, so tell dev_hard_start_xmit()
to no release it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: unset IFF_XMIT_DST_RELEASE in clip_setup()
Eric Dumazet [Thu, 28 May 2009 11:14:49 +0000 (11:14 +0000)] 
atm: unset IFF_XMIT_DST_RELEASE in clip_setup()

clip_start_xmit() needs skb->dst so tell dev_hard_start_xmit()
to no release it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: unset IFF_XMIT_DST_RELEASE in ipip_tunnel_setup()
Eric Dumazet [Thu, 28 May 2009 10:44:30 +0000 (10:44 +0000)] 
net: unset IFF_XMIT_DST_RELEASE in ipip_tunnel_setup()

ipip_tunnel_xmit() might need skb->dst, so tell dev_hard_start_xmit()
to no release it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: dont update dev->trans_start
Eric Dumazet [Thu, 28 May 2009 00:00:41 +0000 (00:00 +0000)] 
net: dont update dev->trans_start

Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round)

Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Drivers can avoid one cache miss
(on dev->trans_start) in their start_xmit() handler.

Exceptions are NETIF_F_LLTX drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: dont update dev->trans_start in 10GB drivers
Eric Dumazet [Wed, 27 May 2009 19:26:37 +0000 (19:26 +0000)] 
net: dont update dev->trans_start in 10GB drivers

Followup of commits 9d21493b4beb8f918ba248032fefa393074a5e2b
and 08baf561083bc27a953aa087dd8a664bb2b88e8e
(net: tx scalability works : trans_start)
(net: txq_trans_update() helper)

Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Multi queue drivers can
avoid one cache miss (on dev->trans_start) in their start_xmit()
handler.

Exceptions are NETIF_F_LLTX drivers (vxge & tehuti)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'linux-2.6.31.y' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky...
David S. Miller [Fri, 29 May 2009 08:41:32 +0000 (01:41 -0700)] 
Merge branch 'linux-2.6.31.y' of git://git./linux/kernel/git/inaky/wimax

15 years agollc: Kill outdated and incorrect comment.
David S. Miller [Fri, 29 May 2009 06:31:56 +0000 (23:31 -0700)] 
llc: Kill outdated and incorrect comment.

This comment suggested storing two pieces of state in the
LLC skb control block, and in fact we do.  Someone did
the implementation but never killed this todo comment :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda: Use SKB queue and list helpers instead of doing it by-hand.
David S. Miller [Fri, 29 May 2009 06:26:33 +0000 (23:26 -0700)] 
irda: Use SKB queue and list helpers instead of doing it by-hand.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Use SKB queue and list helpers instead of doing it by-hand.
David S. Miller [Fri, 29 May 2009 04:35:47 +0000 (21:35 -0700)] 
tcp: Use SKB queue and list helpers instead of doing it by-hand.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowimax: a new API call was added, increment minor protocol version number
Inaky Perez-Gonzalez [Fri, 22 May 2009 07:41:11 +0000 (00:41 -0700)] 
wimax: a new API call was added, increment minor protocol version number

As the 'state_get' API call was added, we need to increase the minor
protocol version number so applications that depend on the can check
it's presence.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax/i2400m: usb: fix device reset on autosuspend while not yet idle
Inaky Perez-Gonzalez [Fri, 8 May 2009 22:51:44 +0000 (15:51 -0700)] 
wimax/i2400m: usb: fix device reset on autosuspend while not yet idle

When the i2400m is connected to a network, the host interface (USB)
cannot be suspended. For that to happen, the device has to have
negotiated with the basestation to put the link on IDLE state.

If the host tries to put the device in standby while it is connected
but not idle, the device resets, as the driver should not do that.

To avoid triggering that, when the USB susbsytem requires the driver
to autosuspend the device, the driver checks if the device is not yet
idle. If it is not, the request is requested (will be retried again
later on after the autosuspend timeout). At some point the device will
enter idle and the request will succeed (unless of course, there is
network traffic, but at that point, there is no idle neither in the
link or the host interface).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax: Add netlink interface to get device state
Paulius Zaleckas [Wed, 13 May 2009 13:20:29 +0000 (06:20 -0700)] 
wimax: Add netlink interface to get device state

wimax connection manager / daemon has to know what is current
state of the device. Previously it was only possible to get
notification whet state has changed.

Note:

 By mistake, the new generic netlink's number for
 WIMAX_GNL_OP_STATE_GET was declared inserting into the existing list
 of API calls, not appending; thus, it'd break existing API.

 Fixed by Inaky Perez-Gonzalez <inaky@linux.intel.com> by moving to
 the tail, where we add to the interface, not modify the interface.

 Thanks to Stephen Hemminger <shemminger@vyatta.com> for catching this.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>