<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-06-24)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-24 Arnout Vandecappelle <arnout@mind.be>
PR 1586/misc
* libchip/i2c/spi-sd-card.h, libchip/i2c/spi-sd-card.c: Add retries to
SD card accesses.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/ChangeLog.diff?r1=text&tr1=1.527&r2=text&tr2=1.528&diff_format=h">M</a></td><td width='1%'>1.528</td><td width='100%'>c/src/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/libchip/i2c/spi-sd-card.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>c/src/libchip/i2c/spi-sd-card.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/libchip/i2c/spi-sd-card.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&diff_format=h">M</a></td><td width='1%'>1.23</td><td width='100%'>c/src/libchip/i2c/spi-sd-card.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/ChangeLog:1.527 rtems/c/src/ChangeLog:1.528
--- rtems/c/src/ChangeLog:1.527 Tue Jun 22 06:36:13 2010
+++ rtems/c/src/ChangeLog Thu Jun 24 02:54:14 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-24 Arnout Vandecappelle <arnout@mind.be>
+
+ PR 1586/misc
+ * libchip/i2c/spi-sd-card.h, libchip/i2c/spi-sd-card.c: Add retries to
+ SD card accesses.
+
</font> 2010-06-22 Arnout Vandecappelle <arnout@mind.be>
PR 1580/misc
<font color='#006600'>diff -u rtems/c/src/libchip/i2c/spi-sd-card.h:1.6 rtems/c/src/libchip/i2c/spi-sd-card.h:1.7
--- rtems/c/src/libchip/i2c/spi-sd-card.h:1.6 Tue Jun 22 03:37:26 2010
+++ rtems/c/src/libchip/i2c/spi-sd-card.h Thu Jun 24 02:54:15 2010
</font><font color='#997700'>@@ -69,6 +69,7 @@
</font> bool busy;
bool verbose;
bool schedule_if_busy;
<font color='#000088'>+ uint32_t retries;
</font> } sd_card_driver_entry;
extern sd_card_driver_entry sd_card_driver_table [];
<font color='#006600'>diff -u rtems/c/src/libchip/i2c/spi-sd-card.c:1.22 rtems/c/src/libchip/i2c/spi-sd-card.c:1.23
--- rtems/c/src/libchip/i2c/spi-sd-card.c:1.22 Tue Jun 22 06:36:14 2010
+++ rtems/c/src/libchip/i2c/spi-sd-card.c Thu Jun 24 02:54:15 2010
</font><font color='#997700'>@@ -1236,15 +1236,26 @@
</font> rtems_device_minor_number minor = rtems_disk_get_minor_number( dd);
sd_card_driver_entry *e = &sd_card_driver_table [minor];
rtems_blkdev_request *r = (rtems_blkdev_request *) arg;
<font color='#000088'>+ int (*f)( sd_card_driver_entry *, rtems_blkdev_request *);
+ uint32_t retries = e->retries;
+ int result;
+
</font> switch (r->req) {
case RTEMS_BLKDEV_REQ_READ:
<font color='#880000'>- return sd_card_disk_block_read( e, r);
</font><font color='#000088'>+ f = sd_card_disk_block_read;
+ break;
</font> case RTEMS_BLKDEV_REQ_WRITE:
<font color='#880000'>- return sd_card_disk_block_write( e, r);
</font><font color='#000088'>+ f = sd_card_disk_block_write;
+ break;
</font> default:
errno = EINVAL;
return -1;
}
<font color='#000088'>+ do {
+ result = f( e, r);
+ } while (retries-- > 0 && result != 0);
+ return result;
+
</font> } else if (req == RTEMS_BLKIO_CAPABILITIES) {
*(uint32_t *) arg = RTEMS_BLKDEV_CAP_MULTISECTOR_CONT;
return 0;
<font color='#997700'>@@ -1265,9 +1276,12 @@
</font> for (minor = 0; minor < sd_card_driver_table_size; ++minor) {
sd_card_driver_entry *e = &sd_card_driver_table [minor];
dev_t dev = rtems_filesystem_make_dev_t( major, minor);
<font color='#000088'>+ uint32_t retries = e->retries;
</font>
/* Initialize SD Card */
<font color='#880000'>- sc = sd_card_init( e);
</font><font color='#000088'>+ do {
+ sc = sd_card_init( e);
+ } while (retries-- > 0 && sc != RTEMS_SUCCESSFUL);
</font> RTEMS_CHECK_SC( sc, "Initialize SD Card");
/* Create disk device */
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>