/* Notes: After command completion, there may be blocks left over which weren't finished by the previous command this can be for a number of reasons - the main one is I/O errors in the middle of the request, in which case we need to request the blocks that come after the bad sector. Notes: Upon return, cmd is a stale pointer.  */
static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
/* Notes: After command completion, there may be blocks left over which weren't finished by the previous command this can be for a number of reasons - the main one is I/O errors in the middle of the request, in which case we need to request the blocks that come after the bad sector. Notes: Upon return, cmd is a stale pointer.  */
static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
{
	struct request *req = cmd->request;
	unsigned long flags;
	spin_lock_irqsave(q->queue_lock, flags);
	scsi_unprep_request(req);
	blk_requeue_request(q, req);
	spin_unlock_irqrestore(q->queue_lock, flags);
	scsi_run_queue(q);
}