trs80: fix swapping - bug in devhd handling of cylinder boundaries
authorAlan Cox <alan@linux.intel.com>
Sat, 16 May 2015 00:30:51 +0000 (01:30 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 16 May 2015 00:30:51 +0000 (01:30 +0100)
Kernel/platform-trs80/devhd.c

index 7106415..069c405 100644 (file)
@@ -144,8 +144,8 @@ int hd_transfer(uint8_t minor, bool is_read, uint8_t rawflag)
                dptr += 256;
                sector++;
                /* Cheaper than divison! */
-               if (sector == 33) {
-                       sector = 1;
+               if (sector == 32) {
+                       sector = 0;
                        head++;
                        if (head == p->g.head) {
                                head = 0;