Re: CH340/341: cannot open twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> device. The reported problems have looked like hardware issues,
Probably not my case - the device works OK on a winXP box

> Could you try the vendor driver and see if that makes the device work so
> that we'd know for sure?
Well, it was quite a job to get the driver to compile on linux 4.1.6, and
I had to kludge a replacement for the deprecated interruptible_sleep_on()
mechanism. I still can't believe it works (I have no kernel/module experience)
but apart from an inexplicable 1-2 second delay when close()-ing
the port, it works in my application (write+read with timeout; TXD-RXD
connected together in a loopback)

The mfg driver I used was downloaded from WCH at some point. A copy is visible
on https://github.com/karlp/ch341-linux/blob/master/drivers/CH341SER_LINUX/ch34x.c
And my patch to get it to compile is quite simple:
http://pastebin.ca/3167353
(not sure what the diff/patch guidelines are on this list, I preferred to link)

Note : I probably violate many rules of kernel coding with my use of
wait_event_interruptible(). Consider this a highly unstable, incompetent patch.

Regards,
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux