# scsi: Device offlined - not ready after error recovery

## belgo

Hi,

I'm trying to get my Minolta Quickscan 35+ film scanner to work with Gentoo. The SCSI pccard and scanner are detected with both 2.6.8 and 2.6.9-rc1:

```
scsi0 : Qlogicfas Driver version 0.46, chip 50 at 230, IRQ 3, TPdma:1

  Vendor: Minolta   Model: #2880 QS35        Rev: 101A

  Type:   Scanner                            ANSI SCSI revision: 02

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 6

```

But when I start the application that accesses the scanner ('VueScan' in my case), the application hangs while detecting the scanner. dmesg gives me the following error:

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

scsi0 (0:0): rejecting I/O to offline device

```

Where should I start looking for the cause of the problem? The scanner should work, although I have never tested it. I don't have any other SCSI device or SCSI host adapters. Are there preferred kernel versions that are known to work well with SCSI devices (I have tested 2.6.8 and 2.6.9-rc1 so far).

Also, I have SCSI logging enabled (CONFIG_SCSI_LOGGING=y) but I'm not sure where the logs should appear.

Thanks in advance.

----------

## belgo

Nobody?  :Shocked: 

----------

## phixom

I've the same Problem with a HP-Scannjet 6200c

```

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

CDB: 0x8 0x0 0x0 0x80 0x0 0x0

scsi4: At time of recovery, card was not paused

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

scsi4: Dumping Card State while idle, at SEQADDR 0x8

Card was paused

ACCUM = 0x3f, SINDEX = 0x7, DINDEX = 0x21, ARG_2 = 0x0

HCNT = 0x0 SCBPTR = 0x0

SCSISIGI[0x0] ERROR[0x0] SCSIBUSL[0x0] LASTPHASE[0x1]:(P_BUSFREE)

SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI) SBLKCTL[0x0] SCSIRATE[0x0]

SEQCTL[0x10]:(FASTMODE) SEQ_FLAGS[0xc0]:(NO_CDB_SENT|NOT_IDENTIFIED)

SSTAT0[0x5]:(DMADONE|SDONE) SSTAT1[0xa]:(PHASECHG|BUSFREE)

SSTAT2[0x0] SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xa4]:(ENSCSIPERR|ENSCSIRST|ENSELTIMO)

SXFRCTL0[0x80]:(DFON) DFCNTRL[0x0] DFSTATUS[0x2d]:(FIFOEMP|DFTHRESH|HDONE|FIFOQWDEMP)

STACK: 0x0 0x160 0x1a1 0x3

SCB count = 4

Kernel NEXTQSCB = 3

Card NEXTQSCB = 3

QINFIFO entries:

Waiting Queue entries:

Disconnected Queue entries: 0:2

QOUTFIFO entries:

Sequencer Free SCB List: 1 2

Sequencer SCB Info:

  0 SCB_CONTROL[0x44]:(DISCONNECTED|DISCENB) SCB_SCSIID[0x7]

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]

Pending list:

  2 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0x7] SCB_LUN[0x0]

Kernel Free SCB list: 1 0

Untagged Q(0): 2

DevQ(0:0:0): 1 waiting

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

(scsi4:A:0:0): Device is disconnected, re-queuing SCB

Recovery code sleeping

Recovery SCB completes

Recovery code awake

aic7xxx_abort returns 0x2002

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

CDB: 0x8 0x0 0x0 0x80 0x0 0x0

scsi4:0:0:0: Is not an active device

aic7xxx_abort returns 0x2002

scsi4:0:0:0: Attempting to queue a TARGET RESET message

CDB: 0x8 0x0 0x0 0x80 0x0 0x0

scsi4:0:0:0: Is not an active device

aic7xxx_dev_reset returns 0x2002

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

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

scsi4 (0:0): rejecting I/O to offline device

```

is there any solution?

----------

## linear

I am having the same problem iwth an Ultrastor rs2080-400ad RAID box using 2.6.9-r4 and an adaptec 29320A controler with the driver built into the kernel (79xx Ultra 320 driver).

During kernel init on boot it sees the adaptec controller then sees the raid box.  It then goes into a 10 min loop spewing:

 *Quote:*   

> Nov 18 11:41:09 dimsserver kernel: DevQ(0:1:0): 0 waiting
> 
> Nov 18 11:41:09 dimsserver kernel: scsi0:0:1:0: Unable to deliver message
> 
> Nov 18 11:41:09 dimsserver kernel: Recovery code sleeping
> ...

 

That is the tail end of the message with the ending messages.  From the begining of the quote to the "Dump Card State Ends" message repeats scores of times.

The same thing happens if I try and fdisk the device.  It will hang for 10 mins spewing to the log file then finally exit fdisk.

The device does get set up as  /dev/sda

I am booting from /dev/sdb which is on an ICH6 SATA controller using the PIIX drivers.

my lspci:

 *Quote:*   

> 0000:00:00.0 Host bridge: Intel Corp. 915G/P/GV Processor to I/O Controller (rev 04)
> 
> 0000:00:02.0 VGA compatible controller: Intel Corp. 82915G Express Chipset Family Graphics Controller (rev 04)
> 
> 0000:00:02.1 Display controller: Intel Corp. 82915G Express Chipset Family Graphics Controller (rev 04)
> ...

 

The dmesg is overflowed by the scsi spew at the top.  It adds one line to the report:

 *Quote:*   

> Buffer I/O error on device sda, logical block 15

 

I appreciate ANY help anyone may provide.

----------

## fpujol

I have the same problem with adaptec 2932A. The scsi goes offline and I don't understand why. 

A friend tell me that it's possible for the ACPI but I desactivate it and I have the same problem.

I'm working with the kernel 2.6.12-r9.

----------

## hamletmun

Same problem here with Adaptec 29160 with gentoo-sources-2.6.14-r2 & 2.6.14-r4

So I'm still using gentoo-sources-2.6.13-r5 and no problem at all

----------

## hamletmun

Today I tried to update my kernel source to gentoo-sources-2.6.15-r1

But same SCSI problem occured.

The last kernel I can use without problem is gentoo-sources-2.6.13-r5 as I mentioned above.

the aic7xxx driver that this kernel has is 6.2.36, the new kernel 2.6.15-r1 has the version 7.

When I compile the new kernel, I get a message "aic7xxx_osm ahc_linux_register_host"

I don't know if this information is relevant or not.

----------

