Subject: Re: iop0: unable to retrieve HRT
To: None <tls@rek.tjls.com>
From: Kosaki Kotaro <kosaki@math.sci.shizuoka.ac.jp>
List: current-users
Date: 02/02/2006 16:43:51
From: Thor Lancelot Simon <tls@rek.tjls.com>
Subject: Re: iop0: unable to retrieve HRT
Date: Wed, 1 Feb 2006 13:08:24 -0500
Message-ID: <20060201180824.GA15739@panix.com>
tls> On Wed, Feb 01, 2006 at 05:01:36PM +0900, Kosaki Kotaro wrote:
tls> >
tls> > I also have a a Dell Poweredge 1400 with Dell PERC 2/DC
tls> > It is a Linux box.
tls> > I have tried to install NetBSD-current on it whithout success.
tls> >
tls> > So tested a strange trick . ( whith success? )
tls>
tls> Your attached patch is wrong.
Yes I agree .
tls>Instead of breaking the I2O code, why
tls> don't you just switch the AMI RAID controller out of I2O mode? On
tls> every one I have seen, it is a simple BIOS setting.
I don't know who to do this.
tls> If it's impossible to switch it out of I2O mode, then you should not
tls> just ifdef out code necessary for other devices to work; you should
tls> add specific tests for it to the iop and amr drivers.
tls>
Following code works for me. But I don't think they are good .
----------------------------
amr.c
--------------------
static int
amr_match(struct device *parent, struct cfdata *match, void *aux)
{
struct pci_attach_args *pa;
pcireg_t s;
int i;
u_int product, vendor;
pa = (struct pci_attach_args *)aux;
/*
* Don't match the device if it's operating in I2O mode. In this
* case it should be handled by the `iop' driver.
*/
if (PCI_CLASS(pa->pa_class) == PCI_CLASS_I2O){
vendor = PCI_VENDOR(pa->pa_id);
product = PCI_PRODUCT(pa->pa_id);
if (vendor == PCI_VENDOR_INTEL && product == PCI_PRODUCT_INTEL_80960_RP)
s = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
if (vendor == PCI_VENDOR_INTEL && product == PCI_PRODUCT_INTEL_80960_RP
&& PCI_VENDOR(s) == PCI_VENDOR_DELL && PCI_PRODUCT(s)==0x467)
;
else
return (0);
}
----------------------------------------------
iop_pci.c
---------------------------------------------
static int
iop_pci_match(struct device *parent, struct cfdata *match, void *aux)
{
struct pci_attach_args *pa;
u_int product, vendor;
pcireg_t reg;
pa = aux;
vendor = PCI_VENDOR(pa->pa_id);
product = PCI_PRODUCT(pa->pa_id);
if (vendor == PCI_VENDOR_INTEL && product == PCI_PRODUCT_INTEL_80960_RP) {
reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
printf("PCI_VENDOR %x PCI_PRODUCT %x PCI_VENDOR_subsys %x PCI_PRODUCT_subsys %x \n"
,vendor,product,PCI_VENDOR(reg),PCI_PRODUCT(reg));
if (PCI_VENDOR(reg) == PCI_VENDOR_DELL && PCI_PRODUCT(reg)==0x467)
return (0);
}
-------------------------------------------------------------------
Thank you for your kind advice. I expect more systematic and better solution.
Kosaki