aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-disk_proc.c')
-rw-r--r--drivers/ide/ide-disk_proc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c
index 5766c1f62ad2..afe4f47e9e19 100644
--- a/drivers/ide/ide-disk_proc.c
+++ b/drivers/ide/ide-disk_proc.c
@@ -6,33 +6,34 @@
6 6
7static int smart_enable(ide_drive_t *drive) 7static int smart_enable(ide_drive_t *drive)
8{ 8{
9 ide_task_t args; 9 struct ide_cmd cmd;
10 struct ide_taskfile *tf = &args.tf; 10 struct ide_taskfile *tf = &cmd.tf;
11 11
12 memset(&args, 0, sizeof(ide_task_t)); 12 memset(&cmd, 0, sizeof(cmd));
13 tf->feature = ATA_SMART_ENABLE; 13 tf->feature = ATA_SMART_ENABLE;
14 tf->lbam = ATA_SMART_LBAM_PASS; 14 tf->lbam = ATA_SMART_LBAM_PASS;
15 tf->lbah = ATA_SMART_LBAH_PASS; 15 tf->lbah = ATA_SMART_LBAH_PASS;
16 tf->command = ATA_CMD_SMART; 16 tf->command = ATA_CMD_SMART;
17 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; 17 cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
18 return ide_no_data_taskfile(drive, &args); 18
19 return ide_no_data_taskfile(drive, &cmd);
19} 20}
20 21
21static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd) 22static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd)
22{ 23{
23 ide_task_t args; 24 struct ide_cmd cmd;
24 struct ide_taskfile *tf = &args.tf; 25 struct ide_taskfile *tf = &cmd.tf;
25 26
26 memset(&args, 0, sizeof(ide_task_t)); 27 memset(&cmd, 0, sizeof(cmd));
27 tf->feature = sub_cmd; 28 tf->feature = sub_cmd;
28 tf->nsect = 0x01; 29 tf->nsect = 0x01;
29 tf->lbam = ATA_SMART_LBAM_PASS; 30 tf->lbam = ATA_SMART_LBAM_PASS;
30 tf->lbah = ATA_SMART_LBAH_PASS; 31 tf->lbah = ATA_SMART_LBAH_PASS;
31 tf->command = ATA_CMD_SMART; 32 tf->command = ATA_CMD_SMART;
32 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; 33 cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
33 args.data_phase = TASKFILE_IN; 34 cmd.data_phase = TASKFILE_IN;
34 35
35 return ide_raw_taskfile(drive, &args, buf, 1); 36 return ide_raw_taskfile(drive, &cmd, buf, 1);
36} 37}
37 38
38static int proc_idedisk_read_cache 39static int proc_idedisk_read_cache