aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:46 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:46 -0400
commit0d6a9754c06e173552b0ad5fad45f69786b6de99 (patch)
tree1dc9915dd8a22761aff2c91acb8686e680e79e30 /drivers/ide/ide-atapi.c
parent7eeaaaa52285d5e6cb79f515e99c591dcb9d04fe (diff)
ide: move ide_read_bcount_and_ireason() to ide-atapi.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 3044c51c06a5..6adc5b4a4406 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -300,6 +300,21 @@ int ide_cd_get_xferlen(struct request *rq)
300} 300}
301EXPORT_SYMBOL_GPL(ide_cd_get_xferlen); 301EXPORT_SYMBOL_GPL(ide_cd_get_xferlen);
302 302
303void ide_read_bcount_and_ireason(ide_drive_t *drive, u16 *bcount, u8 *ireason)
304{
305 ide_task_t task;
306
307 memset(&task, 0, sizeof(task));
308 task.tf_flags = IDE_TFLAG_IN_LBAH | IDE_TFLAG_IN_LBAM |
309 IDE_TFLAG_IN_NSECT;
310
311 drive->hwif->tp_ops->tf_read(drive, &task);
312
313 *bcount = (task.tf.lbah << 8) | task.tf.lbam;
314 *ireason = task.tf.nsect & 3;
315}
316EXPORT_SYMBOL_GPL(ide_read_bcount_and_ireason);
317
303/* 318/*
304 * This is the usual interrupt handler which will be called during a packet 319 * This is the usual interrupt handler which will be called during a packet
305 * command. We will transfer some of the data (as requested by the drive) 320 * command. We will transfer some of the data (as requested by the drive)