Эх сурвалжийг харах

CMD_READ_FLUX: Do not timeout on missing Index if read doesn't terminate on Index.

Keir Fraser 3 жил өмнө
parent
commit
ebe7a03a37
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      src/floppy.c

+ 3 - 2
src/floppy.c

@@ -759,10 +759,11 @@ static void floppy_read(void)
             floppy_state = ST_read_flux_drain;
 
         } else if ((index.count == 0)
+                   && (read.max_index != INT_MAX)
                    && (time_since(flux_op.start) > time_ms(2000))) {
 
-            /* Timeout */
-            printk("NO INDEX\n");
+            /* Timeout if no index within two seconds, unless the read is
+             * not index terminated. */
             floppy_flux_end();
             flux_op.status = ACK_NO_INDEX;
             floppy_state = ST_read_flux_drain;