Update see below:
I got the series [PATCH 5.4 015/148] USB: usbtmc: Fix reading stale status byte [PATCH 5.4 016/148] USB: usbtmc: Add USBTMC_IOCTL_GET_STB
Odd, that second one shoudn't be there, right?
Yes, there is no need to add both patches. 5.4.295 is ok and uses old implementation of usbtmc488_ioctl_read_stb I assume, there is no need to add [PATCH 5.4 015/148] and [PATCH 5.4 016/148]
[PATCH 5.10 021/208] USB: usbtmc: Fix reading stale status byte [PATCH 5.10 022/208] USB: usbtmc: Add USBTMC_IOCTL_GET_STB
Same here?
Yes, same here.
And I assume we should add the other two commits as well to complete the series: USB: usbtmc: Add separate USBTMC_IOCTL_GET_SRQ_STB (commit d1d9defdc6d582119d29f5d88f810b72bb1837fa) USB: usbtmc: Bump USBTMC_API_VERSION value (commit 614b388c34265948fbb3c5803ad72aa1898f2f93)
Nope, I didn't, maybe I should just drop both of the above ones, as it doesn't make much sense to have only the one, right?
The patch "USB: usbtmc: Fix reading stale status byte" is not required in 5.4 and 5.10, too. The new behavior to read the status byte in old and new manner was introduced in 5.12. Sorry, I can not verify my current findings, since I do not have test systems for it. To be sure we should wait for a comment from Dave. He did the last patches.
Update: Now I see a problem in the patch-5.4.295:
@@ -556,6 +560,8 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data, rv = put_user(stb, (__u8 __user *)arg); dev_dbg(dev, "stb:0x%02x received %d\n", (unsigned int)stb, rv);
+ rv = 0; + exit: /* bump interrupt bTag */ data->iin_bTag += 1;
We should not set rev = 0, since
case USBTMC488_IOCTL_READ_STB: retval = usbtmc488_ioctl_read_stb(file_data, (void __user *)arg);
will return 0 instead of 1 (the amount of returned bytes).
Same issue in patch-5.10.239.
Guido