Re: [EXT] Re: Why there is a refcnt check when we change configfs property

2019-04-15 Thread Peter Chen
On Mon, Apr 15, 2019 at 5:40 PM Andrzej Pietrasiewicz wrote: > > Hi Peter, > > > > >> > >> Can you please describe your use case? > >> > >> Andrzej > > > > I would like to change parameters for function driver through configfs, > > below is the example for ncm and f_sourcesink cases, > > thanks.

Re: [EXT] Re: Why there is a refcnt check when we change configfs property

2019-04-15 Thread Andrzej Pietrasiewicz
Hi Peter, Can you please describe your use case? Andrzej I would like to change parameters for function driver through configfs, below is the example for ncm and f_sourcesink cases, thanks. if [ "$FUNC" == "ncm" ]; then mkdir functions/$FUNC".0" ln -s functions/$FUNC".0" configs/c.1 echo

RE: [EXT] Re: Why there is a refcnt check when we change configfs property

2019-04-11 Thread Peter Chen
> > > >>> > >>> Andrzej, would you tell us why you introduce refcnt for driver's > >>> configfs opts? And why it is needed to judge for "store" operation? > >>> > >> > >> The reason is that a function can be linked to more than one > >> configuration. Imagine this sequence: you create a function,

Re: Why there is a refcnt check when we change configfs property

2019-04-11 Thread Andrzej Pietrasiewicz
Hi Peter, W dniu 08.04.2019 o 09:00, Peter Chen pisze: Andrzej, would you tell us why you introduce refcnt for driver's configfs opts? And why it is needed to judge for "store" operation? The reason is that a function can be linked to more than one configuration. Imagine this sequence: y

RE: Why there is a refcnt check when we change configfs property

2019-04-08 Thread Peter Chen
> > > > Andrzej, would you tell us why you introduce refcnt for driver's > > configfs opts? And why it is needed to judge for "store" operation? > > > > The reason is that a function can be linked to more than one configuration. > Imagine > this sequence: you create a function, set its paramete

Re: Why there is a refcnt check when we change configfs property

2019-04-04 Thread Andrzej Pietrasiewicz
Hi Peter, W dniu 04.04.2019 o 09:35, Peter Chen pisze: Peter Chen writes: Hi Felipe, Do you know why? In that case, I can't change property, eg changing qmult at NCM like below: mkdir functions/ncm.0 ln -s functions/ncm.0 configs/c.1 echo 10 > functions/ncm.0/qmult That check loo

RE: Why there is a refcnt check when we change configfs property

2019-04-04 Thread Peter Chen
> > Peter Chen writes: > > Hi Felipe, > > > > Do you know why? In that case, I can't change property, eg changing > > qmult at NCM like below: > > > > mkdir functions/ncm.0 > > ln -s functions/ncm.0 configs/c.1 > > echo 10 > functions/ncm.0/qmult > > > > The code: > > drivers/usb/gadget/functio

Re: Why there is a refcnt check when we change configfs property

2019-04-02 Thread Felipe Balbi
Hi, Peter Chen writes: > Hi Felipe, > > Do you know why? In that case, I can't change property, eg changing qmult at > NCM > like below: > > mkdir functions/ncm.0 > ln -s functions/ncm.0 configs/c.1 > echo 10 > functions/ncm.0/qmult > > The code: > drivers/usb/gadget/function/u_ether_configfs.h

Why there is a refcnt check when we change configfs property

2019-04-02 Thread Peter Chen
Hi Felipe, Do you know why? In that case, I can't change property, eg changing qmult at NCM like below: mkdir functions/ncm.0 ln -s functions/ncm.0 configs/c.1 echo 10 > functions/ncm.0/qmult The code: drivers/usb/gadget/function/u_ether_configfs.h static ssize_t _f_##_opts_qmult_store(struct