aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_lib.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 72a47ce7a1d3..77f2d444f7e0 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -315,7 +315,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
315 req->sense = sense; 315 req->sense = sense;
316 req->sense_len = 0; 316 req->sense_len = 0;
317 req->timeout = timeout; 317 req->timeout = timeout;
318 req->flags |= flags | REQ_BLOCK_PC | REQ_SPECIAL; 318 req->flags |= flags | REQ_BLOCK_PC | REQ_SPECIAL | REQ_QUIET;
319 319
320 /* 320 /*
321 * head injection *required* here otherwise quiesce won't work 321 * head injection *required* here otherwise quiesce won't work
@@ -927,17 +927,20 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
927 scsi_requeue_command(q, cmd); 927 scsi_requeue_command(q, cmd);
928 return; 928 return;
929 } 929 }
930 printk(KERN_INFO "Device %s not ready.\n", 930 if (!(req->flags & REQ_QUIET))
931 req->rq_disk ? req->rq_disk->disk_name : ""); 931 dev_printk(KERN_INFO,
932 &cmd->device->sdev_gendev,
933 "Device not ready.\n");
932 cmd = scsi_end_request(cmd, 0, this_count, 1); 934 cmd = scsi_end_request(cmd, 0, this_count, 1);
933 return; 935 return;
934 case VOLUME_OVERFLOW: 936 case VOLUME_OVERFLOW:
935 printk(KERN_INFO "Volume overflow <%d %d %d %d> CDB: ", 937 if (!(req->flags & REQ_QUIET)) {
936 cmd->device->host->host_no, 938 dev_printk(KERN_INFO,
937 (int)cmd->device->channel, 939 &cmd->device->sdev_gendev,
938 (int)cmd->device->id, (int)cmd->device->lun); 940 "Volume overflow, CDB: ");
939 __scsi_print_command(cmd->data_cmnd); 941 __scsi_print_command(cmd->data_cmnd);
940 scsi_print_sense("", cmd); 942 scsi_print_sense("", cmd);
943 }
941 cmd = scsi_end_request(cmd, 0, block_bytes, 1); 944 cmd = scsi_end_request(cmd, 0, block_bytes, 1);
942 return; 945 return;
943 default: 946 default:
@@ -954,15 +957,13 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
954 return; 957 return;
955 } 958 }
956 if (result) { 959 if (result) {
957 if (!(req->flags & REQ_SPECIAL)) 960 if (!(req->flags & REQ_QUIET)) {
958 printk(KERN_INFO "SCSI error : <%d %d %d %d> return code " 961 dev_printk(KERN_INFO, &cmd->device->sdev_gendev,
959 "= 0x%x\n", cmd->device->host->host_no, 962 "SCSI error: return code = 0x%x\n", result);
960 cmd->device->channel, 963
961 cmd->device->id, 964 if (driver_byte(result) & DRIVER_SENSE)
962 cmd->device->lun, result); 965 scsi_print_sense("", cmd);
963 966 }
964 if (driver_byte(result) & DRIVER_SENSE)
965 scsi_print_sense("", cmd);
966 /* 967 /*
967 * Mark a single buffer as not uptodate. Queue the remainder. 968 * Mark a single buffer as not uptodate. Queue the remainder.
968 * We sometimes get this cruft in the event that a medium error 969 * We sometimes get this cruft in the event that a medium error