]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[block] Ignore redundant xfer_window_changed() messages
authorMichael Brown <mcb30@ipxe.org>
Tue, 28 Mar 2017 15:58:47 +0000 (18:58 +0300)
committerMichael Brown <mcb30@ipxe.org>
Tue, 28 Mar 2017 16:02:38 +0000 (19:02 +0300)
For some block device protocols, the active path may continue to
receive xfer_window_changed() notifications during normal use.  These
currently result in the active path being erroneously closed.

Fix by ignoring any xfer_window_changed() messages if this path is
already the active path.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/sanboot.c

index 7dbf03db2e94f05d1468e9b85b8c6476887a43b9..03beae799b51cddb5425a39209fce7c78a0c9923 100644 (file)
@@ -282,6 +282,10 @@ static size_t sanpath_block_window ( struct san_path *sanpath __unused ) {
 static void sanpath_step ( struct san_path *sanpath ) {
        struct san_device *sandev = sanpath->sandev;
 
+       /* Ignore if we are already the active device */
+       if ( sanpath == sandev->active )
+               return;
+
        /* Wait until path has become available */
        if ( ! xfer_window ( &sanpath->block ) )
                return;