Date: Wed, 4 Feb 2015 15:59:52 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278210 - head/sys/dev/ed Message-ID: <201502041559.t14FxqrC008648@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Feb 4 15:59:51 2015 New Revision: 278210 URL: https://svnweb.freebsd.org/changeset/base/278210 Log: Add comment about why checking for 0xff is OK. There's two bits in the ISR that are normally clear. RST is one, though in some overflow cases it can be set. RDC is only set when a remote DMA is finished from the memory mapped memory to the transmit rings, which we poll fore in the code with ED_LOCK around the operation that would set it. Modified: head/sys/dev/ed/if_ed.c Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Wed Feb 4 14:49:47 2015 (r278209) +++ head/sys/dev/ed/if_ed.c Wed Feb 4 15:59:51 2015 (r278210) @@ -976,8 +976,10 @@ edintr(void *arg) /* * loop until there are no more new interrupts. When the card goes * away, the hardware will read back 0xff. Looking at the interrupts, - * it would appear that 0xff is impossible, or at least extremely - * unlikely. + * it would appear that 0xff is impossible as ED_ISR_RST is noramlly + * clear. ED_ISR_RDC is also normally clear and only set while + * we're transferring memory to the card and we're holding the + * ED_LOCK (so we can't get into here). */ while ((isr = ed_nic_inb(sc, ED_P0_ISR)) != 0 && isr != 0xff) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502041559.t14FxqrC008648>