case PCI_VENDOR_ID_INTEL: /* Some of Intel's USB controllers have a bug that causes *resume-detectinterruptsifanyporthasanover-current *condition.Tomakemattersworse,somemotherboards *hardwireunusedUSBports'over-currentinputsactive! *Topreventproblems,wewillnotenableresume-detect *interruptsifanyportsareOC.
*/ for (port = 0; port < uhci->rh_numports; ++port) { if (inw(uhci->io_addr + USBPORTSC1 + port * 2) &
USBPORTSC_OC) return1;
} break;
} return0;
}
/* One of Asus's motherboards has a bug which causes it to *wakeupimmediatelyfromsuspend-to-RAMifanyoftheports *areconnected.InsuchcaseswewillnotsetEGSM.
*/
sys_info = dmi_get_system_info(DMI_BOARD_NAME); if (sys_info && !strcmp(sys_info, bad_Asus_board)) { for (port = 0; port < uhci->rh_numports; ++port) { if (inw(uhci->io_addr + USBPORTSC1 + port * 2) &
USBPORTSC_CCS) return1;
}
}
/* HP's server management chip requires a longer port reset delay. */ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_HP)
uhci->wait_for_hp = 1;
/* Intel controllers use non-PME wakeup signalling */ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_INTEL)
device_set_wakeup_capable(uhci_dev(uhci), true);
/* Set up pointers to PCI-specific functions */
uhci->reset_hc = uhci_pci_reset_hc;
uhci->check_and_reset_hc = uhci_pci_check_and_reset_hc;
uhci->configure_hc = uhci_pci_configure_hc;
uhci->resume_detect_interrupts_are_broken =
uhci_pci_resume_detect_interrupts_are_broken;
uhci->global_suspend_mode_is_broken =
uhci_pci_global_suspend_mode_is_broken;
/* Kick BIOS off this hardware and reset if the controller *isn'talreadysafelyquiescent.
*/
check_and_reset_hc(uhci); return0;
}
/* Make sure the controller is quiescent and that we're not using it *anymore.Thisismainlyforthebenefitofprogramswhich,likekexec, *expectthehardwaretobeidle:notdoingDMAorgeneratingIRQs. * *Thisroutinemaybecalledinadamagedorfailingkernel.Hencewe *donotacquirethespinlockbeforeshuttingdownthecontroller.
*/ staticvoid uhci_shutdown(struct pci_dev *pdev)
{ struct usb_hcd *hcd = pci_get_drvdata(pdev);
/* Since we aren't in D3 any more, it's safe to set this flag *evenifthecontrollerwasdead.
*/
set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
spin_lock_irq(&uhci->lock);
/* Make sure resume from hibernation re-enumerates everything */ if (hibernated) {
uhci->reset_hc(uhci);
finish_reset(uhci);
}
/* The firmware may have changed the controller settings during *asystemwakeup.Checkitandreconfiguretoavoidproblems.
*/ else {
check_and_reset_hc(uhci);
}
configure_hc(uhci);
/* Tell the core if the controller had to be reset */ if (uhci->rh_state == UHCI_RH_RESET)
usb_root_hub_lost_power(hcd->self.root_hub);
spin_unlock_irq(&uhci->lock);
/* If interrupts don't work and remote wakeup is enabled then *thesuspendedroothubneedstobepolled.
*/ if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup)
set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
/* Does the root hub have a port wakeup pending? */
usb_hcd_poll_rh_status(hcd); return0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.