usbdev/rndis.c: In function 'rndis_allocnetreq':
usbdev/rndis.c:761:10: error: implicit declaration of function 'nxmutex_lock'; did you mean 'net_mutex_lock'? [-Werror=implicit-function-declaration]
761 | while (nxmutex_lock(&priv->lock) < 0);
| ^~~~~~~~~~~~
| net_mutex_lock
usbdev/rndis.c:767:7: error: implicit declaration of function 'nxmutex_unlock' [-Werror=implicit-function-declaration]
767 | nxmutex_unlock(&priv->lock);
| ^~~~~~~~~~~~~~
usbdev/rndis.c: In function 'usbclass_classobject':
usbdev/rndis.c:2890:3: error: implicit declaration of function 'nxmutex_init'; did you mean 'nxsem_init'? [-Werror=implicit-function-declaration]
2890 | nxmutex_init(&priv->lock);
| ^~~~~~~~~~~~
| nxsem_init
usbdev/rndis.c: In function 'usbclass_uninitialize':
usbdev/rndis.c:2939:3: error: implicit declaration of function 'nxmutex_destroy'; did you mean 'nxsem_destroy'? [-Werror=implicit-function-declaration]
2939 | nxmutex_destroy(&drvr->dev->lock);
| ^~~~~~~~~~~~~~~
| nxsem_destroy
cc1: all warnings being treated as errors
Signed-off-by: v-tangmeng <v-tangmeng@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 using cdcacm for quick plugging and unplugging, if the software
does not close the serial port in time to release the EP after
unplugging, the EP will not be allocated after plugging in.
This reverts commit 66b3f785fd52e166d077a6715b438ace1d57c30c.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
error: implicit declaration of function 'enter_critical_section'
[-Werror=implicit-function-declaration]
error: implicit declaration of function 'leave_critical_section'
[-Werror=implicit-function-declaration]
Signed-off-by: v-tangmeng <v-tangmeng@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>
/usr/bin/ld: nuttx.rel: in function `cdcncm_classobject':
/home/zhhyu/source/vela/system-dev/nuttx/drivers/usbdev/cdcncm.c:2890: undefined reference to `kmm_zalloc'
/usr/bin/ld: nuttx.rel: in function `cdcmbim_classobject':
/home/zhhyu/source/vela/system-dev/nuttx/drivers/usbdev/cdcncm.c:2966: undefined reference to `kmm_zalloc'
/usr/bin/ld: nuttx.rel: in function `cdcncm_uninitialize':
/home/zhhyu/source/vela/system-dev/nuttx/drivers/usbdev/cdcncm.c:3074: undefined reference to `kmm_free'
/usr/bin/ld: nuttx.rel: in function `cdcmbim_uninitialize':
/home/zhhyu/source/vela/system-dev/nuttx/drivers/usbdev/cdcncm.c:3121: undefined reference to `kmm_free'
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
CC: target.c usbdev/cdcncm.c: In function 'cdcncm_classobject':
usbdev/cdcncm.c:2890:10: warning: implicit declaration of function 'kmm_zalloc'; did you mean 'mm_zalloc'? [-Wimplicit-function-declaration]
2890 | self = kmm_zalloc(sizeof(struct cdcncm_driver_s));
| ^~~~~~~~~~
| mm_zalloc
usbdev/cdcncm.c:2890:8: warning: assignment to 'struct cdcncm_driver_s *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2890 | self = kmm_zalloc(sizeof(struct cdcncm_driver_s));
| ^
usbdev/cdcncm.c: In function 'cdcmbim_classobject':
usbdev/cdcncm.c:2966:8: warning: assignment to 'struct cdcmbim_driver_s *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2966 | self = kmm_zalloc(sizeof(struct cdcmbim_driver_s));
| ^
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
usbdev/cdcacm.c:757:7: error: implicit declaration of function 'spin_unlock_irqrestrore'; did you mean 'spin_unlock_irqrestore'? [-Werror=implicit-function-declaration]
757 | spin_unlock_irqrestrore(&priv->lock, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~
| spin_unlock_irqrestore
Signed-off-by: wangzhi16 <wangzhi16@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>
To be compatible with the previous method, add a buf between cdcacm
and serial. Because when using usbreqbuf directly as the buf of serial,
the amount of data sent may be insufficient due to the limit of the
number of reqs. For example, when the number of reqs is 4, the number
of data send through cdcacm is 5, and each data is a separate USB
packet, if the host does not read in time, resulting in blocking send.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
To be compatible with the previous method, add a buf between cdcacm
and serial. Because when using usbreqbuf directly as the buf of serial,
the amount of data received may be insufficient due to the limit of the
number of reqs. For example, when the number of reqs is 4, the number
of data received through cdcacm is 5, and each data is a separate USB
packet, which should require 5 reqs, resulting in the last number not
being received. If the application always waits for 5 numbers before
performing an operation, this will cause problems.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
In cdcacm, USB req buf is directly used as serial buf, so the getting
buf status operation in ioctl is different from the original serial.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
When close the serial tool in PC, only the persent bit is cleared
on Windows and all bits are cleared on linux.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
Data form serial framework will be written to usb reqbuf directly,
and data form cdcacm will be read form reqbuf directly.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
1. The -c parameter should not be added during the link phase, otherwise the link will fail.
2. If it is the clang compiler, its toolchain library should use --print-file-name to find it, otherwise an error will occur
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Change syslog API naming more reasonable:
1. rename syslog_channel() to syslog_channel_register()
2. rename syslog_channel_remove() to syslog_channel_unregister()
Signed-off-by: chao an <anchao@lixiang.com>
Comminity has upgrade the openamp to the last commit (near 2024.05 Release),
sync back to vela.
Only modify the makefile and upgrade the patch, should be no impact in any
features.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
The segment of the Xen PVH boot protocol was not specified during linking and was placed before .loader.text, causing the boot to fail
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
since bootloader may call modlib functions directly
to load elf firmware without binfmt, dlfcn or module.
BTW, this patch also remove the duplicated selecttion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>