From: Jason Williams <jason_williams@suth.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: andre@linux-ide.org
Subject: [PATCH] 2.5.44 and Secondary Channel Only configuration Kernel Ooops
Date: 21 Oct 2002 09:13:01 -0400 [thread overview]
Message-ID: <1035205986.967.8.camel@cermanius.suth.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 599 bytes --]
Here is a patch to correct the problem with the IDE code when you have
the Secondary Channel Only enabled in your BIOS. If you have only the
secondary channel enabled, a null pointer get passed to the
ide_iomio_dma function as the part of the hwif var (more specifically
hwif->mate) This patch puts in some extra sanity checks in that section
so make sure we don't hit the null.
Jason
P.S. This is a continuation of a previous patch I submitted for 2.5.43
which wasn't committed and I didn't send that to the maintainer (Sorry
Andre) so I am resending it now as a patch to the 2.5.44 kernel.
[-- Attachment #2: Type: text/x-patch, Size: 1243 bytes --]
diff -u -r linux-2.5.44-vanilla/drivers/ide/ide-dma.c linux-2.5.44/drivers/ide/ide-dma.c
--- linux-2.5.44-vanilla/drivers/ide/ide-dma.c 2002-10-21 08:02:49.000000000 -0500
+++ linux-2.5.44/drivers/ide/ide-dma.c 2002-10-21 08:56:49.000000000 -0500
@@ -905,7 +905,12 @@
request_region(base+16, hwif->cds->extra, hwif->cds->name);
hwif->dma_extra = hwif->cds->extra;
}
- hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
+ if(!hwif->mate && hwif->channel){
+ hwif->dma_master=base;
+ }
+ else{
+ hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
+ }
if (hwif->dma_base2) {
if (!check_mem_region(hwif->dma_base2, ports))
request_mem_region(hwif->dma_base2, ports, hwif->name);
@@ -925,8 +930,13 @@
if ((hwif->cds->extra) && (hwif->channel == 0)) {
request_region(base+16, hwif->cds->extra, hwif->cds->name);
hwif->dma_extra = hwif->cds->extra;
+ }
+ if(!hwif->mate && hwif->channel){
+ hwif->dma_master=base;
+ }
+ else{
+ hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
}
- hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
if (hwif->dma_base2) {
if (!request_region(hwif->dma_base2, ports, hwif->name))
{
reply other threads:[~2002-10-21 13:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1035205986.967.8.camel@cermanius.suth.com \
--to=jason_williams@suth.com \
--cc=andre@linux-ide.org \
--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 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®