summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sisreg.h
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-06-30 21:59:08 +0000
committerluigi <luigi@FreeBSD.org>2002-06-30 21:59:08 +0000
commite34ef2877bee4cc1dd4c0c6702add67b8c81c6a0 (patch)
treec49e01c1e0017c8dc98db742120350df62e00c37 /sys/pci/if_sisreg.h
parenta8195db27e3129f3da53acacef257e34d842be6a (diff)
downloadFreeBSD-src-e34ef2877bee4cc1dd4c0c6702add67b8c81c6a0.zip
FreeBSD-src-e34ef2877bee4cc1dd4c0c6702add67b8c81c6a0.tar.gz
Make sure that if_timer does not get reset if there are packets
still queued for transmission. This should solve the problem of the device stalling on transmissions if some link event prevents transmission. There are other drivers which have the same problem and need to be fixed in the same way. MFC after: 3 days
Diffstat (limited to 'sys/pci/if_sisreg.h')
-rw-r--r--sys/pci/if_sisreg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h
index 8244f2a..2e2ee19 100644
--- a/sys/pci/if_sisreg.h
+++ b/sys/pci/if_sisreg.h
@@ -309,7 +309,7 @@ struct sis_desc {
#define SIS_LASTDESC(x) (!((x)->sis_ctl & SIS_CMDSTS_MORE)))
#define SIS_OWNDESC(x) ((x)->sis_ctl & SIS_CMDSTS_OWN)
-#define SIS_INC(x, y) { if (++(x) == y) x = 0; }
+#define SIS_INC(x, y) (x) = ((x) == ((y)-1)) ? 0 : (x)+1
#define SIS_RXBYTES(x) (((x)->sis_ctl & SIS_CMDSTS_BUFLEN) - ETHER_CRC_LEN)
#define SIS_RXSTAT_COLL 0x00010000
OpenPOWER on IntegriCloud