summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
Commit message (Collapse)AuthorAgeFilesLines
* net: rename vlan_tx_* helpers since "tx" is misleading thereJiri Pirko2015-01-1347-112/+115
| | | | | | | The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* sunvnet: fix rx packet length check to allow for TSODavid L Stevens2015-01-131-1/+6
| | | | | | | | | | | | This patch fixes the rx packet length check in the sunvnet driver to allow for a TSO max packet length greater than the LDC channel negotiated MTU. These are negotiated separately and there is no requirement that port->tsolen be less than port->rmtu, but if it isn't, it'll drop packets with rx length errors. Signed-off-by: David L Stevens <david.stevens@oracle.com> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlx5: avoid build warnings on 32-bitArnd Bergmann2015-01-131-3/+3
| | | | | | | | | | | | | | The mlx5 driver passes a string pointer in through a 'u64' variable, which on 32-bit machines causes a build warning: drivers/net/ethernet/mellanox/mlx5/core/debugfs.c: In function 'qp_read_field': drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] The code is in fact safe, so we can shut up the warning by adding extra type casts. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: fix harmless warning on 32-bit machinesArnd Bergmann2015-01-131-2/+2
| | | | | | | | | | | | | | | | | | | The rocker driver tries to assign a pointer to a 64-bit integer and then back to a pointer. This is safe on all architectures, but causes a compiler warning when pointers are shorter than 64-bit: rocker/rocker.c: In function 'rocker_desc_cookie_ptr_get': rocker/rocker.c:809:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] return (void *) desc_info->desc->cookie; ^ This adds another cast to uintptr_t to tell the compiler that it's safe. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Ripping out old hard-wired initialization code in driverHariprasad Shenai2015-01-132-520/+58Star
| | | | | | | | Removing old hard-wired initialization code in the driver, which is no longer used. Also deprecating few module parameters. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fsl: replace (1 << x) with BIT(x) for bit definitions in xgmac_mdioShaohui Xie2015-01-131-7/+7
| | | | | Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/fsl: fix a bug in xgmac_mdioShaohui Xie2015-01-131-1/+1
| | | | | | | | There is a bug in xgmac_mdio_read when clear the bit MDIO_STAT_ENC, which '&' is missed in 'mdio_stat &= ~MDIO_STAT_ENC'. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* i40e: limit sriov to partition 1 of NPAR configurationsShannon Nelson2015-01-131-1/+1
| | | | | | | | | | | | Make sure we only allow SR/IOV on the master PF of a port in multifunction mode. This should be the case anyway based on the num_vfs configured in the NVM, but this will help make sure there's no question. If we're not in multifunction mode the partition_id will always be 1. Change-ID: I8b2592366fe6782f15301bde2ebd1d4da240109d Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Don't exit link event early if link speed has changedCatherine Sullivan2015-01-131-0/+4
| | | | | | | | | | | Previously we were only checking if the link up state had changed, and if it hadn't exiting the link event routine early. We should also check if speed has changed, and if it has, stay and finish processing the link event. Change-ID: I9c8e0991b3f0279108a7858898c3c5ce0a9856b8 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: limit WoL and link settings to partition 1Shannon Nelson2015-01-131-1/+42
| | | | | | | | | When in multi-function mode, e.g. Dell's NPAR, only partition 1 of each MAC is allowed to set WoL, speed, and flow control. Change-ID: I87a9debc7479361c55a71f0120294ea319f23588 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Adding function for reading PBA StringKamil Krawczyk2015-01-133-0/+63
| | | | | | | | Function will read PBA Block from Shadow RAM and return it in a string format. Change-ID: I4ee7059f6e21bd0eba38687da15e772e0b4ab36e Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: find partition_id in npar modeShannon Nelson2015-01-134-2/+81
| | | | | | | | | | | | When in NPAR mode the driver instance might be controlling the base partition or one of the other "fake" PFs. There are some things that can only be done by the base partition, aka partition_id 1. This code does a bit of work to find how many partitions are there per port and what is the current partition_id. Change-ID: Iba427f020a1983d02147d86f121b3627e20ee21d Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: remove VN2VN related mac filtersVasu Dev2015-01-131-2/+0Star
| | | | | | | | | These mac address already added by FCoE stack above netdev, therefore adding them here is redundant. Change-ID: Ia5b59f426f57efd20f8945f7c6cc5d741fbe06e5 Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Add warning for NPAR partitions with link speed less than 10GbpsGreg Rose2015-01-131-0/+9
| | | | | | | | | NPAR enabled partitions should warn the user when detected link speed is less than 10Gpbs. Change-ID: I7728bb8ce279bf0f4f755d78d7071074a4eb5f69 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: kick a stalled admin queueMitch A Williams2015-01-132-1/+9
| | | | | | | | | | | | | | | | On some versions of the firmware, the VF admin send queue may become stalled. In this case, the easiest solution is to just place another descriptor on the queue; the firmware will then process both requests. The early init code already accounts for this, but the runtime code does not. In the watchdog task, check for the stall condition, and if it's found, send our API version to the PF. When the PF replies, just ignore the reply. Change-ID: I380d78185a4f284d649c44d263e648afc9b4d50c Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: enable interrupt 0 appropriatelyMitch A Williams2015-01-131-8/+4Star
| | | | | | | | | | | | Don't enable vector 0 in the ISR, just schedule the adminq task and let it enable the vector. This prevents the task from being called reentrantly. Make sure that the vector is enabled on all exit paths of the adminq task, including error exits. Change-ID: I53f3d14f91ed7a9e90291ea41c681122a5eca5b5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: don't fire traffic IRQs when the interface is downMitch A Williams2015-01-131-4/+7
| | | | | | | | | | | | | | | | | | There is always a possibility that MSI-X interrupts can get lost. To keep this problem from stalling the driver, we fire all of our MSI-X vectors during the watchdog routine. However, we should not fire the traffic vectors when the interface is closed. In this case, just fire vector 0, which is used for admin queue events. As a result, we do not enable the interrupt cause for vector 0. This can cause the admin queue handler to be called reentrantly, which causes a scary "critical section violation" message to be logged, even though no real damage is done. Change-ID: Ic43a5184708ab2cb9a23fca7dedd808a46717795 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: remove leftover VLAN filtersMitch A Williams2015-01-131-0/+4
| | | | | | | | | | | | | If we're using VLANs and communications with the PF fail during shutdown, we will leak memory because not all of the VLAN filters will be removed. To eliminate this possibility, go through the list again right before the module is removed and delete any leftover entries. Change-ID: Id3b5315c47ca0a61ae123a96ff345d010bc41aed Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: refactor shutdown codeMitch A Williams2015-01-131-6/+23
| | | | | | | | | | | | | | | If the VF driver is running in the host, the shutdown code is completely broken. We cannot wait in our down routine for the PF to respond to our requests, as its admin queue task will never run while we hold the lock. Instead, we schedule operations, then let the watchdog take care of shutting things down. If the driver is being removed, then wait in the remove routine until the watchdog is done before continuing. Change-ID: I93a58d17389e8d6b58f21e430b56ed7b4590b2c5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: Remove some scary log messagesMitch A Williams2015-01-132-9/+1Star
| | | | | | | | | | | | | | | | | These messages may be triggered during normal init of the driver if the PF or FW take a long time to respond. There's nothing really wrong, so don't freak people out logging messages. If the communication channel really is dead, then we'll retry a few times and give up. This will log a different more scary message that should cause consternation. This allows the user to more easily detect a genuine failure. Change-ID: I6e2b758d4234a3a09c1015c82c8f2442a697cbdb Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40evf: remove redundant codeMitch A Williams2015-01-131-27/+0Star
| | | | | | | | | | | These functions are redundant and duplicate functionality found in i40evf_free_all_[tx|rx]_resources. Change-ID: Ia199908926d7a1a4b8247f75f89b5da24c9b149c Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: disable IOV before freeing resourcesMitch A Williams2015-01-131-2/+9
| | | | | | | | | | | | | | | | | If VF drivers are loaded in the host OS, the call to pci_disable_sriov() will cause these drivers' remove routines to be called. If the PF driver has already freed VF resources before this happens, then the VF remove routine can't properly communicate with the PF driver causing all sorts of mayhem and error messages and hurt feelings. To fix this, we move the call to pci_disable_sriov() up to the top of the function and let it complete before freeing any VF resources. Change-ID: I397c3997a00f6408e32b7735273911e499600236 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* net: bnx2x: avoid macro redefinitionDavid Decotigny2015-01-121-4/+0Star
| | | | | Signed-off-by: David Decotigny <decot@googlers.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iw_cxgb4/cxgb4/cxgb4vf/cxgb4i/csiostor: Cleanup register defines/macros ↵Hariprasad Shenai2015-01-126-71/+155
| | | | | | | | | | | related to all other cpl messages This patch cleanups all other macros/register define related to CPL messages that are defined in t4_msg.h and the affected files Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iw_cxgb4/cxgb4/cxgb4i: Cleanup register defines/MACROS related to CM CPL ↵Hariprasad Shenai2015-01-124-42/+138
| | | | | | | | | | | messages This patch cleanups all macros/register define related to connection management CPL messages that are defined in t4_msg.h and the affected files Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: move init/deinit from open/close to probe/removeIvan Vecera2015-01-121-14/+11Star
| | | | | | | | | | | | Move init and deinit of PTP support from open/close functions to probe/remove funcs to avoid removing/re-adding of associated PTP device(s) during ifup/ifdown. v2: tg3_ptp_init call moved to correct place (thx. Prashant) Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Prashant Sreedharan <prashant@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: eth: xgene: devm_ioremap() returns NULL on errorDan Carpenter2015-01-121-6/+6
| | | | | | | | | devm_ioremap() returns NULL on failure, it doesn't return an ERR_PTR. Fixes: de7b5b3d790a ('net: eth: xgene: change APM X-Gene SoC platform ethernet to support ACPI') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: dwmac-sti: Pass sysconfig register offset via syscon dt property.Peter Griffin2015-01-121-6/+7
| | | | | | | | | | | | | | | | Based on Arnds review comments here https://lkml.org/lkml/2014/11/13/161, we should not be mixing address spaces in the reg property like this driver currently does. This patch updates the driver, dt docs and also the existing dt nodes to pass the sysconfig offset in the syscon dt property. This patch breaks DT compatibility! But this platform is considered WIP, and is only used by a few developers who are upstreaming support for it. This change has been done as a single atomic commit to ensure it is bisectable. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8169: add support for xmit_moreFlorian Westphal2015-01-091-3/+9
| | | | | | | | Delay update of hw tail descriptor if we know that another skb is going to be sent. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add support for mps_tcam debugfsHariprasad Shenai2015-01-092-0/+191
| | | | | | | Debug log to get the MPS TCAM table Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add support for cim_qcfg entry in debugfsHariprasad Shenai2015-01-095-0/+164
| | | | | | | Adds debug log to get cim queue config Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add support for cim_la entry in debugfsHariprasad Shenai2015-01-096-2/+304
| | | | | | | | | | The CIM LA captures the embedded processor’s internal state. Optionally, it can also trace the flow of data in and out of the embedded processor. Therefore, the CIM LA output contains detailed information of what code the embedded processor executed prior to the CIM LA capture. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Add support for devlogHariprasad Shenai2015-01-095-0/+325
| | | | | | | Add support for device log entry in debugfs Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-01-0715-45/+47
|\
| * qla3xxx: don't allow never end busy loopAndy Shevchenko2015-01-061-5/+3Star
| | | | | | | | | | | | | | | | The counter variable wasn't increased at all which may stuck under certain circumstances. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: cpsw: fix hangs with interruptsFelipe Balbi2015-01-051-11/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CPSW IP implements pulse-signaled interrupts. Due to that we must write a correct, pre-defined value to the CPDMA_MACEOIVECTOR register so the controller generates a pulse on the correct IRQ line to signal the End Of Interrupt. The way the driver is written today, all four IRQ lines are requested using the same IRQ handler and, because of that, we could fall into situations where a TX IRQ fires but we tell the controller that we ended an RX IRQ (or vice-versa). This situation triggers an IRQ storm on the reserved IRQ 127 of INTC which will in turn call ack_bad_irq() which will, then, print a ton of: unexpected IRQ trap at vector 00 In order to fix the problem, we are moving all calls to cpdma_ctlr_eoi() inside the IRQ handler and making sure we *always* write the correct value to the CPDMA_MACEOIVECTOR register. Note that the algorithm assumes that IRQ numbers and value-to-be-written-to-EOI are proportional, meaning that a write of value 0 would trigger an EOI pulse for the RX_THRESHOLD Interrupt and that's the IRQ number sitting in the 0-th index of our irqs_table array. This, however, is safe at least for current implementations of CPSW so we will refrain from making the check smarter (and, as a side-effect, slower) until we actually have a platform where IRQ lines are swapped. This patch has been tested for several days with AM335x- and AM437x-based platforms. AM57x was left out because there are still pending patches to enable ethernet in mainline for that platform. A read of the TRM confirms the statement on previous paragraph. Reported-by: Yegor Yefremov <yegorslists@googlemail.com> Fixes: 510a1e7 (drivers: net: davinci_cpdma: acknowledge interrupt properly) Cc: <stable@vger.kernel.org> # v3.9+ Signed-off-by: Felipe Balbi <balbi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * enic: free all rq buffs when allocation failsGovindarajulu Varadarajan2015-01-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | When allocation of all RQs fail, we do not free previously allocated buffers, before returning error. This causes memory leak. This patch fixes this by calling vnic_rq_clean(), which frees all the rq buffers. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Altera TSE: Add missing phydevKostya Belezko2015-01-021-9/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Altera network device doesn't come up after ifconfig eth0 down ifconfig eth0 up The reason behind is clearing priv->phydev during tse_shutdown(). The phydev is not restored back at tse_open(). Resubmiting as to follow Tobias Klauser suggestion. phy_start/phy_stop are called on each ifup/ifdown and phy_disconnect is called once during the module removal. Signed-off-by: Kostya Belezko <bkostya@hotmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Fix error flow in mlx4_init_hca()Jack Morgenstein2015-01-021-9/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | We shouldn't call UNMAP_FA here, this is done in mlx4_load_one. If mlx4_query_func fails, we need to invoke CLOSE_HCA for both native and master. Fixes: a0eacca948d2 ('net/mlx4_core: Refactor mlx4_load_one') Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Correcly update the mtt's offset in the MR re-reg flowMaor Gottlieb2015-01-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, mlx4_mt_rereg_write filled the MPT's entity_size with the old MTT's page shift, which could result in using an incorrect offset. Fix the initialization to be after we calculate the new MTT offset. In addition, assign mtt order to -1 after calling mlx4_mtt_cleanup. This is necessary in order to mark the MTT as invalid and avoid freeing it later. Fixes: e630664 ('mlx4_core: Add helper functions to support MR re-registration') Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlcnic: Fix return value in qlcnic_probe()Yongjian Xu2015-01-011-0/+1
| | | | | | | | | | | | | | | | | | If the check of adapter fails and goes into the 'else' branch, the return value 'err' should not still be zero. Signed-off-by: Yongjian Xu <xuyongjiande@gmail.com> Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: axienet: fix error return codeJulia Lawall2015-01-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: sun4i-emac: fix error return codeJulia Lawall2015-01-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * myri10ge: fix error return codeJulia Lawall2015-01-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> The patch also modifies the test of mgp->cmd to satisfy checkpatch. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: Xilinx: fix error return codeJulia Lawall2015-01-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40e: Fix possible memory leak in i40e_dbg_dump_descJoe Perches2015-01-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't notice that return in the code, fix it by adding a goto out instead to free the memory. Fixes: > New smatch warnings: > drivers/net/ethernet/intel/i40e/i40e_debugfs.c:832 i40e_dbg_dump_desc() warn: possible memory leak of 'ring' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: Remove unneeded FIXMETodd Fujinaka2014-12-311-1/+1
| | | | | | | | | | | | | | | | | | Remove a FIXME comment that was missed in a commit on 1/2007. Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com> Reported-by: nick <xerofoify@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e100: fix typo in MDI/MDI-X eeprom check in e100_phy_initJohn W. Linville2014-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it doesn't explicitly say so, commit 60ffa478759f39a2 ("e100: Fix MDIO/MDIO-X") appears to be intended to revert the earlier commit 648951451e6d2d53 ("e100: fixed e100 MDI/MDI-X issues"). However, careful examination reveals that the attempted revert actually _inverted_ the test for eeprom_mdix_enabled. That is bound to program a few PHYs incorrectly... https://bugzilla.redhat.com/show_bug.cgi?id=1156417 Signed-off-by: "John W. Linville" <linville@tuxdriver.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | net: eth: xgene: change APM X-Gene SoC platform ethernet to support ACPIFeng Kan2015-01-063-44/+150
| | | | | | | | | | | | | | | | This adds support for APM X-Gene ethernet driver to use ACPI table to derive ethernet driver parameter. Signed-off-by: Feng Kan <fkan@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/fsl: Add mEMAC MDIO support to XGMAC MDIOAndy Fleming2015-01-062-12/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Freescale mEMAC supports operating at 10/100/1000/10G, and its associated MDIO controller is likewise capable of operating both Clause 22 and Clause 45 MDIO buses. It is nearly identical to the MDIO controller on the XGMAC, so we just modify that driver. Portions of this driver developed by: Sandeep Singh <sandeep@freescale.com> Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Andy Fleming <afleming@gmail.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>