GitHub/moto-9609/android_kernel_motorola_exynos9610.git
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>
15 years agowimax/i2400m: sdio: set the block size before enabling the function
Inaky Perez-Gonzalez [Thu, 30 Apr 2009 21:39:21 +0000 (14:39 -0700)]
wimax/i2400m: sdio: set the block size before enabling the function

From a fix by Cindy H Kao:

  Block size has to be set before sending IOE enable because the
  firmware reads the block size register before it reads IOE register.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax: document why wimax_msg_*() operations can be used in any state
Inaky Perez-Gonzalez [Wed, 6 May 2009 04:05:16 +0000 (21:05 -0700)]
wimax: document why wimax_msg_*() operations can be used in any state

Funcion documentation for wimax_msg_alloc() and wimax_msg_send() needs
to clarify that they can be used in the very early stages of a
wimax_dev lifecycle.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax/i2400m: remove redundant readiness checks from i2400m_report_tlv_*()
Inaky Perez-Gonzalez [Sat, 2 May 2009 09:50:03 +0000 (02:50 -0700)]
wimax/i2400m: remove redundant readiness checks from i2400m_report_tlv_*()

Functions i2400m_report_tlv*() are only called from
i2400m_report_hook(), called in a workqueue by
i2400m_report_hook_work(). The scheduler checks for device readiness
before scheduling.

Added an extra check for readiness in i2400m_report_hook_work(), which
makes all the checks down the line redundant.

Obviously the device state could change in the middle, but error
handling would take care of that.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax/i2400m: factor out 'state report's TLV handling to a function
Inaky Perez-Gonzalez [Sat, 25 Apr 2009 07:26:14 +0000 (00:26 -0700)]
wimax/i2400m: factor out 'state report's TLV handling to a function

i2400m_report_state_hook() is going to get messier as we add handling
code.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax/i2400m: allow kernel commands to device to be logged too
Inaky Perez-Gonzalez [Mon, 13 Apr 2009 17:26:34 +0000 (10:26 -0700)]
wimax/i2400m: allow kernel commands to device to be logged too

By running 'echo 1 > /sys/kernel/debug/wimax:wmxX/i2400m/trace_msg_from_user',
the driver will echo to user space all the commands being sent to the
device from user space, along with the responses.

However, this only helps with the commands being sent from user space;
with this patch, the trace hook is moved to i2400m_msg_to_dev(), which
is the single access point for running commands to the device (both by
user space and the kernel driver). This allows better debugging by
having a complete stream of commands/acks and reports.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax/i2400m: trace commands sent from user space on the "echo" pipe
Inaky Perez-Gonzalez [Tue, 31 Mar 2009 00:51:54 +0000 (17:51 -0700)]
wimax/i2400m: trace commands sent from user space on the "echo" pipe

When commands are sent from user space, trace both the command sent
and the answer received over the "echo" pipe instead of over the
"trace" pipe when command tracing is enabled. As well, when the device
sends a reports/indications, send it over the "echo" pipe.

The "trace" pipe is used by the device to send firmware traces;
gets confusing. Another named pipe makes it easier to split debug
information.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agowimax/i2400m: generate fake source MAC address with random_ether_addr()
Inaky Perez-Gonzalez [Wed, 22 Apr 2009 23:53:08 +0000 (16:53 -0700)]
wimax/i2400m: generate fake source MAC address with random_ether_addr()

The WiMAX i2400m driver needs to generate a fake source MAC address to
fake an ethernet header (for destination, the card's MAC is
used). This is the source of the packet, which is the basestation it
came from. The basestation's mac address is not usable for this, as it
uses its own namespace and it is not always available.

Currently the fake source MAC address was being set to all zeros,
which was causing trouble with bridging.

Use random_ether_addr() to generate a proper one that creates no
trouble.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
15 years agoeconet: Use SKB queue and list helpers instead of doing it by-hand.
David S. Miller [Thu, 28 May 2009 23:46:29 +0000 (16:46 -0700)]
econet: Use SKB queue and list helpers instead of doing it by-hand.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodecnet: Use SKB queue and list helpers instead of doing it by-hand.
David S. Miller [Thu, 28 May 2009 23:43:52 +0000 (16:43 -0700)]
decnet: Use SKB queue and list helpers instead of doing it by-hand.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: Use SKB queue and list helpers instead of doing it by-hand.
David S. Miller [Thu, 28 May 2009 23:36:47 +0000 (16:36 -0700)]
atm: Use SKB queue and list helpers instead of doing it by-hand.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortl8187: Remove pointless check in rtl8187_rx_cb().
David S. Miller [Thu, 28 May 2009 08:22:57 +0000 (01:22 -0700)]
rtl8187: Remove pointless check in rtl8187_rx_cb().

First of all, it exposes the SKB list implementation.

Second of all it's not needed.  If we get called here, we
successfully enqueued the URB with the linked SKB and
such a completion only gets called one time on such an
SKB.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agop54: Use SKB list handling helpers instead of by-hand code.
David S. Miller [Thu, 28 May 2009 07:48:16 +0000 (00:48 -0700)]
p54: Use SKB list handling helpers instead of by-hand code.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowavelan: Remove bogus debugging on skb->next being non-NULL.
David S. Miller [Thu, 28 May 2009 00:27:01 +0000 (17:27 -0700)]
wavelan: Remove bogus debugging on skb->next being non-NULL.

This eliminates explicit references to the SKB list handling
implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoaoe: Remove superfluous clearing of skb fields in new_skb().
David S. Miller [Thu, 28 May 2009 00:09:44 +0000 (17:09 -0700)]
aoe: Remove superfluous clearing of skb fields in new_skb().

This code uses alloc_skb() which clears them out for us.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoappletalk: Add proper locking around IPDDP routing table.
David S. Miller [Wed, 27 May 2009 23:56:47 +0000 (16:56 -0700)]
appletalk: Add proper locking around IPDDP routing table.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: correct a comment for the final #endif
Jiri Pirko [Wed, 27 May 2009 22:48:07 +0000 (15:48 -0700)]
net: correct a comment for the final #endif

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: net/core/sock.c cleanup
Eric Dumazet [Wed, 27 May 2009 11:30:05 +0000 (11:30 +0000)]
net: net/core/sock.c cleanup

Pure style cleanup patch.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: use netdev stats in b44, sundance, via-rhine and via-velocity
Eric Dumazet [Wed, 27 May 2009 10:34:50 +0000 (10:34 +0000)]
net: use netdev stats in b44, sundance, via-rhine and via-velocity

Use struct net_device_stats provided in struct net_device instead of
private ones.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: ALIGN/PTR_ALIGN cleanup in alloc_netdev_mq()/netdev_priv()
Eric Dumazet [Wed, 27 May 2009 04:42:37 +0000 (04:42 +0000)]
net: ALIGN/PTR_ALIGN cleanup in alloc_netdev_mq()/netdev_priv()

Use ALIGN() and PTR_ALIGN() macros instead of handcoding them.

Get rid of NETDEV_ALIGN_CONST ugly define

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobridge: avoid an extra space in br_fdb_update()
Jiri Pirko [Wed, 27 May 2009 00:55:08 +0000 (00:55 +0000)]
bridge: avoid an extra space in br_fdb_update()

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: check and update media status
Florian Fainelli [Tue, 26 May 2009 23:38:10 +0000 (23:38 +0000)]
r6040: check and update media status

This patch removes the not-that-useful message in the
r6040_timer which prints the PHY status. Instead
replace it with a call to mii_check_media which will
update the link status and print it on startup.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Do not check flush when comparing options for GRO
Herbert Xu [Tue, 26 May 2009 18:50:34 +0000 (18:50 +0000)]
tcp: Do not check flush when comparing options for GRO

There is no need to repeatedly check flush when comparing TCP
options for GRO as it will be false 99% of the time where it
matters.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Store shinfo in local variable in skb_gro_receive
Herbert Xu [Tue, 26 May 2009 18:50:33 +0000 (18:50 +0000)]
gro: Store shinfo in local variable in skb_gro_receive

This patch stores the two shinfo pointers in local variables
because they're used over and over again in skb_gro_receive.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Nasty optimisations for page frags in skb_gro_receive
Herbert Xu [Tue, 26 May 2009 18:50:32 +0000 (18:50 +0000)]
gro: Nasty optimisations for page frags in skb_gro_receive

This patch reverses the direction of the frags array copy in
skb_gro_receive in order simplify the loop conditional.  It
also avoids touching the first element of the original frags
array.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Open-code final pskb_may_pull
Herbert Xu [Tue, 26 May 2009 18:50:31 +0000 (18:50 +0000)]
gro: Open-code final pskb_may_pull

As we know the only packets which need the final pskb_may_pull
are completely non-linear, and have all the required bits in
frag0, we can perform a straight memcpy instead of going through
pskb_may_pull and doing skb_copy_bits.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv4: Use 32-bit loads for ID and length in GRO
Herbert Xu [Tue, 26 May 2009 18:50:29 +0000 (18:50 +0000)]
ipv4: Use 32-bit loads for ID and length in GRO

This patch optimises the IPv4 GRO code by using 32-bit loads
(instead of 16-bit ones) on the ID and length checks in the receive
function.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Avoid unnecessary comparison after skb_gro_header
Herbert Xu [Tue, 26 May 2009 18:50:28 +0000 (18:50 +0000)]
gro: Avoid unnecessary comparison after skb_gro_header

For the overwhelming majority of cases, skb_gro_header's return
value cannot be NULL.  Yet we must check it because of its current
form.  This patch splits it up into multiple functions in order
to avoid this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Optimise length comparison in skb_gro_header
Herbert Xu [Tue, 26 May 2009 18:50:27 +0000 (18:50 +0000)]
gro: Optimise length comparison in skb_gro_header

By caching frag0_len, we can avoid checking both frag0 and the
length separately in skb_gro_header.  This helps as skb_gro_header
is called four times per packet which amounts to a few million
times at 10Gb/s.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Optimise len/mss comparison
Herbert Xu [Tue, 26 May 2009 18:50:26 +0000 (18:50 +0000)]
tcp: Optimise len/mss comparison

Instead of checking len > mss || len == 0, we can accomplish
both by checking (len - 1) > mss using the unsigned wraparound.
At nearly a million times a second, this might just help.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Remove unnecessary window comparisons for GRO
Herbert Xu [Tue, 26 May 2009 18:50:25 +0000 (18:50 +0000)]
tcp: Remove unnecessary window comparisons for GRO

The window has already been checked as part of the flag word
so there is no need to check it explicitly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Optimise GRO port comparisons
Herbert Xu [Tue, 26 May 2009 18:50:24 +0000 (18:50 +0000)]
tcp: Optimise GRO port comparisons

Instead of doing two 16-bit operations for the source/destination
ports, we can do one 32-bit operation to take care both.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Only use skb_gro_header for completely non-linear packets
Herbert Xu [Tue, 26 May 2009 18:50:23 +0000 (18:50 +0000)]
gro: Only use skb_gro_header for completely non-linear packets

Currently skb_gro_header is used for packets which put the hardware
header in skb->data with the rest in frags.  Since the drivers that
need this optimisation all provide completely non-linear packets,
we can gain extra optimisations by only performing the frag0
optimisation for completely non-linear packets.

In particular, we can simply test frag0 (instead of skb_headlen)
to see whether the optimisation is in force.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Localise offset/headlen in skb_gro_offset
Herbert Xu [Tue, 26 May 2009 18:50:22 +0000 (18:50 +0000)]
gro: Localise offset/headlen in skb_gro_offset

This patch stores the offset/headlen in local variables as they're
used repeatedly in skb_gro_offset.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Inline skb_gro_header and cache frag0 virtual address
Herbert Xu [Tue, 26 May 2009 18:50:21 +0000 (18:50 +0000)]
gro: Inline skb_gro_header and cache frag0 virtual address

The function skb_gro_header is called four times per packet which
quickly adds up at 10Gb/s.  This patch inlines it to allow better
optimisations.

Some architectures perform multiplication for page_address, which
is done by each skb_gro_header invocation.  This patch caches that
value in skb->cb to avoid the unnecessary multiplications.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogro: Open-code frags copy in skb_gro_receive
Herbert Xu [Tue, 26 May 2009 18:50:19 +0000 (18:50 +0000)]
gro: Open-code frags copy in skb_gro_receive

gcc does a poor job at generating code for the memcpy of the frags
array in skb_gro_receive, which is the primary purpose of that
function when merging frags.  In particular, it can't utilise the
alignment information of the source and destination.  This patch
open-codes the copy so we process words instead of bytes.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Fix build warning
Peter P Waskiewicz Jr [Wed, 27 May 2009 04:41:18 +0000 (21:41 -0700)]
ixgbe: Fix build warning

This patch fixes a build warning due to an unused label.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agophy: Eliminate references to BUS_ID_SIZE.
David S. Miller [Wed, 27 May 2009 04:16:25 +0000 (21:16 -0700)]
phy: Eliminate references to BUS_ID_SIZE.

Just use the constant 20 to keep things working.

If someone is so motivated, this can be converted over to
dynamic strings.  I tried and it's a lot of work.

But for now this is good enough.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonl80211: Eliminate reference to BUS_ID_SIZE.
David S. Miller [Wed, 27 May 2009 04:15:00 +0000 (21:15 -0700)]
nl80211: Eliminate reference to BUS_ID_SIZE.

It's going away.  Just leave the constant "20" here so that
behavior doesn't change.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh_eth: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE instead.
David S. Miller [Wed, 27 May 2009 04:11:09 +0000 (21:11 -0700)]
sh_eth: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocpmac: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE.
David S. Miller [Wed, 27 May 2009 04:10:22 +0000 (21:10 -0700)]
cpmac: Remove references to BUS_ID_SIZE, use MII_BUS_ID_SIZE.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixp4xx_eth: Remove references to BUS_ID_SIZE.
David S. Miller [Wed, 27 May 2009 04:09:33 +0000 (21:09 -0700)]
ixp4xx_eth: Remove references to BUS_ID_SIZE.

Use MII_BUS_ID_SIZE instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Remove bogus reference to BUS_ID_SIZE in sysfs code.
David S. Miller [Wed, 27 May 2009 04:05:19 +0000 (21:05 -0700)]
net: Remove bogus reference to BUS_ID_SIZE in sysfs code.

BUS_ID_SIZE is really no more, and device names are dynamically
allocated and thus can be any necessary size.

So remove the BUG check here making sure BUS_ID_SIZE is at least
as large as IFNAMSIZ.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor8169: Use a different default for each family
Jean Delvare [Wed, 27 May 2009 03:54:48 +0000 (20:54 -0700)]
r8169: Use a different default for each family

The r8169 driver supports 3 different families of network chips
(RTL8169, RTL8168 and RTL8101). When an unknown version is found, the
driver currently always defaults to the RTL8169 variant. This has very
little chance to ever work for chips of the other families. So better
define a per-family default.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/ucc_geth: allow to set mac address on running device
Kevin Hao [Wed, 27 May 2009 03:49:03 +0000 (20:49 -0700)]
net/ucc_geth: allow to set mac address on running device

Inspired by the patch for 8139too (bda6a15a).

Currently we can't set mac address on a running ucc_geth device.
But this is needed when you use this device as a bonding slave in
bonding device in balance-alb mode. So add this feature for ucc_geth
device.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoniu: Add support for C10NEM
Tanli Chang [Wed, 27 May 2009 03:45:50 +0000 (20:45 -0700)]
niu: Add support for C10NEM

This patch is for supporting C10NEM. C10NEM is a switch module, which
has back-to-back XAUI link connected to blades.

Signed-off-by: Tanli Chang <tanli.chang@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: fix 82598 SFP initialization after driver load.
Don Skidmore [Wed, 27 May 2009 03:40:47 +0000 (20:40 -0700)]
ixgbe: fix 82598 SFP initialization after driver load.

If we loaded the driver with out a SFP module plugged in it would
leave it in a state that make it later unable to link when a module
was plugged in.  This patch corrects that by:

ixgbe_probe() - moving the check for IXGBE_ERR_SFP_NOT_PRESENT from
after get_invariants() to after reset_hw() as now reset_hw() is
where this condition will be indentified.

ixgbe_reset_hw_82598() - Enable this function to now return
IXGBE_ERR_SFP_NOT_PRESENT.

ixgbe_identify_sfp_module_generic() - This where the lack of SFP
module is detected.  Modifications are added to allow a different
return value for modules that just haven't been plugged in yet.

Other functions were updated to allow correct logging.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Remove device ID 0x10d8
Peter P Waskiewicz Jr [Wed, 27 May 2009 03:40:09 +0000 (20:40 -0700)]
ixgbe: Remove device ID 0x10d8

Device ID 0x10d8 is the default silicon device ID for 82599.  However, the
device will not be functional without an EEPROM, so we want to prevent the
driver from loading on the device.  Otherwise, the driver will load, but no
PHY setup or PCIe setup will occur, causing the device to be unusable.  To
prevent users from encountering this, just remove the device ID.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb/e1000e: update PSSR_MDIX value to reflect correct bit
Alexander Duyck [Tue, 26 May 2009 13:51:05 +0000 (13:51 +0000)]
igb/e1000e: update PSSR_MDIX value to reflect correct bit

The phy port status register has the MDI-X status bit on bit 11, not bit 3
as is currently setup in the define.  This patch corrects that so the
correct bit is checked on igp PHY types.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-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 agoigb: Record host memory receive overflow in net_stats
Jesper Dangaard Brouer [Tue, 26 May 2009 13:50:48 +0000 (13:50 +0000)]
igb: Record host memory receive overflow in net_stats

Based on previous patch from Jesper Dangaard Brouer.

The RNBC (Receive No Buffers Count) register for the 82576, indicate
that frames were received when there were no available buffers in host
memory to store those frames (receive descriptor head and tail
pointers were equal).  The packet is still received by the NIC if
there is space in the FIFO on the NIC.

As the RNBC value is not a packet drop, the driver stores this value
in net_stats.rx_fifo_errors to indicate that there were no system
buffers available for the incoming packet.  Actual dropped packets
are counted in the MPC value.

Saving the stats in dev->net_stats makes it visible via
/proc/net/dev as "fifo", and thus viewable to ifconfig
as "overruns" and 'netstat -i' as "RX-OVR".

The Receive No Buffers Count (RNBC) can already be queried by
ethtool -S as "rx_no_buffer_count".

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: Implement reading of reg RQDPC (Receive Queue Drop Packet Count)
Jesper Dangaard Brouer [Tue, 26 May 2009 13:50:31 +0000 (13:50 +0000)]
igb: Implement reading of reg RQDPC (Receive Queue Drop Packet Count)

Based on the previous patches from Jesper Dangaard Brouer <hawk@comx.dk>

Implement reading the per queue drop stats register
RQDPC (Receive Queue Drop Packet Count).  It counts the number of
packets dropped by a queue due to lack of descriptors available.

Notice RQDPC (Receive Queue Drop Packet Count) stats only gets
incremented, if the DROP_EN bit it set (in the SRRCTL register
for that queue).  If DROP_EN bit is NOT set, then the some what
equivalent count is stored in RNBC (not per queue basis).

The RQDPC register is only 12 bit, thus the precision might
suffer due to overrun in-netween the watchdog polling interval.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: add RQDPC (Receive Queue Drop Packet Count) register macro
Jeff Kirsher [Tue, 26 May 2009 13:50:15 +0000 (13:50 +0000)]
igb: add RQDPC (Receive Queue Drop Packet Count) register macro

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago8139*: convert printk() to pr_<foo>()
Alexander Beregalov [Tue, 26 May 2009 12:35:27 +0000 (12:35 +0000)]
8139*: convert printk() to pr_<foo>()

Also convert DPRINTK to pr_debug and dev_printk to dev_<foo>.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago3c5xx: convert printk() to pr_<foo>()
Alexander Beregalov [Tue, 26 May 2009 12:35:26 +0000 (12:35 +0000)]
3c5xx: convert printk() to pr_<foo>()

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago3c50x: convert printk() to pr_<foo>()
Alexander Beregalov [Tue, 26 May 2009 12:35:25 +0000 (12:35 +0000)]
3c50x: convert printk() to pr_<foo>()

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatl1: use netdev->stats
Eric Dumazet [Tue, 26 May 2009 06:48:43 +0000 (23:48 -0700)]
atl1: use netdev->stats

Get rid of private struct net_device_stats in "struct atl1e_adapter",
and use one provided in struct net_device instead.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: txq_trans_update() helper
Eric Dumazet [Tue, 26 May 2009 05:58:01 +0000 (22:58 -0700)]
net: txq_trans_update() helper

We would like to get rid of netdev->trans_start = jiffies; that about all net
drivers have to use in their start_xmit() function, and use txq->trans_start
instead.

This can be done generically in core network, as suggested by David.

Some devices, (particularly loopback) dont need trans_start update, because
they dont have transmit watchdog. We could add a new device flag, or rely
on fact that txq->tran_start can be updated is txq->xmit_lock_owner is
different than -1. Use a helper function to hide our choice.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sh_eth: Add support SH7724
Yoshihiro Shimoda [Sun, 24 May 2009 23:54:30 +0000 (23:54 +0000)]
net: sh_eth: Add support SH7724

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sh_eth: CPU dependency code collect to "struct sh_eth_cpu_data"
Yoshihiro Shimoda [Sun, 24 May 2009 23:54:21 +0000 (23:54 +0000)]
net: sh_eth: CPU dependency code collect to "struct sh_eth_cpu_data"

This improves readability by collecting CPU dependency code.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sh_eth: fix receive desciptor loop
Yoshihiro Shimoda [Sun, 24 May 2009 23:53:40 +0000 (23:53 +0000)]
net: sh_eth: fix receive desciptor loop

Fix the problem that this driver not update rxdesc in sh_eth_rx.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sh_eth: fix TX/RX descriptor not set physical memory
Yoshihiro Shimoda [Sun, 24 May 2009 23:53:20 +0000 (23:53 +0000)]
net: sh_eth: fix TX/RX descriptor not set physical memory

Fix the probrem that TX/RX descirptor not set physical memory.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sh_eth: fix cache coherency issue
Yoshihiro Shimoda [Sun, 24 May 2009 23:52:35 +0000 (23:52 +0000)]
net: sh_eth: fix cache coherency issue

Fix the problem that may not work receive process by cache coherency issue.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: gen_estimator: Fix signed integers right-shifts.
Jarek Poplawski [Tue, 26 May 2009 05:47:01 +0000 (22:47 -0700)]
pkt_sched: gen_estimator: Fix signed integers right-shifts.

Right-shifts of signed integers are implementation-defined so unportable.

With feedback from: Eric Dumazet <dada1@cosmosbay.com>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Remove obsolete MV64360 config option
Gabriel Paubert [Tue, 26 May 2009 05:46:19 +0000 (22:46 -0700)]
net: Remove obsolete MV64360 config option

Signed-off-by: Gabriel Paubert <paubert@iram.es>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiwmc3200wifi: fix link error when CFG80211 is not selected
Zhu Yi [Tue, 26 May 2009 05:41:51 +0000 (22:41 -0700)]
iwmc3200wifi: fix link error when CFG80211 is not selected

The patch makes iwmc3200wifi select CFG80211 instead of LIB80211.
This fixed module link error reported by Randy Dunlap
<randy.dunlap@oracle.com> when compiling iwmc3200wifi without
cfg80211 selected. WIRELESS_EXT is also selected by iwmc3200wifi.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: remove COMPAT_NET_DEV_OPS
Alexander Beregalov [Mon, 25 May 2009 08:53:53 +0000 (01:53 -0700)]
net: remove COMPAT_NET_DEV_OPS

All drivers are already converted to new net_device_ops API
and nobody uses old API anymore.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.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 [Mon, 25 May 2009 08:42:21 +0000 (01:42 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

15 years agomISDN: Added PCI ID for new Junghanns.net Single E1 cards.
Andreas Eversberg [Mon, 25 May 2009 07:56:56 +0000 (00:56 -0700)]
mISDN: Added PCI ID for new Junghanns.net Single E1 cards.

The new ID is validated by Cologne Chip.
LEDs control is also supported.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Fix DTMF detection enable/disable
Andreas Eversberg [Fri, 22 May 2009 11:04:58 +0000 (11:04 +0000)]
mISDN: Fix DTMF detection enable/disable

DTMF detection was enabled when it was not supposed to.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Use kernel_{send,recv}msg instead of open coding
Arnaldo Carvalho de Melo [Fri, 22 May 2009 11:04:57 +0000 (11:04 +0000)]
mISDN: Use kernel_{send,recv}msg instead of open coding

Reducing the number of direct users of sock_{recv,send}msg.
Modified version to match the latest context.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Cleanup debug messages
Karsten Keil [Fri, 22 May 2009 11:04:56 +0000 (11:04 +0000)]
mISDN: Cleanup debug messages

This patch make debug printk's KERN_DEBUG and also fix some
codestyle issues.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Add PCI ID for Junghanns 8S card
Andreas Eversberg [Fri, 22 May 2009 11:04:55 +0000 (11:04 +0000)]
mISDN: Add PCI ID for Junghanns 8S card

new id for HFC-8S

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: get_free_devid() failure ignored
Roel Kluin [Fri, 22 May 2009 11:04:53 +0000 (11:04 +0000)]
mISDN: get_free_devid() failure ignored

dev->id is unsigned so a get_free_devid() error is ignored.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Add XHFC support for embedded Speech-Design board to hfcmulti
Karsten Keil [Fri, 22 May 2009 11:04:53 +0000 (11:04 +0000)]
mISDN: Add XHFC support for embedded Speech-Design board to hfcmulti

New version without emulating arch specific stuff for the other
architectures, the special IO and init functions for the 8xx
microcontroller are in a separate include file.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Fix skb leak in error cases
Karsten Keil [Fri, 22 May 2009 11:04:52 +0000 (11:04 +0000)]
mISDN: Fix skb leak in error cases

If the channel receive function returns an error the skb must be freed.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Add "sapi" information to debug messages
Andreas Eversberg [Fri, 22 May 2009 11:04:51 +0000 (11:04 +0000)]
mISDN: Add "sapi" information to debug messages

Using sapi values other than 0 work now.
The "OpenBSC" project does not require special kernel patch anymore.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Add allocation of recvbuf[1500] at run time to reduce stack size
Frank Seidel [Fri, 22 May 2009 11:04:51 +0000 (11:04 +0000)]
mISDN: Add allocation of recvbuf[1500] at run time to reduce stack size

Before: 1656 bytes on i386, now 164.
Modified by Andreas Eversberg <andreas@eversberg.eu>

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Fix TEI and SAPI handling
Andreas Eversberg [Mon, 25 May 2009 07:50:02 +0000 (00:50 -0700)]
mISDN: Fix TEI and SAPI handling

Added SAPI value to use SAPIs different than 0.

Now fixed TEIs work in NT mode. This allows PTP endpoint to be connected
to PTMP ports together with other PTMP endpoints.

New enhanced version, thanks to Sam Ravnborg <sam@ravnborg.org> for the
hints.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Hardware acceleration is now possible in conjunction with audio recording
Andreas Eversberg [Fri, 22 May 2009 11:04:49 +0000 (11:04 +0000)]
mISDN: Hardware acceleration is now possible in conjunction with audio recording

Audio recording requires software audio processing.
Both hardware and software processing is simultaniously possible now.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Fix DTMF locking bug issue
Andreas Eversberg [Fri, 22 May 2009 11:04:48 +0000 (11:04 +0000)]
mISDN: Fix DTMF locking bug issue

DTMF digits were sent up to socket in locked state.
Receive audio stream was not enabled in certain condition.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Added layer-1-hold feature
Andreas Eversberg [Fri, 22 May 2009 11:04:48 +0000 (11:04 +0000)]
mISDN: Added layer-1-hold feature

Add IMHOLD_L1 ioctl.
The feature will be disabled on closing.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Fixed missing spin lock on pipeline process
Andreas Eversberg [Fri, 22 May 2009 11:04:47 +0000 (11:04 +0000)]
mISDN: Fixed missing spin lock on pipeline process

Need to protect the complete pipeline.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Reduce stack size in dsp_cmx_send()
Frank Seidel [Fri, 22 May 2009 11:04:47 +0000 (11:04 +0000)]
mISDN: Reduce stack size in dsp_cmx_send()

Reduce stack size memory footprint of mISDN_dsp.
(From 1468 bytes for dsp_cmx_send on i386 down to 44).

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Echo canceler now gets delay information from hardware
Andreas Eversberg [Fri, 22 May 2009 11:04:46 +0000 (11:04 +0000)]
mISDN: Echo canceler now gets delay information from hardware

Added tx-fifo information for calculation of current delay to sync tx and rx
streams for echo canceler.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: DSP now uses ring buffer for echo canceler
Andreas Eversberg [Fri, 22 May 2009 11:04:45 +0000 (11:04 +0000)]
mISDN: DSP now uses ring buffer for echo canceler

DSP now uses ring buffer for echo canceler.
Added missing include in l1oip_codec.c

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: Add watchdog functionality to hfcmulti driver
Andreas Eversberg [Fri, 22 May 2009 11:04:44 +0000 (11:04 +0000)]
mISDN: Add watchdog functionality to hfcmulti driver

This patch was made by Titus Moldovan and provides IOCTL functions for enabling
and disabling the controller's built in watchdog. The use is optional.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: fix BUG under load after introduction of skb recycling
Lennert Buytenhek [Mon, 25 May 2009 07:42:34 +0000 (00:42 -0700)]
gianfar: fix BUG under load after introduction of skb recycling

Since commit 0fd56bb5be6455d0d42241e65aed057244665e5e ("gianfar:
Add support for skb recycling"), gianfar puts skbuffs that are in
the rx ring back onto the recycle list as-is in case there was a
receive error, but this breaks the following invariant: that all
skbuffs on the recycle list have skb->data = skb->head + NET_SKB_PAD.

The RXBUF_ALIGNMENT realignment done in gfar_new_skb() will be done
twice on skbuffs recycled in this way, causing there not to be enough
room in the skb anymore to receive a full packet, eventually leading
to an skb_over_panic from gfar_clean_rx_ring() -> skb_put().

Resetting the skb->data pointer to skb->head + NET_SKB_PAD before
putting the skb back onto the recycle list restores the mentioned
invariant, and should fix this issue.

Reported-by: Michael Guntsche <mike@it-loops.com>
Tested-by: Michael Guntsche <mike@it-loops.com>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoskbuff: Copy csum instead of csum_start/csum_offset
Herbert Xu [Fri, 22 May 2009 22:20:02 +0000 (22:20 +0000)]
skbuff: Copy csum instead of csum_start/csum_offset

Hi:

skbuff: Copy csum instead of csum_start/csum_offset

It's easier to copy the u32 csum instead of its two u16
constituents.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoskbuff: Move new code into __copy_skb_header
Herbert Xu [Fri, 22 May 2009 22:11:37 +0000 (22:11 +0000)]
skbuff: Move new code into __copy_skb_header

Hi:

skbuff: Move new __skb_clone code into __copy_skb_header

It seems that people just keep on adding stuff to __skb_clone
instead __copy_skb_header.  This is wrong as it means your brand-new
attributes won't always get copied as you intended.

This patch moves them to the right place, and adds a comment to
prevent this from happening again.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
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 [Mon, 25 May 2009 07:38:24 +0000 (00:38 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

15 years agomyri10ge: Add support for vlan_features
Brice Goglin [Sun, 24 May 2009 05:27:59 +0000 (05:27 +0000)]
myri10ge: Add support for vlan_features

Add support for netdev->vlan_features in the myri10ge driver.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>