aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/arm/queue.h')
-rw-r--r--drivers/scsi/arm/queue.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/scsi/arm/queue.h b/drivers/scsi/arm/queue.h
index 0c9dec4c1716..3c519c9237b2 100644
--- a/drivers/scsi/arm/queue.h
+++ b/drivers/scsi/arm/queue.h
@@ -32,46 +32,48 @@ extern int queue_initialise (Queue_t *queue);
32extern void queue_free (Queue_t *queue); 32extern void queue_free (Queue_t *queue);
33 33
34/* 34/*
35 * Function: Scsi_Cmnd *queue_remove (queue) 35 * Function: struct scsi_cmnd *queue_remove (queue)
36 * Purpose : removes first SCSI command from a queue 36 * Purpose : removes first SCSI command from a queue
37 * Params : queue - queue to remove command from 37 * Params : queue - queue to remove command from
38 * Returns : Scsi_Cmnd if successful (and a reference), or NULL if no command available 38 * Returns : struct scsi_cmnd if successful (and a reference), or NULL if no command available
39 */ 39 */
40extern Scsi_Cmnd *queue_remove (Queue_t *queue); 40extern struct scsi_cmnd *queue_remove (Queue_t *queue);
41 41
42/* 42/*
43 * Function: Scsi_Cmnd *queue_remove_exclude_ref (queue, exclude) 43 * Function: struct scsi_cmnd *queue_remove_exclude_ref (queue, exclude)
44 * Purpose : remove a SCSI command from a queue 44 * Purpose : remove a SCSI command from a queue
45 * Params : queue - queue to remove command from 45 * Params : queue - queue to remove command from
46 * exclude - array of busy LUNs 46 * exclude - array of busy LUNs
47 * Returns : Scsi_Cmnd if successful (and a reference), or NULL if no command available 47 * Returns : struct scsi_cmnd if successful (and a reference), or NULL if no command available
48 */ 48 */
49extern Scsi_Cmnd *queue_remove_exclude (Queue_t *queue, unsigned long *exclude); 49extern struct scsi_cmnd *queue_remove_exclude(Queue_t *queue,
50 unsigned long *exclude);
50 51
51#define queue_add_cmd_ordered(queue,SCpnt) \ 52#define queue_add_cmd_ordered(queue,SCpnt) \
52 __queue_add(queue,SCpnt,(SCpnt)->cmnd[0] == REQUEST_SENSE) 53 __queue_add(queue,SCpnt,(SCpnt)->cmnd[0] == REQUEST_SENSE)
53#define queue_add_cmd_tail(queue,SCpnt) \ 54#define queue_add_cmd_tail(queue,SCpnt) \
54 __queue_add(queue,SCpnt,0) 55 __queue_add(queue,SCpnt,0)
55/* 56/*
56 * Function: int __queue_add(Queue_t *queue, Scsi_Cmnd *SCpnt, int head) 57 * Function: int __queue_add(Queue_t *queue, struct scsi_cmnd *SCpnt, int head)
57 * Purpose : Add a new command onto a queue 58 * Purpose : Add a new command onto a queue
58 * Params : queue - destination queue 59 * Params : queue - destination queue
59 * SCpnt - command to add 60 * SCpnt - command to add
60 * head - add command to head of queue 61 * head - add command to head of queue
61 * Returns : 0 on error, !0 on success 62 * Returns : 0 on error, !0 on success
62 */ 63 */
63extern int __queue_add(Queue_t *queue, Scsi_Cmnd *SCpnt, int head); 64extern int __queue_add(Queue_t *queue, struct scsi_cmnd *SCpnt, int head);
64 65
65/* 66/*
66 * Function: Scsi_Cmnd *queue_remove_tgtluntag (queue, target, lun, tag) 67 * Function: struct scsi_cmnd *queue_remove_tgtluntag (queue, target, lun, tag)
67 * Purpose : remove a SCSI command from the queue for a specified target/lun/tag 68 * Purpose : remove a SCSI command from the queue for a specified target/lun/tag
68 * Params : queue - queue to remove command from 69 * Params : queue - queue to remove command from
69 * target - target that we want 70 * target - target that we want
70 * lun - lun on device 71 * lun - lun on device
71 * tag - tag on device 72 * tag - tag on device
72 * Returns : Scsi_Cmnd if successful, or NULL if no command satisfies requirements 73 * Returns : struct scsi_cmnd if successful, or NULL if no command satisfies requirements
73 */ 74 */
74extern Scsi_Cmnd *queue_remove_tgtluntag (Queue_t *queue, int target, int lun, int tag); 75extern struct scsi_cmnd *queue_remove_tgtluntag(Queue_t *queue, int target,
76 int lun, int tag);
75 77
76/* 78/*
77 * Function: queue_remove_all_target(queue, target) 79 * Function: queue_remove_all_target(queue, target)
@@ -94,12 +96,12 @@ extern void queue_remove_all_target(Queue_t *queue, int target);
94extern int queue_probetgtlun (Queue_t *queue, int target, int lun); 96extern int queue_probetgtlun (Queue_t *queue, int target, int lun);
95 97
96/* 98/*
97 * Function: int queue_remove_cmd (Queue_t *queue, Scsi_Cmnd *SCpnt) 99 * Function: int queue_remove_cmd (Queue_t *queue, struct scsi_cmnd *SCpnt)
98 * Purpose : remove a specific command from the queues 100 * Purpose : remove a specific command from the queues
99 * Params : queue - queue to look in 101 * Params : queue - queue to look in
100 * SCpnt - command to find 102 * SCpnt - command to find
101 * Returns : 0 if not found 103 * Returns : 0 if not found
102 */ 104 */
103int queue_remove_cmd(Queue_t *queue, Scsi_Cmnd *SCpnt); 105int queue_remove_cmd(Queue_t *queue, struct scsi_cmnd *SCpnt);
104 106
105#endif /* QUEUE_H */ 107#endif /* QUEUE_H */