Xiang Xiao
7990f90915
Indent the define statement by two spaces
...
follow the code style convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 09:52:08 -03:00
Xiang Xiao
6f6fce95a2
Replace all sprintf with snprintf
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
raiden00pl
478f2f3d5f
rndis: move private definitions from a public header to the source file
2023-03-31 08:17:01 +09:00
raiden00pl
58e817db76
rndis: do not configure endpoints from Kconfig when composite enabled
...
This should be done from a board specific logic, as for other composite devices
2023-03-31 08:17:01 +09:00
raiden00pl
bed53538e8
rndis: EP0 belongs to composite class if composite enabled
2023-03-28 19:43:56 -03:00
raiden00pl
8de2197773
rndis: exclude the logic that belongs to composite
2023-03-28 19:43:56 -03:00
raiden00pl
cb05700acf
rndis: interface association descriptor should depend on CONFIG_COMPOSITE_IAD
2023-03-28 19:43:56 -03:00
raiden00pl
10f1d3e76e
rndis: fix dev info init for composite
2023-03-28 19:43:56 -03:00
raiden00pl
9b70e010dc
rndis: refactor usbdev_rndis_get_composite_devdesc to make it more like in other composite drivers
2023-03-28 19:43:56 -03:00
raiden00pl
50cf84c99a
usbdev-composite: ep0 submit should be send only once for the composite class
2023-03-24 14:54:31 -03:00
raiden00pl
d014b9d384
rndis: use composite_ep0submit to send the ep0 when composite
2023-03-24 14:54:31 -03:00
raiden00pl
6caa9317f6
usbmsc: do not send deferred response if we are part of the composite device
...
EP0 is owned by the composite class so it shouldn't be directly accessed by usbmsc
2023-03-24 14:52:50 -03:00
Xiang Xiao
d9a8d5f2ee
usb/cdcacm: Remove the process for tc_iflag, tc_oflag and tc_lflag
...
since the common code in serial.c already handle them correctly:
https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1556-L1601
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:54:59 -06:00
zhangyuan21
699c930987
drivers/usb: fixed sim usb dev and host build issue
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-03 14:31:30 -03:00
zhanghongyu
16ea80e53b
rndis: support iob offload
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-03-02 02:50:59 +08:00
zhangyuan21
528dce4f7f
usbdev/adb: fixed adb build issue
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-27 01:30:19 +08:00
zhangyuan21
32513cedf0
usbdev/adb: add adb usbclass_unbind function
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-14 22:20:12 +08:00
zhangyuan21
b4aa5b0d0b
usbdev: fixed DUALSPEED issue for adb/cdcecm/rndis
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-13 18:47:42 +08:00
zhangyuan21
8f4cb0fec3
rndis: add endpoint configure
...
ep3 is not avaliable in dummy hcd, so need to
make the endpoint number configurable.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:38:11 +08:00
zhangyuan21
f77a824105
usbdev/composite: remove excess uninitialize code
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:37:21 +08:00
chao an
7625126c91
Remove the remain MIN/MAX like macro
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-03 23:22:41 +08:00
Gustavo Henrique Nihei
e6b204f438
nuttx: Use MIN/MAX definitions from "sys/param.h"
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Nathan Hartman
6b89b6f945
Remove executable permissions from source files
...
* arch/arm/src/sama5/sam_flexcom_spi.h,
arch/risc-v/src/mpfs/mpfs_ihc_sbi.c,
drivers/usbdev/adb.c,
libs/libc/math/lib_scalbn.c,
libs/libc/math/lib_scalbnf.c,
net/ipfrag/Make.defs,
net/ipfrag/ipfrag.c,
net/ipfrag/ipfrag.h,
net/ipfrag/ipv4_frag.c,
net/ipfrag/ipv6_frag.c: Remove executable permission.
2023-01-30 20:34:51 -03:00
Xiang Xiao
b0a0ba3ad7
fs: Move mmap callback before truncate in [file|mountpt]_operations
...
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
779a610ca3
Remove the unnecessary NULL fields in global instance definition of file_operations
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
Jukka Laitinen
f33dc4df3f
Change FIOC_MMAP into file operation call
...
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e
Add ftruncate into file operation calls
...
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Xiang Xiao
7322eafba7
drivers/usb: Fix the typo error in Kconfig
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-25 01:01:26 +02:00
Petro Karashchenko
b107e4f417
nuttx: unify MIN, MAX and ABS macro definition across the code
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 09:31:28 +08:00
Xiang Xiao
d5689e070b
net/arp: Remove nuttx/net/arp.h
...
1.move ARPHRD_ETHER to netinet/arp.h
1.move arp_entry_s to net/arp/arp.h
2.move arp_input to nuttx/net/netdev.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:10:59 +02:00
zhangyuan21
5dc4e23bb7
usbdev/adb: fixed usbclass steup issue
...
1. set usbdev when usb class bind
2. don't call EP_SUBMIT when receive OUT message
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-07 12:24:09 +08:00
sunkun3
d9acaeaccf
usbdev:resolve ADB compilation errors
...
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2022-12-07 12:24:09 +08:00
Xiang Xiao
c6e9edcbb6
net: Rename arp_arpin to arp_input
...
align with other similar function(e.g. ipv4_input and ipv6_input)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-04 20:39:21 +08:00
chao an
6fa60627eb
net/devif/ip: build l2 header on the IP layer
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:13:45 +08:00
chao an
8850dee746
net/devif: move preprocess of txpoll into common code
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
yinshengkai
85f727f232
tools: replace INCDIR to Makefile variable
...
In the past, header file paths were generated by the incdir command
Now they are generated by concatenating environment variables
In this way, when executing makefile, no shell command will be executed,
it will improve the speed of executing makfile
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-03 19:59:55 +08:00
Xiang Xiao
929882862b
Fix usbdev/usbmsc_desc.c:316:7: error: variable 'length' set but not used [-Werror,-Wunused-but-set-variable]
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
anjiahao
5724c6b2e4
sem:remove sem default protocl
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
Xiang Xiao
dca5a3483f
drivers: Destroy mutex and sem in the error path
...
also correct the order to ensure the memory free is last step
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
anjiahao
d1d46335df
Replace nxsem API when used as a lock with nxmutex API
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Xiang Xiao
40ef5bc6db
libc: Move queue.h from include to include/nuttx
...
to avoid the conflict with libuv's queue.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:58 +02:00
wangbowen6
344c8be049
poll: add poll_notify() api and call it in all drivers
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-26 12:06:32 +08:00
Xiang Xiao
2166c98809
Add printflike and scanflike to all printf/scanf like functions
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:14:36 +03:00
Gustavo Henrique Nihei
e999708b31
drivers: Convert DEBUGASSERT(false) into more intuitive DEBUGPANIC()
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-07-14 12:08:45 +08:00
Eero Nurkkala
5a45130d5c
usbdev/usbmsc: introduce USBMSC_WRMULTIPLE for faster writes
...
This patch introduces a configuration option USBMSC_WRMULTIPLE,
which is used to store multiple blocks into a larger chunk that
then gets written via the mmcsd_writemultiple() (in case mmcsd
is used).
The bottleneck with the current implementation is the poor
performance due to short block writes. USBMSC_DRVR_WRITE()
always writes only one sector (with eMMC that's usually 512 bytes).
eMMC devices usually erase much larger regions with near constant
time (see Jedec JESD84-B51, Extended CSD register byte [225],
SUPER_PAGE_SIZE): 'This register defines one or multiple of
programmable boundary unit that is programmed at the same time.'
If USBMSC_WRMULTIPLE is defined, then USBMSC_NWRREQS is used to
allocate the write buffer size. We don't want this to be the
default behavior yet as this may reveal unseen bugs in usb drivers
due to the faster overall performance.
Sample configurations with measured performance:
- Without USBMSC_WRMULTIPLE: 470 Kb/s
- With USBMSC_WRMULTIPLE, CONFIG_USBMSC_NWRREQS=4: 1.1 Mb/s
(dd with bs=2k)
- With USBMSC_WRMULTIPLE, CONFIG_USBMSC_NWRREQS=16: 5.2 Mb/s
(dd with bs=8k)
No doubt, this feature alone may make the mass storage work 10
times faster than before with eMMC cards.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-07-12 18:36:34 +08:00
Eero Nurkkala
9f9fb17d64
usbdev/Kconfig: allow CONFIG_USBMSC_IFNOBASE configuration
...
usbmsc.h uses the CONFIG_USBMSC_IFNOBASE configuration option,
but it cannot be set anywhere. Provide means to configure this
option which is useful when it's other than the default zero.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-06-09 20:44:40 +08:00
zhanghongyu
035d925864
devif: remove all devif_timer
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-06-02 20:11:50 -03:00
Petro Karashchenko
09b3fb25ab
drivers: remove unimplemented open/close/ioctl interfaces
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-15 16:56:25 +08:00
Petro Karashchenko
d08fbca679
nuttx: unify FAR attribute usage across the code
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-04 21:32:58 +08:00
Petro Karashchenko
68902d8732
pid_t: unify usage of special task IDs
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00