it will block other works of the list of hpwork when it waits to get buffer for too long. so use a separate workqueue for rpmsgdev.
Signed-off-by: liaoao <liaoao@xiaomi.com>
After processing a packet of data, do not exit interrupt, but continues
to check whether there is data to be processed. If there is, continue
processing.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
when start multiple sim, the host refuses to recognize multiple USB
devices, and the prompt message is as follows:
[365652.175289] UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy
[365652.175304] misc raw-gadget: fail, usb_gadget_probe_driver returned -16
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
When using the serial framework buffer, if the buffer is full, excess
data is cached in the usb req buffer. The CDCACM driver doesn't know
when the upper layer will read data from the serial buffer, so it
needs to periodically check if the cached data can be put into the
serial buffer. However, when using zero-copy, each usb req buffer
needs to be completely read before actively switching to the next
req buffer, so the timer is not needed to assist to query.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
in cdcacm_sndpacket, If `if (priv->wrcontainer)` is true, then
`priv->wrcontainer` is set to NULL. If an interrupt occurs before
`priv->wrcontainer` is reassigned after being NULL,
`priv->wrcontainer` will be reassigned once during the interrupt,
and `nwrq--` will be called, but no data will be sent at this time.
Only when data is sent by calling `txint` will `priv->wrcontainer`
be reassigned and `nwrq--` called again. This causes the issue.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
When CONFIG_CDCACM_DISABLE_TXBUF is enabled, if the USB is
unplugged during serial data transmission, it is possible
that cdcacm will enter the unbind process, and reqbuf will
be released, causing a crash during serial write.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
When enable CONFIG_CDCACM_DISABLE_TXBUF, dev->xmit.buffer always
take one req, so just compare CONFIG_CDCACM_NWRREQS - 1.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
usbdev/cdcacm.c:2974:3: runtime error: null pointer passed as argument 2, which is declared to never be null
#0 0x44716307 in cdcuart_dmasend usbdev/cdcacm.c:2974
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
When close the serial tool in PC, only the persent bit is cleared
on Windows but all bits are cleared on linux.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
Remove unnecessary #ifdef CONFIG_DISABLE_ENVIRON.
This makes sure environment resources are always cleaned up,
regardless of configuration.
Signed-off-by: ligd <liguiding1@xiaomi.com>
Disable NSH help in nucleo-f302r8/ihm07m1_b16 to resolve a build
failure caused by insufficient memory.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
The current implementation only calls
clock_inittime() when RTC is enabled,
which causes it to be skipped on other
architectures. This patch ensures
clock_inittime() is invoked during clock
initialization for all cases.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Modifies Kconfig and build tools to support flash encryption
and E-Fuse burning when flash encryption is enabled.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
The efuse initialization requires critical section to avoid a very
hidden corner case when flash encryption is enabled.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Moves the clearing of global variables to the very start
of the chip start up process. This avoids clearing some
globals that are initialized between the new location and
previous location.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
- Re-select LCD after soft reset during init. It looks that (soft) reset
affects SPI communication.
- Clear display during the initialization.
Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
Some display drivers, like ILI9341, support 3-wire 9-bit SPI. In
contrast to 4-wire 8-bit SPI, which uses dedicated CMD/DATA pin to
distinguish between CMD and DATA, 3-wire 9-bit SPI uses MSB of 9-bit
frame for this purpose.
Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
Ref: https://man7.org/linux/man-pages/man7/packet.7.html
1. For `socket(AF_PACKET, int socket_type, int protocol)`: When `protocol` is set to `htons(ETH_P_ALL)`, then all protocols are received. If `protocol` is set to zero, no packets are received.
2. For `bind`: `bind` can optionally be called with a nonzero `sll_protocol` to start receiving packets for the protocols specified.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
When app send a pkt-packet, then it will read back it and case some problem. Connection should not read back the message sent by itself.
Signed-off-by: gaohedong <gaohedong@xiaomi.com>