diff options
-rw-r--r-- | sys/dev/sis/if_sis.c | 6 | ||||
-rw-r--r-- | sys/dev/sis/if_sisreg.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c index 90cd430..8da95af 100644 --- a/sys/dev/sis/if_sis.c +++ b/sys/dev/sis/if_sis.c @@ -1432,7 +1432,11 @@ sis_rxeof(struct sis_softc *sc) * it should simply get re-used next time this descriptor * comes up in the ring. */ - if (!(rxstat & SIS_CMDSTS_PKT_OK)) { + if ((ifp->if_capenable & IFCAP_VLAN_MTU) != 0 && + total_len <= (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN - + ETHER_CRC_LEN)) + rxstat &= ~SIS_RXSTAT_GIANT; + if (SIS_RXSTAT_ERROR(rxstat) != 0) { ifp->if_ierrors++; if (rxstat & SIS_RXSTAT_COLL) ifp->if_collisions++; diff --git a/sys/dev/sis/if_sisreg.h b/sys/dev/sis/if_sisreg.h index 7f93062..927bd58 100644 --- a/sys/dev/sis/if_sisreg.h +++ b/sys/dev/sis/if_sisreg.h @@ -348,6 +348,11 @@ struct sis_desc { #define SIS_RXSTAT_OVERRUN 0x02000000 #define SIS_RXSTAT_RX_ABORT 0x04000000 +#define SIS_RXSTAT_ERROR(x) \ + ((x) & (SIS_RXSTAT_RX_ABORT | SIS_RXSTAT_OVERRUN | \ + SIS_RXSTAT_GIANT | SIS_RXSTAT_SYMBOLERR | SIS_RXSTAT_RUNT | \ + SIS_RXSTAT_CRCERR | SIS_RXSTAT_ALIGNERR)) + #define SIS_DSTCLASS_REJECT 0x00000000 #define SIS_DSTCLASS_UNICAST 0x00800000 #define SIS_DSTCLASS_MULTICAST 0x01000000 |