Explorar el Código

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

Keir Fraser hace 3 años
padre
commit
ebe7a03a37
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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;