History log of /drivers/net/ethernet/myricom/myri10ge/myri10ge.c
Revision Date Author Comments
10545937e866ccdbb7ab583031dbdcc6b14e4eb4 12-Aug-2014 Stanislaw Gruszka <sgruszka@redhat.com> myri10ge: check for DMA mapping errors

On IOMMU systems DMA mapping can fail, we need to check for
that possibility.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1 08-Aug-2014 Benoit Taine <benoit.taine@lip6.fr> PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use

We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines. This issue was reported by checkpatch.

A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):

// <smpl>

@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@

- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;

// </smpl>

[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
8dff81e87d5c2867d7401f8ee7b1eb3e3aa2ba8d 11-Aug-2014 Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> net: ethernet: myricom: myri10ge: myri10ge.c: Cleaning up missing null-terminate after strncpy call

Added a guaranteed null-terminate after call to strncpy.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
7ad24ea4bf620a32631d7b3069c3e30c078b0c3e 11-May-2014 Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> net: get rid of SET_ETHTOOL_OPS

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>
0729cc0c5e7f5a11a10be37d550f8cff8ffc0cbd 18-Feb-2014 Alexander Gordeev <agordeev@redhat.com> myri10ge: Use pci_enable_msix_range() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Hyong-Youb Kim <hykim@myri.com>
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
ecb22e11c10478502c142a2299d7c8353527da0b 21-Oct-2013 Jingoo Han <jg1.han@samsung.com> net: myri10ge: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
de36cef3e76e6e912f311759d7849bc6e81882cf 02-Oct-2013 Peter Senna Tschudin <peter.senna@gmail.com> net: myri10ge: Change variable type to bool

There is the rc variable on both myri10ge_ss_lock_napi and
myri10ge_ss_lock_poll functions. In both cases rc is only assigned the
values true and false. Both functions already return bool. Change rc
type to bool.

The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):

@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
d458cdf712e0c671e8e819abb16ecd6e44f9daec 02-Oct-2013 Joe Perches <joe@perches.com> net:drivers/net: Miscellaneous conversions to ETH_ALEN

Convert the memset/memcpy uses of 6 to ETH_ALEN
where appropriate.

Also convert some struct definitions and u8 array
declarations of [6] to ETH_ALEN.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ede23fa8161c1a04aa1b3bf5447812ca14b3fef1 27-Aug-2013 Joe Perches <joe@perches.com> drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

__GFP_ZERO is an uncommon flag and perhaps is better
not used. static inline dma_zalloc_coherent exists
so convert the uses of dma_alloc_coherent with __GFP_ZERO
to the more common kernel style with zalloc.

Remove memset from the static inline dma_zalloc_coherent
and add just one use of __GFP_ZERO instead.

Trivially reduces the size of the existing uses of
dma_zalloc_coherent.

Realign arguments as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
0dde80268ee0a5a1511935bdb9c547191d616aa9 19-Aug-2013 Hyong-Youb Kim <hykim@myri.com> myri10ge: Add support for ndo_busy_poll

Add the ndo_busy_poll handler. Use skb_mark_napi_id to mark receive
packets with the napi id. For each slice, use per-slice spinlock and
state variable to ensure that only one handler processes receive
pacekts.

Locking, statistics counters, and the ndo_busy_poll handler follow
those in the ixgbe driver. So, credit goes to that driver's authors.

Signed-off-by: Hyong-Youb Kim <hykim@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
40b295625053954f69d6840d59f2b4d8be251ed3 08-Aug-2013 Yijing Wang <wangyijing@huawei.com> myri10ge: clean up unnecessary MSI/MSI-X capability find

PCI core will initialize device MSI/MSI-X capability in
pci_msi_init_pci_dev(). So device driver should use
pci_dev->msi_cap/msix_cap to determine whether the device
support MSI/MSI-X instead of using
pci_find_capability(pci_dev, PCI_CAP_ID_MSI/MSIX).
Access to PCIe device config space again will consume more time.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Andrew Gallatin <gallatin@myri.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
1409a93274bb1b17f0b7a0b255a75e80899eec11 02-Aug-2013 Joe Perches <joe@perches.com> ethernet: Convert mac address uses of 6 to ETH_ALEN

Use the normal #define to help grep find mac addresses
and ensure that addresses are aligned.

pasemi.h has an unaligned access to mac_addr, unchanged
for now.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Olof Johansson <olof@lixom.net> # pasemi_mac pieces
Signed-off-by: David S. Miller <davem@davemloft.net>
1ca01512a2a95aa061c3fc24b7c5d7fad9f606bf 27-Jun-2013 Yijing Wang <wangyijing@huawei.com> net/trivial: replace numeric with standard PM state macros

Use standard PM state macros PCI_Dx instead of numeric 0/1/2..

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
86a9bad3ab6b6f858fd4443b48738cabbb6d094c 19-Apr-2013 Patrick McHardy <kaber@trash.net> net: vlan: add protocol argument to packet tagging functions

Add a protocol argument to the VLAN packet tagging functions. In case of HW
tagging, we need that protocol available in the ndo_start_xmit functions,
so it is stored in a new field in the skb. The new field fits into a hole
(on 64 bit) and doesn't increase the sks's size.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
f646968f8f7c624587de729115d802372b9063dd 19-Apr-2013 Patrick McHardy <kaber@trash.net> net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*

Rename the hardware VLAN acceleration features to include "CTAG" to indicate
that they only support CTAGs. Follow up patches will introduce 802.1ad
server provider tagging (STAGs) and require the distinction for hardware not
supporting acclerating both.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
1f9061d27d3d2028805549c4a306324a48209057 15-Mar-2013 Joe Perches <joe@perches.com> drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)

Reduce the number of calls required to alloc
a zeroed block of memory.

Trivially reduces overall object size.

Other changes around these removals
o Neaten call argument alignment
o Remove an unnecessary OOM message after dma_alloc_coherent failure
o Remove unnecessary gfp_t stack variable

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
b2adaca92c63b9bb8beb021d554f656e387a7648 03-Feb-2013 Joe Perches <joe@perches.com> ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups

alloc failures already get standardized OOM
messages and a dump_stack.

Convert kzalloc's with multiplies to kcalloc.
Convert kmalloc's with multiplies to kmalloc_array.
Fix a few whitespace defects.
Convert a constant 6 to ETH_ALEN.
Use parentheses around sizeof.
Convert vmalloc/memset to vzalloc.
Remove now unused size variables.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
59e955edb763375f8211c009c628ca37f1bc46c0 04-Dec-2012 Andrew Gallatin <gallatin@myri.com> myri10ge: fix most sparse warnings

- convert remaining htonl/ntohl +__raw_read/__raw_writel to
swab32 + readl/writel
- add missing __iomem qualifier in myri10ge_open()
- fix dubious: x & !y warning by switching from logical to bitwise not

The swab32 conversion fixes a bug in myri10ge_led() where
big-endian machines would write the wrong pattern.

The only remaining warning (lock context imbalance) is due to
the use of __netif_tx_trylock(), and cannot easily be fixed.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
30828d2b6070f1a4c71f26da75cda4bcdabfca02 30-Nov-2012 Andrew Gallatin <gallatin@myri.com> myri10ge: fix incorrect use of ntohs()

1b4c44e6369dbbafd113f1e00b406f1eda5ab5b2 incorrectly used
ntohs() rather than htons() in myri10ge_vlan_rx().

Thanks to Fengguang Wu, Yuanhan Liu's kernel-build tester
for pointing out this bug.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1b4c44e6369dbbafd113f1e00b406f1eda5ab5b2 30-Nov-2012 Andrew Gallatin <gallatin@myri.com> myri10ge: Add vlan rx for better GRO perf.

Unlike LRO, GRO requires that vlan tags be removed before
aggregation can occur. Since the myri10ge NIC does not support
hardware vlan tag offload, we must remove the tag in the driver
to achieve performance comparable to LRO for vlan tagged frames.

Thanks to Eric Duzamet for his help simplifying the original patch.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4ca3221fe4b6c4c6c77352672942e8afa57d55e5 30-Nov-2012 Andrew Gallatin <gallatin@myri.com> myri10ge: Convert from LRO to GRO

Convert myri10ge from LRO to GRO, and simplify the driver by removing
various LRO-related code which is no longer needed including
ndo_fix_features op, custom skb building from frags, and LRO
header parsing.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9503e255763da2e6b5b0d0d9dfa104e1ca8d035a 24-Jul-2012 Jiang Liu <jiang.liu@huawei.com> myri10ge: Use PCI Express Capability accessors

Use PCI Express Capability access functions to simplify myri10ge driver.

[bhelgaas: fix myri10ge_toggle_relaxed() return value]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
98f2d21f90278856b33e965d1d4bb756754e70f3 01-Jul-2012 Yuval Mintz <yuvalmin@broadcom.com> myri10ge: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Cc: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
a74254588754bf7bc5c60f2bcc9ee5f66b749ea2 23-Mar-2012 Francois Romieu <romieu@fr.zoreil.com> myri10ge: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <mason@myri.com>
Acked-by: Andrew Gallatin <gallatin@myri.com>
41de8d4cff21a2e81e3d9ff66f5f7c903f9c3ab1 29-Jan-2012 Joe Perches <joe@perches.com> drivers/net: Remove alloc_etherdev error messages

alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
c8f44affb7244f2ac3e703cab13d55ede27621bb 15-Nov-2011 Michał Mirosław <mirq-linux@rere.qmqm.pl> net: introduce and use netdev_features_t for device features sets

v2: add couple missing conversions in drivers
split unexporting netdev_fix_features()
implemented %pNF
convert sock::sk_route_(no?)caps

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
924a4c7d2e962b4e6a8e9ab3aabfd2bb29e5ada9 20-Oct-2011 Eric Dumazet <eric.dumazet@gmail.com> myri10ge: fix truesize underestimation

skb->truesize must account for allocated memory, not the used part of
it. Doing this work is important to avoid unexpected OOM situations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jon Mason <mason@myri.com>
Acked-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9e903e085262ffbf1fc44a17ac06058aca03524a 18-Oct-2011 Eric Dumazet <eric.dumazet@gmail.com> net: add skb frag size accessors

To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.

Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5d6bcdfe38ce883946aebf751a64695471ce1ab5 06-Oct-2011 Ian Campbell <ian.campbell@citrix.com> net: use DMA_x_DEVICE and dma_mapping_error with skb_frag_dma_map

When I converted some drivers from pci_map_page to skb_frag_dma_map I
neglected to convert PCI_DMA_xDEVICE into DMA_x_DEVICE and
pci_dma_mapping_error into dma_mapping_error.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5dc3e196ea21e833128d51eb5b788a070fea1f28 05-Oct-2011 Ian Campbell <Ian.Campbell@citrix.com> myri10ge: convert to SKB paged frag API.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jon Mason <mason@myri.com>
Cc: Andrew Gallatin <gallatin@myri.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
afc4b13df143122f99a0eb10bfefb216c2806de0 16-Aug-2011 Jiri Pirko <jpirko@redhat.com> net: remove use of ndo_set_multicast_list in drivers

replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
93f7848b77bcf1108879defd32612422ae80d785 13-May-2011 Jeff Kirsher <jeffrey.t.kirsher@intel.com> myri*: Move the Myricom drivers

Move the Myricom drivers into drivers/net/ethernet/myricom/ and make
the necessary Kconfig and Makefile changes.

CC: Andrew Gallatin <gallatin@myri.com>
CC: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>