* Insert this command at the head of the queue for it's device. * It will go before all other commands that are already in the queue. 
* Requeue this command.  It will go before all other commands * that are already in the queue. 
int scsi_queue_insert(struct scsi_cmnd *cmd, int reason){	struct Scsi_Host *host = cmd->device->host;	struct scsi_device *device = cmd->device;	SCSI_LOG_MLQUEUE(1,		 printk("Inserting command %p into mlqueue\n", cmd));	/*	 * We are inserting the command into the ml queue.  First, we	 * cancel the timer, so it doesn't time out.	 */	scsi_delete_timer(cmd);	/*	 * Next, set the appropriate busy bit for the device/host.	 *	 * If the host/device isn't busy, assume that something actually	 * completed, and that we should be able to queue a command now.	 *	 * Note that the prior mid-layer assumption that any host could	 * always queue at least one command is now broken.  The mid-layer	 * will implement a user specifiable stall (see	 * scsi_host.max_host_blocked and scsi_device.max_device_blocked)	 * if a command is requeued with no other commands outstanding	 * either for the device or for the host.	 */	if (reason == SCSI_MLQUEUE_HOST_BUSY)		host->host_blocked = host->max_host_blocked;	else if (reason == SCSI_MLQUEUE_DEVICE_BUSY)		device->device_blocked = device->max_device_blocked;	/*	 * Register the fact that we own the thing for now.	 */	cmd->state = SCSI_STATE_MLQUEUE;	cmd->owner = SCSI_OWNER_MIDLEVEL;	/*	 * Decrement the counters, since these commands are no longer	 * active on the host/device.	 */	scsi_device_unbusy(device);	/*	 * Insert this command at the head of the queue for it's device.	 * It will go before all other commands that are already in the queue.	 *	 * NOTE: there is magic here about the way the queue is plugged if	 * we have no outstanding commands.	 * 	 * Although this *doesn't* plug the queue, it does call the request	 * function.  The SCSI request function detects the blocked condition	 * and plugs the queue appropriately.	 */	blk_insert_request(device->request_queue, cmd->request, 1, cmd, 1);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a1bf9d1d9272708922e83e465104106131f6415f/scsi_lib.c/buggy/drivers/scsi/scsi_lib.c