netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/3] bnx2x: fix hw attention handling
@ 2011-09-22 12:33 Dmitry Kravkov
  2011-09-22 12:33 ` [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space Dmitry Kravkov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dmitry Kravkov @ 2011-09-22 12:33 UTC (permalink / raw)
  To: davem, netdev; +Cc: Dmitry Kravkov, Eilon Greenstein

Use register name to initialize attention mask

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x/bnx2x_main.c |    6 ++++--
 drivers/net/bnx2x/bnx2x_reg.h  |   12 ++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index c027e93..6b46917 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -4943,7 +4943,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
 	int igu_seg_id;
 	int port = BP_PORT(bp);
 	int func = BP_FUNC(bp);
-	int reg_offset;
+	int reg_offset, reg_offset_en5;
 	u64 section;
 	int index;
 	struct hc_sp_status_block_data sp_sb_data;
@@ -4966,6 +4966,8 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
 
 	reg_offset = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 :
 			     MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0);
+	reg_offset_en5 = (port ? MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0 :
+				 MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0);
 	for (index = 0; index < MAX_DYNAMIC_ATTN_GRPS; index++) {
 		int sindex;
 		/* take care of sig[0]..sig[4] */
@@ -4980,7 +4982,7 @@ static void bnx2x_init_def_sb(struct bnx2x *bp)
 			 * and not 16 between the different groups
 			 */
 			bp->attn_group[index].sig[4] = REG_RD(bp,
-					reg_offset + 0x10 + 0x4*index);
+					reg_offset_en5 + 0x4*index);
 		else
 			bp->attn_group[index].sig[4] = 0;
 	}
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h
index 750e844..fc7bd0f 100644
--- a/drivers/net/bnx2x/bnx2x_reg.h
+++ b/drivers/net/bnx2x/bnx2x_reg.h
@@ -1384,6 +1384,18 @@
    Latched ump_tx_parity; [31] MCP Latched scpad_parity; */
 #define MISC_REG_AEU_ENABLE4_PXP_0				 0xa108
 #define MISC_REG_AEU_ENABLE4_PXP_1				 0xa1a8
+/* [RW 32] fifth 32b for enabling the output for function 0 output0. Mapped
+ * as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC
+ * attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6]
+ * mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1
+ * parity; [31-10] Reserved; */
+#define MISC_REG_AEU_ENABLE5_FUNC_0_OUT_0			 0xa688
+/* [RW 32] Fifth 32b for enabling the output for function 1 output0. Mapped
+ * as follows: [0] PGLUE config_space; [1] PGLUE misc_flr; [2] PGLUE B RBC
+ * attention [3] PGLUE B RBC parity; [4] ATC attention; [5] ATC parity; [6]
+ * mstat0 attention; [7] mstat0 parity; [8] mstat1 attention; [9] mstat1
+ * parity; [31-10] Reserved; */
+#define MISC_REG_AEU_ENABLE5_FUNC_1_OUT_0			 0xa6b0
 /* [RW 1] set/clr general attention 0; this will set/clr bit 94 in the aeu
    128 bit vector */
 #define MISC_REG_AEU_GENERAL_ATTN_0				 0xa000
-- 
1.7.2.2

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

* [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space
  2011-09-22 12:33 [PATCH net 1/3] bnx2x: fix hw attention handling Dmitry Kravkov
@ 2011-09-22 12:33 ` Dmitry Kravkov
  2011-09-27 19:04   ` David Miller
  2011-09-22 12:33 ` [PATCH net 3/3] bnx2x: add missing break in bnx2x_dcbnl_get_cap Dmitry Kravkov
  2011-09-27 19:04 ` [PATCH net 1/3] bnx2x: fix hw attention handling David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Dmitry Kravkov @ 2011-09-22 12:33 UTC (permalink / raw)
  To: davem, netdev; +Cc: Dmitry Kravkov, Eilon Greenstein


Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x/bnx2x_main.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 6b46917..15f8000 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -7627,8 +7627,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
 		u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
 		u8 *mac_addr = bp->dev->dev_addr;
 		u32 val;
+		u16 pmc;
+
 		/* The mac address is written to entries 1-4 to
-		   preserve entry 0 which is used by the PMF */
+		 * preserve entry 0 which is used by the PMF
+		 */
 		u8 entry = (BP_VN(bp) + 1)*8;
 
 		val = (mac_addr[0] << 8) | mac_addr[1];
@@ -7638,6 +7641,11 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
 		      (mac_addr[4] << 8) | mac_addr[5];
 		EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val);
 
+		/* Enable the PME and clear the status */
+		pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmc);
+		pmc |= PCI_PM_CTRL_PME_ENABLE | PCI_PM_CTRL_PME_STATUS;
+		pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, pmc);
+
 		reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_EN;
 
 	} else
-- 
1.7.2.2

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

* [PATCH net 3/3] bnx2x: add missing break in bnx2x_dcbnl_get_cap
  2011-09-22 12:33 [PATCH net 1/3] bnx2x: fix hw attention handling Dmitry Kravkov
  2011-09-22 12:33 ` [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space Dmitry Kravkov
@ 2011-09-22 12:33 ` Dmitry Kravkov
  2011-09-27 19:04   ` David Miller
  2011-09-27 19:04 ` [PATCH net 1/3] bnx2x: fix hw attention handling David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: Dmitry Kravkov @ 2011-09-22 12:33 UTC (permalink / raw)
  To: davem, netdev; +Cc: Dmitry Kravkov, Shmulik Ravid, Eilon Greenstein

From: Shmulik Ravid <shmulikr@broadcom.com>

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x/bnx2x_dcb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_dcb.c b/drivers/net/bnx2x/bnx2x_dcb.c
index a1e004a..0b4acf6 100644
--- a/drivers/net/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/bnx2x/bnx2x_dcb.c
@@ -2120,6 +2120,7 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
 			break;
 		case DCB_CAP_ATTR_DCBX:
 			*cap = BNX2X_DCBX_CAPS;
+			break;
 		default:
 			rval = -EINVAL;
 			break;
-- 
1.7.2.2

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

* Re: [PATCH net 1/3] bnx2x: fix hw attention handling
  2011-09-22 12:33 [PATCH net 1/3] bnx2x: fix hw attention handling Dmitry Kravkov
  2011-09-22 12:33 ` [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space Dmitry Kravkov
  2011-09-22 12:33 ` [PATCH net 3/3] bnx2x: add missing break in bnx2x_dcbnl_get_cap Dmitry Kravkov
@ 2011-09-27 19:04 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-09-27 19:04 UTC (permalink / raw)
  To: dmitry; +Cc: netdev, eilong

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Thu, 22 Sep 2011 15:33:31 +0300

> Use register name to initialize attention mask
> 
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

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

* Re: [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space
  2011-09-22 12:33 ` [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space Dmitry Kravkov
@ 2011-09-27 19:04   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-09-27 19:04 UTC (permalink / raw)
  To: dmitry; +Cc: netdev, eilong

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Thu, 22 Sep 2011 15:33:32 +0300

> 
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

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

* Re: [PATCH net 3/3] bnx2x: add missing break in bnx2x_dcbnl_get_cap
  2011-09-22 12:33 ` [PATCH net 3/3] bnx2x: add missing break in bnx2x_dcbnl_get_cap Dmitry Kravkov
@ 2011-09-27 19:04   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-09-27 19:04 UTC (permalink / raw)
  To: dmitry; +Cc: netdev, shmulikr, eilong

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Thu, 22 Sep 2011 15:33:33 +0300

> From: Shmulik Ravid <shmulikr@broadcom.com>
> 
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

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

end of thread, other threads:[~2011-09-27 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-22 12:33 [PATCH net 1/3] bnx2x: fix hw attention handling Dmitry Kravkov
2011-09-22 12:33 ` [PATCH net 2/3] bnx2x: fix WOL by enablement PME in config space Dmitry Kravkov
2011-09-27 19:04   ` David Miller
2011-09-22 12:33 ` [PATCH net 3/3] bnx2x: add missing break in bnx2x_dcbnl_get_cap Dmitry Kravkov
2011-09-27 19:04   ` David Miller
2011-09-27 19:04 ` [PATCH net 1/3] bnx2x: fix hw attention handling 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).