Subject: Re: [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers

From: Michael Buesch <[email-masked]>
Date: Sun, 1 Jul 2007 00:17:33 +0200

On Saturday 30 June 2007 22:38:46 [email-masked] wrote:
> This patch updates the various access routines to access different
> control and status settings present in different register locations.
> This will fix problems related to working of different ports in
> multi Port card.
> 
> Signed-off by: Dhananjay Phadke <[email-masked]>
> Signed-off by: Milan Bag <[email-masked]>

> +	/* Window = 0 or 1 */
> +	if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) {
> +		do {
> +			writel(0xffffffff, (void *)
> +				(PCI_OFFSET_SECOND_RANGE(adapter, ISR_INT_TARGET_STATUS)));
> +			mask = readl((void *)
> +					(pci_base_offset(adapter, ISR_INT_VECTOR)));

I think you should add a small delay into this loop. Otherwise
it depends on the speed of the CPU (and chipset) how big the total
timeout (32) of the loop is. Could be too small on fast systems.
Something like:
			if (!(mask & 0x80))
				break;
			udelay(10);
			} while (++count < 32);
and drop the next line.

> +		} while (((mask & 0x80) != 0) && (++count < 32));
> +
> +		if ((mask & 0x80) != 0) {
> +			printk(KERN_NOTICE "Could not disable interrupt completely\n");
> +		}
> +	}
> +
> +	DPRINTK(1, INFO, "Done with Disable Int\n");
> +
> +	return;
>  }

-- 
Greetings Michael.