Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137644
b: refs/heads/master
c: 3616b65
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent 9e9332e commit 399f9dd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 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: 19710d25d50ae0be05eebe4231ed8918b1092d82
refs/heads/master: 3616b6536a74ff1c56029c17cbb3575c69c0a574
8 changes: 2 additions & 6 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
kfree(task);
}
} else if (blk_pm_request(rq)) {
struct request_pm_state *pm = rq->data;

ide_complete_power_step(drive, rq);
if (pm->pm_step == IDE_PM_COMPLETED)
ide_complete_pm_request(drive, rq);
ide_complete_pm_rq(drive, rq);
return;
}

Expand Down Expand Up @@ -438,7 +434,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
startstop = ide_start_power_step(drive, rq);
if (startstop == ide_stopped &&
pm->pm_step == IDE_PM_COMPLETED)
ide_complete_pm_request(drive, rq);
ide_complete_pm_rq(drive, rq);
return startstop;
} else if (!rq->rq_disk && blk_special_request(rq))
/*
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/ide/ide-pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,23 @@ ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq)
}

/**
* ide_complete_pm_request - end the current Power Management request
* ide_complete_pm_rq - end the current Power Management request
* @drive: target drive
* @rq: request
*
* This function cleans up the current PM request and stops the queue
* if necessary.
*/
void ide_complete_pm_request(ide_drive_t *drive, struct request *rq)
void ide_complete_pm_rq(ide_drive_t *drive, struct request *rq)
{
struct request_queue *q = drive->queue;
struct request_pm_state *pm = rq->data;
unsigned long flags;

ide_complete_power_step(drive, rq);
if (pm->pm_step != IDE_PM_COMPLETED)
return;

#ifdef DEBUG_PM
printk("%s: completing PM request, %s\n", drive->name,
blk_pm_suspend_request(rq) ? "suspend" : "resume");
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ int generic_ide_resume(struct device *);

void ide_complete_power_step(ide_drive_t *, struct request *);
ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *);
void ide_complete_pm_request(ide_drive_t *, struct request *);
void ide_complete_pm_rq(ide_drive_t *, struct request *);
void ide_check_pm_state(ide_drive_t *, struct request *);

/*
Expand Down

0 comments on commit 399f9dd

Please sign in to comment.