netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] bnx2x: Bug fixes patch series
@ 2013-04-18  8:49 Yuval Mintz
  2013-04-18  8:49 ` [PATCH net 1/2] bnx2x: Prevent UNDI FW illegal host access Yuval Mintz
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yuval Mintz @ 2013-04-18  8:49 UTC (permalink / raw)
  To: davem, netdev; +Cc: eilong, ariele

Hi Dave,

This patch contain fixes in two areas -

  1. Preventing UNDI FW from illegally accessing memory when it shouldn't.

  2. Fix interrupt coalescing initialization and configuration when working
     with multiple CoS.

Please consider applying these patches to `net'.

Thanks,
Yuval Mintz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 1/2] bnx2x: Prevent UNDI FW illegal host access
  2013-04-18  8:49 [PATCH net 0/2] bnx2x: Bug fixes patch series Yuval Mintz
@ 2013-04-18  8:49 ` Yuval Mintz
  2013-04-18  8:49 ` [PATCH net 2/2] bnx2x: Fix status blocks configuration Yuval Mintz
  2013-04-18 19:04 ` [PATCH net 0/2] bnx2x: Bug fixes patch series David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: Yuval Mintz @ 2013-04-18  8:49 UTC (permalink / raw)
  To: davem, netdev; +Cc: eilong, ariele, Dmitry Kravkov, Yuval Mintz

From: Dmitry Kravkov <dmitry@broadcom.com>

When loading after UNDI (e.g., Boot from SAN) the UNDI does not
gracefully yield its resources; The bnx2x driver handles that release
itself.

During the manipulation required to release those resources, it's possible
for the UNDI to try and write to memory regions which are no longer accessible,
causing the PCI bus to prevent further writes from the chip.

This would in turn cause DMAE timeouts later on in the driver, as the driver
will be unable to use the chip's DMA engines.

This patch prevents the chip from actually writing through the PCI bus
in said scenario, thus allowing the release without the unfortunate by-product.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 0c1d75a..c8ef9f5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9945,6 +9945,10 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp)
 				REG_RD(bp, NIG_REG_NIG_INT_STS_CLR_0);
 			}
 		}
+		if (!CHIP_IS_E1x(bp))
+			/* block FW from writing to host */
+			REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 0);
+
 		/* wait until BRB is empty */
 		tmp_reg = REG_RD(bp, BRB1_REG_NUM_OF_FULL_BLOCKS);
 		while (timer_count) {
-- 
1.8.1.227.g44fe835

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 2/2] bnx2x: Fix status blocks configuration
  2013-04-18  8:49 [PATCH net 0/2] bnx2x: Bug fixes patch series Yuval Mintz
  2013-04-18  8:49 ` [PATCH net 1/2] bnx2x: Prevent UNDI FW illegal host access Yuval Mintz
@ 2013-04-18  8:49 ` Yuval Mintz
  2013-04-18 19:04 ` [PATCH net 0/2] bnx2x: Bug fixes patch series David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: Yuval Mintz @ 2013-04-18  8:49 UTC (permalink / raw)
  To: davem, netdev; +Cc: eilong, ariele, Yuval Mintz

From: Ariel Elior <ariele@broadcom.com>

This fixes 2 issues regarding bnx2x's status blocks:

   1. ethtool -c caused corruption of status blocks in FW RAM.

   2. when using multi-CoS, the configuration of the timeout values of
      status blocks is incorrect, harming the coalescing of interrupts
      for such CoSs.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 9e99d38..0cd508a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2624,6 +2624,9 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
 			}
 		}
 
+		/* initialize FW coalescing state machines in RAM */
+		bnx2x_update_coalesce(bp);
+
 		/* setup the leading queue */
 		rc = bnx2x_setup_leading(bp);
 		if (rc) {
@@ -4746,11 +4749,11 @@ static void storm_memset_hc_disable(struct bnx2x *bp, u8 port,
 	u32 enable_flag = disable ? 0 : (1 << HC_INDEX_DATA_HC_ENABLED_SHIFT);
 	u32 addr = BAR_CSTRORM_INTMEM +
 		   CSTORM_STATUS_BLOCK_DATA_FLAGS_OFFSET(fw_sb_id, sb_index);
-	u16 flags = REG_RD16(bp, addr);
+	u8 flags = REG_RD8(bp, addr);
 	/* clear and set */
 	flags &= ~HC_INDEX_DATA_HC_ENABLED;
 	flags |= enable_flag;
-	REG_WR16(bp, addr, flags);
+	REG_WR8(bp, addr, flags);
 	DP(NETIF_MSG_IFUP,
 	   "port %x fw_sb_id %d sb_index %d disable %d\n",
 	   port, fw_sb_id, sb_index, disable);
-- 
1.8.1.227.g44fe835

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] bnx2x: Bug fixes patch series
  2013-04-18  8:49 [PATCH net 0/2] bnx2x: Bug fixes patch series Yuval Mintz
  2013-04-18  8:49 ` [PATCH net 1/2] bnx2x: Prevent UNDI FW illegal host access Yuval Mintz
  2013-04-18  8:49 ` [PATCH net 2/2] bnx2x: Fix status blocks configuration Yuval Mintz
@ 2013-04-18 19:04 ` David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2013-04-18 19:04 UTC (permalink / raw)
  To: yuvalmin; +Cc: netdev, eilong, ariele

From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Thu, 18 Apr 2013 11:49:04 +0300

> Hi Dave,
> 
> This patch contain fixes in two areas -
> 
>   1. Preventing UNDI FW from illegally accessing memory when it shouldn't.
> 
>   2. Fix interrupt coalescing initialization and configuration when working
>      with multiple CoS.
> 
> Please consider applying these patches to `net'.

Both applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] bnx2x: Bug fixes patch series
  2013-10-27 11:06 Yuval Mintz
@ 2013-10-29  4:13 ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2013-10-29  4:13 UTC (permalink / raw)
  To: yuvalmin; +Cc: netdev, dmitry, ariele, eilong

From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Sun, 27 Oct 2013 13:06:47 +0200

> This series contains 2 unrelated fixes:
> 
>  1. FW asserts during unload might be encountered if specific memory
>     allocations fail during load.
> 
>  2. SR-IOV related, fixes a crash that will occour if the driver were to
>     be rmmoded and then re-probed while there are both assigned and unassigned
>     VFs originating from the same PF.
> 
> Please consider applying these patches to `net'.

Both applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 0/2] bnx2x: Bug fixes patch series
@ 2013-10-27 11:06 Yuval Mintz
  0 siblings, 0 replies; 9+ messages in thread
From: Yuval Mintz @ 2013-10-27 11:06 UTC (permalink / raw)
  To: davem, netdev; +Cc: dmitry, ariele, eilong

Hi Dave,

This series contains 2 unrelated fixes:

 1. FW asserts during unload might be encountered if specific memory
    allocations fail during load.

 2. SR-IOV related, fixes a crash that will occour if the driver were to
    be rmmoded and then re-probed while there are both assigned and unassigned
    VFs originating from the same PF.

Please consider applying these patches to `net'.

Thanks,
Yuval Mintz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 0/2] bnx2x: Bug fixes patch series
@ 2013-10-27 11:06 Yuval Mintz
  2013-10-29  4:13 ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Yuval Mintz @ 2013-10-27 11:06 UTC (permalink / raw)
  To: davem, netdev; +Cc: dmitry, ariele, eilong

Hi Dave,

This series contains 2 unrelated fixes:

 1. FW asserts during unload might be encountered if specific memory
    allocations fail during load.

 2. SR-IOV related, fixes a crash that will occour if the driver were to
    be rmmoded and then re-probed while there are both assigned and unassigned
    VFs originating from the same PF.

Please consider applying these patches to `net'.

Thanks,
Yuval Mintz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/2] bnx2x: bug fixes patch series
  2012-08-09 14:37 [PATCH net 0/2] bnx2x: bug " Yuval Mintz
@ 2012-08-09 23:20 ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-08-09 23:20 UTC (permalink / raw)
  To: yuvalmin; +Cc: netdev, eilong

From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Thu, 9 Aug 2012 17:37:24 +0300

> This series contains fixes for bnx2x's 'unload previous driver' flow
> and its recovery flow.
> 
> Please consider applying these patches to 'net'.

Both patches applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 0/2] bnx2x: bug fixes patch series
@ 2012-08-09 14:37 Yuval Mintz
  2012-08-09 23:20 ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Yuval Mintz @ 2012-08-09 14:37 UTC (permalink / raw)
  To: davem, netdev; +Cc: eilong, Yuval Mintz

Hi Dave,

This series contains fixes for bnx2x's 'unload previous driver' flow
and its recovery flow.

Please consider applying these patches to 'net'.

Thanks,
Yuval Mintz

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-29  4:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18  8:49 [PATCH net 0/2] bnx2x: Bug fixes patch series Yuval Mintz
2013-04-18  8:49 ` [PATCH net 1/2] bnx2x: Prevent UNDI FW illegal host access Yuval Mintz
2013-04-18  8:49 ` [PATCH net 2/2] bnx2x: Fix status blocks configuration Yuval Mintz
2013-04-18 19:04 ` [PATCH net 0/2] bnx2x: Bug fixes patch series David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-10-27 11:06 Yuval Mintz
2013-10-27 11:06 Yuval Mintz
2013-10-29  4:13 ` David Miller
2012-08-09 14:37 [PATCH net 0/2] bnx2x: bug " Yuval Mintz
2012-08-09 23:20 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).