Use CSR_WRITE_1() to write RTK_TXSTART register because it is localted

at an odd address (0xd9) and noted "8 bit" in rtl81x9reg.h.

XXX: FreeBSD and OpenBSD also use CSR_WRITE_1() to write RTK_GTXSTART
XXX: for 8169 even though there is a "16 bits" comment at GTXSTART macro.
XXX: Which is correct?
This commit is contained in:
tsutsui 2006-10-21 03:44:47 +00:00
parent 877957f469
commit 5227317a1e

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtl8169.c,v 1.42 2006/10/20 17:11:36 tsutsui Exp $ */
/* $NetBSD: rtl8169.c,v 1.43 2006/10/21 03:44:47 tsutsui Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@ -1733,7 +1733,7 @@ re_start(struct ifnet *ifp)
if (sc->rtk_type == RTK_8169)
CSR_WRITE_2(sc, RTK_GTXSTART, RTK_TXSTART_START);
else
CSR_WRITE_2(sc, RTK_TXSTART, RTK_TXSTART_START);
CSR_WRITE_1(sc, RTK_TXSTART, RTK_TXSTART_START);
/*
* Use the countdown timer for interrupt moderation.