Author: imp Date: Sat Mar 28 06:22:11 2009 New Revision: 190488 URL: http://svn.freebsd.org/changeset/base/190488
Log: When reading via memory, read in (amount + 1) / 2 (to properly round up) rather than amount + 1 / 2, which is the same as amount, or 2x too many words which leads to data corruption. # This fixes the sbdrop panics I was seeing with the Toshiba LANCT00A. Modified: head/sys/dev/ed/if_ed.c Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Sat Mar 28 06:12:39 2009 (r190487) +++ head/sys/dev/ed/if_ed.c Sat Mar 28 06:22:11 2009 (r190488) @@ -1311,7 +1311,7 @@ ed_shmem_readmem16(struct ed_softc *sc, uint16_t amount) { bus_space_read_region_2(sc->mem_bst, sc->mem_bsh, src, (uint16_t *)dst, - amount + 1 / 2); + (amount + 1) / 2); } /* _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"