Re: Potential fsg->state problem at file_storage.c

2012-08-27 Thread Alan Stern
On Mon, 27 Aug 2012, Felipe Balbi wrote: > On Sat, Aug 25, 2012 at 07:44:09PM +0200, Sebastian Andrzej Siewior wrote: > > On Sat, Aug 25, 2012 at 10:35:34AM -0400, Alan Stern wrote: > > > For safety's sake, it would be a good idea to flush the dirty pages > > > when a disconnect occurs. > > > >

Re: Potential fsg->state problem at file_storage.c

2012-08-27 Thread Felipe Balbi
On Sat, Aug 25, 2012 at 07:44:09PM +0200, Sebastian Andrzej Siewior wrote: > On Sat, Aug 25, 2012 at 10:35:34AM -0400, Alan Stern wrote: > > For safety's sake, it would be a good idea to flush the dirty pages > > when a disconnect occurs. > > It does not look like there is an API for this (yet).

Re: Potential fsg->state problem at file_storage.c

2012-08-25 Thread Sebastian Andrzej Siewior
On Sat, Aug 25, 2012 at 10:35:34AM -0400, Alan Stern wrote: > For safety's sake, it would be a good idea to flush the dirty pages > when a disconnect occurs. It does not look like there is an API for this (yet). > > Nothing happens on US_BULK_RESET_REQUEST or on function.disable callback. > > I

Re: Potential fsg->state problem at file_storage.c

2012-08-25 Thread Alan Stern
On Sat, 25 Aug 2012, Sebastian Andrzej Siewior wrote: > On Fri, Aug 24, 2012 at 10:50:54AM -0400, Alan Stern wrote: > > Sebastian, you might be able to check this yourself. What does > > tcm_usb_gadget do when it gets a USB port reset? Does it tell the > > storage layer to sync all the dirty p

Re: Potential fsg->state problem at file_storage.c

2012-08-25 Thread Sebastian Andrzej Siewior
On Fri, Aug 24, 2012 at 10:50:54AM -0400, Alan Stern wrote: > Sebastian, you might be able to check this yourself. What does > tcm_usb_gadget do when it gets a USB port reset? Does it tell the > storage layer to sync all the dirty pages? No, it leavs the storage layer alone. > Also, does it sy

RE: Potential fsg->state problem at file_storage.c

2012-08-24 Thread Alan Stern
On Fri, 24 Aug 2012, Chen Peter-B29397 wrote: > > > > > On Wed, Aug 15, 2012 at 09:49:55AM +, Chen Peter-B29397 wrote: > > > Hi Alan, > > Hi Peter, > > > > > One of my colleagues reports a problem that the enumeration will fail > > if > > > the storage has some problems. > > > > A silghtl

RE: Potential fsg->state problem at file_storage.c

2012-08-24 Thread Chen Peter-B29397
> > On Wed, Aug 15, 2012 at 09:49:55AM +, Chen Peter-B29397 wrote: > > Hi Alan, > Hi Peter, > > > One of my colleagues reports a problem that the enumeration will fail > if > > the storage has some problems. > > A silghtly different question: do you think you can check if this kind of > pr

Re: Potential fsg->state problem at file_storage.c

2012-08-24 Thread Sebastian Andrzej Siewior
On Wed, Aug 15, 2012 at 09:49:55AM +, Chen Peter-B29397 wrote: > Hi Alan, Hi Peter, > One of my colleagues reports a problem that the enumeration will fail if > the storage has some problems. A silghtly different question: do you think you can check if this kind of problem is also in the tcm_

Re: Potential fsg->state problem at file_storage.c

2012-08-17 Thread Alan Stern
On Fri, 17 Aug 2012, Peter Chen wrote: > Alan, will you submit a patch to add reset callback for file_storage? > If not, I can help send a patch. I will submit a patch, probably on Monday. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a messag

Re: Potential fsg->state problem at file_storage.c

2012-08-16 Thread Peter Chen
Alan, will you submit a patch to add reset callback for file_storage? If not, I can help send a patch. On Thu, Aug 16, 2012 at 9:53 AM, Chen Peter-B29397 wrote: > >> >> that sounds like a plan :-) Tomorrow I can send a series of patches >> starting off the split, then people can just send in more

RE: Potential fsg->state problem at file_storage.c

2012-08-15 Thread Chen Peter-B29397
> > that sounds like a plan :-) Tomorrow I can send a series of patches > starting off the split, then people can just send in more patches for > other controllers as we go. cheers > I agree with this change > -- > balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb"

Re: Potential fsg->state problem at file_storage.c

2012-08-15 Thread Felipe Balbi
Hi, On Wed, Aug 15, 2012 at 11:09:51AM -0400, Alan Stern wrote: > > FYI, dwc3 would look like this: > > > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > > index e09a7c4..723a530 100644 > > --- a/drivers/usb/dwc3/gadget.c > > +++ b/drivers/usb/dwc3/gadget.c > > @@ -1846,6 +

Re: Potential fsg->state problem at file_storage.c

2012-08-15 Thread Alan Stern
On Wed, 15 Aug 2012, Felipe Balbi wrote: > > A better solution would be to have separate gadget driver callbacks for > > Reset and Disconnect. Then we could do the fsg_lun_fsync_sub() only > > during disconnect, not during reset. > > > > Alternatively, we could keep the single existing Disconnec

Re: Potential fsg->state problem at file_storage.c

2012-08-15 Thread Felipe Balbi
On Wed, Aug 15, 2012 at 10:31:27AM -0400, Alan Stern wrote: > On Wed, 15 Aug 2012, Chen Peter-B29397 wrote: > > > Hi Alan, > > > > One of my colleagues reports a problem that the enumeration will fail if > > the storage has some problems. I can re-produce this problem if I add a > > big delay (li

Re: Potential fsg->state problem at file_storage.c

2012-08-15 Thread Alan Stern
On Wed, 15 Aug 2012, Chen Peter-B29397 wrote: > Hi Alan, > > One of my colleagues reports a problem that the enumeration will fail if > the storage has some problems. I can re-produce this problem if I add a > big delay (like 500ms) at handle_exception, at condition FSG_STATE_DISCONNECT, > please

Potential fsg->state problem at file_storage.c

2012-08-15 Thread Chen Peter-B29397
Hi Alan, One of my colleagues reports a problem that the enumeration will fail if the storage has some problems. I can re-produce this problem if I add a big delay (like 500ms) at handle_exception, at condition FSG_STATE_DISCONNECT, please see below code: 3050 case FSG_STATE_DISCONNECT: