Hi, 2.4 seems to have problems scanning SCSI busses. It looks rather like it is scanning the first bus for every host that it finds. My dmesg is attached. In my dual-P3 box, I have three disks on the first channel of an on-board aic7xxx: $ cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: QUANTUM Model: ATLAS IV 9 WLS Rev: 0909 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 01 Lun: 00 Vendor: QUANTUM Model: ATLAS IV 9 WLS Rev: 0909 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 02 Lun: 00 Vendor: QUANTUM Model: ATLAS IV 9 WLS Rev: 0909 Type: Direct-Access ANSI SCSI revision: 03 and an old HP DAT, a CDROM and a CDRW on a Tekram 395. The driver works just fine under 2.2, but under 2.4test8, when I insmod it, it finds the first device (the HP DAT) and then hangs. SysRq-P seems to show that it's trying to register the DAT as a disk. "dmesg" (before - the box is well dead at this point) shows that once the software RAID sets are setup, it "finds" the three disks again and adds the as hdd, hde and hdf. /proc/scsi/scsi shows only three, but /proc/partitions shows six. More information is below in a correspondance that I had with the 395 driver author. Is this a familiar picture to anyone? Matthew. ---------- Forwarded message ---------- Date: Wed, 13 Sep 2000 15:41:36 +0100 (BST) From: Matthew Kirkwood <[EMAIL PROTECTED]> To: Kurt Garloff <[EMAIL PROTECTED]> Subject: Re: dc395 troubles Hi Kurt, Many thanks for the speedy reply. > > On a fresh build of 2.4test8, when I insmod the > > driver, the machine detects the card OK, finds the > > first device (an old HP DAT drive) and then hangs. > Arrgh! Can you do SysRq-P and find out what the machine is doing? I > know that the driver does have bugs, but those in the worst case do > lead to failed reconnections or similar, so commands time out ... OK. The output is (copied by hand, since I can't find a serial cable): DC395x (TRM-S1040) SCSI driver 1.27, 2000-05-23 DC395x: Used settings: AdaptID=7 DC395 : Connectors ext50 int50 Termination: Auto High DC395x (TRM-S1040): 1 adapters found scsi2: Tekram DC395U/UW/F DC315/U v1.27 2000-05-23 scsi : 3 hosts Vendor: HP .. bla bla etc etc Type: Sequential bla bla etc etc and then it's dead. SysRq-P finds three places where the kernel is looping. c0188a78-f1: (c0188a78 t sd_detect) c01ac394-a1: (c01ac018 t scan_scsis_single) and c01e28ab-b2: which System.map says is somewhere in c01e0c54 T stext_lock - maybe a stuck spinlock? While rebooting (again :-) I noticed something else broken, which makes me suspect a generic kernel bug, rather than a driver flaw. My dmesg is attached (sorry, too many RAID sets to be able to catch the very top of it), but here is the interesting bit: Detected scsi disk sdd at scsi0, channel 0, id 0, lun 0 Detected scsi disk sde at scsi0, channel 0, id 1, lun 0 Detected scsi disk sdf at scsi0, channel 0, id 2, lun 0 SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sdd: sdd1 sdd2 < sdd5 sdd6 sdd7 sdd8 sdd9 sdd10 sdd11 sdd12 > SCSI device sde: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sde: sde1 sde2 < sde5 sde6 sde7 sde8 sde9 sde10 sde11 sde12 > SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sdf: sdf1 sdf2 < sdf5 sdf6 sdf7 sdf8 sdf9 sdf10 sdf11 sdf12 > For reasons known only to itself, it is detecting the disks on the onboard aic7xxx's twice. They appear only once in /proc/scsi/scsi (0:0:0,, 0:1:0, 0:2:0) but multiple times in /proc/partitions (hda-c _and_ hdd-f). I guess the SCSI scanning is busted somehow. I shall see if I can't track it down. Matthew.
49 05 003 03 0 0 0 0 0 1 1 51 06 003 03 0 0 0 0 0 1 1 59 07 003 03 0 0 0 0 0 1 1 61 08 003 03 0 0 0 0 0 1 1 69 09 003 03 0 0 0 0 0 1 1 71 0a 003 03 0 0 0 0 0 1 1 79 0b 003 03 0 0 0 0 0 1 1 81 0c 003 03 0 0 0 0 0 1 1 89 0d 000 00 1 0 0 0 0 0 0 00 0e 003 03 0 0 0 0 0 1 1 91 0f 003 03 0 0 0 0 0 1 1 99 10 003 03 1 1 0 1 0 1 1 A1 11 003 03 1 1 0 1 0 1 1 A9 12 000 00 1 0 0 0 0 0 0 00 13 003 03 1 1 0 1 0 1 1 B1 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00 IRQ to pin mappings: IRQ0 -> 2 IRQ1 -> 1 IRQ3 -> 3 IRQ4 -> 4 IRQ5 -> 5 IRQ6 -> 6 IRQ7 -> 7 IRQ8 -> 8 IRQ9 -> 9 IRQ10 -> 10 IRQ11 -> 11 IRQ12 -> 12 IRQ13 -> 13 IRQ14 -> 14 IRQ15 -> 15 IRQ16 -> 16 IRQ17 -> 17 IRQ19 -> 19 .................................... done. calibrating APIC timer ... ..... CPU clock speed is 451.0688 MHz. ..... host bus clock speed is 100.2374 MHz. cpu: 0, clocks: 1002374, slice: 334124 CPU0<T0:1002368,T1:668240,D:4,S:334124,C:1002374> cpu: 1, clocks: 1002374, slice: 334124 CPU1<T0:1002368,T1:334112,D:8,S:334124,C:1002374> checking TSC synchronization across CPUs: passed. Setting commenced=1, go go go PCI: PCI BIOS revision 2.10 entry at 0xfdb91, last bus=1 PCI: Using configuration type 1 PCI: Probing PCI hardware PCI: Using IRQ router PIIX [8086/7110] at 00:07.0 PCI->APIC IRQ transform: (B0,I7,P3) -> 19 PCI->APIC IRQ transform: (B0,I9,P0) -> 16 PCI->APIC IRQ transform: (B0,I9,P1) -> 16 PCI->APIC IRQ transform: (B0,I14,P0) -> 16 PCI->APIC IRQ transform: (B0,I16,P0) -> 19 PCI->APIC IRQ transform: (B0,I18,P0) -> 16 PCI->APIC IRQ transform: (B1,I0,P0) -> 16 Limiting direct PCI/PCI transfers. Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP IP: routing cache hash table of 4096 buckets, 32Kbytes TCP: Hash tables configured (established 32768 bind 32768) apm: BIOS version 1.2 Flags 0x03 (Driver version 1.13) apm: disabled - APM is not SMP safe. ACPI: "AMI" found at 0x000fada0 ACPI: found platform errata 0x00000030 Starting kswapd v1.7 pty: 256 Unix98 ptys configured md driver 0.90.0 MAX_MD_DEVS=256, MAX_REAL=12 raid0 personality registered raid1 personality registered raid5 personality registered raid5: measuring checksumming speed raid5: KNI detected, trying cache-avoiding KNI checksum routine pIII_kni : 939.165 MB/sec raid5: MMX detected, trying high-speed MMX checksum routines pII_mmx : 1041.654 MB/sec p5_mmx : 1076.325 MB/sec 8regs : 537.591 MB/sec 32regs : 328.422 MB/sec using fastest function: pIII_kni (939.165 MB/sec) md.c: sizeof(mdp_super_t) = 4096 (scsi0) <Adaptec AIC-7895 Ultra SCSI host adapter> found at PCI 0/9/1 (scsi0) Wide Channel B, SCSI ID=7, 32/255 SCBs (scsi0) Downloading sequencer code... 383 instructions downloaded (scsi1) <Adaptec AIC-7895 Ultra SCSI host adapter> found at PCI 0/9/0 (scsi1) Wide Channel A, SCSI ID=7, 32/255 SCBs (scsi1) Downloading sequencer code... 383 instructions downloaded scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.1/5.2.0 <Adaptec AIC-7895 Ultra SCSI host adapter> scsi1 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.1/5.2.0 <Adaptec AIC-7895 Ultra SCSI host adapter> scsi : 2 hosts. (scsi0:0:0:0) Synchronous at 40.0 Mbyte/sec, offset 8. Vendor: QUANTUM Model: ATLAS IV 9 WLS Rev: 0909 Type: Direct-Access ANSI SCSI revision: 03 Detected scsi disk sda at scsi0, channel 0, id 0, lun 0 (scsi0:0:1:0) Synchronous at 40.0 Mbyte/sec, offset 8. Vendor: QUANTUM Model: ATLAS IV 9 WLS Rev: 0909 Type: Direct-Access ANSI SCSI revision: 03 Detected scsi disk sdb at scsi0, channel 0, id 1, lun 0 (scsi0:0:2:0) Synchronous at 40.0 Mbyte/sec, offset 8. Vendor: QUANTUM Model: ATLAS IV 9 WLS Rev: 0909 Type: Direct-Access ANSI SCSI revision: 03 Detected scsi disk sdc at scsi0, channel 0, id 2, lun 0 scsi : detected 3 SCSI disks total. SCSI device sda: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] Partition check: sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 > SCSI device sdb: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 > SCSI device sdc: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sdc: sdc1 sdc2 < sdc5 sdc6 sdc7 sdc8 sdc9 sdc10 sdc11 sdc12 > autodetecting RAID arrays (read) sda5's sb offset: 2104384 [events: 00000021] (read) sda8's sb offset: 530048 [events: 00000148] (read) sda11's sb offset: 136448 [events: 0000014d] (read) sdb1's sb offset: 2104384 [events: 00000021] (read) sdb5's sb offset: 1052160 [events: 00000148] (read) sdb6's sb offset: 1052160 [events: 00000146] (read) sdb7's sb offset: 530048 [events: 00000148] (read) sdb8's sb offset: 530048 [events: 00000148] (read) sdb9's sb offset: 530048 [events: 00000148] (read) sdb11's sb offset: 136448 [events: 0000014d] (read) sdc1's sb offset: 2104384 [events: 00000021] (read) sdc5's sb offset: 1052160 [events: 00000148] (read) sdc6's sb offset: 1052160 [events: 00000146] (read) sdc7's sb offset: 530048 [events: 00000148] (read) sdc8's sb offset: 530048 [events: 00000148] (read) sdc9's sb offset: 530048 [events: 00000148] (read) sdc11's sb offset: 136448 [events: 0000014d] autorun ... considering sdc11 ... adding sdc11 ... adding sdb11 ... adding sda11 ... created md0 bind<sda11,1> bind<sdb11,2> bind<sdc11,3> running: <sdc11><sdb11><sda11> now! sdc11's event counter: 0000014d sdb11's event counter: 0000014d sda11's event counter: 0000014d md: md0: raid array is not clean -- starting background reconstruction md0: max total readahead window set to 124k md0: 1 data-disks, max readahead per data-disk: 124k raid1: device sdc11 operational as mirror 2 raid1: device sdb11 operational as mirror 1 raid1: device sda11 operational as mirror 0 raid1: raid set md0 not clean; reconstructing mirrors raid1: raid set md0 active with 3 out of 3 mirrors md: updating md0 RAID superblock on device sdc11 [events: 0000014e](write) sdc11's sb offset: 136448 md: syncing RAID array md0 md: minimum _guaranteed_ reconstruction speed: 100 KB/sec/disc. md: using maximum available idle IO bandwith (but not more than 100000 KB/sec) for reconstruction. md: using 124k window, over a total of 136448 blocks. sdb11 [events: 0000014e](write) sdb11's sb offset: 136448 sda11 [events: 0000014e](write) sda11's sb offset: 136448 . considering sdc9 ... adding sdc9 ... adding sdb8 ... created md3 bind<sdb8,1> bind<sdc9,2> running: <sdc9><sdb8> now! sdc9's event counter: 00000148 sdb8's event counter: 00000148 md3: max total readahead window set to 512k md3: 2 data-disks, max readahead per data-disk: 256k raid0: looking at sdb8 raid0: comparing sdb8(530048) with sdb8(530048) raid0: END raid0: ==> UNIQUE raid0: 1 zones raid0: looking at sdc9 raid0: comparing sdc9(530048) with sdb8(530048) raid0: EQUAL raid0: FINAL 1 zones zone 0 checking sdb8 ... contained as device 0 (530048) is smallest!. checking sdc9 ... contained as device 1 zone->nb_dev: 2, size: 1060096 current zone offset: 530048 done. raid0 : md_size is 1060096 blocks. raid0 : conf->smallest->size is 1060096 blocks. raid0 : nb_zone is 1. raid0 : Allocating 8 bytes for hash. md: updating md3 RAID superblock on device sdc9 [events: 00000149](write) sdc9's sb offset: 530048 sdb8 [events: 00000149](write) sdb8's sb offset: 530048 . considering sdc8 ... adding sdc8 ... adding sdb7 ... created md2 bind<sdb7,1> bind<sdc8,2> running: <sdc8><sdb7> now! sdc8's event counter: 00000148 sdb7's event counter: 00000148 md2: max total readahead window set to 512k md2: 2 data-disks, max readahead per data-disk: 256k raid0: looking at sdb7 raid0: comparing sdb7(530048) with sdb7(530048) raid0: END raid0: ==> UNIQUE raid0: 1 zones raid0: looking at sdc8 raid0: comparing sdc8(530048) with sdb7(530048) raid0: EQUAL raid0: FINAL 1 zones zone 0 checking sdb7 ... contained as device 0 (530048) is smallest!. checking sdc8 ... contained as device 1 zone->nb_dev: 2, size: 1060096 current zone offset: 530048 done. raid0 : md_size is 1060096 blocks. raid0 : conf->smallest->size is 1060096 blocks. raid0 : nb_zone is 1. raid0 : Allocating 8 bytes for hash. md: updating md2 RAID superblock on device sdc8 [events: 00000149](write) sdc8's sb offset: 530048 sdb7 [events: 00000149](write) sdb7's sb offset: 530048 . considering sdc7 ... adding sdc7 ... adding sdb9 ... adding sda8 ... created md1 bind<sda8,1> bind<sdb9,2> bind<sdc7,3> running: <sdc7><sdb9><sda8> now! sdc7's event counter: 00000148 sdb9's event counter: 00000148 sda8's event counter: 00000148 md1: max total readahead window set to 768k md1: 3 data-disks, max readahead per data-disk: 256k raid0: looking at sda8 raid0: comparing sda8(530048) with sda8(530048) raid0: END raid0: ==> UNIQUE raid0: 1 zones raid0: looking at sdb9 raid0: comparing sdb9(530048) with sda8(530048) raid0: EQUAL raid0: looking at sdc7 raid0: comparing sdc7(530048) with sda8(530048) raid0: EQUAL raid0: FINAL 1 zones zone 0 checking sda8 ... contained as device 0 (530048) is smallest!. checking sdb9 ... contained as device 1 checking sdc7 ... contained as device 2 zone->nb_dev: 3, size: 1590144 current zone offset: 530048 done. raid0 : md_size is 1590144 blocks. raid0 : conf->smallest->size is 1590144 blocks. raid0 : nb_zone is 1. raid0 : Allocating 8 bytes for hash. md: updating md1 RAID superblock on device sdc7 [events: 00000149](write) sdc7's sb offset: 530048 sdb9 [events: 00000149](write) sdb9's sb offset: 530048 sda8 [events: 00000149](write) sda8's sb offset: 530048 . considering sdc6 ... adding sdc6 ... adding sdb6 ... created md6 bind<sdb6,1> bind<sdc6,2> running: <sdc6><sdb6> now! sdc6's event counter: 00000146 sdb6's event counter: 00000146 md6: max total readahead window set to 512k md6: 2 data-disks, max readahead per data-disk: 256k raid0: looking at sdb6 raid0: comparing sdb6(1052160) with sdb6(1052160) raid0: END raid0: ==> UNIQUE raid0: 1 zones raid0: looking at sdc6 raid0: comparing sdc6(1052160) with sdb6(1052160) raid0: EQUAL raid0: FINAL 1 zones zone 0 checking sdb6 ... contained as device 0 (1052160) is smallest!. checking sdc6 ... contained as device 1 zone->nb_dev: 2, size: 2104320 current zone offset: 1052160 done. raid0 : md_size is 2104320 blocks. raid0 : conf->smallest->size is 2104320 blocks. raid0 : nb_zone is 1. raid0 : Allocating 8 bytes for hash. md: updating md6 RAID superblock on device sdc6 [events: 00000147](write) sdc6's sb offset: 1052160 sdb6 [events: 00000147](write) sdb6's sb offset: 1052160 . considering sdc5 ... adding sdc5 ... adding sdb5 ... created md5 bind<sdb5,1> bind<sdc5,2> running: <sdc5><sdb5> now! sdc5's event counter: 00000148 sdb5's event counter: 00000148 md5: max total readahead window set to 512k md5: 2 data-disks, max readahead per data-disk: 256k raid0: looking at sdb5 raid0: comparing sdb5(1052160) with sdb5(1052160) raid0: END raid0: ==> UNIQUE raid0: 1 zones raid0: looking at sdc5 raid0: comparing sdc5(1052160) with sdb5(1052160) raid0: EQUAL raid0: FINAL 1 zones zone 0 checking sdb5 ... contained as device 0 (1052160) is smallest!. checking sdc5 ... contained as device 1 zone->nb_dev: 2, size: 2104320 current zone offset: 1052160 done. raid0 : md_size is 2104320 blocks. raid0 : conf->smallest->size is 2104320 blocks. raid0 : nb_zone is 1. raid0 : Allocating 8 bytes for hash. md: updating md5 RAID superblock on device sdc5 [events: 00000149](write) sdc5's sb offset: 1052160 sdb5 [events: 00000149](write) sdb5's sb offset: 1052160 . considering sdc1 ... adding sdc1 ... adding sdb1 ... adding sda5 ... created md4 bind<sda5,1> bind<sdb1,2> bind<sdc1,3> running: <sdc1><sdb1><sda5> now! sdc1's event counter: 00000021 sdb1's event counter: 00000021 sda5's event counter: 00000021 md4: max total readahead window set to 3072k md4: 3 data-disks, max readahead per data-disk: 1024k raid0: looking at sda5 raid0: comparing sda5(2104320) with sda5(2104320) raid0: END raid0: ==> UNIQUE raid0: 1 zones raid0: looking at sdb1 raid0: comparing sdb1(2104320) with sda5(2104320) raid0: EQUAL raid0: looking at sdc1 raid0: comparing sdc1(2104320) with sda5(2104320) raid0: EQUAL raid0: FINAL 1 zones zone 0 checking sda5 ... contained as device 0 (2104320) is smallest!. checking sdb1 ... contained as device 1 checking sdc1 ... contained as device 2 zone->nb_dev: 3, size: 6312960 current zone offset: 2104320 done. raid0 : md_size is 6312960 blocks. raid0 : conf->smallest->size is 6312960 blocks. raid0 : nb_zone is 1. raid0 : Allocating 8 bytes for hash. md: updating md4 RAID superblock on device sdc1 [events: 00000022](write) sdc1's sb offset: 2104384 sdb1 [events: 00000022](write) sdb1's sb offset: 2104384 sda5 [events: 00000022](write) sda5's sb offset: 2104384 . ... autorun DONE. Serial driver version 5.02 (2000-08-09) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled ttyS00 at 0x03f8 (irq = 4) is a 16550A ttyS01 at 0x02f8 (irq = 3) is a 16550A Detected scsi disk sdd at scsi0, channel 0, id 0, lun 0 Detected scsi disk sde at scsi0, channel 0, id 1, lun 0 Detected scsi disk sdf at scsi0, channel 0, id 2, lun 0 SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sdd: sdd1 sdd2 < sdd5 sdd6 sdd7 sdd8 sdd9 sdd10 sdd11 sdd12 > SCSI device sde: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sde: sde1 sde2 < sde5 sde6 sde7 sde8 sde9 sde10 sde11 sde12 > SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17942584 [8761 MB] [8.8 GB] sdf: sdf1 sdf2 < sdf5 sdf6 sdf7 sdf8 sdf9 sdf10 sdf11 sdf12 > VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 184k freed NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. Adding Swap: 265032k swap-space (priority -1) Adding Swap: 265032k swap-space (priority -2) Adding Swap: 265032k swap-space (priority -3) isapnp: Scanning for Pnp cards... isapnp: Calling quirk for 01:00 ISAPnP: SB audio device quirk - increasing port range isapnp: Calling quirk for 01:02 isapnp: AWE32 quirk - adding two ports isapnp: Card 'Creative SB32 PnP' isapnp: Card 'ESS ES1868 Plug and Play AudioDrive' isapnp: 2 Plug & Play cards detected total 3c59x.c:LK1.1.8 13 Aug 2000 Donald Becker and others. http://www.scyld.com/network/vortex.html $Revision: 1.102.2.25 $ See Documentation/networking/vortex.txt eth0: 3Com PCI 3c590 Vortex 10Mbps at 0xc800, 00:a0:24:6a:58:d7, IRQ 16 8K byte-wide RAM 1:1 Rx:Tx split, 10baseT interface. eth0: using default media 10baseT md: md0: sync done.