diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 10:32:18 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 10:32:18 -0800 |
commit | 2640c9a90fa596871e142f42052608864335f102 (patch) | |
tree | bf0fb0e59b324963d650a7e82f83c1a4f993aa69 /drivers/ide/ide-park.c | |
parent | 80618fa83a34a26199fa99cfd06476a81ddf57df (diff) | |
parent | b16aabc9374217fa2d28e72fd9a6e6d60905e1b9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (32 commits)
ide-atapi: start dma in a drive-specific way
ide-atapi: put the rest of non-ide-cd code into the else-clause of ide_transfer_pc
ide-atapi: remove timeout arg to ide_issue_pc
ide-cd: remove handler wrappers
ide-cd: remove xferlen arg to cdrom_start_packet_command
ide-atapi: split drive-specific functionality in ide_issue_pc
ide-atapi: assign expiry and timeout based on device type
ide-atapi: compute cmd_len based on device type in ide_transfer_pc
ide: remove the last ide-scsi remnants
ide-atapi: remove ide-scsi remnants from ide_pc_intr()
ide-atapi: remove ide-scsi remnants from ide_transfer_pc()
ide-atapi: remove ide-scsi remnants from ide_issue_pc
ide-cd: move cdrom_timer_expiry to ide-atapi.c
ide-atapi: teach ide atapi about drive->waiting_for_dma
ide-atapi: accomodate transfer length calculation for ide-cd
ide-atapi: setup dma for ide-cd
ide-atapi: combine drive-specific assignments
ide-atapi: add a dev_is_idecd-inline
remove ide-scsi
ide-floppy: allocate only toplevel packet commands
...
Diffstat (limited to 'drivers/ide/ide-park.c')
-rw-r--r-- | drivers/ide/ide-park.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index 63d01c55f865..678454ac2483 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c @@ -16,16 +16,19 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) spin_lock_irq(&hwgroup->lock); if (drive->dev_flags & IDE_DFLAG_PARKED) { int reset_timer = time_before(timeout, drive->sleep); + int start_queue = 0; drive->sleep = timeout; wake_up_all(&ide_park_wq); - if (reset_timer && hwgroup->sleeping && - del_timer(&hwgroup->timer)) { - hwgroup->sleeping = 0; - hwgroup->busy = 0; + if (reset_timer && del_timer(&hwgroup->timer)) + start_queue = 1; + spin_unlock_irq(&hwgroup->lock); + + if (start_queue) { + spin_lock_irq(q->queue_lock); blk_start_queueing(q); + spin_unlock_irq(q->queue_lock); } - spin_unlock_irq(&hwgroup->lock); return; } spin_unlock_irq(&hwgroup->lock); |