mirror of
https://github.com/tsukumijima/px4_drv.git
synced 2025-07-23 04:03:01 +02:00
Sending a request by `it930x_ctrl_msg()` sometimes fails due to the error code -110 (ETIMEDOUT). However, in some situations, the response seems to be received after the ETIMEDOUT error. This can be observed by capturing packets using `tcpdump` + `usbmon`. ```shell sudo modprobe usbmon sudo tcpdump -i usbmon<n> -s0 -U -w - | tee /path/to/capture.pcap | \ tcpdump -r - ``` Actually, no ETIMEDOUT error occur during timeshift recording with the following settings at least on my environment (ROCK64 + PX-W3U4): ```text options px4_drv ctrl_timeout=5000 psb_purge_timeout=5000 ``` These two timeout values are eventually passed to `usb_bulk_msg()`.
19 lines
309 B
C
19 lines
309 B
C
// px4_usb_params.h
|
|
|
|
#ifndef __PX4_USB_PARAMS_H__
|
|
#define __PX4_USB_PARAMS_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct px4_usb_param_set {
|
|
int ctrl_timeout;
|
|
unsigned int xfer_packets;
|
|
unsigned int urb_max_packets;
|
|
unsigned int max_urbs;
|
|
bool no_dma;
|
|
};
|
|
|
|
extern struct px4_usb_param_set px4_usb_params;
|
|
|
|
#endif
|