]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/ide/tx4939ide.c
ide: add "flagged" taskfile flags to struct ide_taskfile (v2)
[mirror_ubuntu-bionic-kernel.git] / drivers / ide / tx4939ide.c
index 882f6f07c4764cdcacb5e3d90c008586897faae2..f0033eb2e8859bfed87e81797203b295af2ea2c0 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/io.h>
 #include <linux/scatterlist.h>
 
+#include <asm/ide.h>
+
 #define MODNAME        "tx4939ide"
 
 /* ATA Shadow Registers (8-bit except for Data which is 16-bit) */
@@ -261,9 +263,9 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct request *rq)
                                bcount = cur_len;
                        /*
                         * This workaround for zero count seems required.
-                        * (standard ide_build_dmatable do it too)
+                        * (standard ide_build_dmatable does it too)
                         */
-                       if ((bcount & 0xffff) == 0x0000)
+                       if (bcount == 0x10000)
                                bcount = 0x8000;
                        *table++ = bcount & 0xffff;
                        *table++ = cur_addr;
@@ -472,10 +474,10 @@ static void tx4939ide_tf_load(ide_drive_t *drive, ide_task_t *task)
        struct ide_taskfile *tf = &task->tf;
        u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF;
 
-       if (task->tf_flags & IDE_TFLAG_FLAGGED)
+       if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
                HIHI = 0xFF;
 
-       if (task->tf_flags & IDE_TFLAG_OUT_DATA) {
+       if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) {
                u16 data = (tf->hob_data << 8) | tf->data;
 
                /* no endian swap */
@@ -517,7 +519,7 @@ static void tx4939ide_tf_read(ide_drive_t *drive, ide_task_t *task)
        struct ide_io_ports *io_ports = &hwif->io_ports;
        struct ide_taskfile *tf = &task->tf;
 
-       if (task->tf_flags & IDE_TFLAG_IN_DATA) {
+       if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
                u16 data;
 
                /* no endian swap */