aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-23 14:59:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-23 14:59:09 -0400
commite669e8179d364bb11ed51504e1a1c60830bff4c5 (patch)
tree3491e06ce0d6b0aef6d74b76aba92633779f4953 /drivers/ide/ide-lib.c
parent876a4256d25b7fd7917f53e767da1ebdf3168457 (diff)
parentfc410698ebf7abfb64f0e2337b871298557f0575 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (60 commits) ide: small whitespace fixes ide: ide-cd_ioctl.c fix sparse integer as NULL pointer warnings ide: ide-cd.c fix sparse endianness warnings ide-cd: convert to using the new atapi_flags ide: remove unused PC_FLAG_DRQ_INTERRUPT ide-scsi: convert to using the new atapi_flags ide-tape: convert to using the new atapi_flags ide-floppy: convert to using the new atapi_flags (take 2) ide: add per-device flags ide: use rq->cmd instead of pc->c in atapi common code ide-scsi: pass packet command in rq->cmd ide-tape: pass packet command in rq->cmd ide-tape: make room for packet command ids in rq->cmd ide-floppy: pass packet command in rq->cmd ide: remove pc->callback member from ide_atapi_pc ide-scsi: use drive->pc_callback instead of pc->callback ide-tape: use drive->pc_callback instead of pc->callback ide-floppy: use drive->pc_callback instead of pc->callback ide: push pc callback pointer into the ide_drive_t structure drivers/ide/ide-tape.c: remove double kfree ...
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 13af72f09ec4..97fefabea8b8 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -266,22 +266,11 @@ int ide_set_xfer_rate(ide_drive_t *drive, u8 rate)
266 266
267 rate = ide_rate_filter(drive, rate); 267 rate = ide_rate_filter(drive, rate);
268 268
269 BUG_ON(rate < XFER_PIO_0);
270
269 if (rate >= XFER_PIO_0 && rate <= XFER_PIO_5) 271 if (rate >= XFER_PIO_0 && rate <= XFER_PIO_5)
270 return ide_set_pio_mode(drive, rate); 272 return ide_set_pio_mode(drive, rate);
271 273
272 /*
273 * TODO: transfer modes 0x00-0x07 passed from the user-space are
274 * currently handled here which needs fixing (please note that such
275 * case could happen iff the transfer mode has already been set on
276 * the device by ide-proc.c::set_xfer_rate()).
277 */
278 if (rate < XFER_PIO_0) {
279 if (hwif->host_flags & IDE_HFLAG_ABUSE_SET_DMA_MODE)
280 return ide_set_dma_mode(drive, rate);
281 else
282 return ide_config_drive_speed(drive, rate);
283 }
284
285 return ide_set_dma_mode(drive, rate); 274 return ide_set_dma_mode(drive, rate);
286} 275}
287 276
@@ -336,7 +325,7 @@ static void ide_dump_sector(ide_drive_t *drive)
336 else 325 else
337 task.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE; 326 task.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE;
338 327
339 drive->hwif->tf_read(drive, &task); 328 drive->hwif->tp_ops->tf_read(drive, &task);
340 329
341 if (lba48 || (tf->device & ATA_LBA)) 330 if (lba48 || (tf->device & ATA_LBA))
342 printk(", LBAsect=%llu", 331 printk(", LBAsect=%llu",