On 05/06/2011 01:52 PM, Sergei Shtylyov wrote: > Hello. > > On 06-05-2011 14:00, Jan Andersson wrote: >> +static int uhci_generic_check_and_reset_hc(struct uhci_hcd *uhci) >> +{ >> + unsigned int cmd, intr; >> + >> + /* >> + * When restarting a suspended controller, we expect all the >> + * settings to be the same as we left them: >> + * >> + * Controller is stopped and configured with EGSM set; >> + * No interrupts enabled except possibly Resume Detect. >> + * >> + * If any of these conditions are violated we do a complete reset. >> + */ >> + >> + cmd = uhci_readw(uhci, USBCMD); >> + if ((cmd& USBCMD_RS) || !(cmd& USBCMD_CF) || !(cmd& USBCMD_EGSM)) { >> + dev_dbg(uhci_dev(uhci), "%s: cmd = 0x%04x\n", >> + __func__, cmd); >> + goto reset_needed; >> + } >> + >> + intr = uhci_readw(uhci, USBINTR); >> + if (intr & (~USBINTR_RESUME)) { > > Note that () around ~x are not necessary. Right, the function is basically a copy'n'pase of uhci_check_and_reset_hc from pci-quirks.c and I left the conditional expressions intact. I will change it if I need to do a V4. Thanks, Jan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html