mtx: mask sector count on side1
authorAlan Cox <alan@linux.intel.com>
Sun, 14 Dec 2014 23:26:01 +0000 (23:26 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 14 Dec 2014 23:26:01 +0000 (23:26 +0000)
The MTX512 doesn't write sector labels 17-32 on the second side but recycles
1-16

Kernel/platform-mtx/floppy.s

index 2a9768d..ad5a7c1 100644 (file)
@@ -96,6 +96,7 @@ seekside1:
 seekside:
        out     (FDCCTRL), a
        ld      a, SECTOR(ix)
+       and     #15
        inc a
        out     (FDCSEC), a
        ld      a, TRACK(ix)
@@ -145,6 +146,7 @@ fdio_s1:set 1, a
 fdio_setsec:
        out     (FDCCTRL), a
        ld      a, SECTOR(ix)
+       and     #15
        inc     a               ; 1 based
        out     (FDCSEC), a
        in      a, (FDCREG)     ; Clear any pending status