Thread (6 messages) flat view 6 messages, 3 authors, 2007-07-02

Re: RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload

From: Michael Buesch <hidden>
Date: 2007-07-01 20:23:49

On Sunday 01 July 2007 20:56:01 dhananjay.phadke@gmail.com wrote:
These changes allow driver close routine to be called during module unload,
to clean-up buffers and other software resources, flush queues etc. Also,
hardware is reset to pristine state. 

Signed-off-by: Dhananjay Phadke <redacted>
Signed-off-by: Milan Bag <redacted>
Signed-off-by: Wen Xiong <redacted>
+			msleep(1);
+			if (netxen_load_firmware(adapter))
+				return;
+			netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
+		}
+
+		/* clear the register for future unloads/loads */
+		writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc)));
+		printk(KERN_INFO "State: 0x%0x\n",
+			readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)));
+
+		dma_watchdog_shutdown_request(adapter);
+		mdelay(100);
+		i = 100;
+		while ((dma_watchdog_shutdown_poll_result(adapter) != 1) && i) {
+			printk(KERN_INFO "dma_watchdog_shutdown_poll still in progress\n");
+			mdelay(100);
+			i--;
+		}
msleep, please.

-- 
Greetings Michael.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help