linux-2.2.22, scsi-idle: oops with tmscsim driver

From: Ville Herva (vherva@niksula.hut.fi)
Date: Sun Sep 29 2002 - 10:42:21 EST


Firstly: I've only seen this with scsi-idle, it perhaps might happen without
it.

[Willy, I'm cc'ing you because I asked you about scsi-idle and it seems the
bug might elsewhere.]

Whenever scsi-idle has spun down a disk, and the kernel wakes it up, the
disk does correctly spin up, but I get:

Adhoc c01aae80 <dc390_Disconnect+12c/138>
Adhoc c01a9f2a <do_DC390_Interrupt+112/1c8>
Adhoc c0108b7a <handle_IRQ_event+36/68>
Adhoc c010893f <do_8259A_IRQ+7f/a8>
Adhoc c0106000 <get_options+0/74>
Adhoc c0108c94 <do_IRQ+24/40>
Adhoc c0108980 <common_interrupt+18/20>
Adhoc c0106000 <get_options+0/74>
Adhoc c0106270 <cpu_idle+64/7c>
Adhoc c010629c <sys_idle+14/24>
Adhoc c01078e8 <system_call+34/38>
Adhoc c0106000 <get_options+0/74>
Adhoc c010609b <cpu_idle+7/18>
Adhoc c0106000 <get_options+0/74>
Adhoc c0100174 <L6+0/2>

Based on gdb dissambly, it actually dies in dc390_SRBdone, called by
dc390_Disconnect:

dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
{
    UCHAR bval, status, i, DCB_removed;
    PSCSICMD pcmd;
    PSCSI_INQDATA ptr;
    PSGL ptr2;
    ULONG swlval;

    pcmd = pSRB->pcmd; DCB_removed = 0;
    status = pSRB->TargetStatus;
    ptr = (PSCSI_INQDATA) (pcmd->request_buffer);
    if( pcmd->use_sg )
        ptr = (PSCSI_INQDATA) (((PSGL) ptr)->address);
                                       ^^^^^^^^^^^^^^
                                       Here.

The ptr pointer is NULL.
  
I created the attached patch, and it works now, but I'm very uncertain if
that's even near the correct solution.

Also, I can't tell if that could happen without the scsi-idle patch.

It would be nice if a scsi-guru had a look...

-- v --

v@iki.fi



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:40 EST