On Thu, Nov 18, 2004 at 11:35:26AM +0100, Jens Axboe wrote:
> On Wed, Nov 17 2004, Linus Torvalds wrote:
> >
> > Jens, did you see this one?
>
> Vladimir, is this completely reproducable? Does -rc1 work correctly (or
> which was the last version you tested)? I haven't been able to spot any
> errors in this path so far.
It happens 100% when smartd tries to fetch SMART info from
disks connected to 3ware controller.
Seems like using obsolete 3ware API has something to do with this.
It does happen with -rc1 too.
Here is a complete dmesg output:
=== BEFORE smartd
Linux version 2.6.10-rc2 (vsavkin@behemoth) (gcc version 3.3.4 (Debian 1:3.3.4-13)) #1 SMP Wed Nov 17 17:04:35 MSK 2004
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
BIOS-e820: 000000003fff0000 - 000000003fff8000 (ACPI data)
BIOS-e820: 000000003fff8000 - 0000000040000000 (ACPI NVS)
BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
127MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at 000fa6f0
On node 0 totalpages: 262128
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 225280 pages, LIFO batch:16
HighMem zone: 32752 pages, LIFO batch:7
DMI 2.3 present.
ACPI: RSDP (v000 Acer ) @ 0x000fe030
ACPI: RSDT (v001 Acer M25C 0x00000002 Acer 0x00000000) @ 0x3fff0000
ACPI: FADT (v001 Acer M25C 0x00000002 Acer 0x00000000) @ 0x3fff009a
ACPI: MADT (v001 Acer M25C 0x00000002 Acer 0x00000000) @ 0x3fff002c
ACPI: DSDT (v001 Acer M25C 0x00001000 MSFT 0x0100000c) @ 0x00000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:8 APIC version 17
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:8 APIC version 17
ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
Using ACPI for processor (LAPIC) configuration information
Intel MultiProcessor Specification v1.4
Virtual Wire compatibility mode.
OEM ID: ACER Product ID: M25C APIC at: 0xFEE00000
I/O APIC #2 Version 17 at 0xFEC00000.
I/O APIC #3 Version 17 at 0xFEC01000.
Enabling APIC mode: Flat. Using 2 I/O APICs
Processors: 2
Built 1 zonelists
Kernel command line: BOOT_IMAGE=nov ro root=801 init=/bin/sh
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 733.389 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1035112k/1048512k available (2190k kernel code, 12752k reserved, 720k data, 444k init, 131008k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 1445.88 BogoMIPS (lpj=722944)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 0383fbff 00000000 00000000 00000000
CPU: After vendor identify, caps: 0383fbff 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU: After all inits, caps: 0383fbff 00000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
CPU0: Intel Pentium III (Coppermine) stepping 0a
per-CPU timeslice cutoff: 731.61 usecs.
task migration cache decay timeout: 1 msecs.
Booting processor 1/1 eip 2000
Initializing CPU#1
Calibrating delay loop... 1462.27 BogoMIPS (lpj=731136)
CPU: After generic identify, caps: 0383fbff 00000000 00000000 00000000
CPU: After vendor identify, caps: 0383fbff 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU: After all inits, caps: 0383fbff 00000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel Pentium III (Coppermine) stepping 0a
Total of 2 processors activated (2908.16 BogoMIPS).
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 pin1=2 pin2=0
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found pin 0) ...works.
checking TSC synchronization across 2 CPUs: passed.
Brought up 2 CPUs
CPU0:
domain 0: span 3
groups: 1 2
CPU1:
domain 0: span 3
groups: 2 1
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xf0220, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Discovered peer bus 01
PCI->APIC IRQ transform: (B0,I11,P0) -> 17
PCI->APIC IRQ transform: (B0,I13,P0) -> 16
PCI->APIC IRQ transform: (B1,I3,P0) -> 19
PCI->APIC IRQ transform: (B1,I3,P1) -> 18
PCI->APIC IRQ transform: (B1,I6,P0) -> 20
PCI->APIC IRQ transform: (B1,I8,P0) -> 22
TC classifier action (bugs to [email protected] cc [email protected])
Machine check exception polling timer started.
IA-32 Microcode Update Driver: v1.14 <[email protected]>
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
Real Time Clock Driver v1.12
Non-volatile memory driver v1.2
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Intel(R) PRO/1000 Network Driver - version 5.5.4-k2-NAPI
Copyright (c) 1999-2004 Intel Corporation.
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e100: Intel(R) PRO/100 Network Driver, 3.2.3-k2-NAPI
e100: Copyright(c) 1999-2004 Intel Corporation
e100: eth1: e100_probe: addr 0x43200000, irq 17, MAC addr 00:00:E2:3B:72:D0
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Probing IDE interface ide0...
ide0: Wait for ready failed before probe !
Probing IDE interface ide1...
ide1: Wait for ready failed before probe !
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec aic7899 Ultra160 SCSI adapter>
aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
elevator: using anticipatory as default io scheduler
(scsi0:A:0): 40.000MB/s transfers (20.000MHz, offset 63, 16bit)
Vendor: SEAGATE Model: ST336607LC Rev: 0003
Type: Direct-Access ANSI SCSI revision: 03
scsi0:A:0:0: Tagged Queuing enabled. Depth 16
scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec aic7899 Ultra160 SCSI adapter>
aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs
3ware Storage Controller device driver for Linux v1.26.02.000.
scsi2 : 3ware Storage Controller
3w-xxxx: scsi2: Found a 3ware Storage Controller at 0x5080, IRQ: 22.
Vendor: 3ware Model: Logical Disk 0 Rev: 1.2
Type: Direct-Access ANSI SCSI revision: 00
Vendor: 3ware Model: Logical Disk 11 Rev: 1.2
Type: Direct-Access ANSI SCSI revision: 00
libata version 1.10 loaded.
SCSI device sda: 71687372 512-byte hdwr sectors (36704 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 < sda5 sda6 sda7 >
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sdb: 1465185024 512-byte hdwr sectors (750175 MB)
SCSI device sdb: drive cache: write back
sdb: sdb1
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
SCSI device sdc: 781422768 512-byte hdwr sectors (400088 MB)
SCSI device sdc: drive cache: write back
sdc: sdc1
Attached scsi disk sdc at scsi2, channel 0, id 11, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
Attached scsi generic sg1 at scsi2, channel 0, id 0, lun 0, type 0
Attached scsi generic sg2 at scsi2, channel 0, id 11, lun 0, type 0
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
input: PC Speaker
NET: Registered protocol family 2
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
All bugs added by David S. Miller <[email protected]>
Starting balanced_irq
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 444k freed
Adding 1959920k swap on /dev/sda2. Priority:-1 extents:1
device-mapper: 4.1.0-ioctl (2003-12-10) initialised: [email protected]
ReiserFS: sda5: found reiserfs format "3.6" with standard journal
ReiserFS: sda5: using ordered data mode
ReiserFS: sda5: journal params: device sda5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda5: checking transaction log (sda5)
ReiserFS: sda5: replayed 1 transactions in 0 seconds
ReiserFS: sda5: Using r5 hash to sort names
ReiserFS: sda6: found reiserfs format "3.6" with standard journal
ReiserFS: sda6: using ordered data mode
ReiserFS: sda6: journal params: device sda6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda6: checking transaction log (sda6)
ReiserFS: sda6: replayed 3 transactions in 0 seconds
ReiserFS: sda6: Using r5 hash to sort names
ReiserFS: sda6: Removing [1915 1387 0x0 SD]..done
ReiserFS: sda6: There were 1 uncompleted unlinks/truncates. Completed
ReiserFS: sda7: found reiserfs format "3.6" with standard journal
ReiserFS: sda7: using ordered data mode
ReiserFS: sda7: journal params: device sda7, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda7: checking transaction log (sda7)
ReiserFS: sda7: replayed 1 transactions in 0 seconds
ReiserFS: sda7: Using r5 hash to sort names
ReiserFS: sdb1: found reiserfs format "3.6" with standard journal
ReiserFS: sdb1: using ordered data mode
ReiserFS: sdb1: journal params: device sdb1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdb1: checking transaction log (sdb1)
ReiserFS: sdb1: replayed 1 transactions in 0 seconds
ReiserFS: sdb1: Using r5 hash to sort names
ReiserFS: sdc1: found reiserfs format "3.6" with standard journal
ReiserFS: sdc1: using ordered data mode
ReiserFS: sdc1: journal params: device sdc1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdc1: checking transaction log (sdc1)
ReiserFS: sdc1: replayed 1 transactions in 0 seconds
ReiserFS: sdc1: Using r5 hash to sort names
ip_tables: (C) 2000-2002 Netfilter core team
e1000: eth0: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex
vlan0173: add 01:00:5e:00:00:01 mcast address to master interface
vlan0169: add 01:00:5e:00:00:01 mcast address to master interface
=== AFTER smartd
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
scsi: unknown opcode 0x4d
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
scsi: unknown opcode 0x80
3w-xxxx: SCSI_IOCTL_SEND_COMMAND deprecated, please update your 3ware tools.
arq->state 2
Badness in as_requeue_request at drivers/block/as-iosched.c:1478
[<c01032a7>] dump_stack+0x17/0x20
[<c02388c6>] as_requeue_request+0x66/0xe0
[<c022fc66>] elv_requeue_request+0x26/0x50
[<c027b6d9>] scsi_request_fn+0x269/0x370
[<c0232685>] blk_insert_request+0x95/0xb0
[<c027a4e4>] scsi_queue_insert+0x64/0xa0
[<c027662e>] scsi_dispatch_cmd+0x16e/0x1d0
[<c027b653>] scsi_request_fn+0x1e3/0x370
[<c0231d6e>] __generic_unplug_device+0x2e/0x30
[<c0231d88>] generic_unplug_device+0x18/0x30
[<c02328a2>] blk_execute_rq+0x82/0xb0
[<c0236726>] sg_scsi_ioctl+0x1f6/0x2c0
[<c02368d7>] scsi_cmd_ioctl+0xe7/0x400
[<c02a6fb4>] sd_ioctl+0xa4/0xd0
[<c0234a45>] blkdev_ioctl+0x75/0x3cf
[<c0160fbc>] sys_ioctl+0xbc/0x210
[<c0102483>] syscall_call+0x7/0xb
~
:wq
With best regards,
Vladimir Savkin.
On Thu, 2004-11-18 at 13:10, Jens Axboe wrote:
> It is a double requeue. The SCSI path looks really messy (and buggy
> there). What happens is that the host queuecommand sets DID_ERROR and
> calls scsi_done() on the command, which may decide the commands need
> retrying and thus requeue it. Upon return from queuecommand, the SCSI
> layer initiates a requeue of the request because queuecommand returned
> 1. Double requeue, request list is now screwed.
>
> James, it looks like the queuecommand returns need an overhaul so it's
> clear who does what and when.
Hmm, I thought the Documentation/scsi/scsi_mid_low_api.txt was quite
clear on this:
* Command ownership. If the driver returns zero, it owns the
* command and must take responsibility for ensuring the 'done'
* callback is executed. Note: the driver may call done before
* returning zero, but after it has called done, it may not
* return any value other than zero. If the driver makes a
* non-zero return, it must not execute the command's done
* callback at any time.
The 3ware driver is clearly in violation by calling done and then
returning one.
James
On Thu, Nov 18 2004, Jens Axboe wrote:
> On Thu, Nov 18 2004, Vladimir B. Savkin wrote:
> > On Thu, Nov 18, 2004 at 11:35:26AM +0100, Jens Axboe wrote:
> > > On Wed, Nov 17 2004, Linus Torvalds wrote:
> > > >
> > > > Jens, did you see this one?
> > >
> > > Vladimir, is this completely reproducable? Does -rc1 work correctly (or
> > > which was the last version you tested)? I haven't been able to spot any
> > > errors in this path so far.
> >
> > It happens 100% when smartd tries to fetch SMART info from
> > disks connected to 3ware controller.
> > Seems like using obsolete 3ware API has something to do with this.
> > It does happen with -rc1 too.
> > Here is a complete dmesg output:
>
> Really looks like a double requeue, bet it happens because we end up
> requeing both from the failed queuecommand return and from scsi_done().
> I'll take a look.
It is a double requeue. The SCSI path looks really messy (and buggy
there). What happens is that the host queuecommand sets DID_ERROR and
calls scsi_done() on the command, which may decide the commands need
retrying and thus requeue it. Upon return from queuecommand, the SCSI
layer initiates a requeue of the request because queuecommand returned
1. Double requeue, request list is now screwed.
James, it looks like the queuecommand returns need an overhaul so it's
clear who does what and when.
You can work around the issue with this patch (I hope, not tested), I'll
see if I can scrub the paths a little.
--- linux-2.6.10-rc2-mm1/drivers/scsi/3w-xxxx.c~ 2004-11-18 20:03:27.945527140 +0100
+++ linux-2.6.10-rc2-mm1/drivers/scsi/3w-xxxx.c 2004-11-18 20:10:01.249255049 +0100
@@ -2053,6 +2053,11 @@
break;
case TW_IOCTL:
printk(KERN_WARNING "3w-xxxx: SCSI_IOCTL_SEND_COMMAND deprecated, please update your 3ware tools.\n");
+ tw_dev->state[request_id] = TW_S_COMPLETED;
+ tw_state_request_finish(tw_dev, request_id);
+ SCpnt->result = DID_ABORT << 16;
+ done(SCpnt);
+ reval = 0;
break;
default:
printk(KERN_NOTICE "3w-xxxx: scsi%d: Unknown scsi opcode: 0x%x\n", tw_dev->host->host_no, *command);
--
Jens Axboe
On Thu, Nov 18 2004, James Bottomley wrote:
> On Thu, 2004-11-18 at 13:10, Jens Axboe wrote:
> > It is a double requeue. The SCSI path looks really messy (and buggy
> > there). What happens is that the host queuecommand sets DID_ERROR and
> > calls scsi_done() on the command, which may decide the commands need
> > retrying and thus requeue it. Upon return from queuecommand, the SCSI
> > layer initiates a requeue of the request because queuecommand returned
> > 1. Double requeue, request list is now screwed.
> >
> > James, it looks like the queuecommand returns need an overhaul so it's
> > clear who does what and when.
>
> Hmm, I thought the Documentation/scsi/scsi_mid_low_api.txt was quite
> clear on this:
>
> * Command ownership. If the driver returns zero, it owns the
> * command and must take responsibility for ensuring the 'done'
> * callback is executed. Note: the driver may call done before
> * returning zero, but after it has called done, it may not
> * return any value other than zero. If the driver makes a
> * non-zero return, it must not execute the command's done
> * callback at any time.
>
> The 3ware driver is clearly in violation by calling done and then
> returning one.
It's clearly not the only one, the first 3 I looked at all did it.
That's the big mess. I'll do an audit.
--
Jens Axboe
On Thu, 2004-11-18 at 15:32, Jens Axboe wrote:
> It's clearly not the only one, the first 3 I looked at all did it.
> That's the big mess. I'll do an audit.
Thanks ... I'll owe you a beverage of your choice...
James
On Thu, Nov 18 2004, Vladimir B. Savkin wrote:
> On Thu, Nov 18, 2004 at 11:35:26AM +0100, Jens Axboe wrote:
> > On Wed, Nov 17 2004, Linus Torvalds wrote:
> > >
> > > Jens, did you see this one?
> >
> > Vladimir, is this completely reproducable? Does -rc1 work correctly (or
> > which was the last version you tested)? I haven't been able to spot any
> > errors in this path so far.
>
> It happens 100% when smartd tries to fetch SMART info from
> disks connected to 3ware controller.
> Seems like using obsolete 3ware API has something to do with this.
> It does happen with -rc1 too.
> Here is a complete dmesg output:
Really looks like a double requeue, bet it happens because we end up
requeing both from the failed queuecommand return and from scsi_done().
I'll take a look.
--
Jens Axboe
On Thu, Nov 18 2004, James Bottomley wrote:
> On Thu, 2004-11-18 at 15:32, Jens Axboe wrote:
> > It's clearly not the only one, the first 3 I looked at all did it.
> > That's the big mess. I'll do an audit.
>
> Thanks ... I'll owe you a beverage of your choice...
I'm sure that can be arranged :-)
Here's an audit of drivers/scsi, there are quite a few of them in there.
I've opted to keep the ->scsi_done() calls in there and rather return 0,
instead of killing them and returning something more appropriate. I'll
send this to linux-scsi with maintainers CC'ed as well.
===== drivers/scsi/3w-9xxx.c 1.4 vs edited =====
--- 1.4/drivers/scsi/3w-9xxx.c 2004-07-16 17:20:43 +02:00
+++ edited/drivers/scsi/3w-9xxx.c 2004-11-18 22:55:58 +01:00
@@ -1746,6 +1746,7 @@ static int twa_scsi_queue(struct scsi_cm
twa_free_request_id(tw_dev, request_id);
SCpnt->result = (DID_ERROR << 16);
done(SCpnt);
+ reval = 0;
}
return retval;
===== drivers/scsi/3w-xxxx.c 1.47 vs edited =====
--- 1.47/drivers/scsi/3w-xxxx.c 2004-10-07 05:20:16 +02:00
+++ edited/drivers/scsi/3w-xxxx.c 2004-11-18 22:55:31 +01:00
@@ -2067,6 +2067,7 @@ static int tw_scsi_queue(struct scsi_cmn
tw_state_request_finish(tw_dev, request_id);
SCpnt->result = (DID_ERROR << 16);
done(SCpnt);
+ retval = 0;
}
out:
return retval;
===== drivers/scsi/ide-scsi.c 1.47 vs edited =====
--- 1.47/drivers/scsi/ide-scsi.c 2004-10-22 01:46:25 +02:00
+++ edited/drivers/scsi/ide-scsi.c 2004-11-18 22:54:09 +01:00
@@ -891,7 +891,7 @@ abort:
if (rq) kfree (rq);
cmd->result = DID_ERROR << 16;
done(cmd);
- return 1;
+ return 0;
}
static int idescsi_eh_abort (struct scsi_cmnd *cmd)
===== drivers/scsi/megaraid.c 1.73 vs edited =====
--- 1.73/drivers/scsi/megaraid.c 2004-11-11 09:43:34 +01:00
+++ edited/drivers/scsi/megaraid.c 2004-11-19 09:03:43 +01:00
@@ -634,11 +634,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_
}
if(!(scb = mega_allocate_scb(adapter, cmd))) {
-
- cmd->result = (DID_ERROR << 16);
- cmd->scsi_done(cmd);
*busy = 1;
-
return NULL;
}
@@ -677,11 +673,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_
/* Allocate a SCB and initialize passthru */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
-
- cmd->result = (DID_ERROR << 16);
- cmd->scsi_done(cmd);
*busy = 1;
-
return NULL;
}
pthru = scb->pthru;
@@ -723,11 +715,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_
/* Allocate a SCB and initialize mailbox */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
-
- cmd->result = (DID_ERROR << 16);
- cmd->scsi_done(cmd);
*busy = 1;
-
return NULL;
}
mbox = (mbox_t *)scb->raw_mbox;
@@ -867,11 +855,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_
/* Allocate a SCB and initialize mailbox */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
-
- cmd->result = (DID_ERROR << 16);
- cmd->scsi_done(cmd);
*busy = 1;
-
return NULL;
}
@@ -899,11 +883,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_
else {
/* Allocate a SCB and initialize passthru */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
-
- cmd->result = (DID_ERROR << 16);
- cmd->scsi_done(cmd);
*busy = 1;
-
return NULL;
}
===== drivers/scsi/ncr53c8xx.c 1.50 vs edited =====
--- 1.50/drivers/scsi/ncr53c8xx.c 2004-11-11 09:43:34 +01:00
+++ edited/drivers/scsi/ncr53c8xx.c 2004-11-19 09:06:28 +01:00
@@ -7517,6 +7517,7 @@ printk("ncr53c8xx : command successfully
if (sts != DID_OK) {
unmap_scsi_data(np, cmd);
done(cmd);
+ sts = 0;
}
return sts;
===== drivers/scsi/nsp32.c 1.32 vs edited =====
--- 1.32/drivers/scsi/nsp32.c 2004-10-20 21:24:36 +02:00
+++ edited/drivers/scsi/nsp32.c 2004-11-19 09:10:05 +01:00
@@ -970,8 +970,7 @@ static int nsp32_queuecommand(struct scs
data->CurrentSC = NULL;
SCpnt->result = DID_NO_CONNECT << 16;
done(SCpnt);
-
- return SCSI_MLQUEUE_HOST_BUSY;
+ return 0;
}
/* check target ID is not same as this initiator ID */
@@ -979,7 +978,7 @@ static int nsp32_queuecommand(struct scs
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???");
SCpnt->result = DID_BAD_TARGET << 16;
done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
+ return 0;
}
/* check target LUN is allowable value */
@@ -987,7 +986,7 @@ static int nsp32_queuecommand(struct scs
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "no more lun");
SCpnt->result = DID_BAD_TARGET << 16;
done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
+ return 0;
}
show_command(SCpnt);
@@ -1019,7 +1018,7 @@ static int nsp32_queuecommand(struct scs
nsp32_msg(KERN_ERR, "SGT fail");
SCpnt->result = DID_ERROR << 16;
nsp32_scsi_done(SCpnt);
- return SCSI_MLQUEUE_HOST_BUSY;
+ return 0;
}
/* Build IDENTIFY */
@@ -1089,7 +1088,6 @@ static int nsp32_queuecommand(struct scs
if (ret != TRUE) {
nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "selection fail");
nsp32_scsi_done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
}
return 0;
===== drivers/scsi/aacraid/aachba.c 1.29 vs edited =====
--- 1.29/drivers/scsi/aacraid/aachba.c 2004-10-01 17:10:08 +02:00
+++ edited/drivers/scsi/aacraid/aachba.c 2004-11-18 23:10:40 +01:00
@@ -894,7 +894,7 @@ int aac_read(struct scsi_cmnd * scsicmd,
aac_io_done(scsicmd);
fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext);
- return -1;
+ return 0;
}
static int aac_write(struct scsi_cmnd * scsicmd, int cid)
@@ -928,7 +928,7 @@ static int aac_write(struct scsi_cmnd *
if (!(cmd_fibcontext = fib_alloc(dev))) {
scsicmd->result = DID_ERROR << 16;
aac_io_done(scsicmd);
- return -1;
+ return 0;
}
fib_init(cmd_fibcontext);
@@ -1004,7 +1004,7 @@ static int aac_write(struct scsi_cmnd *
fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext);
- return -1;
+ return 0;
}
===== drivers/scsi/megaraid/megaraid_mbox.c 1.9 vs edited =====
--- 1.9/drivers/scsi/megaraid/megaraid_mbox.c 2004-10-08 17:12:09 +02:00
+++ edited/drivers/scsi/megaraid/megaraid_mbox.c 2004-11-18 23:12:10 +01:00
@@ -1623,6 +1623,7 @@ megaraid_queue_command(struct scsi_cmnd
if (!scb) { // command already completed
done(scp);
+ return 0;
}
return if_busy;
===== drivers/scsi/pcmcia/nsp_cs.c 1.35 vs edited =====
--- 1.35/drivers/scsi/pcmcia/nsp_cs.c 2004-10-05 22:11:16 +02:00
+++ edited/drivers/scsi/pcmcia/nsp_cs.c 2004-11-19 09:36:39 +01:00
@@ -226,7 +226,7 @@ static int nsp_queuecommand(Scsi_Cmnd *S
nsp_msg(KERN_DEBUG, "CurrentSC!=NULL this can't be happen");
SCpnt->result = DID_BAD_TARGET << 16;
nsp_scsi_done(SCpnt);
- return SCSI_MLQUEUE_HOST_BUSY;
+ return 0;
}
#if 0
@@ -273,7 +273,7 @@ static int nsp_queuecommand(Scsi_Cmnd *S
nsp_dbg(NSP_DEBUG_QUEUECOMMAND, "selection fail");
SCpnt->result = DID_BUS_BUSY << 16;
nsp_scsi_done(SCpnt);
- return SCSI_MLQUEUE_DEVICE_BUSY;
+ return 0;
}
--
Jens Axboe