public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hood <jdthoodREMOVETHIS@yahoo.co.uk>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parport_pc.c PnP BIOS sanity check
Date: Mon, 13 Aug 2001 17:46:23 -0400	[thread overview]
Message-ID: <3B784AAF.9E6E8E00@yahoo.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

Alan Cox wrote:
> IRQ 0 is a legal valid IRQ. I suspect the problem is that pnpbios shouldnt
> be reporting an IRQ or we should be using some kind of NO_IRQ cookie

Okay, I accept that.  Then must we also say that DMA 0 is a
valid DMA?  If so, then unless I'm confused about something
the rejection of dma==0 should be eliminated:
--------------------------------------------------------------------------------
--- linux-2.4.7-ac10/drivers/parport/parport_pc.c_ORIG  Fri Aug 10 18:19:07 2001
+++ linux-2.4.7-ac10/drivers/parport/parport_pc.c       Mon Aug 13 17:40:38 2001
@@ -2797,8 +2797,6 @@
        irq=dev->irq_resource[0].start;
        dma=dev->dma_resource[0].start;

-       if (dma==0) dma=-1;
-
        printk(KERN_INFO "PnPBIOS: Parport found %s %s at io=%04x,%04x irq=%d dma=%d\n",
                dev->name,dev->slot_name,io,iohi,irq,dma);
        if (parport_pc_probe_port(io,iohi,irq,dma,NULL))
--------------------------------------------------------------------------------

Otherwise I think the following change should be made for the sake of
code clarity.  (PARPORT_DMA_NONE is defined as -1.)
--------------------------------------------------------------------------------
--- linux-2.4.7-ac10/drivers/parport/parport_pc.c_ORIG  Fri Aug 10 18:19:07 2001
+++ linux-2.4.7-ac10/drivers/parport/parport_pc.c       Fri Aug 10 18:19:55 2001
@@ -2797,7 +2797,7 @@
        irq=dev->irq_resource[0].start;
        dma=dev->dma_resource[0].start;

-       if (dma==0) dma=-1;
+       if (dma==0) dma=PARPORT_DMA_NONE;

        printk(KERN_INFO "PnPBIOS: Parport found %s %s at io=%04x,%04x irq=%d dma=%d\n",
                dev->name,dev->slot_name,io,iohi,irq,dma);
--------------------------------------------------------------------------------

--
Thomas Hood
jdthood_AT_yahoo.co.uk

[-- Attachment #2: patch-norejdma --]
[-- Type: text/plain, Size: 451 bytes --]

--- linux-2.4.7-ac10/drivers/parport/parport_pc.c_ORIG	Fri Aug 10 18:19:07 2001
+++ linux-2.4.7-ac10/drivers/parport/parport_pc.c	Mon Aug 13 17:40:38 2001
@@ -2797,8 +2797,6 @@
 	irq=dev->irq_resource[0].start;
 	dma=dev->dma_resource[0].start;
 
-	if (dma==0) dma=-1;
-
 	printk(KERN_INFO "PnPBIOS: Parport found %s %s at io=%04x,%04x irq=%d dma=%d\n",
 		dev->name,dev->slot_name,io,iohi,irq,dma);
 	if (parport_pc_probe_port(io,iohi,irq,dma,NULL))

[-- Attachment #3: patch-dmanone --]
[-- Type: text/plain, Size: 436 bytes --]

--- linux-2.4.7-ac10/drivers/parport/parport_pc.c_ORIG	Fri Aug 10 18:19:07 2001
+++ linux-2.4.7-ac10/drivers/parport/parport_pc.c	Fri Aug 10 18:19:55 2001
@@ -2797,7 +2797,7 @@
 	irq=dev->irq_resource[0].start;
 	dma=dev->dma_resource[0].start;
 
-	if (dma==0) dma=-1;
+	if (dma==0) dma=PARPORT_DMA_NONE;
 
 	printk(KERN_INFO "PnPBIOS: Parport found %s %s at io=%04x,%04x irq=%d dma=%d\n",
 		dev->name,dev->slot_name,io,iohi,irq,dma);

             reply	other threads:[~2001-08-13 21:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-13 21:46 Thomas Hood [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-21  6:00 [PATCH] parport_pc.c PnP BIOS sanity check Thomas Hood
2001-09-21  6:11 ` Ignacio Vazquez-Abrams
2001-09-21 12:07   ` Alan Cox
2001-09-21 18:45   ` Thomas Hood
2001-09-22  0:08   ` Philip Blundell
2001-09-21 18:09 ` Gunther Mayer
     [not found] <no.id>
2001-08-08 15:20 ` Alan Cox
2001-08-08 16:13   ` Richard B. Johnson
2001-08-08 21:58   ` H. Peter Anvin
2001-08-08 22:12     ` Russell King
2001-08-10  9:18     ` Eric W. Biederman
2001-08-08 15:15 Thomas Hood

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=3B784AAF.9E6E8E00@yahoo.co.uk \
    --to=jdthoodremovethis@yahoo.co.uk \
    --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