All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan von Krawczynski <skraw@ithnet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: OOPS in 2.4.21-pre5, ide-scsi
Date: Thu, 13 Mar 2003 16:23:07 +0100	[thread overview]
Message-ID: <20030313162307.72f81028.skraw@ithnet.com> (raw)
In-Reply-To: <E18tPJJ-0001Dv-00@gondolin.me.apana.org.au>

On Thu, 13 Mar 2003 20:47:37 +1100
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> Stephan von Krawczynski <skraw@ithnet.com> wrote:
> > 
> > Code;  c0213ab3 <idescsi_pc_intr+63/360>
> > 00000000 <_EIP>:
> > Code;  c0213ab3 <idescsi_pc_intr+63/360>   <=====
> >   0:   ff 42 18                  incl   0x18(%edx)   <=====
> > Code;  c0213ab6 <idescsi_pc_intr+66/360>
> >   3:   89 3c 24                  mov    %edi,(%esp,1)
> > Code;  c0213ab9 <idescsi_pc_intr+69/360>
> >   6:   c7 44 24 04 01 00 00      movl   $0x1,0x4(%esp,1)
> > Code;  c0213ac0 <idescsi_pc_intr+70/360>
> >   d:   00 
> > Code;  c0213ac1 <idescsi_pc_intr+71/360>
> >   e:   e8 ae fc ff ff            call   fffffcc1 <_EIP+0xfffffcc1> c0213774
> >   <idescsi_do_end_request+a4/e0>
> > Code;  c0213ac6 <idescsi_pc_intr+76/360>
> >  13:   31 00                     xor    %eax,(%eax)
> 
> Does this patch fix the problem?
> [attached patch]

Hello Herbert, hello all,

first of all: your patch does not apply at all on -pre5. Anyway I got your idea
and re-did it accordingly.
Interestingly the machine does not crash any more! And I have some useful
output from mounting:

>From "modprobe ide-scsi":

Mar 13 16:11:30 admin kernel:   Vendor: AOPEN     Model: CD-RW CRW2440     Rev:
2.02
Mar 13 16:11:30 admin kernel:   Type:   CD-ROM                             ANSI
SCSI revision: 02
Mar 13 16:11:30 admin kernel: Attached scsi CD-ROM sr0 at scsi2, channel 0, id
0, lun 0
Mar 13 16:11:30 admin kernel: sr0: scsi3-mmc drive: 40x/40x writer cd/rw
xa/form2 cdda tray

>From "mount /dev/sr0 /mnt":

Mar 13 16:12:12 admin kernel: scsi : aborting command due to timeout : pid
114491, scsi2, channel 0, id 0, lun 0 0x28 00 00 00 00 00 00 00 02 00 
Mar 13 16:12:12 admin kernel: hdc: timeout waiting for DMA
Mar 13 16:12:12 admin kernel: hdc: timeout waiting for DMA
Mar 13 16:12:12 admin kernel: hdc: (__ide_dma_test_irq) called while not
waiting
Mar 13 16:12:12 admin kernel: hdc: status error: status=0x58 { DriveReady
SeekComplete DataRequest }
Mar 13 16:12:12 admin kernel: hdc: drive not ready for command
Mar 13 16:12:12 admin kernel: hdc: status error: status=0x58 { DriveReady
SeekComplete DataRequest }
Mar 13 16:12:12 admin kernel: hdc: drive not ready for command
Mar 13 16:12:12 admin kernel: hdc: status error: status=0x58 { DriveReady
SeekComplete DataRequest }
Mar 13 16:12:12 admin kernel: hdc: drive not ready for command
Mar 13 16:12:12 admin kernel: hdc: status error: status=0x58 { DriveReady
SeekComplete DataRequest }
Mar 13 16:12:12 admin kernel: hdc: drive not ready for command
Mar 13 16:12:12 admin kernel: hdc: ATAPI reset complete
Mar 13 16:12:12 admin kernel:  I/O error: dev 0b:00, sector 0

It looks like the serverworks ide-driver produces some error, and that is
absolutely poor-handled inside ide-scsi. After this output the mounted CD is
accessible, btw.

And another thing: this error only occurs the _first_ time a mount is performed
(the above CD is completely ok). From the second mount on everything looks
normal.

Regards,
Stephan


My patch:

diff -Nur linux/drivers/scsi/ide-scsi.c linux-patch/drivers/scsi/ide-scsi.c
--- linux/drivers/scsi/ide-scsi.c       2003-03-13 15:37:06.000000000 +0100
+++ linux-patch/drivers/scsi/ide-scsi.c 2003-03-13 16:19:41.000000000 +0100
@@ -321,7 +321,7 @@
 {
        idescsi_scsi_t *scsi = drive->driver_data;
        struct request *rq = HWGROUP(drive)->rq;
-       idescsi_pc_t *pc = (idescsi_pc_t *) rq->buffer;
+       idescsi_pc_t *pc = rq->special;
        int log = test_bit(IDESCSI_LOG_CMD, &scsi->log);
        u8 *scsi_buf;
        unsigned long flags;
@@ -587,7 +587,7 @@
 #endif /* IDESCSI_DEBUG_LOG */
 
        if (rq->cmd == IDESCSI_PC_RQ) {
-               return idescsi_issue_pc(drive, (idescsi_pc_t *) rq->buffer);
+               return idescsi_issue_pc (drive, rq->special);
        }
        printk(KERN_ERR "ide-scsi: %s: unsupported command in request "
                "queue (%x)\n", drive->name, rq->cmd);
@@ -1083,7 +1083,7 @@
        }
 
        ide_init_drive_cmd(rq);
-       rq->buffer = (char *) pc;
+       rq->special = pc;
        rq->bh = idescsi_dma_bh(drive, pc);
        rq->cmd = IDESCSI_PC_RQ;
        spin_unlock_irq(&io_request_lock);



  parent reply	other threads:[~2003-03-13 15:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-27 21:10 OOPS in 2.4.21-pre5, ide-scsi Stephan von Krawczynski
2003-02-28 15:28 ` Stephan von Krawczynski
2003-03-11 17:24   ` Stephan von Krawczynski
2003-03-13  9:47 ` Herbert Xu
2002-12-31 11:14   ` Willy Gardiol
2002-12-31 11:14     ` Willy Gardiol
2003-03-13 15:23   ` Stephan von Krawczynski [this message]
2003-03-13 15:50 ` James Stevenson
2003-03-13 16:37   ` Jens Axboe
2003-03-13 16:39     ` Willy Gardiol
2003-03-13 16:47       ` Jens Axboe
2003-03-13 18:50       ` Andre Hedrick
2003-03-13 20:28         ` Alan Cox
2003-03-13 16:50     ` James Stevenson
2003-03-13 16:46       ` Jens Axboe
2003-03-13 17:11         ` James Stevenson
2003-03-13 17:14           ` Jens Axboe
2003-03-13 17:31             ` Stephan von Krawczynski
2003-03-13 17:37               ` Jens Axboe
2003-03-13 17:41                 ` Stephan von Krawczynski
2003-03-13 17:52                   ` Jens Axboe
2003-03-13 18:28             ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030313162307.72f81028.skraw@ithnet.com \
    --to=skraw@ithnet.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.