On Sat, Feb 1, 2014 at 10:44 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> Toggling port power currently leads to three unintended disconnect >> scenarios that are addressed by this rework of port power recovery and >> usb device resume: >> >> 1/ Superspeed devices downgrade to their hispeed connection: fix this by >> preventing superspeed poweroff until the peer port is suspended. >> This depends on the ability to identify peer ports (patches 1-4), and >> then patch 5 implements the policy. >> >> 2/ khubd prematurely disconnects ports that are in the process of >> being resumed or reset. khubd now ignores ports in the >> pm-runtime-suspended state (patch 9) and holds a lock to synchronize the port >> status changes of usb_port_{suspend|resume} (patch 11). >> >> 3/ Superspeed devices fail to reconnect: Seen during repeated toggles of >> the port power state. Fixed by forcing a full recovery cycle of the >> usb_device before allowing the next suspend / khubd run (patch 12). >> Also, for devices that live lock on reconnect the port runtime resume >> path now has the capability to force a reset-resume to be a >> warm-reset-resume (patch 13). > > I haven't gone through all this in any detail. But a couple of things > stand out immediately, matters of style. > > Although the USB stack still has plenty of old code with multiline > comments looking this this: > > /* blah blah blah > * blah blah blah > */ > > the accepted style is that all new code should appear like this: > > /* > * blah blah blah > * blah blah blah > */ Ah, the eternal debate. No worries. > Also, the style for indentation througout most of the USB stack is that > continuation lines are indented by two tab stops beyond the first line > of the statement. They are not aligned with opening parentheses of > function calls or anything like that. Unfortunate that what goes for net/, or drivers/md/ doesn't go for drivers/usb/... sounds like checkpatch needs subsystem specific style rules to avoid this thrash. If it's just the style I'll put those changes on a git branch and spare the list if you're ok doing a pull... otherwise I'll hold off until you have a chance to take a closer look. -- 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