浏览代码

[block] Ignore redundant xfer_window_changed() messages

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>
tags/v1.20.1
Michael Brown 7 年前
父节点
当前提交
414b4fc9c5
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/core/sanboot.c

+ 4
- 0
src/core/sanboot.c 查看文件

282
 static void sanpath_step ( struct san_path *sanpath ) {
282
 static void sanpath_step ( struct san_path *sanpath ) {
283
 	struct san_device *sandev = sanpath->sandev;
283
 	struct san_device *sandev = sanpath->sandev;
284
 
284
 
285
+	/* Ignore if we are already the active device */
286
+	if ( sanpath == sandev->active )
287
+		return;
288
+
285
 	/* Wait until path has become available */
289
 	/* Wait until path has become available */
286
 	if ( ! xfer_window ( &sanpath->block ) )
290
 	if ( ! xfer_window ( &sanpath->block ) )
287
 		return;
291
 		return;

正在加载...
取消
保存