Files
px4_drv/driver/px4_usb_params.h
masnagam fe4d37c0c9 feat: add ctrl_timeout as a module parameter
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()`.
2023-09-27 18:51:07 +09:00

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