source: trunk/target/linux/generic/patches-3.0/102-ehci_hcd_ignore_oc.patch @ 27945

Last change on this file since 27945 was 27945, checked in by florian, 5 years ago

[kernel] add ignore_oc in struct ehci_hcd

File size: 1.5 KB
  • drivers/usb/host/ehci-hcd.c

    a b static int ehci_run (struct usb_hcd *hcd 
    746746                "USB %x.%x started, EHCI %x.%02x%s\n", 
    747747                ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), 
    748748                temp >> 8, temp & 0xff, 
    749                 ignore_oc ? ", overcurrent ignored" : ""); 
     749                (ignore_oc || ehci->ignore_oc) ? ", overcurrent ignored" : ""); 
    750750 
    751751        ehci_writel(ehci, INTR_MASK, 
    752752                    &ehci->regs->intr_enable); /* Turn On Interrupts */ 
  • drivers/usb/host/ehci-hub.c

    a b ehci_hub_status_data (struct usb_hcd *hc 
    656656         * always set, seem to clear PORT_OCC and PORT_CSC when writing to 
    657657         * PORT_POWER; that's surprising, but maybe within-spec. 
    658658         */ 
    659         if (!ignore_oc) 
     659        if (!ignore_oc || !ehci->ignore_oc) 
    660660                mask = PORT_CSC | PORT_PEC | PORT_OCC; 
    661661        else 
    662662                mask = PORT_CSC | PORT_PEC; 
    static int ehci_hub_control ( 
    881881                if (temp & PORT_PEC) 
    882882                        status |= USB_PORT_STAT_C_ENABLE << 16; 
    883883 
    884                 if ((temp & PORT_OCC) && !ignore_oc){ 
     884                if ((temp & PORT_OCC) && (!ignore_oc || !ehci->ignore_oc)){ 
    885885                        status |= USB_PORT_STAT_C_OVERCURRENT << 16; 
    886886 
    887887                        /* 
  • drivers/usb/host/ehci.h

    a b struct ehci_hcd { /* one per controlle 
    137137        unsigned                fs_i_thresh:1;  /* Intel iso scheduling */ 
    138138        unsigned                use_dummy_qh:1; /* AMD Frame List table quirk*/ 
    139139        unsigned                has_synopsys_hc_bug:1; /* Synopsys HC */ 
     140        unsigned                ignore_oc:1; 
    140141 
    141142        /* required for usb32 quirk */ 
    142143        #define OHCI_CTRL_HCFS          (3 << 6) 
Note: See TracBrowser for help on using the repository browser.