Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101268
b: refs/heads/master
c: cbbc4e8
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jul 15, 2008
1 parent ca0cbba commit f4b6488
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: cd2abbfec84f43db740483daf4ea528d49d8858f
refs/heads/master: cbbc4e818de4451cdef75a112b7fc8a523d5d2a0
18 changes: 10 additions & 8 deletions trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,8 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
* service routine. In interrupt mode, the device sends an interrupt to signal
* that it is ready to receive a packet. However, we need to delay about 2-3
* ticks before issuing the packet or we gets in trouble.
*
* So, follow carefully. transfer_pc1 is called as an interrupt (or directly).
* In either case, when the device says it's ready for a packet, we schedule
* the packet transfer to occur about 2-3 ticks later in transfer_pc2.
*/
static int idefloppy_transfer_pc2(ide_drive_t *drive)
static int idefloppy_transfer_pc(ide_drive_t *drive)
{
idefloppy_floppy_t *floppy = drive->driver_data;

Expand All @@ -415,7 +411,13 @@ static int idefloppy_transfer_pc2(ide_drive_t *drive)
return IDEFLOPPY_WAIT_CMD;
}

static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)

/*
* Called as an interrupt (or directly). When the device says it's ready for a
* packet, we schedule the packet transfer to occur about 2-3 ticks later in
* transfer_pc.
*/
static ide_startstop_t idefloppy_start_pc_transfer(ide_drive_t *drive)
{
idefloppy_floppy_t *floppy = drive->driver_data;
struct ide_atapi_pc *pc = floppy->pc;
Expand All @@ -432,7 +434,7 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)
*/
if (pc->flags & PC_FLAG_ZIP_DRIVE) {
timeout = floppy->ticks;
expiry = &idefloppy_transfer_pc2;
expiry = &idefloppy_transfer_pc;
} else {
timeout = IDEFLOPPY_WAIT_CMD;
expiry = NULL;
Expand Down Expand Up @@ -483,7 +485,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,

pc->retries++;

return ide_issue_pc(drive, pc, idefloppy_transfer_pc1,
return ide_issue_pc(drive, pc, idefloppy_start_pc_transfer,
IDEFLOPPY_WAIT_CMD, NULL);
}

Expand Down

0 comments on commit f4b6488

Please sign in to comment.