aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-10-13netxen: remove sub 64-bit mem accessesAmit Kumar Salecha4-320/+196
Sub 64-bit / unaligned access to oncard memory was only used by old diagnostic tools, causes some intermittent issues when memory controller agent is used. The new access method was added by commit ea6828b8aa3a8ebae8d7740f32f212ba1d2f0742 ("netxen: improve pci memory access"). Firmware init anyway uses 8-byte strides. This also fixes address/offset calculation for NX2031 context memory (SIU). For NX3031, SIU uses same register offsets as packet memory (MIU). Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net: Use netdev_alloc_skb_ip_align()Eric Dumazet38-232/+90
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13sb1250-mac: duplicate setting of bit V_MAC_RX_PL_THRSH(4) in sbmac_channel_start()roel kluin1-1/+0
The bit V_MAC_RX_PL_THRSH(4) was already set a few lines higher. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net/hamradio: fix test in receive()roel kluin1-1/+2
The negation makes it a bool before the comparison and hence it will never evaluate to true. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13x25: bit and/or confusion in x25_ioctl()?roel kluin1-1/+1
Looking at commit ebc3f64b864f it appears that this was intended and not the original, equivalent to `if (facilities.reverse & ~0x81)'. In x25_parse_facilities() that patch changed how facilities->reverse was set. No other bits were set than 0x80 and/or 0x01. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13cxgb3: Added private MAC address and provisioning packet handler for iSCSIKaren Xie3-13/+53
This patch added support of private MAC address per port and provisioning packet handler for iSCSI traffic only. The above changes are isolated to the cxgb3 driver, independent of any scsi or iscsi driver changes. Acked-by: Karen Xie <kxie@chelsio.com> Acked-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Rakesh Ranjan <rakesh@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net: add Runtime PM to the sh_eth driverMagnus Damm2-2/+34
Add Runtime PM support to the sh_eth driver. The clock to the ethernet hardware block will be enabled as long as the network device is up. Signed-off-by: Magnus Damm <damm@opensource.se> Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net: allow sh_eth to get mac address through platform dataMagnus Damm2-8/+13
Extend the sh_eth driver to allow passing the mac address using the platform data structure. This to simplify board setup code. Signed-off-by: Magnus Damm <damm@opensource.se> Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13can: make the number of echo skb's configurableWolfgang Grandegger7-23/+42
This patch allows the CAN controller driver to define the number of echo skb's used for the local loopback (echo), as suggested by Kurt Van Dijck, with the function: struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); The CAN drivers have been adapted accordingly. For the ems_usb driver, as suggested by Sebastian Haas, the number of echo skb's has been increased to 10, which improves the transmission performance a lot. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net: Add netdev_alloc_skb_ip_align() helperEric Dumazet1-0/+10
Instead of hardcoding NET_IP_ALIGN stuff in various network drivers, we can add a helper around netdev_alloc_skb() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13tcp: replace ehash_size by ehash_maskEric Dumazet8-21/+21
Storing the mask (size - 1) instead of the size allows fast path to be a bit faster. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13ipv6: fix devconf after adding force_tllao optionCosmin Ratiu1-0/+1
Signed-off-by: Cosmin Ratiu <cratiu@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13bonding: change bond_create_proc_entry() to return voidNicolas de Pesloüan1-4/+2
The function bond_create_proc_entry is currently of type int. Two versions of this function exist: The one in the ifdef CONFIG_PROC_FS branch always return 0. The one in the else branch (which is empty) return nothing. When CONFIG_PROC_FS is undef, this cause the following warning: drivers/net/bonding/bond_main.c: In function `bond_create_proc_entry': drivers/net/bonding/bond_main.c:3393: warning: control reaches end of non-void function No caller of this function use the returned value. So change the returned type from int to void and remove the useless return 0; . Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Reported-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12sfc: 10Xpress: Initialise pause advertising flagsBen Hutchings1-0/+10
The mdio module now handles reconfiguration of pause advertising through ethtool, but not initialisation. Add the necessary initialisation to tenxpress_phy_init(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12mdio: Expose pause frame advertising flags to ethtoolBen Hutchings1-0/+4
In mdio45_ethtool_gset_npage() and mdio45_ethtool_gset(), check MDIO pause frame advertising flags and set the corresponding ethtool flags. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12mdio: Advertise pause (flow control) settings even if autoneg is offBen Hutchings1-5/+3
Currently, if pause autoneg is off we do not set either pause advertising flag. If autonegotiation of speed and duplex settings is enabled, there is no way for the link partner to distinguish this from our refusing to use pause frames. We should instead set the advertising flags according to the forced mode so that the link partner can follow our lead. This is consistent with the behaviour of other drivers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Add support for hibernationAnton Vorontsov1-17/+70
Thanks to various cleanups and refactorings this is now straightforward: convert the gianfar driver to dev_pm_ops, plus add ->restore() callback that will fully reinitialize MAC internal registers and BDs. Note that I kept legacy suspend/resume callbacks so that this patch doesn't depend on PowerPC changes (i.e. dev_pm_ops support for OF platform drivers). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()Anton Vorontsov1-40/+56
After hibernation we want to just reinitialize BDs, no need to allocate anything. So, factor out BDs initialization code from gfar_alloc_skb_resourses(). Also, teach gfar_init_bds() to reuse already allocated RX SKBs, i.e. just call gfar_init_rxbdp() if a SKB was already allocated and mapped. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Factor out RX BDs initialization from gfar_new_rxbdp()Anton Vorontsov1-12/+21
We want to just reinitialize RX BDs after hibernation, no need to map the skb->data again. So let's factor gfar_init_rxbdp() out of gfar_new_rxbdp(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Move tbase/rbase initialization to gfar_init_mac()Anton Vorontsov2-9/+9
For hibernation we want to call gfar_init_mac() without need to free/allocate_skb_resources sequence, so save the DMA address into a private struct, and move tbase/rbase initialization to gfar_init_mac(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Split allocation and initialization steps out of startup_gfar()Anton Vorontsov1-158/+176
Two new functions implemented: gfar_alloc_skb_resources() and gfar_init_mac(). We'll use gfar_init_mac() for restoring after hibernation. The patch just moves the code around, there should be no functional changes. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Don't needlessly set the wrap bit for the last RX BDAnton Vorontsov1-4/+0
startup_gfar() sets the wrap bit for the last rxbd just after gfar_new_rxbdp() call, which is issued for all rxbds. And gfar_new_rxbdp() has the following check already: if (bdp == priv->rx_bd_base + priv->rx_ring_size - 1) lstatus |= BD_LFLAG(RXBD_WRAP); So we don't need to set the bit again. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Simplify skb resources freeing codeAnton Vorontsov1-28/+25
Remove dma_free_coherent() from stop_gfar() and gfar_start() calls, place it into free_skb_resources(). That makes SKB resources management more understandable, plus free_skb_resources() will be used as a cleanup routine for gfar_alloc_skb_resources() that will be implemented soon. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12gianfar: Some cleanups for startup_gfar()Anton Vorontsov1-79/+64
We're going to split the startup_gfar() into 3 separate functions, so let's cleanup the code a little bit so that cosmetic changes won't distract attention from logical ones. - Remove needless casts (e.g. (struct sk_buff **)kmalloc()); - Turn 'unsigned long vaddr;' into 'void *vaddr', to avoid casting; - Add new 'struct device *dev' variable as a shorthand for '&priv->ofdev->dev' that is used all over the place, also rename 'struct net_device *dev' to 'struct net_device *ndev'; - Turn printk(KERN_ERR ...) to pr_err(...), which is shorter; - Don't return bogus -1 (i.e. -EPERM) when request_irq() fails; - Turn '&priv->regs->' to just '&regs->'. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12net: Introduce recvmmsg socket syscallArnaldo Carvalho de Melo25-50/+261
Meaning receive multiple messages, reducing the number of syscalls and net stack entry/exit operations. Next patches will introduce mechanisms where protocols that want to optimize this operation will provide an unlocked_recvmsg operation. This takes into account comments made by: . Paul Moore: sock_recvmsg is called only for the first datagram, sock_recvmsg_nosec is used for the rest. . Caitlin Bestler: recvmmsg now has a struct timespec timeout, that works in the same fashion as the ppoll one. If the underlying protocol returns a datagram with MSG_OOB set, this will make recvmmsg return right away with as many datagrams (+ the OOB one) it has received so far. . Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen datagrams and then recvmsg returns an error, recvmmsg will return the successfully received datagrams, store the error and return it in the next call. This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg, where we will be able to acquire the lock only at batch start and end, not at every underlying recvmsg call. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12cnic: Need to include net/ip6_checksum.hDavid S. Miller1-0/+1
drivers/net/cnic.c: In function 'cnic_init_storm_conn_bufs': drivers/net/cnic.c:1757: error: implicit declaration of function 'csum_ipv6_magic' Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12pasemi_mac: ethtool set settings supportValentine Barshak1-0/+14
Add ethtool set settings to pasemi_mac_ethtool. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12be2net: Implement ethtool get_phys_id function.Sarveshwar Bandi3-0/+126
Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12net: Generalize socket rx gap / receive queue overflow cmsgNeil Horman36-21/+88
Create a new socket level option to report number of queue overflows Recently I augmented the AF_PACKET protocol to report the number of frames lost on the socket receive queue between any two enqueued frames. This value was exported via a SOL_PACKET level cmsg. AFter I completed that work it was requested that this feature be generalized so that any datagram oriented socket could make use of this option. As such I've created this patch, It creates a new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue overflowed between any two given frames. It also augments the AF_PACKET protocol to take advantage of this new feature (as it previously did not touch sk->sk_drops, which this patch uses to record the overflow count). Tested successfully by me. Notes: 1) Unlike my previous patch, this patch simply records the sk_drops value, which is not a number of drops between packets, but rather a total number of drops. Deltas must be computed in user space. 2) While this patch currently works with datagram oriented protocols, it will also be accepted by non-datagram oriented protocols. I'm not sure if thats agreeable to everyone, but my argument in favor of doing so is that, for those protocols which aren't applicable to this option, sk_drops will always be zero, and reporting no drops on a receive queue that isn't used for those non-participating protocols seems reasonable to me. This also saves us having to code in a per-protocol opt in mechanism. 3) This applies cleanly to net-next assuming that commit 977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is reverted Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12Revert "af_packet: add interframe drop cmsg (v6)"David S. Miller2-35/+0
This reverts commit 977750076d98c7ff6cbda51858bb5a5894a9d9ab. Neil is reimplementing this generically, outside of AF_PACKET. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0.YOSHIFUJI Hideaki / 吉藤英明1-3/+6
ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0. Do not use bit-shift if relay_prefixlen == 0; relay_prefix << 32 does not result in 0. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11ipv6 sit: Fix 6rd relay address.YOSHIFUJI Hideaki / 吉藤英明1-2/+2
ipv6 sit: Fix 6rd relay address. Relay's address should be extracted from real IPv6 address instead of configured prefix. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11ipv6 sit: Ensure to initialize 6rd parameters.YOSHIFUJI Hideaki / 吉藤英明1-4/+6
ipv6 sit: Ensure to initialize 6rd parameters. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11cnic: Add main functions to support bnx2x devices.Michael Chan1-0/+1742
Add iSCSI support for bnx2x devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11cnic: Add bnx2x data structures.Michael Chan4-1/+2001
Add hardware and software structures for bnx2x devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11cnic: Refactor some code.Michael Chan1-18/+46
Refactor ring init. code for subsequent 10G patches. Also add rtnl_lock() in cnic_uio_open() to prevent race condition with netdev events. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Add main CNIC interface functions.Michael Chan3-2/+404
Add the main CNIC registration, callback, MAC addr. setup functions. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Add hw init code to support iSCSI.Michael Chan2-69/+200
Add code to initialize hardware blocks used for iSCSI. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Refactor MAC address setup code.Michael Chan2-52/+114
For iSCSI MAC address setup in later patches. Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11bnx2x: Refactor bnx2x_sp_post().Michael Chan1-24/+38
Some of the SPQ (slow-path queue) operations will be used by the cnic code in later patches. Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Add CBFC pause frame counters to ethtool stats.Ron Mercer2-0/+90
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Don't fail open when port is not initialized.Ron Mercer1-4/+2
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Get rid of firmware handler debug code.Ron Mercer1-21/+0
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Remove inline math for small rx buf mapping.Ron Mercer2-8/+9
rx_ring->sbq_buf_len now holds the length of the mapped portion of the buffer rather than the overall length. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Store firmware revision as early as possible.Ron Mercer1-0/+1
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Add handler for DCBX firmware event.Ron Mercer1-0/+3
The driver has nothing to do, but this marker prevents the event from showing up 'not handled'. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Set PCIE max read request size.Ron Mercer1-0/+7
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11qlge: Remove explicit setting of PCI Dev CTL reg.Ron Mercer1-15/+1
Remove explicit setting of error reporting bits. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller37-260/+464
2009-10-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller141-4538/+6262