Module Name: src Committed By: sborrill Date: Thu Jan 5 11:54:05 UTC 2012
Modified Files: src/sys/dev/pci [netbsd-5]: if_wmreg.h Log Message: Pull up the following revisions(s) (requested by dyoung in ticket #1703): sys/dev/pci/if_wmreg.h: revision 1.46 Mark all of the wm(4) Rx descriptor fields 'volatile' so that the compiler will not re-order accesses. Some versions of GCC (such as one in NetBSD 5.x) definitely do re-order reads from these fields if they're not marked volatile. To generate a diff of this commit: cvs rdiff -u -r1.24.20.5 -r1.24.20.6 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_wmreg.h diff -u src/sys/dev/pci/if_wmreg.h:1.24.20.5 src/sys/dev/pci/if_wmreg.h:1.24.20.6 --- src/sys/dev/pci/if_wmreg.h:1.24.20.5 Fri Nov 19 23:40:28 2010 +++ src/sys/dev/pci/if_wmreg.h Thu Jan 5 11:54:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wmreg.h,v 1.24.20.5 2010/11/19 23:40:28 riz Exp $ */ +/* $NetBSD: if_wmreg.h,v 1.24.20.6 2012/01/05 11:54:05 sborrill Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -57,14 +57,14 @@ typedef struct wiseman_addr { * and there must be an even multiple of 8 descriptors in the ring. */ typedef struct wiseman_rxdesc { - wiseman_addr_t wrx_addr; /* buffer address */ + volatile wiseman_addr_t wrx_addr; /* buffer address */ - uint16_t wrx_len; /* buffer length */ - uint16_t wrx_cksum; /* checksum (starting at PCSS) */ + volatile uint16_t wrx_len; /* buffer length */ + volatile uint16_t wrx_cksum; /* checksum (starting at PCSS)*/ - uint8_t wrx_status; /* Rx status */ - uint8_t wrx_errors; /* Rx errors */ - uint16_t wrx_special; /* special field (VLAN, etc.) */ + volatile uint8_t wrx_status; /* Rx status */ + volatile uint8_t wrx_errors; /* Rx errors */ + volatile uint16_t wrx_special; /* special field (VLAN, etc.) */ } __packed wiseman_rxdesc_t; /* wrx_status bits */