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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter,

<snip>


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 10 > functions/ncm.0/qmult
echo "12:a5:cf:42:92:fd" > functions/ncm.0/host_addr
echo "5e:bc:ca:27:92:b1" > functions/ncm.0/dev_addr
fi

if [ "$FUNC" == "ss" ]; then
cd /sys/kernel/config/usb_gadget
cd g1
echo "0x0525" > idVendor
echo "0xa4a0" > idProduct
export FUNC="SourceSink"
mkdir functions/$FUNC".0"
ln -s functions/$FUNC".0" configs/c.1
cd functions/$FUNC".0"
echo 1 > pattern
echo 1 > isoc_interval
echo 1024 > isoc_maxpacket
echo 2 > isoc_mult
#isoc_maxburst
echo 1024 > bulk_buflen
echo 16 > bulk_qlen
echo 16 > iso_qlen
fi

Peter



I think I don't quite understand the problem: just postpone issuing
ln -s until after echo <something> > <configfs attribute>.

Andrzej



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux