Summary: | uchcom: Add ID for CH341K | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Daniel O'Connor <darius> | ||||||
Component: | usb | Assignee: | freebsd-usb (Nobody) <usb> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | hselasky | ||||||
Priority: | --- | ||||||||
Version: | Unspecified | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Patch looks good. Do you have someone to commit it? (In reply to Hans Petter Selasky from comment #1) No, would you be able to? Otherwise I can probably find someone on IRC who can do it. (In reply to Daniel O'Connor from comment #0) Is CH341K a real product name? My internet search did not turn up anything for it. Perhaps it's just another CH341 variant that does not need a distinguished name? Then it could be added as CH341SER_3 or something... Also, in that case it probably does not deserve a distinct device_printf either. I mean, why distinguish it from other variants if the driver does not have any special cases for it. P.S. based on more research it seems that the chip is actually CH340K. (In reply to Andriy Gapon from comment #3) Yes I agree - it is the CH340K, I misread it when I started writing the patch and everything flowed from there.. Also agreed WRT the device ID & printf - do you want another patch? Relatedly I am not sure why that case statement exists that prints 340 vs 341 exists at all anyway since it doesn't affect the behaviour that I can see.. Created attachment 230728 [details]
Add ID for CH340K
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=34bedcee3c5a8640f3e344218b47c2d970df78ed commit 34bedcee3c5a8640f3e344218b47c2d970df78ed Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-01-07 12:56:47 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-01-07 13:02:30 +0000 uchcom(4): Add new USB ID. Submitted by: darius@dons.net.au PR: 260783 MFC after: 1 week Sponsored by: NVIDIA Networking sys/dev/usb/serial/uchcom.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) My only comment is wouldn't it be better to report USB_PRODUCT_WCH2_CH341SER_3 as "CH340 detected"? Given that it's CH340K. Or simply combine or remove those two device_printf-s... (In reply to Andriy Gapon from comment #8) I agree, I'm not sure why it's in there, it was added in r333997 but I don't see much utility. A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3752e6771b08b5a13ffb3ef8c1247b7ec8dade3a commit 3752e6771b08b5a13ffb3ef8c1247b7ec8dade3a Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-01-07 12:56:47 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-02-10 15:11:01 +0000 uchcom(4): Add new USB ID. Submitted by: darius@dons.net.au PR: 260783 Sponsored by: NVIDIA Networking (cherry picked from commit 34bedcee3c5a8640f3e344218b47c2d970df78ed) sys/dev/usb/serial/uchcom.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f25a0a0f21183a52eeb4a860a88114aebec5f249 commit f25a0a0f21183a52eeb4a860a88114aebec5f249 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-06-12 14:40:36 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-06-12 14:42:03 +0000 uchcom(4): Add new USB ID. PR: 260783 PR: 264634 MFC after: 1 week Sponsored by: NVIDIA Networking sys/dev/usb/serial/uchcom.c | 1 + 1 file changed, 1 insertion(+) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0b5f08439d27ecbfa4b4c20acef64fbad66e978a commit 0b5f08439d27ecbfa4b4c20acef64fbad66e978a Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-06-12 14:40:36 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-06-20 11:08:39 +0000 uchcom(4): Add new USB ID. PR: 260783 PR: 264634 Sponsored by: NVIDIA Networking (cherry picked from commit f25a0a0f21183a52eeb4a860a88114aebec5f249) sys/dev/usb/serial/uchcom.c | 1 + 1 file changed, 1 insertion(+) |
Created attachment 230525 [details] Add ID for CH341K Add ID for CH341K. I tested this on a Lilygo relay board with their programming tool and it ran esptool to program the device find.