From: Andrew Morton <akpm@osdl.org>
To: Miguel <frankpoole@terra.es>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: PCI bug in 2.6.13
Date: Fri, 9 Sep 2005 22:59:56 -0700 [thread overview]
Message-ID: <20050909225956.42021440.akpm@osdl.org> (raw)
In-Reply-To: <20050909180405.3e356c2a.frankpoole@terra.es>
Miguel <frankpoole@terra.es> wrote:
>
> After switching from 2.6.13-rc7 to 2.6.13 I've started to have corrupted
> data written on my hard disks, there was appearing blocks of 0x00 bytes
> in between the data. I've tracked when this started to happen in the git
> patches and I've found that this bug is due to the changes done in the
> file drivers/pci/setup-res.c of 2.6.13-rc7-git2 patch. Now I run a 2.6.13
> kernel with that file unmodified and everything is ok.
Ugly. I assume you're referring to this?
http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;h=50d6685dcbcce801682c9600a81be2a98f90f8a1;hp=5598b4714f77ac2efaf0f545e404b4c9163c4fcf;hb=755528c860b05fcecda1c88a2bdaffcb50760a7f;f=drivers/pci/setup-res.c
Ignore disabled ROM resources at setup
Writing even a disabled value seems to mess up some matrox graphics
cards. It may be a card-related issue, but we may also be writing
reserved low bits in the result.
This was a fall-out of switching x86 over to the generic PCI resource
allocation code, and needs more debugging. In particular, the old x86
code defaulted to not doing any resource allocations at all for ROM
resources.
In the meantime, this has been reported to make X happier by Helge
Hafting <helgehaf@aitel.hist.no>.
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev,
if (resno < 6) {
reg = PCI_BASE_ADDRESS_0 + 4 * resno;
} else if (resno == PCI_ROM_RESOURCE) {
- new |= res->flags & IORESOURCE_ROM_ENABLE;
+ if (!(res->flags & IORESOURCE_ROM_ENABLE))
+ return;
+ new |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
/* Hmm, non-standard resource. */
next prev parent reply other threads:[~2005-09-10 6:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-09 16:04 PCI bug in 2.6.13 Miguel
2005-09-10 5:59 ` Andrew Morton [this message]
2005-09-10 9:36 ` Miguel
2005-09-10 16:51 ` Linus Torvalds
2005-09-10 21:06 ` Linus Torvalds
2005-09-11 1:08 ` Miguel
2005-09-11 1:41 ` Linus Torvalds
2005-09-11 8:53 ` Vojtech Pavlik
2005-09-11 11:54 ` Linus Torvalds
2005-09-11 14:10 ` Miguel
2005-09-11 16:08 ` Linus Torvalds
2005-09-11 16:30 ` Jeff Garzik
2005-09-11 17:15 ` Miguel
2005-09-11 17:59 ` Linus Torvalds
2005-09-12 17:20 ` 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=20050909225956.42021440.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=frankpoole@terra.es \
--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 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.