소스 검색

[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;

Loading…
취소
저장