Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 May 1996 16:52:16 +0400 (MSD)
From:      flash@eru.tubank.msk.su
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   i386/1243: Bug in if_ep driver
Message-ID:  <199605241252.QAA03516@eru.tubank.msk.su>
Resent-Message-ID: <199605241300.GAA28097@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1243
>Category:       i386
>Synopsis:       if_ep calculates wrong offset in 32-bit mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 24 06:00:01 PDT 1996
>Last-Modified:
>Originator:     Alexander Tischenko
>Organization:
Society of Financial Telecommunications
>Release:        FreeBSD 2.2-960501-SNAP i386
>Environment:

Compaq Prosignia/300, Pentium 90MHz, 3C579/EISA EtherLink III.

>Description:

3C579 board is detected ok, reception in 32-bit mode works,
transmission not.

>How-To-Repeat:

	    outsl(BASE + EP_W1_TX_PIO_WR_1, mtod(m, caddr_t),
		  m->m_len / 4);
	    if (m->m_len & 3)
		outsb(BASE + EP_W1_TX_PIO_WR_1,
		      mtod(m, caddr_t) + m->m_len / 4,
		      m->m_len & 3);     ------------ !

>Fix:

Bug in the driver code.
i386/isa/if_ep.c, Line 798, offset from the start is incorrectly calculated.
Should be (m->m_len & (~3)) , not the number of long words in the buffer.

	    outsl(BASE + EP_W1_TX_PIO_WR_1, mtod(m, caddr_t),
		  m->m_len / 4);
	    if (m->m_len & 3)
		outsb(BASE + EP_W1_TX_PIO_WR_1,
		      mtod(m, caddr_t) + (m->m_len & (~3)),
		      m->m_len & 3);     -----------------
>Audit-Trail:
>Unformatted:



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