Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2008 17:41:11 +0900
From:      Sogabe Takashi <sogabe@iij.ad.jp>
To:        freebsd-drivers@freebsd.org
Subject:   question: workaround for AX88190 (dev/ed/if_ed.c)
Message-ID:  <4805BBA7.60806@iij.ad.jp>

next in thread | raw e-mail | index | archive | help
Hi all,

Does anyone know what kind of problems about following
workaround-code?

I read asix datasheets, but corresponding problem is not
described.

(in sys/dev/ed/if_ed.c)
/*
 * Ethernet interface interrupt processor
 */
void
edintr(void *arg)
{
...
		/*
		 * XXX workaround for AX88190
		 * We limit this to 5000 iterations.  At 1us per inb/outb,
		 * this translates to about 15ms, which should be plenty
		 * of time, and also gives protection in the card eject
		 * case.
		 */
		if (sc->chip_type == ED_CHIP_TYPE_AX88190) {
			count = 5000;		/* 15ms */
			while (count-- && (ed_nic_inb(sc, ED_P0_ISR) & isr)) {
				ed_nic_outb(sc, ED_P0_ISR,0);
				ed_nic_outb(sc, ED_P0_ISR,isr);
			}
			if (count == 0)
				break;
		}
...
}

--
sogabe@iij.ad.jp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4805BBA7.60806>