All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] netxen: bug fixes for IMEZ adapters on pblades
@ 2007-07-19  9:11 dhananjay
  2007-07-19  9:11 ` [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix dhananjay
  0 siblings, 1 reply; 6+ messages in thread
From: dhananjay @ 2007-07-19  9:11 UTC (permalink / raw)
  To: netdev; +Cc: rob

Couple of bug fixes for netxen IMEZ adapter on powerpc blades. The firmware
must be loaded during probe and free PCI resources during module unload.
Please apply against #upstream-fixes.

 drivers/net/netxen/netxen_nic.h          |    3 +-
 drivers/net/netxen/netxen_nic_main.c     |   48 +++++++++++++++---------------
 2 files changed, 25 insertions(+), 26 deletions(-)
	 

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

* [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.
  2007-07-19  9:11 [PATCH 0/1] netxen: bug fixes for IMEZ adapters on pblades dhananjay
@ 2007-07-19  9:11 ` dhananjay
  2007-07-20 14:43   ` Dhananjay Phadke
  2007-07-24 20:36   ` Jeff Garzik
  0 siblings, 2 replies; 6+ messages in thread
From: dhananjay @ 2007-07-19  9:11 UTC (permalink / raw)
  To: netdev; +Cc: rob, Milan Bag, Wen Xiong

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

The firmware should be loaded after resetting hardware during PCI probe,
besides module unload. This fixes issue with 2nd port of multiport adapter
on powerpc blades. This patch also fixes a bug that PCI resources are not
freed if dma watchdog shutdown failed. The dma watchdog poll messages
during module unload are also suppressed.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Milan Bag <mbag@netxen.com>
Signed-off-by: Wen Xiong <wenxiong@us.ibm.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
@@ -46,7 +46,7 @@ MODULE_DESCRIPTION("NetXen Multi port (1
 MODULE_LICENSE("GPL");
 MODULE_VERSION(NETXEN_NIC_LINUX_VERSIONID);
 
-char netxen_nic_driver_name[] = "netxen-nic";
+char netxen_nic_driver_name[] = "netxen_nic";
 static char netxen_nic_driver_string[] = "NetXen Network Driver version "
     NETXEN_NIC_LINUX_VERSIONID;
 
@@ -643,6 +643,10 @@ netxen_nic_probe(struct pci_dev *pdev, c
 			NETXEN_CRB_NORMALIZE(adapter,
 				NETXEN_ROMUSB_GLB_PEGTUNE_DONE));
 		/* Handshake with the card before we register the devices. */
+		writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
+		netxen_pinit_from_rom(adapter, 0);
+		msleep(1);
+		netxen_load_firmware(adapter);
 		netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
 	}
 
@@ -785,19 +789,18 @@ static void __devexit netxen_nic_remove(
 
 	if (adapter->portnum == 0) {
 		if (init_firmware_done) {
-			dma_watchdog_shutdown_request(adapter);
-			msleep(100);
 			i = 100;
-			while ((dma_watchdog_shutdown_poll_result(adapter) != 1) && i) {
-				printk(KERN_INFO "dma_watchdog_shutdown_poll still in progress\n");
+			do {
+				if (dma_watchdog_shutdown_request(adapter) == 1)
+					break;
 				msleep(100);
-				i--;
-			}
-
-			if (i == 0) {
-				printk(KERN_ERR "dma_watchdog_shutdown_request failed\n");
-				return;
-			}
+				if (dma_watchdog_shutdown_poll_result(adapter) == 1)
+					break;
+			} while (--i);
+
+			if (i == 0)
+				printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
+						netdev->name);
 
 			/* clear the register for future unloads/loads */
 			writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc)));
@@ -806,11 +809,9 @@ static void __devexit netxen_nic_remove(
 
 			/* leave the hw in the same state as reboot */
 			writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
-			if (netxen_pinit_from_rom(adapter, 0))
-				return;
+			netxen_pinit_from_rom(adapter, 0);
 			msleep(1);
-			if (netxen_load_firmware(adapter))
-				return;
+			netxen_load_firmware(adapter);
 			netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
 		}
 
@@ -819,22 +820,21 @@ static void __devexit netxen_nic_remove(
 		printk(KERN_INFO "State: 0x%0x\n",
 			readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)));
 
-		dma_watchdog_shutdown_request(adapter);
-		msleep(100);
 		i = 100;
-		while ((dma_watchdog_shutdown_poll_result(adapter) != 1) && i) {
-			printk(KERN_INFO "dma_watchdog_shutdown_poll still in progress\n");
+		do {
+			if (dma_watchdog_shutdown_request(adapter) == 1)
+				break;
 			msleep(100);
-			i--;
-		}
+			if (dma_watchdog_shutdown_poll_result(adapter) == 1)
+				break;
+		} while (--i);
 
 		if (i) {
 			netxen_free_adapter_offload(adapter);
 		} else {
-			printk(KERN_ERR "failed to dma shutdown\n");
-			return;
+			printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
+					netdev->name);
 		}
-
 	}
 
 	iounmap(adapter->ahw.db_base);
Index: netdev-2.6/drivers/net/netxen/netxen_nic.h
===================================================================
--- netdev-2.6.orig/drivers/net/netxen/netxen_nic.h
+++ netdev-2.6/drivers/net/netxen/netxen_nic.h
@@ -1179,8 +1179,7 @@ dma_watchdog_shutdown_poll_result(struct
 	    NETXEN_CAM_RAM(NETXEN_CAM_RAM_DMA_WATCHDOG_CTRL), &ctrl, 4))
 		printk(KERN_ERR "failed to read dma watchdog status\n");
 
-	return ((netxen_get_dma_watchdog_enabled(ctrl) == 0) &&
-		(netxen_get_dma_watchdog_disabled(ctrl) == 0));
+	return (netxen_get_dma_watchdog_enabled(ctrl) == 0);
 }
 
 static inline int

-- 

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

* Re: [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.
  2007-07-19  9:11 ` [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix dhananjay
@ 2007-07-20 14:43   ` Dhananjay Phadke
  2007-07-24 20:36   ` Jeff Garzik
  1 sibling, 0 replies; 6+ messages in thread
From: Dhananjay Phadke @ 2007-07-20 14:43 UTC (permalink / raw)
  To: netdev; +Cc: dhananjay, rob, Milan Bag, Wen Xiong

Please ignore this patch. There's one more patch in the series. I will
send them together.

Thanks,
-Dhananjay

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

* Re: [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.
  2007-07-19  9:11 ` [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix dhananjay
  2007-07-20 14:43   ` Dhananjay Phadke
@ 2007-07-24 20:36   ` Jeff Garzik
  2007-07-25  4:18     ` Dhananjay Phadke
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2007-07-24 20:36 UTC (permalink / raw)
  To: dhananjay; +Cc: netdev, rob, Milan Bag, Wen Xiong

dhananjay@netxen.com wrote:
> The firmware should be loaded after resetting hardware during PCI probe,
> besides module unload. This fixes issue with 2nd port of multiport adapter
> on powerpc blades. This patch also fixes a bug that PCI resources are not
> freed if dma watchdog shutdown failed. The dma watchdog poll messages
> during module unload are also suppressed.
> 
> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
> Signed-off-by: Milan Bag <mbag@netxen.com>
> Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>

applied



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

* Re: [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.
  2007-07-24 20:36   ` Jeff Garzik
@ 2007-07-25  4:18     ` Dhananjay Phadke
  2007-07-25 14:29       ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Dhananjay Phadke @ 2007-07-25  4:18 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, rob, Wen Xiong

Jeff,

You committed old patch, which I had asked to ignore for two newer patches.

[PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.

is wrong patch that went in, instead please commit:

[PATCH 1/2] netxen: IMEZ multiport card 2nd port issue, dma watchdog fix
[PATCH 2/2] netxen: Fix interrupt handling for multiport adapters

Thanks,
Dhananjay

On 7/25/07, Jeff Garzik <jeff@garzik.org> wrote:
> dhananjay@netxen.com wrote:
> > The firmware should be loaded after resetting hardware during PCI probe,
> > besides module unload. This fixes issue with 2nd port of multiport adapter
> > on powerpc blades. This patch also fixes a bug that PCI resources are not
> > freed if dma watchdog shutdown failed. The dma watchdog poll messages
> > during module unload are also suppressed.
> >
> > Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
> > Signed-off-by: Milan Bag <mbag@netxen.com>
> > Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
>
> applied
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.
  2007-07-25  4:18     ` Dhananjay Phadke
@ 2007-07-25 14:29       ` Jeff Garzik
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2007-07-25 14:29 UTC (permalink / raw)
  To: Dhananjay Phadke; +Cc: netdev, rob, Wen Xiong

Dhananjay Phadke wrote:
> Jeff,
> 
> You committed old patch, which I had asked to ignore for two newer patches.
> 
> [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix.
> 
> is wrong patch that went in, instead please commit:
> 
> [PATCH 1/2] netxen: IMEZ multiport card 2nd port issue, dma watchdog fix
> [PATCH 2/2] netxen: Fix interrupt handling for multiport adapters

Two responses:

1) I never received the two patches you mention.  It helps (though not 
required) to CC me, in addition to sending patches to netdev.

2) Kernel history is fixed in stone, once committed upstream.  Thus, you 
must regenerate your patches based on the fact that old-patch is now 
upstream.

	Jeff




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

end of thread, other threads:[~2007-07-25 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-19  9:11 [PATCH 0/1] netxen: bug fixes for IMEZ adapters on pblades dhananjay
2007-07-19  9:11 ` [PATCH 1/1] netxen: Load firmware during probe, dma watchdog fix dhananjay
2007-07-20 14:43   ` Dhananjay Phadke
2007-07-24 20:36   ` Jeff Garzik
2007-07-25  4:18     ` Dhananjay Phadke
2007-07-25 14:29       ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.