diff options
author | Henne <henne@nachtwindheim.de> | 2006-10-01 07:18:37 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-03 18:28:33 -0400 |
commit | ee0ca6bab394fe41a2b4de58c4532b09a41c9165 (patch) | |
tree | 93a5e2879d276c471373deda924e0c8e91fae875 /drivers/scsi/arm/queue.c | |
parent | 1516b55d903a5d370859d9013e48db5caea95204 (diff) |
[SCSI] scsi: Scsi_Cmnd convertion in arm subtree
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in the arm subdir
of the scsi-subsys.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/arm/queue.c')
-rw-r--r-- | drivers/scsi/arm/queue.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c index 8caa5903ce38..cb11ccef54e5 100644 --- a/drivers/scsi/arm/queue.c +++ b/drivers/scsi/arm/queue.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | typedef struct queue_entry { | 30 | typedef struct queue_entry { |
31 | struct list_head list; | 31 | struct list_head list; |
32 | Scsi_Cmnd *SCpnt; | 32 | struct scsi_cmnd *SCpnt; |
33 | #ifdef DEBUG | 33 | #ifdef DEBUG |
34 | unsigned long magic; | 34 | unsigned long magic; |
35 | #endif | 35 | #endif |
@@ -96,14 +96,14 @@ void queue_free (Queue_t *queue) | |||
96 | 96 | ||
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Function: int queue_add_cmd(Queue_t *queue, Scsi_Cmnd *SCpnt, int head) | 99 | * Function: int __queue_add(Queue_t *queue, struct scsi_cmnd *SCpnt, int head) |
100 | * Purpose : Add a new command onto a queue, adding REQUEST_SENSE to head. | 100 | * Purpose : Add a new command onto a queue, adding REQUEST_SENSE to head. |
101 | * Params : queue - destination queue | 101 | * Params : queue - destination queue |
102 | * SCpnt - command to add | 102 | * SCpnt - command to add |
103 | * head - add command to head of queue | 103 | * head - add command to head of queue |
104 | * Returns : 0 on error, !0 on success | 104 | * Returns : 0 on error, !0 on success |
105 | */ | 105 | */ |
106 | int __queue_add(Queue_t *queue, Scsi_Cmnd *SCpnt, int head) | 106 | int __queue_add(Queue_t *queue, struct scsi_cmnd *SCpnt, int head) |
107 | { | 107 | { |
108 | unsigned long flags; | 108 | unsigned long flags; |
109 | struct list_head *l; | 109 | struct list_head *l; |
@@ -134,7 +134,7 @@ empty: | |||
134 | return ret; | 134 | return ret; |
135 | } | 135 | } |
136 | 136 | ||
137 | static Scsi_Cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) | 137 | static struct scsi_cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) |
138 | { | 138 | { |
139 | QE_t *q; | 139 | QE_t *q; |
140 | 140 | ||
@@ -152,17 +152,17 @@ static Scsi_Cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * Function: Scsi_Cmnd *queue_remove_exclude (queue, exclude) | 155 | * Function: struct scsi_cmnd *queue_remove_exclude (queue, exclude) |
156 | * Purpose : remove a SCSI command from a queue | 156 | * Purpose : remove a SCSI command from a queue |
157 | * Params : queue - queue to remove command from | 157 | * Params : queue - queue to remove command from |
158 | * exclude - bit array of target&lun which is busy | 158 | * exclude - bit array of target&lun which is busy |
159 | * Returns : Scsi_Cmnd if successful (and a reference), or NULL if no command available | 159 | * Returns : struct scsi_cmnd if successful (and a reference), or NULL if no command available |
160 | */ | 160 | */ |
161 | Scsi_Cmnd *queue_remove_exclude(Queue_t *queue, unsigned long *exclude) | 161 | struct scsi_cmnd *queue_remove_exclude(Queue_t *queue, unsigned long *exclude) |
162 | { | 162 | { |
163 | unsigned long flags; | 163 | unsigned long flags; |
164 | struct list_head *l; | 164 | struct list_head *l; |
165 | Scsi_Cmnd *SCpnt = NULL; | 165 | struct scsi_cmnd *SCpnt = NULL; |
166 | 166 | ||
167 | spin_lock_irqsave(&queue->queue_lock, flags); | 167 | spin_lock_irqsave(&queue->queue_lock, flags); |
168 | list_for_each(l, &queue->head) { | 168 | list_for_each(l, &queue->head) { |
@@ -178,15 +178,15 @@ Scsi_Cmnd *queue_remove_exclude(Queue_t *queue, unsigned long *exclude) | |||
178 | } | 178 | } |
179 | 179 | ||
180 | /* | 180 | /* |
181 | * Function: Scsi_Cmnd *queue_remove (queue) | 181 | * Function: struct scsi_cmnd *queue_remove (queue) |
182 | * Purpose : removes first SCSI command from a queue | 182 | * Purpose : removes first SCSI command from a queue |
183 | * Params : queue - queue to remove command from | 183 | * Params : queue - queue to remove command from |
184 | * Returns : Scsi_Cmnd if successful (and a reference), or NULL if no command available | 184 | * Returns : struct scsi_cmnd if successful (and a reference), or NULL if no command available |
185 | */ | 185 | */ |
186 | Scsi_Cmnd *queue_remove(Queue_t *queue) | 186 | struct scsi_cmnd *queue_remove(Queue_t *queue) |
187 | { | 187 | { |
188 | unsigned long flags; | 188 | unsigned long flags; |
189 | Scsi_Cmnd *SCpnt = NULL; | 189 | struct scsi_cmnd *SCpnt = NULL; |
190 | 190 | ||
191 | spin_lock_irqsave(&queue->queue_lock, flags); | 191 | spin_lock_irqsave(&queue->queue_lock, flags); |
192 | if (!list_empty(&queue->head)) | 192 | if (!list_empty(&queue->head)) |
@@ -197,19 +197,20 @@ Scsi_Cmnd *queue_remove(Queue_t *queue) | |||
197 | } | 197 | } |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Function: Scsi_Cmnd *queue_remove_tgtluntag (queue, target, lun, tag) | 200 | * Function: struct scsi_cmnd *queue_remove_tgtluntag (queue, target, lun, tag) |
201 | * Purpose : remove a SCSI command from the queue for a specified target/lun/tag | 201 | * Purpose : remove a SCSI command from the queue for a specified target/lun/tag |
202 | * Params : queue - queue to remove command from | 202 | * Params : queue - queue to remove command from |
203 | * target - target that we want | 203 | * target - target that we want |
204 | * lun - lun on device | 204 | * lun - lun on device |
205 | * tag - tag on device | 205 | * tag - tag on device |
206 | * Returns : Scsi_Cmnd if successful, or NULL if no command satisfies requirements | 206 | * Returns : struct scsi_cmnd if successful, or NULL if no command satisfies requirements |
207 | */ | 207 | */ |
208 | Scsi_Cmnd *queue_remove_tgtluntag (Queue_t *queue, int target, int lun, int tag) | 208 | struct scsi_cmnd *queue_remove_tgtluntag(Queue_t *queue, int target, int lun, |
209 | int tag) | ||
209 | { | 210 | { |
210 | unsigned long flags; | 211 | unsigned long flags; |
211 | struct list_head *l; | 212 | struct list_head *l; |
212 | Scsi_Cmnd *SCpnt = NULL; | 213 | struct scsi_cmnd *SCpnt = NULL; |
213 | 214 | ||
214 | spin_lock_irqsave(&queue->queue_lock, flags); | 215 | spin_lock_irqsave(&queue->queue_lock, flags); |
215 | list_for_each(l, &queue->head) { | 216 | list_for_each(l, &queue->head) { |
@@ -275,13 +276,13 @@ int queue_probetgtlun (Queue_t *queue, int target, int lun) | |||
275 | } | 276 | } |
276 | 277 | ||
277 | /* | 278 | /* |
278 | * Function: int queue_remove_cmd(Queue_t *queue, Scsi_Cmnd *SCpnt) | 279 | * Function: int queue_remove_cmd(Queue_t *queue, struct scsi_cmnd *SCpnt) |
279 | * Purpose : remove a specific command from the queues | 280 | * Purpose : remove a specific command from the queues |
280 | * Params : queue - queue to look in | 281 | * Params : queue - queue to look in |
281 | * SCpnt - command to find | 282 | * SCpnt - command to find |
282 | * Returns : 0 if not found | 283 | * Returns : 0 if not found |
283 | */ | 284 | */ |
284 | int queue_remove_cmd(Queue_t *queue, Scsi_Cmnd *SCpnt) | 285 | int queue_remove_cmd(Queue_t *queue, struct scsi_cmnd *SCpnt) |
285 | { | 286 | { |
286 | unsigned long flags; | 287 | unsigned long flags; |
287 | struct list_head *l; | 288 | struct list_head *l; |