[Intel-wired-lan] [PATCH iwl-net v1 0/2] ice: Reset procedure fixes

2024-07-15 Thread Sergey Temerkhanov
Fixes preventing possible races between resets (CORER etc)
and OICR ISR invocation / PTP hardware access


Grzegorz Nitka (2):
  ice: Fix reset handler
  ice: Skip PTP HW writes during PTP reset procedure

 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 drivers/net/ethernet/intel/ice/ice_ptp.c  | 4 
 2 files changed, 6 insertions(+)

-- 
2.43.0



[Intel-wired-lan] [PATCH iwl-net v1 1/2] ice: Fix reset handler

2024-07-15 Thread Sergey Temerkhanov
From: Grzegorz Nitka 

Synchronize OICR IRQ when preparing for reset to avoid potential
race conditions between the reset procedure and OICR

Signed-off-by: Grzegorz Nitka 
Signed-off-by: Sergey Temerkhanov 
Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Reviewed-by: Przemek Kitszel 
---
 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c 
b/drivers/net/ethernet/intel/ice/ice_main.c
index e2990993b16f..3405fe749b25 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -560,6 +560,8 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req 
reset_type)
if (test_bit(ICE_PREPARED_FOR_RESET, pf->state))
return;
 
+   synchronize_irq(pf->oicr_irq.virq);
+
ice_unplug_aux_dev(pf);
 
/* Notify VFs of impending reset */
-- 
2.43.0



[Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: Skip PTP HW writes during PTP reset procedure

2024-07-15 Thread Sergey Temerkhanov
From: Grzegorz Nitka 

Block HW write access for the driver while the device is in reset to
avoid potential race condition and access to the PTP HW in
non-nominal state which could lead to undesired effects

Signed-off-by: Grzegorz Nitka 
Co-developed-by: Karol Kolacinski 
Signed-off-by: Karol Kolacinski 
Signed-off-by: Sergey Temerkhanov 
Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Reviewed-by: Przemek Kitszel 
---
 drivers/net/ethernet/intel/ice/ice_ptp.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c 
b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 85b19e94e2ed..1f365bd6f525 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -1420,6 +1420,10 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, 
bool linkup)
/* Update cached link status for this port immediately */
ptp_port->link_up = linkup;
 
+   /* Skip HW writes if reset is in progress */
+   if (pf->hw.reset_ongoing)
+   return;
+
switch (ice_get_phy_model(hw)) {
case ICE_PHY_E810:
/* Do not reconfigure E810 PHY */
-- 
2.43.0



Re: [Intel-wired-lan] [PATCH iwl-next v4 0/4] igb: Add support for AF_XDP zero-copy

2024-07-15 Thread Benjamin Steinke
On Thursday, 27 June 2024, 19:18:37 CEST, Kurt Kanzenbach wrote:
> Hi Benjamin,
> 
> On Thu Jun 27 2024, Benjamin Steinke wrote:
> > On Thursday, 27 June 2024, 09:07:55 CEST, Kurt Kanzenbach wrote:
> >> Hi Sriram,
> >> 
> >> On Fri Aug 04 2023, Sriram Yagnaraman wrote:
> >> > The first couple of patches adds helper funcctions to prepare for
> >> > AF_XDP
> >> > zero-copy support which comes in the last couple of patches, one each
> >> > for Rx and TX paths.
> >> > 
> >> > As mentioned in v1 patchset [0], I don't have access to an actual IGB
> >> > device to provide correct performance numbers. I have used Intel
> >> > 82576EB
> >> > emulator in QEMU [1] to test the changes to IGB driver.
> >> 
> >> I gave this patch series a try on a recent kernel and silicon
> >> (i210). There was one issue in igb_xmit_zc(). But other than that it
> >> worked very nicely.
> > 
> > Hi Kurt and Sriram,
> > 
> > I recently tried the patches on a 6.1 kernel. On two different devices
> > i210 & i211 I couldn't see any packets being transmitted on the wire.
> > Perhaps caused by the issue in igb_xmit_zc() you mentioned, Kurt? Can you
> > share your findings, please?
> 
> Yeah, that's exactly the issue.
> 
> Following igb_xmit_xdp_ring() I've added PAYLEN to the Tx descriptor
> instead of setting it to zero:
> 
> igb_xmit_zc()
> {
> [...]
> 
>   /* put descriptor type bits */
>   cmd_type = E1000_ADVTXD_DTYP_DATA | E1000_ADVTXD_DCMD_DEXT |
>  E1000_ADVTXD_DCMD_IFCS;
>   olinfo_status = descs[i].len << E1000_ADVTXD_PAYLEN_SHIFT;
> 
>   cmd_type |= descs[i].len | IGB_TXD_DCMD;
>   tx_desc->read.cmd_type_len = cpu_to_le32(cmd_type);
>   tx_desc->read.olinfo_status = cpu_to_le32(olinfo_status);
> 
>   [...]
> }
> 
> Afterwards packets are transmitted on the wire.

Hi Kurt,

I can confirm this makes the transmitter work.
Thank you for taking over this patch series and continue to bring this 
upstream. I will continue testing on this.
 
> > RX seemed to work on first sight.
> 
> Yes, Rx works even with PTP enabled.

I can confirm this as well. 

Best regards,
Benjamin







Re: [Intel-wired-lan] [PATCH iwl-next v3 02/13] ice: parse and init various DDP parser sections

2024-07-15 Thread Ahmed Zaki




On 2024-07-10 11:28 p.m., Paul Menzel wrote:

Dear Ahmed, dear Junfeng,


Thank you for this patch.


Am 10.07.24 um 22:40 schrieb Ahmed Zaki:

From: Junfeng Guo 

Parse the following DDP sections:
  - ICE_SID_RXPARSER_IMEM into an array of struct ice_imem_item
  - ICE_SID_RXPARSER_METADATA_INIT into an array of struct 
ice_metainit_item

  - ICE_SID_RXPARSER_CAM or ICE_SID_RXPARSER_PG_SPILL into an array of
    struct ice_pg_cam_item
  - ICE_SID_RXPARSER_NOMATCH_CAM or ICE_SID_RXPARSER_NOMATCH_SPILL 
into an

    array of struct ice_pg_nm_cam_item
  - ICE_SID_RXPARSER_CAM into an array of ice_bst_tcam_item
  - ICE_SID_LBL_RXPARSER_TMEM into an array of ice_lbl_item
  - ICE_SID_RXPARSER_MARKER_PTYPE into an array of ice_ptype_mk_tcam_item
  - ICE_SID_RXPARSER_MARKER_GRP into an array of ice_mk_grp_item
  - ICE_SID_RXPARSER_PROTO_GRP into an array of ice_proto_grp_item
  - ICE_SID_RXPARSER_FLAG_REDIR into an array of ice_flg_rd_item
  - ICE_SID_XLT_KEY_BUILDER_SW, ICE_SID_XLT_KEY_BUILDER_ACL,
    ICE_SID_XLT_KEY_BUILDER_FD and ICE_SID_XLT_KEY_BUILDER_RSS into
    struct ice_xlt_kb


Did you write this from hand, or do you have some scripts to convert it 
from some datasheet into code?


I believe this was all manually done.



As the parser is new infrastructure, are you planing on adding some 
tests for the parser?


I am not aware of any plans to add testing for the parser stage.

In any case, what kind of tests do you have in mind? if you mean kerenl 
self-tests, I don't see any other ice tests in 
tools/testing/selftests/drivers/net/ for the rest of the already 
supported h/w stages (ACL, FDIR, RSS, ..etc) that I can use as examples.





Could you also go into more detail on how to debug possible problems, 
that means, how to make sure, that the parser works correctly and how to 
debug it in case one suspects the parser has a problem.


The next patch in the set adds ice_debug() for almost all operations. 
That includes dumping all DDP related sections and CAM entries.





Reviewed-by: Marcin Szycik 
Signed-off-by: Qi Zhang 
Signed-off-by: Junfeng Guo 
Co-developed-by: Ahmed Zaki 
Signed-off-by: Ahmed Zaki 
---
  drivers/net/ethernet/intel/ice/ice_ddp.c    |   10 +-
  drivers/net/ethernet/intel/ice/ice_ddp.h    |   13 +
  drivers/net/ethernet/intel/ice/ice_parser.c | 1396 +++
  drivers/net/ethernet/intel/ice/ice_parser.h |  357 +
  drivers/net/ethernet/intel/ice/ice_type.h   |    1 +
  5 files changed, 1772 insertions(+), 5 deletions(-)



<..>




+ * @length: number of items in the table to create
+ * @parse_item: the function to parse the item
+ * @no_offset: ignore header offset, calculate index from 0
+ *
+ * Return: a pointer to the allocated table or ERR_PTR.
+ */
+static
+void *ice_parser_create_table(struct ice_hw *hw, u32 sect_type,
+  u32 item_size, u32 length,
+  void (*parse_item)(struct ice_hw *hw, u16 idx,
+ void *item, void *data,
+ int size),
+  bool no_offset)
+{
+    struct ice_pkg_enum state = {};
+    struct ice_seg *seg = hw->seg;
+    void *table, *data, *item;
+    u16 idx = U16_MAX;
+
+    if (!seg)
+    return ERR_PTR(-EINVAL);
+
+    table = kzalloc(item_size * length, GFP_KERNEL);
+    if (!table)
+    return ERR_PTR(-ENOMEM);
+
+    do {
+    data = ice_pkg_enum_entry(seg, &state, sect_type, NULL,
+  ice_parser_sect_item_get);
+    seg = NULL;
+    if (data) {
+    struct ice_pkg_sect_hdr *hdr =
+    (struct ice_pkg_sect_hdr *)state.sect;
+
+    if (no_offset)
+    idx++;


Can’t `idx` initialized with `U16_MAX` now overflow?


Good catch, looking at the code, that seems to be intentionl so that 
first call to parse_item() would start at 0.





+    else
+    idx = le16_to_cpu(hdr->offset) +
+    state.entry_idx;
+
+    item = (void *)((uintptr_t)table + idx * item_size);
+    parse_item(hw, idx, item, data, item_size);



I will change that to

u16 idx = 0;
..
parse_item(hw, idx, item, data, item_size);
if (no_offset)
 idx++;


better readability.


+    }
+    } while (data);
+
+    return table;
+}
+
+/*** ICE_SID_RXPARSER_IMEM section ***/
+#define ICE_IM_BM_ALU0    BIT(0)
+#define ICE_IM_BM_ALU1    BIT(1)
+#define ICE_IM_BM_ALU2    BIT(2)
+#define ICE_IM_BM_PG    BIT(3)
+
+/**
+ * ice_imem_bm_init - parse 4 bits of Boost Main
+ * @bm: pointer to the Boost Main structure
+ * @data: Boost Main data to be parsed


Excuse my ignorance, as you use `data` in `FIELD_GET()` is `data` the 
right name? The `FIELD_GET()` example in `include/linux/bitfield.h` uses 
`reg`. How do I know the valid values of `data`?


This and the following funcs parse the DDP sections. so 'data' is not 
always register values.






+ */
+static void ice_imem_bm_init(struct ice_bst_main *bm, u8 data)
+{
+    bm->alu0    = 

Re: [Intel-wired-lan] [PATCH iwl-next v3 10/13] ice: add method to disable FDIR SWAP option

2024-07-15 Thread Ahmed Zaki




On 2024-07-10 10:59 p.m., Paul Menzel wrote:

Dear Ahmed, dear Junfeng,


Thank you for the patch.


Am 10.07.24 um 22:40 schrieb Ahmed Zaki:

From: Junfeng Guo 

The SWAP Flag in the FDIR Programming Descriptor doesn't work properly,
it is always set and cannot be unset (hardware bug).


Please document the datasheet/errata.


Unfortunately, I don't think this is in any docs or errata.




Thus, add a method
to effectively disable the FDIR SWAP option by setting the FDSWAP instead
of FDINSET registers.


Please paste the new debug messages.


What debug messages? If you mean the ones logged by ice_debug() in this 
patch, please note fvw_num = 48 for the parser. So that's 96 lines of:


swap wr(%d, %d): 0x%x = 0x%08x
inset wr(%d, %d): 0x%x = 0x%08x




Reviewed-by: Marcin Szycik 
Signed-off-by: Junfeng Guo 
Signed-off-by: Ahmed Zaki 
---
  .../net/ethernet/intel/ice/ice_flex_pipe.c    | 52 ++-
  .../net/ethernet/intel/ice/ice_flex_pipe.h    |  4 +-
  drivers/net/ethernet/intel/ice/ice_flow.c |  2 +-
  3 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c 
b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c

index 20d5db88c99f..a750d7e1edd8 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
@@ -2981,6 +2981,51 @@ ice_add_prof_attrib(struct ice_prof_map *prof, 
u8 ptg, u16 ptype,

  }
  /**
+ * ice_disable_fd_swap - set register appropriately to disable FD swap


Below you write SWAP all uppercase.


Will fix.




+ * @hw: pointer to the HW struct
+ * @prof_id: profile ID
+ *
+ * Return: Void.
+ */
+static void
+ice_disable_fd_swap(struct ice_hw *hw, u8 prof_id)
+{
+    u16 swap_val, i, fvw_num;


Try to use non-fixed-width types, where possible.


Sure, will fix i and j here.





+
+    swap_val = ICE_SWAP_VALID;
+    fvw_num = hw->blk[ICE_BLK_FD].es.fvw / ICE_FDIR_REG_SET_SIZE;
+
+    /* Since the SWAP Flag in the Programming Desc doesn't work,
+ * here add method to disable the SWAP Option via setting
+ * certain SWAP and INSET register sets.
+ */
+    for (i = 0; i < fvw_num ; i++) {
+    u32 raw_swap, raw_in;
+    u8 j;


unsigned int


Thanks.


Re: [Intel-wired-lan] [PATCH iwl-next v3 11/13] ice: enable FDIR filters from raw binary patterns for VFs

2024-07-15 Thread Ahmed Zaki




On 2024-07-10 11:42 p.m., Paul Menzel wrote:

Dear Ahmed, dear Junfeng,


Thank you for the patch.

Am 10.07.24 um 22:40 schrieb Ahmed Zaki:

From: Junfeng Guo 

Enable VFs to create FDIR filters from raw binary patterns.
The corresponding processes for raw flow are added in the
Parse / Create / Destroy stages.

Reviewed-by: Marcin Szycik 
Signed-off-by: Junfeng Guo 
Co-developed-by: Ahmed Zaki 
Signed-off-by: Ahmed Zaki 
---
  .../net/ethernet/intel/ice/ice_flex_pipe.c    |  48 +++
  .../net/ethernet/intel/ice/ice_flex_pipe.h    |   3 +
  drivers/net/ethernet/intel/ice/ice_flow.c | 106 +
  drivers/net/ethernet/intel/ice/ice_flow.h |   5 +
  drivers/net/ethernet/intel/ice/ice_vf_lib.h   |   8 +
  .../ethernet/intel/ice/ice_virtchnl_fdir.c    | 404 +-
  6 files changed, 566 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c 
b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c

index a750d7e1edd8..51aa6525565c 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
@@ -4146,6 +4146,54 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum 
ice_block blk, u16 vsi, u64 hdl)

  return status;
  }
+/**
+ * ice_flow_assoc_fdir_prof - add a FDIR profile for main/ctrl VSI


a*n* FDIR?


+ * @hw: pointer to the HW struct
+ * @blk: HW block
+ * @dest_vsi: dest VSI
+ * @fdir_vsi: fdir programming VSI
+ * @hdl: profile handle
+ *
+ * Update the hardware tables to enable the FDIR profile indicated by 
@hdl for

+ * the VSI specified by @dest_vsi. On success, the flow will be enabled.
+ *
+ * Return: 0 on success or negative errno on failure.
+ */
+int
+ice_flow_assoc_fdir_prof(struct ice_hw *hw, enum ice_block blk,
+ u16 dest_vsi, u16 fdir_vsi, u64 hdl)
+{
+    int status = 0;
+    u16 vsi_num;
+
+    if (blk != ICE_BLK_FD)
+    return -EINVAL;
+
+    vsi_num = ice_get_hw_vsi_num(hw, dest_vsi);
+    status = ice_add_prof_id_flow(hw, blk, vsi_num, hdl);
+    if (status) {
+    ice_debug(hw, ICE_DBG_FLOW, "HW profile add failed for main 
VSI flow entry: %d\n",


Maybe: Adding HW profile failed …? (Also below.)


+  status);
+    return status;
+    }
+
+    vsi_num = ice_get_hw_vsi_num(hw, fdir_vsi);
+    status = ice_add_prof_id_flow(hw, blk, vsi_num, hdl);
+    if (status) {
+    ice_debug(hw, ICE_DBG_FLOW, "HW profile add failed for ctrl 
VSI flow entry: %d\n",

+  status);
+    goto err;
+    }
+
+    return 0;
+
+err:
+    vsi_num = ice_get_hw_vsi_num(hw, dest_vsi);
+    ice_rem_prof_id_flow(hw, blk, vsi_num, hdl);
+
+    return status;
+}
+
  /**
   * ice_rem_prof_from_list - remove a profile from list
   * @hw: pointer to the HW struct
diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.h 
b/drivers/net/ethernet/intel/ice/ice_flex_pipe.h

index 7c66652dadd6..90b9b0993122 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.h
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.h
@@ -51,6 +51,9 @@ int
  ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, 
u64 hdl);

  int
  ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, 
u64 hdl);

+int
+ice_flow_assoc_fdir_prof(struct ice_hw *hw, enum ice_block blk,
+ u16 dest_vsi, u16 fdir_vsi, u64 hdl);
  enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);
  enum ice_ddp_state
  ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);
diff --git a/drivers/net/ethernet/intel/ice/ice_flow.c 
b/drivers/net/ethernet/intel/ice/ice_flow.c

index 79106503194b..99d584f46c23 100644
--- a/drivers/net/ethernet/intel/ice/ice_flow.c
+++ b/drivers/net/ethernet/intel/ice/ice_flow.c
@@ -409,6 +409,29 @@ static const u32 ice_ptypes_gtpc_tid[] = {
  };
  /* Packet types for GTPU */
+static const struct ice_ptype_attributes ice_attr_gtpu_session[] = {
+    { ICE_MAC_IPV4_GTPU_IPV4_FRAG,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV4_PAY,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV4_UDP_PAY, ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV4_TCP,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV4_ICMP,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV6_GTPU_IPV4_FRAG,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV6_GTPU_IPV4_PAY,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV6_GTPU_IPV4_UDP_PAY, ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV6_GTPU_IPV4_TCP,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV6_GTPU_IPV4_ICMP,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV6_FRAG,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV6_PAY,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV6_UDP_PAY, ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV6_TCP,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV4_GTPU_IPV6_ICMPV6,  ICE_PTYPE_ATTR_GTP_SESSION },
+    { ICE_MAC_IPV6_GTPU_IPV6_FRAG,  ICE_PTYPE_ATTR

[Intel-wired-lan] [PATCH iwl-net v2 0/2] ice: Reset procedure fixes

2024-07-15 Thread Sergey Temerkhanov
Fixes preventing possible races between resets (CORER etc)
and OICR ISR invocation / PTP hardware access

v1->v2: Patch rebase

Grzegorz Nitka (2):
  ice: Fix reset handler
  ice: Skip PTP HW writes during PTP reset procedure

 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 drivers/net/ethernet/intel/ice/ice_ptp.c  | 4 
 2 files changed, 6 insertions(+)

-- 
2.43.0



[Intel-wired-lan] [PATCH iwl-net v2 1/2] ice: Fix reset handler

2024-07-15 Thread Sergey Temerkhanov
From: Grzegorz Nitka 

Synchronize OICR IRQ when preparing for reset to avoid potential
race conditions between the reset procedure and OICR

Signed-off-by: Grzegorz Nitka 
Signed-off-by: Sergey Temerkhanov 
Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Reviewed-by: Przemek Kitszel 
---
 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c 
b/drivers/net/ethernet/intel/ice/ice_main.c
index e2990993b16f..3405fe749b25 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -560,6 +560,8 @@ ice_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req 
reset_type)
if (test_bit(ICE_PREPARED_FOR_RESET, pf->state))
return;
 
+   synchronize_irq(pf->oicr_irq.virq);
+
ice_unplug_aux_dev(pf);
 
/* Notify VFs of impending reset */
-- 
2.43.0



[Intel-wired-lan] [PATCH iwl-net v2 2/2] ice: Skip PTP HW writes during PTP reset procedure

2024-07-15 Thread Sergey Temerkhanov
From: Grzegorz Nitka 

Block HW write access for the driver while the device is in reset to
avoid potential race condition and access to the PTP HW in
non-nominal state which could lead to undesired effects

Signed-off-by: Grzegorz Nitka 
Co-developed-by: Karol Kolacinski 
Signed-off-by: Karol Kolacinski 
Signed-off-by: Sergey Temerkhanov 
Fixes: 4aad5335969f ("ice: add individual interrupt allocation")
Reviewed-by: Przemek Kitszel 
---
 drivers/net/ethernet/intel/ice/ice_ptp.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c 
b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 11fbf2bbcae7..40a07d0bb341 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -1408,6 +1408,10 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, 
bool linkup)
/* Update cached link status for this port immediately */
ptp_port->link_up = linkup;
 
+   /* Skip HW writes if reset is in progress */
+   if (pf->hw.reset_ongoing)
+   return;
+
switch (hw->ptp.phy_model) {
case ICE_PHY_E810:
/* Do not reconfigure E810 PHY */
-- 
2.43.0



[Intel-wired-lan] [tnguy-next-queue:main] BUILD SUCCESS f8321fa75102246d7415a6af441872f6637c93ab

2024-07-15 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git main
branch HEAD: f8321fa75102246d7415a6af441872f6637c93ab  virtio_net: Fix 
napi_skb_cache_put warning

elapsed time: 1185m

configs tested: 281
configs skipped: 5

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alpha allnoconfig   gcc-13.2.0
alphaallyesconfig   gcc-13.3.0
alpha   defconfig   gcc-13.2.0
arc  allmodconfig   gcc-13.2.0
arc   allnoconfig   gcc-13.2.0
arc  allyesconfig   gcc-13.2.0
arc  axs103_smp_defconfig   gcc-13.2.0
arc defconfig   gcc-13.2.0
arcnsim_700_defconfig   gcc-13.2.0
arcnsimosci_defconfig   gcc-13.2.0
arc   randconfig-001-20240715   gcc-13.2.0
arc   randconfig-001-20240716   gcc-13.2.0
arc   randconfig-002-20240715   gcc-13.2.0
arc   randconfig-002-20240716   gcc-13.2.0
arm  allmodconfig   gcc-13.2.0
arm  allmodconfig   gcc-14.1.0
arm   allnoconfig   gcc-13.2.0
arm  allyesconfig   gcc-13.2.0
arm  allyesconfig   gcc-14.1.0
arm bcm2835_defconfig   clang-19
armclps711x_defconfig   gcc-13.2.0
arm defconfig   gcc-13.2.0
arm   imx_v4_v5_defconfig   clang-19
arm   imxrt_defconfig   gcc-13.2.0
arm  jornada720_defconfig   gcc-13.2.0
armmps2_defconfig   clang-19
arm nhk8815_defconfig   gcc-13.2.0
arm  pxa3xx_defconfig   gcc-13.2.0
arm pxa_defconfig   gcc-13.2.0
arm   randconfig-001-20240715   gcc-13.2.0
arm   randconfig-001-20240716   gcc-13.2.0
arm   randconfig-002-20240715   gcc-13.2.0
arm   randconfig-002-20240716   gcc-13.2.0
arm   randconfig-003-20240715   gcc-13.2.0
arm   randconfig-003-20240716   gcc-13.2.0
arm   randconfig-004-20240715   gcc-13.2.0
arm   randconfig-004-20240716   gcc-13.2.0
armshmobile_defconfig   gcc-13.2.0
arm64allmodconfig   clang-19
arm64allmodconfig   gcc-13.2.0
arm64 allnoconfig   gcc-13.2.0
arm64   defconfig   gcc-13.2.0
arm64 randconfig-001-20240715   gcc-13.2.0
arm64 randconfig-001-20240716   gcc-13.2.0
arm64 randconfig-002-20240715   gcc-13.2.0
arm64 randconfig-002-20240716   gcc-13.2.0
arm64 randconfig-003-20240715   gcc-13.2.0
arm64 randconfig-003-20240716   gcc-13.2.0
arm64 randconfig-004-20240715   gcc-13.2.0
arm64 randconfig-004-20240716   gcc-13.2.0
csky  allnoconfig   gcc-13.2.0
cskydefconfig   gcc-13.2.0
csky  randconfig-001-20240715   gcc-13.2.0
csky  randconfig-001-20240716   gcc-13.2.0
csky  randconfig-002-20240715   gcc-13.2.0
csky  randconfig-002-20240716   gcc-13.2.0
hexagon  allmodconfig   clang-19
hexagon  allyesconfig   clang-19
i386 allmodconfig   clang-18
i386 allmodconfig   gcc-13
i386  allnoconfig   clang-18
i386  allnoconfig   gcc-13
i386 allyesconfig   clang-18
i386 allyesconfig   gcc-13
i386 buildonly-randconfig-001-20240715   clang-18
i386 buildonly-randconfig-001-20240716   clang-18
i386 buildonly-randconfig-002-20240715   clang-18
i386 buildonly-randconfig-002-20240716   clang-18
i386 buildonly-randconfig-003-20240715   gcc-13
i386 buildonly-randconfig-003-20240716   clang-18
i386 buildonly-randconfig-004-20240715   gcc-12
i386 buildonly-randconfig-004-20240716   clang-18
i386 buildonly-randconfig-005-20240715   clang-18
i386 buildonly-randconfig-005-20240716   clang-18
i386 buildonly-randconfig-006-20240715   gcc-13
i386 buildonly-randconfig-006-20240716   clang-18
i386defconfig   clang-18
i386  randconfig-001-20240715   gcc-13
i386  randconfig-001-20240716   clang-18
i386