[lkml]   [2004]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [BK PATCH] USB update for 2.6.3

    On Fri, 20 Feb 2004, Benjamin Herrenschmidt wrote:
    > Yes, but we don't have a hook for actually filling this pointer, do we ?

    Well, we do. The pcibios_xxx routines get called for all PCI devices
    during discovery, and that's when you'd fill them in.

    Anyway, I found the bug - the "asm-generic/dma-mapping.h" compatibility
    macros _do_ work, but the EHCI controller driver doesn't actually include
    that header file. Oops.

    > We should have a way, when creating a device, to fill it properly, like
    > platform_device_setup(struct device *new_dev, struct device *parent)

    No no. That wouldn't work AT ALL, since the whole point is that you need
    to know what the device is - ie you need to fill in the information when
    you get the "struct pci_dev *" (because different buses would most likely
    have different behaviour, and could have different requirements for DMA
    mapping etc).

    So the platform code that actually knows what the device is (pcibios_xxx
    for PCI devices) would fill in the platform pointer.

    Anyway, I got it all working with the trivial patch..

    ===== drivers/usb/host/ehci-hcd.c 1.67 vs edited =====
    --- 1.67/drivers/usb/host/ehci-hcd.c Wed Feb 11 03:42:39 2004
    +++ edited/drivers/usb/host/ehci-hcd.c Thu Feb 19 22:42:53 2004
    @@ -41,6 +41,7 @@
    #include <linux/reboot.h>
    #include <linux/usb.h>
    #include <linux/moduleparam.h>
    +#include <linux/dma-mapping.h>

    #include "../core/hcd.h"

    so this works for now, even though it's really really ugly (and it _will_
    BUG() out if anybody ever passes a non-PCI-related "struct device" to the

    Let's see if it boots too. So far it's only compiled successfully ;)

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-11-18 23:46    [W:0.023 / U:4.416 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site