From e34ef2877bee4cc1dd4c0c6702add67b8c81c6a0 Mon Sep 17 00:00:00 2001 From: luigi Date: Sun, 30 Jun 2002 21:59:08 +0000 Subject: 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 --- sys/pci/if_sisreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/pci/if_sisreg.h') 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 -- cgit v1.1