Fix VR_RXSTAT_RX_OK bit definition which lasted for more than 9

years. All datasheet I have indicates the bit 15 is the
VR_RXSTAT_RX_OK. The bit 14 is reserved for all Rhine family
except VT6105M. VT6105M uses that bit to indicate a VLAN frame
with matching CAM VLAN id.
Use the VR_RXSTAT_RX_OK instead of VR_RXSTAT_RXERR when vr(4)
checks the validity of received frame.
This should fix occasional dropping frames on VT6105M.

Tested by:	Goran Lowkrantz ( goran.lowkrantz at ismobile dot com )
MFC after:	1 week
This commit is contained in:
Pyun YongHyeon 2008-07-16 08:02:23 +00:00
parent b689e6a8a3
commit 0a76b25957
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180551
2 changed files with 4 additions and 3 deletions

View File

@ -1324,8 +1324,8 @@ vr_rxeof(struct vr_softc *sc)
* We don't support SG in Rx path yet, so discard
* partial frame.
*/
if ((rxstat & (VR_RXSTAT_RXERR | VR_RXSTAT_FIRSTFRAG |
VR_RXSTAT_LASTFRAG)) !=
if ((rxstat & VR_RXSTAT_RX_OK) == 0 ||
(rxstat & (VR_RXSTAT_FIRSTFRAG | VR_RXSTAT_LASTFRAG)) !=
(VR_RXSTAT_FIRSTFRAG | VR_RXSTAT_LASTFRAG)) {
ifp->if_ierrors++;
sc->vr_stat.rx_errors++;

View File

@ -455,7 +455,8 @@ struct vr_desc {
#define VR_RXSTAT_RX_PHYS 0x00000800
#define VR_RXSTAT_RX_BROAD 0x00001000
#define VR_RXSTAT_RX_MULTI 0x00002000
#define VR_RXSTAT_RX_OK 0x00004000
#define VR_RXSTAT_RX_VIDHIT 0x00004000 /* 6105M */
#define VR_RXSTAT_RX_OK 0x00008000
#define VR_RXSTAT_RXLEN 0x07FF0000
#define VR_RXSTAT_RXLEN_EXT 0x78000000
#define VR_RXSTAT_OWN 0x80000000