summaryrefslogtreecommitdiffstats
path: root/drivers/staging/netlogic
Commit message (Collapse)AuthorAgeFilesLines
* Staging: netlogic: Remove & from function name.Sandhya Bankar2016-03-281-1/+1
| | | | | | | | Remove & from function name,when function name passed as an argument to another function. Function name is used as pointer without &. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzallocG Pooja Shamili2016-03-111-5/+9
| | | | | | | | | | | The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_err occurances are replaced with dev_err function calls Signed-off-by: G Pooja Shamili <poojashamili@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Replace pr_* with netdev_*Amitoj Kaur Chawla2016-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace generic pr_info and pr_err with netdev_info and netdev_err respectively for net devices. Found using Coccinelle. The semantic patch used to find this is as follows: //<smpl> @@ expression e; identifier f,i; position p; @@ f(...,struct net_device *i,...) { ... ( - pr_debug@p (e) + netdev_dbg(i, e) | - pr_err@p (e) + netdev_err(i, e) | - pr_info@p (e) + netdev_info(i, e) ) ... } @@ expression e; identifier f,i; position p; @@ f(...) { ... struct net_device *n; ... ( - pr_debug@p (e) + netdev_dbg(n, e) | - pr_err@p (e) + netdev_err(n, e) | - pr_info@p (e) + netdev_info(n, e) ) ... } @a@ identifier s,x; @@ struct s { ... struct net_device *x; ... }; @b depends on a@ expression e; identifier f,i,a.s,a.x; position p; @@ f ( ..., struct s *i, ...) { ... ( - pr_debug@p (e) + netdev_dbg(i->x, e) | - pr_err@p (e) + netdev_err(i->x, e) | - pr_info@p (e) + netdev_info(i->x, e) ) ... } @c depends on a@ expression e; identifier f,i,a.s,a.x; position p; @@ f (...) { ... struct s *i = ...; ... ( - pr_debug@p (e) + netdev_dbg(i->x, e) | - pr_err@p (e) + netdev_err(i->x, e) | - pr_info@p (e) + netdev_info(i->x, e) ) ... } //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Drop unneeded void pointer castJanani Ravichandran2016-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Simplify use of devm_ioremap_resourceAmitoj Kaur Chawla2016-03-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Return zero pointer after failed kmallocLaura Garcia Liebana2016-02-201-1/+3
| | | | | | | | | Return a ZERO_SIZE_PTR in the xlr_config_spill function if the kmalloc returns an invalid value. This change prevents a possible segmentation fault as the invalid pointer is fed into PTR_ALIGN macro. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix indent for conditional statementLaura Garcia Liebana2016-02-201-1/+1
| | | | | | | | Insert code indent for conditional statements. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Insert spaces around operatorLaura Garcia Liebana2016-02-201-2/+2
| | | | | | | | Spaces preferred around that '/' (ctx:VxV). Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix comparison to NULLLaura Garcia Liebana2016-02-201-2/+2
| | | | | | | | Avoid the use of comparison to NULL, use !<variable> instead. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix CamelCase for constantsLaura Garcia Liebana2016-02-202-504/+504
| | | | | | | | Avoid the use of CamelCase for constants. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix multiple assignmentsLaura Garcia Liebana2016-02-201-1/+2
| | | | | | | | Avoid the use of multiple assignments in a single line. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Remove blank spaces after a castLaura Garcia Liebana2016-02-201-5/+5
| | | | | | | Remove uneeded blank spaces after a cast. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix several parentheses alignmentsLaura Garcia Liebana2016-02-202-79/+82
| | | | | | | | Align arguments with the open parenthesis. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix parenthesis alignmentLaura Garcia Liebana2016-02-141-2/+2
| | | | | | | | Align arguments with the open parenthesis. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Remove multiple blank linesLaura Garcia Liebana2016-02-141-1/+0
| | | | | | | Avoid the use of multiple blank lines. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix multiple irq assignments in a single lineLaura Garcia Liebana2016-02-141-1/+2
| | | | | | | | Avoid the use of multiple assignments in a single line. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix build error due to missed API changeAndrew Lunn2016-01-101-16/+13
| | | | | | | | Fix a number of build errors due to moving the phy_map and centralizing interrupt allocation. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* phy: Centralise print about attached phyAndrew Lunn2016-01-071-2/+1
| | | | | | | | | | Many Ethernet drivers contain the same netdev_info() print statement about the attached phy. Move it into the phy device code. Additionally add a varargs function which can be used to append additional information. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* phy: add phydev_name() wrapperAndrew Lunn2016-01-071-3/+3
| | | | | | | | Add a phydev_name() function, to help with moving some structure members from phy_device. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* staging: netlogic: Do not use multiple blank lines.Burcin Akalin2015-10-241-1/+0
| | | | | | | | Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: xlr_net.h: fixed coding style warningsSakshi Bansal2015-10-161-1/+2
| | | | | | | Fixed block comments usage of * on subsequent lines Signed-off-by: Sakshi Bansal <sakshi.april5@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Remove unnecessary externsJoe Perches2015-08-141-1/+1
| | | | | | | Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: netlogic: Replace comma with a semicolonShraddha Barke2015-08-051-1/+1
| | | | | | | | | | | | | | | | Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: allocate right size in devm_kzallocRavindran, Madhusudhanan (M.)2015-03-201-1/+1
| | | | | | | | | | | sizeof when applied to a pointer typed expression gives the size of the pointer. The semantic patch that makes this change is available in scripts/coccinelle/misc/noderef.cocci. Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: NetLogic: Coding style correctiontolga ceylan2015-01-171-1/+1
| | | | | | | Misspelled comment corrected Signed-off-by: tolga ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* staging: netlogic: fix checkpatch.pl "LINE_SPACING" issusesSeeChen Ng2014-09-081-4/+1
| | | | | | | | | Follow the checkpatch.pl "LINE_SPACING" indication: 1. Insert a blank line after function declaration. 2. Remove multiple blank lines. Signed-off-by: SeeChen Ng <seechen81@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix checkpatch.pl warningRamon Fried2014-09-021-3/+1
| | | | | | | | | | | | This patch fixes the following checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message #116: FILE: ./xlr_net.c:116: + if (!skb) { + pr_err("SKB allocation failed\n"); Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: netlogic: xlr_net.c Fixed code-style warningsChaitanya Hazarey2014-08-301-0/+1
| | | | | | | | | Fixed the following warning generated by checkpatch.pl: WARNING: Missing a blank line after declarations Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: Netlogic: Move all the netdev under single parent deviceGanesan Ramalingam2014-08-305-232/+283
| | | | | | | | | | XLR has one network controller and XLS has two network controllers, each controller has 4 gmac devices. This patch initializes each controller as a parent device and the four gmac devices of a controller are connected to the parent controller as a child Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: Netlogic: PHY address calculation fixGanesan Ramalingam2014-08-301-1/+1
| | | | | | | SGMII PHY address calculation should be based on phy_addr of priv data Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: Netlogic: Add nlm_cop2_enable/restore function name changeGanesan Ramalingam2014-08-301-4/+4
| | | | | | | | | | | | The function name nlm_cop2_enable() and nlm_cop2_restore() in file "netlogic/xlr/fmn.c" has been renamed to nlm_cop2_enable_irqsave and nlm_cop2_disable_irqrestore respectively in commit "64f6ebe MIPS: Netlogic: rename nlm_cop2_save/restore". This patch takes care of these changes Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: coding style fixupMostyn Bramley-Moore2014-07-271-1/+0
| | | | | | | | Remove unnecessary return at end of a void function. Part of the eudyptula challenge: http://eudyptula-challenge.org/ Signed-off-by: Mostyn Bramley-Moore <mbmcode@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2014-06-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking updates from David Miller: 1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov. 2) Multiqueue support in xen-netback and xen-netfront, from Andrew J Benniston. 3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn Mork. 4) BPF now has a "random" opcode, from Chema Gonzalez. 5) Add more BPF documentation and improve test framework, from Daniel Borkmann. 6) Support TCP fastopen over ipv6, from Daniel Lee. 7) Add software TSO helper functions and use them to support software TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia. 8) Support software TSO in fec driver too, from Nimrod Andy. 9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli. 10) Handle broadcasts more gracefully over macvlan when there are large numbers of interfaces configured, from Herbert Xu. 11) Allow more control over fwmark used for non-socket based responses, from Lorenzo Colitti. 12) Do TCP congestion window limiting based upon measurements, from Neal Cardwell. 13) Support busy polling in SCTP, from Neal Horman. 14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru. 15) Bridge promisc mode handling improvements from Vlad Yasevich. 16) Don't use inetpeer entries to implement ID generation any more, it performs poorly, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits) rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 tcp: fixing TLP's FIN recovery net: fec: Add software TSO support net: fec: Add Scatter/gather support net: fec: Increase buffer descriptor entry number net: fec: Factorize feature setting net: fec: Enable IP header hardware checksum net: fec: Factorize the .xmit transmit function bridge: fix compile error when compiling without IPv6 support bridge: fix smatch warning / potential null pointer dereference via-rhine: fix full-duplex with autoneg disable bnx2x: Enlarge the dorq threshold for VFs bnx2x: Check for UNDI in uncommon branch bnx2x: Fix 1G-baseT link bnx2x: Fix link for KR with swapped polarity lane sctp: Fix sk_ack_backlog wrap-around problem net/core: Add VF link state control policy net/fsl: xgmac_mdio is dependent on OF_MDIO net/fsl: Make xgmac_mdio read error message useful net_sched: drr: warn when qdisc is not work conserving ...
| * net: get rid of SET_ETHTOOL_OPSWilfried Klaebe2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | staging: netlogic: fix missing a blank line after declarationsToby Smith2014-04-251-0/+1
|/ | | | | | | Fix checkpatch.pl issues with missing blank line after declarations. Signed-off-by: Toby Smith <toby@tismith.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging:netlogic: Correct double assignment in xlr_net.cIulia Manda2014-03-081-2/+0
| | | | | | | | | This patch removes an unnecessary assignment of variable val. I have used a coccinelle semantic patch(da.cocci) in order to find this issue. Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:netlogic: Shorten line to 80 charactersHimangi Saraogi2014-03-071-1/+2
| | | | | | | | This patch fixes the checkpatch.pl warning: line over 80 charcters. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds2014-02-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking fixes from David Miller: 1) kvaser CAN driver has fixed limits of some of it's table, validate that we won't exceed those limits at probe time. Fix from Olivier Sobrie. 2) Fix rtl8192ce disabling interrupts for too long, from Olivier Langlois. 3) Fix botched shift in ath5k driver, from Dan Carpenter. 4) Fix corruption of deferred packets in TIPC, from Erik Hugne. 5) Fix newlink error path in macvlan driver, from Cong Wang. 6) Fix netpoll deadlock in bonding, from Ding Tianhong. 7) Handle GSO packets properly in forwarding path when fragmentation is necessary on egress, from Florian Westphal. 8) Fix axienet build errors, from Michal Simek. 9) Fix refcounting of ubufs on tx in vhost net driver, from Michael S Tsirkin. 10) Carrier status isn't set properly in hyperv driver, from Haiyang Zhang. 11) Missing pci_disable_device() in tulip_remove_one), from Ingo Molnar. 12) AF_PACKET qdisc bypass mode doesn't adhere to driver provided TX queue selection method. Add a fallback method mechanism to fix this bug, from Daniel Borkmann. 13) Fix regression in link local route handling on GRE tunnels, from Nicolas Dichtel. 14) Bonding can assign dup aggregator IDs in some sequences of configuration, fix by making the allocation counter per-bond instead of global. From Jiri Bohac. 15) sctp_connectx() needs compat translations, from Daniel Borkmann. 16) Fix of_mdio PHY interrupt parsing, from Ben Dooks * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits) MAINTAINERS: add entry for the PHY library of_mdio: fix phy interrupt passing net: ethernet: update dependency and help text of mvneta NET: fec: only enable napi if we are successful af_packet: remove a stray tab in packet_set_ring() net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode ipv4: fix counter in_slow_tot irtty-sir.c: Do not set_termios() on irtty_close() bonding: 802.3ad: make aggregator_identifier bond-private usbnet: remove generic hard_header_len check gre: add link local route when local addr is any batman-adv: fix potential kernel paging error for unicast transmissions batman-adv: avoid double free when orig_node initialization fails batman-adv: free skb on TVLV parsing success batman-adv: fix TT CRC computation by ensuring byte order batman-adv: fix potential orig_node reference leak batman-adv: avoid potential race condition when adding a new neighbour batman-adv: properly check pskb_may_pull return value batman-adv: release vlan object after checking the CRC batman-adv: fix TT-TVLV parsing on OGM reception ...
| * netdevice: add queue selection fallback handler for ndo_select_queueDaniel Borkmann2014-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new argument for ndo_select_queue() callback that passes a fallback handler. This gets invoked through netdev_pick_tx(); fallback handler is currently __netdev_pick_tx() as most drivers invoke this function within their customized implementation in case for skbs that don't need any special handling. This fallback handler can then be replaced on other call-sites with different queue selection methods (e.g. in packet sockets, pktgen etc). This also has the nice side-effect that __netdev_pick_tx() is then only invoked from netdev_pick_tx() and export of that function to modules can be undone. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | xlr_net: Fix missing trivial allocation checkAlan Cox2014-02-071-0/+5
|/ | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net: core: explicitly select a txq before doing l2 forwardingJason Wang2014-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The will cause several issues: - NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan instead of lower device which misses the necessary txq synchronization for lower device such as txq stopping or frozen required by dev watchdog or control path. - dev_hard_start_xmit() was called with NULL txq which bypasses the net device watchdog. - dev_hard_start_xmit() does not check txq everywhere which will lead a crash when tso is disabled for lower device. Fix this by explicitly introducing a new param for .ndo_select_queue() for just selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also extended to accept this parameter and dev_queue_xmit_accel() was used to do l2 forwarding transmission. With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of dev_queue_xmit() to do the transmission. In the future, it was also required for macvtap l2 forwarding support since it provides a necessary synchronization method. Cc: John Fastabend <john.r.fastabend@intel.com> Cc: Neil Horman <nhorman@tuxdriver.com> Cc: e1000-devel@lists.sourceforge.net Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* staging:netlogic:Fixes commenting style in xlr_net.cArchana kumari2013-10-151-12/+22
| | | | | | | | Fixes commenting style in xlr_net.c mentioned in drivers:staging:netlogic:TODO file Signed-off-by: Archana kumari <archanakumari959@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: netlogic.h: removed WARNING: extern prototypes should be ↵Avinash kumar2013-09-251-1/+1
| | | | | | | | | avoided in .h files removed checpatch warning : WARNING: extern prototypes should be avoided in .h files Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix typo in staging/netlogicMasanari Iida2013-06-241-1/+1
| | | | | | | Correct spelling typo in printk. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: netlogic: fix missing free_netdev() on error in xlr_net_probe()Wei Yongjun2013-06-191-3/+2
| | | | | | | | Fix missing free_netdev() before return from function xlr_net_probe() in the devm_ioremap_resource() error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: netlogic: Convert to use devm_ioremap_resourceTushar Behera2013-06-111-4/+4
| | | | | | | | | | | Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()") introduced devm_ioremap_resource() and deprecated the use of devm_request_and_ioremap(). Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: devel@driverdev.osuosl.org CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: netlogic: remove unused variable in xlr_net_start_xmit()Wei Yongjun2013-03-141-2/+0
| | | | | | | | The variable 'qmap' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: Netlogic XLR/XLS GMAC driverGanesan Ramalingam2013-03-117-0/+2504
Add support for the Network Accelerator Engine on Netlogic XLR/XLS MIPS SoCs. The XLR/XLS NAE blocks can be configured as one 10G interface or four 1G interfaces. This driver supports blocks with 1G ports. Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud