From: Dmitry Kravkov Date: Fri, 1 Apr 2011 00:04:01 +0000 (-0700) Subject: bnx2x: don't write dcb/llfc fields in STORM memory X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b7f817e47bb66ae4d82ed73689a521af70a5410;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git bnx2x: don't write dcb/llfc fields in STORM memory We could get hardware attention during DCB/FCoE traffic without this fix. Signed-off-by: Dmitry Kravkov Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/bnx2x/bnx2x_cmn.h b/drivers/net/bnx2x/bnx2x_cmn.h index ef37b98d6146..775fef031ad8 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.h +++ b/drivers/net/bnx2x/bnx2x_cmn.h @@ -1041,12 +1041,23 @@ static inline void storm_memset_cmng(struct bnx2x *bp, struct cmng_struct_per_port *cmng, u8 port) { - size_t size = sizeof(struct cmng_struct_per_port); + size_t size = + sizeof(struct rate_shaping_vars_per_port) + + sizeof(struct fairness_vars_per_port) + + sizeof(struct safc_struct_per_port) + + sizeof(struct pfc_struct_per_port); u32 addr = BAR_XSTRORM_INTMEM + XSTORM_CMNG_PER_PORT_VARS_OFFSET(port); __storm_memset_struct(bp, addr, size, (u32 *)cmng); + + addr += size + 4 /* SKIP DCB+LLFC */; + size = sizeof(struct cmng_struct_per_port) - + size /* written */ - 4 /*skipped*/; + + __storm_memset_struct(bp, addr, size, + (u32 *)(cmng->traffic_type_to_priority_cos)); } /* HW Lock for shared dual port PHYs */