aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io-std.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:37 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:37 -0400
commit22aa4b32a19b1f231d4ce7e9af6354b577a22a35 (patch)
tree3e773e7102e4ea6bb6b4c00edce442c4e8f37edb /drivers/ide/ide-io-std.c
parente6830a86c260d73c6f370aa7ed17ee6c71e5ee05 (diff)
ide: remove ide_task_t typedef
While at it: - rename struct ide_task_s to struct ide_cmd - remove stale comments from idedisk_{read_native,set}_max_address() - drop unused 'cmd' argument from ide_{cmd,task}_ioctl() - drop unused 'task' argument from tx4939ide_tf_load_fixup() - rename ide_complete_task() to ide_complete_cmd() - use consistent naming for struct ide_cmd variables There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io-std.c')
-rw-r--r--drivers/ide/ide-io-std.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index cad59f0bfbce..570c0cc4514d 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -82,24 +82,24 @@ void ide_set_irq(ide_hwif_t *hwif, int on)
82} 82}
83EXPORT_SYMBOL_GPL(ide_set_irq); 83EXPORT_SYMBOL_GPL(ide_set_irq);
84 84
85void ide_tf_load(ide_drive_t *drive, ide_task_t *task) 85void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
86{ 86{
87 ide_hwif_t *hwif = drive->hwif; 87 ide_hwif_t *hwif = drive->hwif;
88 struct ide_io_ports *io_ports = &hwif->io_ports; 88 struct ide_io_ports *io_ports = &hwif->io_ports;
89 struct ide_taskfile *tf = &task->tf; 89 struct ide_taskfile *tf = &cmd->tf;
90 void (*tf_outb)(u8 addr, unsigned long port); 90 void (*tf_outb)(u8 addr, unsigned long port);
91 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; 91 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
92 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; 92 u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
93 93
94 if (mmio) 94 if (mmio)
95 tf_outb = ide_mm_outb; 95 tf_outb = ide_mm_outb;
96 else 96 else
97 tf_outb = ide_outb; 97 tf_outb = ide_outb;
98 98
99 if (task->ftf_flags & IDE_FTFLAG_FLAGGED) 99 if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
100 HIHI = 0xFF; 100 HIHI = 0xFF;
101 101
102 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) { 102 if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
103 u16 data = (tf->hob_data << 8) | tf->data; 103 u16 data = (tf->hob_data << 8) | tf->data;
104 104
105 if (mmio) 105 if (mmio)
@@ -108,39 +108,39 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task)
108 outw(data, io_ports->data_addr); 108 outw(data, io_ports->data_addr);
109 } 109 }
110 110
111 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 111 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
112 tf_outb(tf->hob_feature, io_ports->feature_addr); 112 tf_outb(tf->hob_feature, io_ports->feature_addr);
113 if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) 113 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
114 tf_outb(tf->hob_nsect, io_ports->nsect_addr); 114 tf_outb(tf->hob_nsect, io_ports->nsect_addr);
115 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) 115 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
116 tf_outb(tf->hob_lbal, io_ports->lbal_addr); 116 tf_outb(tf->hob_lbal, io_ports->lbal_addr);
117 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) 117 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
118 tf_outb(tf->hob_lbam, io_ports->lbam_addr); 118 tf_outb(tf->hob_lbam, io_ports->lbam_addr);
119 if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) 119 if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
120 tf_outb(tf->hob_lbah, io_ports->lbah_addr); 120 tf_outb(tf->hob_lbah, io_ports->lbah_addr);
121 121
122 if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) 122 if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
123 tf_outb(tf->feature, io_ports->feature_addr); 123 tf_outb(tf->feature, io_ports->feature_addr);
124 if (task->tf_flags & IDE_TFLAG_OUT_NSECT) 124 if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
125 tf_outb(tf->nsect, io_ports->nsect_addr); 125 tf_outb(tf->nsect, io_ports->nsect_addr);
126 if (task->tf_flags & IDE_TFLAG_OUT_LBAL) 126 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
127 tf_outb(tf->lbal, io_ports->lbal_addr); 127 tf_outb(tf->lbal, io_ports->lbal_addr);
128 if (task->tf_flags & IDE_TFLAG_OUT_LBAM) 128 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
129 tf_outb(tf->lbam, io_ports->lbam_addr); 129 tf_outb(tf->lbam, io_ports->lbam_addr);
130 if (task->tf_flags & IDE_TFLAG_OUT_LBAH) 130 if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
131 tf_outb(tf->lbah, io_ports->lbah_addr); 131 tf_outb(tf->lbah, io_ports->lbah_addr);
132 132
133 if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) 133 if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
134 tf_outb((tf->device & HIHI) | drive->select, 134 tf_outb((tf->device & HIHI) | drive->select,
135 io_ports->device_addr); 135 io_ports->device_addr);
136} 136}
137EXPORT_SYMBOL_GPL(ide_tf_load); 137EXPORT_SYMBOL_GPL(ide_tf_load);
138 138
139void ide_tf_read(ide_drive_t *drive, ide_task_t *task) 139void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
140{ 140{
141 ide_hwif_t *hwif = drive->hwif; 141 ide_hwif_t *hwif = drive->hwif;
142 struct ide_io_ports *io_ports = &hwif->io_ports; 142 struct ide_io_ports *io_ports = &hwif->io_ports;
143 struct ide_taskfile *tf = &task->tf; 143 struct ide_taskfile *tf = &cmd->tf;
144 void (*tf_outb)(u8 addr, unsigned long port); 144 void (*tf_outb)(u8 addr, unsigned long port);
145 u8 (*tf_inb)(unsigned long port); 145 u8 (*tf_inb)(unsigned long port);
146 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; 146 u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
@@ -153,7 +153,7 @@ void ide_tf_read(ide_drive_t *drive, ide_task_t *task)
153 tf_inb = ide_inb; 153 tf_inb = ide_inb;
154 } 154 }
155 155
156 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { 156 if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
157 u16 data; 157 u16 data;
158 158
159 if (mmio) 159 if (mmio)
@@ -168,31 +168,31 @@ void ide_tf_read(ide_drive_t *drive, ide_task_t *task)
168 /* be sure we're looking at the low order bits */ 168 /* be sure we're looking at the low order bits */
169 tf_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); 169 tf_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr);
170 170
171 if (task->tf_flags & IDE_TFLAG_IN_FEATURE) 171 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE)
172 tf->feature = tf_inb(io_ports->feature_addr); 172 tf->feature = tf_inb(io_ports->feature_addr);
173 if (task->tf_flags & IDE_TFLAG_IN_NSECT) 173 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
174 tf->nsect = tf_inb(io_ports->nsect_addr); 174 tf->nsect = tf_inb(io_ports->nsect_addr);
175 if (task->tf_flags & IDE_TFLAG_IN_LBAL) 175 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
176 tf->lbal = tf_inb(io_ports->lbal_addr); 176 tf->lbal = tf_inb(io_ports->lbal_addr);
177 if (task->tf_flags & IDE_TFLAG_IN_LBAM) 177 if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
178 tf->lbam = tf_inb(io_ports->lbam_addr); 178 tf->lbam = tf_inb(io_ports->lbam_addr);
179 if (task->tf_flags & IDE_TFLAG_IN_LBAH) 179 if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
180 tf->lbah = tf_inb(io_ports->lbah_addr); 180 tf->lbah = tf_inb(io_ports->lbah_addr);
181 if (task->tf_flags & IDE_TFLAG_IN_DEVICE) 181 if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
182 tf->device = tf_inb(io_ports->device_addr); 182 tf->device = tf_inb(io_ports->device_addr);
183 183
184 if (task->tf_flags & IDE_TFLAG_LBA48) { 184 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
185 tf_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); 185 tf_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr);
186 186
187 if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 187 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE)
188 tf->hob_feature = tf_inb(io_ports->feature_addr); 188 tf->hob_feature = tf_inb(io_ports->feature_addr);
189 if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 189 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
190 tf->hob_nsect = tf_inb(io_ports->nsect_addr); 190 tf->hob_nsect = tf_inb(io_ports->nsect_addr);
191 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 191 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
192 tf->hob_lbal = tf_inb(io_ports->lbal_addr); 192 tf->hob_lbal = tf_inb(io_ports->lbal_addr);
193 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 193 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
194 tf->hob_lbam = tf_inb(io_ports->lbam_addr); 194 tf->hob_lbam = tf_inb(io_ports->lbam_addr);
195 if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 195 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
196 tf->hob_lbah = tf_inb(io_ports->lbah_addr); 196 tf->hob_lbah = tf_inb(io_ports->lbah_addr);
197 } 197 }
198} 198}