aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index f4c7db572a16..2eb99cab4a3d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1297,4 +1297,26 @@ static inline u8 ide_read_error(ide_drive_t *drive)
1297 return hwif->INB(hwif->io_ports[IDE_ERROR_OFFSET]); 1297 return hwif->INB(hwif->io_ports[IDE_ERROR_OFFSET]);
1298} 1298}
1299 1299
1300/*
1301 * Too bad. The drive wants to send us data which we are not ready to accept.
1302 * Just throw it away.
1303 */
1304static inline void ide_atapi_discard_data(ide_drive_t *drive, unsigned bcount)
1305{
1306 ide_hwif_t *hwif = drive->hwif;
1307
1308 /* FIXME: use ->atapi_input_bytes */
1309 while (bcount--)
1310 (void)hwif->INB(hwif->io_ports[IDE_DATA_OFFSET]);
1311}
1312
1313static inline void ide_atapi_write_zeros(ide_drive_t *drive, unsigned bcount)
1314{
1315 ide_hwif_t *hwif = drive->hwif;
1316
1317 /* FIXME: use ->atapi_output_bytes */
1318 while (bcount--)
1319 hwif->OUTB(0, hwif->io_ports[IDE_DATA_OFFSET]);
1320}
1321
1300#endif /* _IDE_H */ 1322#endif /* _IDE_H */