/* Function: queue_remove_all_target(queue, target) Purpose : remove all SCSI commands from the queue for a specified target Params : queue - queue to remove command from target - target device id Returns : nothing  */
void queue_remove_all_target(Queue_t *queue, int target)
/* Function: queue_remove_all_target(queue, target) Purpose : remove all SCSI commands from the queue for a specified target Params : queue - queue to remove command from target - target device id Returns : nothing  */
void queue_remove_all_target(Queue_t *queue, int target)
{
	unsigned long flags;
	struct list_head *l;
	spin_lock_irqsave(&queue->queue_lock, flags);
	list_for_each(l, &queue->head) {
		QE_t *q = list_entry(l, QE_t, list);
		if (q->SCpnt->device->id == target)
			__queue_remove(queue, l);
	}
	spin_unlock_irqrestore(&queue->queue_lock, flags);
}