Date: Sat, 7 Apr 2012 13:39:30 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 209200 for review Message-ID: <201204071339.q37DdUZY045277@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@209200?ac=10 Change 209200 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/04/07 13:39:22 When performing an SD Card write, ignore the ASR bit described by the specification as "most recently received data contains errors"; this bit is apparently always set if a block write is performed, and only useful when looking at the results of a block read. With this change, many block writes using the SD Card slot on the Terasic DE-4 board often succeed. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/sdcard/altera_sdcard_io.c#9 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/sdcard/altera_sdcard_io.c#9 (text+ko) ==== @@ -301,8 +301,8 @@ /* * Handle I/O retries if an error is returned by the device. */ - if (asr & - (ALTERA_SDCARD_ASR_CMDTIMEOUT | ALTERA_SDCARD_ASR_CMDDATAERROR)) { + if ((asr & ALTERA_SDCARD_ASR_CMDTIMEOUT) || (bp->bio_cmd == BIO_READ + && (asr & ALTERA_SDCARD_ASR_CMDDATAERROR))) { rr1 = altera_sdcard_read_rr1(sc); sc->as_retriesleft--; if (sc->as_retriesleft != 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204071339.q37DdUZY045277>