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/fas216.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/fas216.c')
-rw-r--r-- | drivers/scsi/arm/fas216.c | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 4cf7afc31cc7..e05f0c2fc912 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c | |||
@@ -297,8 +297,8 @@ fas216_do_log(FAS216_Info *info, char target, char *fmt, va_list ap) | |||
297 | printk("scsi%d.%c: %s", info->host->host_no, target, buf); | 297 | printk("scsi%d.%c: %s", info->host->host_no, target, buf); |
298 | } | 298 | } |
299 | 299 | ||
300 | static void | 300 | static void fas216_log_command(FAS216_Info *info, int level, |
301 | fas216_log_command(FAS216_Info *info, int level, Scsi_Cmnd *SCpnt, char *fmt, ...) | 301 | struct scsi_cmnd *SCpnt, char *fmt, ...) |
302 | { | 302 | { |
303 | va_list args; | 303 | va_list args; |
304 | 304 | ||
@@ -1662,7 +1662,7 @@ irqreturn_t fas216_intr(FAS216_Info *info) | |||
1662 | return handled; | 1662 | return handled; |
1663 | } | 1663 | } |
1664 | 1664 | ||
1665 | static void __fas216_start_command(FAS216_Info *info, Scsi_Cmnd *SCpnt) | 1665 | static void __fas216_start_command(FAS216_Info *info, struct scsi_cmnd *SCpnt) |
1666 | { | 1666 | { |
1667 | int tot_msglen; | 1667 | int tot_msglen; |
1668 | 1668 | ||
@@ -1754,7 +1754,7 @@ static int parity_test(FAS216_Info *info, int target) | |||
1754 | return info->device[target].parity_check; | 1754 | return info->device[target].parity_check; |
1755 | } | 1755 | } |
1756 | 1756 | ||
1757 | static void fas216_start_command(FAS216_Info *info, Scsi_Cmnd *SCpnt) | 1757 | static void fas216_start_command(FAS216_Info *info, struct scsi_cmnd *SCpnt) |
1758 | { | 1758 | { |
1759 | int disconnect_ok; | 1759 | int disconnect_ok; |
1760 | 1760 | ||
@@ -1808,7 +1808,7 @@ static void fas216_start_command(FAS216_Info *info, Scsi_Cmnd *SCpnt) | |||
1808 | __fas216_start_command(info, SCpnt); | 1808 | __fas216_start_command(info, SCpnt); |
1809 | } | 1809 | } |
1810 | 1810 | ||
1811 | static void fas216_allocate_tag(FAS216_Info *info, Scsi_Cmnd *SCpnt) | 1811 | static void fas216_allocate_tag(FAS216_Info *info, struct scsi_cmnd *SCpnt) |
1812 | { | 1812 | { |
1813 | #ifdef SCSI2_TAG | 1813 | #ifdef SCSI2_TAG |
1814 | /* | 1814 | /* |
@@ -1842,7 +1842,8 @@ static void fas216_allocate_tag(FAS216_Info *info, Scsi_Cmnd *SCpnt) | |||
1842 | } | 1842 | } |
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | static void fas216_do_bus_device_reset(FAS216_Info *info, Scsi_Cmnd *SCpnt) | 1845 | static void fas216_do_bus_device_reset(FAS216_Info *info, |
1846 | struct scsi_cmnd *SCpnt) | ||
1846 | { | 1847 | { |
1847 | struct message *msg; | 1848 | struct message *msg; |
1848 | 1849 | ||
@@ -1890,7 +1891,7 @@ static void fas216_do_bus_device_reset(FAS216_Info *info, Scsi_Cmnd *SCpnt) | |||
1890 | */ | 1891 | */ |
1891 | static void fas216_kick(FAS216_Info *info) | 1892 | static void fas216_kick(FAS216_Info *info) |
1892 | { | 1893 | { |
1893 | Scsi_Cmnd *SCpnt = NULL; | 1894 | struct scsi_cmnd *SCpnt = NULL; |
1894 | #define TYPE_OTHER 0 | 1895 | #define TYPE_OTHER 0 |
1895 | #define TYPE_RESET 1 | 1896 | #define TYPE_RESET 1 |
1896 | #define TYPE_QUEUE 2 | 1897 | #define TYPE_QUEUE 2 |
@@ -1978,8 +1979,8 @@ static void fas216_kick(FAS216_Info *info) | |||
1978 | /* | 1979 | /* |
1979 | * Clean up from issuing a BUS DEVICE RESET message to a device. | 1980 | * Clean up from issuing a BUS DEVICE RESET message to a device. |
1980 | */ | 1981 | */ |
1981 | static void | 1982 | static void fas216_devicereset_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, |
1982 | fas216_devicereset_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result) | 1983 | unsigned int result) |
1983 | { | 1984 | { |
1984 | fas216_log(info, LOG_ERROR, "fas216 device reset complete"); | 1985 | fas216_log(info, LOG_ERROR, "fas216 device reset complete"); |
1985 | 1986 | ||
@@ -1996,8 +1997,8 @@ fas216_devicereset_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result | |||
1996 | * | 1997 | * |
1997 | * Finish processing automatic request sense command | 1998 | * Finish processing automatic request sense command |
1998 | */ | 1999 | */ |
1999 | static void | 2000 | static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, |
2000 | fas216_rq_sns_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result) | 2001 | unsigned int result) |
2001 | { | 2002 | { |
2002 | fas216_log_target(info, LOG_CONNECT, SCpnt->device->id, | 2003 | fas216_log_target(info, LOG_CONNECT, SCpnt->device->id, |
2003 | "request sense complete, result=0x%04x%02x%02x", | 2004 | "request sense complete, result=0x%04x%02x%02x", |
@@ -2030,7 +2031,7 @@ fas216_rq_sns_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result) | |||
2030 | * Finish processing of standard command | 2031 | * Finish processing of standard command |
2031 | */ | 2032 | */ |
2032 | static void | 2033 | static void |
2033 | fas216_std_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result) | 2034 | fas216_std_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, unsigned int result) |
2034 | { | 2035 | { |
2035 | info->stats.fins += 1; | 2036 | info->stats.fins += 1; |
2036 | 2037 | ||
@@ -2142,8 +2143,8 @@ request_sense: | |||
2142 | */ | 2143 | */ |
2143 | static void fas216_done(FAS216_Info *info, unsigned int result) | 2144 | static void fas216_done(FAS216_Info *info, unsigned int result) |
2144 | { | 2145 | { |
2145 | void (*fn)(FAS216_Info *, Scsi_Cmnd *, unsigned int); | 2146 | void (*fn)(FAS216_Info *, struct scsi_cmnd *, unsigned int); |
2146 | Scsi_Cmnd *SCpnt; | 2147 | struct scsi_cmnd *SCpnt; |
2147 | unsigned long flags; | 2148 | unsigned long flags; |
2148 | 2149 | ||
2149 | fas216_checkmagic(info); | 2150 | fas216_checkmagic(info); |
@@ -2182,7 +2183,7 @@ static void fas216_done(FAS216_Info *info, unsigned int result) | |||
2182 | info->device[SCpnt->device->id].parity_check = 0; | 2183 | info->device[SCpnt->device->id].parity_check = 0; |
2183 | clear_bit(SCpnt->device->id * 8 + SCpnt->device->lun, info->busyluns); | 2184 | clear_bit(SCpnt->device->id * 8 + SCpnt->device->lun, info->busyluns); |
2184 | 2185 | ||
2185 | fn = (void (*)(FAS216_Info *, Scsi_Cmnd *, unsigned int))SCpnt->host_scribble; | 2186 | fn = (void (*)(FAS216_Info *, struct scsi_cmnd *, unsigned int))SCpnt->host_scribble; |
2186 | fn(info, SCpnt, result); | 2187 | fn(info, SCpnt, result); |
2187 | 2188 | ||
2188 | if (info->scsi.irq != NO_IRQ) { | 2189 | if (info->scsi.irq != NO_IRQ) { |
@@ -2207,7 +2208,8 @@ no_command: | |||
2207 | * Returns: 0 on success, else error. | 2208 | * Returns: 0 on success, else error. |
2208 | * Notes: io_request_lock is held, interrupts are disabled. | 2209 | * Notes: io_request_lock is held, interrupts are disabled. |
2209 | */ | 2210 | */ |
2210 | int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) | 2211 | int fas216_queue_command(struct scsi_cmnd *SCpnt, |
2212 | void (*done)(struct scsi_cmnd *)) | ||
2211 | { | 2213 | { |
2212 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2214 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2213 | int result; | 2215 | int result; |
@@ -2254,7 +2256,7 @@ int fas216_queue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) | |||
2254 | * | 2256 | * |
2255 | * Trigger restart of a waiting thread in fas216_command | 2257 | * Trigger restart of a waiting thread in fas216_command |
2256 | */ | 2258 | */ |
2257 | static void fas216_internal_done(Scsi_Cmnd *SCpnt) | 2259 | static void fas216_internal_done(struct scsi_cmnd *SCpnt) |
2258 | { | 2260 | { |
2259 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2261 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2260 | 2262 | ||
@@ -2271,7 +2273,8 @@ static void fas216_internal_done(Scsi_Cmnd *SCpnt) | |||
2271 | * Returns: scsi result code. | 2273 | * Returns: scsi result code. |
2272 | * Notes: io_request_lock is held, interrupts are disabled. | 2274 | * Notes: io_request_lock is held, interrupts are disabled. |
2273 | */ | 2275 | */ |
2274 | int fas216_noqueue_command(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) | 2276 | int fas216_noqueue_command(struct scsi_cmnd *SCpnt, |
2277 | void (*done)(struct scsi_cmnd *)) | ||
2275 | { | 2278 | { |
2276 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2279 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2277 | 2280 | ||
@@ -2350,7 +2353,8 @@ enum res_find { | |||
2350 | * Decide how to abort a command. | 2353 | * Decide how to abort a command. |
2351 | * Returns: abort status | 2354 | * Returns: abort status |
2352 | */ | 2355 | */ |
2353 | static enum res_find fas216_find_command(FAS216_Info *info, Scsi_Cmnd *SCpnt) | 2356 | static enum res_find fas216_find_command(FAS216_Info *info, |
2357 | struct scsi_cmnd *SCpnt) | ||
2354 | { | 2358 | { |
2355 | enum res_find res = res_failed; | 2359 | enum res_find res = res_failed; |
2356 | 2360 | ||
@@ -2417,7 +2421,7 @@ static enum res_find fas216_find_command(FAS216_Info *info, Scsi_Cmnd *SCpnt) | |||
2417 | * Returns: FAILED if unable to abort | 2421 | * Returns: FAILED if unable to abort |
2418 | * Notes: io_request_lock is taken, and irqs are disabled | 2422 | * Notes: io_request_lock is taken, and irqs are disabled |
2419 | */ | 2423 | */ |
2420 | int fas216_eh_abort(Scsi_Cmnd *SCpnt) | 2424 | int fas216_eh_abort(struct scsi_cmnd *SCpnt) |
2421 | { | 2425 | { |
2422 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2426 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2423 | int result = FAILED; | 2427 | int result = FAILED; |
@@ -2474,7 +2478,7 @@ int fas216_eh_abort(Scsi_Cmnd *SCpnt) | |||
2474 | * Notes: We won't be re-entered, so we'll only have one device | 2478 | * Notes: We won't be re-entered, so we'll only have one device |
2475 | * reset on the go at one time. | 2479 | * reset on the go at one time. |
2476 | */ | 2480 | */ |
2477 | int fas216_eh_device_reset(Scsi_Cmnd *SCpnt) | 2481 | int fas216_eh_device_reset(struct scsi_cmnd *SCpnt) |
2478 | { | 2482 | { |
2479 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2483 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2480 | unsigned long flags; | 2484 | unsigned long flags; |
@@ -2555,7 +2559,7 @@ int fas216_eh_device_reset(Scsi_Cmnd *SCpnt) | |||
2555 | * Returns: FAILED if unable to reset. | 2559 | * Returns: FAILED if unable to reset. |
2556 | * Notes: Further commands are blocked. | 2560 | * Notes: Further commands are blocked. |
2557 | */ | 2561 | */ |
2558 | int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt) | 2562 | int fas216_eh_bus_reset(struct scsi_cmnd *SCpnt) |
2559 | { | 2563 | { |
2560 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2564 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2561 | unsigned long flags; | 2565 | unsigned long flags; |
@@ -2655,7 +2659,7 @@ static void fas216_init_chip(FAS216_Info *info) | |||
2655 | * Returns: FAILED if unable to reset. | 2659 | * Returns: FAILED if unable to reset. |
2656 | * Notes: io_request_lock is taken, and irqs are disabled | 2660 | * Notes: io_request_lock is taken, and irqs are disabled |
2657 | */ | 2661 | */ |
2658 | int fas216_eh_host_reset(Scsi_Cmnd *SCpnt) | 2662 | int fas216_eh_host_reset(struct scsi_cmnd *SCpnt) |
2659 | { | 2663 | { |
2660 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; | 2664 | FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; |
2661 | 2665 | ||