lkml.org 
[lkml]   [2012]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [RFC PATCH] usb, PCI: split quirk for usb host controller to three
    From
    On Thu, Mar 1, 2012 at 9:24 AM, Greg Kroah-Hartman
    <gregkh@linuxfoundation.org> wrote:
    > On Thu, Mar 01, 2012 at 09:17:07AM -0800, Yinghai Lu wrote:
    >> so we avoid checking class again and again in that quirk.
    >>
    >> need to be applied after pci/linux-next and usb/usb-next
    >
    > As those are two independant trees, this needs to wait until after
    > 3.4-rc1 is out.

    ok.

    >
    >> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    >>
    >> ---
    >>  drivers/usb/host/pci-quirks.c |   42 ++++++++++++++++++++++++++++--------------
    >>  1 file changed, 28 insertions(+), 14 deletions(-)
    >
    > Is this really helping anything here?  You added code overall :(

    just make the code looks simple by removing

    if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
    pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
    pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&
    pdev->class != PCI_CLASS_SERIAL_USB_XHCI)
    return;
    ...
    if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
    ...
    else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
    ...
    else if (pdev->class == PCI_CLASS_SERIAL_USB_EHCI)
    ...
    else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
    ...


    also skip disable/enable device on non xhci controller.

    Thanks

    Yinghai
    --
    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/

    \
     
     \ /
      Last update: 2012-03-01 18:49    [W:0.024 / U:91.704 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site