From owner-freebsd-bugs Fri May 24 06:00:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA28122 for bugs-outgoing; Fri, 24 May 1996 06:00:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA28097; Fri, 24 May 1996 06:00:02 -0700 (PDT) Resent-Date: Fri, 24 May 1996 06:00:02 -0700 (PDT) Resent-Message-Id: <199605241300.GAA28097@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, flash@eru.tubank.msk.su Received: from eru.tubank.msk.su (eru.tubank.msk.su [194.87.210.41]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id FAA27336 for ; Fri, 24 May 1996 05:52:46 -0700 (PDT) Received: by eru.tubank.msk.su (8.7.5/8.7.3) id QAA03516; Fri, 24 May 1996 16:52:16 +0400 (MSD) Message-Id: <199605241252.QAA03516@eru.tubank.msk.su> Date: Fri, 24 May 1996 16:52:16 +0400 (MSD) From: flash@eru.tubank.msk.su Reply-To: flash@eru.tubank.msk.su To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: i386/1243: Bug in if_ep driver Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: