1503 struct scsi_device *sdev = cmd->device;
1504 struct scsi_target *starget = scsi_target(sdev);
1505 struct Scsi_Host *shost = sdev->host;
1506
1507 blkdev_dequeue_request(req);
1508
1509 if (unlikely(cmd == NULL)) {
1510 printk(KERN_CRIT "impossible request in %s.\n",
1511 __func__);
1512 BUG();
1513 }
1514
1515 scsi_init_cmd_errh(cmd);
1516 cmd->result = DID_NO_CONNECT << 16;
1517 atomic_inc(&cmd->device->iorequest_cnt);
1518
1519
1520
1521
1522
1523
1524 sdev->device_busy++;
1525 spin_unlock(sdev->request_queue->queue_lock);
1526 spin_lock(shost->host_lock);
1527 shost->host_busy++;
1528 starget->target_busy++;
1529 spin_unlock(shost->host_lock);
1530 spin_lock(sdev->request_queue->queue_lock);
1531
1532 blk_complete_request(req);
1533}
1534
1535static void scsi_softirq_done(struct request *rq)
1536{
1537 struct scsi_cmnd *cmd = rq->special;
1538 unsigned long wait_for = (cmd->allowed + 1) * rq->timeout;
1539 int disposition;
1540
1541 INIT_LIST_HEAD(&cmd->eh_entry);
1542
1543