-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolling-io-3-of-7.patch
621 lines (611 loc) · 17.8 KB
/
polling-io-3-of-7.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
From [email protected] Mon Mar 7 19:21:06 2005
Date: Mon, 7 Mar 2005 19:21:06 -0800
From: Jason Uhlenkott <[email protected]>
Subject: [PATCH 3/7] Polling I/O: SCSI
Message-ID: <[email protected]>
References: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email protected]>
User-Agent: Mutt/1.5.6i
Status: RO
Content-Length: 17695
Lines: 604
Support for dumping to SCSI devices in polling mode. For this to be
useful, the low level driver for the desired target device needs to
provide the necessary entry points (.dump_poll, at minimum).
Index: linux/drivers/scsi/scsi.c
===================================================================
--- linux.orig/drivers/scsi/scsi.c 2005-03-07 17:48:58.002352103 -0800
+++ linux/drivers/scsi/scsi.c 2005-03-07 17:49:02.613719142 -0800
@@ -64,6 +64,7 @@
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_request.h>
+#include <linux/diskdump.h>
#include "scsi_priv.h"
#include "scsi_logging.h"
@@ -744,6 +745,9 @@
{
unsigned long flags;
+ if (crashdump_mode())
+ return;
+
/*
* Set the serial numbers back to zero
*/
Index: linux/drivers/scsi/scsi_syms.c
===================================================================
--- linux.orig/drivers/scsi/scsi_syms.c 2005-03-07 17:48:58.002352103 -0800
+++ linux/drivers/scsi/scsi_syms.c 2005-03-07 17:49:02.620555137 -0800
@@ -95,3 +95,5 @@
*/
EXPORT_SYMBOL(scsi_add_timer);
EXPORT_SYMBOL(scsi_delete_timer);
+
+EXPORT_SYMBOL_GPL(scsi_decide_disposition);
Index: linux/drivers/scsi/scsi_dump.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/scsi/scsi_dump.c 2005-03-07 17:49:02.636180269 -0800
@@ -0,0 +1,438 @@
+/*
+ * linux/drivers/scsi/scsi_dump.c
+ *
+ * Copyright (C) 2004 FUJITSU LIMITED
+ * Written by Nobuhiro Tachino ([email protected])
+ *
+ * Some codes are derived from drivers/scsi/sd.c
+ *
+ * Oct 05, 2004 Enhanced cmd_result() by Jim Keniston([email protected])
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/module.h>
+
+#include <linux/fs.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+#include <linux/blkdev.h>
+#include <linux/blkpg.h>
+
+#include <linux/genhd.h>
+#include <linux/utsname.h>
+#include <linux/delay.h>
+#include <linux/diskdump.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_ioctl.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+
+#define MAX_RETRIES 5
+#define SD_TIMEOUT (60 * HZ)
+
+#define Dbg(x, ...) pr_debug("scsi_dump: " x "\n", ## __VA_ARGS__)
+#define Err(x, ...) pr_err ("scsi_dump: " x "\n", ## __VA_ARGS__)
+#define Warn(x, ...) pr_warn ("scsi_dump: " x "\n", ## __VA_ARGS__)
+#define Info(x, ...) pr_info ("scsi_dump: " x "\n", ## __VA_ARGS__)
+
+/* blocks to 512byte sectors */
+#define BLOCK_SECTOR(s) ((s) << (DUMP_BLOCK_SHIFT - 9))
+
+static struct scsi_cmnd scsi_dump_cmnd;
+static struct request scsi_dump_req;
+
+static void rw_intr(struct scsi_cmnd * scmd)
+{
+ del_timer(&scmd->eh_timeout);
+ scmd->done = NULL;
+}
+
+static void eh_timeout(unsigned long data)
+{
+}
+
+/*
+ * Common code to make Scsi_Cmnd
+ */
+static void init_scsi_command(struct scsi_device *sdev, struct scsi_cmnd *scmd,
+ void *buf, int len, unsigned char direction,
+ int set_lun)
+{
+ scmd->request = &scsi_dump_req;
+ scmd->device = sdev;
+ scmd->buffer = scmd->request_buffer = buf;
+ scmd->bufflen = scmd->request_bufflen = len;
+
+
+ scmd->sc_data_direction = direction;
+
+ memcpy(scmd->data_cmnd, scmd->cmnd, sizeof(scmd->cmnd));
+ scmd->cmd_len = COMMAND_SIZE(scmd->cmnd[0]);
+ scmd->old_cmd_len = scmd->cmd_len;
+
+
+ if (set_lun)
+ scmd->cmnd[1] |= (sdev->scsi_level <= SCSI_2) ?
+ ((sdev->lun << 5) & 0xe0) : 0;
+
+ scmd->transfersize = sdev->sector_size;
+ if (direction == DMA_TO_DEVICE)
+ scmd->underflow = len;
+
+ scmd->allowed = MAX_RETRIES;
+ scmd->timeout_per_command = SD_TIMEOUT;
+
+ /*
+ * This is the completion routine we use. This is matched in terms
+ * of capability to this function.
+ */
+ scmd->done = rw_intr;
+
+ /*
+ * Some low driver put eh_timeout into the timer list.
+ */
+ init_timer(&scmd->eh_timeout);
+ scmd->eh_timeout.data = (unsigned long)scmd;
+ scmd->eh_timeout.function = eh_timeout;
+}
+
+/* SYNCHRONIZE CACHE */
+static void init_sync_command(struct scsi_device *sdev, struct scsi_cmnd * scmd)
+{
+ memset(scmd, 0, sizeof(*scmd));
+ scmd->cmnd[0] = SYNCHRONIZE_CACHE;
+
+ init_scsi_command(sdev, scmd, NULL, 0, DMA_NONE, 0);
+}
+
+/* READ/WRITE */
+static int init_rw_command(struct disk_dump_partition *dump_part,
+ struct scsi_device *sdev, struct scsi_cmnd * scmd,
+ int rw, int block, void *buf, unsigned int len)
+{
+ int this_count = len >> 9;
+
+ memset(scmd, 0, sizeof(*scmd));
+
+ if (block + this_count > dump_part->nr_sects) {
+ Err("scsi_dump: block number %d is larger than %lu",
+ block + this_count, dump_part->nr_sects);
+ return -EFBIG;
+ }
+
+ block += dump_part->start_sect;
+
+ /*
+ * If we have a 1K hardware sectorsize, prevent access to single
+ * 512 byte sectors. In theory we could handle this - in fact
+ * the scsi cdrom driver must be able to handle this because
+ * we typically use 1K blocksizes, and cdroms typically have
+ * 2K hardware sectorsizes. Of course, things are simpler
+ * with the cdrom, since it is read-only. For performance
+ * reasons, the filesystems should be able to handle this
+ * and not force the scsi disk driver to use bounce buffers
+ * for this.
+ */
+ if (sdev->sector_size == 1024) {
+ block = block >> 1;
+ this_count = this_count >> 1;
+ }
+ if (sdev->sector_size == 2048) {
+ block = block >> 2;
+ this_count = this_count >> 2;
+ }
+ if (sdev->sector_size == 4096) {
+ block = block >> 3;
+ this_count = this_count >> 3;
+ }
+ switch (rw) {
+ case WRITE:
+ if (!sdev->writeable) {
+ Err("scsi_dump: writable media");
+ return 0;
+ }
+ scmd->cmnd[0] = WRITE_10;
+ break;
+ case READ:
+ scmd->cmnd[0] = READ_10;
+ break;
+ default:
+ Err("scsi_dump: Unknown command %d", rw);
+ return -EINVAL;
+ }
+
+ if (this_count > 0xffff)
+ this_count = 0xffff;
+
+ scmd->cmnd[2] = (unsigned char) (block >> 24) & 0xff;
+ scmd->cmnd[3] = (unsigned char) (block >> 16) & 0xff;
+ scmd->cmnd[4] = (unsigned char) (block >> 8) & 0xff;
+ scmd->cmnd[5] = (unsigned char) block & 0xff;
+ scmd->cmnd[7] = (unsigned char) (this_count >> 8) & 0xff;
+ scmd->cmnd[8] = (unsigned char) this_count & 0xff;
+
+ init_scsi_command(sdev, scmd, buf, len,
+ (rw == WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE), 1);
+ return 0;
+}
+
+/*
+ * Check the status of scsi command and determine whether it is
+ * success, fail, or retriable.
+ *
+ * Return code
+ * > 0: should retry
+ * = 0: success
+ * < 0: fail
+ */
+static int cmd_result(struct scsi_cmnd *scmd)
+{
+ int status;
+
+ status = status_byte(scmd->result);
+
+ switch (scsi_decide_disposition(scmd)) {
+ case FAILED:
+ break;
+ case NEEDS_RETRY:
+ case ADD_TO_MLQUEUE:
+ return 1 /* retry */;
+ case SUCCESS:
+ if (host_byte(scmd->result) == DID_RESET) {
+ Err("scsi_dump: host_byte(scmd->result) set to : DID_RESET");
+ return 1; /* retry */
+ } else if ((status == CHECK_CONDITION) &&
+ (scmd->sense_buffer[2] == UNIT_ATTENTION)) {
+ /*
+ * if we are expecting a cc/ua because of a bus reset
+ * that we performed, treat this just as a retry.
+ * otherwise this is information that we should pass up
+ * to the upper-level driver so that we can deal with
+ * it there.
+ */
+ Err("scsi_dump: CHECK_CONDITION and UNIT_ATTENTION");
+ if (scmd->device->expecting_cc_ua) {
+ Err("scsi_dump: expecting_cc_ua is set. setting it to zero");
+ scmd->device->expecting_cc_ua = 0;
+ return 1; /* retry */
+ }
+ /*
+ * if the device is in the process of becoming ready, we
+ * should retry.
+ */
+ if ((scmd->sense_buffer[12] == 0x04) &&
+ (scmd->sense_buffer[13] == 0x01)) {
+ Err("scsi_dump: device is in the process of becoming ready..");
+ return 1; /* retry */
+ }
+ /*
+ * if the device is not started, we need to wake
+ * the error handler to start the motor
+ */
+ if (scmd->device->allow_restart &&
+ (scmd->sense_buffer[12] == 0x04) &&
+ (scmd->sense_buffer[13] == 0x02)) {
+ Err("scsi_dump: the device is not started..");
+ break;
+ }
+ } else if (host_byte(scmd->result) != DID_OK) {
+ Err("csi_dump: ome undefined error");
+ Err("host_byte(scmd->result) : %d", host_byte(scmd->result));
+ break;
+ }
+
+ if (status == GOOD ||
+ status == CONDITION_GOOD ||
+ status == INTERMEDIATE_GOOD ||
+ status == INTERMEDIATE_C_GOOD)
+ return 0;
+ if (status == CHECK_CONDITION &&
+ scmd->sense_buffer[2] == RECOVERED_ERROR)
+ return 0;
+ break;
+ default:
+ Err("scsi_dump: bad disposition: %d", scmd->result);
+ return -EIO;
+ }
+
+ Err("scsi_dump: command %x failed with 0x%x", scmd->cmnd[0], scmd->result);
+ return -EIO;
+}
+
+static int send_command(struct scsi_cmnd *scmd)
+{
+ struct Scsi_Host *host = scmd->device->host;
+ struct scsi_device *sdev = scmd->device;
+ int ret;
+
+ do {
+ if (!scsi_device_online(sdev)) {
+ Err("scsi_dump: Scsi disk is not online");
+ return -EIO;
+ }
+ if (sdev->changed) {
+ Err("scsi_dump: SCSI disk has been changed. Prohibiting further I/O");
+ return -EIO;
+ }
+
+ spin_lock(host->host_lock);
+ host->hostt->queuecommand(scmd, rw_intr);
+ spin_unlock(host->host_lock);
+
+ while (scmd->done != NULL) {
+ host->hostt->dump_poll(scmd->device);
+ udelay(100);
+ diskdump_update();
+ }
+ scmd->done = rw_intr;
+ } while ((ret = cmd_result(scmd)) > 0);
+
+ return ret;
+}
+
+static int
+scsi_dump_quiesce(struct disk_dump_device *dump_device)
+{
+ struct scsi_device *sdev = dump_device->device;
+ struct Scsi_Host *host = sdev->host;
+
+ if (host->hostt->dump_quiesce)
+ return host->hostt->dump_quiesce(sdev);
+
+ return 0;
+}
+
+static int scsi_dump_rw_block(struct disk_dump_partition *dump_part, int rw,
+ unsigned long dump_block_nr, void *buf, int len)
+{
+ struct disk_dump_device *dump_device = dump_part->device;
+ struct scsi_device *sdev = dump_device->device;
+ int block_nr = BLOCK_SECTOR(dump_block_nr);
+ int ret;
+
+ ret = init_rw_command(dump_part, sdev, &scsi_dump_cmnd, rw,
+ block_nr, buf, DUMP_BLOCK_SIZE * len);
+ if (ret < 0) {
+ Err("scsi_dump: scsi_dump: init_rw_command failed");
+ return ret;
+ }
+ return send_command(&scsi_dump_cmnd);
+}
+
+static int
+scsi_dump_shutdown(struct disk_dump_device *dump_device)
+{
+ struct scsi_device *sdev = dump_device->device;
+ struct Scsi_Host *host = sdev->host;
+ int ret;
+
+ if (sdev->scsi_level >= SCSI_2) {
+ init_sync_command(sdev, &scsi_dump_cmnd);
+ ret = send_command(&scsi_dump_cmnd);
+ if (ret < 0)
+ Warn("SYNCHRONIZE_CACHE failed.");
+ }
+
+ if (host->hostt->dump_shutdown)
+ return host->hostt->dump_shutdown(sdev);
+
+ return 0;
+}
+
+struct disk_dump_device_ops scsi_dump_device_ops = {
+ .rw_block = scsi_dump_rw_block,
+ .quiesce = scsi_dump_quiesce,
+ .shutdown = scsi_dump_shutdown,
+};
+
+static void *scsi_dump_probe(struct device *dev)
+{
+ struct scsi_device *sdev;
+
+ if ((dev->bus == NULL) || (dev->bus->name == NULL) ||
+ strncmp(dev->bus->name, "scsi", 4))
+ return NULL;
+
+ sdev = to_scsi_device(dev);
+ if (!sdev->host->hostt->dump_poll)
+ return NULL;
+
+ return sdev;
+}
+
+static int scsi_dump_add_device(struct disk_dump_device *dump_device)
+{
+ struct scsi_device *sdev;
+ int error;
+
+ sdev = dump_device->device;
+ if (!sdev->host->hostt->dump_poll)
+ return -ENOTSUPP;
+
+ if ((error = scsi_device_get(sdev)) != 0)
+ return error;
+
+ memcpy(&dump_device->ops, &scsi_dump_device_ops,
+ sizeof(scsi_dump_device_ops));
+ if (sdev->host->max_sectors) {
+ dump_device->max_blocks =
+ (sdev->sector_size * sdev->host->max_sectors)
+ >> DUMP_BLOCK_SHIFT;
+ }
+ return 0;
+}
+
+static void scsi_dump_remove_device(struct disk_dump_device *dump_device)
+{
+ struct scsi_device *sdev = dump_device->device;
+
+ scsi_device_put(sdev);
+}
+
+static struct disk_dump_type scsi_dump_type = {
+ .probe = scsi_dump_probe,
+ .add_device = scsi_dump_add_device,
+ .remove_device = scsi_dump_remove_device,
+ .owner = THIS_MODULE,
+};
+
+static int init_scsi_dump(void)
+{
+ int ret;
+
+ if ((ret = register_disk_dump_type(&scsi_dump_type)) < 0) {
+ Err("scsi_dump: register failed");
+ return ret;
+ }
+ return ret;
+}
+
+static void cleanup_scsi_dump(void)
+{
+ if (unregister_disk_dump_type(&scsi_dump_type) < 0)
+ Err("scsi_dump: unregister failed");
+}
+
+module_init(init_scsi_dump);
+module_exit(cleanup_scsi_dump);
+
+MODULE_LICENSE("GPL");
Index: linux/drivers/scsi/Kconfig
===================================================================
--- linux.orig/drivers/scsi/Kconfig 2005-03-07 17:48:58.003328674 -0800
+++ linux/drivers/scsi/Kconfig 2005-03-07 17:49:02.643016264 -0800
@@ -55,6 +55,18 @@
In this case, do not compile the driver for your SCSI host adapter
(below) as a module either.
+config SCSI_DUMP
+ tristate "SCSI dump support"
+ depends on CRASH_DUMP_BLOCKDEV && SCSI
+ help
+ If you want to be able to use LKCD to write crash dumps to
+ SCSI disks using polling I/O (i.e. with interrupts disabled),
+ say Y here.
+
+ This option is only useful if your low-level disk driver supports
+ polling I/O. If it doesn't, LKCD will fall back to ordinary
+ interrupt-driven I/O.
+
config CHR_DEV_ST
tristate "SCSI tape support"
depends on SCSI
Index: linux/include/scsi/scsi_host.h
===================================================================
--- linux.orig/include/scsi/scsi_host.h 2005-03-07 17:48:58.004305244 -0800
+++ linux/include/scsi/scsi_host.h 2005-03-07 17:49:02.676219669 -0800
@@ -361,6 +361,38 @@
* module_init/module_exit.
*/
struct list_head legacy_hosts;
+
+ /* operations for dump */
+
+ /*
+ * Called to set up the device at the beginning of a crash dump.
+ * Can be used to perform a host reset, purge any outstanding
+ * commands so dump I/O can begin, etc.
+ *
+ * Status: OPTIONAL
+ */
+ int (* dump_quiesce)(struct scsi_device *);
+
+ /*
+ * Called after a crash dump is completed. Can be used to
+ * synchronize caches if applicable.
+ *
+ * Status: OPTIONAL
+ */
+ int (* dump_shutdown)(struct scsi_device *);
+
+ /*
+ * Called during a crash dump after each command is issued
+ * (repeatedly, until the command completes). Typically calls
+ * the interrupt handler so that any pending interrupts will get
+ * processed despite irqs being disabled.
+ *
+ * Any driver which wants to support crash dumps using polling I/O
+ * needs to implement this method.
+ *
+ * Status: OPTIONAL
+ */
+ void (* dump_poll)(struct scsi_device *);
};
/*
Index: linux/drivers/scsi/Makefile
===================================================================
--- linux.orig/drivers/scsi/Makefile 2005-03-07 17:48:58.003328674 -0800
+++ linux/drivers/scsi/Makefile 2005-03-07 17:49:02.676219669 -0800
@@ -141,6 +141,8 @@
obj-$(CONFIG_BLK_DEV_SR) += sr_mod.o
obj-$(CONFIG_CHR_DEV_SG) += sg.o
+obj-$(CONFIG_SCSI_DUMP) += scsi_dump.o
+
scsi_mod-y += scsi.o hosts.o scsi_ioctl.o constants.o \
scsicam.o scsi_error.o scsi_lib.o \
scsi_scan.o scsi_syms.o scsi_sysfs.o \
Index: linux/include/scsi/scsi_eh.h
===================================================================
--- linux.orig/include/scsi/scsi_eh.h 2005-03-07 17:48:58.004305244 -0800
+++ linux/include/scsi/scsi_eh.h 2005-03-07 17:49:02.683055664 -0800
@@ -33,6 +33,7 @@
extern void scsi_report_bus_reset(struct Scsi_Host *, int);
extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
extern int scsi_block_when_processing_errors(struct scsi_device *);
+extern int scsi_decide_disposition(struct scsi_cmnd *);
extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
struct scsi_sense_hdr *sshdr);
extern int scsi_request_normalize_sense(struct scsi_request *sreq,
Index: linux/drivers/scsi/scsi_error.c
===================================================================
--- linux.orig/drivers/scsi/scsi_error.c 2005-03-07 17:48:58.003328674 -0800
+++ linux/drivers/scsi/scsi_error.c 2005-03-07 17:49:02.685008806 -0800
@@ -31,6 +31,7 @@
#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/scsi_request.h>
+#include <linux/diskdump.h>
#include "scsi_priv.h"
#include "scsi_logging.h"
@@ -419,6 +420,9 @@
**/
static void scsi_eh_done(struct scsi_cmnd *scmd)
{
+ if (crashdump_mode())
+ return;
+
/*
* if the timeout handler is already running, then just set the
* flag which says we finished late, and return. we have no
Index: linux/drivers/scsi/scsi_priv.h
===================================================================
--- linux.orig/drivers/scsi/scsi_priv.h 2005-03-07 17:48:58.003328674 -0800
+++ linux/drivers/scsi/scsi_priv.h 2005-03-07 17:49:02.685008806 -0800
@@ -92,7 +92,6 @@
/* scsi_error.c */
extern void scsi_times_out(struct scsi_cmnd *cmd);
extern int scsi_error_handler(void *host);
-extern int scsi_decide_disposition(struct scsi_cmnd *cmd);
extern void scsi_eh_wakeup(struct Scsi_Host *shost);
extern int scsi_eh_scmd_add(struct scsi_cmnd *, int);