Просмотр исходного кода

[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 лет назад
Родитель
Сommit
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;

Загрузка…
Отмена
Сохранить