<!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-05-17)</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>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>010-05-18      Chris Johns <chrisj@rtems.org>

        * libchip/i2c/spi-sd-card.c, libchip/ide/ata.c: PR
        1448/filesystem.
</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.512&r2=text&tr2=1.513&diff_format=h">M</a></td><td width='1%'>1.513</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.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>c/src/libchip/i2c/spi-sd-card.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/libchip/ide/ata.c.diff?r1=text&tr1=1.37&r2=text&tr2=1.38&diff_format=h">M</a></td><td width='1%'>1.38</td><td width='100%'>c/src/libchip/ide/ata.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/ChangeLog:1.512 rtems/c/src/ChangeLog:1.513
--- rtems/c/src/ChangeLog:1.512 Tue May 11 10:05:17 2010
+++ rtems/c/src/ChangeLog       Mon May 17 21:12:39 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-05-18    Chris Johns <chrisj@rtems.org>
+
+       * libchip/i2c/spi-sd-card.c, libchip/ide/ata.c: PR
+       1448/filesystem.
+
</font> 2010-05-11        Ralf Corsépius <ralf.corsepius@rtems.org>
 
        * aclocal/bsp-alias.m4: Change quoting to work-round

<font color='#006600'>diff -u rtems/c/src/libchip/i2c/spi-sd-card.c:1.15 rtems/c/src/libchip/i2c/spi-sd-card.c:1.16
--- rtems/c/src/libchip/i2c/spi-sd-card.c:1.15  Tue Jan 19 03:10:03 2010
+++ rtems/c/src/libchip/i2c/spi-sd-card.c       Mon May 17 21:12:38 2010
</font><font color='#997700'>@@ -1134,7 +1134,7 @@
</font>                                 errno = EINVAL;
                                return -1;
                }
<font color='#880000'>-   } else if (req == RTEMS_BLKDEV_CAPABILITIES) {
</font><font color='#000088'>+      } else if (req == RTEMS_BLKIO_CAPABILITIES) {
</font>           *(uint32_t *) arg = RTEMS_BLKDEV_CAP_MULTISECTOR_CONT;
                return 0;
        } else {

<font color='#006600'>diff -u rtems/c/src/libchip/ide/ata.c:1.37 rtems/c/src/libchip/ide/ata.c:1.38
--- rtems/c/src/libchip/ide/ata.c:1.37  Thu Apr  8 11:36:13 2010
+++ rtems/c/src/libchip/ide/ata.c       Mon May 17 21:12:39 2010
</font><font color='#997700'>@@ -1019,7 +1019,7 @@
</font>             status = ata_non_data_request(device, cmd, argp);
             break;
 
<font color='#880000'>-        case RTEMS_BLKDEV_CAPABILITIES:
</font><font color='#000088'>+        case RTEMS_BLKIO_CAPABILITIES:
</font>             *((uint32_t*) argp)  = RTEMS_BLKDEV_CAP_MULTISECTOR_CONT;
             status = RTEMS_SUCCESSFUL;
             break;
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-05-18      Chris Johns <chrisj@rtems.org>

        * libblock/src/diskdevs.c, libblock/include/rtems/blkdev.h,
        libblock/src/bdbuf.c: PR 1448/filesystem.

        * libblock/include/rtems/blkdev.h, libblock/src/bdbuf.c: PR
        1514/filesystem.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2294&r2=text&tr2=1.2295&diff_format=h">M</a></td><td width='1%'>1.2295</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libblock/include/rtems/blkdev.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&diff_format=h">M</a></td><td width='1%'>1.21</td><td width='100%'>cpukit/libblock/include/rtems/blkdev.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libblock/src/bdbuf.c.diff?r1=text&tr1=1.51&r2=text&tr2=1.52&diff_format=h">M</a></td><td width='1%'>1.52</td><td width='100%'>cpukit/libblock/src/bdbuf.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libblock/src/diskdevs.c.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/libblock/src/diskdevs.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2294 rtems/cpukit/ChangeLog:1.2295
--- rtems/cpukit/ChangeLog:1.2294       Mon May 17 03:08:30 2010
+++ rtems/cpukit/ChangeLog      Mon May 17 21:14:05 2010
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2010-05-18    Chris Johns <chrisj@rtems.org>
+
+       * libblock/src/diskdevs.c, libblock/include/rtems/blkdev.h,
+       libblock/src/bdbuf.c: PR 1448/filesystem.
+
+       * libblock/include/rtems/blkdev.h, libblock/src/bdbuf.c: PR
+       1514/filesystem.
+<span style="background-color: #FF0000">       </span>
</font> 2010-05-17        Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
 
        PR 1449/cpukit

<font color='#006600'>diff -u rtems/cpukit/libblock/include/rtems/blkdev.h:1.20 rtems/cpukit/libblock/include/rtems/blkdev.h:1.21
--- rtems/cpukit/libblock/include/rtems/blkdev.h:1.20   Tue Jan 19 03:10:03 2010
+++ rtems/cpukit/libblock/include/rtems/blkdev.h        Mon May 17 21:14:05 2010
</font><font color='#997700'>@@ -42,23 +42,18 @@
</font> 
 /**
  * Block device request type.
<font color='#000088'>+ *
+ * @warning The sync request is an IO one and only used from the cache. Use the
+ *          Block IO when operating at the device level. We need a sync request
+ *          to avoid requests looping for ever.
</font>  */
 typedef enum rtems_blkdev_request_op {
   RTEMS_BLKDEV_REQ_READ,       /**< Read the requested blocks of data. */
   RTEMS_BLKDEV_REQ_WRITE,      /**< Write the requested blocks of data. */
<font color='#880000'>-  RTEMS_BLKDEV_CAPABILITIES    /**< Return the driver capabilities set. */
</font><font color='#000088'>+  RTEMS_BLKDEV_REQ_SYNC        /**< Sync any data with the media. */
</font> } rtems_blkdev_request_op;
 
 /**
<font color='#880000'>- * Only consecutive multi-sector buffer requests are supported.
- *
- * This option means the cache will only supply multiple buffers that are
- * inorder so the ATA multi-sector command for example can be used. This is a
- * hack to work around the current ATA driver.
- */
-#define RTEMS_BLKDEV_CAP_MULTISECTOR_CONT (1 << 0)
-
-/**
</font>  * @brief Block device request done callback function type.
  *
  * The first parameter @a arg must be the argument provided by the block device
<font color='#997700'>@@ -147,7 +142,7 @@
</font> /**
  * The start block in a request.
  *
<font color='#880000'>- * Only valid if the driver has returned the @ref RTEMS_BLKDEV_CAPABILITIES of
</font><font color='#000088'>+ * Only valid if the driver has returned the @ref RTEMS_BLKIO_CAPABILITIES of
</font>  * @ref RTEMS_BLKDEV_CAP_MULTISECTOR_CONT.
  */
 #define RTEMS_BLKDEV_START_BLOCK(req) (req->bufs[0].block)
<font color='#997700'>@@ -165,10 +160,26 @@
</font> #define RTEMS_BLKIO_GETSIZE         _IOR('B', 5, rtems_blkdev_bnum)
 #define RTEMS_BLKIO_SYNCDEV         _IO('B', 6)
 #define RTEMS_BLKIO_DELETED         _IO('B', 7)
<font color='#000088'>+#define RTEMS_BLKIO_CAPABILITIES    _IO('B', 8)
</font> 
 /** @} */
 
 /**
<font color='#000088'>+ * Only consecutive multi-sector buffer requests are supported.
+ *
+ * This option means the cache will only supply multiple buffers that are
+ * inorder so the ATA multi-sector command for example can be used. This is a
+ * hack to work around the current ATA driver.
+ */
+#define RTEMS_BLKDEV_CAP_MULTISECTOR_CONT (1 << 0)
+
+/**
+ * The driver will accept a sync call. A sync call is made to a driver
+ * after a bdbuf cache sync has finished.
+ */
+#define RTEMS_BLKDEV_CAP_SYNC (1 << 1)
+
+/**
</font>  * The device driver interface conventions suppose that a driver may contain an
  * initialize, open, close, read, write and IO control entry points. These
  * primitives (except initialize) can be implemented in a generic fashion based

<font color='#006600'>diff -u rtems/cpukit/libblock/src/bdbuf.c:1.51 rtems/cpukit/libblock/src/bdbuf.c:1.52
--- rtems/cpukit/libblock/src/bdbuf.c:1.51      Thu Apr 29 06:34:59 2010
+++ rtems/cpukit/libblock/src/bdbuf.c   Mon May 17 21:14:05 2010
</font><font color='#997700'>@@ -60,6 +60,7 @@
</font> {
   rtems_chain_control   bds;         /**< The transfer list of BDs. */
   dev_t                 dev;         /**< The device the transfer is for. */
<font color='#000088'>+  bool                  syncing;     /**< The data is a sync'ing. */
</font>   rtems_blkdev_request* write_req;   /**< The write request array. */
   uint32_t              bufs_per_bd; /**< Number of buffers per bd. */
 } rtems_bdbuf_swapout_transfer;
<font color='#997700'>@@ -74,7 +75,7 @@
</font>                                           * idle. */
   rtems_id                     id;       /**< The id of the task so we can wake
                                           * it. */
<font color='#880000'>-  volatile bool                enabled;  /**< The worked is enabled. */
</font><font color='#000088'>+  volatile bool                enabled;  /**< The worker is enabled. */
</font>   rtems_bdbuf_swapout_transfer transfer; /**< The transfer data for this
                                           * thread. */
 } rtems_bdbuf_swapout_worker;
<font color='#997700'>@@ -1319,9 +1320,9 @@
</font>   if (bdbuf_cache.initialised)
   {
     rtems_bdbuf_restore_preemption (prev_mode);
<font color='#880000'>-
</font>     return RTEMS_RESOURCE_IN_USE;
   }
<font color='#000088'>+
</font>   memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
   bdbuf_cache.initialised = true;
   rtems_bdbuf_restore_preemption (prev_mode);
<font color='#997700'>@@ -2042,7 +2043,7 @@
</font> #define bdbuf_alloc(size) __builtin_alloca (size)
 
   req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
<font color='#880000'>-                     sizeof ( rtems_blkdev_sg_buffer) *
</font><font color='#000088'>+                     sizeof (rtems_blkdev_sg_buffer) *
</font>                       (bdbuf_config.max_read_ahead_blocks + 1));
 
   if (rtems_bdbuf_tracer)
<font color='#997700'>@@ -2260,7 +2261,7 @@
</font> /**
  * Swapout transfer to the driver. The driver will break this I/O into groups
  * of consecutive write requests is multiple consecutive buffers are required
<font color='#880000'>- * by the driver.
</font><font color='#000088'>+ * by the driver. The cache is not locked.
</font>  *
  * @param transfer The transfer transaction.
  */
<font color='#997700'>@@ -2373,7 +2374,20 @@
</font>     }
 
     if (dd != &null_disk)
<font color='#000088'>+    {
+      /*
+       * If sync'ing and the deivce is capability of handling a sync IO control
+       * call perform the call.
+       */
+      if (transfer->syncing &&
+          (dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
+      {
+        /* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
+        /* How should the error be handled ? */
+      }
+<span style="background-color: #FF0000">      </span>
</font>       rtems_disk_release (dd);
<font color='#000088'>+    }
</font>   }
 }
 
<font color='#997700'>@@ -2401,20 +2415,31 @@
</font>   if (!rtems_chain_is_empty (chain))
   {
     rtems_chain_node* node = rtems_chain_head (chain);
<font color='#000088'>+    bool              sync_all;
+<span style="background-color: #FF0000">    </span>
</font>     node = node->next;
 
<font color='#000088'>+    /*
+     * A sync active with no valid dev means sync all.
+     */
+    if (sync_active && (*dev == BDBUF_INVALID_DEV))
+      sync_all = true;
+    else
+      sync_all = false;
+<span style="background-color: #FF0000">    </span>
</font>     while (!rtems_chain_is_tail (chain, node))
     {
       rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
 
       /*
        * Check if the buffer's hold timer has reached 0. If a sync is active
<font color='#880000'>-       * or someone waits for a buffer force all the timers to 0.
</font><font color='#000088'>+       * or someone waits for a buffer written force all the timers to 0.
</font>        *
        * @note Lots of sync requests will skew this timer. It should be based
        *       on TOD to be accurate. Does it matter ?
        */
<font color='#880000'>-      if (sync_active || rtems_bdbuf_has_buffer_waiters ())
</font><font color='#000088'>+      if (sync_all || (sync_active && (*dev == bd->dev))
+          || rtems_bdbuf_has_buffer_waiters ())
</font>         bd->hold_timer = 0;
 
       if (bd->hold_timer)
<font color='#997700'>@@ -2515,11 +2540,11 @@
</font>   /*
    * If a sync is active do not use a worker because the current code does not
    * cleaning up after. We need to know the buffers have been written when
<font color='#880000'>-   * syncing to the release sync lock and currently worker threads do not
-   * return to here. We do not know the worker is the last in a sequence of
-   * sync writes until after we have it running so we do not know to tell it to
-   * release the lock. The simplest solution is to get the main swap out task
-   * perform all sync operations.
</font><font color='#000088'>+   * syncing to release sync lock and currently worker threads do not return to
+   * here. We do not know the worker is the last in a sequence of sync writes
+   * until after we have it running so we do not know to tell it to release the
+   * lock. The simplest solution is to get the main swap out task perform all
+   * sync operations.
</font>    */
   if (bdbuf_cache.sync_active)
     worker = NULL;
<font color='#997700'>@@ -2533,7 +2558,8 @@
</font> 
   rtems_chain_initialize_empty (&transfer->bds);
   transfer->dev = BDBUF_INVALID_DEV;
<font color='#880000'>-
</font><font color='#000088'>+  transfer->syncing = bdbuf_cache.sync_active;
+<span style="background-color: #FF0000">  </span>
</font>   /*
    * When the sync is for a device limit the sync to that device. If the sync
    * is for a buffer handle process the devices in the order on the sync
<font color='#997700'>@@ -2541,7 +2567,7 @@
</font>    */
   if (bdbuf_cache.sync_active)
     transfer->dev = bdbuf_cache.sync_device;
<font color='#880000'>-
</font><font color='#000088'>+<span style="background-color: #FF0000">    </span>
</font>   /*
    * If we have any buffers in the sync queue move them to the modified
    * list. The first sync buffer will select the device we use.
<font color='#997700'>@@ -2753,6 +2779,7 @@
</font>   transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
   rtems_chain_initialize_empty (&transfer.bds);
   transfer.dev = BDBUF_INVALID_DEV;
<font color='#000088'>+  transfer.syncing = false;
</font> 
   /*
    * Localise the period.

<font color='#006600'>diff -u rtems/cpukit/libblock/src/diskdevs.c:1.25 rtems/cpukit/libblock/src/diskdevs.c:1.26
--- rtems/cpukit/libblock/src/diskdevs.c:1.25   Mon May 17 03:08:30 2010
+++ rtems/cpukit/libblock/src/diskdevs.c        Mon May 17 21:14:05 2010
</font><font color='#997700'>@@ -259,7 +259,7 @@
</font>   dd->ioctl = handler;
   dd->driver_data = driver_data;
 
<font color='#880000'>-  if ((*handler)(dd, RTEMS_BLKDEV_CAPABILITIES, &dd->capabilities) < 0) {
</font><font color='#000088'>+  if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
</font>     dd->capabilities = 0;
   }
 
</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>