]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agoqed*: Tx-switching configuration
Yuval Mintz [Wed, 11 May 2016 13:36:25 +0000 (16:36 +0300)]
qed*: Tx-switching configuration

Device should be configured by default to VEB once VFs are active.
This changes the configuration of both PFs' and VFs' vports into enabling
tx-switching once sriov is enabled.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: support ndo_get_vf_config
Yuval Mintz [Wed, 11 May 2016 13:36:24 +0000 (16:36 +0300)]
qed*: support ndo_get_vf_config

Allows the user to view the VF configuration by observing the PF's
device.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: IOV support spoof-checking
Yuval Mintz [Wed, 11 May 2016 13:36:23 +0000 (16:36 +0300)]
qed*: IOV support spoof-checking

Add support in `ndo_set_vf_spoofchk' for allowing PF control over
its VF spoof-checking configuration.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: IOV link control
Yuval Mintz [Wed, 11 May 2016 13:36:22 +0000 (16:36 +0300)]
qed*: IOV link control

This adds support in 2 ndo that allow PF to tweak the VF's view of the
link - `ndo_set_vf_link_state' to allow it a view independent of the PF's,
and `ndo_set_vf_rate' which would allow the PF to limit the VF speed.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: Support forced MAC
Yuval Mintz [Wed, 11 May 2016 13:36:21 +0000 (16:36 +0300)]
qed*: Support forced MAC

Allows the PF to enforce the VF's mac.
i.e., by using `ip link ... vf <x> mac <value>'.

While a MAC is forced, PF would prevent the VF from configuring any other
MAC.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: Support PVID configuration
Yuval Mintz [Wed, 11 May 2016 13:36:20 +0000 (16:36 +0300)]
qed*: Support PVID configuration

This adds support for PF control over the VF vlan configuration.
I.e., `ip link ... vf <x> vlan <vid>' should now be supported.

 1. <vid> != 0 => VF receives [unknowingly] only traffic tagged by
    <vid> and tags all outgoing traffic sent by VF with <vid>.
 2. <vid> == 0 ==> Remove the pvid configuration, reverting to previous.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add VF support
Yuval Mintz [Wed, 11 May 2016 13:36:19 +0000 (16:36 +0300)]
qede: Add VF support

Adding a PCI callback for `sriov_configure' and a new PCI device id for
the VF [+ Some minor changes to accomodate differences between PF and VF
at the qede].
Following this, VF creation should be possible and the entire subset of
existing PF functionality that's allow to VFs should be supported.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Align TLVs
Yuval Mintz [Wed, 11 May 2016 13:36:18 +0000 (16:36 +0300)]
qed: Align TLVs

As the VF infrastructure is supposed to offer backward/forward
compatibility, the various types associated with VF<->PF communication
should be aligned across all various platforms that support IOV
on our family of adapters.

This adds a couple of currently missing values, specifically aligning
the enum for the various TLVs possible in the communication between them.

It then adds the PF implementation for some of those missing VF requests.
This support isn't really necessary for the Linux VF as those VFs aren't
requiring it [at least today], but are required by VFs running on other
OSes. LRO is an example of one such configuration.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Bulletin and Link
Yuval Mintz [Wed, 11 May 2016 13:36:17 +0000 (16:36 +0300)]
qed: Bulletin and Link

Up to this point, VF and PF communication always originates from VF.
As a result, VF cannot be notified of any async changes, and specifically
cannot be informed of the current link state.

This introduces the bulletin board, the mechanism through which the PF
is going to communicate async notifications back to the VF. basically,
it's a well-defined structure agreed by both PF and VF which the VF would
continuously poll and into which the PF would DMA messages when needed.
[Bulletin board is actually allocated and communicated in previous patches
but never before used]

Based on the bulletin infrastructure, the VF can query its link status
and receive said async carrier changes.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: IOV l2 functionality
Yuval Mintz [Wed, 11 May 2016 13:36:16 +0000 (16:36 +0300)]
qed: IOV l2 functionality

This adds sufficient changes to allow VFs l2-configuration flows to work.

While the fastpath of the VF and the PF are meant to be exactly the same,
the configuration of the VF is done by the PF.
This diverges all VF-related configuration flows that originate from a VF,
making them pass through the VF->PF channel and adding sufficient logic
on the PF side to support them.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: IOV configure and FLR
Yuval Mintz [Wed, 11 May 2016 13:36:15 +0000 (16:36 +0300)]
qed: IOV configure and FLR

While previous patches have already added the necessary logic to probe
VFs as well as enabling them in the HW, this patch adds the ability to
support VF FLR & SRIOV disable.

It then wraps both flows together into the first IOV callback to be
provided to the protocol driver - `configure'. This would later to be used
to enable and disable SRIOV in the adapter.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Introduce VFs
Yuval Mintz [Wed, 11 May 2016 13:36:14 +0000 (16:36 +0300)]
qed: Introduce VFs

This adds the qed VFs for the first time -
The vfs are limited functions, with a very different PCI bar structure
[when compared with PFs] to better impose the related security demands
associated with them.

This patch includes the logic neccesary to allow VFs to successfully probe
[without actually adding the ability to enable iov].
This includes diverging all the flows that would occur as part of the pci
probe of the driver, preventing VF from accessing registers/memories it
can't and instead utilize the VF->PF channel to query the PF for needed
information.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add VF->PF channel infrastructure
Yuval Mintz [Wed, 11 May 2016 13:36:13 +0000 (16:36 +0300)]
qed: Add VF->PF channel infrastructure

Communication between VF and PF is based on a dedicated HW channel;
VF will prepare a messge, and by signaling the HW the PF would get a
notification of that message existance. The PF would then copy the
message, process it and DMA an answer back to the VF as a response.

The messages themselves are TLV-based - allowing easier backward/forward
compatibility.

This patch adds the infrastructure of the channel on the PF side -
starting with the arrival of the notification and ending with DMAing
the response back to the VF.

It also adds a dummy-response as reference, as it only lays the
groundwork of the communication; it doesn't really add support of any
actual messages.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add CONFIG_QED_SRIOV
Yuval Mintz [Wed, 11 May 2016 13:36:12 +0000 (16:36 +0300)]
qed: Add CONFIG_QED_SRIOV

Add support for a new Kconfig option for qed* driver which would allow
[eventually] the support in VFs.

This patch adds the necessary logic in the PF to learn about the possible
VFs it will have to support [Based on PCI configuration space and HW],
and prepare a database with an entry per-VF as infrastructure for future
interaction with said VFs.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: uninitialized variable in qede_start_xmit()
Dan Carpenter [Thu, 5 May 2016 13:21:30 +0000 (16:21 +0300)]
qede: uninitialized variable in qede_start_xmit()

"data_split" was never set to false.  It's just uninitialized.

Fixes: 2950219d87b0 ('qede: Add basic network device support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: prevent chip hang when increasing channels
Sudarsana Reddy Kalluru [Thu, 5 May 2016 04:35:16 +0000 (00:35 -0400)]
qede: prevent chip hang when increasing channels

qede requires qed to provide enough resources to accommodate 16 combined
channels, but that upper-bound isn't actually being enforced by it.
Instead, qed inform back to qede how many channels can be opened based on
available resources - but that calculation doesn't really take into account
the resources requested by qede; Instead it considers other FW/HW available
resources.

As a result, if a user would increase the number of channels to more than
16 [e.g., using ethtool] the chip would hang.

This change increments the resources requested by qede to 64 combined
channels instead of 16; This value is an upper bound on the possible
available channels [due to other FW/HW resources].

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Apply tunnel configurations after PF start
Manish Chopra [Mon, 2 May 2016 10:16:04 +0000 (06:16 -0400)]
qed: Apply tunnel configurations after PF start

Configure and enable various tunnels on the
adapter after PF start.

This change was missed as a part of
'commit 464f664501816ef5fbbc00b8de96f4ae5a1c9325
("qed: Add infrastructure support for tunneling")'

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <yuval.mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: add implementation for internal loopback test.
Sudarsana Reddy Kalluru [Fri, 29 Apr 2016 00:20:54 +0000 (20:20 -0400)]
qede: add implementation for internal loopback test.

This patch adds the qede implementation for internal loopback test.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: add support for selftests.
Sudarsana Reddy Kalluru [Fri, 29 Apr 2016 00:20:53 +0000 (20:20 -0400)]
qede: add support for selftests.

This patch adds the qede ethtool support for the following tests:
- interrupt test
- memory test
- register test
- clock test

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: add infrastructure for device self tests.
Sudarsana Reddy Kalluru [Fri, 29 Apr 2016 00:20:52 +0000 (20:20 -0400)]
qed: add infrastructure for device self tests.

This patch adds the functionality and APIs needed for selftests.
It adds the ability to configure the link-mode which is required for the
implementation of loopback tests. It adds the APIs for clock test,
register test, interrupt test and memory test.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add PF min bandwidth configuration support
Manish Chopra [Tue, 26 Apr 2016 14:56:10 +0000 (10:56 -0400)]
qed: Add PF min bandwidth configuration support

This patch adds support for PF minimum bandwidth update
or configuration notified by management firmware.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add PF max bandwidth configuration support
Manish Chopra [Tue, 26 Apr 2016 14:56:09 +0000 (10:56 -0400)]
qed: Add PF max bandwidth configuration support

This patch adds support for PF maximum bandwidth update
or configuration notified by management firmware.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add vport WFQ configuration APIs
Manish Chopra [Tue, 26 Apr 2016 14:56:08 +0000 (10:56 -0400)]
qed: Add vport WFQ configuration APIs

This patch adds relevant APIs needed to configure WFQ
(Weighted fair queueing) values for the vports. WFQ configuration
is used per vport basis when minimum bandwidth update/configuration
is notified to the PF by the management firmware.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: add support for link pause configuration.
Sudarsana Reddy Kalluru [Fri, 22 Apr 2016 05:41:04 +0000 (08:41 +0300)]
qed: add support for link pause configuration.

The APIs for making this sort of configuration [e.g., via ethtool] are
already present in qede, but the current configuration flow in qed doesn't
respect it.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: Conditions for changing link
Yuval Mintz [Fri, 22 Apr 2016 05:41:03 +0000 (08:41 +0300)]
qed*: Conditions for changing link

There's some inconsistency in current logic determining whether the
link settings of a given interface can be changed; I.e., in all modes
other than the so-called `deault' mode the interfaces are forbidden from
changing the configuration - but even this rule is not applied to all
user APIs that may change the configuration.

Instead, let the core-module [qed] decide whether an interface can change
the configuration by supporting a new API function. We also revise the
current rule, allowing all interfaces to change their configurations while
laying the infrastructure for future modes where an interface would be
blocked from making such a configuration.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for ethtool private flags
Yuval Mintz [Fri, 22 Apr 2016 05:41:02 +0000 (08:41 +0300)]
qede: Add support for ethtool private flags

Adds a getter for the interfaces private flags.
The only parameter currently supported is whether the interface is a
coupled function [required for supporting 100g].

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: Align statistics names
Yuval Mintz [Fri, 22 Apr 2016 05:41:01 +0000 (08:41 +0300)]
qed*: Align statistics names

There's a difference in statsitics' names starting at qed and
propagating to qede, where egress counters indicate ranges while ingress
counters indiciate high-end.
Align all statistcs to follow the same conventions - name indicates range.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Fix single MTU sized packet from firmware GRO flow
Manish Chopra [Wed, 20 Apr 2016 07:03:29 +0000 (03:03 -0400)]
qede: Fix single MTU sized packet from firmware GRO flow

In firmware assisted GRO flow there could be a single MTU sized
segment arriving due to firmware aggregation timeout/last segment
in an aggregation flow, which is not expected to be an actual gro
packet. So If a skb has zero frags from the GRO flow then simply
push it in the stack as non gso skb.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <yuval.mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Fix setting Skb network header
Manish Chopra [Wed, 20 Apr 2016 07:03:28 +0000 (03:03 -0400)]
qede: Fix setting Skb network header

Skb's network header needs to be set before extracting IPv4/IPv6
headers from it.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <yuval.mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Fix various memory allocation error flows for fastpath
Manish Chopra [Wed, 20 Apr 2016 07:03:27 +0000 (03:03 -0400)]
qede: Fix various memory allocation error flows for fastpath

This patch handles memory allocation failures for fastpath
gracefully in the driver.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <yuval.mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add fastpath support for tunneling
Manish Chopra [Thu, 14 Apr 2016 05:38:33 +0000 (01:38 -0400)]
qede: Add fastpath support for tunneling

This patch enables netdev tunneling features and adds
TX/RX fastpath support for tunneling in driver.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Enable GRE tunnel slowpath configuration
Manish Chopra [Thu, 14 Apr 2016 05:38:32 +0000 (01:38 -0400)]
qed: Enable GRE tunnel slowpath configuration

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed/qede: Add VXLAN tunnel slowpath configuration support
Manish Chopra [Thu, 14 Apr 2016 05:38:30 +0000 (01:38 -0400)]
qed/qede: Add VXLAN tunnel slowpath configuration support

This patch enables VXLAN tunnel on the adapter and
add support for driver hooks to configure UDP ports
for VXLAN tunnel offload to be performed by the adapter.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add infrastructure support for tunneling
Manish Chopra [Thu, 14 Apr 2016 05:38:29 +0000 (01:38 -0400)]
qed: Add infrastructure support for tunneling

This patch adds various structure/APIs needed to configure/enable different
tunnel [VXLAN/GRE/GENEVE] parameters on the adapter.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed* - bump driver versions to 8.7.1.20
Yuval Mintz [Sun, 10 Apr 2016 09:43:02 +0000 (12:43 +0300)]
qed* - bump driver versions to 8.7.1.20

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: add Rx flow hash/indirection support.
Sudarsana Reddy Kalluru [Sun, 10 Apr 2016 09:43:01 +0000 (12:43 +0300)]
qede: add Rx flow hash/indirection support.

Adds support for the following via ethtool:
  - UDP configuration of RSS based on 2-tuple/4-tuple.
  - RSS hash key.
  - RSS indirection table.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: add Rx flow hash/indirection support.
Sudarsana Reddy Kalluru [Sun, 10 Apr 2016 09:43:00 +0000 (12:43 +0300)]
qed: add Rx flow hash/indirection support.

Adds the required API for passing RSS-related configuration from qede.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed*: remove version dependency
Rahul Verma [Sun, 10 Apr 2016 09:42:59 +0000 (12:42 +0300)]
qed*: remove version dependency

Inbox drivers don't need versioning scheme in order to guarantee
compatibility, as both qed and qede are compiled from same codebase.

Signed-off-by: Rahul Verma <rahul.verma@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: initialize return rc to avoid returning garbage
Colin Ian King [Tue, 29 Mar 2016 17:00:50 +0000 (18:00 +0100)]
qed: initialize return rc to avoid returning garbage

in the case where qed_slowpath_irq_req is not called, rc is not
assigned and so qed_int_igu_enable will return a garbage value.
Fix this by initializing rc to 0.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Enlrage the drain timeout
Yuval Mintz [Wed, 9 Mar 2016 07:16:26 +0000 (09:16 +0200)]
qed: Enlrage the drain timeout

In the scenario where slowpath configuration isn't passing due to
various pause configurations affecting the chip, the theoretical time
required in worst-case-scenario to empty hw fifos sufficiently to
guarantee that slowpath configuration would flow is currently
insufficient.

This increases such a drain request to the theoretical maximum.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Notify of transciever changes
Zvi Nachmani [Wed, 9 Mar 2016 07:16:25 +0000 (09:16 +0200)]
qed: Notify of transciever changes

Handle a new message from the MFW, one that indicate that the transciever
state has changed, and log that into the system logs.

Signed-off-by: Zvi Nachmani <Zvi.Nachmani@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Major changes to MB locking
Tomer Tayar [Wed, 9 Mar 2016 07:16:24 +0000 (09:16 +0200)]
qed: Major changes to MB locking

Driver interaction with the managemnt firmware is done via mailbox
commands which the management firmware periodically sample, as well
as placing of additional data in set places in the shared memory.
Each PF has a single designated mailbox address, and all flows that
require messaging to the management should use it.

This patch does 2 things:
 1. It re-defines the critical section surrounding the mailbox sending -
that section should include the setting of the shared memory as well as
the sending of the command [otherwise a race might send a command with
the data of a different command].
 2. It moves the locking scheme from using mutices into using spinlocks.
This lays the groundwork for sending MFW commands from non-sleepable
contexts.

Signed-off-by: Tomer Tayar <Tomer.Tayar@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Prevent MF link notifications
Sudarsana Reddy Kalluru [Wed, 9 Mar 2016 07:16:23 +0000 (09:16 +0200)]
qed: Prevent MF link notifications

When device is configured for Multi-function mode, some older management
firmware might incorrectly notify interfaces of link changes while they
haven't requested the physical link configuration to be set.
This can create bizzare race conditions where unloading interfaces are
getting notified that the link is up.

Let the driver compensate - store the logical requested state of the link
and don't propagate notifications after protocol driver explicitly
requires the link to be unset.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Fix net-next "make ARCH=x86_64"
Manish Chopra [Tue, 8 Mar 2016 09:09:44 +0000 (04:09 -0500)]
qede: Fix net-next "make ARCH=x86_64"

'commit 55482edc25f0606851de42e73618f813f310d009
("qede: Add slowpath/fastpath support and enable hardware GRO")'
introduces below error when compiling net-next with "make ARCH=x86_64"

drivers/built-in.o: In function `qede_rx_int':
qede_main.c:(.text+0x6101a0): undefined reference to `tcp_gro_complete'

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add slowpath/fastpath support and enable hardware GRO
Manish Chopra [Fri, 4 Mar 2016 17:35:06 +0000 (12:35 -0500)]
qede: Add slowpath/fastpath support and enable hardware GRO

This patch configures hardware to use GRO and adds support
for fastpath APIs to handle HW aggregated packets.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed/qede: Add infrastructure support for hardware GRO
Manish Chopra [Fri, 4 Mar 2016 17:35:05 +0000 (12:35 -0500)]
qed/qede: Add infrastructure support for hardware GRO

This patch adds mainly structures and APIs prototype changes
in order to give support for qede slowpath/fastpath support
for the same.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Remove unused NVM vendor ID
Yuval Mintz [Wed, 2 Mar 2016 18:26:04 +0000 (20:26 +0200)]
qed: Remove unused NVM vendor ID

Remove 2 unused fields from driver code.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Fix error flow on slowpath start
Yuval Mintz [Wed, 2 Mar 2016 18:26:03 +0000 (20:26 +0200)]
qed: Fix error flow on slowpath start

In case of problems when initializing the chip, the error flows aren't
being properly done. Specifically, it's possible that the chip would be
left in a configuration allowing it [internally] to access the host
memory, causing fatal problems in the device that would require power
cycle to overcome.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Move statistics to L2 code
Yuval Mintz [Wed, 2 Mar 2016 18:26:02 +0000 (20:26 +0200)]
qed: Move statistics to L2 code

Current statistics logic is meant for L2, not for all future protocols.
Move this content to the proper designated file.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Support B0 instead of A0
Yuval Mintz [Wed, 2 Mar 2016 18:26:01 +0000 (20:26 +0200)]
qed: Support B0 instead of A0

BB_A0 is a development model that is will not reach actual clients.
In fact, future firmware would simply fail to initialize such chip.

This changes the configuration into B0 instead of A0, and adds a safeguard
against the slim chance someone would actually try this with an A0 adapter
in which case probe would gracefully fail.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Correct BAR sizes for older MFW
Ram Amrani [Wed, 2 Mar 2016 18:26:00 +0000 (20:26 +0200)]
qed: Correct BAR sizes for older MFW

Driver learns the inner bar sized from a register configured by management
firmware, but older versions are not setting this register.
But since we know which values were configured back then, use them instead.

Signed-off-by: Ram Amrani <Ram.Amrani@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Print additional HW attention info
Yuval Mintz [Sun, 28 Feb 2016 10:26:55 +0000 (12:26 +0200)]
qed: Print additional HW attention info

This patch utilizes the attention infrastructure to log additional
information that relates only to specific HW blocks.
For some of those HW blocks, it also stops automatically disabling the
attention generation as the attention is considered benign and thus
should only be logged; No fear of it flooding the system.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Print HW attention reasons
Yuval Mintz [Sun, 28 Feb 2016 10:26:54 +0000 (12:26 +0200)]
qed: Print HW attention reasons

Each HW block contains common information about attention reasons,
raising a bit for each one of the different sub-reasons that caused it
to raise an attention.

This patch extends the infrastructure by allowing logging of the various
reasons causing the HW blocks to generate an attention.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add support for HW attentions
Yuval Mintz [Sun, 28 Feb 2016 10:26:53 +0000 (12:26 +0200)]
qed: Add support for HW attentions

HW is capable of generating attentnions for a multitude of reasons,
but current driver is enabling attention generation only for management
firmware [required for link notifications].

This patch enables almost all of the possible reasons for HW attentions,
logging the HW block generating the attention and preventing further
attentions from that source [to prevent possible attention flood].
It also lays the infrastructure for additional exploration of the various
attentions.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Semantic refactoring of interrupt code
Yuval Mintz [Sun, 28 Feb 2016 10:26:52 +0000 (12:26 +0200)]
qed: Semantic refactoring of interrupt code

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed, qede: rebrand module description
Yuval Mintz [Wed, 24 Feb 2016 14:52:50 +0000 (16:52 +0200)]
qed, qede: rebrand module description

Drop the `QL4xxx 40G/100G' and use `FastLinQ 4xxxx' instead.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Prevent probe on previous error
Yuval Mintz [Wed, 24 Feb 2016 14:52:49 +0000 (16:52 +0200)]
qed: Prevent probe on previous error

Don't allow driver to probe on an adapter at a failed state;
Gracefully block the probe instead.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: add MODULE_FIRMWARE()
Yuval Mintz [Wed, 24 Feb 2016 14:52:48 +0000 (16:52 +0200)]
qed: add MODULE_FIRMWARE()

Module is using a binary firmware file and so should be marked as such.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Don't report link change needlessly
Yuval Mintz [Wed, 24 Feb 2016 14:52:47 +0000 (16:52 +0200)]
qede: Don't report link change needlessly

There are several corner cases where driver might get a 2nd notification
about the same link change. Don't log any additional changes if the
physical carrier is already reported as it should.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Linearize SKBs when needed
Yuval Mintz [Wed, 24 Feb 2016 14:52:46 +0000 (16:52 +0200)]
qede: Linearize SKBs when needed

There's a corner-case in HW where an SKB queued for transmission that
contains too many frags will cause FW to assert.
This patch solves this by linearizing the SKB if necessary.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Change pci DID for 10g device
Yuval Mintz [Wed, 24 Feb 2016 14:52:45 +0000 (16:52 +0200)]
qede: Change pci DID for 10g device

The device ID for the 10g module has changed. Populate the pci_ids table
accordingly.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed,qede: Bump driver versions to 8.7.0.0
Yuval Mintz [Sun, 21 Feb 2016 09:40:11 +0000 (11:40 +0200)]
qed,qede: Bump driver versions to 8.7.0.0

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Introduce DMA_REGPAIR_LE
Yuval Mintz [Sun, 21 Feb 2016 09:40:10 +0000 (11:40 +0200)]
qed: Introduce DMA_REGPAIR_LE

FW hsi contains regpairs, mostly for 64-bit address representations.
Since same paradigm is applied each time a regpair is filled, this
introduces a new utility macro for setting such regpairs.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Change metadata needed for SPQ entries
Yuval Mintz [Sun, 21 Feb 2016 09:40:09 +0000 (11:40 +0200)]
qed: Change metadata needed for SPQ entries

Each configuration element send via ramrod requires a Slow Path Queue
entry. This slightly changes the way such an entry is configured, but
contains mostly semantic changes [where more parameters are gathered
in a sub-struct instead of being directly passed].

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Handle possible race in SB config
Yuval Mintz [Sun, 21 Feb 2016 09:40:08 +0000 (11:40 +0200)]
qed: Handle possible race in SB config

Due to HW design, some of the memories are wide-bus and access to those
needs to be sequentialized on a per-HW-block level; Read/write to a
given HW-block might break other read/write to wide-bus memory done at
~same time.

Status blocks initialization in CAU is done into such a wide-bus memory.
This moves the initialization into using DMAE which is guaranteed to be
safe to use on such memories.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Turn most GFP_ATOMIC into GFP_KERNEL
Yuval Mintz [Sun, 21 Feb 2016 09:40:07 +0000 (11:40 +0200)]
qed: Turn most GFP_ATOMIC into GFP_KERNEL

Initial driver submission used GFP_ATOMIC almost inclusively when
allocating memory. We now remedy this point, using GFP_KERNEL where
it's possible.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add vlan filtering offload support
Sudarsana Reddy Kalluru [Thu, 18 Feb 2016 15:00:40 +0000 (17:00 +0200)]
qede: Add vlan filtering offload support

Device would start receiving only vlan-tagged traffic with tags matching
that of one of the configured vlan IDs, unless:
  - Device is expliicly placed in PROMISC mode.
  - Device exhausts its vlan filter credits.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Lay infrastructure for vlan filtering offload
Yuval Mintz [Thu, 18 Feb 2016 15:00:39 +0000 (17:00 +0200)]
qed: Lay infrastructure for vlan filtering offload

Today, interfaces are working in vlan-promisc mode; But once
vlan filtering offloaded would be supported, we'll need a method to
control it directly [e.g., when setting device to PROMISC, or when
running out of vlan credits].

This adds the necessary API for L2 client to manually choose whether to
accept all vlans or only those for which filters were configured.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed/qede: use 8.7.3.0 FW.
Yuval Mintz [Mon, 15 Feb 2016 18:22:35 +0000 (13:22 -0500)]
qed/qede: use 8.7.3.0 FW.

This patch moves the qed* driver into utilizing the 8.7.3.0 FW.
This new FW is required for a lot of new SW features, including:
  - Vlan filtering offload
  - Encapsulation offload support
  - HW ingress aggregations
As well as paving the way for the possibility of adding storage protocols
in the future.

V2:
 - Fix kbuild test robot error/warnings.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Correct slowpath interrupt scheme
Sudarsana Kalluru [Mon, 7 Dec 2015 11:25:59 +0000 (06:25 -0500)]
qed: Correct slowpath interrupt scheme

When using INTa, ISR might be called before device is configured
for INTa [E.g., due to other device asserting the shared interrupt line],
in which case the ISR would read the SISR registers that shouldn't be
read unless HW is already configured for INTa. This might break interrupts
later on. There's also an MSI-X issue due to this difference, although
it's mostly theoretical.

This patch changes the initialization order, calling request_irq() for the
slowpath interrupt only after the chip is configured for working
in the preferred interrupt mode.

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Fix BAR size split for some servers
Ariel Elior [Mon, 7 Dec 2015 11:25:58 +0000 (06:25 -0500)]
qed: Fix BAR size split for some servers

Can't rely on pci config space to discover bar size,
as in some environments this returns a wrong, too large value.
Instead, rely on device register, which contains the value
provided by MFW at preboot.

Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: fix handling of concurrent ramrods.
Tomer Tayar [Mon, 7 Dec 2015 11:25:57 +0000 (06:25 -0500)]
qed: fix handling of concurrent ramrods.

Concurrent non-blocking slowpath ramrods can be completed
out-of-order on the completion chain. Recycling completed elements,
while previously sent elements are still completion pending,
can lead to overriding of active elements on the chain. Furthermore,
sending pending slowpath ramrods currently lacks the update of the
chain element physical pointer.

This patch:
* Ensures that ramrods are sent to the FW with
  consecutive echo values.
* Handles out-of-order completions by freeing only first
  successive completed entries.
* Updates the chain element physical pointer when copying
  a pending element into a free element for sending.

Signed-off-by: Tomer Tayar <Tomer.Tayar@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Fix corner case for chain in-between pages
Tomer Tayar [Mon, 7 Dec 2015 11:25:56 +0000 (06:25 -0500)]
qed: Fix corner case for chain in-between pages

The amount of chain next pointer elements between the producer
and the consumer indices depends on which pages they currently
point to. The current calculation is based only on their difference,
and it can lead to a number of free elements which is higher by 1
than the actual value.

Signed-off-by: Tomer Tayar <Tomer.Tayar@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for {get, set}_pauseparam
Sudarsana Kalluru [Mon, 30 Nov 2015 10:25:06 +0000 (12:25 +0200)]
qede: Add support for {get, set}_pauseparam

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for nway_reset
Sudarsana Kalluru [Mon, 30 Nov 2015 10:25:05 +0000 (12:25 +0200)]
qede: Add support for nway_reset

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for set_phys_id
Sudarsana Kalluru [Mon, 30 Nov 2015 10:25:04 +0000 (12:25 +0200)]
qede: Add support for set_phys_id

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add support for changing LED state
Sudarsana Kalluru [Mon, 30 Nov 2015 10:25:03 +0000 (12:25 +0200)]
qed: Add support for changing LED state

Physical LEDs are being controlled by the management FW.
This adds the qed functionality required to request management FW to
change the LED configuration, as well as the necessary APIs for this
functionality to later be used by the protocol drivers.

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for {get, set}_ringparam
Sudarsana Kalluru [Mon, 30 Nov 2015 10:25:02 +0000 (12:25 +0200)]
qede: Add support for {get, set}_ringparam

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for {get, set}_channels
Sudarsana Kalluru [Mon, 30 Nov 2015 10:25:01 +0000 (12:25 +0200)]
qede: Add support for {get, set}_channels

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: select ZLIB_INFLATE
Arnd Bergmann [Tue, 10 Nov 2015 10:28:15 +0000 (11:28 +0100)]
qed: select ZLIB_INFLATE

The newly added qlogic qed driver uses the zlib library, but
misses the dependency:

drivers/built-in.o: In function `qed_alloc_stream_mem':
drivers/net/ethernet/qlogic/qed/qed_main.c:707: undefined reference to `zlib_inflate_workspacesize'
drivers/built-in.o: In function `qed_unzip_data':
drivers/net/ethernet/qlogic/qed/qed_main.c:675: undefined reference to `zlib_inflateInit2'

This changes Kconfig to always select zlib when needed.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe56b9e6a8d9 ("qed: Add module with basic common support")
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlogic: qed: fix error codes in qed_resc_alloc()
Dan Carpenter [Thu, 5 Nov 2015 08:41:28 +0000 (11:41 +0300)]
qlogic: qed: fix error codes in qed_resc_alloc()

We accidentally return success instead of -ENOMEM here.

Fixes: fe56b9e6a8d9 ('qed: Add module with basic common support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlogic: qed: fix a test for MODE_MF_SI
Dan Carpenter [Wed, 4 Nov 2015 13:29:11 +0000 (16:29 +0300)]
qlogic: qed: fix a test for MODE_MF_SI

MODE_MF_SI is 9.  We should be testing bit 9 instead of AND 0x9.

Fixes: fe56b9e6a8d9 ('qed: Add module with basic common support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlogic/qed: remove bogus NULL check
Dan Carpenter [Wed, 4 Nov 2015 13:27:16 +0000 (16:27 +0300)]
qlogic/qed: remove bogus NULL check

We check if "p_hwfn" is NULL and then dereference it in the error
handling code.  I read the code and it isn't NULL so let's remove the
check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add basic ethtool support
Sudarsana Kalluru [Mon, 26 Oct 2015 09:02:34 +0000 (11:02 +0200)]
qede: Add basic ethtool support

This adds basic ethtool operations to the qed driver, allowing support in:
 - Statistics gathering [ethtool -S]
 - Setting of debug level [ethtool -s <interface> msglvl]
 - Getting basic information [ethtool, ethtool -i]

In addition it adds the ability to change the MTU.

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add statistics support
Manish Chopra [Mon, 26 Oct 2015 09:02:33 +0000 (11:02 +0200)]
qed: Add statistics support

Device statistics can be gathered on-demand. This adds the qed support for
reading the statistics [both function and port] from the device, and adds
to the public API a method for requesting the current statistics.

Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add support for link
Sudarsana Kalluru [Mon, 26 Oct 2015 09:02:32 +0000 (11:02 +0200)]
qede: Add support for link

This adds basic link functionality to qede - driver still doesn't provide
users with an API to change any link property, but it does request qed to
initialize the link using default configuration, and registers a callback
that allows it to get link notifications.

This patch adds the ability of the driver to set the carrier as active and
to enable traffic as a result of async. link notifications.
Following this patch, driver should be capable of running traffic.

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add link support
Yuval Mintz [Mon, 26 Oct 2015 09:02:31 +0000 (11:02 +0200)]
qed: Add link support

Physical link is handled by the management Firmware.
This patch lays the infrastructure for attention handling in the driver,
as link change notifications arrive via async. attentions,
as well the handling of such notifications.

This patch also extends the API with the protocol drivers by adding
registered callbacks which the protocol driver passes to qed in order
to be notified of async. events originating from the FW/HW.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: classification configuration
Sudarsana Kalluru [Mon, 26 Oct 2015 09:02:30 +0000 (11:02 +0200)]
qede: classification configuration

Add the ability to configure basic classification in driver by
implementing ndo_set_mac_address() and ndo_set_rx_mode().

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add basic network device support
Yuval Mintz [Mon, 26 Oct 2015 09:02:29 +0000 (11:02 +0200)]
qede: Add basic network device support

This patch includes the basic Rx/Tx support for the driver [although
carrier will still never be turned on].
Following this patch the driver registers a network device, initializes
it and prepares it for traffic.

Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add slowpath L2 support
Manish Chopra [Mon, 26 Oct 2015 09:02:28 +0000 (11:02 +0200)]
qed: Add slowpath L2 support

This patch adds to the qed the support to configure various L2 elements,
such as channels and basic filtering conditions.
It also enhances its public API to allow qede to later utilize this
functionality.

Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqede: Add basic Network driver
Yuval Mintz [Mon, 26 Oct 2015 09:02:27 +0000 (11:02 +0200)]
qede: Add basic Network driver

The Qlogic Everest Driver for Ethernet is the Ethernet specific module for
QL4xxx ethernet products by Qlogic.

This patch adds a very minimal PCI driver, one that doesn't yet register
a network device, but one that does interact with qed and does a basic
initialization of the HW.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add basic L2 interface
Yuval Mintz [Mon, 26 Oct 2015 09:02:26 +0000 (11:02 +0200)]
qed: Add basic L2 interface

This patch adds a public API for a network driver to work on top of QED.
The interface itself is very minimal - it's mostly infrastructure, as the
only content it has after this patch is a query for HW-based information
required for the creation of a network interface [I.e., no actual
protocol-specific configurations are supported].

Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqed: Add module with basic common support
Yuval Mintz [Mon, 26 Oct 2015 09:02:25 +0000 (11:02 +0200)]
qed: Add module with basic common support

The Qlogic Everest Driver is the backend module for the QL4xxx ethernet
products by Qlogic.

This module serves two main purposes:
 1. It's responsible to contain all the common code that will be shared
    between the various drivers that would be used with said line of
    products. Flows such as chip initialization and de-initialization
    fall under this category.

 2. It would abstract the protocol-specific HW & FW components, allowing
    the protocol drivers to have a clean APIs which is detached in its
    slowpath configuration from the actual HSI.

This adds a very basic module without any protocol-specific bits.
I.e., this adds a basic implementation that almost entirely falls under
the first category.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23732603
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template()
Dan Carpenter [Tue, 10 May 2016 19:20:04 +0000 (22:20 +0300)]
qlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template()

If qlcnic_fw_cmd_get_minidump_temp() fails then "fw_dump->tmpl_hdr" is
NULL or possibly freed.  It can lead to an oops later.

Fixes: d01a6d3c8ae1 ('qlcnic: Add support to enable capability to extend minidump for iSCSI')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: protect qlicnic_attach_func with rtnl_lock
Hannes Frederic Sowa [Mon, 18 Apr 2016 19:19:46 +0000 (21:19 +0200)]
qlcnic: protect qlicnic_attach_func with rtnl_lock

qlcnic_attach_func requires rtnl_lock to be held.

Cc: Dept-GELinuxNICDev@qlogic.com
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: Update version to 5.3.64
Manish Chopra [Thu, 21 Apr 2016 17:25:20 +0000 (13:25 -0400)]
qlcnic: Update version to 5.3.64

Just updating the version as many fixes got
accumulated over 5.3.63

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: Fix mailbox completion handling during spurious interrupt
Rajesh Borundia [Tue, 8 Mar 2016 07:39:58 +0000 (02:39 -0500)]
qlcnic: Fix mailbox completion handling during spurious interrupt

o While the driver is in the middle of a MB completion processing
and it receives a spurious MB interrupt, it is mistaken as a good MB
completion interrupt leading to premature completion of the next MB
request. Fix the driver to guard against this by checking the current
state of MB processing and ignore the spurious interrupt.
Also added a stats counter to record this condition.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: Remove unnecessary usage of atomic_t
Rajesh Borundia [Tue, 8 Mar 2016 07:39:57 +0000 (02:39 -0500)]
qlcnic: Remove unnecessary usage of atomic_t

o atomic_t usage is incorrect as we are not implementing
any atomicity.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: correctly handle qlcnic_alloc_mbx_args
Insu Yun [Tue, 29 Dec 2015 20:02:18 +0000 (15:02 -0500)]
qlcnic: correctly handle qlcnic_alloc_mbx_args

Since qlcnic_alloc_mbx_args can be failed,
return value should be checked.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoqlcnic: constify qlcnic_dcb_ops structures
Julia Lawall [Sun, 27 Dec 2015 21:01:29 +0000 (22:01 +0100)]
qlcnic: constify qlcnic_dcb_ops structures

The qlcnic_dcb_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>