netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND 0/2] netxen: bug fixes for IMEZ adapters on pblades
@ 2007-07-25 14:43 dhananjay
  2007-07-25 14:43 ` [RESEND 1/2] netxen: re-init station address after h/w init dhananjay
  2007-07-25 14:43 ` [RESEND 2/2] netxen: Fix interrupt handling for multiport adapters dhananjay
  0 siblings, 2 replies; 5+ messages in thread
From: dhananjay @ 2007-07-25 14:43 UTC (permalink / raw)
  To: netdev; +Cc: rob, jeff

Resending the earlier patches, since the old patch got committed. 

 drivers/net/netxen/netxen_nic_main.c |   40 +++++++++++++++++----------------
 1 files changed, 21 insertions(+), 19 deletions(-)


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

* [RESEND 1/2] netxen: re-init station address after h/w init
  2007-07-25 14:43 [RESEND 0/2] netxen: bug fixes for IMEZ adapters on pblades dhananjay
@ 2007-07-25 14:43 ` dhananjay
  2007-07-25 15:21   ` Jeff Garzik
  2007-07-30 19:52   ` Jeff Garzik
  2007-07-25 14:43 ` [RESEND 2/2] netxen: Fix interrupt handling for multiport adapters dhananjay
  1 sibling, 2 replies; 5+ messages in thread
From: dhananjay @ 2007-07-25 14:43 UTC (permalink / raw)
  To: netdev; +Cc: rob, jeff

[-- Attachment #1: dma.patch --]
[-- Type: text/plain, Size: 1076 bytes --]

This is a workaround for firmware bug with 2nd port of multiport adapter,
where MAC address is reset. Driver just needs to overwrite it with the
value read from PROM.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>

Index: netdev-2.6/drivers/net/netxen/netxen_nic_main.c
===================================================================
--- netdev-2.6.orig/drivers/net/netxen/netxen_nic_main.c
+++ netdev-2.6/drivers/net/netxen/netxen_nic_main.c
@@ -895,8 +895,6 @@ static int netxen_nic_open(struct net_de
 
 	/* Done here again so that even if phantom sw overwrote it,
 	 * we set it */
-	if (adapter->macaddr_set)
-		adapter->macaddr_set(adapter, netdev->dev_addr);
 	if (adapter->init_port
 	    && adapter->init_port(adapter, adapter->portnum) != 0) {
 	    del_timer_sync(&adapter->watchdog_timer);
@@ -904,6 +902,8 @@ static int netxen_nic_open(struct net_de
 				netxen_nic_driver_name, adapter->portnum);
 		return -EIO;
 	}
+	if (adapter->macaddr_set)
+		adapter->macaddr_set(adapter, netdev->dev_addr);
 
 	netxen_nic_set_link_parameters(adapter);
 

-- 

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

* [RESEND 2/2] netxen: Fix interrupt handling for multiport adapters
  2007-07-25 14:43 [RESEND 0/2] netxen: bug fixes for IMEZ adapters on pblades dhananjay
  2007-07-25 14:43 ` [RESEND 1/2] netxen: re-init station address after h/w init dhananjay
@ 2007-07-25 14:43 ` dhananjay
  1 sibling, 0 replies; 5+ messages in thread
From: dhananjay @ 2007-07-25 14:43 UTC (permalink / raw)
  To: netdev; +Cc: rob, jeff

[-- Attachment #1: intr.patch --]
[-- Type: text/plain, Size: 2563 bytes --]

This patch fixes masking of interrupts on multiport adapters. Also disables
interrupts upon ifdown interface. The wrong mask could result in interrupt
flood after interface is down.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>

Index: netdev-2.6/drivers/net/netxen/netxen_nic_main.c
===================================================================
--- netdev-2.6.orig/drivers/net/netxen/netxen_nic_main.c
+++ netdev-2.6/drivers/net/netxen/netxen_nic_main.c
@@ -930,6 +930,8 @@ static int netxen_nic_close(struct net_d
 	netif_carrier_off(netdev);
 	netif_stop_queue(netdev);
 
+	netxen_nic_disable_int(adapter);
+
 	cmd_buff = adapter->cmd_buf_arr;
 	for (i = 0; i < adapter->max_tx_desc_count; i++) {
 		buffrag = cmd_buff->frag_array;
@@ -1243,28 +1245,12 @@ static int
 netxen_handle_int(struct netxen_adapter *adapter, struct net_device *netdev)
 {
 	u32 ret = 0;
-	u32 our_int = 0;
 
 	DPRINTK(INFO, "Entered handle ISR\n");
 	adapter->stats.ints++;
 
-	if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) {
-		our_int = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_INT_VECTOR));
-		/* not our interrupt */
-		if ((our_int & (0x80 << adapter->portnum)) == 0)
-			return ret;
-	}
-
 	netxen_nic_disable_int(adapter);
 
-	if (adapter->intr_scheme == INTR_SCHEME_PERPORT) {
-		/* claim interrupt */
-		if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) {
-			writel(our_int & ~((u32)(0x80 << adapter->portnum)),
-			NETXEN_CRB_NORMALIZE(adapter, CRB_INT_VECTOR));
-		}
-	}
-
 	if (netxen_nic_rx_has_work(adapter) || netxen_nic_tx_has_work(adapter)) {
 		if (netif_rx_schedule_prep(netdev)) {
 			/*
@@ -1298,6 +1284,7 @@ irqreturn_t netxen_intr(int irq, void *d
 {
 	struct netxen_adapter *adapter;
 	struct net_device *netdev;
+	u32 our_int = 0;
 
 	if (unlikely(!irq)) {
 		return IRQ_NONE;	/* Not our interrupt */
@@ -1305,7 +1292,22 @@ irqreturn_t netxen_intr(int irq, void *d
 
 	adapter = (struct netxen_adapter *)data;
 	netdev  = adapter->netdev;
-	/* process our status queue (for all 4 ports) */
+
+	if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) {
+		our_int = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_INT_VECTOR));
+		/* not our interrupt */
+		if ((our_int & (0x80 << adapter->portnum)) == 0)
+			return IRQ_NONE;
+	}
+
+	if (adapter->intr_scheme == INTR_SCHEME_PERPORT) {
+		/* claim interrupt */
+		if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) {
+			writel(our_int & ~((u32)(0x80 << adapter->portnum)),
+			NETXEN_CRB_NORMALIZE(adapter, CRB_INT_VECTOR));
+		}
+	}
+
 	if (netif_running(netdev))
 		netxen_handle_int(adapter, netdev);
 

-- 

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

* Re: [RESEND 1/2] netxen: re-init station address after h/w init
  2007-07-25 14:43 ` [RESEND 1/2] netxen: re-init station address after h/w init dhananjay
@ 2007-07-25 15:21   ` Jeff Garzik
  2007-07-30 19:52   ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-07-25 15:21 UTC (permalink / raw)
  To: dhananjay; +Cc: netdev, rob

Since we had a problem before, just wanted to let you know I received 
these two patches.

	Jeff




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

* Re: [RESEND 1/2] netxen: re-init station address after h/w init
  2007-07-25 14:43 ` [RESEND 1/2] netxen: re-init station address after h/w init dhananjay
  2007-07-25 15:21   ` Jeff Garzik
@ 2007-07-30 19:52   ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-07-30 19:52 UTC (permalink / raw)
  To: dhananjay; +Cc: netdev, rob

dhananjay@netxen.com wrote:
> This is a workaround for firmware bug with 2nd port of multiport adapter,
> where MAC address is reset. Driver just needs to overwrite it with the
> value read from PROM.
> 
> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>

applied 1-2



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

end of thread, other threads:[~2007-07-30 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 14:43 [RESEND 0/2] netxen: bug fixes for IMEZ adapters on pblades dhananjay
2007-07-25 14:43 ` [RESEND 1/2] netxen: re-init station address after h/w init dhananjay
2007-07-25 15:21   ` Jeff Garzik
2007-07-30 19:52   ` Jeff Garzik
2007-07-25 14:43 ` [RESEND 2/2] netxen: Fix interrupt handling for multiport adapters dhananjay

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).