Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61898
b: refs/heads/master
c: e5fa4b2
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 19, 2007
1 parent 5c228b3 commit 13722bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 7dd00083b1160b560fa2a0a486799b57baa5d035
refs/heads/master: e5fa4b2968ff0f32b5ecfa082fd6db50b731055e
10 changes: 4 additions & 6 deletions trunk/drivers/ide/ide-timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,14 @@ static short ide_find_best_pio_mode(ide_drive_t *drive)
struct hd_driveid *id = drive->id;
short best = 0;

if (id->field_valid & 2) { /* EIDE PIO modes */

/* EIDE PIO modes */
if ((id->field_valid & 2) && (id->capability & 8)) {
if ((best = (drive->id->eide_pio_modes & 4) ? XFER_PIO_5 :
(drive->id->eide_pio_modes & 2) ? XFER_PIO_4 :
(drive->id->eide_pio_modes & 1) ? XFER_PIO_3 : 0)) return best;
}

return (drive->id->tPIO == 2) ? XFER_PIO_2 :
(drive->id->tPIO == 1) ? XFER_PIO_1 :
(drive->id->tPIO == 0) ? XFER_PIO_0 : XFER_PIO_SLOW;

return XFER_PIO_0 + min_t(u8, id->tPIO, 2);
}

static void ide_timing_quantize(struct ide_timing *t, struct ide_timing *q, int T, int UT)
Expand Down

0 comments on commit 13722bc

Please sign in to comment.