Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114183
b: refs/heads/master
c: c392204
h: refs/heads/master
i:
  114181: 3d50579
  114179: d79ae75
  114175: d406eed
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 13, 2008
1 parent 0d638ce commit 694cff9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 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: 97100fc816badbbc162644cfde7ad39ae9211fb4
refs/heads/master: c39220483ebe6871fb129d4b2236cd95290c41fc
7 changes: 4 additions & 3 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ static int __ide_end_request(ide_drive_t *drive, struct request *rq,
* decide whether to reenable DMA -- 3 is a random magic for now,
* if we DMA timeout more than 3 times, just stay in PIO
*/
if (drive->state == DMA_PIO_RETRY && drive->retry_pio <= 3) {
drive->state = 0;
if ((drive->dev_flags & IDE_DFLAG_DMA_PIO_RETRY) &&
drive->retry_pio <= 3) {
drive->dev_flags &= ~IDE_DFLAG_DMA_PIO_RETRY;
ide_dma_on(drive);
}

Expand Down Expand Up @@ -1195,8 +1196,8 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
* a timeout -- we'll reenable after we finish this next request
* (or rather the first chunk of it) in pio.
*/
drive->dev_flags |= IDE_DFLAG_DMA_PIO_RETRY;
drive->retry_pio++;
drive->state = DMA_PIO_RETRY;
ide_dma_off_quietly(drive);

/*
Expand Down
9 changes: 2 additions & 7 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ typedef unsigned char byte; /* used everywhere */
#define ERROR_RESET 3 /* Reset controller every 4th retry */
#define ERROR_RECAL 1 /* Recalibrate every 2nd retry */

/*
* state flags
*/

#define DMA_PIO_RETRY 1 /* retrying in PIO */

#define HWIF(drive) ((ide_hwif_t *)((drive)->hwif))
#define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup))

Expand Down Expand Up @@ -506,6 +500,8 @@ enum {
IDE_DFLAG_WCACHE = (1 << 23),
/* used for ignoring ATA_DF */
IDE_DFLAG_NOWERR = (1 << 24),
/* retrying in PIO */
IDE_DFLAG_DMA_PIO_RETRY = (1 << 25),
};

struct ide_drive_s {
Expand Down Expand Up @@ -535,7 +531,6 @@ struct ide_drive_s {
select_t select; /* basic drive/head select reg value */

u8 retry_pio; /* retrying dma capable host in pio */
u8 state; /* retry state */
u8 waiting_for_dma; /* dma currently in progress */

u8 quirk_list; /* considered quirky, set for a specific host */
Expand Down

0 comments on commit 694cff9

Please sign in to comment.