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

From: Jeff Garzik <[email-masked]>
Date: Sat, 30 Jun 2007 18:43:13 -0400

Michael Buesch wrote:
> On Saturday 30 June 2007 22:38:47 [email-masked] 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 <[email-masked]>
>> Signed-off-by: Milan Bag <[email-masked]>
>> Signed-off-by: Wen Xiong <[email-masked]>
> 
>>  		off = netxen_nic_pci_set_window(adapter, memaddr);
>>  		addr = pci_base_offset(adapter, off);
>>  		writel(data, addr);
>> +		do {
>> +			if (readl(addr) == data)
>> +				break;
>> +			msleep_interruptible(100);
> 
> If you use msleep_interruptible(), I'd say you should check for
> the return value of that call and probably abort firmware
> processing here if a signal interrupted us.

While strictly this is true, I strongly urge the use of 
non-interruptible sleeps when used in hardware-related delays.  Very 
rarely does one really want to care about signals for such cases.

	Jeff