/[linux-patches]/genpatches-2.6/trunk/2.6.13/2300_scsi_execute-quiet.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.13/2300_scsi_execute-quiet.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 170 - (show annotations) (download)
Thu Sep 29 09:44:56 2005 UTC (12 years, 8 months ago) by dsd
File size: 3091 byte(s)
Stop scsi_execute being so verbose
1 From: James Bottomley <James.Bottomley@steeleye.com>
2 Date: Sun, 4 Sep 2005 16:32:05 +0000 (-0500)
3 Subject: [SCSI] quieten messages on scsi_execute commands
4 X-Git-Tag: v2.6.14-rc1
5 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3173d8c342971a03857d8af749a3f57da7d06b57
6
7 [SCSI] quieten messages on scsi_execute commands
8
9 scsi_io_completion() can be a bit noisy about certain conditions.
10 Previously this wasn't a problem for internally generated commands,
11 since they never hit it. However, since we do all SCSI commands via
12 bios, now they do. user CD testers like magicdev are now getting not
13 ready messages every time they touch the CD to see if there's anything
14 in it.
15
16 Fix this by making all scsi_execute commands REQ_QUIET and making
17 scsi_finish_io() not say anything for REQ_QUIET.
18
19 Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
20 ---
21
22 --- a/drivers/scsi/scsi_lib.c
23 +++ b/drivers/scsi/scsi_lib.c
24 @@ -315,7 +315,7 @@ int scsi_execute(struct scsi_device *sde
25 req->sense = sense;
26 req->sense_len = 0;
27 req->timeout = timeout;
28 - req->flags |= flags | REQ_BLOCK_PC | REQ_SPECIAL;
29 + req->flags |= flags | REQ_BLOCK_PC | REQ_SPECIAL | REQ_QUIET;
30
31 /*
32 * head injection *required* here otherwise quiesce won't work
33 @@ -927,17 +927,20 @@ void scsi_io_completion(struct scsi_cmnd
34 scsi_requeue_command(q, cmd);
35 return;
36 }
37 - printk(KERN_INFO "Device %s not ready.\n",
38 - req->rq_disk ? req->rq_disk->disk_name : "");
39 + if (!(req->flags & REQ_QUIET))
40 + dev_printk(KERN_INFO,
41 + &cmd->device->sdev_gendev,
42 + "Device not ready.\n");
43 cmd = scsi_end_request(cmd, 0, this_count, 1);
44 return;
45 case VOLUME_OVERFLOW:
46 - printk(KERN_INFO "Volume overflow <%d %d %d %d> CDB: ",
47 - cmd->device->host->host_no,
48 - (int)cmd->device->channel,
49 - (int)cmd->device->id, (int)cmd->device->lun);
50 - __scsi_print_command(cmd->data_cmnd);
51 - scsi_print_sense("", cmd);
52 + if (!(req->flags & REQ_QUIET)) {
53 + dev_printk(KERN_INFO,
54 + &cmd->device->sdev_gendev,
55 + "Volume overflow, CDB: ");
56 + __scsi_print_command(cmd->data_cmnd);
57 + scsi_print_sense("", cmd);
58 + }
59 cmd = scsi_end_request(cmd, 0, block_bytes, 1);
60 return;
61 default:
62 @@ -954,15 +957,13 @@ void scsi_io_completion(struct scsi_cmnd
63 return;
64 }
65 if (result) {
66 - if (!(req->flags & REQ_SPECIAL))
67 - printk(KERN_INFO "SCSI error : <%d %d %d %d> return code "
68 - "= 0x%x\n", cmd->device->host->host_no,
69 - cmd->device->channel,
70 - cmd->device->id,
71 - cmd->device->lun, result);
72 + if (!(req->flags & REQ_QUIET)) {
73 + dev_printk(KERN_INFO, &cmd->device->sdev_gendev,
74 + "SCSI error: return code = 0x%x\n", result);
75
76 - if (driver_byte(result) & DRIVER_SENSE)
77 - scsi_print_sense("", cmd);
78 + if (driver_byte(result) & DRIVER_SENSE)
79 + scsi_print_sense("", cmd);
80 + }
81 /*
82 * Mark a single buffer as not uptodate. Queue the remainder.
83 * We sometimes get this cruft in the event that a medium error

  ViewVC Help
Powered by ViewVC 1.1.20