diff options
Diffstat (limited to 'drivers/ide/ide-ioctls.c')
| -rw-r--r-- | drivers/ide/ide-ioctls.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index d3440b5010a..6233fa2cb8a 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c @@ -2,8 +2,10 @@ * IDE ioctls handling. */ +#include <linux/export.h> #include <linux/hdreg.h> #include <linux/ide.h> +#include <linux/slab.h> static const struct ide_ioctl_devset ide_ioctl_settings[] = { { HDIO_GET_32BIT, HDIO_SET_32BIT, &ide_devset_io_32bit }, @@ -139,8 +141,8 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) if (args[0] == ATA_CMD_SMART) { tf->nsect = args[3]; tf->lbal = args[1]; - tf->lbam = 0x4f; - tf->lbah = 0xc2; + tf->lbam = ATA_SMART_LBAM_PASS; + tf->lbah = ATA_SMART_LBAH_PASS; cmd.valid.out.tf = IDE_VALID_OUT_TF; cmd.valid.in.tf = IDE_VALID_NSECT; } else { @@ -162,7 +164,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) if (tf->command == ATA_CMD_SET_FEATURES && tf->feature == SETFEATURES_XFER && tf->nsect >= XFER_SW_DMA_0) { - xfer_rate = ide_find_dma_mode(drive, XFER_UDMA_6); + xfer_rate = ide_find_dma_mode(drive, tf->nsect); if (xfer_rate != tf->nsect) { err = -EINVAL; goto abort; |
