rc = ide_end_rq(drive, rq, error, nr_bytes);
if (rc == 0)
rc = ide_end_rq(drive, rq, error, nr_bytes);
if (rc == 0)
if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
time_after(drive->sleep, jiffies)) {
ide_unlock_port(hwif);
if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
time_after(drive->sleep, jiffies)) {
ide_unlock_port(hwif);
* we know that the queue isn't empty, but this can happen
* if the q->prep_rq_fn() decides to kill a request
*/
* we know that the queue isn't empty, but this can happen
* if the q->prep_rq_fn() decides to kill a request
*/
/*
* Sanity: don't accept a request that isn't a PM request
* if we are currently power managed. This is very important as
/*
* Sanity: don't accept a request that isn't a PM request
* if we are currently power managed. This is very important as
* above to return us whatever is in the queue. Since we call
* ide_do_request() ourselves, we end up taking requests while
* the queue is blocked...
* above to return us whatever is in the queue. Since we call
* ide_do_request() ourselves, we end up taking requests while
* the queue is blocked...
startstop = start_request(drive, rq);
spin_lock_irq(&hwif->lock);
startstop = start_request(drive, rq);
spin_lock_irq(&hwif->lock);
{
struct request_queue *q = drive->queue;
unsigned long flags;
spin_lock_irqsave(q->queue_lock, flags);
{
struct request_queue *q = drive->queue;
unsigned long flags;
spin_lock_irqsave(q->queue_lock, flags);