2005-05-16 09:03:40

by Gregoire Favre

[permalink] [raw]
Subject: What breaks aic7xxx in post 2.6.12-rc2 ?

Hello,

as I reported in
http://marc.theaimsgroup.com/?l=linux-kernel&m=111554477416794&w=2

I have lots of problem with aic7xxx (and till 2.6.12-rc2 everything
works perfectly). I have tried to compil 2.6.12-rc4-mm1 without probe
all Lun and it don't change anything at all to this problem.

I have two different controllers :

0000:00:05.0 SCSI storage controller: Adaptec AIC-7892A U160/m (rev 02)
0000:00:0a.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U

And I also use libsata.

Anyone got an idea on what's going wrong ?

Please CC to me : I am not on this mailinglist.
--
Gr?goire Favre


2005-05-16 15:06:30

by Jesper Juhl

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, 16 May 2005, Gr?goire Favre wrote:

> Hello,
>
> as I reported in
> http://marc.theaimsgroup.com/?l=linux-kernel&m=111554477416794&w=2
>
> I have lots of problem with aic7xxx (and till 2.6.12-rc2 everything
> works perfectly). I have tried to compil 2.6.12-rc4-mm1 without probe
> all Lun and it don't change anything at all to this problem.
>
> I have two different controllers :
>
> 0000:00:05.0 SCSI storage controller: Adaptec AIC-7892A U160/m (rev 02)
> 0000:00:0a.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U
>
> And I also use libsata.
>
> Anyone got an idea on what's going wrong ?
>
Not me, it works perfectly here, but then I have different hardware (but
using the aic7xxx driver).

Here's what 2.6.12-rc4-mm1 has to say about my devices :

[ 33.618922] scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
[ 33.618925] <Adaptec 29160N Ultra160 SCSI adapter>
[ 33.618927] aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
[ 33.618930]
[ 49.640570] (scsi0:A:4:0): refuses WIDE negotiation. Using 8bit transfers
[ 49.644190] Vendor: PIONEER Model: DVD-ROM DVD-305 Rev: 1.03
[ 49.646714] Type: CD-ROM ANSI SCSI revision: 02
[ 49.649172] target0:0:4: Beginning Domain Validation
[ 49.651858] (scsi0:A:4:0): refuses WIDE negotiation. Using 8bit transfers
[ 49.657561] target0:0:4: Domain Validation skipping write tests
[ 49.660414] (scsi0:A:4): 20.000MB/s transfers (20.000MHz, offset 16)
[ 49.665476] target0:0:4: Ending Domain Validation
[ 49.673599] Vendor: PLEXTOR Model: CD-R PX-W1210S Rev: 1.01
[ 49.676263] Type: CD-ROM ANSI SCSI revision: 02
[ 49.678814] target0:0:5: Beginning Domain Validation
[ 49.683510] target0:0:5: Domain Validation skipping write tests
[ 49.686322] (scsi0:A:5): 20.000MB/s transfers (20.000MHz, offset 16)
[ 49.690423] target0:0:5: Ending Domain Validation
[ 49.694849] Vendor: IBM Model: DDYS-T36950N Rev: S96H
[ 49.697572] Type: Direct-Access ANSI SCSI revision: 03
[ 49.700193] scsi0:A:6:0: Tagged Queuing enabled. Depth 250
[ 49.702793] target0:0:6: Beginning Domain Validation
[ 49.708229] WIDTH IS 1
[ 49.711280] (scsi0:A:6): 6.600MB/s transfers (16bit)
[ 49.718361] (scsi0:A:6): 80.000MB/s transfers (40.000MHz, offset 63, 16bit)
[ 49.730609] target0:0:6: Ending Domain Validation
[ 51.784340] SCSI device sda: 71687340 512-byte hdwr sectors (36704 MB)
[ 51.788211] SCSI device sda: drive cache: write back
[ 51.791748] SCSI device sda: 71687340 512-byte hdwr sectors (36704 MB)
[ 51.795598] SCSI device sda: drive cache: write back
[ 51.798176] sda: sda1 sda2 sda3 sda4
[ 51.817055] Attached scsi disk sda at scsi0, channel 0, id 6, lun 0
[ 51.821630] sr0: scsi3-mmc drive: 16x/40x cd/rw xa/form2 cdda tray
[ 51.824276] Uniform CD-ROM driver Revision: 3.20
[ 51.826937] Attached scsi CD-ROM sr0 at scsi0, channel 0, id 4, lun 0
[ 51.831792] sr1: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray
[ 51.834486] Attached scsi CD-ROM sr1 at scsi0, channel 0, id 5, lun 0


--
Jesper Juhl


2005-05-16 15:22:40

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ? (on amd64 ?)

On Mon, May 16, 2005 at 05:03:56PM +0200, Jesper Juhl wrote:

> Not me, it works perfectly here, but then I have different hardware (but
> using the aic7xxx driver).

You are lucky, maybe I should also mention that I am under x86_64 ?

Here under 2.6.12-rc2 :

ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16
ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec 29160B Ultra160 SCSI adapter>
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs

(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
(scsi0:A:15): 80.000MB/s transfers (40.000MHz DT, offset 63, 16bit)
Vendor: IBM Model: DDRS-39130D Rev: DC1B
Type: Direct-Access ANSI SCSI revision: 02
scsi0:A:0:0: Tagged Queuing enabled. Depth 253
Vendor: SEAGATE Model: ST336706LW Rev: 0108
Type: Direct-Access ANSI SCSI revision: 03
scsi0:A:15:0: Tagged Queuing enabled. Depth 253
scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec 2940 Ultra SCSI adapter>
aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs

(scsi1:A:1): 10.000MB/s transfers (10.000MHz, offset 15)
Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08
Type: CD-ROM ANSI SCSI revision: 02
(scsi1:A:2): 10.000MB/s transfers (10.000MHz, offset 8)
Vendor: PLEXTOR Model: CD-R PX-R820T Rev: 1.08
Type: CD-ROM ANSI SCSI revision: 02
(scsi1:A:3): 10.000MB/s transfers (10.000MHz, offset 8)
Vendor: PLEXTOR Model: CD-R PX-R820T Rev: 1.08
Type: CD-ROM ANSI SCSI revision: 02
libata version 1.10 loaded.
sata_via version 1.1
ACPI: PCI Interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 20
sata_via(0000:00:0f.0): routed to hard irq line 4
ata1: SATA max UDMA/133 cmd 0xE000 ctl 0xDC02 bmdma 0xD000 irq 20
ata2: SATA max UDMA/133 cmd 0xD800 ctl 0xD402 bmdma 0xD008 irq 20
ata1: no device found (phy stat 00000000)
scsi2 : sata_via
ata2: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4043 85:7c69 86:3e01 87:4043 88:407f
ata2: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48
ata2: dev 0 configured for UDMA/133
scsi3 : sata_via
Vendor: ATA Model: Maxtor 6B200M0 Rev: BANC
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 17850000 512-byte hdwr sectors (9139 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sdb: 71687370 512-byte hdwr sectors (36704 MB)
SCSI device sdb: drive cache: write back
SCSI device sdb: 71687370 512-byte hdwr sectors (36704 MB)
SCSI device sdb: drive cache: write back
sdb: sdb1 sdb2
Attached scsi disk sdb at scsi0, channel 0, id 15, lun 0
SCSI device sdc: 398297088 512-byte hdwr sectors (203928 MB)
SCSI device sdc: drive cache: write back
SCSI device sdc: 398297088 512-byte hdwr sectors (203928 MB)
SCSI device sdc: drive cache: write back
sdc: sdc1 sdc2
Attached scsi disk sdc at scsi3, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 32x/32x cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 1, lun 0
sr1: scsi3-mmc drive: 20x/20x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr1 at scsi1, channel 0, id 2, lun 0
sr2: scsi3-mmc drive: 20x/20x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr2 at scsi1, channel 0, id 3, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
Attached scsi generic sg1 at scsi0, channel 0, id 15, lun 0, type 0
Attached scsi generic sg2 at scsi1, channel 0, id 1, lun 0, type 5
Attached scsi generic sg3 at scsi1, channel 0, id 2, lun 0, type 5
Attached scsi generic sg4 at scsi1, channel 0, id 3, lun 0, type 5
Attached scsi generic sg5 at scsi3, channel 0, id 0, lun 0, type 0
usbmon: debugs is not available
ACPI: PCI Interrupt 0000:00:10.4[C] -> GSI 21 (level, low) -> IRQ 21
ehci_hcd 0000:00:10.4: VIA Technologies, Inc. USB 2.0
ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:10.4: irq 21, io mem 0xcfffe900
ehci_hcd 0000:00:10.4: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
USB Universal Host Controller Interface driver v2.2
ACPI: PCI Interrupt 0000:00:10.0[A] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:10.0: irq 21, io base 0x0000bc00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:10.1[A] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:10.1: irq 21, io base 0x0000c000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:10.2[B] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3)
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:10.2: irq 21, io base 0x0000c400
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:10.3[B] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.3: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#4)
uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:10.3: irq 21, io base 0x0000c800
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.

Anyone has aic7xxx working post 2.6.12-rc2 on amd64 ?

Thank you very much and please keep CC to me as I am not on this ml.
--
Gr?goire Favre

2005-05-16 15:30:28

by Jesper Juhl

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ? (on amd64 ?)

On Mon, 16 May 2005, Gr?goire Favre wrote:

> On Mon, May 16, 2005 at 05:03:56PM +0200, Jesper Juhl wrote:
>
> > Not me, it works perfectly here, but then I have different hardware (but
> > using the aic7xxx driver).
>
> You are lucky, maybe I should also mention that I am under x86_64 ?
>

Have you tried enabling some of the debug options and the options that
give you more verbose errors? That might help diagnose what wrong. Just a
guess, I don't know, but I'd try these options :

CONFIG_SCSI_CONSTANTS
CONFIG_SCSI_LOGGING
CONFIG_AIC7XXX_DEBUG_ENABLE
CONFIG_AIC7XXX_DEBUG_MASK
CONFIG_AIC7XXX_REG_PRETTY_PRINT

read the help for those options to see what they do and how to use them.


--
Jesper Juhl


2005-05-17 07:03:22

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?


Here's a me too report.

This is controller that I have

00:0e.0 SCSI storage controller: Adaptec AIC-7896U2/7897U2

I never used to get warning such as "refuses WIDE negotiation"
in kernels prior to 2.6.12-rc3-mm3.
The machine (x86) boots up fine though.

Here's the relevant dmesg output from 2.6.12-rc4-mm1

======================================================================

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec aic7896/97 Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs

Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
Type: Direct-Access ANSI SCSI revision: 02
scsi0:A:0:0: Tagged Queuing enabled. Depth 32
target0:0:0: Beginning Domain Validation
WIDTH IS 1
(scsi0:A:0): 6.600MB/s transfers (16bit)
target0:0:0: Domain Validation skipping write tests
(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
target0:0:0: Ending Domain Validation
Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
Type: Direct-Access ANSI SCSI revision: 02
scsi0:A:1:0: Tagged Queuing enabled. Depth 32
target0:0:1: Beginning Domain Validation
WIDTH IS 1
(scsi0:A:1): 6.600MB/s transfers (16bit)
target0:0:1: Domain Validation skipping write tests
(scsi0:A:1): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
target0:0:1: Ending Domain Validation
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers <============
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x85
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x36 SCBPTR = 0x0
SCSISIGI[0x46] ERROR[0x0] SCSIBUSL[0x3] LASTPHASE[0x40]
SCSISEQ[0x12] SBLKCTL[0xa] SCSIRATE[0x0] SEQCTL[0x10]
SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x40]
SSTAT3[0x0] SIMODE0[0x8] SIMODE1[0xac] SXFRCTL0[0x80]
DFCNTRL[0x28] DFSTATUS[0x80]
STACK: 0x0 0x160 0x176 0x83
SCB count = 4
Kernel NEXTQSCB = 3
Card NEXTQSCB = 3
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40] SCB_SCSIID[0xf7] SCB_LUN[0x0] SCB_TAG[0x2]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
Pending list:
2 SCB_CONTROL[0x40] SCB_SCSIID[0xf7] SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 2
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
scsi0: At time of recovery, card was not paused


======================================================================

2005-05-17 07:30:28

by Andrew Morton

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

Dinakar Guniguntala <[email protected]> wrote:
>
>
> Here's a me too report.

Better cc linux-scsi.

Are these bugs also present in 2.6.12-rc4?

> This is controller that I have
>
> 00:0e.0 SCSI storage controller: Adaptec AIC-7896U2/7897U2
>
> I never used to get warning such as "refuses WIDE negotiation"
> in kernels prior to 2.6.12-rc3-mm3.
> The machine (x86) boots up fine though.
>
> Here's the relevant dmesg output from 2.6.12-rc4-mm1
>
> ======================================================================
>
> scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
> <Adaptec aic7896/97 Ultra2 SCSI adapter>
> aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs
>
> Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> Type: Direct-Access ANSI SCSI revision: 02
> scsi0:A:0:0: Tagged Queuing enabled. Depth 32
> target0:0:0: Beginning Domain Validation
> WIDTH IS 1
> (scsi0:A:0): 6.600MB/s transfers (16bit)
> target0:0:0: Domain Validation skipping write tests
> (scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
> target0:0:0: Ending Domain Validation
> Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> Type: Direct-Access ANSI SCSI revision: 02
> scsi0:A:1:0: Tagged Queuing enabled. Depth 32
> target0:0:1: Beginning Domain Validation
> WIDTH IS 1
> (scsi0:A:1): 6.600MB/s transfers (16bit)
> target0:0:1: Domain Validation skipping write tests
> (scsi0:A:1): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
> target0:0:1: Ending Domain Validation
> (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers <============
> scsi0:0:15:0: Attempting to queue an ABORT message
> CDB: 0x12 0x0 0x0 0x0 0x36 0x0
> scsi0: At time of recovery, card was not paused
> >>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
> scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x85
> Card was paused
> ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
> HCNT = 0x36 SCBPTR = 0x0
> SCSISIGI[0x46] ERROR[0x0] SCSIBUSL[0x3] LASTPHASE[0x40]
> SCSISEQ[0x12] SBLKCTL[0xa] SCSIRATE[0x0] SEQCTL[0x10]
> SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x40]
> SSTAT3[0x0] SIMODE0[0x8] SIMODE1[0xac] SXFRCTL0[0x80]
> DFCNTRL[0x28] DFSTATUS[0x80]
> STACK: 0x0 0x160 0x176 0x83
> SCB count = 4
> Kernel NEXTQSCB = 3
> Card NEXTQSCB = 3
> QINFIFO entries:
> Waiting Queue entries:
> Disconnected Queue entries:
> QOUTFIFO entries:
> Sequencer Free SCB List: 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
> Sequencer SCB Info:
> 0 SCB_CONTROL[0x40] SCB_SCSIID[0xf7] SCB_LUN[0x0] SCB_TAG[0x2]
> 1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 16 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 17 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 18 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 19 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 20 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 21 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 22 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 23 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 24 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 25 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 26 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 27 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 28 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 29 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 30 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> 31 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> Pending list:
> 2 SCB_CONTROL[0x40] SCB_SCSIID[0xf7] SCB_LUN[0x0]
> Kernel Free SCB list: 1 0
> Untagged Q(15): 2
> DevQ(0:0:0): 0 waiting
> DevQ(0:1:0): 0 waiting
> DevQ(0:15:0): 0 waiting
>
> <<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
> scsi0:0:15:0: Device is active, asserting ATN
> Recovery code sleeping
> Recovery code awake
> Timer Expired
> aic7xxx_abort returns 0x2003
> scsi0:0:15:0: Attempting to queue a TARGET RESET message
> CDB: 0x12 0x0 0x0 0x0 0x36 0x0
> aic7xxx_dev_reset returns 0x2003
> Recovery SCB completes
> (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
> (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
> scsi0:0:15:0: Attempting to queue an ABORT message
> CDB: 0x12 0x0 0x0 0x0 0x36 0x0
> scsi0: At time of recovery, card was not paused
>
>
> ======================================================================
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2005-05-17 08:24:51

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 12:29:08AM -0700, Andrew Morton wrote:
> Better cc linux-scsi.

Thanks

> Are these bugs also present in 2.6.12-rc4?

Yes, I tried a vanilla 2.6.12-rc4 and I get the same output.
I get this from 2.6.12-rc3 onwards.

Maybe something from the following changeset of 2.6.12-rc3 ??

[email protected]:
[PATCH] finally fix 53c700 to use the generic iomem infrastructure
[PATCH] Convert i2o to compat_ioctl
[PATCH] Convert i2o to compat_ioctl
aic7xxx: add support for the SPI transport class
aic7xxx: convert to SPI transport class Domain Validation
lpfc: add Emulex FC driver version 8.0.28
qla2xxx: fix compiler warning in qla_attr.c
scsi: add DID_REQUEUE to the error handling
scsi: add DID_REQUEUE to the error handling
updates for CFQ oops fix
zfcp: add point-2-point support
zfcp: add point-2-point support


-Dinakar


> > This is controller that I have
> >
> > 00:0e.0 SCSI storage controller: Adaptec AIC-7896U2/7897U2
> >
> > I never used to get warning such as "refuses WIDE negotiation"
> > in kernels prior to 2.6.12-rc3-mm3.
> > The machine (x86) boots up fine though.
> >
> > Here's the relevant dmesg output from 2.6.12-rc4-mm1
> >
> > ======================================================================
> >
> > scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
> > <Adaptec aic7896/97 Ultra2 SCSI adapter>
> > aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs
> >
> > Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> > Type: Direct-Access ANSI SCSI revision: 02
> > scsi0:A:0:0: Tagged Queuing enabled. Depth 32
> > target0:0:0: Beginning Domain Validation
> > WIDTH IS 1
> > (scsi0:A:0): 6.600MB/s transfers (16bit)
> > target0:0:0: Domain Validation skipping write tests
> > (scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
> > target0:0:0: Ending Domain Validation
> > Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> > Type: Direct-Access ANSI SCSI revision: 02
> > scsi0:A:1:0: Tagged Queuing enabled. Depth 32
> > target0:0:1: Beginning Domain Validation
> > WIDTH IS 1
> > (scsi0:A:1): 6.600MB/s transfers (16bit)
> > target0:0:1: Domain Validation skipping write tests
> > (scsi0:A:1): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
> > target0:0:1: Ending Domain Validation
> > (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers <============
> > scsi0:0:15:0: Attempting to queue an ABORT message
> > CDB: 0x12 0x0 0x0 0x0 0x36 0x0
> > scsi0: At time of recovery, card was not paused
> > >>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
> > scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x85
> > Card was paused
> > ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
> > HCNT = 0x36 SCBPTR = 0x0
> > SCSISIGI[0x46] ERROR[0x0] SCSIBUSL[0x3] LASTPHASE[0x40]
> > SCSISEQ[0x12] SBLKCTL[0xa] SCSIRATE[0x0] SEQCTL[0x10]
> > SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x40]
> > SSTAT3[0x0] SIMODE0[0x8] SIMODE1[0xac] SXFRCTL0[0x80]
> > DFCNTRL[0x28] DFSTATUS[0x80]
> > STACK: 0x0 0x160 0x176 0x83
> > SCB count = 4
> > Kernel NEXTQSCB = 3
> > Card NEXTQSCB = 3
> > QINFIFO entries:
> > Waiting Queue entries:
> > Disconnected Queue entries:
> > QOUTFIFO entries:
> > Sequencer Free SCB List: 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
> > Sequencer SCB Info:
> > 0 SCB_CONTROL[0x40] SCB_SCSIID[0xf7] SCB_LUN[0x0] SCB_TAG[0x2]
> > 1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 16 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 17 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 18 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 19 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 20 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 21 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 22 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 23 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 24 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 25 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 26 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 27 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 28 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 29 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 30 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > 31 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]
> > Pending list:
> > 2 SCB_CONTROL[0x40] SCB_SCSIID[0xf7] SCB_LUN[0x0]
> > Kernel Free SCB list: 1 0
> > Untagged Q(15): 2
> > DevQ(0:0:0): 0 waiting
> > DevQ(0:1:0): 0 waiting
> > DevQ(0:15:0): 0 waiting
> >
> > <<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
> > scsi0:0:15:0: Device is active, asserting ATN
> > Recovery code sleeping
> > Recovery code awake
> > Timer Expired
> > aic7xxx_abort returns 0x2003
> > scsi0:0:15:0: Attempting to queue a TARGET RESET message
> > CDB: 0x12 0x0 0x0 0x0 0x36 0x0
> > aic7xxx_dev_reset returns 0x2003
> > Recovery SCB completes
> > (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
> > (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
> > scsi0:0:15:0: Attempting to queue an ABORT message
> > CDB: 0x12 0x0 0x0 0x0 0x36 0x0
> > scsi0: At time of recovery, card was not paused
> >
> >
> > ======================================================================

2005-05-17 14:34:57

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-17 at 00:29 -0700, Andrew Morton wrote:
> Better cc linux-scsi.

Always a wise thing to do for SCSI failure reports.

> > target0:0:1: Ending Domain Validation
> > (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers <============
> > scsi0:0:15:0: Attempting to queue an ABORT message
> > CDB: 0x12 0x0 0x0 0x0 0x36 0x0

Actually, this isn't a me too. The previous one looks like some strange
DV failure. This is a problem with the initial inquiry. What's the
device at target 15?

James


2005-05-17 16:07:19

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 09:34:25AM -0500, James Bottomley wrote:

> Actually, this isn't a me too. The previous one looks like some strange
> DV failure. This is a problem with the initial inquiry. What's the
> device at target 15?

On this controler I have :

Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DDRS-39130D Rev: DC1B
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 15 Lun: 00
Vendor: SEAGATE Model: ST336706LW Rev: 0108
Type: Direct-Access ANSI SCSI revision: 03

Should I change anything in the BIOS ?

Thank you, and please keep CC to me as I am not on this ml :-)
--
Gr?goire Favre

2005-05-17 16:38:57

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-17 at 17:57 +0200, Gr?goire Favre wrote:
> On this controler I have :
>
> Host: scsi0 Channel: 00 Id: 00 Lun: 00
> Vendor: IBM Model: DDRS-39130D Rev: DC1B
> Type: Direct-Access ANSI SCSI revision: 02
> Host: scsi0 Channel: 00 Id: 15 Lun: 00
> Vendor: SEAGATE Model: ST336706LW Rev: 0108
> Type: Direct-Access ANSI SCSI revision: 03

Erm, that doesn't square with the bug report:

> Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> Type: Direct-Access ANSI SCSI revision: 02
> scsi0:A:0:0: Tagged Queuing enabled. Depth 32
[...]
> Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> Type: Direct-Access ANSI SCSI revision: 02
> scsi0:A:1:0: Tagged Queuing enabled. Depth 32

James

2005-05-17 16:53:07

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 11:38:34AM -0500, James Bottomley wrote:
> On Tue, 2005-05-17 at 17:57 +0200, Gr?goire Favre wrote:
> > On this controler I have :
> >
> > Host: scsi0 Channel: 00 Id: 00 Lun: 00
> > Vendor: IBM Model: DDRS-39130D Rev: DC1B
> > Type: Direct-Access ANSI SCSI revision: 02
> > Host: scsi0 Channel: 00 Id: 15 Lun: 00
> > Vendor: SEAGATE Model: ST336706LW Rev: 0108
> > Type: Direct-Access ANSI SCSI revision: 03
>
> Erm, that doesn't square with the bug report:
>
> > Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> > Type: Direct-Access ANSI SCSI revision: 02
> > scsi0:A:0:0: Tagged Queuing enabled. Depth 32
> [...]
> > Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
> > Type: Direct-Access ANSI SCSI revision: 02
> > scsi0:A:1:0: Tagged Queuing enabled. Depth 32

Well,

I just did some copy, and I didn't swap hardware ???

What does that mean ?
--
Gr?goire Favre

2005-05-17 17:00:04

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 09:34:25AM -0500, James Bottomley wrote:
> > > target0:0:1: Ending Domain Validation
> > > (scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers <============
> > > scsi0:0:15:0: Attempting to queue an ABORT message
> > > CDB: 0x12 0x0 0x0 0x0 0x36 0x0
>
> Actually, this isn't a me too. The previous one looks like some strange
> DV failure. This is a problem with the initial inquiry. What's the
> device at target 15?

Not sure what is it that you want, but here is the lspci -vv
(It is a IBM x370 box)

00:0e.0 SCSI storage controller: Adaptec AIC-7896U2/7897U2
Subsystem: Adaptec: Unknown device 080f
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 100 (9750ns min, 6250ns max), cache line size 08
Interrupt: pin A routed to IRQ 51
BIST result: 00
Region 0: I/O ports at 2200 [disabled] [size=256]
Region 1: Memory at f9ffd000 (64-bit, non-prefetchable) [size=4K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-


And here is the output when it boots up fine without the warnings on 2.6.12-rc2

May 9 12:03:32 llm09 kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
May 9 12:03:32 llm09 kernel: <Adaptec aic7896/97 Ultra2 SCSI adapter>
May 9 12:03:32 llm09 kernel: aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs
May 9 12:03:32 llm09 kernel:
May 9 12:03:32 llm09 kernel: (scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
May 9 12:03:32 llm09 kernel: Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
May 9 12:03:32 llm09 kernel: Type: Direct-Access ANSI SCSI revision: 02
May 9 12:03:32 llm09 kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
May 9 12:03:32 llm09 kernel: ACPI: No ACPI bus support for 0:0:0:0
May 9 12:03:32 llm09 kernel: (scsi0:A:1): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
May 9 12:03:32 llm09 kernel: Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
May 9 12:03:32 llm09 kernel: Type: Direct-Access ANSI SCSI revision: 02
May 9 12:03:32 llm09 kernel: scsi0:A:1:0: Tagged Queuing enabled. Depth 32
May 9 12:03:32 llm09 kernel: ACPI: No ACPI bus support for 0:0:1:0
May 9 12:03:32 llm09 kernel: Vendor: IBM CORP Model: GEM312 V002 Rev: 4.1b
May 9 12:03:32 llm09 kernel: Type: Processor ANSI SCSI revision: 02
May 9 12:03:32 llm09 kernel: ACPI: No ACPI bus support for 0:0:15:0
May 9 12:03:32 llm09 kernel: scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
May 9 12:03:32 llm09 kernel: <Adaptec aic7896/97 Ultra2 SCSI adapter>
May 9 12:03:33 llm09 kernel: aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs
May 9 12:03:33 llm09 kernel:
May 9 12:03:33 llm09 kernel: SCSI device sda: 17774160 512-byte hdwr sectors (9100 MB)
May 9 12:03:33 llm09 kernel: SCSI device sda: drive cache: write through
May 9 12:03:33 llm09 kernel: SCSI device sda: 17774160 512-byte hdwr sectors (9100 MB)
May 9 12:03:33 llm09 kernel: SCSI device sda: drive cache: write through
May 9 12:03:33 llm09 kernel: sda: sda1 sda2 sda3
May 9 12:03:33 llm09 kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
May 9 12:03:33 llm09 kernel: SCSI device sdb: 17774160 512-byte hdwr sectors (9100 MB)
May 9 12:03:33 llm09 kernel: SCSI device sdb: drive cache: write through
May 9 12:03:33 llm09 kernel: SCSI device sdb: 17774160 512-byte hdwr sectors (9100 MB)
May 9 12:03:33 llm09 kernel: SCSI device sdb: drive cache: write through
May 9 12:03:33 llm09 kernel: sdb: sdb1
May 9 12:03:33 llm09 kernel: Attached scsi disk sdb at scsi0, channel 0, id 1, lun 0
May 9 12:03:33 llm09 kernel: Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
May 9 12:03:33 llm09 kernel: Attached scsi generic sg1 at scsi0, channel 0, id 1, lun 0, type 0
May 9 12:03:33 llm09 kernel: Attached scsi generic sg2 at scsi0, channel 0, id 15, lun 0, type 3


Hope this helps

-Dinakar

2005-05-17 18:16:24

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-17 at 18:52 +0200, Gr?goire Favre wrote:
> I just did some copy, and I didn't swap hardware ???
>
> What does that mean ?

I think the bug report that Andrew forwarded to linux-scsi with the
above Subject: is from [email protected] (at least, his information
matches the trace).

James


2005-05-17 18:35:29

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-17 at 22:38 +0530, Dinakar Guniguntala wrote:
> May 9 12:03:32 llm09 kernel: Vendor: IBM CORP Model: GEM312 V002 Rev: 4.1b
> May 9 12:03:32 llm09 kernel: Type: Processor ANSI SCSI revision: 02

OK, that's roughly what I was expecting. These processor chips tend to
be rather basic when it comes to rates and widths.

The root cause, I think, is that the aic7xxx isn't starting out at async
narrow for the first inquiry (because the original DV code I removed did
this, and I didn't add an equivalent back). The latest aic7xxx patch
should sort this out.

So, to get all of these changes, could you start with vanilla linus
kernel 2.6.12-rc4 (or tree based on this, but not -mm which already has
some of the SCSI tree included) and then apply the SCSI patch at

http://parisc-linux.org/~jejb/scsi_diffs/scsi-misc-2.6.diff

and see if it works?

Thanks,

James


2005-05-17 19:32:12

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 01:34:53PM -0500, James Bottomley wrote:

> So, to get all of these changes, could you start with vanilla linus
> kernel 2.6.12-rc4 (or tree based on this, but not -mm which already has
> some of the SCSI tree included) and then apply the SCSI patch at
>
> http://parisc-linux.org/~jejb/scsi_diffs/scsi-misc-2.6.diff
>
> and see if it works?

Well, it don't... I send you a private mail with a picture I take a boot
time.

Thank,
--
Gr?goire Favre

2005-05-17 19:51:41

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-17 at 21:26 +0200, Gr?goire Favre wrote:
> Well, it don't... I send you a private mail with a picture I take a boot
> time.

Right, but the problem I think it will fix is the initial inquiry being
sent with the wrong transport parameters.

You have a different problem, I think ... it looks like your Toshiba DVD
does somthing strange during Domain Validation ... the question I don't
have an answer to yet, is what.

James


2005-05-17 19:56:56

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 02:50:31PM -0500, James Bottomley wrote:

> Right, but the problem I think it will fix is the initial inquiry being
> sent with the wrong transport parameters.
>
> You have a different problem, I think ... it looks like your Toshiba DVD
> does somthing strange during Domain Validation ... the question I don't
> have an answer to yet, is what.

Oh, sorry, thank you for the patch :-)
--
Gr?goire Favre

2005-05-17 21:06:57

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-17 at 21:56 +0200, Gr?goire Favre wrote:
> On Tue, May 17, 2005 at 02:50:31PM -0500, James Bottomley wrote:
>
> > Right, but the problem I think it will fix is the initial inquiry being
> > sent with the wrong transport parameters.
> >
> > You have a different problem, I think ... it looks like your Toshiba DVD
> > does somthing strange during Domain Validation ... the question I don't
> > have an answer to yet, is what.
>
> Oh, sorry, thank you for the patch :-)

Well, the attached is what I'd like you to try, capturing the
information from the initial inquiry on ... it will be quite a bit.

Hopefully it will give me a clearer idea of what's going on.

Thanks,

James

--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -669,14 +669,23 @@ spi_dv_retrain(struct scsi_request *sreq
{
struct spi_internal *i = to_spi_internal(sreq->sr_host->transportt);
struct scsi_device *sdev = sreq->sr_device;
+ struct scsi_target *starget = sdev->sdev_target;
int period = 0, prevperiod = 0;
enum spi_compare_returns retval;


for (;;) {
int newperiod;
+
retval = compare_fn(sreq, buffer, ptr, DV_LOOPS);

+ if(i->f->get_period)
+ i->f->get_period(starget);
+ if (i->f->get_offset)
+ i->f->get_offset(starget);
+
+ spi_display_xfer_agreement(starget);
+
if (retval == SPI_COMPARE_SUCCESS
|| retval == SPI_COMPARE_SKIP_TEST)
break;
@@ -765,6 +774,8 @@ spi_dv_device_internal(struct scsi_reque
/* first set us up for narrow async */
DV_SET(offset, 0);
DV_SET(width, 0);
+
+ printk("BEGINNING ASYNC, inq len = %d\n", sdev->inquiry_len);

if (spi_dv_device_compare_inquiry(sreq, buffer, buffer, DV_LOOPS)
!= SPI_COMPARE_SUCCESS) {
@@ -773,11 +784,13 @@ spi_dv_device_internal(struct scsi_reque
return;
}

+ printk("ASYNC INQUIRY SUCCEEDED\n");
+
/* test width */
if (i->f->set_width && spi_max_width(starget) && sdev->wdtr) {
i->f->set_width(sdev->sdev_target, 1);

- printk("WIDTH IS %d\n", spi_max_width(starget));
+ printk("TRYING WIDE ASYNC INQUIRY\n");

if (spi_dv_device_compare_inquiry(sreq, buffer,
buffer + len,
@@ -802,12 +815,17 @@ spi_dv_device_internal(struct scsi_reque
if (sdev->ppr)
len = spi_dv_device_get_echo_buffer(sreq, buffer);

+ printk("ECHO BUFFER HAS LEN %d\n", len);
+
retry:

/* now set up to the maximum */
DV_SET(offset, spi_max_offset(starget));
DV_SET(period, spi_min_period(starget));

+ printk("DV SETTING TO period %d, offset %d\n", spi_min_period(starget),
+ spi_max_offset(starget));
+
if (len == 0) {
SPI_PRINTK(sdev->sdev_target, KERN_INFO, "Domain Validation skipping write tests\n");
spi_dv_retrain(sreq, buffer, buffer + len,


2005-05-17 22:15:29

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 04:06:11PM -0500, James Bottomley wrote:

> Well, the attached is what I'd like you to try, capturing the
> information from the initial inquiry on ... it will be quite a bit.
>
> Hopefully it will give me a clearer idea of what's going on.

Could I just take some pictures of the boot process and send them to
you ?

Or is there any way to use an usb palm to catch the console output ?

Thank you very much,
--
Gr?goire Favre

2005-05-17 22:56:24

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Wed, 2005-05-18 at 00:09 +0200, Gr?goire Favre wrote:
> Could I just take some pictures of the boot process and send them to
> you ?

Not really, the messages I need will be embedded in a lot of other
output and will likely scroll off the screen

> Or is there any way to use an usb palm to catch the console output ?

If it has a serial port, sure, just use a serial console.

If it doesn't, try removing the DVD during boot, then plug it back in
again and trigger a device add

echo scsi add-single-device <n> 0 1 0 > /proc/scsi/scsi

where <n> is whatever SCSI number the rest of your CD-ROM's appear on
(it was 1 in your first trace).

James


2005-05-18 08:57:39

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 01:34:53PM -0500, James Bottomley wrote:
> The root cause, I think, is that the aic7xxx isn't starting out at async
> narrow for the first inquiry (because the original DV code I removed did
> this, and I didn't add an equivalent back). The latest aic7xxx patch
> should sort this out.
>
> So, to get all of these changes, could you start with vanilla linus
> kernel 2.6.12-rc4 (or tree based on this, but not -mm which already has
> some of the SCSI tree included) and then apply the SCSI patch at
>
> http://parisc-linux.org/~jejb/scsi_diffs/scsi-misc-2.6.diff
>
> and see if it works?

It works !! Thanks.

So are these patches getting into -mm first or -rc5 ??

-Dinakar

2005-05-18 14:14:31

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Wed, 2005-05-18 at 14:37 +0530, Dinakar Guniguntala wrote:
> It works !! Thanks.
>
> So are these patches getting into -mm first or -rc5 ??

Damn, I knew you were going to ask that ... the problem is it's the last
in a long line of invasive adaptec patches that sit in my scsi-misc-2.6
tree ... I suppose we can't have the aic driver slightly hosed for
2.6.12; I'll see if I can extract them.

James


2005-05-18 15:04:40

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Wed, May 18, 2005 at 09:12:39AM -0500, James Bottomley wrote:
> >
> > So are these patches getting into -mm first or -rc5 ??
>
> Damn, I knew you were going to ask that ... the problem is it's the last
> in a long line of invasive adaptec patches that sit in my scsi-misc-2.6
> tree ... I suppose we can't have the aic driver slightly hosed for
> 2.6.12; I'll see if I can extract them.
>

You actually thought you could get away with that ?? :)

Seriously, scsi takes a long time to boot even normally, but with this
bug, it takes forever and a few more retries before it finally boots up.

I would really appreciate if you could extract and send them upstream,
Thanks

-Dinakar

2005-05-19 03:08:10

by K.R. Foley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
> On Tue, 2005-05-17 at 22:38 +0530, Dinakar Guniguntala wrote:
>
>>May 9 12:03:32 llm09 kernel: Vendor: IBM CORP Model: GEM312 V002 Rev: 4.1b
>>May 9 12:03:32 llm09 kernel: Type: Processor ANSI SCSI revision: 02
>
>
> OK, that's roughly what I was expecting. These processor chips tend to
> be rather basic when it comes to rates and widths.
>
> The root cause, I think, is that the aic7xxx isn't starting out at async
> narrow for the first inquiry (because the original DV code I removed did
> this, and I didn't add an equivalent back). The latest aic7xxx patch
> should sort this out.
>
> So, to get all of these changes, could you start with vanilla linus
> kernel 2.6.12-rc4 (or tree based on this, but not -mm which already has
> some of the SCSI tree included) and then apply the SCSI patch at
>
> http://parisc-linux.org/~jejb/scsi_diffs/scsi-misc-2.6.diff
>
> and see if it works?
>
> Thanks,
>
> James
>

James,

This also solves my problem that I reported in this thread
http://marc.theaimsgroup.com/?l=linux-scsi&m=111422854418964&w=2

--
kr

2005-05-19 04:25:04

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Wed, 2005-05-18 at 22:07 -0500, K.R. Foley wrote:
> This also solves my problem that I reported in this thread
> http://marc.theaimsgroup.com/?l=linux-scsi&m=111422854418964&w=2

OK, I think the patch below is the extract of this. Could you see if it
works by simply patching vanilla 2.6.12-rc4 with no other SCSI patches
(if it does, I'll push it for 2.6.12 final).

James

--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2300,6 +2300,30 @@ ahc_linux_alloc_target(struct ahc_softc
targ->target = target;
targ->ahc = ahc;
ahc->platform_data->targets[target_offset] = targ;
+
+ /* FIXME: This code is just for a bug workaround in 2.6.12
+ * The correct fix will be in 2.6.13 */
+ {
+ struct ahc_devinfo devinfo;
+ struct ahc_initiator_tinfo *tinfo;
+ struct ahc_tmode_tstate *tstate;
+ char my_channel = channel + 'A';
+ unsigned int our_id = ahc->our_id;
+
+ if (channel)
+ our_id = ahc->our_id_b;
+
+ tinfo = ahc_fetch_transinfo(ahc, my_channel, ahc->our_id,
+ targ->target, &tstate);
+ ahc_compile_devinfo(&devinfo, our_id, targ->target,
+ CAM_LUN_WILDCARD, my_channel,
+ ROLE_INITIATOR);
+ ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0,
+ AHC_TRANS_GOAL, /*paused*/FALSE);
+ ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
+ AHC_TRANS_GOAL, /*paused*/FALSE);
+ }
+
return (targ);
}



2005-05-19 09:44:56

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Wed, May 18, 2005 at 11:23:50PM -0500, James Bottomley wrote:
>
> OK, I think the patch below is the extract of this. Could you see if it
> works by simply patching vanilla 2.6.12-rc4 with no other SCSI patches
> (if it does, I'll push it for 2.6.12 final).
>

This doesn't seem to fix the problem :(
I tried both 2.6.12-rc4+patch and 2.6.4-rc4-mm1+patch

This is what I get

===========================================================================

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec aic7896/97 Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs

Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
Type: Direct-Access ANSI SCSI revision: 02
scsi0:A:0:0: Tagged Queuing enabled. Depth 32
target0:0:0: Beginning Domain Validation
(scsi0:A:0): 6.600MB/s transfers (16bit)
target0:0:0: Domain Validation skipping write tests
(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
target0:0:0: Ending Domain Validation
Vendor: IBM-PSG Model: ST39103LC !# Rev: B227
Type: Direct-Access ANSI SCSI revision: 02
scsi0:A:1:0: Tagged Queuing enabled. Depth 32
target0:0:1: Beginning Domain Validation
(scsi0:A:1): 6.600MB/s transfers (16bit)
target0:0:1: Domain Validation skipping write tests
(scsi0:A:1): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
target0:0:1: Ending Domain Validation
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x1a1
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x36 SCBPTR = 0x0
SCSISIGI[0x46]:(REQI|BSYI|IOI) ERROR[0x0] SCSIBUSL[0x3]
LASTPHASE[0x40]:(IOI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
SEQ_FLAGS[0x20]:(DPHASE) SSTAT0[0x0] SSTAT1[0x2]:(PHASECHG)
SSTAT2[0x40]:(SHVALID) SSTAT3[0x0] SIMODE0[0x8]:(ENSWRAP)
SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO)
SXFRCTL0[0x80]:(DFON) DFCNTRL[0x28]:(HDMAEN|SCSIEN)
DFSTATUS[0x80]:(PRELOAD_AVAIL)
STACK: 0x83 0x0 0x160 0x176
SCB count = 4
Kernel NEXTQSCB = 3
Card NEXTQSCB = 3
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0] SCB_TAG[0x2]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
Pending list:
2 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 2
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x85
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x36 SCBPTR = 0x0
SCSISIGI[0x46]:(REQI|BSYI|IOI) ERROR[0x0] SCSIBUSL[0x3]
LASTPHASE[0x40]:(IOI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
SEQ_FLAGS[0x20]:(DPHASE) SSTAT0[0x0] SSTAT1[0x2]:(PHASECHG)
SSTAT2[0x40]:(SHVALID) SSTAT3[0x0] SIMODE0[0x8]:(ENSWRAP)
SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO)
SXFRCTL0[0x80]:(DFON) DFCNTRL[0x28]:(HDMAEN|SCSIEN)
DFSTATUS[0x80]:(PRELOAD_AVAIL)
STACK: 0x83 0x160 0x176 0x83
SCB count = 4
Kernel NEXTQSCB = 2
Card NEXTQSCB = 2
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0] SCB_TAG[0x3]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
Pending list:
3 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 3
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x54
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x36 SCBPTR = 0x0
SCSISIGI[0x46]:(REQI|BSYI|IOI) ERROR[0x0] SCSIBUSL[0x3]
LASTPHASE[0x40]:(IOI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
SEQ_FLAGS[0x20]:(DPHASE) SSTAT0[0x0] SSTAT1[0x2]:(PHASECHG)
SSTAT2[0x40]:(SHVALID) SSTAT3[0x0] SIMODE0[0x8]:(ENSWRAP)
SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO)
SXFRCTL0[0x80]:(DFON) DFCNTRL[0x28]:(HDMAEN|SCSIEN)
DFSTATUS[0x80]:(PRELOAD_AVAIL)
STACK: 0x83 0x83 0x160 0x176
SCB count = 4
Kernel NEXTQSCB = 3
Card NEXTQSCB = 3
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0] SCB_TAG[0x2]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
Pending list:
2 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 2
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x36 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi scan: 54 byte inquiry failed. Consider BLIST_INQUIRY_36 for this device
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x24 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x84
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x24 SCBPTR = 0x0
SCSISIGI[0x46]:(REQI|BSYI|IOI) ERROR[0x0] SCSIBUSL[0x3]
LASTPHASE[0x40]:(IOI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
SEQ_FLAGS[0x20]:(DPHASE) SSTAT0[0x0] SSTAT1[0x2]:(PHASECHG)
SSTAT2[0x40]:(SHVALID) SSTAT3[0x0] SIMODE0[0x8]:(ENSWRAP)
SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO)
SXFRCTL0[0x80]:(DFON) DFCNTRL[0x28]:(HDMAEN|SCSIEN)
DFSTATUS[0x80]:(PRELOAD_AVAIL)
STACK: 0x83 0x160 0x176 0x83
SCB count = 4
Kernel NEXTQSCB = 2
Card NEXTQSCB = 2
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0] SCB_TAG[0x3]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
Pending list:
3 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 3
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x24 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x24 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x54
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x24 SCBPTR = 0x0
SCSISIGI[0x46]:(REQI|BSYI|IOI) ERROR[0x0] SCSIBUSL[0x3]
LASTPHASE[0x40]:(IOI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
SEQ_FLAGS[0x20]:(DPHASE) SSTAT0[0x0] SSTAT1[0x2]:(PHASECHG)
SSTAT2[0x40]:(SHVALID) SSTAT3[0x0] SIMODE0[0x8]:(ENSWRAP)
SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO)
SXFRCTL0[0x80]:(DFON) DFCNTRL[0x28]:(HDMAEN|SCSIEN)
DFSTATUS[0x80]:(PRELOAD_AVAIL)
STACK: 0x83 0x83 0x160 0x176
SCB count = 4
Kernel NEXTQSCB = 3
Card NEXTQSCB = 3
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0] SCB_TAG[0x2]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
Pending list:
2 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 2
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x24 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi0:0:15:0: Attempting to queue an ABORT message
CDB: 0x12 0x0 0x0 0x0 0x24 0x0
scsi0: At time of recovery, card was not paused
>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
scsi0: Dumping Card State in Data-in phase, at SEQADDR 0x54
Card was paused
ACCUM = 0x40, SINDEX = 0xa, DINDEX = 0xe4, ARG_2 = 0x0
HCNT = 0x24 SCBPTR = 0x0
SCSISIGI[0x46]:(REQI|BSYI|IOI) ERROR[0x0] SCSIBUSL[0x3]
LASTPHASE[0x40]:(IOI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
SEQ_FLAGS[0x20]:(DPHASE) SSTAT0[0x0] SSTAT1[0x2]:(PHASECHG)
SSTAT2[0x40]:(SHVALID) SSTAT3[0x0] SIMODE0[0x8]:(ENSWRAP)
SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO)
SXFRCTL0[0x80]:(DFON) DFCNTRL[0x28]:(HDMAEN|SCSIEN)
DFSTATUS[0x80]:(PRELOAD_AVAIL)
STACK: 0x83 0x83 0x160 0x176
SCB count = 4
Kernel NEXTQSCB = 2
Card NEXTQSCB = 2
QINFIFO entries:
Waiting Queue entries:
Disconnected Queue entries:
QOUTFIFO entries:
Sequencer Free SCB List: 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
Sequencer SCB Info:
0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0] SCB_TAG[0x3]
1 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
Pending list:
3 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0xf7]:(TWIN_CHNLB|TWIN_TID)
SCB_LUN[0x0]
Kernel Free SCB list: 1 0
Untagged Q(15): 3
DevQ(0:0:0): 0 waiting
DevQ(0:1:0): 0 waiting
DevQ(0:15:0): 0 waiting

<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
scsi0:0:15:0: Device is active, asserting ATN
Recovery code sleeping
Recovery code awake
Timer Expired
aic7xxx_abort returns 0x2003
scsi0:0:15:0: Attempting to queue a TARGET RESET message
CDB: 0x12 0x0 0x0 0x0 0x24 0x0
aic7xxx_dev_reset returns 0x2003
Recovery SCB completes
(scsi0:A:15:0): refuses WIDE negotiation. Using 8bit transfers
scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec aic7896/97 Ultra2 SCSI adapter>
aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs

SCSI device sda: 17774160 512-byte hdwr sectors (9100 MB)
SCSI device sda: drive cache: write through
SCSI device sda: 17774160 512-byte hdwr sectors (9100 MB)
SCSI device sda: drive cache: write through
sda: sda1 sda2 sda3
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sdb: 17774160 512-byte hdwr sectors (9100 MB)
SCSI device sdb: drive cache: write through
SCSI device sdb: 17774160 512-byte hdwr sectors (9100 MB)
SCSI device sdb: drive cache: write through
sdb: sdb1
Attached scsi disk sdb at scsi0, channel 0, id 1, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
Attached scsi generic sg1 at scsi0, channel 0, id 1, lun 0, type 0

===========================================================================

2005-05-19 11:28:20

by K.R. Foley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
> On Wed, 2005-05-18 at 22:07 -0500, K.R. Foley wrote:
>
>>This also solves my problem that I reported in this thread
>>http://marc.theaimsgroup.com/?l=linux-scsi&m=111422854418964&w=2
>
>
> OK, I think the patch below is the extract of this. Could you see if it
> works by simply patching vanilla 2.6.12-rc4 with no other SCSI patches
> (if it does, I'll push it for 2.6.12 final).
>
> James
<snip>

James,

Below is what I get WHEN IT BOOTS. There are also a couple more logs and
notes in between.

#########################################################################
May 19 06:04:22 porky kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 06:04:22 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 06:04:22 porky kernel: aic7899: Ultra160 Wide Channel A,
SCSI Id=7, 32/253 SCBs
May 19 06:04:22 porky kernel:
May 19 06:04:22 porky kernel: Vendor: QUANTUM Model:
ATLAS10K2-TY092L Rev: DA40
May 19 06:04:22 porky kernel: Type: Direct-Access
ANSI SCSI revision: 03
May 19 06:04:22 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
May 19 06:04:22 porky kernel: target0:0:0: Beginning Domain Validation
May 19 06:04:22 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
May 19 06:04:22 porky kernel: (scsi0:A:0): 80.000MB/s transfers
(40.000MHz, offset 127, 16bit)
May 19 06:04:22 porky kernel: target0:0:0: Ending Domain Validation
May 19 06:04:22 porky kernel: scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 06:04:22 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 06:04:22 porky kernel: aic7899: Ultra160 Wide Channel B,
SCSI Id=7, 32/253 SCBs
May 19 06:04:22 porky kernel:
May 19 06:04:22 porky kernel: Vendor: SEAGATE Model: SX118273LC
Rev: 6679
May 19 06:04:22 porky kernel: Type: Direct-Access
ANSI SCSI revision: 02
May 19 06:04:22 porky kernel: scsi1:A:0:0: Tagged Queuing enabled. Depth 32
May 19 06:04:22 porky kernel: target1:0:0: Beginning Domain Validation
May 19 06:04:22 porky kernel: (scsi1:A:0): 6.600MB/s transfers (16bit)
May 19 06:04:22 porky kernel: (scsi1:A:0:0): parity error detected in
Data-in phase. SEQADDR(0x1a6) SCSIRATE(0x80)
May 19 06:04:22 porky kernel: (scsi1:A:0:0): parity error detected in
Message-in phase. SEQADDR(0x1a6) SCSIRATE(0x80)
May 19 06:04:22 porky kernel: (scsi1:A:0:0): Unexpected busfree in
Message-out phase
May 19 06:04:22 porky kernel: SEQADDR == 0x16b
May 19 06:04:22 porky kernel: target1:0:0: Wide Transfers Fail
May 19 06:04:22 porky kernel: (scsi1:A:0): 3.300MB/s transfers
May 19 06:04:22 porky kernel: target1:0:0: Domain Validation skipping
write tests
May 19 06:04:22 porky kernel: (scsi1:A:0): 20.000MB/s transfers
(20.000MHz, offset 15)
May 19 06:04:22 porky kernel: target1:0:0: Ending Domain Validation
May 19 06:04:22 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 06:04:22 porky kernel: SCSI device sda: drive cache: write back
May 19 06:04:22 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 06:04:22 porky kernel: SCSI device sda: drive cache: write back
May 19 06:04:22 porky kernel: sda: sda1 sda2 sda3
May 19 06:04:22 porky kernel: Attached scsi disk sda at scsi0, channel
0, id 0, lun 0
May 19 06:04:22 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 19 06:04:22 porky kernel: SCSI device sdb: drive cache: write through
May 19 06:04:22 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 19 06:04:22 porky kernel: SCSI device sdb: drive cache: write through
May 19 01:04:03 porky rc.sysinit: -e
May 19 06:04:22 porky kernel: sdb: sdb1
May 19 01:04:04 porky udevsend[1251]: starting udevd daemon
May 19 06:04:22 porky kernel: Attached scsi disk sdb at scsi1, channel
0, id 0, lun 0
May 19 01:04:05 porky scsi.agent[1263]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.0/host0/target0:0:0/0:0:0:0
May 19 06:04:23 porky kernel: Attached scsi generic sg0 at scsi0,
channel 0, id 0, lun 0, type 0
May 19 01:04:05 porky scsi.agent[1288]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.1/host1/target1:0:0/1:0:0:0
May 19 06:04:23 porky kernel: Attached scsi generic sg1 at scsi1,
channel 0, id 0, lun 0, type 0

###############################################################################

Even with the patch that you posted last night something still isn't
quite right. Notice in the output below that the faster drive is setup
at 80MB/s instead of 160MB/s. It's like going back to the days before
U160 stuff worked properly :)

###############################################################################
May 18 21:56:25 porky kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 18 21:56:25 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 18 21:56:25 porky kernel: aic7899: Ultra160 Wide Channel A,
SCSI Id=7, 32/253 SCBs
May 18 21:56:25 porky kernel:
May 18 21:56:25 porky kernel: Vendor: QUANTUM Model:
ATLAS10K2-TY092L Rev: DA40
May 18 21:56:25 porky kernel: Type: Direct-Access
ANSI SCSI revision: 03
May 18 21:56:25 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
May 18 21:56:25 porky kernel: target0:0:0: Beginning Domain Validation
May 18 21:56:25 porky kernel: WIDTH IS 1
May 18 21:56:25 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
May 18 21:56:25 porky kernel: (scsi0:A:0): 80.000MB/s transfers
(40.000MHz, offset 127, 16bit)
May 18 21:56:25 porky kernel: target0:0:0: Ending Domain Validation
May 18 21:56:25 porky kernel: scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 18 21:56:25 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 18 21:56:25 porky kernel: aic7899: Ultra160 Wide Channel B,
SCSI Id=7, 32/253 SCBs
May 18 21:56:25 porky kernel:
May 18 21:56:25 porky kernel: Vendor: SEAGATE Model: SX118273LC
Rev: 6679
May 18 21:56:25 porky kernel: Type: Direct-Access
ANSI SCSI revision: 02
May 18 21:56:25 porky kernel: scsi1:A:0:0: Tagged Queuing enabled. Depth 32
May 18 21:56:25 porky kernel: target1:0:0: Beginning Domain Validation
May 18 21:56:25 porky kernel: target1:0:0: Domain Validation skipping
write tests
May 18 21:56:25 porky kernel: (scsi1:A:0): 20.000MB/s transfers
(20.000MHz, offset 15)
May 18 21:56:25 porky kernel: target1:0:0: Ending Domain Validation
May 18 21:56:25 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 18 21:56:25 porky kernel: SCSI device sda: drive cache: write back
May 18 21:56:25 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 18 21:56:25 porky kernel: SCSI device sda: drive cache: write back
May 18 21:56:25 porky kernel: sda: sda1 sda2 sda3
May 18 21:56:25 porky kernel: Attached scsi disk sda at scsi0, channel
0, id 0, lun 0
May 18 21:56:25 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 18 21:56:25 porky kernel: SCSI device sdb: drive cache: write through
May 18 16:56:04 porky rc.sysinit: -e
May 18 21:56:25 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 18 16:56:06 porky udevsend[1281]: starting udevd daemon
May 18 21:56:25 porky kernel: SCSI device sdb: drive cache: write through
May 18 16:56:06 porky scsi.agent[1293]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.0/host0/target0:0:0/0:0:0:0
May 18 21:56:25 porky kernel: sdb: sdb1
May 18 16:56:06 porky scsi.agent[1318]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.1/host1/target1:0:0/1:0:0:0
May 18 21:56:25 porky kernel: Attached scsi disk sdb at scsi1, channel
0, id 0, lun 0
May 18 16:56:06 porky udevsend[1334]: starting udevd daemon
May 18 21:56:25 porky kernel: Attached scsi generic sg0 at scsi0,
channel 0, id 0, lun 0, type 0
May 18 16:56:11 porky start_udev: Starting udev: succeeded
May 18 21:56:25 porky kernel: Attached scsi generic sg1 at scsi1,
channel 0, id 0, lun 0, type 0

#################################################################################

And then finally the output this morning of booting 2.6.12-rc2 (with RT
patches applied, which is irrelevant to this conversation). This one
does properly setup all of the drives.

#################################################################################
May 19 05:52:00 porky kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 05:52:00 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 05:52:00 porky kernel: aic7899: Ultra160 Wide Channel A,
SCSI Id=7, 32/253 SCBs
May 19 05:52:00 porky kernel:
May 19 05:52:00 porky kernel: (scsi0:A:0): 160.000MB/s transfers
(80.000MHz DT, offset 127, 16bit)
May 19 05:52:00 porky kernel: Vendor: QUANTUM Model:
ATLAS10K2-TY092L Rev: DA40
May 19 05:52:00 porky kernel: Type: Direct-Access
ANSI SCSI revision: 03
May 19 05:52:00 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
May 19 05:52:00 porky kernel: scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 05:52:00 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 05:52:00 porky kernel: aic7899: Ultra160 Wide Channel B,
SCSI Id=7, 32/253 SCBs
May 19 05:52:00 porky kernel:
May 19 05:52:00 porky kernel: (scsi1:A:0): 20.000MB/s transfers
(20.000MHz, offset 15)
May 19 05:52:00 porky kernel: Vendor: SEAGATE Model: SX118273LC
Rev: 6679
May 19 05:52:00 porky netfs: Mounting other filesystems: succeeded
May 19 05:52:00 porky kernel: Type: Direct-Access
ANSI SCSI revision: 02
May 19 05:52:00 porky kernel: scsi1:A:0:0: Tagged Queuing enabled. Depth 32
May 19 05:52:00 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 05:52:00 porky kernel: SCSI device sda: drive cache: write back
May 19 05:52:00 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 05:52:00 porky kernel: SCSI device sda: drive cache: write back
May 19 05:52:00 porky kernel: sda: sda1 sda2 sda3
May 19 05:52:00 porky kernel: Attached scsi disk sda at scsi0, channel
0, id 0, lun 0


--
kr

2005-05-20 00:13:34

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-19 at 15:21 +0530, Dinakar Guniguntala wrote:
> This doesn't seem to fix the problem :(
> I tried both 2.6.12-rc4+patch and 2.6.4-rc4-mm1+patch

Well ... great, it doesn't work for anyone, sigh.

OK, could you try this one (also against vanilla 2.6.12-rc4). Hopefully
it's a rollup of all the aic7xxx changes plus the necessary supporting
infrastructure in my scsi-misc tree.

If it works, trying to get it into a patch set for Linus is going to be
a right pain ...

James

--- a/drivers/scsi/aic7xxx/aic7770_osm.c
+++ b/drivers/scsi/aic7xxx/aic7770_osm.c
@@ -41,7 +41,6 @@

#include "aic7xxx_osm.h"

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#include <linux/device.h>
#include <linux/eisa.h>

@@ -62,13 +61,6 @@ static struct eisa_driver aic7770_driver
};

typedef struct device *aic7770_dev_t;
-#else
-#define MINSLOT 1
-#define NUMSLOTS 16
-#define IDOFFSET 0x80
-
-typedef void *aic7770_dev_t;
-#endif

static int aic7770_linux_config(struct aic7770_identity *entry,
aic7770_dev_t dev, u_int eisaBase);
@@ -76,7 +68,6 @@ static int aic7770_linux_config(struct a
int
ahc_linux_eisa_init(void)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
struct eisa_device_id *eid;
struct aic7770_identity *id;
int i;
@@ -110,44 +101,6 @@ ahc_linux_eisa_init(void)
eid->sig[0] = 0;

return eisa_driver_register(&aic7770_driver);
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
- struct aic7770_identity *entry;
- u_int slot;
- u_int eisaBase;
- u_int i;
- int ret = -ENODEV;
-
- if (aic7xxx_probe_eisa_vl == 0)
- return ret;
-
- eisaBase = 0x1000 + AHC_EISA_SLOT_OFFSET;
- for (slot = 1; slot < NUMSLOTS; eisaBase+=0x1000, slot++) {
- uint32_t eisa_id;
- size_t id_size;
-
- if (request_region(eisaBase, AHC_EISA_IOSIZE, "aic7xxx") == 0)
- continue;
-
- eisa_id = 0;
- id_size = sizeof(eisa_id);
- for (i = 0; i < 4; i++) {
- /* VLcards require priming*/
- outb(0x80 + i, eisaBase + IDOFFSET);
- eisa_id |= inb(eisaBase + IDOFFSET + i)
- << ((id_size-i-1) * 8);
- }
- release_region(eisaBase, AHC_EISA_IOSIZE);
- if (eisa_id & 0x80000000)
- continue; /* no EISA card in slot */
-
- entry = aic7770_find_device(eisa_id);
- if (entry != NULL) {
- aic7770_linux_config(entry, NULL, eisaBase);
- ret = 0;
- }
- }
- return ret;
-#endif
}

void
@@ -187,11 +140,10 @@ aic7770_linux_config(struct aic7770_iden
ahc_free(ahc);
return (error);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+
dev->driver_data = (void *)ahc;
if (aic7xxx_detect_complete)
error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
-#endif
return (error);
}

@@ -225,7 +177,6 @@ aic7770_map_int(struct ahc_softc *ahc, u
return (-error);
}

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static int
aic7770_eisa_dev_probe(struct device *dev)
{
@@ -261,4 +212,3 @@ aic7770_eisa_dev_remove(struct device *d

return (0);
}
-#endif
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -134,11 +134,6 @@ static struct scsi_transport_template *a
#include "aiclib.c"

#include <linux/init.h> /* __setup */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "sd.h" /* For geometry detection */
-#endif
-
#include <linux/mm.h> /* For fetching system memory size */
#include <linux/blkdev.h> /* For block_size() */
#include <linux/delay.h> /* For ssleep/msleep */
@@ -148,11 +143,6 @@ static struct scsi_transport_template *a
*/
spinlock_t ahc_list_spinlock;

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-/* For dynamic sglist size calculation. */
-u_int ahc_linux_nseg;
-#endif
-
/*
* Set this to the delay in seconds after SCSI bus reset.
* Note, we honor this only for the initial bus reset.
@@ -436,15 +426,12 @@ static void ahc_linux_handle_scsi_status
struct ahc_linux_device *,
struct scb *);
static void ahc_linux_queue_cmd_complete(struct ahc_softc *ahc,
- Scsi_Cmnd *cmd);
+ struct scsi_cmnd *cmd);
static void ahc_linux_sem_timeout(u_long arg);
static void ahc_linux_freeze_simq(struct ahc_softc *ahc);
static void ahc_linux_release_simq(u_long arg);
-static void ahc_linux_dev_timed_unfreeze(u_long arg);
-static int ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
+static int ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag);
static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
-static void ahc_linux_size_nseg(void);
-static void ahc_linux_thread_run_complete_queue(struct ahc_softc *ahc);
static u_int ahc_linux_user_tagdepth(struct ahc_softc *ahc,
struct ahc_devinfo *devinfo);
static void ahc_linux_device_queue_depth(struct ahc_softc *ahc,
@@ -458,54 +445,27 @@ static struct ahc_linux_device* ahc_linu
u_int);
static void ahc_linux_free_device(struct ahc_softc*,
struct ahc_linux_device*);
-static void ahc_linux_run_device_queue(struct ahc_softc*,
- struct ahc_linux_device*);
+static int ahc_linux_run_command(struct ahc_softc*,
+ struct ahc_linux_device *,
+ struct scsi_cmnd *);
static void ahc_linux_setup_tag_info_global(char *p);
static aic_option_callback_t ahc_linux_setup_tag_info;
static int aic7xxx_setup(char *s);
static int ahc_linux_next_unit(void);
-static void ahc_runq_tasklet(unsigned long data);
-static struct ahc_cmd *ahc_linux_run_complete_queue(struct ahc_softc *ahc);

/********************************* Inlines ************************************/
-static __inline void ahc_schedule_runq(struct ahc_softc *ahc);
static __inline struct ahc_linux_device*
ahc_linux_get_device(struct ahc_softc *ahc, u_int channel,
- u_int target, u_int lun, int alloc);
-static __inline void ahc_schedule_completeq(struct ahc_softc *ahc);
-static __inline void ahc_linux_check_device_queue(struct ahc_softc *ahc,
- struct ahc_linux_device *dev);
-static __inline struct ahc_linux_device *
- ahc_linux_next_device_to_run(struct ahc_softc *ahc);
-static __inline void ahc_linux_run_device_queues(struct ahc_softc *ahc);
+ u_int target, u_int lun);
static __inline void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*);

static __inline int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
struct ahc_dma_seg *sg,
dma_addr_t addr, bus_size_t len);

-static __inline void
-ahc_schedule_completeq(struct ahc_softc *ahc)
-{
- if ((ahc->platform_data->flags & AHC_RUN_CMPLT_Q_TIMER) == 0) {
- ahc->platform_data->flags |= AHC_RUN_CMPLT_Q_TIMER;
- ahc->platform_data->completeq_timer.expires = jiffies;
- add_timer(&ahc->platform_data->completeq_timer);
- }
-}
-
-/*
- * Must be called with our lock held.
- */
-static __inline void
-ahc_schedule_runq(struct ahc_softc *ahc)
-{
- tasklet_schedule(&ahc->platform_data->runq_tasklet);
-}
-
static __inline struct ahc_linux_device*
ahc_linux_get_device(struct ahc_softc *ahc, u_int channel, u_int target,
- u_int lun, int alloc)
+ u_int lun)
{
struct ahc_linux_target *targ;
struct ahc_linux_device *dev;
@@ -515,102 +475,15 @@ ahc_linux_get_device(struct ahc_softc *a
if (channel != 0)
target_offset += 8;
targ = ahc->platform_data->targets[target_offset];
- if (targ == NULL) {
- if (alloc != 0) {
- targ = ahc_linux_alloc_target(ahc, channel, target);
- if (targ == NULL)
- return (NULL);
- } else
- return (NULL);
- }
+ BUG_ON(targ == NULL);
dev = targ->devices[lun];
- if (dev == NULL && alloc != 0)
- dev = ahc_linux_alloc_device(ahc, targ, lun);
- return (dev);
-}
-
-#define AHC_LINUX_MAX_RETURNED_ERRORS 4
-static struct ahc_cmd *
-ahc_linux_run_complete_queue(struct ahc_softc *ahc)
-{
- struct ahc_cmd *acmd;
- u_long done_flags;
- int with_errors;
-
- with_errors = 0;
- ahc_done_lock(ahc, &done_flags);
- while ((acmd = TAILQ_FIRST(&ahc->platform_data->completeq)) != NULL) {
- Scsi_Cmnd *cmd;
-
- if (with_errors > AHC_LINUX_MAX_RETURNED_ERRORS) {
- /*
- * Linux uses stack recursion to requeue
- * commands that need to be retried. Avoid
- * blowing out the stack by "spoon feeding"
- * commands that completed with error back
- * the operating system in case they are going
- * to be retried. "ick"
- */
- ahc_schedule_completeq(ahc);
- break;
- }
- TAILQ_REMOVE(&ahc->platform_data->completeq,
- acmd, acmd_links.tqe);
- cmd = &acmd_scsi_cmd(acmd);
- cmd->host_scribble = NULL;
- if (ahc_cmd_get_transaction_status(cmd) != DID_OK
- || (cmd->result & 0xFF) != SCSI_STATUS_OK)
- with_errors++;
-
- cmd->scsi_done(cmd);
- }
- ahc_done_unlock(ahc, &done_flags);
- return (acmd);
-}
-
-static __inline void
-ahc_linux_check_device_queue(struct ahc_softc *ahc,
- struct ahc_linux_device *dev)
-{
- if ((dev->flags & AHC_DEV_FREEZE_TIL_EMPTY) != 0
- && dev->active == 0) {
- dev->flags &= ~AHC_DEV_FREEZE_TIL_EMPTY;
- dev->qfrozen--;
- }
-
- if (TAILQ_FIRST(&dev->busyq) == NULL
- || dev->openings == 0 || dev->qfrozen != 0)
- return;
-
- ahc_linux_run_device_queue(ahc, dev);
-}
-
-static __inline struct ahc_linux_device *
-ahc_linux_next_device_to_run(struct ahc_softc *ahc)
-{
-
- if ((ahc->flags & AHC_RESOURCE_SHORTAGE) != 0
- || (ahc->platform_data->qfrozen != 0))
- return (NULL);
- return (TAILQ_FIRST(&ahc->platform_data->device_runq));
-}
-
-static __inline void
-ahc_linux_run_device_queues(struct ahc_softc *ahc)
-{
- struct ahc_linux_device *dev;
-
- while ((dev = ahc_linux_next_device_to_run(ahc)) != NULL) {
- TAILQ_REMOVE(&ahc->platform_data->device_runq, dev, links);
- dev->flags &= ~AHC_DEV_ON_RUN_LIST;
- ahc_linux_check_device_queue(ahc, dev);
- }
+ return dev;
}

static __inline void
ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb)
{
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;

cmd = scb->io_ctx;
ahc_sync_sglist(ahc, scb, BUS_DMASYNC_POSTWRITE);
@@ -650,109 +523,15 @@ ahc_linux_map_seg(struct ahc_softc *ahc,
return (consumed);
}

-/************************ Host template entry points *************************/
-static int ahc_linux_detect(Scsi_Host_Template *);
-static int ahc_linux_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
-static const char *ahc_linux_info(struct Scsi_Host *);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-static int ahc_linux_slave_alloc(Scsi_Device *);
-static int ahc_linux_slave_configure(Scsi_Device *);
-static void ahc_linux_slave_destroy(Scsi_Device *);
-#if defined(__i386__)
-static int ahc_linux_biosparam(struct scsi_device*,
- struct block_device*,
- sector_t, int[]);
-#endif
-#else
-static int ahc_linux_release(struct Scsi_Host *);
-static void ahc_linux_select_queue_depth(struct Scsi_Host *host,
- Scsi_Device *scsi_devs);
-#if defined(__i386__)
-static int ahc_linux_biosparam(Disk *, kdev_t, int[]);
-#endif
-#endif
-static int ahc_linux_bus_reset(Scsi_Cmnd *);
-static int ahc_linux_dev_reset(Scsi_Cmnd *);
-static int ahc_linux_abort(Scsi_Cmnd *);
-
-/*
- * Calculate a safe value for AHC_NSEG (as expressed through ahc_linux_nseg).
- *
- * In pre-2.5.X...
- * The midlayer allocates an S/G array dynamically when a command is issued
- * using SCSI malloc. This array, which is in an OS dependent format that
- * must later be copied to our private S/G list, is sized to house just the
- * number of segments needed for the current transfer. Since the code that
- * sizes the SCSI malloc pool does not take into consideration fragmentation
- * of the pool, executing transactions numbering just a fraction of our
- * concurrent transaction limit with list lengths aproaching AHC_NSEG will
- * quickly depleat the SCSI malloc pool of usable space. Unfortunately, the
- * mid-layer does not properly handle this scsi malloc failures for the S/G
- * array and the result can be a lockup of the I/O subsystem. We try to size
- * our S/G list so that it satisfies our drivers allocation requirements in
- * addition to avoiding fragmentation of the SCSI malloc pool.
- */
-static void
-ahc_linux_size_nseg(void)
-{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- u_int cur_size;
- u_int best_size;
-
- /*
- * The SCSI allocator rounds to the nearest 512 bytes
- * an cannot allocate across a page boundary. Our algorithm
- * is to start at 1K of scsi malloc space per-command and
- * loop through all factors of the PAGE_SIZE and pick the best.
- */
- best_size = 0;
- for (cur_size = 1024; cur_size <= PAGE_SIZE; cur_size *= 2) {
- u_int nseg;
-
- nseg = cur_size / sizeof(struct scatterlist);
- if (nseg < AHC_LINUX_MIN_NSEG)
- continue;
-
- if (best_size == 0) {
- best_size = cur_size;
- ahc_linux_nseg = nseg;
- } else {
- u_int best_rem;
- u_int cur_rem;
-
- /*
- * Compare the traits of the current "best_size"
- * with the current size to determine if the
- * current size is a better size.
- */
- best_rem = best_size % sizeof(struct scatterlist);
- cur_rem = cur_size % sizeof(struct scatterlist);
- if (cur_rem < best_rem) {
- best_size = cur_size;
- ahc_linux_nseg = nseg;
- }
- }
- }
-#endif
-}
-
/*
* Try to detect an Adaptec 7XXX controller.
*/
static int
-ahc_linux_detect(Scsi_Host_Template *template)
+ahc_linux_detect(struct scsi_host_template *template)
{
struct ahc_softc *ahc;
int found = 0;

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- /*
- * It is a bug that the upper layer takes
- * this lock just prior to calling us.
- */
- spin_unlock_irq(&io_request_lock);
-#endif
-
/*
* Sanity checking of Linux SCSI data structures so
* that some of our hacks^H^H^H^H^Hassumptions aren't
@@ -764,7 +543,6 @@ ahc_linux_detect(Scsi_Host_Template *tem
printf("ahc_linux_detect: Unable to attach\n");
return (0);
}
- ahc_linux_size_nseg();
/*
* If we've been passed any parameters, process them now.
*/
@@ -793,48 +571,11 @@ ahc_linux_detect(Scsi_Host_Template *tem
found++;
}

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- spin_lock_irq(&io_request_lock);
-#endif
aic7xxx_detect_complete++;

return (found);
}

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-/*
- * Free the passed in Scsi_Host memory structures prior to unloading the
- * module.
- */
-int
-ahc_linux_release(struct Scsi_Host * host)
-{
- struct ahc_softc *ahc;
- u_long l;
-
- ahc_list_lock(&l);
- if (host != NULL) {
-
- /*
- * We should be able to just perform
- * the free directly, but check our
- * list for extra sanity.
- */
- ahc = ahc_find_softc(*(struct ahc_softc **)host->hostdata);
- if (ahc != NULL) {
- u_long s;
-
- ahc_lock(ahc, &s);
- ahc_intr_enable(ahc, FALSE);
- ahc_unlock(ahc, &s);
- ahc_free(ahc);
- }
- }
- ahc_list_unlock(&l);
- return (0);
-}
-#endif
-
/*
* Return a string describing the driver.
*/
@@ -867,11 +608,10 @@ ahc_linux_info(struct Scsi_Host *host)
* Queue an SCB to the controller.
*/
static int
-ahc_linux_queue(Scsi_Cmnd * cmd, void (*scsi_done) (Scsi_Cmnd *))
+ahc_linux_queue(struct scsi_cmnd * cmd, void (*scsi_done) (struct scsi_cmnd *))
{
struct ahc_softc *ahc;
struct ahc_linux_device *dev;
- u_long flags;

ahc = *(struct ahc_softc **)cmd->device->host->hostdata;

@@ -880,205 +620,149 @@ ahc_linux_queue(Scsi_Cmnd * cmd, void (*
*/
cmd->scsi_done = scsi_done;

- ahc_midlayer_entrypoint_lock(ahc, &flags);
-
/*
* Close the race of a command that was in the process of
* being queued to us just as our simq was frozen. Let
* DV commands through so long as we are only frozen to
* perform DV.
*/
- if (ahc->platform_data->qfrozen != 0) {
+ if (ahc->platform_data->qfrozen != 0)
+ return SCSI_MLQUEUE_HOST_BUSY;

- ahc_cmd_set_transaction_status(cmd, CAM_REQUEUE_REQ);
- ahc_linux_queue_cmd_complete(ahc, cmd);
- ahc_schedule_completeq(ahc);
- ahc_midlayer_entrypoint_unlock(ahc, &flags);
- return (0);
- }
dev = ahc_linux_get_device(ahc, cmd->device->channel, cmd->device->id,
- cmd->device->lun, /*alloc*/TRUE);
- if (dev == NULL) {
- ahc_cmd_set_transaction_status(cmd, CAM_RESRC_UNAVAIL);
- ahc_linux_queue_cmd_complete(ahc, cmd);
- ahc_schedule_completeq(ahc);
- ahc_midlayer_entrypoint_unlock(ahc, &flags);
- printf("%s: aic7xxx_linux_queue - Unable to allocate device!\n",
- ahc_name(ahc));
- return (0);
- }
+ cmd->device->lun);
+ BUG_ON(dev == NULL);
+
cmd->result = CAM_REQ_INPROG << 16;
- TAILQ_INSERT_TAIL(&dev->busyq, (struct ahc_cmd *)cmd, acmd_links.tqe);
- if ((dev->flags & AHC_DEV_ON_RUN_LIST) == 0) {
- TAILQ_INSERT_TAIL(&ahc->platform_data->device_runq, dev, links);
- dev->flags |= AHC_DEV_ON_RUN_LIST;
- ahc_linux_run_device_queues(ahc);
- }
- ahc_midlayer_entrypoint_unlock(ahc, &flags);
- return (0);
+
+ return ahc_linux_run_command(ahc, dev, cmd);
}

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static int
-ahc_linux_slave_alloc(Scsi_Device *device)
+ahc_linux_slave_alloc(struct scsi_device *device)
{
struct ahc_softc *ahc;
+ struct ahc_linux_target *targ;
+ struct scsi_target *starget = device->sdev_target;
+ struct ahc_linux_device *dev;
+ unsigned int target_offset;
+ unsigned long flags;
+ int retval = -ENOMEM;
+
+ target_offset = starget->id;
+ if (starget->channel != 0)
+ target_offset += 8;

ahc = *((struct ahc_softc **)device->host->hostdata);
if (bootverbose)
printf("%s: Slave Alloc %d\n", ahc_name(ahc), device->id);
- return (0);
+ ahc_lock(ahc, &flags);
+ targ = ahc->platform_data->targets[target_offset];
+ if (targ == NULL) {
+ targ = ahc_linux_alloc_target(ahc, starget->channel, starget->id);
+ struct seeprom_config *sc = ahc->seep_config;
+ if (targ == NULL)
+ goto out;
+
+ if (sc) {
+ unsigned short scsirate;
+ struct ahc_devinfo devinfo;
+ struct ahc_initiator_tinfo *tinfo;
+ struct ahc_tmode_tstate *tstate;
+ char channel = starget->channel + 'A';
+ unsigned int our_id = ahc->our_id;
+
+ if (starget->channel)
+ our_id = ahc->our_id_b;
+
+ if ((ahc->features & AHC_ULTRA2) != 0) {
+ scsirate = sc->device_flags[target_offset] & CFXFER;
+ } else {
+ scsirate = (sc->device_flags[target_offset] & CFXFER) << 4;
+ if (sc->device_flags[target_offset] & CFSYNCH)
+ scsirate |= SOFS;
+ }
+ if (sc->device_flags[target_offset] & CFWIDEB) {
+ scsirate |= WIDEXFER;
+ spi_max_width(starget) = 1;
+ } else
+ spi_max_width(starget) = 0;
+ spi_min_period(starget) =
+ ahc_find_period(ahc, scsirate, AHC_SYNCRATE_DT);
+ tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id,
+ targ->target, &tstate);
+ ahc_compile_devinfo(&devinfo, our_id, targ->target,
+ CAM_LUN_WILDCARD, channel,
+ ROLE_INITIATOR);
+ ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0,
+ AHC_TRANS_GOAL, /*paused*/FALSE);
+ ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
+ AHC_TRANS_GOAL, /*paused*/FALSE);
+ }
+
+ }
+ dev = targ->devices[device->lun];
+ if (dev == NULL) {
+ dev = ahc_linux_alloc_device(ahc, targ, device->lun);
+ if (dev == NULL)
+ goto out;
+ }
+ retval = 0;
+
+ out:
+ ahc_unlock(ahc, &flags);
+ return retval;
}

static int
-ahc_linux_slave_configure(Scsi_Device *device)
+ahc_linux_slave_configure(struct scsi_device *device)
{
struct ahc_softc *ahc;
struct ahc_linux_device *dev;
- u_long flags;

ahc = *((struct ahc_softc **)device->host->hostdata);
+
if (bootverbose)
printf("%s: Slave Configure %d\n", ahc_name(ahc), device->id);
- ahc_midlayer_entrypoint_lock(ahc, &flags);
- /*
- * Since Linux has attached to the device, configure
- * it so we don't free and allocate the device
- * structure on every command.
- */
- dev = ahc_linux_get_device(ahc, device->channel,
- device->id, device->lun,
- /*alloc*/TRUE);
- if (dev != NULL) {
- dev->flags &= ~AHC_DEV_UNCONFIGURED;
- dev->scsi_device = device;
- ahc_linux_device_queue_depth(ahc, dev);
- }
- ahc_midlayer_entrypoint_unlock(ahc, &flags);
+
+ dev = ahc_linux_get_device(ahc, device->channel, device->id,
+ device->lun);
+ dev->scsi_device = device;
+ ahc_linux_device_queue_depth(ahc, dev);

/* Initial Domain Validation */
if (!spi_initial_dv(device->sdev_target))
spi_dv_device(device);

- return (0);
+ return 0;
}

static void
-ahc_linux_slave_destroy(Scsi_Device *device)
+ahc_linux_slave_destroy(struct scsi_device *device)
{
struct ahc_softc *ahc;
struct ahc_linux_device *dev;
- u_long flags;

ahc = *((struct ahc_softc **)device->host->hostdata);
if (bootverbose)
printf("%s: Slave Destroy %d\n", ahc_name(ahc), device->id);
- ahc_midlayer_entrypoint_lock(ahc, &flags);
dev = ahc_linux_get_device(ahc, device->channel,
- device->id, device->lun,
- /*alloc*/FALSE);
- /*
- * Filter out "silly" deletions of real devices by only
- * deleting devices that have had slave_configure()
- * called on them. All other devices that have not
- * been configured will automatically be deleted by
- * the refcounting process.
- */
- if (dev != NULL
- && (dev->flags & AHC_DEV_SLAVE_CONFIGURED) != 0) {
- dev->flags |= AHC_DEV_UNCONFIGURED;
- if (TAILQ_EMPTY(&dev->busyq)
- && dev->active == 0
- && (dev->flags & AHC_DEV_TIMER_ACTIVE) == 0)
- ahc_linux_free_device(ahc, dev);
- }
- ahc_midlayer_entrypoint_unlock(ahc, &flags);
-}
-#else
-/*
- * Sets the queue depth for each SCSI device hanging
- * off the input host adapter.
- */
-static void
-ahc_linux_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs)
-{
- Scsi_Device *device;
- Scsi_Device *ldev;
- struct ahc_softc *ahc;
- u_long flags;
-
- ahc = *((struct ahc_softc **)host->hostdata);
- ahc_lock(ahc, &flags);
- for (device = scsi_devs; device != NULL; device = device->next) {
-
- /*
- * Watch out for duplicate devices. This works around
- * some quirks in how the SCSI scanning code does its
- * device management.
- */
- for (ldev = scsi_devs; ldev != device; ldev = ldev->next) {
- if (ldev->host == device->host
- && ldev->channel == device->channel
- && ldev->id == device->id
- && ldev->lun == device->lun)
- break;
- }
- /* Skip duplicate. */
- if (ldev != device)
- continue;
+ device->id, device->lun);

- if (device->host == host) {
- struct ahc_linux_device *dev;
+ BUG_ON(dev->active);

- /*
- * Since Linux has attached to the device, configure
- * it so we don't free and allocate the device
- * structure on every command.
- */
- dev = ahc_linux_get_device(ahc, device->channel,
- device->id, device->lun,
- /*alloc*/TRUE);
- if (dev != NULL) {
- dev->flags &= ~AHC_DEV_UNCONFIGURED;
- dev->scsi_device = device;
- ahc_linux_device_queue_depth(ahc, dev);
- device->queue_depth = dev->openings
- + dev->active;
- if ((dev->flags & (AHC_DEV_Q_BASIC
- | AHC_DEV_Q_TAGGED)) == 0) {
- /*
- * We allow the OS to queue 2 untagged
- * transactions to us at any time even
- * though we can only execute them
- * serially on the controller/device.
- * This should remove some latency.
- */
- device->queue_depth = 2;
- }
- }
- }
- }
- ahc_unlock(ahc, &flags);
+ ahc_linux_free_device(ahc, dev);
}
-#endif

#if defined(__i386__)
/*
* Return the disk geometry for the given SCSI device.
*/
static int
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_linux_biosparam(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[])
{
uint8_t *bh;
-#else
-ahc_linux_biosparam(Disk *disk, kdev_t dev, int geom[])
-{
- struct scsi_device *sdev = disk->device;
- u_long capacity = disk->capacity;
- struct buffer_head *bh;
-#endif
int heads;
int sectors;
int cylinders;
@@ -1090,22 +774,11 @@ ahc_linux_biosparam(Disk *disk, kdev_t d
ahc = *((struct ahc_softc **)sdev->host->hostdata);
channel = sdev->channel;

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
bh = scsi_bios_ptable(bdev);
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,17)
- bh = bread(MKDEV(MAJOR(dev), MINOR(dev) & ~0xf), 0, block_size(dev));
-#else
- bh = bread(MKDEV(MAJOR(dev), MINOR(dev) & ~0xf), 0, 1024);
-#endif
-
if (bh) {
ret = scsi_partsize(bh, capacity,
&geom[2], &geom[0], &geom[1]);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
kfree(bh);
-#else
- brelse(bh);
-#endif
if (ret != -1)
return (ret);
}
@@ -1135,7 +808,7 @@ ahc_linux_biosparam(Disk *disk, kdev_t d
* Abort the current SCSI command(s).
*/
static int
-ahc_linux_abort(Scsi_Cmnd *cmd)
+ahc_linux_abort(struct scsi_cmnd *cmd)
{
int error;

@@ -1149,7 +822,7 @@ ahc_linux_abort(Scsi_Cmnd *cmd)
* Attempt to send a target reset message to the device that timed out.
*/
static int
-ahc_linux_dev_reset(Scsi_Cmnd *cmd)
+ahc_linux_dev_reset(struct scsi_cmnd *cmd)
{
int error;

@@ -1163,18 +836,14 @@ ahc_linux_dev_reset(Scsi_Cmnd *cmd)
* Reset the SCSI bus.
*/
static int
-ahc_linux_bus_reset(Scsi_Cmnd *cmd)
+ahc_linux_bus_reset(struct scsi_cmnd *cmd)
{
struct ahc_softc *ahc;
- u_long s;
int found;

ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
- ahc_midlayer_entrypoint_lock(ahc, &s);
found = ahc_reset_channel(ahc, cmd->device->channel + 'A',
/*initiate reset*/TRUE);
- ahc_linux_run_complete_queue(ahc);
- ahc_midlayer_entrypoint_unlock(ahc, &s);

if (bootverbose)
printf("%s: SCSI bus reset delivered. "
@@ -1183,7 +852,7 @@ ahc_linux_bus_reset(Scsi_Cmnd *cmd)
return SUCCESS;
}

-Scsi_Host_Template aic7xxx_driver_template = {
+struct scsi_host_template aic7xxx_driver_template = {
.module = THIS_MODULE,
.name = "aic7xxx",
.proc_info = ahc_linux_proc_info,
@@ -1206,33 +875,6 @@ Scsi_Host_Template aic7xxx_driver_templa

/**************************** Tasklet Handler *********************************/

-/*
- * In 2.4.X and above, this routine is called from a tasklet,
- * so we must re-acquire our lock prior to executing this code.
- * In all prior kernels, ahc_schedule_runq() calls this routine
- * directly and ahc_schedule_runq() is called with our lock held.
- */
-static void
-ahc_runq_tasklet(unsigned long data)
-{
- struct ahc_softc* ahc;
- struct ahc_linux_device *dev;
- u_long flags;
-
- ahc = (struct ahc_softc *)data;
- ahc_lock(ahc, &flags);
- while ((dev = ahc_linux_next_device_to_run(ahc)) != NULL) {
-
- TAILQ_REMOVE(&ahc->platform_data->device_runq, dev, links);
- dev->flags &= ~AHC_DEV_ON_RUN_LIST;
- ahc_linux_check_device_queue(ahc, dev);
- /* Yeild to our interrupt handler */
- ahc_unlock(ahc, &flags);
- ahc_lock(ahc, &flags);
- }
- ahc_unlock(ahc, &flags);
-}
-
/******************************** Macros **************************************/
#define BUILD_SCSIID(ahc, cmd) \
((((cmd)->device->id << TID_SHIFT) & TID) \
@@ -1278,37 +920,11 @@ int
ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
int flags, bus_dmamap_t *mapp)
{
- bus_dmamap_t map;
-
- map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT);
- if (map == NULL)
- return (ENOMEM);
- /*
- * Although we can dma data above 4GB, our
- * "consistent" memory is below 4GB for
- * space efficiency reasons (only need a 4byte
- * address). For this reason, we have to reset
- * our dma mask when doing allocations.
- */
- if (ahc->dev_softc != NULL)
- if (pci_set_dma_mask(ahc->dev_softc, 0xFFFFFFFF)) {
- printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
- kfree(map);
- return (ENODEV);
- }
*vaddr = pci_alloc_consistent(ahc->dev_softc,
- dmat->maxsize, &map->bus_addr);
- if (ahc->dev_softc != NULL)
- if (pci_set_dma_mask(ahc->dev_softc,
- ahc->platform_data->hw_dma_mask)) {
- printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
- kfree(map);
- return (ENODEV);
- }
+ dmat->maxsize, mapp);
if (*vaddr == NULL)
- return (ENOMEM);
- *mapp = map;
- return(0);
+ return ENOMEM;
+ return 0;
}

void
@@ -1316,7 +932,7 @@ ahc_dmamem_free(struct ahc_softc *ahc, b
void* vaddr, bus_dmamap_t map)
{
pci_free_consistent(ahc->dev_softc, dmat->maxsize,
- vaddr, map->bus_addr);
+ vaddr, map);
}

int
@@ -1330,7 +946,7 @@ ahc_dmamap_load(struct ahc_softc *ahc, b
*/
bus_dma_segment_t stack_sg;

- stack_sg.ds_addr = map->bus_addr;
+ stack_sg.ds_addr = map;
stack_sg.ds_len = dmat->maxsize;
cb(cb_arg, &stack_sg, /*nseg*/1, /*error*/0);
return (0);
@@ -1339,12 +955,6 @@ ahc_dmamap_load(struct ahc_softc *ahc, b
void
ahc_dmamap_destroy(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map)
{
- /*
- * The map may is NULL in our < 2.3.X implementation.
- * Now it's 2.6.5, but just in case...
- */
- BUG_ON(map == NULL);
- free(map, M_DEVBUF);
}

int
@@ -1550,7 +1160,7 @@ __setup("aic7xxx=", aic7xxx_setup);
uint32_t aic7xxx_verbose;

int
-ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template)
+ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template)
{
char buf[80];
struct Scsi_Host *host;
@@ -1564,11 +1174,7 @@ ahc_linux_register_host(struct ahc_softc

*((struct ahc_softc **)host->hostdata) = ahc;
ahc_lock(ahc, &s);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
scsi_assign_lock(host, &ahc->platform_data->spin_lock);
-#elif AHC_SCSI_HAS_HOST_LOCK != 0
- host->lock = &ahc->platform_data->spin_lock;
-#endif
ahc->platform_data->host = host;
host->can_queue = AHC_MAX_QUEUE;
host->cmd_per_lun = 2;
@@ -1587,19 +1193,14 @@ ahc_linux_register_host(struct ahc_softc
ahc_set_name(ahc, new_name);
}
host->unique_id = ahc->unit;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- scsi_set_pci_device(host, ahc->dev_softc);
-#endif
ahc_linux_initialize_scsi_bus(ahc);
ahc_intr_enable(ahc, TRUE);
ahc_unlock(ahc, &s);

host->transportt = ahc_linux_transport_template;

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
scsi_add_host(host, (ahc->dev_softc ? &ahc->dev_softc->dev : NULL)); /* XXX handle failure */
scsi_scan_host(host);
-#endif
return (0);
}

@@ -1717,19 +1318,9 @@ ahc_platform_alloc(struct ahc_softc *ahc
if (ahc->platform_data == NULL)
return (ENOMEM);
memset(ahc->platform_data, 0, sizeof(struct ahc_platform_data));
- TAILQ_INIT(&ahc->platform_data->completeq);
- TAILQ_INIT(&ahc->platform_data->device_runq);
ahc->platform_data->irq = AHC_LINUX_NOIRQ;
- ahc->platform_data->hw_dma_mask = 0xFFFFFFFF;
ahc_lockinit(ahc);
- ahc_done_lockinit(ahc);
- init_timer(&ahc->platform_data->completeq_timer);
- ahc->platform_data->completeq_timer.data = (u_long)ahc;
- ahc->platform_data->completeq_timer.function =
- (ahc_linux_callback_t *)ahc_linux_thread_run_complete_queue;
init_MUTEX_LOCKED(&ahc->platform_data->eh_sem);
- tasklet_init(&ahc->platform_data->runq_tasklet, ahc_runq_tasklet,
- (unsigned long)ahc);
ahc->seltime = (aic7xxx_seltime & 0x3) << 4;
ahc->seltime_b = (aic7xxx_seltime & 0x3) << 4;
if (aic7xxx_pci_parity == 0)
@@ -1746,12 +1337,8 @@ ahc_platform_free(struct ahc_softc *ahc)
int i, j;

if (ahc->platform_data != NULL) {
- del_timer_sync(&ahc->platform_data->completeq_timer);
- tasklet_kill(&ahc->platform_data->runq_tasklet);
if (ahc->platform_data->host != NULL) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
scsi_remove_host(ahc->platform_data->host);
-#endif
scsi_host_put(ahc->platform_data->host);
}

@@ -1787,16 +1374,7 @@ ahc_platform_free(struct ahc_softc *ahc)
release_mem_region(ahc->platform_data->mem_busaddr,
0x1000);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- /*
- * In 2.4 we detach from the scsi midlayer before the PCI
- * layer invokes our remove callback. No per-instance
- * detach is provided, so we must reach inside the PCI
- * subsystem's internals and detach our driver manually.
- */
- if (ahc->dev_softc != NULL)
- ahc->dev_softc->driver = NULL;
-#endif
+
free(ahc->platform_data, M_DEVBUF);
}
}
@@ -1820,7 +1398,7 @@ ahc_platform_set_tags(struct ahc_softc *

dev = ahc_linux_get_device(ahc, devinfo->channel - 'A',
devinfo->target,
- devinfo->lun, /*alloc*/FALSE);
+ devinfo->lun);
if (dev == NULL)
return;
was_queuing = dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED);
@@ -1873,7 +1451,6 @@ ahc_platform_set_tags(struct ahc_softc *
dev->maxtags = 0;
dev->openings = 1 - dev->active;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (dev->scsi_device != NULL) {
switch ((dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED))) {
case AHC_DEV_Q_BASIC:
@@ -1899,90 +1476,13 @@ ahc_platform_set_tags(struct ahc_softc *
break;
}
}
-#endif
}

int
ahc_platform_abort_scbs(struct ahc_softc *ahc, int target, char channel,
int lun, u_int tag, role_t role, uint32_t status)
{
- int chan;
- int maxchan;
- int targ;
- int maxtarg;
- int clun;
- int maxlun;
- int count;
-
- if (tag != SCB_LIST_NULL)
- return (0);
-
- chan = 0;
- if (channel != ALL_CHANNELS) {
- chan = channel - 'A';
- maxchan = chan + 1;
- } else {
- maxchan = (ahc->features & AHC_TWIN) ? 2 : 1;
- }
- targ = 0;
- if (target != CAM_TARGET_WILDCARD) {
- targ = target;
- maxtarg = targ + 1;
- } else {
- maxtarg = (ahc->features & AHC_WIDE) ? 16 : 8;
- }
- clun = 0;
- if (lun != CAM_LUN_WILDCARD) {
- clun = lun;
- maxlun = clun + 1;
- } else {
- maxlun = AHC_NUM_LUNS;
- }
-
- count = 0;
- for (; chan < maxchan; chan++) {
-
- for (; targ < maxtarg; targ++) {
-
- for (; clun < maxlun; clun++) {
- struct ahc_linux_device *dev;
- struct ahc_busyq *busyq;
- struct ahc_cmd *acmd;
-
- dev = ahc_linux_get_device(ahc, chan,
- targ, clun,
- /*alloc*/FALSE);
- if (dev == NULL)
- continue;
-
- busyq = &dev->busyq;
- while ((acmd = TAILQ_FIRST(busyq)) != NULL) {
- Scsi_Cmnd *cmd;
-
- cmd = &acmd_scsi_cmd(acmd);
- TAILQ_REMOVE(busyq, acmd,
- acmd_links.tqe);
- count++;
- cmd->result = status << 16;
- ahc_linux_queue_cmd_complete(ahc, cmd);
- }
- }
- }
- }
-
- return (count);
-}
-
-static void
-ahc_linux_thread_run_complete_queue(struct ahc_softc *ahc)
-{
- u_long flags;
-
- ahc_lock(ahc, &flags);
- del_timer(&ahc->platform_data->completeq_timer);
- ahc->platform_data->flags &= ~AHC_RUN_CMPLT_Q_TIMER;
- ahc_linux_run_complete_queue(ahc);
- ahc_unlock(ahc, &flags);
+ return 0;
}

static u_int
@@ -2045,213 +1545,200 @@ ahc_linux_device_queue_depth(struct ahc_
}
}

-static void
-ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev)
+static int
+ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
+ struct scsi_cmnd *cmd)
{
- struct ahc_cmd *acmd;
- struct scsi_cmnd *cmd;
struct scb *scb;
struct hardware_scb *hscb;
struct ahc_initiator_tinfo *tinfo;
struct ahc_tmode_tstate *tstate;
uint16_t mask;
+ struct scb_tailq *untagged_q = NULL;

- if ((dev->flags & AHC_DEV_ON_RUN_LIST) != 0)
- panic("running device on run list");
+ /*
+ * Schedule us to run later. The only reason we are not
+ * running is because the whole controller Q is frozen.
+ */
+ if (ahc->platform_data->qfrozen != 0)
+ return SCSI_MLQUEUE_HOST_BUSY;

- while ((acmd = TAILQ_FIRST(&dev->busyq)) != NULL
- && dev->openings > 0 && dev->qfrozen == 0) {
+ /*
+ * We only allow one untagged transaction
+ * per target in the initiator role unless
+ * we are storing a full busy target *lun*
+ * table in SCB space.
+ */
+ if (!blk_rq_tagged(cmd->request)
+ && (ahc->features & AHC_SCB_BTT) == 0) {
+ int target_offset;

- /*
- * Schedule us to run later. The only reason we are not
- * running is because the whole controller Q is frozen.
- */
- if (ahc->platform_data->qfrozen != 0) {
- TAILQ_INSERT_TAIL(&ahc->platform_data->device_runq,
- dev, links);
- dev->flags |= AHC_DEV_ON_RUN_LIST;
- return;
- }
- /*
- * Get an scb to use.
- */
- if ((scb = ahc_get_scb(ahc)) == NULL) {
- TAILQ_INSERT_TAIL(&ahc->platform_data->device_runq,
- dev, links);
- dev->flags |= AHC_DEV_ON_RUN_LIST;
+ target_offset = cmd->device->id + cmd->device->channel * 8;
+ untagged_q = &(ahc->untagged_queues[target_offset]);
+ if (!TAILQ_EMPTY(untagged_q))
+ /* if we're already executing an untagged command
+ * we're busy to another */
+ return SCSI_MLQUEUE_DEVICE_BUSY;
+ }
+
+ /*
+ * Get an scb to use.
+ */
+ if ((scb = ahc_get_scb(ahc)) == NULL) {
ahc->flags |= AHC_RESOURCE_SHORTAGE;
- return;
- }
- TAILQ_REMOVE(&dev->busyq, acmd, acmd_links.tqe);
- cmd = &acmd_scsi_cmd(acmd);
- scb->io_ctx = cmd;
- scb->platform_data->dev = dev;
- hscb = scb->hscb;
- cmd->host_scribble = (char *)scb;
+ return SCSI_MLQUEUE_HOST_BUSY;
+ }

- /*
- * Fill out basics of the HSCB.
- */
- hscb->control = 0;
- hscb->scsiid = BUILD_SCSIID(ahc, cmd);
- hscb->lun = cmd->device->lun;
- mask = SCB_GET_TARGET_MASK(ahc, scb);
- tinfo = ahc_fetch_transinfo(ahc, SCB_GET_CHANNEL(ahc, scb),
- SCB_GET_OUR_ID(scb),
- SCB_GET_TARGET(ahc, scb), &tstate);
- hscb->scsirate = tinfo->scsirate;
- hscb->scsioffset = tinfo->curr.offset;
- if ((tstate->ultraenb & mask) != 0)
- hscb->control |= ULTRAENB;
-
- if ((ahc->user_discenable & mask) != 0)
- hscb->control |= DISCENB;
-
- if ((tstate->auto_negotiate & mask) != 0) {
- scb->flags |= SCB_AUTO_NEGOTIATE;
- scb->hscb->control |= MK_MESSAGE;
- }
-
- if ((dev->flags & (AHC_DEV_Q_TAGGED|AHC_DEV_Q_BASIC)) != 0) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- int msg_bytes;
- uint8_t tag_msgs[2];
-
- msg_bytes = scsi_populate_tag_msg(cmd, tag_msgs);
- if (msg_bytes && tag_msgs[0] != MSG_SIMPLE_TASK) {
- hscb->control |= tag_msgs[0];
- if (tag_msgs[0] == MSG_ORDERED_TASK)
- dev->commands_since_idle_or_otag = 0;
- } else
-#endif
- if (dev->commands_since_idle_or_otag == AHC_OTAG_THRESH
- && (dev->flags & AHC_DEV_Q_TAGGED) != 0) {
- hscb->control |= MSG_ORDERED_TASK;
- dev->commands_since_idle_or_otag = 0;
- } else {
- hscb->control |= MSG_SIMPLE_TASK;
- }
- }
+ scb->io_ctx = cmd;
+ scb->platform_data->dev = dev;
+ hscb = scb->hscb;
+ cmd->host_scribble = (char *)scb;
+
+ /*
+ * Fill out basics of the HSCB.
+ */
+ hscb->control = 0;
+ hscb->scsiid = BUILD_SCSIID(ahc, cmd);
+ hscb->lun = cmd->device->lun;
+ mask = SCB_GET_TARGET_MASK(ahc, scb);
+ tinfo = ahc_fetch_transinfo(ahc, SCB_GET_CHANNEL(ahc, scb),
+ SCB_GET_OUR_ID(scb),
+ SCB_GET_TARGET(ahc, scb), &tstate);
+ hscb->scsirate = tinfo->scsirate;
+ hscb->scsioffset = tinfo->curr.offset;
+ if ((tstate->ultraenb & mask) != 0)
+ hscb->control |= ULTRAENB;
+
+ if ((ahc->user_discenable & mask) != 0)
+ hscb->control |= DISCENB;
+
+ if ((tstate->auto_negotiate & mask) != 0) {
+ scb->flags |= SCB_AUTO_NEGOTIATE;
+ scb->hscb->control |= MK_MESSAGE;
+ }

- hscb->cdb_len = cmd->cmd_len;
- if (hscb->cdb_len <= 12) {
- memcpy(hscb->shared_data.cdb, cmd->cmnd, hscb->cdb_len);
+ if ((dev->flags & (AHC_DEV_Q_TAGGED|AHC_DEV_Q_BASIC)) != 0) {
+ int msg_bytes;
+ uint8_t tag_msgs[2];
+
+ msg_bytes = scsi_populate_tag_msg(cmd, tag_msgs);
+ if (msg_bytes && tag_msgs[0] != MSG_SIMPLE_TASK) {
+ hscb->control |= tag_msgs[0];
+ if (tag_msgs[0] == MSG_ORDERED_TASK)
+ dev->commands_since_idle_or_otag = 0;
+ } else if (dev->commands_since_idle_or_otag == AHC_OTAG_THRESH
+ && (dev->flags & AHC_DEV_Q_TAGGED) != 0) {
+ hscb->control |= MSG_ORDERED_TASK;
+ dev->commands_since_idle_or_otag = 0;
} else {
- memcpy(hscb->cdb32, cmd->cmnd, hscb->cdb_len);
- scb->flags |= SCB_CDB32_PTR;
+ hscb->control |= MSG_SIMPLE_TASK;
}
+ }

- scb->platform_data->xfer_len = 0;
- ahc_set_residual(scb, 0);
- ahc_set_sense_residual(scb, 0);
- scb->sg_count = 0;
- if (cmd->use_sg != 0) {
- struct ahc_dma_seg *sg;
- struct scatterlist *cur_seg;
- struct scatterlist *end_seg;
- int nseg;
-
- cur_seg = (struct scatterlist *)cmd->request_buffer;
- nseg = pci_map_sg(ahc->dev_softc, cur_seg, cmd->use_sg,
- cmd->sc_data_direction);
- end_seg = cur_seg + nseg;
- /* Copy the segments into the SG list. */
- sg = scb->sg_list;
- /*
- * The sg_count may be larger than nseg if
- * a transfer crosses a 32bit page.
- */
- while (cur_seg < end_seg) {
- dma_addr_t addr;
- bus_size_t len;
- int consumed;
-
- addr = sg_dma_address(cur_seg);
- len = sg_dma_len(cur_seg);
- consumed = ahc_linux_map_seg(ahc, scb,
- sg, addr, len);
- sg += consumed;
- scb->sg_count += consumed;
- cur_seg++;
- }
- sg--;
- sg->len |= ahc_htole32(AHC_DMA_LAST_SEG);
-
- /*
- * Reset the sg list pointer.
- */
- scb->hscb->sgptr =
- ahc_htole32(scb->sg_list_phys | SG_FULL_RESID);
+ hscb->cdb_len = cmd->cmd_len;
+ if (hscb->cdb_len <= 12) {
+ memcpy(hscb->shared_data.cdb, cmd->cmnd, hscb->cdb_len);
+ } else {
+ memcpy(hscb->cdb32, cmd->cmnd, hscb->cdb_len);
+ scb->flags |= SCB_CDB32_PTR;
+ }

- /*
- * Copy the first SG into the "current"
- * data pointer area.
- */
- scb->hscb->dataptr = scb->sg_list->addr;
- scb->hscb->datacnt = scb->sg_list->len;
- } else if (cmd->request_bufflen != 0) {
- struct ahc_dma_seg *sg;
+ scb->platform_data->xfer_len = 0;
+ ahc_set_residual(scb, 0);
+ ahc_set_sense_residual(scb, 0);
+ scb->sg_count = 0;
+ if (cmd->use_sg != 0) {
+ struct ahc_dma_seg *sg;
+ struct scatterlist *cur_seg;
+ struct scatterlist *end_seg;
+ int nseg;
+
+ cur_seg = (struct scatterlist *)cmd->request_buffer;
+ nseg = pci_map_sg(ahc->dev_softc, cur_seg, cmd->use_sg,
+ cmd->sc_data_direction);
+ end_seg = cur_seg + nseg;
+ /* Copy the segments into the SG list. */
+ sg = scb->sg_list;
+ /*
+ * The sg_count may be larger than nseg if
+ * a transfer crosses a 32bit page.
+ */
+ while (cur_seg < end_seg) {
dma_addr_t addr;
+ bus_size_t len;
+ int consumed;

- sg = scb->sg_list;
- addr = pci_map_single(ahc->dev_softc,
- cmd->request_buffer,
- cmd->request_bufflen,
- cmd->sc_data_direction);
- scb->platform_data->buf_busaddr = addr;
- scb->sg_count = ahc_linux_map_seg(ahc, scb,
- sg, addr,
- cmd->request_bufflen);
- sg->len |= ahc_htole32(AHC_DMA_LAST_SEG);
+ addr = sg_dma_address(cur_seg);
+ len = sg_dma_len(cur_seg);
+ consumed = ahc_linux_map_seg(ahc, scb,
+ sg, addr, len);
+ sg += consumed;
+ scb->sg_count += consumed;
+ cur_seg++;
+ }
+ sg--;
+ sg->len |= ahc_htole32(AHC_DMA_LAST_SEG);

- /*
- * Reset the sg list pointer.
- */
- scb->hscb->sgptr =
- ahc_htole32(scb->sg_list_phys | SG_FULL_RESID);
+ /*
+ * Reset the sg list pointer.
+ */
+ scb->hscb->sgptr =
+ ahc_htole32(scb->sg_list_phys | SG_FULL_RESID);
+
+ /*
+ * Copy the first SG into the "current"
+ * data pointer area.
+ */
+ scb->hscb->dataptr = scb->sg_list->addr;
+ scb->hscb->datacnt = scb->sg_list->len;
+ } else if (cmd->request_bufflen != 0) {
+ struct ahc_dma_seg *sg;
+ dma_addr_t addr;

- /*
- * Copy the first SG into the "current"
- * data pointer area.
- */
- scb->hscb->dataptr = sg->addr;
- scb->hscb->datacnt = sg->len;
- } else {
- scb->hscb->sgptr = ahc_htole32(SG_LIST_NULL);
- scb->hscb->dataptr = 0;
- scb->hscb->datacnt = 0;
- scb->sg_count = 0;
- }
+ sg = scb->sg_list;
+ addr = pci_map_single(ahc->dev_softc,
+ cmd->request_buffer,
+ cmd->request_bufflen,
+ cmd->sc_data_direction);
+ scb->platform_data->buf_busaddr = addr;
+ scb->sg_count = ahc_linux_map_seg(ahc, scb,
+ sg, addr,
+ cmd->request_bufflen);
+ sg->len |= ahc_htole32(AHC_DMA_LAST_SEG);

- ahc_sync_sglist(ahc, scb, BUS_DMASYNC_PREWRITE);
- LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links);
- dev->openings--;
- dev->active++;
- dev->commands_issued++;
- if ((dev->flags & AHC_DEV_PERIODIC_OTAG) != 0)
- dev->commands_since_idle_or_otag++;
+ /*
+ * Reset the sg list pointer.
+ */
+ scb->hscb->sgptr =
+ ahc_htole32(scb->sg_list_phys | SG_FULL_RESID);

/*
- * We only allow one untagged transaction
- * per target in the initiator role unless
- * we are storing a full busy target *lun*
- * table in SCB space.
+ * Copy the first SG into the "current"
+ * data pointer area.
*/
- if ((scb->hscb->control & (TARGET_SCB|TAG_ENB)) == 0
- && (ahc->features & AHC_SCB_BTT) == 0) {
- struct scb_tailq *untagged_q;
- int target_offset;
-
- target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
- untagged_q = &(ahc->untagged_queues[target_offset]);
- TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe);
- scb->flags |= SCB_UNTAGGEDQ;
- if (TAILQ_FIRST(untagged_q) != scb)
- continue;
- }
- scb->flags |= SCB_ACTIVE;
- ahc_queue_scb(ahc, scb);
+ scb->hscb->dataptr = sg->addr;
+ scb->hscb->datacnt = sg->len;
+ } else {
+ scb->hscb->sgptr = ahc_htole32(SG_LIST_NULL);
+ scb->hscb->dataptr = 0;
+ scb->hscb->datacnt = 0;
+ scb->sg_count = 0;
+ }
+
+ LIST_INSERT_HEAD(&ahc->pending_scbs, scb, pending_links);
+ dev->openings--;
+ dev->active++;
+ dev->commands_issued++;
+ if ((dev->flags & AHC_DEV_PERIODIC_OTAG) != 0)
+ dev->commands_since_idle_or_otag++;
+
+ scb->flags |= SCB_ACTIVE;
+ if (untagged_q) {
+ TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe);
+ scb->flags |= SCB_UNTAGGEDQ;
}
+ ahc_queue_scb(ahc, scb);
+ return 0;
}

/*
@@ -2267,9 +1754,6 @@ ahc_linux_isr(int irq, void *dev_id, str
ahc = (struct ahc_softc *) dev_id;
ahc_lock(ahc, &flags);
ours = ahc_intr(ahc);
- if (ahc_linux_next_device_to_run(ahc) != NULL)
- ahc_schedule_runq(ahc);
- ahc_linux_run_complete_queue(ahc);
ahc_unlock(ahc, &flags);
return IRQ_RETVAL(ours);
}
@@ -2278,8 +1762,6 @@ void
ahc_platform_flushwork(struct ahc_softc *ahc)
{

- while (ahc_linux_run_complete_queue(ahc) != NULL)
- ;
}

static struct ahc_linux_target*
@@ -2348,9 +1830,6 @@ ahc_linux_alloc_device(struct ahc_softc
if (dev == NULL)
return (NULL);
memset(dev, 0, sizeof(*dev));
- init_timer(&dev->timer);
- TAILQ_INIT(&dev->busyq);
- dev->flags = AHC_DEV_UNCONFIGURED;
dev->lun = lun;
dev->target = targ;

@@ -2373,7 +1852,7 @@ ahc_linux_alloc_device(struct ahc_softc
}

static void
-__ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
+ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
{
struct ahc_linux_target *targ;

@@ -2385,13 +1864,6 @@ __ahc_linux_free_device(struct ahc_softc
ahc_linux_free_target(ahc, targ);
}

-static void
-ahc_linux_free_device(struct ahc_softc *ahc, struct ahc_linux_device *dev)
-{
- del_timer_sync(&dev->timer);
- __ahc_linux_free_device(ahc, dev);
-}
-
void
ahc_send_async(struct ahc_softc *ahc, char channel,
u_int target, u_int lun, ac_code code, void *arg)
@@ -2463,28 +1935,9 @@ ahc_send_async(struct ahc_softc *ahc, ch
}
case AC_SENT_BDR:
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
WARN_ON(lun != CAM_LUN_WILDCARD);
scsi_report_device_reset(ahc->platform_data->host,
channel - 'A', target);
-#else
- Scsi_Device *scsi_dev;
-
- /*
- * Find the SCSI device associated with this
- * request and indicate that a UA is expected.
- */
- for (scsi_dev = ahc->platform_data->host->host_queue;
- scsi_dev != NULL; scsi_dev = scsi_dev->next) {
- if (channel - 'A' == scsi_dev->channel
- && target == scsi_dev->id
- && (lun == CAM_LUN_WILDCARD
- || lun == scsi_dev->lun)) {
- scsi_dev->was_reset = 1;
- scsi_dev->expecting_cc_ua = 1;
- }
- }
-#endif
break;
}
case AC_BUS_RESET:
@@ -2504,7 +1957,7 @@ ahc_send_async(struct ahc_softc *ahc, ch
void
ahc_done(struct ahc_softc *ahc, struct scb *scb)
{
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;
struct ahc_linux_device *dev;

LIST_REMOVE(scb, pending_links);
@@ -2515,7 +1968,7 @@ ahc_done(struct ahc_softc *ahc, struct s
target_offset = SCB_GET_TARGET_OFFSET(ahc, scb);
untagged_q = &(ahc->untagged_queues[target_offset]);
TAILQ_REMOVE(untagged_q, scb, links.tqe);
- ahc_run_untagged_queue(ahc, untagged_q);
+ BUG_ON(!TAILQ_EMPTY(untagged_q));
}

if ((scb->flags & SCB_ACTIVE) == 0) {
@@ -2583,8 +2036,6 @@ ahc_done(struct ahc_softc *ahc, struct s
}
} else if (ahc_get_transaction_status(scb) == CAM_SCSI_STATUS_ERROR) {
ahc_linux_handle_scsi_status(ahc, dev, scb);
- } else if (ahc_get_transaction_status(scb) == CAM_SEL_TIMEOUT) {
- dev->flags |= AHC_DEV_UNCONFIGURED;
}

if (dev->openings == 1
@@ -2606,16 +2057,6 @@ ahc_done(struct ahc_softc *ahc, struct s
if (dev->active == 0)
dev->commands_since_idle_or_otag = 0;

- if (TAILQ_EMPTY(&dev->busyq)) {
- if ((dev->flags & AHC_DEV_UNCONFIGURED) != 0
- && dev->active == 0
- && (dev->flags & AHC_DEV_TIMER_ACTIVE) == 0)
- ahc_linux_free_device(ahc, dev);
- } else if ((dev->flags & AHC_DEV_ON_RUN_LIST) == 0) {
- TAILQ_INSERT_TAIL(&ahc->platform_data->device_runq, dev, links);
- dev->flags |= AHC_DEV_ON_RUN_LIST;
- }
-
if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
printf("Recovery SCB completes\n");
if (ahc_get_transaction_status(scb) == CAM_BDR_SENT
@@ -2659,7 +2100,7 @@ ahc_linux_handle_scsi_status(struct ahc_
case SCSI_STATUS_CHECK_COND:
case SCSI_STATUS_CMD_TERMINATED:
{
- Scsi_Cmnd *cmd;
+ struct scsi_cmnd *cmd;

/*
* Copy sense information to the OS's cmd
@@ -2754,52 +2195,15 @@ ahc_linux_handle_scsi_status(struct ahc_
ahc_platform_set_tags(ahc, &devinfo,
(dev->flags & AHC_DEV_Q_BASIC)
? AHC_QUEUE_BASIC : AHC_QUEUE_TAGGED);
- /* FALLTHROUGH */
- }
- case SCSI_STATUS_BUSY:
- {
- /*
- * Set a short timer to defer sending commands for
- * a bit since Linux will not delay in this case.
- */
- if ((dev->flags & AHC_DEV_TIMER_ACTIVE) != 0) {
- printf("%s:%c:%d: Device Timer still active during "
- "busy processing\n", ahc_name(ahc),
- dev->target->channel, dev->target->target);
- break;
- }
- dev->flags |= AHC_DEV_TIMER_ACTIVE;
- dev->qfrozen++;
- init_timer(&dev->timer);
- dev->timer.data = (u_long)dev;
- dev->timer.expires = jiffies + (HZ/2);
- dev->timer.function = ahc_linux_dev_timed_unfreeze;
- add_timer(&dev->timer);
break;
}
}
}

static void
-ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, Scsi_Cmnd *cmd)
+ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, struct scsi_cmnd *cmd)
{
/*
- * Typically, the complete queue has very few entries
- * queued to it before the queue is emptied by
- * ahc_linux_run_complete_queue, so sorting the entries
- * by generation number should be inexpensive.
- * We perform the sort so that commands that complete
- * with an error are retuned in the order origionally
- * queued to the controller so that any subsequent retries
- * are performed in order. The underlying ahc routines do
- * not guarantee the order that aborted commands will be
- * returned to us.
- */
- struct ahc_completeq *completeq;
- struct ahc_cmd *list_cmd;
- struct ahc_cmd *acmd;
-
- /*
* Map CAM error codes into Linux Error codes. We
* avoid the conversion so that the DV code has the
* full error information available when making
@@ -2852,26 +2256,7 @@ ahc_linux_queue_cmd_complete(struct ahc_
new_status = DID_ERROR;
break;
case CAM_REQUEUE_REQ:
- /*
- * If we want the request requeued, make sure there
- * are sufficent retries. In the old scsi error code,
- * we used to be able to specify a result code that
- * bypassed the retry count. Now we must use this
- * hack. We also "fake" a check condition with
- * a sense code of ABORTED COMMAND. This seems to
- * evoke a retry even if this command is being sent
- * via the eh thread. Ick! Ick! Ick!
- */
- if (cmd->retries > 0)
- cmd->retries--;
- new_status = DID_OK;
- ahc_cmd_set_scsi_status(cmd, SCSI_STATUS_CHECK_COND);
- cmd->result |= (DRIVER_SENSE << 24);
- memset(cmd->sense_buffer, 0,
- sizeof(cmd->sense_buffer));
- cmd->sense_buffer[0] = SSD_ERRCODE_VALID
- | SSD_CURRENT_ERROR;
- cmd->sense_buffer[2] = SSD_KEY_ABORTED_COMMAND;
+ new_status = DID_REQUEUE;
break;
default:
/* We should never get here */
@@ -2882,17 +2267,7 @@ ahc_linux_queue_cmd_complete(struct ahc_
ahc_cmd_set_transaction_status(cmd, new_status);
}

- completeq = &ahc->platform_data->completeq;
- list_cmd = TAILQ_FIRST(completeq);
- acmd = (struct ahc_cmd *)cmd;
- while (list_cmd != NULL
- && acmd_scsi_cmd(list_cmd).serial_number
- < acmd_scsi_cmd(acmd).serial_number)
- list_cmd = TAILQ_NEXT(list_cmd, acmd_links.tqe);
- if (list_cmd != NULL)
- TAILQ_INSERT_BEFORE(list_cmd, acmd, acmd_links.tqe);
- else
- TAILQ_INSERT_TAIL(completeq, acmd, acmd_links.tqe);
+ cmd->scsi_done(cmd);
}

static void
@@ -2940,7 +2315,6 @@ ahc_linux_release_simq(u_long arg)
ahc->platform_data->qfrozen--;
if (ahc->platform_data->qfrozen == 0)
unblock_reqs = 1;
- ahc_schedule_runq(ahc);
ahc_unlock(ahc, &s);
/*
* There is still a race here. The mid-layer
@@ -2952,37 +2326,12 @@ ahc_linux_release_simq(u_long arg)
scsi_unblock_requests(ahc->platform_data->host);
}

-static void
-ahc_linux_dev_timed_unfreeze(u_long arg)
-{
- struct ahc_linux_device *dev;
- struct ahc_softc *ahc;
- u_long s;
-
- dev = (struct ahc_linux_device *)arg;
- ahc = dev->target->ahc;
- ahc_lock(ahc, &s);
- dev->flags &= ~AHC_DEV_TIMER_ACTIVE;
- if (dev->qfrozen > 0)
- dev->qfrozen--;
- if (dev->qfrozen == 0
- && (dev->flags & AHC_DEV_ON_RUN_LIST) == 0)
- ahc_linux_run_device_queue(ahc, dev);
- if (TAILQ_EMPTY(&dev->busyq)
- && dev->active == 0)
- __ahc_linux_free_device(ahc, dev);
- ahc_unlock(ahc, &s);
-}
-
static int
-ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
+ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
{
struct ahc_softc *ahc;
- struct ahc_cmd *acmd;
- struct ahc_cmd *list_acmd;
struct ahc_linux_device *dev;
struct scb *pending_scb;
- u_long s;
u_int saved_scbptr;
u_int active_scb_index;
u_int last_phase;
@@ -2998,7 +2347,6 @@ ahc_linux_queue_recovery_cmd(Scsi_Cmnd *
paused = FALSE;
wait = FALSE;
ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
- acmd = (struct ahc_cmd *)cmd;

printf("%s:%d:%d:%d: Attempting to queue a%s message\n",
ahc_name(ahc), cmd->device->channel,
@@ -3011,22 +2359,6 @@ ahc_linux_queue_recovery_cmd(Scsi_Cmnd *
printf("\n");

/*
- * In all versions of Linux, we have to work around
- * a major flaw in how the mid-layer is locked down
- * if we are to sleep successfully in our error handler
- * while allowing our interrupt handler to run. Since
- * the midlayer acquires either the io_request_lock or
- * our lock prior to calling us, we must use the
- * spin_unlock_irq() method for unlocking our lock.
- * This will force interrupts to be enabled on the
- * current CPU. Since the EH thread should not have
- * been running with CPU interrupts disabled other than
- * by acquiring either the io_request_lock or our own
- * lock, this *should* be safe.
- */
- ahc_midlayer_entrypoint_lock(ahc, &s);
-
- /*
* First determine if we currently own this command.
* Start by searching the device queue. If not found
* there, check the pending_scb list. If not found
@@ -3034,7 +2366,7 @@ ahc_linux_queue_recovery_cmd(Scsi_Cmnd *
* command, return success.
*/
dev = ahc_linux_get_device(ahc, cmd->device->channel, cmd->device->id,
- cmd->device->lun, /*alloc*/FALSE);
+ cmd->device->lun);

if (dev == NULL) {
/*
@@ -3048,24 +2380,6 @@ ahc_linux_queue_recovery_cmd(Scsi_Cmnd *
goto no_cmd;
}

- TAILQ_FOREACH(list_acmd, &dev->busyq, acmd_links.tqe) {
- if (list_acmd == acmd)
- break;
- }
-
- if (list_acmd != NULL) {
- printf("%s:%d:%d:%d: Command found on device queue\n",
- ahc_name(ahc), cmd->device->channel, cmd->device->id,
- cmd->device->lun);
- if (flag == SCB_ABORT) {
- TAILQ_REMOVE(&dev->busyq, list_acmd, acmd_links.tqe);
- cmd->result = DID_ABORT << 16;
- ahc_linux_queue_cmd_complete(ahc, cmd);
- retval = SUCCESS;
- goto done;
- }
- }
-
if ((dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED)) == 0
&& ahc_search_untagged_queues(ahc, cmd, cmd->device->id,
cmd->device->channel + 'A',
@@ -3299,53 +2613,42 @@ done:
}
spin_lock_irq(&ahc->platform_data->spin_lock);
}
- ahc_schedule_runq(ahc);
- ahc_linux_run_complete_queue(ahc);
- ahc_midlayer_entrypoint_unlock(ahc, &s);
return (retval);
}

void
ahc_platform_dump_card_state(struct ahc_softc *ahc)
{
- struct ahc_linux_device *dev;
- int channel;
- int maxchannel;
- int target;
- int maxtarget;
- int lun;
- int i;
-
- maxchannel = (ahc->features & AHC_TWIN) ? 1 : 0;
- maxtarget = (ahc->features & AHC_WIDE) ? 15 : 7;
- for (channel = 0; channel <= maxchannel; channel++) {
-
- for (target = 0; target <=maxtarget; target++) {
-
- for (lun = 0; lun < AHC_NUM_LUNS; lun++) {
- struct ahc_cmd *acmd;
-
- dev = ahc_linux_get_device(ahc, channel, target,
- lun, /*alloc*/FALSE);
- if (dev == NULL)
- continue;
-
- printf("DevQ(%d:%d:%d): ",
- channel, target, lun);
- i = 0;
- TAILQ_FOREACH(acmd, &dev->busyq,
- acmd_links.tqe) {
- if (i++ > AHC_SCB_MAX)
- break;
- }
- printf("%d waiting\n", i);
- }
- }
- }
}

static void ahc_linux_exit(void);

+static void ahc_linux_get_width(struct scsi_target *starget)
+{
+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+ struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
+ struct ahc_tmode_tstate *tstate;
+ struct ahc_initiator_tinfo *tinfo
+ = ahc_fetch_transinfo(ahc,
+ starget->channel + 'A',
+ shost->this_id, starget->id, &tstate);
+ spi_width(starget) = tinfo->curr.width;
+}
+
+static void ahc_linux_set_width(struct scsi_target *starget, int width)
+{
+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+ struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
+ struct ahc_devinfo devinfo;
+ unsigned long flags;
+
+ ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
+ starget->channel + 'A', ROLE_INITIATOR);
+ ahc_lock(ahc, &flags);
+ ahc_set_width(ahc, &devinfo, width, AHC_TRANS_GOAL, FALSE);
+ ahc_unlock(ahc, &flags);
+}
+
static void ahc_linux_get_period(struct scsi_target *starget)
{
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
@@ -3378,6 +2681,14 @@ static void ahc_linux_set_period(struct

ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
+
+ /* all PPR requests apart from QAS require wide transfers */
+ if (ppr_options & ~MSG_EXT_PPR_QAS_REQ) {
+ ahc_linux_get_width(starget);
+ if (spi_width(starget) == 0)
+ ppr_options &= MSG_EXT_PPR_QAS_REQ;
+ }
+
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc_lock(ahc, &flags);
ahc_set_syncrate(ahc, &devinfo, syncrate, period, offset,
@@ -3425,32 +2736,6 @@ static void ahc_linux_set_offset(struct
ahc_unlock(ahc, &flags);
}

-static void ahc_linux_get_width(struct scsi_target *starget)
-{
- struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
- struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
- struct ahc_tmode_tstate *tstate;
- struct ahc_initiator_tinfo *tinfo
- = ahc_fetch_transinfo(ahc,
- starget->channel + 'A',
- shost->this_id, starget->id, &tstate);
- spi_width(starget) = tinfo->curr.width;
-}
-
-static void ahc_linux_set_width(struct scsi_target *starget, int width)
-{
- struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
- struct ahc_softc *ahc = *((struct ahc_softc **)shost->hostdata);
- struct ahc_devinfo devinfo;
- unsigned long flags;
-
- ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
- starget->channel + 'A', ROLE_INITIATOR);
- ahc_lock(ahc, &flags);
- ahc_set_width(ahc, &devinfo, width, AHC_TRANS_GOAL, FALSE);
- ahc_unlock(ahc, &flags);
-}
-
static void ahc_linux_get_dt(struct scsi_target *starget)
{
struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
@@ -3481,8 +2766,7 @@ static void ahc_linux_set_dt(struct scsi

ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
- syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
- dt ? AHC_SYNCRATE_DT : AHC_SYNCRATE_ULTRA2);
+ syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);
ahc_lock(ahc, &flags);
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset,
ppr_options, AHC_TRANS_GOAL, FALSE);
@@ -3514,7 +2798,6 @@ static void ahc_linux_set_qas(struct scs
unsigned int ppr_options = tinfo->curr.ppr_options
& ~MSG_EXT_PPR_QAS_REQ;
unsigned int period = tinfo->curr.period;
- unsigned int dt = ppr_options & MSG_EXT_PPR_DT_REQ;
unsigned long flags;
struct ahc_syncrate *syncrate;

@@ -3523,8 +2806,7 @@ static void ahc_linux_set_qas(struct scs

ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
- syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
- dt ? AHC_SYNCRATE_DT : AHC_SYNCRATE_ULTRA2);
+ syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc_lock(ahc, &flags);
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset,
ppr_options, AHC_TRANS_GOAL, FALSE);
@@ -3556,7 +2838,6 @@ static void ahc_linux_set_iu(struct scsi
unsigned int ppr_options = tinfo->curr.ppr_options
& ~MSG_EXT_PPR_IU_REQ;
unsigned int period = tinfo->curr.period;
- unsigned int dt = ppr_options & MSG_EXT_PPR_DT_REQ;
unsigned long flags;
struct ahc_syncrate *syncrate;

@@ -3565,8 +2846,7 @@ static void ahc_linux_set_iu(struct scsi

ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
- syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,
- dt ? AHC_SYNCRATE_DT : AHC_SYNCRATE_ULTRA2);
+ syncrate = ahc_find_syncrate(ahc, &period, &ppr_options, AHC_SYNCRATE_DT);
ahc_lock(ahc, &flags);
ahc_set_syncrate(ahc, &devinfo, syncrate, period, tinfo->curr.offset,
ppr_options, AHC_TRANS_GOAL, FALSE);
@@ -3599,7 +2879,6 @@ static struct spi_function_template ahc_
static int __init
ahc_linux_init(void)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_linux_transport_template = spi_attach_transport(&ahc_linux_transport_functions);
if (!ahc_linux_transport_template)
return -ENODEV;
@@ -3608,29 +2887,11 @@ ahc_linux_init(void)
spi_release_transport(ahc_linux_transport_template);
ahc_linux_exit();
return -ENODEV;
-#else
- scsi_register_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
- if (aic7xxx_driver_template.present == 0) {
- scsi_unregister_module(MODULE_SCSI_HA,
- &aic7xxx_driver_template);
- return (-ENODEV);
- }
-
- return (0);
-#endif
}

static void
ahc_linux_exit(void)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- /*
- * In 2.4 we have to unregister from the PCI core _after_
- * unregistering from the scsi midlayer to avoid dangling
- * references.
- */
- scsi_unregister_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
-#endif
ahc_linux_pci_exit();
ahc_linux_eisa_exit();
spi_release_transport(ahc_linux_transport_template);
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -59,6 +59,7 @@
#ifndef _AIC7XXX_LINUX_H_
#define _AIC7XXX_LINUX_H_

+#include <linux/config.h>
#include <linux/types.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
@@ -66,18 +67,21 @@
#include <linux/pci.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
+#include <linux/interrupt.h>
#include <linux/module.h>
+#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>

-#include <linux/interrupt.h> /* For tasklet support. */
-#include <linux/config.h>
-#include <linux/slab.h>
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>

/* Core SCSI definitions */
#define AIC_LIB_PREFIX ahc
-#include "scsi.h"
-#include <scsi/scsi_host.h>

/* Name space conflict with BSD queue macros */
#ifdef LIST_HEAD
@@ -106,7 +110,7 @@
/************************* Forward Declarations *******************************/
struct ahc_softc;
typedef struct pci_dev *ahc_dev_softc_t;
-typedef Scsi_Cmnd *ahc_io_ctx_t;
+typedef struct scsi_cmnd *ahc_io_ctx_t;

/******************************* Byte Order ***********************************/
#define ahc_htobe16(x) cpu_to_be16(x)
@@ -144,7 +148,7 @@ typedef Scsi_Cmnd *ahc_io_ctx_t;
extern u_int aic7xxx_no_probe;
extern u_int aic7xxx_allow_memio;
extern int aic7xxx_detect_complete;
-extern Scsi_Host_Template aic7xxx_driver_template;
+extern struct scsi_host_template aic7xxx_driver_template;

/***************************** Bus Space/DMA **********************************/

@@ -174,11 +178,7 @@ struct ahc_linux_dma_tag
};
typedef struct ahc_linux_dma_tag* bus_dma_tag_t;

-struct ahc_linux_dmamap
-{
- dma_addr_t bus_addr;
-};
-typedef struct ahc_linux_dmamap* bus_dmamap_t;
+typedef dma_addr_t bus_dmamap_t;

typedef int bus_dma_filter_t(void*, dma_addr_t);
typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int);
@@ -281,12 +281,6 @@ ahc_scb_timer_reset(struct scb *scb, u_i
/***************************** SMP support ************************************/
#include <linux/spinlock.h>

-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) || defined(SCSI_HAS_HOST_LOCK))
-#define AHC_SCSI_HAS_HOST_LOCK 1
-#else
-#define AHC_SCSI_HAS_HOST_LOCK 0
-#endif
-
#define AIC7XXX_DRIVER_VERSION "6.2.36"

/**************************** Front End Queues ********************************/
@@ -328,20 +322,15 @@ struct ahc_cmd {
*/
TAILQ_HEAD(ahc_busyq, ahc_cmd);
typedef enum {
- AHC_DEV_UNCONFIGURED = 0x01,
AHC_DEV_FREEZE_TIL_EMPTY = 0x02, /* Freeze queue until active == 0 */
- AHC_DEV_TIMER_ACTIVE = 0x04, /* Our timer is active */
- AHC_DEV_ON_RUN_LIST = 0x08, /* Queued to be run later */
AHC_DEV_Q_BASIC = 0x10, /* Allow basic device queuing */
AHC_DEV_Q_TAGGED = 0x20, /* Allow full SCSI2 command queueing */
AHC_DEV_PERIODIC_OTAG = 0x40, /* Send OTAG to prevent starvation */
- AHC_DEV_SLAVE_CONFIGURED = 0x80 /* slave_configure() has been called */
} ahc_linux_dev_flags;

struct ahc_linux_target;
struct ahc_linux_device {
TAILQ_ENTRY(ahc_linux_device) links;
- struct ahc_busyq busyq;

/*
* The number of transactions currently
@@ -382,11 +371,6 @@ struct ahc_linux_device {
ahc_linux_dev_flags flags;

/*
- * Per device timer.
- */
- struct timer_list timer;
-
- /*
* The high limit for the tags variable.
*/
u_int maxtags;
@@ -419,7 +403,7 @@ struct ahc_linux_device {
#define AHC_OTAG_THRESH 500

int lun;
- Scsi_Device *scsi_device;
+ struct scsi_device *scsi_device;
struct ahc_linux_target *target;
};

@@ -439,32 +423,16 @@ struct ahc_linux_target {
* manner and are allocated below 4GB, the number of S/G segments is
* unrestricted.
*/
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-/*
- * We dynamically adjust the number of segments in pre-2.5 kernels to
- * avoid fragmentation issues in the SCSI mid-layer's private memory
- * allocator. See aic7xxx_osm.c ahc_linux_size_nseg() for details.
- */
-extern u_int ahc_linux_nseg;
-#define AHC_NSEG ahc_linux_nseg
-#define AHC_LINUX_MIN_NSEG 64
-#else
#define AHC_NSEG 128
-#endif

/*
* Per-SCB OSM storage.
*/
-typedef enum {
- AHC_UP_EH_SEMAPHORE = 0x1
-} ahc_linux_scb_flags;
-
struct scb_platform_data {
struct ahc_linux_device *dev;
dma_addr_t buf_busaddr;
uint32_t xfer_len;
uint32_t sense_resid; /* Auto-Sense residual */
- ahc_linux_scb_flags flags;
};

/*
@@ -473,39 +441,24 @@ struct scb_platform_data {
* alignment restrictions of the various platforms supported by
* this driver.
*/
-typedef enum {
- AHC_RUN_CMPLT_Q_TIMER = 0x10
-} ahc_linux_softc_flags;
-
-TAILQ_HEAD(ahc_completeq, ahc_cmd);
-
struct ahc_platform_data {
/*
* Fields accessed from interrupt context.
*/
struct ahc_linux_target *targets[AHC_NUM_TARGETS];
- TAILQ_HEAD(, ahc_linux_device) device_runq;
- struct ahc_completeq completeq;

spinlock_t spin_lock;
- struct tasklet_struct runq_tasklet;
u_int qfrozen;
- pid_t dv_pid;
- struct timer_list completeq_timer;
struct timer_list reset_timer;
struct semaphore eh_sem;
- struct semaphore dv_sem;
- struct semaphore dv_cmd_sem; /* XXX This needs to be in
- * the target struct
- */
- struct scsi_device *dv_scsi_dev;
struct Scsi_Host *host; /* pointer to scsi host */
#define AHC_LINUX_NOIRQ ((uint32_t)~0)
uint32_t irq; /* IRQ for this adapter */
uint32_t bios_address;
uint32_t mem_busaddr; /* Mem Base Addr */
- uint64_t hw_dma_mask;
- ahc_linux_softc_flags flags;
+
+#define AHC_UP_EH_SEMAPHORE 0x1
+ uint32_t flags;
};

/************************** OS Utility Wrappers *******************************/
@@ -594,7 +547,7 @@ ahc_insb(struct ahc_softc * ahc, long po

/**************************** Initialization **********************************/
int ahc_linux_register_host(struct ahc_softc *,
- Scsi_Host_Template *);
+ struct scsi_host_template *);

uint64_t ahc_linux_get_memsize(void);

@@ -615,17 +568,6 @@ static __inline void ahc_lockinit(struct
static __inline void ahc_lock(struct ahc_softc *, unsigned long *flags);
static __inline void ahc_unlock(struct ahc_softc *, unsigned long *flags);

-/* Lock acquisition and release of the above lock in midlayer entry points. */
-static __inline void ahc_midlayer_entrypoint_lock(struct ahc_softc *,
- unsigned long *flags);
-static __inline void ahc_midlayer_entrypoint_unlock(struct ahc_softc *,
- unsigned long *flags);
-
-/* Lock held during command compeletion to the upper layer */
-static __inline void ahc_done_lockinit(struct ahc_softc *);
-static __inline void ahc_done_lock(struct ahc_softc *, unsigned long *flags);
-static __inline void ahc_done_unlock(struct ahc_softc *, unsigned long *flags);
-
/* Lock held during ahc_list manipulation and ahc softc frees */
extern spinlock_t ahc_list_spinlock;
static __inline void ahc_list_lockinit(void);
@@ -651,57 +593,6 @@ ahc_unlock(struct ahc_softc *ahc, unsign
}

static __inline void
-ahc_midlayer_entrypoint_lock(struct ahc_softc *ahc, unsigned long *flags)
-{
- /*
- * In 2.5.X and some 2.4.X versions, the midlayer takes our
- * lock just before calling us, so we avoid locking again.
- * For other kernel versions, the io_request_lock is taken
- * just before our entry point is called. In this case, we
- * trade the io_request_lock for our per-softc lock.
- */
-#if AHC_SCSI_HAS_HOST_LOCK == 0
- spin_unlock(&io_request_lock);
- spin_lock(&ahc->platform_data->spin_lock);
-#endif
-}
-
-static __inline void
-ahc_midlayer_entrypoint_unlock(struct ahc_softc *ahc, unsigned long *flags)
-{
-#if AHC_SCSI_HAS_HOST_LOCK == 0
- spin_unlock(&ahc->platform_data->spin_lock);
- spin_lock(&io_request_lock);
-#endif
-}
-
-static __inline void
-ahc_done_lockinit(struct ahc_softc *ahc)
-{
- /*
- * In 2.5.X, our own lock is held during completions.
- * In previous versions, the io_request_lock is used.
- * In either case, we can't initialize this lock again.
- */
-}
-
-static __inline void
-ahc_done_lock(struct ahc_softc *ahc, unsigned long *flags)
-{
-#if AHC_SCSI_HAS_HOST_LOCK == 0
- spin_lock_irqsave(&io_request_lock, *flags);
-#endif
-}
-
-static __inline void
-ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
-{
-#if AHC_SCSI_HAS_HOST_LOCK == 0
- spin_unlock_irqrestore(&io_request_lock, *flags);
-#endif
-}
-
-static __inline void
ahc_list_lockinit(void)
{
spin_lock_init(&ahc_list_spinlock);
@@ -767,12 +658,6 @@ typedef enum
} ahc_power_state;

/**************************** VL/EISA Routines ********************************/
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) \
- && (defined(__i386__) || defined(__alpha__)) \
- && (!defined(CONFIG_EISA)))
-#define CONFIG_EISA
-#endif
-
#ifdef CONFIG_EISA
extern uint32_t aic7xxx_probe_eisa_vl;
int ahc_linux_eisa_init(void);
@@ -888,22 +773,18 @@ ahc_flush_device_writes(struct ahc_softc
}

/**************************** Proc FS Support *********************************/
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-int ahc_linux_proc_info(char *, char **, off_t, int, int, int);
-#else
int ahc_linux_proc_info(struct Scsi_Host *, char *, char **,
off_t, int, int);
-#endif

/*************************** Domain Validation ********************************/
/*********************** Transaction Access Wrappers *************************/
-static __inline void ahc_cmd_set_transaction_status(Scsi_Cmnd *, uint32_t);
+static __inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
static __inline void ahc_set_transaction_status(struct scb *, uint32_t);
-static __inline void ahc_cmd_set_scsi_status(Scsi_Cmnd *, uint32_t);
+static __inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
static __inline void ahc_set_scsi_status(struct scb *, uint32_t);
-static __inline uint32_t ahc_cmd_get_transaction_status(Scsi_Cmnd *cmd);
+static __inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd);
static __inline uint32_t ahc_get_transaction_status(struct scb *);
-static __inline uint32_t ahc_cmd_get_scsi_status(Scsi_Cmnd *cmd);
+static __inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd);
static __inline uint32_t ahc_get_scsi_status(struct scb *);
static __inline void ahc_set_transaction_tag(struct scb *, int, u_int);
static __inline u_long ahc_get_transfer_length(struct scb *);
@@ -922,7 +803,7 @@ static __inline void ahc_platform_scb_fr
static __inline void ahc_freeze_scb(struct scb *scb);

static __inline
-void ahc_cmd_set_transaction_status(Scsi_Cmnd *cmd, uint32_t status)
+void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
{
cmd->result &= ~(CAM_STATUS_MASK << 16);
cmd->result |= status << 16;
@@ -935,7 +816,7 @@ void ahc_set_transaction_status(struct s
}

static __inline
-void ahc_cmd_set_scsi_status(Scsi_Cmnd *cmd, uint32_t status)
+void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
{
cmd->result &= ~0xFFFF;
cmd->result |= status;
@@ -948,7 +829,7 @@ void ahc_set_scsi_status(struct scb *scb
}

static __inline
-uint32_t ahc_cmd_get_transaction_status(Scsi_Cmnd *cmd)
+uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd)
{
return ((cmd->result >> 16) & CAM_STATUS_MASK);
}
@@ -960,7 +841,7 @@ uint32_t ahc_get_transaction_status(stru
}

static __inline
-uint32_t ahc_cmd_get_scsi_status(Scsi_Cmnd *cmd)
+uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd)
{
return (cmd->result & 0xFFFF);
}
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -221,13 +221,11 @@ ahc_linux_pci_dev_probe(struct pci_dev *
&& ahc_linux_get_memsize() > 0x80000000
&& pci_set_dma_mask(pdev, mask_39bit) == 0) {
ahc->flags |= AHC_39BIT_ADDRESSING;
- ahc->platform_data->hw_dma_mask = mask_39bit;
} else {
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
return (-ENODEV);
}
- ahc->platform_data->hw_dma_mask = DMA_32BIT_MASK;
}
ahc->dev_softc = pci;
error = ahc_pci_config(ahc, entry);
@@ -236,15 +234,8 @@ ahc_linux_pci_dev_probe(struct pci_dev *
return (-error);
}
pci_set_drvdata(pdev, ahc);
- if (aic7xxx_detect_complete) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ if (aic7xxx_detect_complete)
ahc_linux_register_host(ahc, &aic7xxx_driver_template);
-#else
- printf("aic7xxx: ignoring PCI device found after "
- "initialization\n");
- return (-ENODEV);
-#endif
- }
return (0);
}

--- a/drivers/scsi/aic7xxx/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c
@@ -289,13 +289,8 @@ done:
* Return information to handle /proc support for the driver.
*/
int
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-ahc_linux_proc_info(char *buffer, char **start, off_t offset,
- int length, int hostno, int inout)
-#else
ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
off_t offset, int length, int inout)
-#endif
{
struct ahc_softc *ahc;
struct info_str info;
@@ -307,15 +302,7 @@ ahc_linux_proc_info(struct Scsi_Host *sh

retval = -EINVAL;
ahc_list_lock(&s);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- TAILQ_FOREACH(ahc, &ahc_tailq, links) {
- if (ahc->platform_data->host->host_no == hostno)
- break;
- }
-#else
ahc = ahc_find_softc(*(struct ahc_softc **)shost->hostdata);
-#endif
-
if (ahc == NULL)
goto done;

--- a/drivers/scsi/aic7xxx/aiclib.c
+++ b/drivers/scsi/aic7xxx/aiclib.c
@@ -35,7 +35,6 @@
#include <linux/version.h>

/* Core SCSI definitions */
-#include "scsi.h"
#include <scsi/scsi_host.h>
#include "aiclib.h"
#include "cam.h"
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -35,7 +35,7 @@

#define SPI_PRINTK(x, l, f, a...) dev_printk(l, &(x)->dev, f , ##a)

-#define SPI_NUM_ATTRS 10 /* increase this if you add attributes */
+#define SPI_NUM_ATTRS 13 /* increase this if you add attributes */
#define SPI_OTHER_ATTRS 1 /* Increase this if you add "always
* on" attributes */
#define SPI_HOST_ATTRS 1
@@ -219,8 +219,11 @@ static int spi_setup_transport_attrs(str
struct scsi_target *starget = to_scsi_target(dev);

spi_period(starget) = -1; /* illegal value */
+ spi_min_period(starget) = 0;
spi_offset(starget) = 0; /* async */
+ spi_max_offset(starget) = 255;
spi_width(starget) = 0; /* narrow */
+ spi_max_width(starget) = 1;
spi_iu(starget) = 0; /* no IU */
spi_dt(starget) = 0; /* ST */
spi_qas(starget) = 0;
@@ -235,6 +238,34 @@ static int spi_setup_transport_attrs(str
return 0;
}

+#define spi_transport_show_simple(field, format_string) \
+ \
+static ssize_t \
+show_spi_transport_##field(struct class_device *cdev, char *buf) \
+{ \
+ struct scsi_target *starget = transport_class_to_starget(cdev); \
+ struct spi_transport_attrs *tp; \
+ \
+ tp = (struct spi_transport_attrs *)&starget->starget_data; \
+ return snprintf(buf, 20, format_string, tp->field); \
+}
+
+#define spi_transport_store_simple(field, format_string) \
+ \
+static ssize_t \
+store_spi_transport_##field(struct class_device *cdev, const char *buf, \
+ size_t count) \
+{ \
+ int val; \
+ struct scsi_target *starget = transport_class_to_starget(cdev); \
+ struct spi_transport_attrs *tp; \
+ \
+ tp = (struct spi_transport_attrs *)&starget->starget_data; \
+ val = simple_strtoul(buf, NULL, 0); \
+ tp->field = val; \
+ return count; \
+}
+
#define spi_transport_show_function(field, format_string) \
\
static ssize_t \
@@ -261,6 +292,25 @@ store_spi_transport_##field(struct class
struct spi_internal *i = to_spi_internal(shost->transportt); \
\
val = simple_strtoul(buf, NULL, 0); \
+ i->f->set_##field(starget, val); \
+ return count; \
+}
+
+#define spi_transport_store_max(field, format_string) \
+static ssize_t \
+store_spi_transport_##field(struct class_device *cdev, const char *buf, \
+ size_t count) \
+{ \
+ int val; \
+ struct scsi_target *starget = transport_class_to_starget(cdev); \
+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); \
+ struct spi_internal *i = to_spi_internal(shost->transportt); \
+ struct spi_transport_attrs *tp \
+ = (struct spi_transport_attrs *)&starget->starget_data; \
+ \
+ val = simple_strtoul(buf, NULL, 0); \
+ if (val > tp->max_##field) \
+ val = tp->max_##field; \
i->f->set_##field(starget, val); \
return count; \
}
@@ -272,9 +322,24 @@ static CLASS_DEVICE_ATTR(field, S_IRUGO
show_spi_transport_##field, \
store_spi_transport_##field);

+#define spi_transport_simple_attr(field, format_string) \
+ spi_transport_show_simple(field, format_string) \
+ spi_transport_store_simple(field, format_string) \
+static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR, \
+ show_spi_transport_##field, \
+ store_spi_transport_##field);
+
+#define spi_transport_max_attr(field, format_string) \
+ spi_transport_show_function(field, format_string) \
+ spi_transport_store_max(field, format_string) \
+ spi_transport_simple_attr(max_##field, format_string) \
+static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR, \
+ show_spi_transport_##field, \
+ store_spi_transport_##field);
+
/* The Parallel SCSI Tranport Attributes: */
-spi_transport_rd_attr(offset, "%d\n");
-spi_transport_rd_attr(width, "%d\n");
+spi_transport_max_attr(offset, "%d\n");
+spi_transport_max_attr(width, "%d\n");
spi_transport_rd_attr(iu, "%d\n");
spi_transport_rd_attr(dt, "%d\n");
spi_transport_rd_attr(qas, "%d\n");
@@ -300,26 +365,18 @@ static CLASS_DEVICE_ATTR(revalidate, S_I

/* Translate the period into ns according to the current spec
* for SDTR/PPR messages */
-static ssize_t show_spi_transport_period(struct class_device *cdev, char *buf)
-
+static ssize_t
+show_spi_transport_period_helper(struct class_device *cdev, char *buf,
+ int period)
{
- struct scsi_target *starget = transport_class_to_starget(cdev);
- struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
- struct spi_transport_attrs *tp;
int len, picosec;
- struct spi_internal *i = to_spi_internal(shost->transportt);
-
- tp = (struct spi_transport_attrs *)&starget->starget_data;
-
- if (i->f->get_period)
- i->f->get_period(starget);

- if (tp->period < 0 || tp->period > 0xff) {
+ if (period < 0 || period > 0xff) {
picosec = -1;
- } else if (tp->period <= SPI_STATIC_PPR) {
- picosec = ppr_to_ps[tp->period];
+ } else if (period <= SPI_STATIC_PPR) {
+ picosec = ppr_to_ps[period];
} else {
- picosec = tp->period * 4000;
+ picosec = period * 4000;
}

if (picosec == -1) {
@@ -334,12 +391,9 @@ static ssize_t show_spi_transport_period
}

static ssize_t
-store_spi_transport_period(struct class_device *cdev, const char *buf,
- size_t count)
+store_spi_transport_period_helper(struct class_device *cdev, const char *buf,
+ size_t count, int *periodp)
{
- struct scsi_target *starget = transport_class_to_starget(cdev);
- struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
- struct spi_internal *i = to_spi_internal(shost->transportt);
int j, picosec, period = -1;
char *endp;

@@ -368,15 +422,79 @@ store_spi_transport_period(struct class_
if (period > 0xff)
period = 0xff;

- i->f->set_period(starget, period);
+ *periodp = period;

return count;
}

+static ssize_t
+show_spi_transport_period(struct class_device *cdev, char *buf)
+{
+ struct scsi_target *starget = transport_class_to_starget(cdev);
+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+ struct spi_internal *i = to_spi_internal(shost->transportt);
+ struct spi_transport_attrs *tp =
+ (struct spi_transport_attrs *)&starget->starget_data;
+
+ if (i->f->get_period)
+ i->f->get_period(starget);
+
+ return show_spi_transport_period_helper(cdev, buf, tp->period);
+}
+
+static ssize_t
+store_spi_transport_period(struct class_device *cdev, const char *buf,
+ size_t count)
+{
+ struct scsi_target *starget = transport_class_to_starget(cdev);
+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+ struct spi_internal *i = to_spi_internal(shost->transportt);
+ struct spi_transport_attrs *tp =
+ (struct spi_transport_attrs *)&starget->starget_data;
+ int period, retval;
+
+ retval = store_spi_transport_period_helper(cdev, buf, count, &period);
+
+ if (period < tp->min_period)
+ period = tp->min_period;
+
+ i->f->set_period(starget, period);
+
+ return retval;
+}
+
static CLASS_DEVICE_ATTR(period, S_IRUGO | S_IWUSR,
show_spi_transport_period,
store_spi_transport_period);

+static ssize_t
+show_spi_transport_min_period(struct class_device *cdev, char *buf)
+{
+ struct scsi_target *starget = transport_class_to_starget(cdev);
+ struct spi_transport_attrs *tp =
+ (struct spi_transport_attrs *)&starget->starget_data;
+
+ return show_spi_transport_period_helper(cdev, buf, tp->min_period);
+}
+
+static ssize_t
+store_spi_transport_min_period(struct class_device *cdev, const char *buf,
+ size_t count)
+{
+ struct scsi_target *starget = transport_class_to_starget(cdev);
+ struct spi_transport_attrs *tp =
+ (struct spi_transport_attrs *)&starget->starget_data;
+
+ return store_spi_transport_period_helper(cdev, buf, count,
+ &tp->min_period);
+}
+
+
+static CLASS_DEVICE_ATTR(min_period, S_IRUGO | S_IWUSR,
+ show_spi_transport_min_period,
+ store_spi_transport_min_period);
+
+
static ssize_t show_spi_host_signalling(struct class_device *cdev, char *buf)
{
struct Scsi_Host *shost = transport_class_to_shost(cdev);
@@ -642,6 +760,7 @@ spi_dv_device_internal(struct scsi_reque
{
struct spi_internal *i = to_spi_internal(sreq->sr_host->transportt);
struct scsi_device *sdev = sreq->sr_device;
+ struct scsi_target *starget = sdev->sdev_target;
int len = sdev->inquiry_len;
/* first set us up for narrow async */
DV_SET(offset, 0);
@@ -655,9 +774,11 @@ spi_dv_device_internal(struct scsi_reque
}

/* test width */
- if (i->f->set_width && sdev->wdtr) {
+ if (i->f->set_width && spi_max_width(starget) && sdev->wdtr) {
i->f->set_width(sdev->sdev_target, 1);

+ printk("WIDTH IS %d\n", spi_max_width(starget));
+
if (spi_dv_device_compare_inquiry(sreq, buffer,
buffer + len,
DV_LOOPS)
@@ -684,8 +805,8 @@ spi_dv_device_internal(struct scsi_reque
retry:

/* now set up to the maximum */
- DV_SET(offset, 255);
- DV_SET(period, 1);
+ DV_SET(offset, spi_max_offset(starget));
+ DV_SET(period, spi_min_period(starget));

if (len == 0) {
SPI_PRINTK(sdev->sdev_target, KERN_INFO, "Domain Validation skipping write tests\n");
@@ -892,6 +1013,16 @@ EXPORT_SYMBOL(spi_display_xfer_agreement
if (i->f->show_##field) \
count++

+#define SETUP_RELATED_ATTRIBUTE(field, rel_field) \
+ i->private_attrs[count] = class_device_attr_##field; \
+ if (!i->f->set_##rel_field) { \
+ i->private_attrs[count].attr.mode = S_IRUGO; \
+ i->private_attrs[count].store = NULL; \
+ } \
+ i->attrs[count] = &i->private_attrs[count]; \
+ if (i->f->show_##rel_field) \
+ count++
+
#define SETUP_HOST_ATTRIBUTE(field) \
i->private_host_attrs[count] = class_device_attr_##field; \
if (!i->f->set_##field) { \
@@ -975,8 +1106,11 @@ spi_attach_transport(struct spi_function
i->f = ft;

SETUP_ATTRIBUTE(period);
+ SETUP_RELATED_ATTRIBUTE(min_period, period);
SETUP_ATTRIBUTE(offset);
+ SETUP_RELATED_ATTRIBUTE(max_offset, offset);
SETUP_ATTRIBUTE(width);
+ SETUP_RELATED_ATTRIBUTE(max_width, width);
SETUP_ATTRIBUTE(iu);
SETUP_ATTRIBUTE(dt);
SETUP_ATTRIBUTE(qas);
--- a/include/scsi/scsi_transport_spi.h
+++ b/include/scsi/scsi_transport_spi.h
@@ -27,8 +27,11 @@ struct scsi_transport_template;

struct spi_transport_attrs {
int period; /* value in the PPR/SDTR command */
+ int min_period;
int offset;
+ int max_offset;
unsigned int width:1; /* 0 - narrow, 1 - wide */
+ unsigned int max_width:1;
unsigned int iu:1; /* Information Units enabled */
unsigned int dt:1; /* DT clocking enabled */
unsigned int qas:1; /* Quick Arbitration and Selection enabled */
@@ -63,8 +66,11 @@ struct spi_host_attrs {

/* accessor functions */
#define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period)
+#define spi_min_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->min_period)
#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset)
+#define spi_max_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_offset)
#define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width)
+#define spi_max_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_width)
#define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu)
#define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt)
#define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas)


2005-05-20 01:05:45

by K.R. Foley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
> On Thu, 2005-05-19 at 15:21 +0530, Dinakar Guniguntala wrote:
>
>>This doesn't seem to fix the problem :(
>>I tried both 2.6.12-rc4+patch and 2.6.4-rc4-mm1+patch
>
>
> Well ... great, it doesn't work for anyone, sigh.
>
> OK, could you try this one (also against vanilla 2.6.12-rc4). Hopefully
> it's a rollup of all the aic7xxx changes plus the necessary supporting
> infrastructure in my scsi-misc tree.
>
> If it works, trying to get it into a patch set for Linus is going to be
> a right pain ...
>
> James
>
<snip>

James,

It does work with the exception that my u160 drive is still identified
as 80MB/s.


May 19 19:36:46 porky kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 19:36:46 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 19:36:46 porky kernel: aic7899: Ultra160 Wide Channel A,
SCSI Id=7, 32/253 SCBs
May 19 19:36:46 porky kernel:
May 19 19:36:46 porky kernel: Vendor: QUANTUM Model:
ATLAS10K2-TY092L Rev: DA40
May 19 19:36:46 porky kernel: Type: Direct-Access
ANSI SCSI revision: 03
May 19 19:36:46 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
May 19 19:36:46 porky kernel: target0:0:0: Beginning Domain Validation
May 19 19:36:46 porky kernel: WIDTH IS 1
May 19 19:36:46 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
May 19 19:36:46 porky kernel: (scsi0:A:0): 80.000MB/s transfers
(40.000MHz, offset 127, 16bit)
May 19 19:36:46 porky kernel: target0:0:0: Ending Domain Validation
May 19 19:36:46 porky kernel: scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 19:36:46 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 19:36:46 porky kernel: aic7899: Ultra160 Wide Channel B,
SCSI Id=7, 32/253 SCBs
May 19 19:36:46 porky kernel:
May 19 19:36:46 porky kernel: Vendor: SEAGATE Model: SX118273LC
Rev: 6679
May 19 19:36:46 porky kernel: Type: Direct-Access
ANSI SCSI revision: 02
May 19 19:36:46 porky kernel: scsi1:A:0:0: Tagged Queuing enabled. Depth 32
May 19 19:36:46 porky kernel: target1:0:0: Beginning Domain Validation
May 19 19:36:46 porky kernel: target1:0:0: Domain Validation skipping
write tests
May 19 19:36:46 porky kernel: (scsi1:A:0): 20.000MB/s transfers
(20.000MHz, offset 15)
May 19 19:36:46 porky kernel: target1:0:0: Ending Domain Validation
May 19 19:36:46 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 19:36:46 porky kernel: SCSI device sda: drive cache: write back
May 19 19:36:46 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 19:36:46 porky kernel: SCSI device sda: drive cache: write back
May 19 19:36:46 porky kernel: sda: sda1 sda2 sda3
May 19 19:36:46 porky kernel: Attached scsi disk sda at scsi0, channel
0, id 0, lun 0
May 19 19:36:46 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 19 19:36:46 porky kernel: SCSI device sdb: drive cache: write through
May 19 19:36:46 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 19 19:36:46 porky kernel: SCSI device sdb: drive cache: write through
May 19 14:36:26 porky rc.sysinit: -e
May 19 19:36:46 porky kernel: sdb: sdb1
May 19 14:36:28 porky udevsend[1227]: starting udevd daemon
May 19 19:36:46 porky kernel: Attached scsi disk sdb at scsi1, channel
0, id 0, lun 0
May 19 14:36:28 porky scsi.agent[1239]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.0/host0/target0:0:0/0:0:0:0
May 19 19:36:46 porky kernel: Attached scsi generic sg0 at scsi0,
channel 0, id 0, lun 0, type 0
May 19 14:36:28 porky scsi.agent[1264]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.1/host1/target1:0:0/1:0:0:0
May 19 19:36:46 porky kernel: Attached scsi generic sg1 at scsi1,
channel 0, id 0, lun 0, type 0



--
kr

2005-05-20 01:17:52

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-19 at 20:05 -0500, K.R. Foley wrote:
> It does work with the exception that my u160 drive is still identified
> as 80MB/s.

Well, that's some good news, at least.

> May 19 19:36:46 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
> May 19 19:36:46 porky kernel: target0:0:0: Beginning Domain Validation
> May 19 19:36:46 porky kernel: WIDTH IS 1
> May 19 19:36:46 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
> May 19 19:36:46 porky kernel: (scsi0:A:0): 80.000MB/s transfers
> (40.000MHz, offset 127, 16bit)

OK, it looks like the period is limited to 25ns. Could you confirm
this?

cat /sys/class/spi_transport/target0:0:0/period
cat /sys/class/spi_transport/target0:0:0/max_period

Now, if the max_period is 25, try doing

echo 12.5 > /sys/class/spi_transport/target0:0:0/max_period

and then

echo 1 > /sys/class/spi_transport/target0:0:0/revalidate

to trigger a revalidation of the domain and see if it comes up to 160.

Thanks,

James


2005-05-20 01:32:28

by K.R. Foley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
> On Thu, 2005-05-19 at 20:05 -0500, K.R. Foley wrote:
>
>>It does work with the exception that my u160 drive is still identified
>>as 80MB/s.
>
>
> Well, that's some good news, at least.
>
>
>>May 19 19:36:46 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
>>May 19 19:36:46 porky kernel: target0:0:0: Beginning Domain Validation
>>May 19 19:36:46 porky kernel: WIDTH IS 1
>>May 19 19:36:46 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
>>May 19 19:36:46 porky kernel: (scsi0:A:0): 80.000MB/s transfers
>>(40.000MHz, offset 127, 16bit)
>
>
> OK, it looks like the period is limited to 25ns. Could you confirm
> this?
>
> cat /sys/class/spi_transport/target0:0:0/period

this is 25

> cat /sys/class/spi_transport/target0:0:0/max_period

this doesn't exist, but i bet you knew that

>
> Now, if the max_period is 25, try doing
>
> echo 12.5 > /sys/class/spi_transport/target0:0:0/max_period

actually put this into period but it didn't take :-( period is still 25
and before you ask min_period is 12.5

>
> and then
>
> echo 1 > /sys/class/spi_transport/target0:0:0/revalidate

did this anyway and this is what i got

May 19 20:21:45 porky kernel: target0:0:0: Beginning Domain Validation
May 19 20:21:45 porky kernel: (scsi0:A:0): 3.300MB/s transfers
May 19 20:21:45 porky kernel: WIDTH IS 1
May 19 20:21:46 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
May 19 20:21:46 porky kernel: (scsi0:A:0): 80.000MB/s transfers
(40.000MHz, offset 127, 16bit)
May 19 20:21:46 porky kernel: target0:0:0: Ending Domain Validation

Any idea why I can't set the period to 12.5? I am going to see if
anything jumps out at me.

>
> to trigger a revalidation of the domain and see if it comes up to 160.
>
> Thanks,
>
> James
>
>
>


--
kr

2005-05-20 01:34:22

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-19 at 20:32 -0500, K.R. Foley wrote:
> > cat /sys/class/spi_transport/target0:0:0/max_period
>
> this doesn't exist, but i bet you knew that

Doh, sorry, brain malfunction. That should be min_period ...

James


2005-05-20 01:40:51

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-19 at 20:32 -0500, K.R. Foley wrote:
> Any idea why I can't set the period to 12.5? I am going to see if
> anything jumps out at me.

what's the dt setting? if it's zero, try setting it to one and then
lowering the period to 12.5 but don't trigger a revalidate this time,
try reading or writing to the disk and then see what the settings come
back as.

James


2005-05-20 01:55:05

by K.R. Foley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
> On Thu, 2005-05-19 at 20:32 -0500, K.R. Foley wrote:
>
>>Any idea why I can't set the period to 12.5? I am going to see if
>>anything jumps out at me.
>
>
> what's the dt setting? if it's zero, try setting it to one and then
> lowering the period to 12.5 but don't trigger a revalidate this time,
> try reading or writing to the disk and then see what the settings come
> back as.
>
> James
>
>
>
the dt setting is 0. can't set it to 1, at least not so that you can see
it stay that way. tried setting period to 12.5, stays at 25. min_period
is set to 12.5 but doesn't seem to matter. what's next :)

--
kr

2005-05-20 02:30:49

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-19 at 20:54 -0500, K.R. Foley wrote:
> the dt setting is 0. can't set it to 1, at least not so that you can see
> it stay that way. tried setting period to 12.5, stays at 25. min_period
> is set to 12.5 but doesn't seem to matter. what's next :)

Well, I think it's my fault. I naively assumed the aic7xxx core setting
code would do the right thing with coupled parameters, which, as I read
through it, apparently it doesn't do.

My excuse is that I can't test any of this because my fastest aic7xxx
card is only a U2 ...

Could you try this, I think it does the correct thing with the coupled
parameters.

Thanks,

James

--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2679,6 +2679,11 @@ static void ahc_linux_set_period(struct
if (offset == 0)
offset = MAX_OFFSET;

+ if (period < 9)
+ period = 9; /* 12.5ns is our minimum */
+ if (period == 9)
+ ppr_options |= MSG_EXT_PPR_DT_REQ;
+
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);

@@ -2764,6 +2769,12 @@ static void ahc_linux_set_dt(struct scsi
unsigned long flags;
struct ahc_syncrate *syncrate;

+ if (dt) {
+ period = 9; /* 12.5ns is the only period valid for DT */
+ ppr_options |= MSG_EXT_PPR_DT_REQ;
+ } else if (period == 9)
+ period = 10; /* if resetting DT, period must be >= 25ns */
+
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);


2005-05-20 03:06:26

by K.R. Foley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
> On Thu, 2005-05-19 at 20:54 -0500, K.R. Foley wrote:
>
>>the dt setting is 0. can't set it to 1, at least not so that you can see
>>it stay that way. tried setting period to 12.5, stays at 25. min_period
>>is set to 12.5 but doesn't seem to matter. what's next :)
>
>
> Well, I think it's my fault. I naively assumed the aic7xxx core setting
> code would do the right thing with coupled parameters, which, as I read
> through it, apparently it doesn't do.
>
> My excuse is that I can't test any of this because my fastest aic7xxx
> card is only a U2 ...
>
> Could you try this, I think it does the correct thing with the coupled
> parameters.
>
> Thanks,
>
> James
>

James,

Looks like a winner this time. If there is something else I can test,
just let me know.


May 19 21:46:43 porky kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 21:46:43 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 21:46:43 porky kernel: aic7899: Ultra160 Wide Channel A,
SCSI Id=7, 32/253 SCBs
May 19 21:46:43 porky kernel:
May 19 21:46:43 porky kernel: Vendor: QUANTUM Model:
ATLAS10K2-TY092L Rev: DA40
May 19 21:46:43 porky kernel: Type: Direct-Access
ANSI SCSI revision: 03
May 19 21:46:43 porky kernel: scsi0:A:0:0: Tagged Queuing enabled. Depth 32
May 19 21:46:43 porky kernel: target0:0:0: Beginning Domain Validation
May 19 21:46:43 porky kernel: WIDTH IS 1
May 19 21:46:43 porky kernel: (scsi0:A:0): 6.600MB/s transfers (16bit)
May 19 21:46:43 porky kernel: (scsi0:A:0): 160.000MB/s transfers
(80.000MHz DT, offset 127, 16bit)
May 19 21:46:43 porky kernel: target0:0:0: Ending Domain Validation
May 19 21:46:43 porky kernel: scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI
HBA DRIVER, Rev 6.2.36
May 19 21:46:43 porky kernel: <Adaptec aic7899 Ultra160 SCSI
adapter>
May 19 21:46:43 porky kernel: aic7899: Ultra160 Wide Channel B,
SCSI Id=7, 32/253 SCBs
May 19 21:46:43 porky kernel:
May 19 21:46:43 porky kernel: Vendor: SEAGATE Model: SX118273LC
Rev: 6679
May 19 21:46:43 porky kernel: Type: Direct-Access
ANSI SCSI revision: 02
May 19 21:46:43 porky kernel: scsi1:A:0:0: Tagged Queuing enabled. Depth 32
May 19 21:46:43 porky kernel: target1:0:0: Beginning Domain Validation
May 19 21:46:43 porky kernel: target1:0:0: Domain Validation skipping
write tests
May 19 21:46:44 porky kernel: (scsi1:A:0): 20.000MB/s transfers
(20.000MHz, offset 15)
May 19 21:46:44 porky kernel: target1:0:0: Ending Domain Validation
May 19 21:46:44 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 21:46:44 porky kernel: SCSI device sda: drive cache: write back
May 19 21:46:44 porky kernel: SCSI device sda: 17783239 512-byte hdwr
sectors (9105 MB)
May 19 21:46:44 porky kernel: SCSI device sda: drive cache: write back
May 19 21:46:44 porky kernel: sda: sda1 sda2 sda3
May 19 21:46:44 porky kernel: Attached scsi disk sda at scsi0, channel
0, id 0, lun 0
May 19 21:46:44 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 19 21:46:44 porky kernel: SCSI device sdb: drive cache: write through
May 19 21:46:44 porky kernel: SCSI device sdb: 35566480 512-byte hdwr
sectors (18210 MB)
May 19 21:46:44 porky kernel: SCSI device sdb: drive cache: write through
May 19 21:46:44 porky kernel: sdb: sdb1
May 19 16:46:23 porky rc.sysinit: -e
May 19 21:46:44 porky kernel: Attached scsi disk sdb at scsi1, channel
0, id 0, lun 0
May 19 16:46:25 porky udevsend[1281]: starting udevd daemon
May 19 21:46:44 porky kernel: Attached scsi generic sg0 at scsi0,
channel 0, id 0, lun 0, type 0
May 19 16:46:25 porky scsi.agent[1293]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.0/host0/target0:0:0/0:0:0:0
May 19 21:46:44 porky kernel: Attached scsi generic sg1 at scsi1,
channel 0, id 0, lun 0, type 0
May 19 16:46:25 porky scsi.agent[1318]: disk at
/devices/pci0000:00/0000:00:1e.0/0000:04:05.1/host1/target1:0:0/1:0:0:0


--
kr

2005-05-20 10:00:20

by Dinakar Guniguntala

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, May 19, 2005 at 06:56:10PM -0500, James Bottomley wrote:
>
> OK, could you try this one (also against vanilla 2.6.12-rc4). Hopefully
> it's a rollup of all the aic7xxx changes plus the necessary supporting
> infrastructure in my scsi-misc tree.
>

This works fine for me with 2.6.12-rc4, Thanks

I would appreciate if you can send this to -mm too

-Dinakar

2005-05-21 23:22:38

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, May 17, 2005 at 04:06:11PM -0500, James Bottomley wrote:

> Well, the attached is what I'd like you to try, capturing the
> information from the initial inquiry on ... it will be quite a bit.
>
> Hopefully it will give me a clearer idea of what's going on.

I have found a way to fetch the console :-)

Against which kernel revision is your patch made for ?

Thank you very much :-)

> Thanks,
>
> James
>
> --- a/drivers/scsi/scsi_transport_spi.c
> +++ b/drivers/scsi/scsi_transport_spi.c
> @@ -669,14 +669,23 @@ spi_dv_retrain(struct scsi_request *sreq
> {
> struct spi_internal *i = to_spi_internal(sreq->sr_host->transportt);
> struct scsi_device *sdev = sreq->sr_device;
> + struct scsi_target *starget = sdev->sdev_target;
> int period = 0, prevperiod = 0;
> enum spi_compare_returns retval;
>
>
> for (;;) {
> int newperiod;
> +
> retval = compare_fn(sreq, buffer, ptr, DV_LOOPS);
>
> + if(i->f->get_period)
> + i->f->get_period(starget);
> + if (i->f->get_offset)
> + i->f->get_offset(starget);
> +
> + spi_display_xfer_agreement(starget);
> +
> if (retval == SPI_COMPARE_SUCCESS
> || retval == SPI_COMPARE_SKIP_TEST)
> break;
> @@ -765,6 +774,8 @@ spi_dv_device_internal(struct scsi_reque
> /* first set us up for narrow async */
> DV_SET(offset, 0);
> DV_SET(width, 0);
> +
> + printk("BEGINNING ASYNC, inq len = %d\n", sdev->inquiry_len);
>
> if (spi_dv_device_compare_inquiry(sreq, buffer, buffer, DV_LOOPS)
> != SPI_COMPARE_SUCCESS) {
> @@ -773,11 +784,13 @@ spi_dv_device_internal(struct scsi_reque
> return;
> }
>
> + printk("ASYNC INQUIRY SUCCEEDED\n");
> +
> /* test width */
> if (i->f->set_width && spi_max_width(starget) && sdev->wdtr) {
> i->f->set_width(sdev->sdev_target, 1);
>
> - printk("WIDTH IS %d\n", spi_max_width(starget));
> + printk("TRYING WIDE ASYNC INQUIRY\n");
>
> if (spi_dv_device_compare_inquiry(sreq, buffer,
> buffer + len,
> @@ -802,12 +815,17 @@ spi_dv_device_internal(struct scsi_reque
> if (sdev->ppr)
> len = spi_dv_device_get_echo_buffer(sreq, buffer);
>
> + printk("ECHO BUFFER HAS LEN %d\n", len);
> +
> retry:
>
> /* now set up to the maximum */
> DV_SET(offset, spi_max_offset(starget));
> DV_SET(period, spi_min_period(starget));
>
> + printk("DV SETTING TO period %d, offset %d\n", spi_min_period(starget),
> + spi_max_offset(starget));
> +
> if (len == 0) {
> SPI_PRINTK(sdev->sdev_target, KERN_INFO, "Domain Validation skipping write tests\n");
> spi_dv_retrain(sreq, buffer, buffer + len,
>

--
Gr?goire Favre

2005-05-22 13:54:34

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Sun, 2005-05-22 at 01:22 +0200, Gr?goire Favre wrote:
> I have found a way to fetch the console :-)
>
> Against which kernel revision is your patch made for ?

It should work against any recent kernel with the scsi patches.

James


2005-05-24 15:45:57

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Sun, May 22, 2005 at 08:54:00AM -0500, James Bottomley wrote:

> It should work against any recent kernel with the scsi patches.

:-) I was wrong with which patch should be applied before this one...

Here's the output :

Bootdata ok (command line is root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0)

Linux version 2.6.12-rc4 (root@gregoire) (gcc version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)) #6 Sun May 22 16:05:45 CEST 2005

BIOS-provided physical RAM map:

BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

BIOS-e820: 000000000009fc00 - 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: 00000000fec00000 - 00000000fec01000 (reserved)

BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)

Processor #0 15:12 APIC version 16

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 2, version 3, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)

Setting APIC routing to flat

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 40000000 (gap: 40000000:bec00000)

Built 1 zonelists

Kernel command line: root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 131072 bytes)

time.c: Using 1.193182 MHz PIT timer.

time.c: Detected 2000.088 MHz processor.

time.c: Using PIT/TSC based timekeeping.

Console: colour VGA+ 80x60

Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

Memory: 1025304k/1048512k available (3144k kernel code, 22512k reserved, 1305k data, 160k init)

Mount-cache hash table entries: 256

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 512K (64 bytes/line)

CPU: AMD Athlon(tm) 64 Processor 3000+ stepping 00

Using local APIC NMI watchdog using perfctr0

Using local APIC timer interrupts.

Detected 12.500 MHz APIC timer.

NET: Registered protocol family 16

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050309

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

PCI: Via IRQ fixup

ACPI: Power Resource [URP1] (off)

ACPI: Power Resource [URP2] (off)

ACPI: Power Resource [FDDP] (off)

ACPI: Power Resource [LPTP] (off)

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs *3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report

IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $

NTFS driver 2.1.22 [Flags: R/O].

EFS: 1.0a - http://aeschi.ch.eu.org/efs/

SGI XFS with large block/inode numbers, no debug enabled

Initializing Cryptographic API

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (CM) [SLPB]

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

parport0: PC-style at 0x378 [PCSPP(,...)]

io scheduler noop registered

io schedule?HCNT = 0x60 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x40]

SCSISEQ[0x12] SBLKCTL[0x0] SCSIRATE[0xf] SEQCTL[0x10]

SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xac] SXFRCTL0[0xa0]

DFCNTRL[0x38] DFSTATUS[0x40]

STACK: 0x0 0x162 0x192 0x6e

SCB count = 4

Kernel NEXTQSCB = 3

Card NEXTQSCB = 3

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x48] SCB_SCSIID[0x17] SCB_LUN[0x0] SCB_TAG[0x2]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

2 SCB_CONTROL[0x48] SCB_SCSIID[0x17] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(1): 2



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:1:0: Device is active, asserting ATN

Recovery code sleeping

Recovery code awake

Timer Expired

aic7xxx_abort returns 0x2003

scsi1:0:1:0: Attempting to queue a TARGET RESET message

CDB: 0x12 0x0 0x0 0x0 0x60 0x0

aic7xxx_dev_reset returns 0x2003

Recovery SCB completes

scsi1:0:1:0: Attempting to queue an ABORT message

CDB: 0x0 0x0 0x0 0x0 0x0 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State in Data-in phase, at SEQADDR 0x7b

Card was paused

ACCUM = 0x0, SINDEX = 0xb8, DINDEX = 0xa8, ARG_2 = 0x0

HCNT = 0x20 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x40]

SCSISEQ[0x12] SBLKCTL[0x0] SCSIRATE[0xf] SEQCTL[0x10]

SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xac] SXFRCTL0[0x80]

DFCNTRL[0x38] DFSTATUS[0x20]

STACK: 0x0 0x162 0x192 0x6e

SCB count = 4

Kernel NEXTQSCB = 2

Card NEXTQSCB = 2

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x8] SCB_SCSIID[0x17] SCB_LUN[0x0] SCB_TAG[0x3]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

3 SCB_CONTROL[0x8] SCB_SCSIID[0?r anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

r8169 Gigabit Ethernet driver 2.2LK loaded

ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16

r8169: NAPI enabled

eth0: RTL8169 at 0xffffc20000002b00, 00:0c:76:bd:22:23, IRQ 16

Linux video capture interface: v1.00

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:0f.1

ACPI: PCI Interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1

ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio

ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio

hda: IC35L120AVVA07-0, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: SONY DVD RW DRU-500A, ATAPI CD/DVD-ROM drive

hdd: IOMEGA ZIP 250 ATAPI Floppy, ATAPI FLOPPY drive

hdd: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }

hdd: set_drive_speed_status: error=0x04 { AbortedCommand }

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 241254720 sectors (123522 MB) w/1863KiB Cache, CHS=65535/16/63, UDMA(100)

hda: cache flushes supported

hda: hda1 hda2 hda3 hda4

hdc: ATAPI 16X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

ide-floppy driver 0.99.newide

hdd: No disk in drive

hdd: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm

ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16

ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 29160B Ultra160 SCSI adapter>

aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs



Vendor: IBM Model: DDRS-39130D Rev: DC1B

Type: Direct-Access ANSI SCSI revision: 02

scsi0:A:0:0: Tagged Queuing enabled. Depth 253

target0:0:0: Beginning Domain Validation

BEGINNING ASYNC, inq len = 164

ASYNC INQUIRY SUCCEEDED

TRYING WIDE ASYNC INQUIRY

(scsi0:A:0): 6.600MB/s transfers (16bit)

ECHO BUFFER HAS LEN 0

DV SETTING TO period 10, offset 255

target0:0:0: Domain Validation skipping write tests

(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)

target0:0:0: FAST-40 SCSI 40.0 MB/s ST (25 ns, offset 15)

target0:0:0: Ending Domain Validation

Vendor: SEAGATE Model: ST336706LW Rev: 0108

Type: Direct-Access ANSI SCSI revision: 03

scsi0:A:15:0: Tagged Queuing enabled. Depth 253

target0:0:15: Beginning Domain Validation

BEGINNING ASYNC, inq len = 144

ASYNC INQUIRY SUCCEEDED

TRYING WIDE ASYNC INQUIRY

(scsi0:A:15): 6.600MB/s transfers (16bit)

ECHO BUFFER HAS LEN 252

DV SETTING TO period 10, offset 255

(scsi0:A:15): 80.000MB/s transfers (40.000MHz, offset 63, 16bit)

target0:0:15: FAST-40 SCSI 40.0 MB/s ST (25 ns, offset 63)

target0:0:15: Ending Domain Validation

scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 2940 Ultra SCSI adapter>

aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs



Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08

Type: CD-ROM ANSI SCSI revision: 02

target1:0:1: Beginning Domain Validation

BEGINNING ASYNC, inq len = 96

ASYNC INQUIRY SUCCEEDED

ECHO BUFFER HAS LEN 0

DV SETTING TO period 9, offset 255

target1:0:1: Domain Validation skipping write tests

(scsi1:A:1): 20.000MB/s transfers (20.000MHz, offset 15)

scsi1:0:1:0: Attempting to queue an ABORT message

CDB: 0x12 0x0 0x0 0x0 0x60 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State in Data-in phase, at SEQADDR 0x7c

Card was paused

ACCUM = 0x0, SINDEX = 0xb8, DINDEX = 0xa8, ARG_2 = 0x0

?x17] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(1): 3



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:1:0: Device is active, asserting ATN

Recovery code sleeping

Recovery code awake

Timer Expired

aic7xxx_abort returns 0x2003

scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 1 lun 0

target1:0:1: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 15)

target1:0:1: Domain Validation detected failure, dropping back

I hope it could be useful, now that my "toolchain" to fetch log is on,
don't hesitate to ask me to try things...

Thank you and have a great week,
--
Gr?goire Favre

2005-05-26 13:19:50

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Tue, 2005-05-24 at 17:39 +0200, Gr?goire Favre wrote:

> target1:0:1: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 15)
>
> target1:0:1: Domain Validation detected failure, dropping back
>
> I hope it could be useful, now that my "toolchain" to fetch log is on,
> don't hesitate to ask me to try things...

Actually, did you capture anything more after this?

There's an indication from a previous file you sent:

Target 1 Negotiation Settings
User: 10.000MB/s transfers (10.000MHz, offset 127)
Goal: 10.000MB/s transfers (10.000MHz, offset 15)
Curr: 10.000MB/s transfers (10.000MHz, offset 15)

That for some reason the bus is tied to 10MHz (i.e. fast but not ultra).
The DV began at Ultra, but it should next drop down to FAST.

Also, when it finally boots up what does

/sys/class/spi_transport/target1:0:1/min_period

contain?

Thanks,

James


2005-05-26 14:35:36

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, May 26, 2005 at 09:19:23AM -0400, James Bottomley wrote:

> Actually, did you capture anything more after this?

No, I have waited some times, and has nothing more were written to my
palm console, I just thought it wouldn't boot further...

> There's an indication from a previous file you sent:
>
> Target 1 Negotiation Settings
> User: 10.000MB/s transfers (10.000MHz, offset 127)
> Goal: 10.000MB/s transfers (10.000MHz, offset 15)
> Curr: 10.000MB/s transfers (10.000MHz, offset 15)
>
> That for some reason the bus is tied to 10MHz (i.e. fast but not ultra).
> The DV began at Ultra, but it should next drop down to FAST.
>
> Also, when it finally boots up what does
>
> /sys/class/spi_transport/target1:0:1/min_period
>
> contain?

Under 2.6.12-rc2 I haven't this file, what the equivalent ?

Thank you very much for taking care of my problem :-)
--
Gr?goire Favre

2005-05-26 14:46:22

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-26 at 16:35 +0200, Gr?goire Favre wrote:
> Under 2.6.12-rc2 I haven't this file, what the equivalent ?

It should be there under 2.6.12-rc5

James


2005-05-26 17:58:35

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, May 26, 2005 at 10:46:06AM -0400, James Bottomley wrote:
> On Thu, 2005-05-26 at 16:35 +0200, Gr?goire Favre wrote:
> > Under 2.6.12-rc2 I haven't this file, what the equivalent ?
>
> It should be there under 2.6.12-rc5

:-) Well, fine, but I can't boot post 2.6.12-rc2 kernels... Just tried
2.6.12-rc5 and it ends here :

Bootdata ok (command line is root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0)

Linux version 2.6.12-rc5 (root@gregoire) (gcc version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)) #1 Thu May 26 16:53:13 CEST 2005

BIOS-provided physical RAM map:

BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

BIOS-e820: 000000000009fc00 - 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: 00000000fec00000 - 00000000fec01000 (reserved)

BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

ACPI: PM-Timer IO Port: 0x808

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)

Processor #0 15:12 APIC version 16

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 2, version 3, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)

Setting APIC routing to flat

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 40000000 (gap: 40000000:bec00000)

Built 1 zonelists

Kernel command line: root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 131072 bytes)

time.c: Using 3.579545 MHz PM timer.

time.c: Detected 2000.148 MHz processor.

time.c: Using PIT/TSC based timekeeping.

Console: colour VGA+ 80x60

Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

Memory: 1025304k/1048512k available (3138k kernel code, 22512k reserved, 1306k data, 160k init)

Mount-cache hash table entries: 256

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 512K (64 bytes/line)

CPU: AMD Athlon(tm) 64 Processor 3000+ stepping 00

Using local APIC timer interrupts.

Detected 12.500 MHz APIC timer.

testing NMI watchdog ... OK.

NET: Registered protocol family 16

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050309

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

PCI: Via IRQ fixup

ACPI: Power Resource [URP1] (off)

ACPI: Power Resource [URP2] (off)

ACPI: Power Resource [FDDP] (off)

ACPI: Power Resource [LPTP] (off)

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs *3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report

IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $

NTFS driver 2.1.22 [Flags: R/O].

EFS: 1.0a - http://aeschi.ch.eu.org/efs/

SGI XFS with large block/inode numbers, no debug enabled

Initializing Cryptographic API

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (CM) [SLPB]

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

parport0: PC-style at 0x378 [PCSPP(,...)]

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

r8169 Gigabit Ethernet driver 2.2LK loaded

ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16

r8169: NAPI enabled

eth0: RTL8169 at 0xffffc20000002b00, 00:0c:76:bd:22:23, IRQ 16

Linux video capture interface: v1.00

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:0f.1

ACPI: PCI Interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1

ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio

ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio

hda: IC35L120AVVA07-0, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: SONY DVD RW DRU-500A, ATAPI CD/DVD-ROM drive

hdd: IOMEGA ZIP 250 ATAPI Floppy, ATAPI FLOPPY drive

hdd: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }

hdd: set_drive_speed_status: error=0x04 { AbortedCommand }

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 241254720 sectors (123522 MB) w/1863KiB Cache, CHS=65535/16/63, UDMA(100)

hda: cache flushes supported

hda: hda1 hda2 hda3 hda4

hdc: ATAPI 31X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

ide-floppy driver 0.99.newide

hdd: No disk in drive

hdd: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm

ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16

ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 29160B Ultra160 SCSI adapter>

aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs



Vendor: IBM Model: DDRS-39130D Rev: DC1B

Type: Direct-Access ANSI SCSI revision: 02

scsi0:A:0:0: Tagged Queuing enabled. Depth 253

target0:0:0: Beginning Domain Validation

WIDTH IS 1

(scsi0:A:0): 6.600MB/s transfers (16bit)

target0:0:0: Domain Validation skipping write tests

(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)

target0:0:0: Ending Domain Validation

Vendor: SEAGATE Model: ST336706LW Rev: 0108

Type: Direct-Access ANSI SCSI revision: 03

scsi0:A:15:0: Tagged Queuing enabled. Depth 253

target0:0:15: Beginning Domain Validation

WIDTH IS 1

(scsi0:A:15): 6.600MB/s transfers (16bit)

(scsi0:A:15): 80.000MB/s transfers (40.000MHz, offset 63, 16bit)

target0:0:15: Ending Domain Validation

scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 2940 Ultra SCSI adapter>

aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs



Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08

Type: CD-ROM ANSI SCSI revision: 02

target1:0:1: Beginning Domain Validation

target1:0:1: Domain Validation skipping write tests

(scsi1:A:1): 20.000MB/s transfers (20.000MHz, offset 15)

scsi1:0:1:0: Attempting to queue an ABORT message

CDB: 0x12 0x0 0x0 0x0 0x60 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State in Data-in phase, at SEQADDR 0x7c

Card was paused

ACCUM = 0x0, SINDEX = 0xb8, DINDEX = 0xa8, ARG_2 = 0x0

HCNT = 0x60 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x40]

SCSISEQ[0x12] SBLKCTL[0x0] SCSIRATE[0xf] SEQCTL[0x10]

SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xac] SXFRCTL0[0xa0]

DFCNTRL[0x38] DFSTATUS[0x40]

STACK: 0x0 0x162 0x192 0x6e

SCB count = 4

Kernel NEXTQSCB = 3

Card NEXTQSCB = 3

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2

HCNT = 0x60 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x40]

SCSISEQ[0x12] SBLKCTL[0x0] SCSIRATE[0xf] SEQCTL[0x10]

SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xac] SXFRCTL0[0xa0]

DFCNTRL[0x38] DFSTATUS[0x40]

STACK: 0x0 0x162 0x192 0x6e

SCB count = 4

Kernel NEXTQSCB = 3

Card NEXTQSCB = 3

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x48] SCB_SCSIID[0x17] SCB_LUN[0x0] SCB_TAG[0x2]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

2 SCB_CONTROL[0x48] SCB_SCSIID[0x17] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(1): 2



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:1:0: Device is active, asserting ATN

Recovery code sleeping

Recovery code awake

Timer Expired

aic7xxx_abort returns 0x2003

scsi1:0:1:0: Attempting to queue a TARGET RESET message

CDB: 0x12 0x0 0x0 0x0 0x60 0x0

aic7xxx_dev_reset returns 0x2003

Recovery SCB completes

scsi1:0:1:0: Attempting to queue an ABORT message

CDB: 0x0 0x0 0x0 0x0 0x0 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State in Data-in phase, at SEQADDR 0x7b

Card was paused

ACCUM = 0x0, SINDEX = 0xb8, DINDEX = 0xa8, ARG_2 = 0x0

HCNT = 0x20 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x40]

SCSISEQ[0x12] SBLKCTL[0x0] SCSIRATE[0xf] SEQCTL[0x10]

SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xac] SXFRCTL0[0x80]

DFCNTRL[0x38] DFSTATUS[0x20]

STACK: 0x0 0x162 0x192 0x6e

SCB count = 4

Kernel NEXTQSCB = 2

Card NEXTQSCB = 2

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x8] SCB_SCSIID[0x17] SCB_LUN[0x0] SCB_TAG[0x3]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

3 SCB_CONTROL[0x8] SCB_SCSIID[0?ff] SCB_SCSIIDr anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

r8169 Gigabit Ethernet driver 2.2LK loaded

ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16

r8169: NAPI enabled

eth0: RTL8169 at 0xffffc20000002b00, 00:0c:76:bd:22:23, IRQ 16

Linux video capture interface: v1.00

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:0f.1

ACPI: PCI Interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1

ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio

ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio

hda: IC35L120AVVA07-0, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: SONY DVD RW DRU-500A, ATAPI CD/DVD-ROM drive

hdd: IOMEGA ZIP 250 ATAPI Floppy, ATAPI FLOPPY drive

hdd: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }

hdd: set_drive_speed_status: error=0x04 { AbortedCommand }

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 241254720 sectors (123522 MB) w/1863KiB Cache, CHS=65535/16/63, UDMA(100)

hda: cache flushes supported

hda: hda1 hda2 hda3 hda4

hdc: ATAPI 16X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

ide-floppy driver 0.99.newide

hdd: No disk in drive

hdd: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm

ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16

ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 29160B Ultra160 SCSI adapter>

aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs



Vendor: IBM Model: DDRS-39130D Rev: DC1B

Type: Direct-Access ANSI SCSI revision: 02

scsi0:A:0:0: Tagged Queuing enabled. Depth 253

target0:0:0: Beginning Domain Validation

BEGINNING ASYNC, inq len = 164

ASYNC INQUIRY SUCCEEDED

TRYING WIDE ASYNC INQUIRY

(scsi0:A:0): 6.600MB/s transfers (16bit)

ECHO BUFFER HAS LEN 0

DV SETTING TO period 10, offset 255

target0:0:0: Domain Validation skipping write tests

(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)

target0:0:0: FAST-40 SCSI 40.0 MB/s ST (25 ns, offset 15)

target0:0:0: Ending Domain Validation

Vendor: SEAGATE Model: ST336706LW Rev: 0108

Type: Direct-Access ANSI SCSI revision: 03

scsi0:A:15:0: Tagged Queuing enabled. Depth 253

target0:0:15: Beginning Domain Validation

BEGINNING ASYNC, inq len = 144

ASYNC INQUIRY SUCCEEDED

TRYING WIDE ASYNC INQUIRY

(scsi0:A:15): 6.600MB/s transfers (16bit)

ECHO BUFFER HAS LEN 252

DV SETTING TO period 10, offset 255

(scsi0:A:15): 80.000MB/s transfers (40.000MHz, offset 63, 16bit)

target0:0:15: FAST-40 SCSI 40.0 MB/s ST (25 ns, offset 63)

target0:0:15: Ending Domain Validation

scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 2940 Ultra SCSI adapter>

aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs



Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08

Type: CD-ROM ANSI SCSI revision: 02

target1:0:1: Beginning Domain Validation

BEGINNING ASYNC, inq len = 96

ASYNC INQUIRY SUCCEEDED

ECHO BUFFER HAS LEN 0

DV SETTING TO period 9, offset 255

target1:0:1: Domain Validation skipping write tests

(scsi1:A:1): 20.000MB/s transfers (20.000MHz, offset 15)

scsi1:0:1:0: Attempting to queue an ABORT message

CDB: 0x12 0x0 0x0 0x0 0x60 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State in Data-in phase, at SEQADDR 0x7c

Card was paused

ACCUM = 0x0, SINDEX = 0xb8, DINDEX = 0xa8, ARG_2 = 0x0

? x17] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(1): 3



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:1:0: Device is active, asserting ATN

Recovery code sleeping

Recovery code awake

Timer Expired

aic7xxx_abort returns 0x2003

scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 1 lun 0

target1:0:1: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 15)

target1:0:1: Domain Validation detected failure, dropping back

That's with vanilla 2.6.12-rc5 if I have to patch, just tell me :-)

Have a great day,
--
Gr?goire Favre

2005-05-30 14:39:49

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Thu, 2005-05-26 at 19:35 +0200, Gr?goire Favre wrote:
> That's with vanilla 2.6.12-rc5 if I have to patch, just tell me :-)

OK, I have two things for you to try.

The first is the attached, which, I think, enforces the limits this
device is expecting. It's really just a sanity check to see if the
problem is what I think it is (device negotiates a transfer setting it
can't actually support).

James

diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -735,6 +735,7 @@ ahc_linux_slave_configure(struct scsi_de

/* Initial Domain Validation */
if (!spi_initial_dv(device->sdev_target))
+ spi_min_period(device->sdev_target) = 100;
spi_dv_device(device);

return 0;


2005-05-30 14:55:00

by Michael Tokarev

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley wrote:
[]
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -735,6 +735,7 @@ ahc_linux_slave_configure(struct scsi_de
>
> /* Initial Domain Validation */
> if (!spi_initial_dv(device->sdev_target))
> + spi_min_period(device->sdev_target) = 100;
> spi_dv_device(device);

Hmm.. Should there be a pair of {}'s somewhere?

/mjt

2005-05-30 15:03:24

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, 2005-05-30 at 18:51 +0400, Michael Tokarev wrote:
> Hmm.. Should there be a pair of {}'s somewhere?

Only if it were actual code for the tree, rather than a throw away
test ... it's a single lun target, so the condition is always true.

James


2005-05-30 15:12:09

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, May 30, 2005 at 09:38:58AM -0500, James Bottomley wrote:

> OK, I have two things for you to try.
>
> The first is the attached, which, I think, enforces the limits this
> device is expecting. It's really just a sanity check to see if the
> problem is what I think it is (device negotiates a transfer setting it
> can't actually support).

uname -r gives me : 2.6.12-rc5 which mean it's a working fix for me !!!

Note that on the other controller the speed are quiete low ?
Do you think it's more or less safe to use this kernel so ?

Thank you very much !!!

Here's dmesg :

n information
Allocating PCI resources starting at 40000000 (gap: 40000000:bec00000)
Built 1 zonelists
Kernel command line: root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 131072 bytes)
time.c: Using 3.579545 MHz PM timer.
time.c: Detected 2000.148 MHz processor.
time.c: Using PIT/TSC based timekeeping.
Console: colour VGA+ 80x60
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Memory: 1025304k/1048512k available (3138k kernel code, 22512k reserved, 1306k data, 160k init)
Calibrating delay loop... 3940.35 BogoMIPS (lpj=1970176)
Mount-cache hash table entries: 256
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
CPU: AMD Athlon(tm) 64 Processor 3000+ stepping 00
Using local APIC timer interrupts.
Detected 12.500 MHz APIC timer.
testing NMI watchdog ... OK.
NET: Registered protocol family 16
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20050309
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
PCI: Via IRQ fixup
Boot video device is 0000:01:00.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: Power Resource [URP1] (off)
ACPI: Power Resource [URP2] (off)
ACPI: Power Resource [FDDP] (off)
ACPI: Power Resource [LPTP] (off)
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $
NTFS driver 2.1.22 [Flags: R/O].
EFS: 1.0a - http://aeschi.ch.eu.org/efs/
SGI XFS with large block/inode numbers, no debug enabled
Initializing Cryptographic API
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
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
parport0: PC-style at 0x378 [PCSPP(,...)]
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16
r8169: NAPI enabled
eth0: Identified chip type is 'RTL8169s/8110s'.
eth0: RTL8169 at 0xffffc20000002b00, 00:0c:76:bd:22:23, IRQ 16
Linux video capture interface: v1.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:0f.1
ACPI: PCI Interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: IC35L120AVVA07-0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: SONY DVD RW DRU-500A, ATAPI CD/DVD-ROM drive
hdd: IOMEGA ZIP 250 ATAPI Floppy, ATAPI FLOPPY drive
hdd: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
hdd: set_drive_speed_status: error=0x04 { AbortedCommand }
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
hda: max request size: 128KiB
hda: 241254720 sectors (123522 MB) w/1863KiB Cache, CHS=65535/16/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 hda3 hda4
hdc: ATAPI 16X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
hdd: No disk in drive
hdd: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm
ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16
ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec 29160B Ultra160 SCSI adapter>
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs

Vendor: IBM Model: DDRS-39130D Rev: DC1B
Type: Direct-Access ANSI SCSI revision: 02
scsi0:A:0:0: Tagged Queuing enabled. Depth 253
target0:0:0: Beginning Domain Validation
WIDTH IS 1
(scsi0:A:0): 6.600MB/s transfers (16bit)
target0:0:0: Domain Validation skipping write tests
target0:0:0: Ending Domain Validation
Vendor: SEAGATE Model: ST336706LW Rev: 0108
Type: Direct-Access ANSI SCSI revision: 03
scsi0:A:15:0: Tagged Queuing enabled. Depth 253
target0:0:15: Beginning Domain Validation
WIDTH IS 1
(scsi0:A:15): 6.600MB/s transfers (16bit)
target0:0:15: Ending Domain Validation
scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec 2940 Ultra SCSI adapter>
aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs

Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08
Type: CD-ROM ANSI SCSI revision: 02
target1:0:1: Beginning Domain Validation
target1:0:1: Domain Validation skipping write tests
target1:0:1: Ending Domain Validation
Vendor: PLEXTOR Model: CD-R PX-R820T Rev: 1.08
Type: CD-ROM ANSI SCSI revision: 02
target1:0:2: Beginning Domain Validation
target1:0:2: Domain Validation skipping write tests
target1:0:2: Ending Domain Validation
Vendor: PLEXTOR Model: CD-R PX-R820T Rev: 1.08
Type: CD-ROM ANSI SCSI revision: 02
target1:0:3: Beginning Domain Validation
target1:0:3: Domain Validation skipping write tests
target1:0:3: Ending Domain Validation
libata version 1.10 loaded.
sata_via version 1.1
ACPI: PCI Interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 20
sata_via(0000:00:0f.0): routed to hard irq line 4
ata1: SATA max UDMA/133 cmd 0xE000 ctl 0xDC02 bmdma 0xD000 irq 20
ata2: SATA max UDMA/133 cmd 0xD800 ctl 0xD402 bmdma 0xD008 irq 20
ata1: no device found (phy stat 00000000)
scsi2 : sata_via
ata2: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4043 85:7c69 86:3e01 87:4043 88:407f
ata2: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48
ata2: dev 0 configured for UDMA/133
scsi3 : sata_via
Vendor: ATA Model: Maxtor 6B200M0 Rev: BANC
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 17850000 512-byte hdwr sectors (9139 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 17850000 512-byte hdwr sectors (9139 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sdb: 71687370 512-byte hdwr sectors (36704 MB)
SCSI device sdb: drive cache: write back
SCSI device sdb: 71687370 512-byte hdwr sectors (36704 MB)
SCSI device sdb: drive cache: write back
sdb: sdb1 sdb2
Attached scsi disk sdb at scsi0, channel 0, id 15, lun 0
SCSI device sdc: 398297088 512-byte hdwr sectors (203928 MB)
SCSI device sdc: drive cache: write back
SCSI device sdc: 398297088 512-byte hdwr sectors (203928 MB)
SCSI device sdc: drive cache: write back
sdc: sdc1 sdc2
Attached scsi disk sdc at scsi3, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 32x/32x cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 1, lun 0
sr1: scsi3-mmc drive: 20x/20x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr1 at scsi1, channel 0, id 2, lun 0
sr2: scsi3-mmc drive: 20x/20x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr2 at scsi1, channel 0, id 3, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
Attached scsi generic sg1 at scsi0, channel 0, id 15, lun 0, type 0
Attached scsi generic sg2 at scsi1, channel 0, id 1, lun 0, type 5
Attached scsi generic sg3 at scsi1, channel 0, id 2, lun 0, type 5
Attached scsi generic sg4 at scsi1, channel 0, id 3, lun 0, type 5
Attached scsi generic sg5 at scsi3, channel 0, id 0, lun 0, type 0
usbmon: debugs is not available
ACPI: PCI Interrupt 0000:00:10.4[C] -> GSI 21 (level, low) -> IRQ 21
ehci_hcd 0000:00:10.4: VIA Technologies, Inc. USB 2.0
ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:10.4: irq 21, io mem 0xcfffe900
ehci_hcd 0000:00:10.4: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
USB Universal Host Controller Interface driver v2.2
ACPI: PCI Interrupt 0000:00:10.0[A] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
ehci_hcd 0000:00:10.4: port 8 reset error -110
hub 1-0:1.0: hub_port_status failed (err = -32)
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:10.0: irq 21, io base 0x0000bc00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ehci_hcd 0000:00:10.4: port 8 reset error -110
hub 1-0:1.0: hub_port_status failed (err = -32)
ACPI: PCI Interrupt 0000:00:10.1[A] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
usb 1-8: new high speed USB device using ehci_hcd and address 2
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:10.1: irq 21, io base 0x0000c000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ehci_hcd 0000:00:10.4: port 8 reset error -110
hub 1-0:1.0: hub_port_status failed (err = -32)
ACPI: PCI Interrupt 0000:00:10.2[B] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3)
hub 1-8:1.0: USB hub found
hub 1-8:1.0: 2 ports detected
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:10.2: irq 21, io base 0x0000c400
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:10.3[B] -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:10.3: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#4)
uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:10.3: irq 21, io base 0x0000c800
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
input: PC Speaker
Advanced Linux Sound Architecture Driver Version 1.0.9rc2 (Thu Mar 24 10:33:39 2005 UTC).
via82xx: Assuming DXS channels with 48k fixed sample rate.
Please try dxs_support=1 or dxs_support=4 option
and report if it works on your machine.
ACPI: PCI Interrupt 0000:00:11.5[C] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:11.5 to 64
input: AT Translated Set 2 keyboard on isa0060/serio0
usb 1-8.1: new high speed USB device using ehci_hcd and address 3
hub 1-8.1:1.0: USB hub found
hub 1-8.1:1.0: 4 ports detected
logips2pp: Detected unknown logitech mouse model 99
input: ImExPS/2 Logitech Explorer Mouse on isa0060/serio1
ALSA device list:
#0: VIA 8237 with ALC655 at 0xb800, irq 22
NET: Registered protocol family 2
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP established hash table entries: 262144 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
ip_tables: (C) 2000-2002 Netfilter core team
usb 1-8.2: new high speed USB device using ehci_hcd and address 4
arp_tables: (C) 2002 David S. Miller
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
ACPI wakeup devices:
PCI0 UAR1 USB1 USB2 USB3 USB4 EHCI USBD AC9 MC9 ILAN SLPB
ACPI: (supports S0 S1 S3 S4 S5)
ReiserFS: sdc2: found reiserfs format "3.6" with standard journal
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
Vendor: SMSC Model: 223 U HS-CF Rev: 3.60
Type: Direct-Access ANSI SCSI revision: 00
Attached scsi removable disk sdd at scsi4, channel 0, id 0, lun 0
Attached scsi generic sg6 at scsi4, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
ReiserFS: sdc2: using ordered data mode
ReiserFS: sdc2: journal params: device sdc2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdc2: checking transaction log (sdc2)
ReiserFS: sdc2: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 160k freed
Adding 506036k swap on /dev/hda2. Priority:2 extents:1
Adding 530136k swap on /dev/sda2. Priority:2 extents:1
Adding 530104k swap on /dev/sdb1. Priority:1 extents:1
Adding 1004020k swap on /dev/sdc1. Priority:3 extents:1
XFS mounting filesystem sdb2
Ending clean XFS mount for filesystem: sdb2
XFS mounting filesystem hda4
Ending clean XFS mount for filesystem: hda4
ReiserFS: sda1: found reiserfs format "3.6" with standard journal
ReiserFS: sda1: using ordered data mode
ReiserFS: sda1: journal params: device sda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda1: checking transaction log (sda1)
ReiserFS: sda1: Using r5 hash to sort names
saa7146: register extension 'dvb'.
ACPI: PCI Interrupt 0000:00:06.0[A] -> GSI 17 (level, low) -> IRQ 17
saa7146: found saa7146 @ mem ffffc200004c4e00 (revision 1, irq 17) (0x13c2,0x0000).
DVB: registering new adapter (Technotrend/Hauppauge WinTV DVB-S rev1.X).
adapter has MAC addr = 00:d0:5c:00:41:90
dvb-ttpci: gpioirq unknown type=0 len=0
dvb-ttpci: info @ card 0: firm f0240009, rtsl b0250018, vid 71010068, app 8000261d
dvb-ttpci: firmware @ card 0 supports CI link layer interface
dvb-ttpci: adac type set to 0 @ card 0
saa7146_vv: saa7146 (0): registered device video0 [v4l2]
ves1x93: Detected ves1893a rev2
DVB: registering frontend 0 (VLSI VES1x93 DVB-S)...
dvb-ttpci: found av7110-0.
saa7146: register extension 'budget dvb'.
saa7146: register extension 'budget_ci dvb'.
ACPI: PCI Interrupt 0000:00:07.0[A] -> GSI 18 (level, low) -> IRQ 18
saa7146: found saa7146 @ mem ffffc200005aac00 (revision 1, irq 18) (0x13c2,0x100f).
DVB: registering new adapter (TT-Budget/WinTV-NOVA-CI PCI).
adapter has MAC addr = 00:d0:5c:23:a3:9b
DVB: registering frontend 1 (ST STV0299 DVB-S)...
r8169: eth0: link up

--
Gr?goire Favre

2005-05-30 15:34:47

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, 2005-05-30 at 17:09 +0200, Gr?goire Favre wrote:
> uname -r gives me : 2.6.12-rc5 which mean it's a working fix for me !!!
>
> Note that on the other controller the speed are quiete low ?
> Do you think it's more or less safe to use this kernel so ?

Yes, that was just a global change to get the thing to boot.

Now try this:

echo 100 > /sys/class/spi_transport/target1:0:1/min_period
echo 1 > /sys/class/spi_transport/target1:0:1/revalidate

and look at dmesg to see if it brought the speed up (save your files
first, this may hang the box).

James


2005-05-30 16:02:04

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, May 30, 2005 at 10:34:08AM -0500, James Bottomley wrote:

> Yes, that was just a global change to get the thing to boot.

And it works :-)

> Now try this:
>
> echo 100 > /sys/class/spi_transport/target1:0:1/min_period
> echo 1 > /sys/class/spi_transport/target1:0:1/revalidate
>
> and look at dmesg to see if it brought the speed up (save your files
> first, this may hang the box).

It don't hang my box... and I got this :

target1:0:1: Beginning Domain Validation
target1:0:1: Domain Validation skipping write tests
(scsi1:A:1): 10.000MB/s transfers (10.000MHz, offset 15)
target1:0:1: Ending Domain Validation

Thank,
--
Gr?goire Favre

2005-05-30 18:20:48

by James Bottomley

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, 2005-05-30 at 18:01 +0200, Gr?goire Favre wrote:
> target1:0:1: Beginning Domain Validation
> target1:0:1: Domain Validation skipping write tests
> (scsi1:A:1): 10.000MB/s transfers (10.000MHz, offset 15)
> target1:0:1: Ending Domain Validation

Well that's good ... it proves the theory that if the DV were correctly
limited initially, everything would work.

However ... lets see if we can get it to work properly even with the
initial mismatch. Reverse the previous patch, apply this one and try
rebooting ...

Thanks,

James

--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1230,6 +1230,9 @@ static void scsi_eh_offline_sdevs(struct
scmd->device->channel,
scmd->device->id,
scmd->device->lun);
+ /* try to reset the bus and the card to a sane state */
+ scsi_try_bus_reset(scmd);
+ scsi_try_host_reset(scmd);
scsi_device_set_state(scmd->device, SDEV_OFFLINE);
if (scsi_eh_eflags_chk(scmd, SCSI_EH_CANCEL_CMD)) {
/*


2005-05-30 19:12:53

by Gregoire Favre

[permalink] [raw]
Subject: Re: What breaks aic7xxx in post 2.6.12-rc2 ?

On Mon, May 30, 2005 at 01:17:20PM -0500, James Bottomley wrote:

> Well that's good ... it proves the theory that if the DV were correctly
> limited initially, everything would work.

OK :-)

> However ... lets see if we can get it to work properly even with the
> initial mismatch. Reverse the previous patch, apply this one and try
> rebooting ...

Unfortunately it don't work :

Bootdata ok (command line is root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0)

Linux version 2.6.12-rc5 (root@gregoire) (gcc version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)) #3 Mon May 30 20:38:57 CEST 2005

BIOS-provided physical RAM map:

BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

BIOS-e820: 000000000009fc00 - 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: 00000000fec00000 - 00000000fec01000 (reserved)

BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

ACPI: PM-Timer IO Port: 0x808

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)

Processor #0 15:12 APIC version 16

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 2, version 3, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)

Setting APIC routing to flat

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 40000000 (gap: 40000000:bec00000)

Built 1 zonelists

Kernel command line: root=/dev/sdc2 parport=auto video=vesafb:mtrr,ywrap,1024x800-16@75 vga=0xF07 console=ttyS0

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 131072 bytes)

time.c: Using 3.579545 MHz PM timer.

time.c: Detected 2000.148 MHz processor.

time.c: Using PIT/TSC based timekeeping.

Console: colour VGA+ 80x60

Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

Memory: 1025304k/1048512k available (3138k kernel code, 22512k reserved, 1306k data, 160k init)

Mount-cache hash table entries: 256

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 512K (64 bytes/line)

CPU: AMD Athlon(tm) 64 Processor 3000+ stepping 00

Using local APIC timer interrupts.

Detected 12.500 MHz APIC timer.

testing NMI watchdog ... OK.

NET: Registered protocol family 16

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050309

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

PCI: Via IRQ fixup

ACPI: Power Resource [URP1] (off)

ACPI: Power Resource [URP2] (off)

ACPI: Power Resource [FDDP] (off)

ACPI: Power Resource [LPTP] (off)

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs *3 4 5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report

IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $

NTFS driver 2.1.22 [Flags: R/O].

EFS: 1.0a - http://aeschi.ch.eu.org/efs/

SGI XFS with large block/inode numbers, no debug enabled

Initializing Cryptographic API

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (CM) [SLPB]

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

parport0: PC-style at 0x378 [PCSPP(,...)]

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

r8169 Gigabit Ethernet driver 2.2LK loaded

ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16

r8169: NAPI enabled

eth0: RTL8169 at 0xffffc20000002b00, 00:0c:76:bd:22:23, IRQ 16

Linux video capture interface: v1.00

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:0f.1

ACPI: PCI Interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1

ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio

ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio

hda: IC35L120AVVA07-0, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: SONY DVD RW DRU-500A, ATAPI CD/DVD-ROM drive

hdd: IOMEGA ZIP 250 ATAPI Floppy, ATAPI FLOPPY drive

hdd: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }

hdd: set_drive_speed_status: error=0x04 { AbortedCommand }

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 241254720 sectors (123522 MB) w/1863KiB Cache, CHS=65535/16/63, UDMA(100)

hda: cache flushes supported

hda: hda1 hda2 hda3 hda4

hdc: ATAPI 16X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

ide-floppy driver 0.99.newide

hdd: No disk in drive

hdd: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm

ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16

ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 29160B Ultra160 SCSI adapter>

aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs



Vendor: IBM Model: DDRS-39130D Rev: DC1B

Type: Direct-Access ANSI SCSI revision: 02

scsi0:A:0:0: Tagged Queuing enabled. Depth 253

target0:0:0: Beginning Domain Validation

WIDTH IS 1

(scsi0:A:0): 6.600MB/s transfers (16bit)

target0:0:0: Domain Validation skipping write tests

(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)

target0:0:0: Ending Domain Validation

Vendor: SEAGATE Model: ST336706LW Rev: 0108

Type: Direct-Access ANSI SCSI revision: 03

scsi0:A:15:0: Tagged Queuing enabled. Depth 253

target0:0:15: Beginning Domain Validation

WIDTH IS 1

(scsi0:A:15): 6.600MB/s transfers (16bit)

(scsi0:A:15): 80.000MB/s transfers (40.000MHz, offset 63, 16bit)

target0:0:15: Ending Domain Validation

scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36

<Adaptec 2940 Ultra SCSI adapter>

aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs



scsi1:0:0:0: Attempting to queue an ABORT message

CDB: 0x12 0x0 0x0 0x0 0x24 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State while idle, at SEQADDR 0x18

Card was paused

ACCUM = 0x3, SINDEX = 0x20, DINDEX = 0xc0, ARG_2 = 0x0

HCNT = 0x0 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x1]

SCSISEQ[0x1a] SBLKCTL[0x0] SCSIRATE[0x0] SEQCTL[0x10]

SEQ_FLAGS[0xc0] SSTAT0[0x5] SSTAT1[0x0] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xa4] SXFRCTL0[0x80]

DFCNTRL[0x4] DFSTATUS[0x6d]

STACK: 0x0 0x0 0x192 0x17

SCB count = 4

Kernel NEXTQSCB = 2

Card NEXTQSCB = 2

QINFIFO entries:

Waiting Queue entries: 0:3

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x50] SCB_SCSIID[0x7] SCB_LUN[0x0] SCB_TAG[0x3]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

3 SCB_CONTROL[0x50] SCB_SCSIID[0x7] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(0): 3



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:0:0: Cmd aborted from QINFIFO

aic7xxx_abort returns 0x2002

scsi1:0:0:0: Attempting to queue an ABORT message

CDB: 0x0 0x0 0x0 0x0 0x0 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State while idle, at SEQADDR 0x18

Card was paused

ACCUM = 0x3, SINDEX = 0x20, DINDEX = 0xc0, ARG_2 = 0x0

HCNT = 0x0 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x1]

SCSISEQ[0x1a] SBLKCTL[0x0] SCSIRATE[0x0] SEQCTL[0x10]

SEQ_FLAGS[0xc0] SSTAT0[0x5] SSTAT1[0x0] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xa4] SXFRCTL0[0x80]

DFCNTRL[0x4] DFSTATUS[0x6d]

STACK: 0x0 0x0 0x192 0x17

SCB count = 4

Kernel NEXTQSCB = 3

Card NEXTQSCB = 2

QINFIFO entries: 2

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x0] SCB_SCSIID[0x7] SCB_LUN[0x0] SCB_TAG[0xff]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

2 SCB_CONTROL[0x50] SCB_SCSIID[0x7] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(0): 2



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:0:0: Cmd aborted from QINFIFO

aic7xxx_abort returns 0x2002

scsi1:0:0:0: Attempting to queue a TARGET RESET message

CDB: 0x12 0x0 0x0 0x0 0x24 0x0

scsi1:0:0:0: Command not found

aic7xxx_dev_reset returns 0x2002

scsi1:0:0:0: Attempting to queue an ABORT message

CDB: 0x0 0x0 0x0 0x0 0x0 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State while idle, at SEQADDR 0x18

Card was paused

ACCUM = 0x3, SINDEX = 0x20, DINDEX = 0xc0, ARG_2 = 0x0

HCNT = 0x0 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x1]

SCSISEQ[0x1a] SBLKCTL[0x0] SCSIRATE[0x0] SEQCTL[0x10]

SEQ_FLAGS[0xc0] SSTAT0[0x5] SSTAT1[0x0] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xa4] SXFRCTL0[0x80]

DFCNTRL[0x4] DFSTATUS[0x6d]

STACK: 0x0 0x0 0x192 0x17

SCB count = 4

Kernel NEXTQSCB = 2

Card NEXTQSCB = 3

QINFIFO entries: 3

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x0] SCB_SCSIID[0x7] SCB_LUN[0x0] SCB_TAG[0xff]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

3 SCB_CONTROL[0x50] SCB_SCSIID[0x7] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(0): 3



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:0:0: Cmd aborted from QINFIFO

aic7xxx_abort returns 0x2002

scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 0 lun 0

Vendor: TOSHIBA Model: DVD-ROM SD-M1201 Rev: 1R08

Type: CD-ROM ANSI SCSI revision: 02

target1:0:1: Beginning Domain Validation

target1:0:1: Domain Validation skipping write tests

(scsi1:A:1): 20.000MB/s transfers (20.000MHz, offset 15)

scsi1:0:1:0: Attempting to queue an ABORT message

CDB: 0x12 0x0 0x0 0x0 0x60 0x0

scsi1: At time of recovery, card was not paused

>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<

scsi1: Dumping Card State in Data-in phase, at SEQADDR 0x7b

Card was paused

ACCUM = 0x0, SINDEX = 0xb8, DINDEX = 0xa8, ARG_2 = 0x0

HCNT = 0x60 SCBPTR = 0x0

SCSISIGI[0x44] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x40]

SCSISEQ[0x12] SBLKCTL[0x0] SCSIRATE[0xf] SEQCTL[0x10]

SEQ_FLAGS[0x20] SSTAT0[0x0] SSTAT1[0x2] SSTAT2[0x0]

SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xac] SXFRCTL0[0xa0]

DFCNTRL[0x38] DFSTATUS[0x40]

STACK: 0x0 0x162 0x192 0x6e

SCB count = 4

Kernel NEXTQSCB = 2

Card NEXTQSCB = 2

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries:

QOUTFIFO entries:

Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Sequencer SCB Info:

0 SCB_CONTROL[0x48] SCB_SCSIID[0x17] SCB_LUN[0x0] SCB_TAG[0x3]

1 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

2 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

3 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

4 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

5 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

6 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

7 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

8 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

9 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

10 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

11 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

12 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

13 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

14 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

15 SCB_CONTROL[0x0] SCB_SCSIID[0xff] SCB_LUN[0xff] SCB_TAG[0xff]

Pending list:

3 SCB_CONTROL[0x48] SCB_SCSIID[0x17] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(1): 3



<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>

scsi1:0:1:0: Device is active, asserting ATN

R...

Thank,
--
Gr?goire Favre