Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185797
b: refs/heads/master
c: d2d4e78
h: refs/heads/master
i:
  185795: 76aeacf
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and David S. Miller committed Jan 19, 2010
1 parent 128e851 commit 39189e9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68d0a036162f12d8be07c9fc140507cc1c8c6120
refs/heads/master: d2d4e780aff2fab46a792ebc89f80d1a6872b325
2 changes: 2 additions & 0 deletions trunk/drivers/ide/ide-devsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ static int set_pio_mode(ide_drive_t *drive, int arg)
return -ENOSYS;

if (set_pio_mode_abuse(drive->hwif, arg)) {
drive->pio_mode = arg + XFER_PIO_0;

if (arg == 8 || arg == 9) {
unsigned long flags;

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,8 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
drive->dev_flags |= IDE_DFLAG_NO_UNMASK;

drive->pio_mode = XFER_PIO_0;

if (port_ops && port_ops->init_dev)
port_ops->init_dev(drive);
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/ide/ide-xfer-mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,19 @@ int ide_set_pio_mode(ide_drive_t *drive, const u8 mode)
* set transfer mode on the device in ->set_pio_mode method...
*/
if (port_ops->set_dma_mode == NULL) {
drive->pio_mode = mode;
port_ops->set_pio_mode(drive, mode - XFER_PIO_0);
return 0;
}

if (hwif->host_flags & IDE_HFLAG_POST_SET_MODE) {
if (ide_config_drive_speed(drive, mode))
return -1;
drive->pio_mode = mode;
port_ops->set_pio_mode(drive, mode - XFER_PIO_0);
return 0;
} else {
drive->pio_mode = mode;
port_ops->set_pio_mode(drive, mode - XFER_PIO_0);
return ide_config_drive_speed(drive, mode);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ struct ide_drive_s {
u8 init_speed; /* transfer rate set at boot */
u8 current_speed; /* current transfer rate set */
u8 desired_speed; /* desired transfer rate set */
u8 pio_mode; /* for ->set_pio_mode _only_ */
u8 dn; /* now wide spread use */
u8 acoustic; /* acoustic management */
u8 media; /* disk, cdrom, tape, floppy, ... */
Expand Down

0 comments on commit 39189e9

Please sign in to comment.