- 04 6月, 2015 7 次提交
-
-
由 Rasmus Villemoes 提交于
Currently, two of the branches are dead code, since an earlier smaller substring would have been found ("TP" in the "TP_NW" case and either of "BNC" and "AUI" in the "BNC_AUI" case). Rearrange the strstr() calls so that the longer strings are searched for first. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Carol Soto 提交于
fix typo in mlx4_set_vf_mac Acked-by: NOr Gerlitz <ogerlitz@mellanox.com> Signed-off-by: NCarol L Soto <clsoto@linux.vnet.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Carol Soto 提交于
If mlx4_enable_sriov is called by adapter without this feature MLX4_DEV_CAP_FLAG2_SYS_EQS then during this path the function alloc icm is called twice without freeing the structures from the first time. Acked-by: NOr Gerlitz <ogerlitz@mellanox.com> Signed-off-by: NCarol L Soto <clsoto@linux.vnet.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Carol L Soto 提交于
If user loads mlx4_core with num_vfs greater than supported then variable dev->dev_vfs is freed 2 times after unloading the driver. Acked-by: NOr Gerlitz <ogerlitz@mellanox.com> Signed-off-by: NCarol L Soto <clsoto@linux.vnet.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David Malcolm 提交于
This code in drivers/net/ethernet/dec/tulip/uli526x.c function "uli526x_timer": 1086 } else 1087 if ((tmp_cr12 & 0x3) && db->link_failed) { [...snip...] 1109 } 1110 else if(!(tmp_cr12 & 0x3) && db->link_failed) 1111 { [...snip...] 1117 } 1118 db->init=0; is misleadingly indented: the db->init=0 is indented as if part of the else clause at line 1086, but it is independent of it (no braces before the "if" at line 1087). This patch fixes the indentation to reflect the actual meaning of the code, though is it actually meant to be part of the "else" clause? (I'm a compiler developer, not a kernel person). It also adds spaces around the assignment, to placate checkpatch.pl. Seen via an experimental new gcc warning I'm working on for gcc 6, -Wmisleading-indentation, using gcc r223098 adding -Werror=misleading-indentation to KBUILD_CFLAGS in Makefile. The experimental GCC emits this warning (as an error), rightly IMHO: drivers/net/ethernet/dec/tulip/uli526x.c: In function ‘uli526x_timer’: drivers/net/ethernet/dec/tulip/uli526x.c:1118:3: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] db->init=0; ^ drivers/net/ethernet/dec/tulip/uli526x.c:1086:4: note: ...this ‘else’ clause, but it is not } else ^ Hope this is helpful Dave Signed-off-by: NDavid Malcolm <dmalcolm@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Antonio Murdaca 提交于
use the time_after_eq macro for jiffies comparison operation Signed-off-by: NAntonio Murdaca <antonio.murdaca@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Or Gerlitz 提交于
When CONFIG_RFS_ACCEL or SMP aren't set, we fail to build, fix it. Also, avoid build warning as of unused function on that setup. Fixes: c66fa19c ('net/mlx4: Add EQ pool') Reported-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NMatan Barak <matanb@mellanox.com> Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 03 6月, 2015 33 次提交
-
-
由 Yanir Lubetkin 提交于
Bump the version to reflect the driver changes and bug fixes for i219. Also update the copyright, while we are at it. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
System would hang during execution of "ethtool -t <NIC>" for the same reason that required flushing the descriptor rings. This fix disables MULR for the loopback test to avoid the hang state. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
Two issues involving systim were reported. 1. Clock is not running in the correct frequency 2. In some situations, systim values were not incremented linearly This patch fixes the hardware clock configuration and the spurious non-linear increment. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
This fix handles a hardware issue that prevented i219 from working in legacy interrupts mode (IntMode=0) Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
The indication that a descriptor ring flush is required was read from FEXTNVM7 by mistake. It should be read from the PCI config space. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
The condition under which the flush should occur was reversed. The fix should be applied before any HW reset (unless followed by bus reset) and before any power state transition from D0. If E1000_FEXTNVM7_NEED_DESCRING_FLUSH bit is set in FEXTNVM7 and TDLEN > 0 the Tx ring should be flushed. (fixes ~95% of the hang states). If the E1000_FEXTNVM7_NEED_DESCRING_FLUSH did not clear, we should also flush the RX ring. Bug was caught by Alexander Duyck during a code review when examining this fix. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
Fixes a warning that was reported by Yanjiang Jin <yanjiang.jin@windriver.com> by implementing the solution suggested by Alexander Duyck <alexander.h.duyck@redhat.com>. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
After testing various cases, the conclusion is that the fix MUST be executed BEFORE any event that the HW is reset or transition to D3. To fix that I moved the execution to the relevant places but per Alexander Duyck's review, ensure now that the DMA is valid and was not freed before manipulating the ring. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: NAaron Brown <aaron.f.brown@intel.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Yanir Lubetkin 提交于
Unit hang may occur if multiple descriptors are available in the rings during reset or runtime suspend. This state can be detected by testing bit 8 in the FEXTNVM7 register. If this bit is set and there are pending descriptors in one of the rings, we must flush them prior to reset. Same applies entering runtime suspend. Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com> Reviewed-by: NAlexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Daniel Pieczko 提交于
If any VF is assigned as the PF is unloaded, do not attempt to remove its vport or the vswitch. These will be removed if the driver binds to the PF again, as an entity reset occurs during probe. A 'force' flag is added to efx_ef10_pci_sriov_disable() to distinguish between disabling SR-IOV and driver unload. SR-IOV cannot be disabled if VFs are assigned to guests. If the PF driver is unloaded while VFs are assigned, the driver may try to bind to the VF again at a later point if the driver has been reloaded and the VF returns to the same domain as the PF. In this case, the PF will not have a VF data structure, so the VF can check this and drop out of probe early. In this case, efx->vf_count will be zero but VFs will be present. The user is advised to remove the VF and re-create it. The check at the beginning of efx_ef10_pci_sriov_disable() that efx->vf_count is non-zero is removed to allow SR-IOV to be disabled in this case. Also, if the PF driver is unloaded, it will disable SR-IOV to remove these unknown VFs. By not disabling bus-mastering if VFs are still assigned, the VF will continue to pass traffic after the PF has been removed. When using the max_vfs module parameter, if VFs are already present do not try to initialise any more. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
When the driver unloads, force the unbind and removal of any VFs in the host with the PF. The PF cannot remove vports and vswitches if they are still being used by a VF driver, and when unloading the sfc driver the removal order is not guaranteed, so the instruction from the PF to the VF to unbind enforces a suitable ordering so that vswitches and vports can be removed. As a result of this, manually unbinding the driver from a single PF will result in all of its VFs in the host also being removed. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
The ifenslave command to set up a bond runs in an atomic context, and it queries the stats on the devices that are being enslaved. A VF needs to make an MCDI call to update its stats, which is not allowed in atomic context. The releasing of the stats_lock is moved to the beginning of the VF stats update function so that in_interrupt() can be used; it must be taken again before returning from this function. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
The raw_mask array is not initialised, so it needs to be explicitly set to zero in the 'else' branch. If the EVB capability is not present, a port cannot have multiple functions so the per-port MAC stats are correct and should match the corresponding vadaptor stats, so this redundancy can be removed from the ethtool stats output. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
MC_CMD_MAC_STATS can be called on a function before a vadaptor has been created, as the kernel can call into this through ndo_get_stats/ndo_get_stats64. If MC_CMD_MAC_STATS is called before the DMA queues have been setup, so that a vadaptor has not been created yet, firmware will return ENOENT. This is expected, so suppress the MCDI error message in this case. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
The netdevice statistics (in /proc/net/dev) are per-function stats so they must use the vadaptor stats. Change the use of MAC stats to vadaptor stats, and remove any statistics that can only be measured per-port. All stats that are removed will be shown as zeroes when these statistics are displayed. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
Firmware does not support a periodic DMA of vadaptor-stats on VFs, so only update the stats buffer when stats are requested (when running "ethtool -S" or an ip/ifconfig command that reports stats). Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
All interfaces will display vadaptor statistics, so set all the relevant bits in the stats bitmask. Only functions with the LINKCTRL flag will see other stats, including (per-port) MAC stats. The vadaptor stats are from rx_unicast to tx_overflow. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
The port-id must be known so that the RMON level can be set for the collection of vadapter stats. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Daniel Pieczko 提交于
The MAC stats are per-port and will only be displayed on the PF with control of the link (one per physical port). Vadapter stats will also be displayed for this PF, so distinguish the MAC stats by adding a prefix of "port_". Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Shradha Shah 提交于
Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Shradha Shah 提交于
On every adapter there will be one primary PF per adaptor and one link control PF per port. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Shradha Shah 提交于
This change is a stylistic change and does not affect functionality. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Shradha Shah 提交于
In the case where we have multiple functions (PFs and VFs), this sysfs entry is useful to identify the physical port corresponding to the function we are interested in. Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
GFP_KERNEL should be used in the thread context Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
This fixes a coccinelle warning: coccinelle warnings: (new ones prefixed by >>) >> drivers/net/ethernet/cavium/thunder/nicvf_queues.c:360:1-11: alloc >> with no test, possible model on line 367 vim +360 drivers/net/ethernet/cavium/thunder/nicvf_queues.c 354 err = nicvf_alloc_q_desc_mem(nic, &sq->dmem, q_len, SND_QUEUE_DESC_SIZE, 355 NICVF_SQ_BASE_ALIGN_BYTES); 356 if (err) 357 return err; 358 359 sq->desc = sq->dmem.base; > 360 sq->skbuff = kcalloc(q_len, sizeof(u64), GFP_ATOMIC); 361 sq->head = 0; 362 sq->tail = 0; 363 atomic_set(&sq->free_cnt, q_len - 1); 364 sq->thresh = SND_QUEUE_THRESH; 365 366 /* Preallocate memory for TSO segment's header */ > 367 sq->tso_hdrs = dma_alloc_coherent(&nic->pdev->dev, 368 q_len * TSO_HEADER_SIZE, 369 &sq->tso_hdrs_phys, GFP_KERNEL); 370 if (!sq->tso_hdrs) Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
No need to cast void* to u8*: pointer arithmetics works same way for both. Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
This fixes a copypaste bug that was discovered by a static analysis tool: The patch 4863dea3: "net: Adding support for Cavium ThunderX network controller" from May 26, 2015, leads to the following static checker warning: drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c:517 nicvf_set_rxfh() warn: we tested 'hkey' before and it was 'false' drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c 506 /* We do not allow change in unsupported parameters */ 507 if (hkey || ^^^^ We return here. 508 (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)) 509 return -EOPNOTSUPP; 510 511 rss->enable = true; 512 if (indir) { 513 for (idx = 0; idx < rss->rss_size; idx++) 514 rss->ind_tbl[idx] = indir[idx]; 515 } 516 517 if (hkey) { ^^^^ So this is dead code. 518 memcpy(rss->key, hkey, RSS_HASH_KEY_SIZE * sizeof(u64)); 519 nicvf_set_rss_key(nic); 520 } 521 522 nicvf_config_rss(nic); 523 return 0; 524 } regards, dan carpenter Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
This fixes sparse messages like this: drivers/net/ethernet/cavium/thunder/nicvf_main.c:1141:26: sparse: symbol 'nicvf_get_stats64' was not declared. Should it be static? Also remove unused declarations Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
They were left from development stage Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
This fixes sparse message: drivers/net/ethernet/cavium/thunder/nicvf_main.c:385:40: sparse: cast to restricted __le64 Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
This fixes sparse message: drivers/net/ethernet/cavium/thunder/nicvf_main.c:153:25: sparse: cast to restricted __le64 Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Aleksey Makarov 提交于
This fixes sparse messages like this: drivers/net/ethernet/cavium/thunder/thunder_bgx.c:897:24: sparse: constant 0x300000000000 is so big it is long Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-