aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/fas216.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/arm/fas216.c')
-rw-r--r--drivers/scsi/arm/fas216.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
index 71cfb1e504c4..e64c3af7c1a0 100644
--- a/drivers/scsi/arm/fas216.c
+++ b/drivers/scsi/arm/fas216.c
@@ -308,8 +308,7 @@ static void fas216_log_command(FAS216_Info *info, int level,
308 fas216_do_log(info, '0' + SCpnt->device->id, fmt, args); 308 fas216_do_log(info, '0' + SCpnt->device->id, fmt, args);
309 va_end(args); 309 va_end(args);
310 310
311 printk(" CDB: "); 311 scsi_print_command(SCpnt);
312 __scsi_print_command(SCpnt->cmnd);
313} 312}
314 313
315static void 314static void
@@ -2079,14 +2078,12 @@ fas216_std_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, unsigned int result)
2079 break; 2078 break;
2080 2079
2081 default: 2080 default:
2082 printk(KERN_ERR "scsi%d.%c: incomplete data transfer " 2081 scmd_printk(KERN_ERR, SCpnt,
2083 "detected: res=%08X ptr=%p len=%X CDB: ", 2082 "incomplete data transfer detected: res=%08X ptr=%p len=%X\n",
2084 info->host->host_no, '0' + SCpnt->device->id, 2083 SCpnt->result, info->scsi.SCp.ptr,
2085 SCpnt->result, info->scsi.SCp.ptr, 2084 info->scsi.SCp.this_residual);
2086 info->scsi.SCp.this_residual); 2085 scsi_print_command(SCpnt);
2087 __scsi_print_command(SCpnt->cmnd); 2086 set_host_byte(SCpnt, DID_ERROR);
2088 SCpnt->result &= ~(255 << 16);
2089 SCpnt->result |= DID_BAD_TARGET << 16;
2090 goto request_sense; 2087 goto request_sense;
2091 } 2088 }
2092 } 2089 }
@@ -2158,12 +2155,11 @@ static void fas216_done(FAS216_Info *info, unsigned int result)
2158 * to transfer, we should not have a valid pointer. 2155 * to transfer, we should not have a valid pointer.
2159 */ 2156 */
2160 if (info->scsi.SCp.ptr && info->scsi.SCp.this_residual == 0) { 2157 if (info->scsi.SCp.ptr && info->scsi.SCp.this_residual == 0) {
2161 printk("scsi%d.%c: zero bytes left to transfer, but " 2158 scmd_printk(KERN_INFO, SCpnt,
2162 "buffer pointer still valid: ptr=%p len=%08x CDB: ", 2159 "zero bytes left to transfer, but buffer pointer still valid: ptr=%p len=%08x\n",
2163 info->host->host_no, '0' + SCpnt->device->id, 2160 info->scsi.SCp.ptr, info->scsi.SCp.this_residual);
2164 info->scsi.SCp.ptr, info->scsi.SCp.this_residual);
2165 info->scsi.SCp.ptr = NULL; 2161 info->scsi.SCp.ptr = NULL;
2166 __scsi_print_command(SCpnt->cmnd); 2162 scsi_print_command(SCpnt);
2167 } 2163 }
2168 2164
2169 /* 2165 /*
@@ -2427,14 +2423,11 @@ int fas216_eh_abort(struct scsi_cmnd *SCpnt)
2427 2423
2428 info->stats.aborts += 1; 2424 info->stats.aborts += 1;
2429 2425
2430 printk(KERN_WARNING "scsi%d: abort command ", info->host->host_no); 2426 scmd_printk(KERN_WARNING, SCpnt, "abort command\n");
2431 __scsi_print_command(SCpnt->cmnd);
2432 2427
2433 print_debug_list(); 2428 print_debug_list();
2434 fas216_dumpstate(info); 2429 fas216_dumpstate(info);
2435 2430
2436 printk(KERN_WARNING "scsi%d: abort %p ", info->host->host_no, SCpnt);
2437
2438 switch (fas216_find_command(info, SCpnt)) { 2431 switch (fas216_find_command(info, SCpnt)) {
2439 /* 2432 /*
2440 * We found the command, and cleared it out. Either 2433 * We found the command, and cleared it out. Either
@@ -2442,7 +2435,7 @@ int fas216_eh_abort(struct scsi_cmnd *SCpnt)
2442 * target, or the busylun bit is not set. 2435 * target, or the busylun bit is not set.
2443 */ 2436 */
2444 case res_success: 2437 case res_success:
2445 printk("success\n"); 2438 scmd_printk(KERN_WARNING, SCpnt, "abort %p success\n", SCpnt);
2446 result = SUCCESS; 2439 result = SUCCESS;
2447 break; 2440 break;
2448 2441
@@ -2452,14 +2445,13 @@ int fas216_eh_abort(struct scsi_cmnd *SCpnt)
2452 * if the bus is free. 2445 * if the bus is free.
2453 */ 2446 */
2454 case res_hw_abort: 2447 case res_hw_abort:
2455
2456 2448
2457 /* 2449 /*
2458 * We are unable to abort the command for some reason. 2450 * We are unable to abort the command for some reason.
2459 */ 2451 */
2460 default: 2452 default:
2461 case res_failed: 2453 case res_failed:
2462 printk("failed\n"); 2454 scmd_printk(KERN_WARNING, SCpnt, "abort %p failed\n", SCpnt);
2463 break; 2455 break;
2464 } 2456 }
2465 2457
@@ -2664,8 +2656,7 @@ int fas216_eh_host_reset(struct scsi_cmnd *SCpnt)
2664 2656
2665 fas216_checkmagic(info); 2657 fas216_checkmagic(info);
2666 2658
2667 printk("scsi%d.%c: %s: resetting host\n", 2659 fas216_log(info, LOG_ERROR, "resetting host");
2668 info->host->host_no, '0' + SCpnt->device->id, __func__);
2669 2660
2670 /* 2661 /*
2671 * Reset the SCSI chip. 2662 * Reset the SCSI chip.