Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105002
b: refs/heads/master
c: 59be2c8
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent ab24ec2 commit 5d3cc45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c09384e95fa4048a06f179849901f3e57266d58
refs/heads/master: 59be2c80f0c1080634006135aa9130f1736fbfba
13 changes: 10 additions & 3 deletions trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,9 @@ int ide_driveid_update(ide_drive_t *drive)
int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
{
ide_hwif_t *hwif = drive->hwif;
struct ide_io_ports *io_ports = &hwif->io_ports;
int error = 0;
u8 stat;
ide_task_t task;

#ifdef CONFIG_BLK_DEV_IDEDMA
if (hwif->dma_ops) /* check if host supports DMA */
Expand Down Expand Up @@ -828,9 +828,16 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
SELECT_MASK(drive, 0);
udelay(1);
hwif->set_irq(hwif, 0);
hwif->OUTB(SETFEATURES_XFER, io_ports->feature_addr);
hwif->OUTB(speed, io_ports->nsect_addr);

memset(&task, 0, sizeof(task));
task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT;
task.tf.feature = SETFEATURES_XFER;
task.tf.nsect = speed;

hwif->tf_load(drive, &task);

hwif->exec_command(hwif, WIN_SETFEATURES);

if (drive->quirk_list == 2)
hwif->set_irq(hwif, 1);

Expand Down

0 comments on commit 5d3cc45

Please sign in to comment.