Intel 845 Boards / 82801DB IDE Chipset / resource collisions

Reinhard Moosauer (rm@moosauer.de)
Thu, 25 Jul 2002 15:24:15 +0200


(Please answer to directly to my email too. Thanks!)

Hello List,

some people had problems with
Intel IDE Chips on 845E Boards. ( "resource collisions" )

Yesterday I had the same problem.

Alan Cox said:
> If you look with lspci -v you will find your BIOS has mismapped or
> forgotten to map some of the control register space for that device.
>
> Alan

IMHO there must be a bios bug (latest rev.), because the io resources are left
unassigned. But why does the kernel not fix it?
After reading many questions and no answers, I looked into the kernel source.

I found this block in arch/i386/kernel/pci-i386.c:

==================
/*
* Don't touch IDE controllers and I/O ports of video cards!
*/
if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) ||
(class == PCI_CLASS_DISPLAY_VGA && (r->flags & IORESOURCE_IO)))
continue;
====================

lspci shows indeed the first 4 resources unassigned.

To work around the problem I inserted these lines:
(just before the above block)

========================
/* HACK
* Reinhard Moosauer, 2002-07-25
*/
if ((class == PCI_CLASS_STORAGE_IDE && idx < 4) &&
(!r->start && r->end)) {
printk(KERN_ERR "HACK: INTEL IDE Workaround for"
" %s Resource %d\n", dev->slot_name, idx);

/* I ACCEPT NO RESPOSIBILITY FOR ANY DAMAGE */
pci_assign_resource(dev, idx);
}
==========================

It really works.
As I saw on the list, many other people had the same problem
so I thought, the gurus should take a look at this.

Note1: Please do not use this before anybody gave an OK to it!
I am just playing sorcerer's apprentice.

Note2: You need a patch for kernels before 2.4.19 or so to use the new Intel
Chipsets (when he says "unknown device 0x24cb" or so) . I have one for
2.4.18.

I hope, this helps someone.

Kind regards,

Reinhard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/