]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
7 years agooracleasm: Copy the integrity descriptor v4.1.12-111.0.20170918_2215
Martin K. Petersen [Fri, 11 Aug 2017 04:19:43 +0000 (00:19 -0400)]
oracleasm: Copy the integrity descriptor

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Divya Indi <divya.indi@oracle.com>
The original code made assumptions about the oracleasm integrity
descriptor hanging off of check_asm_ioc being mapped. Make sure we
properly copy and validate the descriptor before use.

Orabug: 26559128

7 years agoRDS: IB: Add proxy qp to support FRWR through RDS_GET_MR
Avinash Repaka [Thu, 13 Apr 2017 01:00:05 +0000 (18:00 -0700)]
RDS: IB: Add proxy qp to support FRWR through RDS_GET_MR

MR registration requested through RDS_GET_MR socket option will not have
any connection details. So, there isn't an appropriate qp to post the
registration/invalidation requests. This patch solves that issue by
using a proxy qp.

Orabug: 25669255

Signed-off-by: Avinash Repaka <avinash.repaka@oracle.com>
Tested-by: Gerald Gibson <gerald.gibson@oracle.com>
Tested-by: Efrain Galaviz <efrain.galaviz@oracle.com>
Reviewed-by: Wei Lin Guay <wei.lin.guay@oracle.com>
7 years agoRDS: Add support for fast registration work request
Avinash Repaka [Thu, 17 Aug 2017 21:02:47 +0000 (14:02 -0700)]
RDS: Add support for fast registration work request

This patch adds support for MR registration through work request in RDS,
commonly referred as FRWR/fastreg/FRMR.

With this patch added, RDS chooses the registration method, between FMR
and FRWR, based on the preference given through 'prefer_frwr' module
parameter and the support offered by the underlying device.

Please note that this patch is adding support for MR registration done
only through CMSG. Support for registrations through RDS_GET_MR socket
option will be added through another patch.

Orabug: 22145384

Suggested-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Avinash Repaka <avinash.repaka@oracle.com>
Tested-by: Gerald Gibson <gerald.gibson@oracle.com>
Tested-by: Efrain Galaviz <efrain.galaviz@oracle.com>
Reviewed-by: Wei Lin Guay <wei.lin.guay@oracle.com>
7 years agoscsi: qedi: Limit number for CQ queues.
Manish Rangankar [Thu, 10 Aug 2017 13:32:17 +0000 (06:32 -0700)]
scsi: qedi: Limit number for CQ queues.

Orabug: 26759520

[qed_sp_iscsi_func_start:189(host_7-0)]Cannot satisfy CQ amount. Queues
requested 8, CQs available 4. Aborting function start

Above condition will resolve as management firmware is capable of
telling us the number of CQs available for a given PF, qed will
communicate the same number to qedi, So that qedi will know how much CQs
are allowed.

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: fix another spelling mistake: "alloction" -> "allocation"
Colin Ian King [Mon, 3 Jul 2017 10:24:02 +0000 (11:24 +0100)]
scsi: qedi: fix another spelling mistake: "alloction" -> "allocation"

Orabug: 26759520

Trivial fix to spelling mistake in QEDF_ERR message. I should have also
included this in a previous fix, but I only just spotted this one.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Add ISCSI_BOOT_SYSFS to Kconfig
Nilesh Javali [Wed, 19 Jul 2017 09:07:55 +0000 (02:07 -0700)]
scsi: qedi: Add ISCSI_BOOT_SYSFS to Kconfig

Orabug: 26759520

qedi uses iscsi_boot_sysfs to export the targets used for boot to
sysfs. Select the config option to make sure the module is built.

This addresses the compile time issue,
    drivers/scsi/qedi/qedi_main.o: In function `qedi_remove':
    qedi_main.c:(.text+0x3bbd): undefined reference to `iscsi_boot_destroy_kset'
    drivers/scsi/qedi/qedi_main.o: In function `__qedi_probe.constprop.0':
    qedi_main.c:(.text+0x577a): undefined reference to `iscsi_boot_create_target'
    qedi_main.c:(.text+0x5807): undefined reference to `iscsi_boot_create_target'
    qedi_main.c:(.text+0x587f): undefined reference to `iscsi_boot_create_initiator'
    qedi_main.c:(.text+0x58f3): undefined reference to `iscsi_boot_create_ethernet'
    qedi_main.c:(.text+0x5927): undefined reference to `iscsi_boot_destroy_kset'
    qedi_main.c:(.text+0x5d7b): undefined reference to `iscsi_boot_create_host_kset'

[mkp: fixed whitespace]

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Fixes: c57ec8fb7c02 ("scsi: qedi: Add support for Boot from SAN over iSCSI offload")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Add support for Boot from SAN over iSCSI offload
Nilesh Javali [Tue, 27 Jun 2017 09:26:56 +0000 (02:26 -0700)]
scsi: qedi: Add support for Boot from SAN over iSCSI offload

Orabug: 26759520

This patch adds support for Boot from SAN over iSCSI offload. The iSCSI
boot information in the NVRAM is populated under
/sys/firmware/iscsi_bootX/ using qed NVM-image reading API and further
exported to open-iscsi to perform iSCSI login enabling boot over offload
iSCSI interface in a Boot from SAN environment.

Signed-off-by: Arun Easi <arun.easi@cavium.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Remove WARN_ON from clear task context.
Manish Rangankar [Thu, 15 Jun 2017 07:10:40 +0000 (00:10 -0700)]
scsi: qedi: Remove WARN_ON from clear task context.

Orabug: 26759520

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Remove WARN_ON for untracked cleanup.
Manish Rangankar [Thu, 15 Jun 2017 07:10:39 +0000 (00:10 -0700)]
scsi: qedi: Remove WARN_ON for untracked cleanup.

Orabug: 26759520

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Remove comparison of u16 idx with zero.
Christos Gkekas [Sat, 24 Jun 2017 16:24:45 +0000 (17:24 +0100)]
scsi: qedi: Remove comparison of u16 idx with zero.

Orabug: 26759520

Variable idx is defined as u16 thus statement (idx < 0) is always false
and should be removed.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Fix return code in qedi_ep_connect()
Dan Carpenter [Wed, 12 Jul 2017 07:31:21 +0000 (10:31 +0300)]
scsi: qedi: Fix return code in qedi_ep_connect()

Orabug: 26759520

We shouldn't be writing over the "ret" variable.  It means we return
ERR_PTR(0) which is NULL and it results in a NULL dereference in the
caller.

Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Fix endpoint NULL panic during recovery.
manish.rangankar@cavium.com [Fri, 19 May 2017 08:33:21 +0000 (01:33 -0700)]
scsi: qedi: Fix endpoint NULL panic during recovery.

Orabug: 26759520

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: set max_fin_rt default value
Nilesh Javali [Fri, 19 May 2017 08:33:20 +0000 (01:33 -0700)]
scsi: qedi: set max_fin_rt default value

Orabug: 26759520

max_fin_rt is the maximum re-transmission of FIN packets
as part of the termination flow. After reaching this value
the FW will send a single RESET.

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Set firmware tcp msl timer value.
manish.rangankar@cavium.com [Fri, 19 May 2017 08:33:19 +0000 (01:33 -0700)]
scsi: qedi: Set firmware tcp msl timer value.

Orabug: 26759520

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Fix endpoint NULL panic in qedi_set_path.
manish.rangankar@cavium.com [Fri, 19 May 2017 08:33:18 +0000 (01:33 -0700)]
scsi: qedi: Fix endpoint NULL panic in qedi_set_path.

Orabug: 26759520

RIP: 0010:qedi_set_path+0x114/0x570 [qedi]
 Call Trace:
  [<ffffffffa0472923>] iscsi_if_recv_msg+0x623/0x14a0
  [<ffffffff81307de6>] ? rhashtable_lookup_compare+0x36/0x70
  [<ffffffffa047382e>] iscsi_if_rx+0x8e/0x1f0
  [<ffffffff8155983d>] netlink_unicast+0xed/0x1b0
  [<ffffffff81559c30>] netlink_sendmsg+0x330/0x770
  [<ffffffff81510d60>] sock_sendmsg+0xb0/0xf0
  [<ffffffff8101360b>] ? __switch_to+0x17b/0x4b0
  [<ffffffff8163a2c8>] ? __schedule+0x2d8/0x900
  [<ffffffff81511199>] ___sys_sendmsg+0x3a9/0x3c0
  [<ffffffff810e2298>] ? get_futex_key+0x1c8/0x2b0
  [<ffffffff810e25a0>] ? futex_wake+0x80/0x160

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Set dma_boundary to 0xfff.
manish.rangankar@cavium.com [Fri, 19 May 2017 08:33:17 +0000 (01:33 -0700)]
scsi: qedi: Set dma_boundary to 0xfff.

Orabug: 26759520

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Correctly set firmware max supported BDs.
manish.rangankar@cavium.com [Fri, 19 May 2017 08:33:16 +0000 (01:33 -0700)]
scsi: qedi: Correctly set firmware max supported BDs.

Orabug: 26759520

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoscsi: qedi: Fix bad pte call trace when iscsiuio is stopped.
Arun Easi [Fri, 19 May 2017 08:33:15 +0000 (01:33 -0700)]
scsi: qedi: Fix bad pte call trace when iscsiuio is stopped.

Orabug: 26759520

munmap done by iscsiuio during a stop of the service triggers a "bad
pte" warning sometimes. munmap kernel path goes through the mmapped
pages and has a validation check for mapcount (in struct page) to be
zero or above. kzalloc, which we had used to allocate udev->ctrl, uses
slab allocations, which re-uses mapcount (union) for other purposes that
can make the mapcount look negative. Avoid all these trouble by invoking
one of the __get_free_pages wrappers to be used instead of kzalloc for
udev->ctrl.

 BUG: Bad page map in process iscsiuio  pte:80000000aa624067 pmd:3e6777067
 page:ffffea0002a98900 count:2 mapcount:-2143289280
     mapping: (null) index:0xffff8800aa624e00
 page flags: 0x10075d00000090(dirty|slab)
 page dumped because: bad pte
 addr:00007fcba70a3000 vm_flags:0c0400fb anon_vma: (null)
     mapping:ffff8803edf66e90 index:0

 Call Trace:
     dump_stack+0x19/0x1b
     print_bad_pte+0x1af/0x250
     unmap_page_range+0x7a7/0x8a0
     unmap_single_vma+0x81/0xf0
     unmap_vmas+0x49/0x90
     unmap_region+0xbe/0x140
     ? vma_rb_erase+0x121/0x220
     do_munmap+0x245/0x420
     vm_munmap+0x41/0x60
     SyS_munmap+0x22/0x30
     tracesys+0xdd/0xe2

Signed-off-by: Arun Easi <arun.easi@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoqed: Fix build errors.
Somasundaram Krishnasamy [Wed, 13 Sep 2017 22:58:18 +0000 (15:58 -0700)]
qed: Fix build errors.

Orabug: 26783820

Fix build errors caused by the below upstream patches.

7b6859fbdcc4a590c8ef03bcc00d770b42d41c42 qed: Utilize FW 8.20.0.0
712c3cbf193fcadf0ba67da61432beb1a71e400b qed: Replace set_id() api with set_name()

Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoconfig: add CONFIG_INFINIBAND_QEDR
Brian Maly [Fri, 15 Sep 2017 18:38:35 +0000 (14:38 -0400)]
config: add CONFIG_INFINIBAND_QEDR

Orabug: 26759520

Add but do not enable CONFIG_INFINIBAND_QEDR for now.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
7 years agoqed: fix spelling mistake: "calescing" -> "coalescing"
Colin Ian King [Wed, 30 Aug 2017 11:40:12 +0000 (12:40 +0100)]
qed: fix spelling mistake: "calescing" -> "coalescing"

Orabug: 26783820

Trivial fix to spelling mistake in DP_NOTICE message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()'
Christophe Jaillet [Sun, 6 Aug 2017 22:00:17 +0000 (00:00 +0200)]
qed: Fix a memory allocation failure test in 'qed_mcp_cmd_init()'

Orabug: 26783820

We allocate 'p_info->mfw_mb_cur' and 'p_info->mfw_mb_shadow' but we check
'p_info->mfw_mb_addr' instead of 'p_info->mfw_mb_cur'.

'p_info->mfw_mb_addr' is never 0, because it is initiliazed a few lines
above in 'qed_load_mcp_offsets()'.

Update the test and check the result of the 2 'kzalloc()' instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit eb2a6b800c2d1336cce6709d48c42753a611c07b ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: enhanced per queue max coalesce value.
Rahul Verma [Wed, 26 Jul 2017 13:07:15 +0000 (06:07 -0700)]
qed: enhanced per queue max coalesce value.

Orabug: 26783820

Maximum coalesce per Rx/Tx queue is extended from
255 to 511.

Signed-off-by: Rahul Verma <rahul.verma@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Read per queue coalesce from hardware
Rahul Verma [Wed, 26 Jul 2017 13:07:14 +0000 (06:07 -0700)]
qed: Read per queue coalesce from hardware

Orabug: 26783820

Retrieve the actual coalesce value from hardware for every Rx/Tx
queue, instead of Rx/Tx coalesce value cached during set coalesce.

Signed-off-by: Rahul Verma <Rahul.Verma@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add support for vf coalesce configuration.
Rahul Verma [Wed, 26 Jul 2017 13:07:13 +0000 (06:07 -0700)]
qed: Add support for vf coalesce configuration.

Orabug: 26783820

This patch add the ethtool support to set RX/Tx coalesce
value to the VF associated Rx/Tx queues.

Signed-off-by: Rahul Verma <Rahul.Verma@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqede: Add ethtool support for Energy efficient ethernet.
Sudarsana Reddy Kalluru [Wed, 26 Jul 2017 13:07:12 +0000 (06:07 -0700)]
qede: Add ethtool support for Energy efficient ethernet.

Orabug: 26783820

The patch adds ethtool callback implementations for querying/configuring
the Energy Efficient Ethernet (EEE) parameters.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add support for Energy efficient ethernet.
Sudarsana Reddy Kalluru [Wed, 26 Jul 2017 13:07:11 +0000 (06:07 -0700)]
qed: Add support for Energy efficient ethernet.

Orabug: 26783820

The patch adds required driver support for reading/configuring the
Energy Efficient Ethernet (EEE) parameters.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed/qede: Add setter APIs support for RX flow classification
Chopra, Manish [Wed, 26 Jul 2017 13:07:10 +0000 (06:07 -0700)]
qed/qede: Add setter APIs support for RX flow classification

Orabug: 26783820

This patch adds support for adding and deleting rx flow
classification rules. Using this user can classify RX flow
constituting of TCP/UDP 4-tuples [src_ip/dst_ip and src_port/dst_port]
to be steered on a given RX queue

Signed-off-by: Manish Chopra <manish.chopra@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqede: Add getter APIs support for RX flow classification
Chopra, Manish [Wed, 26 Jul 2017 13:07:09 +0000 (06:07 -0700)]
qede: Add getter APIs support for RX flow classification

Orabug: 26783820

This patch adds support for ethtool getter APIs to query
RX flow classification rules.

Signed-off-by: Manish Chopra <manish.chopra@cavium.com>
Signed-off-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Fix printk option passed when printing ipv6 addresses
Kalderon, Michal [Sun, 9 Jul 2017 10:00:16 +0000 (13:00 +0300)]
qed: Fix printk option passed when printing ipv6 addresses

Orabug: 26783820

The option "h" (host order ) exists for ipv4 only.
Remove the h when printing ipv6 addresses.

Lead to the following smatch warning:

drivers/net/ethernet/qlogic/qed/qed_iwarp.c:585 qed_iwarp_print_tcp_ramrod()
warn: '%pI6' can only be followed by c
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:1521 qed_iwarp_print_cm_info()
warn: '%pI6' can only be followed by c

Fixes commit 456a584947d5 ("qed: iWARP CM add passive side connect")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 91d1ae475b9833097e078c2581c9265d033cdbe4 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: initialize ll2_syn_handle at start of function
Michal Kalderon [Mon, 3 Jul 2017 18:55:25 +0000 (21:55 +0300)]
qed: initialize ll2_syn_handle at start of function

Orabug: 26783820

Fix compilation warning
qed_iwarp.c:1721:5: warning: ll2_syn_handle may be used
uninitialized in this function

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 25f4535a94c2b38d09912d7e8bab371c9e97be38 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add iWARP support for physical queue allocation
Kalderon, Michal [Sun, 2 Jul 2017 07:29:32 +0000 (10:29 +0300)]
qed: Add iWARP support for physical queue allocation

Orabug: 26783820

iWARP has different physical queue requirements than RoCE

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 93c45984d385bddf156735991ee0cd15c0753e4d ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add iWARP protocol support in context allocation
Kalderon, Michal [Sun, 2 Jul 2017 07:29:31 +0000 (10:29 +0300)]
qed: Add iWARP protocol support in context allocation

Orabug: 26783820

When computing how much memory is required for the different hw clients
iWARP protocol should be taken into account

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 5d7dc9620d35ce1f503e2062aa324447e557e3f2 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: iWARP CM add error handling
Kalderon, Michal [Sun, 2 Jul 2017 07:29:30 +0000 (10:29 +0300)]
qed: iWARP CM add error handling

Orabug: 26783820

This patch introduces error handling for errors that occurred during
connection establishment.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 9816b614346925feac1198e33d2dc5201c4ef74e ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: iWARP implement disconnect flows
Kalderon, Michal [Sun, 2 Jul 2017 07:29:29 +0000 (10:29 +0300)]
qed: iWARP implement disconnect flows

Orabug: 26783820

This patch takes care of active/passive disconnect flows.
Disconnect flows can be initiated remotely, in which case a async event
will arrive from peer and indicated to qedr driver. These
are referred to as exceptions. When a QP is destroyed, it needs to check
that it's associated ep has been closed.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit fc4c6065e661224df3db50780219ac53fee56e2b ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: iWARP CM add active side connect
Kalderon, Michal [Sun, 2 Jul 2017 07:29:28 +0000 (10:29 +0300)]
qed: iWARP CM add active side connect

Orabug: 26783820

This patch implements the active side connect.
Offload a connection, process MPA reply and send RTR.
In some of the common passive/active functions, the active side
will work in blocking mode.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 4b0fdd7c8b757125ac7996617d914bbdb9e0348c ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: iWARP CM add passive side connect
Kalderon, Michal [Sun, 2 Jul 2017 07:29:27 +0000 (10:29 +0300)]
qed: iWARP CM add passive side connect

Orabug: 26783820

This patch implements the passive side connect.
It addresses pre-allocating resources, creating a connection
element upon valid SYN packet received. Calling upper layer and
implementation of the accept/reject calls.

Error handling is not part of this patch.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 456a584947d5b92d5e5a62cc68125ab5f150aa8c ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: iWARP CM add listener functions and initial SYN processing
Kalderon, Michal [Sun, 2 Jul 2017 07:29:26 +0000 (10:29 +0300)]
qed: iWARP CM add listener functions and initial SYN processing

Orabug: 26783820

This patch adds the ability to add and remove listeners and identify
whether the SYN packet received is intended for iWARP or not. If
a listener is not found the SYN packet is posted back to the chip.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 65a91a6cdb868a28b919ca133c0f9d9dfd9a635a ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: iWARP CM - setup a ll2 connection for handling SYN packets
Kalderon, Michal [Sun, 2 Jul 2017 07:29:25 +0000 (10:29 +0300)]
qed: iWARP CM - setup a ll2 connection for handling SYN packets

Orabug: 26783820

iWARP handles incoming SYN packets using the ll2 interface. This patch
implements ll2 setup and teardown. Additional ll2 connections will
be used in the future which are not part of this patch series.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit b5c29ca7dab75f29a7df6e82285742f830d8ed1a ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add iWARP support in ll2 connections
Kalderon, Michal [Sun, 2 Jul 2017 07:29:24 +0000 (10:29 +0300)]
qed: Add iWARP support in ll2 connections

Orabug: 26783820

Add a new connection type for iWARP ll2 connections for setting
correct ll2 filters and connection type to FW.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit cc4ad324e7e247bb4979791dd4f2ff11419d9742 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Rename some ll2 related defines
Kalderon, Michal [Sun, 2 Jul 2017 07:29:23 +0000 (10:29 +0300)]
qed: Rename some ll2 related defines

Orabug: 26783820

Make some names more generic as they will be used by iWARP too.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 526d1d05e456c9cfc077694d18b5f521e2338f18 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Implement iWARP initialization, teardown and qp operations
Kalderon, Michal [Sun, 2 Jul 2017 07:29:22 +0000 (10:29 +0300)]
qed: Implement iWARP initialization, teardown and qp operations

Orabug: 26783820

This patch adds iWARP support for flows that have common code
between RoCE and iWARP, such as initialization, teardown and
qp setup verbs: create, destroy, modify, query.
It introduces the iWARP specific files qed_iwarp.[ch] and
iwarp_common.h

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 67b40dccc45ff5d488aad17114e80e00029fd854 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Introduce iWARP personality
Kalderon, Michal [Sun, 2 Jul 2017 07:29:21 +0000 (10:29 +0300)]
qed: Introduce iWARP personality

Orabug: 26783820

iWARP personality introduced the need for differentiating in several
places in the code whether we are RoCE, iWARP or either. This
leads to introducing new macros for querying the personality.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit c851a9dc4359c6b19722de568e9f543c1c23481c ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed*: qede_roce.[ch] -> qede_rdma.[ch]
Michal Kalderon [Tue, 20 Jun 2017 13:00:03 +0000 (16:00 +0300)]
qed*: qede_roce.[ch] -> qede_rdma.[ch]

Orabug: 26783820

Once we have iWARP support, the qede portion of the qedr<->qede would
serve all the RDMA protocols - so rename the file to be appropriate
to its function.

While we're at it, we're also moving a couple of inclusions to it into
.h files and adding includes to make sure it contains all type
definitions it requires.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit b262a06e642cfb1eeb6c2c772f76dad674ada57e ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Disable RoCE dpm when DCBx change occurs
Mintz, Yuval [Tue, 20 Jun 2017 13:00:02 +0000 (16:00 +0300)]
qed: Disable RoCE dpm when DCBx change occurs

Orabug: 26783820

If DCBx update occurs while QPs are open, stop sending edpms until all
QPs are closed.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 9331dad1bb7f3438c27e4f57136b6ad683d11fe0 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: RoCE EDPM to honor PFC
Mintz, Yuval [Tue, 20 Jun 2017 13:00:01 +0000 (16:00 +0300)]
qed: RoCE EDPM to honor PFC

Orabug: 26783820

Configure device according to DCBx results so that EDPMs
made by RoCE would honor flow-control.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 26462ad9c7ea18643f1a37adeab8b7eff6c5f5f4 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Chain support for external PBL
Mintz, Yuval [Tue, 20 Jun 2017 13:00:00 +0000 (16:00 +0300)]
qed: Chain support for external PBL

Orabug: 26783820

iWARP would require the chains to allocate/free their PBL memory
independently, so add the infrastructure to provide it externally.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 1a4a69751f4d24ffd3530f5a9694636db1566a3b ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Fix an off by one bug
Dan Carpenter [Wed, 14 Jun 2017 09:10:10 +0000 (12:10 +0300)]
qed: Fix an off by one bug

Orabug: 26783820

The p_l2_info->pp_qid_usage[] array has "p_l2_info->queues" elements so
the > here should be a >= or we write beyond the end of the array.

Fixes: bbe3f233ec5e ("qed: Assign a unique per-queue index to queue-cid")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 0331402aeaefe858709b0a4d44ade15f82d3a119 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: add qed_int_sb_init() stub function
Arnd Bergmann [Fri, 9 Jun 2017 10:37:35 +0000 (12:37 +0200)]
qed: add qed_int_sb_init() stub function

Orabug: 26783820

When CONFIG_QED_SRIOV is disabled, we get a build error:

drivers/net/ethernet/qlogic/qed/qed_int.c: In function 'qed_int_sb_init':
drivers/net/ethernet/qlogic/qed/qed_int.c:1499:4: error: implicit declaration of function 'qed_vf_set_sb_info'; did you mean 'qed_mcp_get_resc_info'? [-Werror=implicit-function-declaration]

All the other declarations have a 'static inline' stub as an alternative
here, so this adds one more for qed_int_sb_init.

Fixes: 50a207147fce ("qed: Hold a single array for SBs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 2f3ca449a4f9a54d2bf39c873269e68ad5f34acb ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: collect GSI port statistics
Mintz, Yuval [Fri, 9 Jun 2017 14:13:25 +0000 (17:13 +0300)]
qed: collect GSI port statistics

Orabug: 26783820

The LL2 statistics already have place holders for these, but haven't
populated them so far.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit fef1c3f7ac119217f49c72d4cc5413b4c87c1774 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Call rx_release_cb() when flushing LL2
Mintz, Yuval [Fri, 9 Jun 2017 14:13:24 +0000 (17:13 +0300)]
qed: Call rx_release_cb() when flushing LL2

Orabug: 26783820

Driver to inform the connection owner that the its buffers are being
released as part of a flush.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 54f19f07acb6f9a0e90a183a2fb347ed3856b154 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: No need for LL2 frags indication
Mintz, Yuval [Fri, 9 Jun 2017 14:13:23 +0000 (17:13 +0300)]
qed: No need for LL2 frags indication

Orabug: 26783820

This is a legacy leftover; There's no current flow where 'frags_mapped'
would be set.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit d2201a21598aa6ad47e23272119bc29e48201670 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed*: LL2 callback operations
Michal Kalderon [Fri, 9 Jun 2017 14:13:22 +0000 (17:13 +0300)]
qed*: LL2 callback operations

Orabug: 26783820

LL2 today is interrupt driven - when tx/rx completion arrives [or any
other indication], qed needs to operate on the connection and pass
the information to the protocol-driver [or internal qed consumer].
Since we have several flavors of ll2 employeed by the driver,
each handler needs to do an if-else to determine the right functionality
to use based on the connection type.

In order to make things more scalable [given that we're going to add
additional types of ll2 flavors] move the infrastrucutre into using
a callback-based approach - the callbacks would be provided as part
of the connection's initialization parameters.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 0518c12f1f79dc2f2020836974c577404e42ae89 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: LL2 code relocations
Mintz, Yuval [Fri, 9 Jun 2017 14:13:21 +0000 (17:13 +0300)]
qed: LL2 code relocations

Orabug: 26783820

Instead of having the OOO logic packetd, divide it with rest of code
according to establish/release flows.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 58de289807f02122ef7eca96e50365d2c1440902 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Cleaner seperation of LL2 inputs
Mintz, Yuval [Fri, 9 Jun 2017 14:13:20 +0000 (17:13 +0300)]
qed: Cleaner seperation of LL2 inputs

Orabug: 26783820

A LL2 connection [qed_ll2_info] has a sub-structure of type qed_ll2_conn
that contain various inputs for ll2 acquisition, but the connection also
utilizes a couple of other inputs.

Restructure the input structure to include all the inputs and refactor
the code necessary to populate those.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 13c547717231aad7e1635004ae3f698e5e78d6d1 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Revise ll2 Rx completion
Mintz, Yuval [Fri, 9 Jun 2017 14:13:19 +0000 (17:13 +0300)]
qed: Revise ll2 Rx completion

Orabug: 26783820

This introduces qed_ll2_comp_rx_data as a public struct
and moves handling of Rx packets in LL2 into using it.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 68be910cd2fa3f58587438af7ce3def6e03731fa ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: LL2 to use packed information for tx
Mintz, Yuval [Fri, 9 Jun 2017 14:13:18 +0000 (17:13 +0300)]
qed: LL2 to use packed information for tx

Orabug: 26783820

First step in revising the LL2 interface, this declares
qed_ll2_tx_pkt_info as part of the ll2 interface, and uses it for
transmission instead of receiving lots of parameters.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 7c7973b2ae277c6e89dceda2246fff2472c8ffdb ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: VFs to try utilizing the doorbell bar
Mintz, Yuval [Sun, 4 Jun 2017 10:31:07 +0000 (13:31 +0300)]
qed: VFs to try utilizing the doorbell bar

Orabug: 26783820

VFs are currently not mapping their doorbell bar, instead relying
on the small doorbell window they have in their limited regview bar.

In order to increase the number of possible Tx connections [queues]
employeed by VF past 16, we need to start using the doorbell bar if
one such is exposed - VF would communicate this fact to PF which would
return the size-bar internally configured into chip, according to
which the VF would decide whether to actually utilize the doorbell
bar.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 1a850bfc9e71871599ddbc0d4d4cffa2dc409855 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: IOV db support multiple queues per qzone
Mintz, Yuval [Sun, 4 Jun 2017 10:31:05 +0000 (13:31 +0300)]
qed: IOV db support multiple queues per qzone

Orabug: 26783820

Allow the infrastructure a PF maintains for each one of its VFs
to support multiple queue-cids on a single queue-zone.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 007bc37179c14a6d1ff1545695e2492b3a376bc1 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Make VF legacy a bitfield
Mintz, Yuval [Sun, 4 Jun 2017 10:31:04 +0000 (13:31 +0300)]
qed: Make VF legacy a bitfield

Orabug: 26783820

Until now we used to have a single VF legacy compatibility mode,
one that affected the place of the Rx producers of those VFs [mostly].

As PF would soon support allocating CIDs for VFs instead of having
a static CID<->queue configuration for them, we'll need to have
an additional legacy mode since existing VFs would need to continue
on using the older mode of operation.

Change the infrastrucutre so that the legacy would be able to indicate
which of the legacy behaviors is needed for a given VF.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 3b19f47820756f9905e7ef184747fbb3c8ed062f ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Assign a unique per-queue index to queue-cid
Mintz, Yuval [Sun, 4 Jun 2017 10:31:03 +0000 (13:31 +0300)]
qed: Assign a unique per-queue index to queue-cid

Orabug: 26783820

When a queue-cid is allocated, assign an index inside that's
CID's queue-zone.

For PFs and VFS, this number is going to be unique and derive
from a per-queue-zone bitmap, while for PF's VFs queues the
number is currently going to constant; Later, we'd add the
capability of a VF to communicate such an index to its PF.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit bbe3f233ec5ea99049f33471c0c0d0d2a78e2116 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Pass vf_params when creating a queue-cid
Mintz, Yuval [Sun, 4 Jun 2017 10:31:02 +0000 (13:31 +0300)]
qed: Pass vf_params when creating a queue-cid

Orabug: 26783820

We're going to need additional information for queue-cids
that a PF creates for its VFs, so start by refactoring existing
logic used for initializing said struct into receiving a structure
encapsulating the VF-specific information that needs to be provided.

This also introduces QED_QUEUE_CID_SELF - each queue-cid would hold
an indication to whether it belongs to the hw-function holding it
[whether that's a PF or a VF], or else what's the VF id it belongs
to.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 3946497aff655b9bb1807ef7e2ecbe799e6d832a ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed*: L2 interface to use the SB structures directly
Mintz, Yuval [Sun, 4 Jun 2017 10:31:01 +0000 (13:31 +0300)]
qed*: L2 interface to use the SB structures directly

Orabug: 26783820

Part of an effort of a cleaner seperation between qed and the protocol
drivers, the L2 interface is to use the SB structure for initialization
purposes opaquely.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit f604b17d7fdef574792a7e0b39f1b926d6b43d9d ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Create L2 queue database
Mintz, Yuval [Sun, 4 Jun 2017 10:31:00 +0000 (13:31 +0300)]
qed: Create L2 queue database

Orabug: 26783820

First step in allowing a single PF/VF to open multiple queues on
the same queue zone is to add per-hwfn database of queue-cids
as a two-dimensional array where entry would be according to
[queue zone][internal index].

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 0db711bb26209992da375730eab6b3cec1edee7a ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add bitmaps for VF CIDs
Mintz, Yuval [Sun, 4 Jun 2017 10:30:59 +0000 (13:30 +0300)]
qed: Add bitmaps for VF CIDs

Orabug: 26783820

Each PF has a bitmap for its own ranges of CIDs, to allow easy grabbing
of an available CID when such is needed. But VFs are not using the same
mechanism, instead relying on hard-coded CIDs [ queue-index == cid ].

As an infrastructure step toward increasing number of CIDs of VFs,
the PF is going to maintain bitmaps for the VF CIDs as well -
the bitmaps would be per-VF and the ranges would be the same [in HW all
VFs of a given PF have the same mapping of CIDs, and the HW is capable
of distinguishing between those according to the VF index]

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 6bea61da1716761c95cd32117be6004b0e14b4b2 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add support for changing iSCSI mac
Mintz, Yuval [Fri, 2 Jun 2017 05:58:33 +0000 (08:58 +0300)]
qed: Add support for changing iSCSI mac

Orabug: 26783820

Enhance API between qedi and qed, allowing qedi to inform device's
firmware when the iSCSI mac is to be changed.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit dc4528e9e890f82900d75ac6276aba8ce89a80b6 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Support NVM-image reading API
Mintz, Yuval [Fri, 2 Jun 2017 05:58:32 +0000 (08:58 +0300)]
qed: Support NVM-image reading API

Orabug: 26783820

Storage drivers require images from the nvram in boot-from-SAN
scenarios. This provides the necessary API between qed and the
protocol drivers to perform such reads.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 20675b37ee76d11430fd3d4da0851fc6a4e36abc ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Share additional information with qedf
Mintz, Yuval [Fri, 2 Jun 2017 05:58:31 +0000 (08:58 +0300)]
qed: Share additional information with qedf

Orabug: 26783820

Share several new tidbits with qedf:
 - wwpn & wwnn
 - Absolute pf-id [this one is actually meant for qedi as well]
 - Number of available CQs

While we're at it, now that qedf will be aware of the available CQs
we can add some validation on the inputs it provides.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 3c5da94278026a4583320f97f6547573fb3a93aa ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Correct order of wwnn and wwpn
Mintz, Yuval [Fri, 2 Jun 2017 05:58:30 +0000 (08:58 +0300)]
qed: Correct order of wwnn and wwpn

Orabug: 26783820

Driver reads values via HSI splitting this 8-byte into 2 32-bit
values and builds a single u64 field - but it does so by shifting
the lower field instead of the higher.
Luckily, we still don't use these fields for anything - but we're about
to start.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 5779675912fa87d8d0af651537acc0e312f06c70 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: No need to reset SBs on IOV init
Mintz, Yuval [Thu, 1 Jun 2017 12:29:11 +0000 (15:29 +0300)]
qed: No need to reset SBs on IOV init

Orabug: 26783820

Since we're resetting the IGU CAM each time we initialize the PF
device, there's no need to reset the VF SBs again when initializing
IOV.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 1ee240e31d4c0a5fd37ebaf064ca1f6cb6adcb6f ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Reset IGU CAM to default on init
Mintz, Yuval [Thu, 1 Jun 2017 12:29:10 +0000 (15:29 +0300)]
qed: Reset IGU CAM to default on init

Orabug: 26783820

The IGU CAM contains an assocaition between hardware SBs
and interrupt lines, and it can be dynamically configured
to allow more interrupts in one entity over another, specifically
for Re-distibution of SBs between a PF and its child VFs.

While we don't yet use this functionality, there are other
clients that do and as such its possible the information
passed from management firmware during initialization in
regard to the possible number of SBs doesn't accurately reflect
the current HW configuration.

The following changes are going to apply to the driver init sequence:

 a. PF is going to re-configure all entries belonging to itself and
    its child VFs in IGU CAM based on the management firmware info
    regarding the number of SBs that are supposed to exist there.

 b. PF is going to stop using the SB resource [management firmware
    provided information] for anything but the initialization.
    Instead, it would use the live-time counters it maintains for
    the numbers.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit ebbdcc669c7f9d8632d358a739d814485f8917dc ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Hold a single array for SBs
Mintz, Yuval [Thu, 1 Jun 2017 12:29:09 +0000 (15:29 +0300)]
qed: Hold a single array for SBs

Orabug: 26783820

A PF today holds 2 different arrays - one holding information
about the HW configuration and one holding information about
the SBs that are used by the protocol drivers.
These arrays aren't really connected - e.g., protocol driver
initializing a given SB would not mark the same SB as occupied
in the HW shadow array.

Move into a single array [at least for PFs] - hold the mapping
of the driver-protocol SBs on the HW entry which they configure.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 50a207147fceb64ad24c1e08e4a2a75535922e81 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Provide auxiliary for getting free VF SB
Mintz, Yuval [Thu, 1 Jun 2017 12:29:08 +0000 (15:29 +0300)]
qed: Provide auxiliary for getting free VF SB

Orabug: 26783820

IOV code is very intrusive in its manipulation of the status block
database.
Add a new auxiliary function to allow the PF to find an available unused
status block to configure for a specific VF's MSI-x vector.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 09b6b14749523e3660b72be2ed91b3c0b852f58f ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Remove assumption on SB order in IGU
Mintz, Yuval [Thu, 1 Jun 2017 12:29:07 +0000 (15:29 +0300)]
qed: Remove assumption on SB order in IGU

Orabug: 26783820

Current code assumes there's a known layout for SBs in the IGU,
where all the SBs of a single entity would be laid in consecutive
order of vectors.

While the assumption is still kept by management firmware, we already
have the necessary information to eliminate it, so no reason to keep
it in code.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 1ac72433c565c8db38fd1f9db80a73193369e5fc ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Encapsulate interrupt counters in struct
Mintz, Yuval [Thu, 1 Jun 2017 12:29:06 +0000 (15:29 +0300)]
qed: Encapsulate interrupt counters in struct

Orabug: 26783820

We already have an API struct that contains interrupt-related
numbers. Use it to encapsulate all information relating to the
status of SBs as (used|free).

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 726fdbe9fa7ebccda1579716f68f8bae6fa9c87a ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add aux. function translating sb_id -> igu_sb_id
Mintz, Yuval [Thu, 1 Jun 2017 12:29:05 +0000 (15:29 +0300)]
qed: Add aux. function translating sb_id -> igu_sb_id

Orabug: 26783820

An additional step for relaxing the IGU order assumption, we now add
an auxiliary function that can be used for finding the HW status block
that's associated with a given MSI-x vector.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit a333f7f3fd327d736a23c52aafcfe17c75f2610c ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Distinguish between sb_id and igu_sb_id
Mintz, Yuval [Thu, 1 Jun 2017 12:29:04 +0000 (15:29 +0300)]
qed: Distinguish between sb_id and igu_sb_id

Orabug: 26783820

In qed code, sb_id means 2 different things:
  - An interrupt vector [usually when received as a parameter from
    a protocol driver, but not only] that's associated with a status
    block.

  - An index to a status block entity existing in HW.

This patch renames the references to the HW entity, adding an 'igu_'
prefix to allow an easier distinction.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit d031548e9194714dc2e8cb928d9f671432c8a342 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: IGU read revised
Mintz, Yuval [Thu, 1 Jun 2017 12:29:03 +0000 (15:29 +0300)]
qed: IGU read revised

Orabug: 26783820

As a first step for relaxing various assumptions done by driver
about the IGU mapping, the driver is now going to read the entire
IGU into a shadow copy, and mark in its database each status block
that's relevant for it.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit d749dd0dc117e7b02fa3a169c431476d59d18950 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Minor refactoring in interrupt code
Mintz, Yuval [Thu, 1 Jun 2017 12:29:02 +0000 (15:29 +0300)]
qed: Minor refactoring in interrupt code

Orabug: 26783820

Separate the portions controlling interrupt enablement form those
controlling the ability of HW to generate attentions.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 979cead3deb9f938cd91aa9775744fe7275151c0 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Make qed_int_cau_conf_pi() static
Mintz, Yuval [Thu, 1 Jun 2017 12:29:01 +0000 (15:29 +0300)]
qed: Make qed_int_cau_conf_pi() static

Orabug: 26783820

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 8befd73c23c929c038dd85027ed60eb1a6e4c1e9 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Don't log missing periodic stats by default
Mintz, Yuval [Mon, 29 May 2017 08:24:49 +0000 (11:24 +0300)]
qed: Don't log missing periodic stats by default

Orabug: 26783820

Current implementation lacks the logic for providing management
firmware with RDMA-related statistics; [much] worse than that -
it logs such events by default to system logs.

Since the statistics' gathering is done periodically, using sufficiently
new management firmware the system logs would get filled with these
unnecessary prints.

For now, reduce the verbosity of the log so that it would not be
logged by default.

Fixes: 6c75424612a7 ("qed: Add support for NCSI statistics")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 512c7840cd692fdac0333684249753ebf3c819f9 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Cache alignemnt padding to match host
Mintz, Yuval [Mon, 29 May 2017 06:53:14 +0000 (09:53 +0300)]
qed: Cache alignemnt padding to match host

Orabug: 26783820

Improve PCI performance by adjusting padding sizes to match those of the
host machine's cacheline.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit fc6575bc498cb86e33a39a399355fd7e74ef2002 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Mask parities after occurance
Mintz, Yuval [Mon, 29 May 2017 06:53:13 +0000 (09:53 +0300)]
qed: Mask parities after occurance

Orabug: 26783820

Parities might exhibit a flood behavior since we re-enable the
attention line without preventing the parity from re-triggering the
assertion.
Mask the source in AEU until the parity would be handled.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 9790c35e9682e0e158653108cc6950f2be196c80 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Print multi-bit attentions properly
Mintz, Yuval [Mon, 29 May 2017 06:53:12 +0000 (09:53 +0300)]
qed: Print multi-bit attentions properly

Orabug: 26783820

In strucuture reflecting the AEU hw block some entries
represent multiple HW bits, and the associated name is in fact
a pattern.
Today, whenever such an attention would be asserted the resulted
prints would show the pattern string instead of indicating which
of the possible bits was set.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 6010179da3a27f4622eb40a731337fbdb8bbc713 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Diffrentiate adapter-specific attentions
Mintz, Yuval [Mon, 29 May 2017 06:53:11 +0000 (09:53 +0300)]
qed: Diffrentiate adapter-specific attentions

Orabug: 26783820

There are 4 attention bits in AEU that have different meaning
for QL45xxx and QL41xxx adapters.

Instead of doing a massive infrastructure change in favor of these
bits, we implement a point fix where only those four would change
meaning dependent on the adapter involved.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit ba36f718c7fedbf0b083faec5e3606d98b846cb7 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Get rid of the attention-arrays
Mintz, Yuval [Mon, 29 May 2017 06:53:10 +0000 (09:53 +0300)]
qed: Get rid of the attention-arrays

Orabug: 26783820

We have almost all the necessary information regarding attentions
in the logic employed for taking register dumps.
Add some more and get rid of the seperate implementation we have today
for identifying & printing various attention sources.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 0ebbd1c8d9424a341a21eb18170f4eff1f1f0670 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Support dynamic s-tag change
Mintz, Yuval [Mon, 29 May 2017 06:53:09 +0000 (09:53 +0300)]
qed: Support dynamic s-tag change

Orabug: 26783820

In case management firmware indicates a change in the used S-tag,
propagate the configuration to HW and FW.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 2a351fd9b9ffe4168409e9f6519e048581ba6a41 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: QL41xxx VF MSI-x table
Mintz, Yuval [Mon, 29 May 2017 06:53:08 +0000 (09:53 +0300)]
qed: QL41xxx VF MSI-x table

Orabug: 26783820

The QL41xxx adapters' PCI allows a single configuration for the
MSI-x table size of all child VFs of a given PF.
The existing code wouldn't cause the management firmware to set
that value, meaning the VFs would retain the default MSI-x table
size.

Introduce a new scheme so that whenever a VF is enabled, driver
would set the number of MSI-x to be the maximum over the various
VFs' needs.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 88072fd4002a9976063d8f2babd3d030bd6ae0f9 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Don't inherit RoCE DCBx for V2
Sudarsana Reddy Kalluru [Mon, 29 May 2017 06:53:07 +0000 (09:53 +0300)]
qed: Don't inherit RoCE DCBx for V2

Orabug: 26783820

Older firmware used by device didn't distinguish between RoCE and RoCE
V2 from DCBx configuration perspective, and as a result we've used to
take a the RoCE-related configuration and apply to it for both.

Since we now support configuring each its own values, there's no reason
to reflect [& configure] that both are using the same.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 38b23e43ee6f0903de989913884a2142bf8b3d7c ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Correct DCBx update scheme
Sudarsana Reddy Kalluru [Mon, 29 May 2017 06:53:06 +0000 (09:53 +0300)]
qed: Correct DCBx update scheme

Orabug: 26783820

Instead of using a boolean value that propagates to FW configuration,
use the proper firmware HSI values.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit dfc268f6c1ac485b12923059f9fac55ec0522bb7 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Add missing static/local dcbx info
Sudarsana Reddy Kalluru [Mon, 29 May 2017 06:53:05 +0000 (09:53 +0300)]
qed: Add missing static/local dcbx info

Orabug: 26783820

Some getters are not getting filled with the correct information
regarding local DCBx.

Fixes: 49632b5822ea ("qed: Add support for static dcbx.")
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 05930d18c8240482d6332c57b4aba87e846444c9 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Replace set_id() api with set_name()
Mintz, Yuval [Tue, 23 May 2017 06:41:28 +0000 (09:41 +0300)]
qed: Replace set_id() api with set_name()

Orabug: 26783820

Current API between qed and protocol modules allows passing an
additional private string - but it doesn't get utilized by qed
anywhere.

Clarify the API by removing it and renaming it 'set_name'.

CC: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 712c3cbf193fcadf0ba67da61432beb1a71e400b ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqede: Log probe of PCI device
Mintz, Yuval [Tue, 23 May 2017 06:41:27 +0000 (09:41 +0300)]
qede: Log probe of PCI device

Orabug: 26783820

Replace meaningless logged print ('Ending successfully qede probe')
with a single-liner containing interesting information about probed
device.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 6bc9f234ff75c15144fb9bc28d828a5ca11cd0a2 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Provide MBI information in dev_info
Tomer Tayar [Tue, 23 May 2017 06:41:26 +0000 (09:41 +0300)]
qed: Provide MBI information in dev_info

Orabug: 26783820

Pass additional information about package installed on persistent memory
so that protocol drivers would be able to log it.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit ae33666ab89675968d77753d18452b1ef654c43a ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Enable RoCE parser searching on fp init
Michal Kalderon [Tue, 23 May 2017 06:41:25 +0000 (09:41 +0300)]
qed: Enable RoCE parser searching on fp init

Orabug: 26783820

Since we're closing the parser searching for RDMA when stoping the
fastpath, we need to re-enable it when starting the fastpath once again.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit f855df220238436d10c3de67da0b1a280a2092b4 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Flush slowpath tasklet on stop
Tomer Tayar [Tue, 23 May 2017 06:41:24 +0000 (09:41 +0300)]
qed: Flush slowpath tasklet on stop

Orabug: 26783820

Today, driver has a synchronization point while closing
the device which synchronizes its slowpath interrupt line.
However, that's insufficient as that ISR would schedule the
slowpath-tasklet - so even after ISR is over it's possible the
handling of the interrupt has not completed.

By doing a disable/enable on the taskelt we guarantee that all
HW events that should no longer be genereated from that point
onward in the flow are truly behind us.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 06892f2ea2bd6b146707e4ab367aa5b20eac0ba7 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Remove BB_A0 references
Mintz, Yuval [Tue, 23 May 2017 06:41:23 +0000 (09:41 +0300)]
qed: Remove BB_A0 references

Orabug: 26783820

A0 never went public, so no need to protect against it.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit c31a314b2346819531d3a6585988cef32171312e ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Drop the 's' from num_ports_in_engines
Tomer Tayar [Tue, 23 May 2017 06:41:22 +0000 (09:41 +0300)]
qed: Drop the 's' from num_ports_in_engines

Orabug: 26783820

The parameter reflects the number of physical ports connected to a single
engine, not all.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 78cea9ffaa34d289212a2444c2e357f7dabcf674 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: Log incorrectly installed board
Tomer Tayar [Tue, 23 May 2017 06:41:21 +0000 (09:41 +0300)]
qed: Log incorrectly installed board

Orabug: 26783820

In case nvram layout of board is incorrect, board may exhibit peculiar
oddities. Log such a rare event.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit fc561c8bfe831c1509b7f6af3f45fbea78632539 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
7 years agoqed: !main_ptt for tunnel configuration
Manish Chopra [Tue, 23 May 2017 06:41:20 +0000 (09:41 +0300)]
qed: !main_ptt for tunnel configuration

Orabug: 26783820

Flows configuring tunnel ports in HW use the main_ptt which should
be reserved for core-functionality.

Signed-off-by: Manish Chopra <Manish.Chopra@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 4f64675fac061746be112047fab5979e86768a08 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>