public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: torvalds@osdl.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Subject: PATCH: 2.6.10 - Incorrect return from PCI ide controller
Date: Mon, 27 Dec 2004 14:37:38 +0000	[thread overview]
Message-ID: <1104158258.20952.44.camel@localhost.localdomain> (raw)

Several IDE drivers return positive values as errors in the PCI setup
code. Unfortunately the PCI layer considers positive values as success
so the driver skips the device but still claims it and things then go
downhill.

This fixes the IT8172 driver. There are other drivers with this bug (eg
generic) but the -ac IDE is sufficiently diverged from base that someone
else needs to generate/test the more divergent cases.

Alan

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/drivers/ide/pci/it8172.c linux-2.6.10/drivers/ide/pci/it8172.c
--- linux.vanilla-2.6.10/drivers/ide/pci/it8172.c	2004-12-25 21:15:34.000000000 +0000
+++ linux-2.6.10/drivers/ide/pci/it8172.c	2004-12-26 17:22:17.577730520 +0000
@@ -270,7 +270,7 @@
 {
         if ((!(PCI_FUNC(dev->devfn) & 1) ||
             (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
-                return 1; /* IT8172 is more than only a IDE controller */
+                return -EAGAIN; /* IT8172 is more than an IDE controller */
 	ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
 	return 0;
 }


             reply	other threads:[~2004-12-27 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27 14:37 Alan Cox [this message]
2004-12-28 20:55 ` PATCH: 2.6.10 - Incorrect return from PCI ide controller Francois Romieu
2004-12-28 21:15   ` Bartlomiej Zolnierkiewicz
2004-12-29  0:09     ` Francois Romieu
2004-12-30  0:03     ` [patch 2.6.10-bk1 1/5] pci-ide: propagation of error code in ide setup Francois Romieu
2004-12-30  0:04       ` [patch 2.6.10-bk1 2/5] pci-ide: clean up error path in do_ide_setup_pci_device Francois Romieu
2004-12-30  0:06         ` [patch 2.6.10-bk1 3/5] pci-ide: propagate the error status in ide_pci_enable/ide_setup_pci_controller Francois Romieu
2004-12-30  0:07           ` [patch 2.6.10-bk1 4/5] pci-ide: fix the incorrect returns for the generic driver Francois Romieu
2004-12-30  0:09             ` [patch 2.6.10-bk1 5/5] pci-ide: make device drivers code aware of the changes made to ide_setup_pci_device{s} Francois Romieu
2004-12-30  0:21               ` colophon Francois Romieu
2004-12-28 22:12   ` PATCH: 2.6.10 - Incorrect return from PCI ide controller 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=1104158258.20952.44.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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