Re: [PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-29 Thread Alan Stern
On Tue, 29 Apr 2014, Dan Williams wrote: > > Another way to avoid the waste is to move the flags into the usb_hub > > structure. > > > > I don't see how that avoids waste? We need a long per flag. In the > struct usb_port we can combine status and requests in the same > storage. As it is, we h

Re: [PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-29 Thread Dan Williams
On Tue, Apr 29, 2014 at 8:14 AM, Alan Stern wrote: > On Tue, 29 Apr 2014, David Laight wrote: > >> From: Dan Williams >> > Before we add another 2 bitfields to the port state, convert it to an >> > unsigned long and use bitops helpers to manipulate it. This later >> > enables setting bits to requ

RE: [PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-29 Thread Alan Stern
On Tue, 29 Apr 2014, David Laight wrote: > From: Dan Williams > > Before we add another 2 bitfields to the port state, convert it to an > > unsigned long and use bitops helpers to manipulate it. This later > > enables setting bits to request action without worrying about colliding > > updates. I

RE: [PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-29 Thread David Laight
From: Dan Williams > Before we add another 2 bitfields to the port state, convert it to an > unsigned long and use bitops helpers to manipulate it. This later > enables setting bits to request action without worrying about colliding > updates. In particular, a flag to request that the child devic

[PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-28 Thread Dan Williams
Before we add another 2 bitfields to the port state, convert it to an unsigned long and use bitops helpers to manipulate it. This later enables setting bits to request action without worrying about colliding updates. In particular, a flag to request that the child device be woken up when the port