[PATCH 1/2] habanalabs: update email address in sysfs/debugfs docs

2021-01-12 Thread Oded Gabbay
Use my kernel.org address for contact point instead of my private email address. Signed-off-by: Oded Gabbay --- .../ABI/testing/debugfs-driver-habanalabs | 44 +++--- .../ABI/testing/sysfs-driver-habanalabs | 58 +-- 2 files changed, 51 insertions(+), 51

[git pull] habanalabs fixes for 5.11-rc4

2021-01-12 Thread Oded Gabbay
unmappings to prevent that. Oded Gabbay (3): habanalabs: fix dma_addr passed to dma_mmap_coherent habanalabs: fix reset process in case of failures habanalabs: prevent soft lockup during unmap drivers/misc/habanalabs

Re: [PATCH] habanalabs: Fix a loop in gaudi_extract_ecc_info()

2020-08-05 Thread Oded Gabbay
> - for (i = 0 ; i > num_mem_regs ; i++) { > + for (i = 0 ; i < num_mem_regs ; i++) { > err_addr += i * 4; > err_word = RREG32(err_addr); > if (err_word) { > -- > 2.27.0 > This patch is: Reviewed-by: Oded Gabbay Thanks! Applied to -fixes

[PATCH 2/2] habanalabs: remove security from ARB_MST_QUIET register

2020-08-05 Thread Oded Gabbay
From: farah kassabri Allow user application to write to this register in order to be able to configure the quiet period of the QMAN between grants. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/gaudi/gaudi_security.c| 55

[PATCH 1/2] habanalabs: PCIe Advanced Error Reporting support

2020-08-05 Thread Oded Gabbay
From: Ofir Bitton driver will now get notified upon any PCI error occurred and will respond according to the severity of the error. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/habanalabs_drv.c | 76 ++- 1

Re: [PATCH 1/2] mm/frame-vec: Drop gup_flags from get_vaddr_frames()

2020-10-02 Thread Oded Gabbay
> > Cc: Pawel Osciak > > Cc: Marek Szyprowski > > Cc: Tomasz Figa > > Cc: Andrew Morton > > Cc: Oded Gabbay > > Cc: Omer Shpigelman > > Cc: Tomer Tayar > > Cc: Greg Kroah-Hartman > > Cc: Pawel Piskorski > > Cc: linux-arm-ker...@lis

Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM

2020-10-03 Thread Oded Gabbay
On Sat, Oct 3, 2020 at 2:31 AM Jason Gunthorpe wrote: > > On Fri, Oct 02, 2020 at 08:16:48PM +0200, Daniel Vetter wrote: > > On Fri, Oct 2, 2020 at 8:06 PM Jason Gunthorpe wrote: > > > On Fri, Oct 02, 2020 at 07:53:03PM +0200, Daniel Vetter wrote: > > > > For $reasons I've stumbled over this

Re: [PATCH][next] habanalabs: fix incorrect check on failed workqueue create

2020-08-09 Thread Oded Gabbay
On Fri, Jul 31, 2020 at 9:21 AM Greg Kroah-Hartman wrote: > > On Thu, Jul 30, 2020 at 01:51:48PM +0300, Oded Gabbay wrote: > > On Thu, Jul 30, 2020 at 11:20 AM Colin King > > wrote: > > > > > > From: Colin Ian King > > > > > > The nul

[PATCH 2/4] habanalabs: set clock gating according to mask

2020-08-09 Thread Oded Gabbay
From: Ofir Bitton Once clock gating is set we enable clock gating according to mask, we should also disable clock gating according to relevant bits. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 44

[PATCH 1/4] habanalabs: verify user input in cs_ioctl_signal_wait

2020-08-09 Thread Oded Gabbay
From: Ofir Bitton User input must be validated before using it to access internal structures. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/command_submission.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 4/4] habanalabs: set max power according to card type

2020-08-09 Thread Oded Gabbay
In Gaudi, the default max power setting is different between PCI and PMC cards. Therefore, the driver need to set the default after knowing what is the card type. The current code has a bug where it limits the maximum power of the PMC card to 200W after a reset occurs. Signed-off-by: Oded Gabbay

[PATCH 3/4] habanalabs: proper handling of alloc size in coresight

2020-08-09 Thread Oded Gabbay
From: Ofir Bitton Allocation size can go up to 64bit but truncated to 32bit, we should make sure it is not truncated and validate no address overflow. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 2

[PATCH] habanalabs: print the queue id in case of an error

2020-08-09 Thread Oded Gabbay
From: Dotan Barak If there is a failure during the testing of a queue, to ease up debugging - print the queue id. Signed-off-by: Dotan Barak Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 9 ++--- drivers/misc/habanalabs/goya/goya.c | 9

Re: [PATCH][next] habanalabs: fix incorrect check on failed workqueue create

2020-08-09 Thread Oded Gabbay
On Sun, Aug 9, 2020 at 3:02 PM Greg Kroah-Hartman wrote: > > On Sun, Aug 09, 2020 at 02:02:18PM +0300, Oded Gabbay wrote: > > On Fri, Jul 31, 2020 at 9:21 AM Greg Kroah-Hartman > > wrote: > > > > > > On Thu, Jul 30, 2020 at 01:51:48PM +0300, Oded Gabbay wrote

Re: [PATCH] habanalabs/gaudi: use correct define for qman init

2020-09-29 Thread Oded Gabbay
On Fri, Sep 25, 2020 at 8:14 PM Oded Gabbay wrote: > > There was a copy-paste error, and the wrong define was used for > initializing the QMAN. > > Signed-off-by: Oded Gabbay > --- > drivers/misc/habanalabs/gaudi/gaudi.c | 2 +- > 1 file changed, 1 insertion(+), 1 de

Re: [PATCH v2 03/17] misc/habana: Stop using frame_vector helpers

2020-10-10 Thread Oded Gabbay
On Sun, Oct 11, 2020 at 12:41 AM Daniel Vetter wrote: > > On Sat, Oct 10, 2020 at 11:32 PM Daniel Vetter wrote: > > > > On Sat, Oct 10, 2020 at 10:27 PM Oded Gabbay wrote: > > > > > > On Fri, Oct 9, 2020 at 10:59 AM Daniel Vetter > > > wrote:

Re: [PATCH v2 03/17] misc/habana: Stop using frame_vector helpers

2020-10-10 Thread Oded Gabbay
on Gunthorpe > Cc: Andrew Morton > Cc: John Hubbard > Cc: Jérôme Glisse > Cc: Jan Kara > Cc: Dan Williams > Cc: linux...@kvack.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-samsung-...@vger.kernel.org > Cc: linux-me...@vger.kernel.org > Cc: Oded Gabbay

[PATCH 3/3] habanalabs: add indication of security-enabled F/W

2020-09-16 Thread Oded Gabbay
need this very early in our code, the read of the preboot version is moved to the earliest possible place, right after the device's PCI initialization. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/firmware_if.c | 55 +--- drivers/misc/habanalabs/common

[PATCH 2/3] habanalabs/gaudi: fix DMA completions max outstanding to 15

2020-09-16 Thread Oded Gabbay
This is a workaround for H/W bug H3-2116, where if there are more than 16 outstanding completions in the DMA transpose engine, there can be a deadlock in the engine. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 1/3] habanalabs/gaudi: remove axi drain support

2020-09-16 Thread Oded Gabbay
AXI drain is broken in GAUDI so remove support for enabling it. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index

[PATCH 2/3] habanalabs: check correct vmalloc return code

2020-08-12 Thread Oded Gabbay
From: Ofir Bitton vmalloc can return different return code than NULL and a valid pointer. We must validate it in order to dereference a non valid pointer. Signed-off-by: Ofir Bitton Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/memory.c | 9 +++-- drivers/misc/habanalabs

[PATCH 3/3] habanalabs: correctly report inbound pci region cfg error

2020-08-12 Thread Oded Gabbay
From: Ofir Bitton During inbound iATU configuration we can get errors while configuring PCI registers, there is a certain scenario in which these errors are not reflected and driver is loaded with wrong configuration. Signed-off-by: Ofir Bitton Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH 1/3] habanalabs: validate FW file size

2020-08-12 Thread Oded Gabbay
From: Ofir Bitton We must validate FW size in order not to corrupt memory in case a malicious FW file will be present in system. Signed-off-by: Ofir Bitton Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/firmware_if.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v2 1/2] habanalabs: Replace dma-fence mechanism with completions

2020-08-03 Thread Oded Gabbay
Vetter Reviewed-by: Oded Gabbay Reviewed-by: Daniel Vetter Signed-off-by: Oded Gabbay --- Changes in v2: - Replace kfree_rcu with regular kfree .../habanalabs/common/command_submission.c| 95 +-- drivers/misc/habanalabs/common/context.c | 13 +-- drivers/misc/habanalabs

[PATCH v2 2/2] habanalabs: add information about PCIe controller

2020-08-03 Thread Oded Gabbay
Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Properly cast message variables sent to device CPU when fetching PCI throughput counters drivers/misc/habanalabs/common/firmware_if.c | 48 +++ drivers/misc/habanalabs/common/habanalabs.h | 4

[PATCH] habanalabs: increase length of ASIC name

2020-08-03 Thread Oded Gabbay
Future ASIC names are longer than 15 chars so increase the variable length to 32 chars. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/habanalabs/common/habanalabs.h b/drivers/misc

[PATCH 1/2] habanalabs: Validate user address before mapping

2020-08-03 Thread Oded Gabbay
From: Ofir Bitton User address must be validated before driver performs address map. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/command_buffer.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions

[PATCH 2/2] habanalabs: validate packet id during CB parse

2020-08-03 Thread Oded Gabbay
From: Ofir Bitton During command buffer parsing, driver extracts packet id from user buffer. Driver must validate this packet id, since it is being used in order to extract information from internal structures. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay

[PATCH v3 1/2] habanalabs: Replace dma-fence mechanism with completions

2020-08-03 Thread Oded Gabbay
Vetter Reviewed-by: Oded Gabbay Reviewed-by: Daniel Vetter Signed-off-by: Oded Gabbay --- Changes in v3: - mark two internal functions as static .../habanalabs/common/command_submission.c| 95 +-- drivers/misc/habanalabs/common/context.c | 13 +-- drivers/misc/habanalabs

[PATCH v3 2/2] habanalabs: add information about PCIe controller

2020-08-03 Thread Oded Gabbay
Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/firmware_if.c | 48 +++ drivers/misc/habanalabs/common/habanalabs.h | 4 ++ .../misc/habanalabs/common/habanalabs_ioctl.c | 41 drivers/misc/habanalabs/gaudi/gaudi.c

[PATCH] habanalabs: expose sync manager resources allocation in INFO IOCTL

2020-08-03 Thread Oded Gabbay
it statically. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 6 .../misc/habanalabs/common/habanalabs_ioctl.c | 30 ++- drivers/misc/habanalabs/gaudi/gaudi.c | 7 + include/uapi

Re: [PATCH] habanalabs: Fix memory corruption in debugfs

2020-08-03 Thread Oded Gabbay
\n", val); > + sprintf(tmp_buf, "0x%02lx\n", val); > rc = simple_read_from_buffer(buf, count, ppos, tmp_buf, > strlen(tmp_buf)); > > -- > 2.27.0 > This patch is: Reviewed-by: Oded Gabbay Applied to -fixes, Thanks! Oded

[git pull] habanalabs fixes pull request for kernel 5.9-rc2/3

2020-08-22 Thread Oded Gabbay
in gaudi_extract_ecc_info() Oded Gabbay (1): habanalabs: set max power according to card type Ofir Bitton (9): habanalabs: unmap PCI bars upon iATU failure habanalabs: Validate user address before mapping habanalabs: validate packet id during CB parse habanalabs: verify user

Re: [PATCH] habanalabs: Include linux/bitfield.h only in habanalabs.h

2020-08-22 Thread Oded Gabbay
ude/gaudi/gaudi_masks.h > b/drivers/misc/habanalabs/include/gaudi/gaudi_masks.h > index 3d4f9aed41f1..504f3ad711b5 100644 > --- a/drivers/misc/habanalabs/include/gaudi/gaudi_masks.h > +++ b/drivers/misc/habanalabs/include/gaudi/gaudi_masks.h > @@ -9,7 +9,6 @@ > #define GAUDI_MASKS_H_ > > #include "asic_reg/gaudi_regs.h" > -#include > > /* Useful masks for bits in various registers */ > #define PCI_DMA_QMAN_ENABLE(\ > -- > 2.17.1 > This patch is: Reviewed-by: Oded Gabbay

Re: [RFC PATCH] habanalabs: goya: make use of dma_mmap_coherent

2020-08-22 Thread Oded Gabbay
On Mon, Aug 17, 2020 at 4:48 PM Hillf Danton wrote: > > > Add dma_mmap_coherent() to match dma_alloc_coherent(), see the Link tag > for why. > > Link: https://lore.kernel.org/lkml/20200609091727.ga23...@lst.de/ > Signed-off-by: Hillf Danton > --- > > ---

[PATCH 2/2] habanalabs: update GAUDI hardware specs

2020-08-22 Thread Oded Gabbay
Add define for the 2 MME slave engines. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/include/gaudi/gaudi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/habanalabs/include/gaudi/gaudi.h b/drivers/misc/habanalabs/include/gaudi/gaudi.h index 8829891d3eef

[PATCH 1/2] habanalabs: add support for getting device total energy

2020-08-22 Thread Oded Gabbay
From: farah kassabri Add driver implementation for reading the total energy consumption from the device ARM FW. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/firmware_if.c | 24 +++ drivers/misc

Re: [RFC PATCH] habanalabs: goya: make use of dma_mmap_coherent

2020-08-23 Thread Oded Gabbay
On Sun, Aug 23, 2020 at 2:32 AM Hillf Danton wrote: > > > On Sat, 22 Aug 2020 19:10:07 +0300 Oded Gabbay wrote: > > On Mon, Aug 17, 2020 at 4:48 PM Hillf Danton wrote: > > > > > > > > > Add dma_mmap_coherent() to match dma_alloc_coherent(), see the Link

Re: [RFC PATCH] habanalabs: goya: make use of dma_mmap_coherent

2020-08-23 Thread Oded Gabbay
On Sun, Aug 23, 2020 at 11:19 AM Hillf Danton wrote: > > > On Sun, 23 Aug 2020 10:01:59 +0300 Oded Gabbay wrote: > > > > One more small thing, can you please change the error message content > > from "remap_pfn_range error" to "dma_mmap_coherent error&q

[PATCH v2 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-12 Thread Oded Gabbay
Hello, This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver. Modifications were made following reviews of the first version and are detailed in the commit message of each patch that was changed. A general note I want to write here is that I

[PATCH v2 06/14] habanalabs/gaudi: add NIC PHY code

2020-09-12 Thread Oded Gabbay
quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse

[PATCH v2 08/14] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-12 Thread Oded Gabbay
ed opcodes are: - Create a QP - Set requester context - Set responder context - Destroy a QP Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree - Set QPC REQ burst size to 16. The QPC requester

[PATCH v2 13/14] habanalabs/gaudi: support DCB protocol

2020-09-12 Thread Oded Gabbay
Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree drivers/misc/habanalabs/gaudi/Makefile| 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 ++ 3

[PATCH v2 11/14] habanalabs/gaudi: add QP error handling

2020-09-12 Thread Oded Gabbay
). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree drivers/misc/habanalabs/gaudi/gaudi.c | 13 drivers/misc/habanalabs/gaudi/gaudiP.h| 1 + drivers/misc/habanalabs/gaudi

[PATCH v2 14/14] habanalabs/gaudi: add NIC init/fini calls from common code

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized. Call the NIC init/fini from the common code. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-12 Thread Oded Gabbay
strings. - get_sset_count: get counters number. - get_ethtool_stats: get counters values. - get_module_info: get EEPROM type and length. - get_module_eeprom: get EEPROM (supported in raw mode only). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes

[PATCH v2 10/14] habanalabs/gaudi: add WQ control operations

2020-09-12 Thread Oded Gabbay
in the HW. The user should provide the device virtual address of the WQ. - Unset WQ: reset the WQ configuration in the HW. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree .../misc

[PATCH v2 09/14] habanalabs/gaudi: add CQ control operations

2020-09-12 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi

[PATCH v2 07/14] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH v2 02/14] habanalabs/gaudi: add NIC firmware-related definitions

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/common

[PATCH v2 04/14] habanalabs/gaudi: add support for NIC QMANs

2020-09-12 Thread Oded Gabbay
on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs

[PATCH v2 05/14] habanalabs/gaudi: add NIC Ethernet support

2020-09-12 Thread Oded Gabbay
at the beginning of the reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Remove nic_debugfs_reset flag - Remove kernel parameter of nic_rx_poll - Fix all instances of reverse Christmas tree - Remove obsolete TODOs - Add

Re: [PATCH v2 08/14] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-12 Thread Oded Gabbay
On Sat, Sep 12, 2020 at 6:07 PM Randy Dunlap wrote: > > Hi, > > On 9/12/20 7:41 AM, Oded Gabbay wrote: > > +#define HL_IOCTL_NIC _IOWR('H', 0x07, struct hl_nic_args) > > > ioctl numbers ('H') should be documented in > Documentation/userspace-api/ioctl/ioctl-number.rs

Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-13 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 4:39 AM Florian Fainelli wrote: > > > > On 9/12/2020 7:41 AM, Oded Gabbay wrote: > > From: Omer Shpigelman > > > > The driver supports ethtool callbacks and provides statistics using the > > device's profiling infrastructure (coresight)

Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-13 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 4:37 AM Andrew Lunn wrote: > > > +static int gaudi_nic_get_module_eeprom(struct net_device *netdev, > > + struct ethtool_eeprom *ee, u8 *data) > > +{ > > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > > + struct

Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-14 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 11:07 PM Jakub Kicinski wrote: > > On Mon, 14 Sep 2020 03:24:13 +0200 Andrew Lunn wrote: > > > +static void gaudi_nic_get_internal_stats(struct net_device *netdev, u64 > > > *data) > > > +{ > > > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > > > + struct

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-19 Thread Oded Gabbay
On Sat, Sep 19, 2020 at 11:30 AM Greg Kroah-Hartman wrote: > > On Sat, Sep 19, 2020 at 11:20:03AM +0300, Leon Romanovsky wrote: > > On Sat, Sep 19, 2020 at 08:40:20AM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Sep 18, 2020 at 03:19:05PM +0300, Leon Romanovsky wrote: > > > > > So we do have an

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-20 Thread Oded Gabbay
On Sun, Sep 20, 2020 at 11:47 AM Greg Kroah-Hartman wrote: > > On Sat, Sep 19, 2020 at 04:22:35PM -0300, Jason Gunthorpe wrote: > > On Sat, Sep 19, 2020 at 07:27:30PM +0200, Greg Kroah-Hartman wrote: > > > > It's probably heresy, but why do I need to integrate into the RDMA > > > > subsystem ? >

[PATCH 15/15] habanalabs/gaudi: add NIC init/fini calls from common code

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized. Call the NIC init/fini from the common code. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
This patch-set adds support for initializing and using the GAUDI NIC ports, functioning as scale-out interconnect when doing distributed Deep Learning training. The training can be performed over tens of thousands of GAUDIs and it is done using the RDMA-over-converged-Ethernet (RoCE) v2 protocol.

[PATCH 08/15] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-10 Thread Oded Gabbay
ed opcodes are: - Create a QP - Set requester context - Set responder context - Destroy a QP Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 98

[PATCH 07/15] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 06/15] habanalabs/gaudi: add NIC PHY code

2020-09-10 Thread Oded Gabbay
quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile|2

[PATCH 07/15] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 15/15] habanalabs/gaudi: add NIC init/fini calls from common code

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized. Call the NIC init/fini from the common code. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH 06/11] habanalabs/gaudi: increase timeout for boot fit load

2020-09-10 Thread Oded Gabbay
The firmware running in the boot stage takes more time to execute due to increased security mechanisms. Therefore, we need to increase the timeout we wait for the boot fit to finish loading. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudiP.h | 2 +- 1 file changed, 1

[PATCH 05/11] habanalabs: add debugfs support for MMU with 6 HOPs

2020-09-10 Thread Oded Gabbay
From: Moti Haimovski This commit modify the existing debugfs code to support future devices that have a 6 HOPs MMU implementation instead of 5 HOPs implementation. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/debugfs.c

[PATCH 09/11] habanalabs: Save context in a command buffer object

2020-09-10 Thread Oded Gabbay
From: Tomer Tayar Future changes require using a context while handling a command buffer, and thus need to save the context in the command buffer object. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/command_buffer.c | 22

[PATCH 10/11] habanalabs: Add an option to map CB to device MMU

2020-09-10 Thread Oded Gabbay
only if a dedicated VA range was allocated for the specific ASIC. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/command_buffer.c | 197 +- drivers/misc/habanalabs/common/context.c | 12 +- drivers/misc

[PATCH 11/11] habanalabs: update firmware interface file

2020-09-10 Thread Oded Gabbay
Add new packet to fetch PLL information from firmware. This will be needed in the future when the driver won't be able to access the PLL registers directly Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/common/cpucp_if.h | 25 +++ 1 file changed, 25 insertions

[PATCH 08/11] habanalabs: no need for DMA_SHARED_BUFFER

2020-09-10 Thread Oded Gabbay
Now that the driver no longer uses dma_buf, we can remove the select of DMA_SHARED_BUFFER from kconfig. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/misc/habanalabs/Kconfig b/drivers/misc/habanalabs/Kconfig index

[PATCH 07/11] habanalabs: allow to wait on CS without sleep

2020-09-10 Thread Oded Gabbay
, the driver won't sleep at all but return immediately after checking if the CS has finished. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/command_submission.c | 7 +-- include/uapi/misc/habanalabs.h | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff

[PATCH 04/11] habanalabs: add num_hops to hl_mmu_properties

2020-09-10 Thread Oded Gabbay
From: Moti Haimovski This commit adds the number of HOPs supported by the device to the device MMU properties. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 6 ++ drivers/misc/habanalabs

[PATCH 02/11] habanalabs: rename mmu.c to mmu_v1.c

2020-09-10 Thread Oded Gabbay
From: Moti Haimovski In the future we will have MMU v2 code, so we need to prepare the driver for it. The first step is to rename the current MMU file to mmu_v1.c. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/Makefile

[PATCH 01/11] habanalabs: use smallest possible alignment for virtual addresses

2020-09-10 Thread Oded Gabbay
Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/memory.c | 86 ++--- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index

[PATCH 03/11] habanalabs: refactor MMU as device-oriented

2020-09-10 Thread Oded Gabbay
From: Moti Haimovski As preparation to MMU v2, rework MMU to be device oriented instantiated according to the device in hand. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/Makefile | 2 +- drivers/misc/habanalabs

[PATCH 09/15] habanalabs/gaudi: add CQ control operations

2020-09-10 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h

[PATCH 11/15] habanalabs/gaudi: add QP error handling

2020-09-10 Thread Oded Gabbay
). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 13 drivers/misc/habanalabs/gaudi/gaudiP.h| 1 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 93 +++ 3 files changed, 107

[PATCH 13/15] habanalabs/gaudi: Add ethtool support using coresight

2020-09-10 Thread Oded Gabbay
strings. - get_sset_count: get counters number. - get_ethtool_stats: get counters values. - get_module_info: get EEPROM type and length. - get_module_eeprom: get EEPROM (supported in raw mode only). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers

[PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
for reconfiguring the link - nic_pam4_tx_taps: configure PAM4 TX taps - nic_polarity: configure polarity for NIC port lanes - nic_check_link: configure whether to check the PCS link periodically - nic_phy_auto_neg_lpbk: enable PHY auto-negotiation loopback Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay

[PATCH 06/15] habanalabs/gaudi: add NIC PHY code

2020-09-10 Thread Oded Gabbay
quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile|2

[PATCH 05/15] habanalabs/gaudi: add NIC Ethernet support

2020-09-10 Thread Oded Gabbay
at the beginning of the reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/context.c |1 + drivers/misc/habanalabs/common/firmware_if.c | 44 + drivers/misc/habanalabs/common/habanalabs.h | 13 +- .../misc

[PATCH 04/15] habanalabs/gaudi: add support for NIC QMANs

2020-09-10 Thread Oded Gabbay
on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs

[PATCH 10/15] habanalabs/gaudi: add WQ control operations

2020-09-10 Thread Oded Gabbay
in the HW. The user should provide the device virtual address of the WQ. - Unset WQ: reset the WQ configuration in the HW. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/habanalabs_ioctl.c | 10 +- drivers/misc/habanalabs

[PATCH 14/15] habanalabs/gaudi: support DCB protocol

2020-09-10 Thread Oded Gabbay
Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile| 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 ++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode

[PATCH 02/15] habanalabs/gaudi: add NIC firmware-related definitions

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/common

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 6:54 PM Greg KH wrote: > > On Thu, Sep 10, 2020 at 06:03:13PM +0300, Oded Gabbay wrote: > > This patch-set adds support for initializing and using the GAUDI NIC ports, > > functioning as scale-out interconnect when doing distributed Deep Learning > >

[PATCH 14/15] habanalabs/gaudi: support DCB protocol

2020-09-10 Thread Oded Gabbay
Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile| 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 ++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode

[PATCH 08/15] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-10 Thread Oded Gabbay
ed opcodes are: - Create a QP - Set requester context - Set responder context - Destroy a QP Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 98

[PATCH 10/15] habanalabs/gaudi: add WQ control operations

2020-09-10 Thread Oded Gabbay
in the HW. The user should provide the device virtual address of the WQ. - Unset WQ: reset the WQ configuration in the HW. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/habanalabs_ioctl.c | 10 +- drivers/misc/habanalabs

[PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
for reconfiguring the link - nic_pam4_tx_taps: configure PAM4 TX taps - nic_polarity: configure polarity for NIC port lanes - nic_check_link: configure whether to check the PCS link periodically - nic_phy_auto_neg_lpbk: enable PHY auto-negotiation loopback Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay

[PATCH 13/15] habanalabs/gaudi: Add ethtool support using coresight

2020-09-10 Thread Oded Gabbay
strings. - get_sset_count: get counters number. - get_ethtool_stats: get counters values. - get_module_info: get EEPROM type and length. - get_module_eeprom: get EEPROM (supported in raw mode only). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers

[PATCH 11/15] habanalabs/gaudi: add QP error handling

2020-09-10 Thread Oded Gabbay
). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 13 drivers/misc/habanalabs/gaudi/gaudiP.h| 1 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 93 +++ 3 files changed, 107

[PATCH 09/15] habanalabs/gaudi: add CQ control operations

2020-09-10 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h

[PATCH 05/15] habanalabs/gaudi: add NIC Ethernet support

2020-09-10 Thread Oded Gabbay
at the beginning of the reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/context.c |1 + drivers/misc/habanalabs/common/firmware_if.c | 44 + drivers/misc/habanalabs/common/habanalabs.h | 13 +- .../misc

[PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
This patch-set adds support for initializing and using the GAUDI NIC ports, functioning as scale-out interconnect when doing distributed Deep Learning training. The training can be performed over tens of thousands of GAUDIs and it is done using the RDMA-over-converged-Ethernet (RoCE) v2 protocol.

[PATCH 04/15] habanalabs/gaudi: add support for NIC QMANs

2020-09-10 Thread Oded Gabbay
on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs

[PATCH 02/15] habanalabs/gaudi: add NIC firmware-related definitions

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/common

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:23 +0300 Oded Gabbay wrote: > > From: Omer Shpigelman > > > > Add several debugfs entries to help us debug the NIC engines and ports and > > also the communication layer of the DL

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.c > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.h > > create mode 100644

<    2   3   4   5   6   7   8   9   10   11   >