Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77282
b: refs/heads/master
c: 2624565
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 26, 2008
1 parent 6537a6c commit 4bd4466
Show file tree
Hide file tree
Showing 4 changed files with 6 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: 4906f3b4cddc3e4d62955ed386598561f95602c0
refs/heads/master: 2624565caacedd740fce7803fe2c162842aa5df4
4 changes: 1 addition & 3 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
ide_hwif_t *hwif = HWIF(drive);
u8 *args = (u8 *) rq->buffer;
u8 stat = hwif->INB(IDE_STATUS_REG);
int retries = 10;

local_irq_enable_in_hardirq();
if (rq->cmd_type == REQ_TYPE_ATA_CMD &&
Expand All @@ -649,8 +648,7 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
drive->io_32bit = 0;
hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS);
drive->io_32bit = io_32bit;
while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
udelay(100);
stat = wait_drive_not_busy(drive);
}

if (!OK_STAT(stat, READY_STAT, BAD_STAT))
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,15 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive)
return ide_stopped;
}

static u8 wait_drive_not_busy(ide_drive_t *drive)
u8 wait_drive_not_busy(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
int retries;
u8 stat;

/*
* Last sector was transfered, wait until drive is ready.
* This can take up to 10 usec, but we will wait max 1 ms
* (drive_cmd_intr() waits that long).
* This can take up to 10 usec, but we will wait max 1 ms.
*/
for (retries = 0; retries < 100; retries++) {
if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,8 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);

void task_end_request(ide_drive_t *, struct request *, u8);

u8 wait_drive_not_busy(ide_drive_t *);

int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16);
int ide_no_data_taskfile(ide_drive_t *, ide_task_t *);

Expand Down

0 comments on commit 4bd4466

Please sign in to comment.