Lan Tianyu <tianyu.lan@xxxxxxxxx> writes: > @@ -648,7 +649,14 @@ ehci_hub_descriptor ( > > /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ > memset(&desc->u.hs.DeviceRemovable[0], 0, temp); > - memset(&desc->u.hs.DeviceRemovable[temp], 0xff, temp); > + memset(&desc->u.hs.DeviceRemovable[temp], 0xff, ltemp); > + > + for (i = 1; i <= ports; i++) { > + if (usb_get_hub_port_connect_type(hcd->self.root_hub, i); > + == USB_PORT_CONNECT_TYPE_HARD_WIRED) > + desc->u.hs.DeviceRemovable[ports/8] |= 1 << (i%8); > + } > + > > temp = 0x0008; /* per-port overcurrent reporting */ > if (HCS_PPC (ehci->hcs_params)) Not that it matters much, but I believe this code would look a lot better if it used linux/bitmap.h and/or asm/bitops.h Bjørn -- 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