From: Ralf Oehler <R.Oehler@GDAmbH.com>
To: Scsi <linux-scsi@vger.kernel.org>, linux-kernel@vger.kernel.org
Cc: Andrea Arcangeli <andrea@suse.de>, Jens Axboe <axboe@kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: one-line-patch against SCSI-Read-Error-BUG()
Date: Tue, 05 Feb 2002 15:32:10 +0100 (MET) [thread overview]
Message-ID: <XFMail.20020205153210.R.Oehler@GDAmbH.com> (raw)
Hi, List
I think, I found a very simple solution for this annoying BUG().
Since at least kernel 2.4.16 there is a BUG() in pci.h,
that crashes the kernel on any attempt to read a SCSI-Sector
from an erased MO-Medium and on any attempt to read
a sector from a SCSI-disk, which returns "Read-Error".
There seems to be a thinko in the corresponding code, which
does not take into account the case where a SCSI-READ
does not return any data because of a "sense code: read error"
or a "sense code: blank sector".
I simply commented out this BUG() statement (see below)
and everything worked well from there on. The BUG()
seems to be inadequate.
Please could you check if I'm right and apply this change to the
current kernel? Again I want to stress that in my
oppinion it is dangerous for the stability of a production
machine if it crashes on the next SCSI-Read-Error it sees.
Most SCSI-Hardware today shows very few read errors, but
please let's not rely on that. That'd be playing vabanque.
If there are tests to do, I can offer my time and hardware
(SCSI-MO drives and media with various sector sizes) to
test and in case to provide stack traces.
Regards,
Ralf
include/asm/pci.h:
static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
int i;
if (direction == PCI_DMA_NONE)
BUG();
/*
* temporary 2.4 hack
*/
for (i = 0; i < nents; i++ ) {
if (sg[i].address && sg[i].page)
BUG();
--------> else if (!sg[i].address && !sg[i].page)
--------> BUG();
if (sg[i].address)
sg[i].dma_address = virt_to_bus(sg[i].address);
else
sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset;
}
flush_write_buffers();
return nents;
}
--------------------------------------------------------------------------
| Ralf Oehler
|
| GDA - Gesellschaft fuer Digitale _/
| Archivierungstechnik mbH & CoKG _/
| Ein Unternehmen der Bechtle AG #/_/_/_/ _/_/_/_/ _/_/_/_/
| _/ _/ _/ _/ _/
| E-Mail: R.Oehler@GDAmbH.com _/ _/ _/ _/ _/ _/
| Tel.: +49 6182-9271-23 _/_/_/_/ _/_/_/#/ _/_/_/#/
| Fax.: +49 6182-25035 _/
| Mail: GDA, Bensbruchstraße 11, _/_/_/_/
| D-63533 Mainhausen
| HTTP: www.GDAmbH.com
--------------------------------------------------------------------------
time is a funny concept
next reply other threads:[~2002-02-05 14:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-05 14:32 Ralf Oehler [this message]
2002-02-05 14:24 ` Jens Axboe
2002-02-05 14:52 ` Momchil Velikov
2002-02-05 14:42 ` Jens Axboe
2002-02-06 4:40 ` Douglas Gilbert
2002-02-05 20:56 ` Alan Cox
2002-02-06 7:32 ` Ralf Oehler
2002-02-06 9:22 ` Helge Hafting
2002-02-05 22:40 ` James Stevenson
2002-02-06 7:36 ` Ralf Oehler
2002-02-07 0:59 ` Patrick Mansfield
2002-02-07 5:10 ` Douglas Gilbert
2002-02-07 7:29 ` Jens Axboe
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=XFMail.20020205153210.R.Oehler@GDAmbH.com \
--to=r.oehler@gdambh.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=axboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®