Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Sep 2000 12:39:57 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Ron Rosson <insane@lunatic.oneinsane.net>
Cc:        wpaul@freebsd.org, mobile@freebsd.org
Subject:   Re: USB 
Message-ID:  <200009011939.MAA05534@mass.osd.bsdi.com>
In-Reply-To: Your message of "Fri, 01 Sep 2000 08:56:24 PDT." <20000901085624.A8328@lunatic.oneinsane.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 
> > Can you instead give me the output of  'pciconf -r pci0:7:2 4' ?  I would 
> > hazard a guess that the least significant bit will be zero, indicating 
> > that I/O port access is not enabled for this device, and we don't honour 
> > the register allocation in that case.
> > 
> 
> mental#	pciconf -r pci0:7:2 4
> 0x02800000
> 
> Hope this helps

Yup.  Your PCI BIOS is buggy; it's assigning resources to the device but
not bothering to set the 'enable' bit for the resource type.

You can try hacking around this for now, Bill will probably fix it 
properly in a few days.  In /sys/pci/pci.c around line 1080 you have this 
code (without the line numbers, obviously 8):

    1082         if (type == SYS_RES_IOPORT && !pci_porten(cfg))
    1083                 return 1;
    1084         if (type == SYS_RES_MEMORY && !pci_memen(cfg))
    1085                 return 1;

Change it to read:

    if (type == SYS_RES_IOPORT && !pci_porten(cfg))
         pci_cfgwrite(cfg, PCIR_COMMAND, cfg->cmdreg | PCIM_CMD_PORTEN, 2);
    if (type == SYS_RES_MEMORY && !pci_memen(cfg))
         pci_cfgwrite(cfg, PCIR_COMMAND, cfg->cmdreg | PCIM_CMD_MEMEN, 2);

This ignores the fact that the BIOS hasn't enabled the relevant access 
types, and takes care of it instead.  Let me know how you go with this.

Regards,
-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009011939.MAA05534>