ソースを参照

[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,6 +282,10 @@ static size_t sanpath_block_window ( struct san_path *sanpath __unused ) {
282 282
 static void sanpath_step ( struct san_path *sanpath ) {
283 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 289
 	/* Wait until path has become available */
286 290
 	if ( ! xfer_window ( &sanpath->block ) )
287 291
 		return;

読み込み中…
キャンセル
保存