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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>