]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/ide/ide-eh.c
iwlwifi: Thermal Throttling Management - part 2
[mirror_ubuntu-bionic-kernel.git] / drivers / ide / ide-eh.c
index 39d589254d415559ab13836fb9c520000ef86a20..e9abf2c3c33544c047ec2db7f29f1f295da0a397 100644 (file)
@@ -149,7 +149,7 @@ static inline void ide_complete_drive_reset(ide_drive_t *drive, int err)
        if (rq && blk_special_request(rq) && rq->cmd[0] == REQ_DRIVE_RESET) {
                if (err <= 0 && rq->errors == 0)
                        rq->errors = -EIO;
-               ide_complete_rq(drive, err ? err : 0, ide_rq_bytes(rq));
+               ide_complete_rq(drive, err ? err : 0, blk_rq_bytes(rq));
        }
 }
 
@@ -407,8 +407,9 @@ static ide_startstop_t do_reset1(ide_drive_t *drive, int do_not_try_atapi)
        /* more than enough time */
        udelay(10);
        /* clear SRST, leave nIEN (unless device is on the quirk list) */
-       tp_ops->write_devctl(hwif, (drive->quirk_list == 2 ? 0 : ATA_NIEN) |
-                            ATA_DEVCTL_OBS);
+       tp_ops->write_devctl(hwif,
+               ((drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) ? 0 : ATA_NIEN) |
+                ATA_DEVCTL_OBS);
        /* more than enough time */
        udelay(10);
        hwif->poll_timeout = jiffies + WAIT_WORSTCASE;