Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB problems after memory upgrade



On 11 September 2011 17:25, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> 
wrote:
>> > According to this thread
>> >
>> > http://mail-index.netbsd.org/netbsd-users/2009/04/15/msg003491.html
>> > http://mail-index.netbsd.org/netbsd-users/2009/04/15/msg003492.html
>> >
>> > the problem is the USB controller. I don't know if it is an nVidia one
>> > as mentioned in kern/37884:
>>
>> According to "src/sys/dev/pcidevs" this is an ATI SB700 USB controller.
>
> IIRC NVIDIA EHCI has a bug, but not sure about ATI ones.
>
>
> Index: ehci_pci.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/pci/ehci_pci.c,v
> retrieving revision 1.53
> diff -u -p -r1.53 ehci_pci.c
> --- ehci_pci.c  30 Jul 2011 13:19:21 -0000      1.53
> +++ ehci_pci.c  11 Sep 2011 16:22:29 -0000
> @@ -155,6 +155,20 @@ ehci_pci_attach(device_t parent, device_
>        sc->sc_pc = pc;
>        sc->sc_tag = tag;
>        sc->sc.sc_bus.dmatag = pa->pa_dmat;
> +       if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_NVIDIA ||
> +           PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ATI) {
> +               bus_dma_tag_t dmat;
> +
> +               /* NVIDIA EHCI can't xfer DMA >2GB RAM */
> +               if (bus_dmatag_subregion(pa->pa_dmat, 0, (1 << 31),
> +                   &dmat, BUS_DMA_NOWAIT) != 0) {
> +                       aprint_error_dev(self, "failed to restrict DMA range "
> +                           "for NVIDIA EHCI hardware bug; "
> +                           "falling back to parent bus dma range\n");
> +                       dmat = pa->pa_dmat;
> +               }
> +               sc->sc.sc_bus.dmatag = dmat;
> +       }

How hard would it be to provide a kernel option to specifically
allocate the highest possibly memory locations for devices, to try to
flush out such issues?


Home | Main Index | Thread Index | Old Index