Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123511
b: refs/heads/master
c: 6ea5222
h: refs/heads/master
i:
  123509: 51dac14
  123507: 0a2d48f
  123503: 40f19a7
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Dec 29, 2008
1 parent 67bb1bb commit 2d07b6b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 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: 3c8a2cce47c6813383c9e38134e31f7e5f72e9d8
refs/heads/master: 6ea52226ca131a99bb619bd56fbeee566ea5a966
14 changes: 8 additions & 6 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,16 +424,17 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
if (time_after(jiffies, info->write_timeout))
do_end_request = 1;
else {
struct request_queue *q = drive->queue;
unsigned long flags;

/*
* take a breather relying on the unplug
* timer to kick us again
*/
spin_lock_irqsave(&ide_lock, flags);
blk_plug_device(drive->queue);
spin_unlock_irqrestore(&ide_lock,
flags);
spin_lock_irqsave(q->queue_lock, flags);
blk_plug_device(q);
spin_unlock_irqrestore(q->queue_lock, flags);

return 1;
}
}
Expand Down Expand Up @@ -502,11 +503,12 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)

end_request:
if (stat & ATA_ERR) {
struct request_queue *q = drive->queue;
unsigned long flags;

spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(q->queue_lock, flags);
blkdev_dequeue_request(rq);
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(q->queue_lock, flags);

hwgroup->rq = NULL;

Expand Down
19 changes: 10 additions & 9 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,21 @@ EXPORT_SYMBOL_GPL(ide_end_dequeued_request);
*/
static void ide_complete_pm_request (ide_drive_t *drive, struct request *rq)
{
struct request_queue *q = drive->queue;
unsigned long flags;

#ifdef DEBUG_PM
printk("%s: completing PM request, %s\n", drive->name,
blk_pm_suspend_request(rq) ? "suspend" : "resume");
#endif
spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(q->queue_lock, flags);
if (blk_pm_suspend_request(rq)) {
blk_stop_queue(drive->queue);
blk_stop_queue(q);
} else {
drive->dev_flags &= ~IDE_DFLAG_BLOCKED;
blk_start_queue(drive->queue);
blk_start_queue(q);
}
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(q->queue_lock, flags);

drive->hwif->hwgroup->rq = NULL;

Expand Down Expand Up @@ -1469,16 +1470,16 @@ irqreturn_t ide_intr (int irq, void *dev_id)
void ide_do_drive_cmd(ide_drive_t *drive, struct request *rq)
{
ide_hwgroup_t *hwgroup = drive->hwif->hwgroup;
struct request_queue *q = drive->queue;
unsigned long flags;

hwgroup->rq = NULL;

spin_lock_irqsave(&ide_lock, flags);
__elv_add_request(drive->queue, rq, ELEVATOR_INSERT_FRONT, 0);
blk_start_queueing(drive->queue);
spin_unlock_irqrestore(&ide_lock, flags);
spin_lock_irqsave(q->queue_lock, flags);
__elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0);
blk_start_queueing(q);
spin_unlock_irqrestore(q->queue_lock, flags);
}

EXPORT_SYMBOL(ide_do_drive_cmd);

void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma)
Expand Down

0 comments on commit 2d07b6b

Please sign in to comment.