Skip to contentSkip to conversation

usb: serial: update CH34x driver in drivers/usb/serial

PATCH Greg KH 4 participants 5 messages Jun 24, 2016 – Sep 20, 2016 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 002401d1cddb$2f70ab60$8e520220$@com

Greg KH

author
#1 lore raw
Quoted 5 lines · WCH Tech Group

There are several reasons why we decided to revoke the old one after
communicating with the author of
ch341.c (Frank A Kingswood <[email protected]>), first of all we want the driver to support both ch341 and
ch340 chips, so we changed the driver name from "ch341.c" to "ch34x.c",

No need to rename the driver to support multiple chips. Keep it the same name, and just add the new device support. That's how we do it for lots and lots of Linux drivers, the name doesn't really matter that much (look at the option.c driver for one such example.)

Quoted 2 lines

secondly the new driver and old one are coded
by different authors, in fact there's no connection between them.

Ok, but the functionality is the same, so please just fix up the existing driver to add support for the new device, and fix any existing bugs.

In Linux you don't get to just delete a working driver, you have to evolve code over time, sending patches that do one logical thing at a time so that people can properly review them. Your patch is not how this is supposed to happen at all.

So please just break up your changes into small logical ones, and send a series of patches adding the new device support and fix up any known bugs.

After that is all done, if you _really_ want to rename the driver, then we can discuss that, but first do the work to evolve the driver, as that is much more difficult.

thanks,

greg k-h

A message that is not in the archive (sent off-list or not yet received): CAB=c7Tr8FhXNJyMgviLbmNcWQKNWhum_16zRnym0tyP_f9v94w@mail.gmail.com

author
#3 lore raw
Quoted 35 lines · Aidan Thornton
Quoted 5 lines · Greg KH
Quoted 3 lines · WCH Tech Group

       There are several reasons why we decided to revoke the old one after communicating with the author of
ch341.c (Frank A Kingswood <[email protected]>), first of

all

Quoted 28 lines
Quoted 2 lines

we want the driver to support both ch341 and
ch340 chips, so we changed the driver name from "ch341.c" to "ch34x.c",

No need to rename the driver to support multiple chips.  Keep it the same name, and just add the new device support.  That's how we do it for lots and lots of Linux drivers, the name doesn't really matter that much (look at the option.c driver for one such example.)

Quoted 2 lines

secondly the new driver and old one are coded
by different authors, in fact there's no connection between them.

Ok, but the functionality is the same, so please just fix up the existing driver to add support for the new device, and fix any existing bugs.

In Linux you don't get to just delete a working driver, you have to evolve code over time, sending patches that do one logical thing at a time so that people can properly review them.  Your patch is not how this is supposed to happen at all.

So please just break up your changes into small logical ones, and send a series of patches adding the new device support and fix up any known bugs.

After that is all done, if you _really_ want to rename the driver, then we can discuss that, but first do the work to evolve the driver, as that is much more difficult.

Quoted 7 lines
Quoted 3 lines

thanks,

greg k-h

It looks like someone by the name of Grigori Goronzy (CCed) had a patch series or four attempting to do this that just never went anywhere like all the other attempts. Might be worth someone talking to him or looking at his patches.

Do you have a pointer to those patches on the mailing list? Why were they rejected?

Quoted 3 lines

Seriously, this is... I was considering trying to get parity support merged so I don't have to keep patching it in, but it feels like a total waste of effort at this point after seeing all the other attempts.

No reason you can't take those patches and fix them up and resend them, right?

thanks,

greg k-h

#4 lore raw
Quoted 8 lines · Greg KH
Quoted 4 lines · Aidan Thornton

It looks like someone by the name of Grigori Goronzy (CCed) had a patch series or four attempting to do this that just never went anywhere like all the other attempts. Might be worth someone talking to him or looking at his patches.

Do you have a pointer to those patches on the mailing list? Why were they rejected?

https://lkml.org/lkml/2016/4/15/849
Not entirely sure. I think mainly some quibble with an unrelated resume issue in the first patch and some objection to RTS/CTS and B0 handling for it being in separate patches, but but there's 13 patches in the series, four revisions of it, and probably other issues waiting to be discovered by the next fool who tries to resubmit them.

Quoted 7 lines
Quoted 4 lines

Seriously, this is... I was considering trying to get parity support merged so I don't have to keep patching it in, but it feels like a total waste of effort at this point after seeing all the other attempts.

No reason you can't take those patches and fix them up and resend them, right?

Anything more complicated than parity support apparently runs into hardware quirks which unlike the author I simply don't have the hardware to test. Everything I've got uses the CH340G and all the people who do have the right hardware appear to have quite understandably given up. Would require buying more hardware from China, waiting for it to ship, spending a few hours with a logic analyzer, praying that this hasn't broken some other earlier chip revision, and likely all for nothing.

Might consider it anyway but it makes more sense to keep on pointing people to the out-of-tree parity patch just like everyone else has been doing for the past two and a half years. Especially since most users will still need it for quite some time even if support does get merged.

#5 lore raw
Quoted 10 lines · Aidan Thornton
Quoted 8 lines · Greg KH
Quoted 4 lines · Aidan Thornton

It looks like someone by the name of Grigori Goronzy (CCed) had a patch series or four attempting to do this that just never went anywhere like all the other attempts. Might be worth someone talking to him or looking at his patches.

Do you have a pointer to those patches on the mailing list? Why were they rejected?

Quoted 6 lines

https://lkml.org/lkml/2016/4/15/849
Not entirely sure. I think mainly some quibble with an unrelated resume issue in the first patch and some objection to RTS/CTS and B0 handling for it being in separate patches, but but there's 13 patches in the series, four revisions of it, and probably other issues waiting to be discovered by the next fool who tries to resubmit them.

The patches were going through the normal review process. Anyone with access to hardware should be able to complete that series in a few hours. The four revisions had more to do with new versions being posted quickly (or initially to the serial list) IIRC.

Johan

#6 lore raw
In reply to a message not in the archive
Quoted 5 lines · Aidan Thornton
Quoted 4 lines

thanks,

greg k-h

Quoted 7 lines

It looks like someone by the name of Grigori Goronzy (CCed) had a patch series or four attempting to do this that just never went anywhere like all the other attempts. Might be worth someone talking to him or looking at his patches. Seriously, this is... I was considering trying to get parity support merged so I don't have to keep patching it in, but it feels like a total waste of effort at this point after seeing all the other attempts.

Hi everyone,

sorry for not following up on the patches. There were some odd compatibility issues reported by one user and then I got busy with other things, so this got sidetracked. But just a few days ago the lack of working parity annoyed me again. STM32 bootloaders need parity. I'll take a look at your revised patches, Aidan. Maybe we can finally get this done.

About the compatibility issues, I never managed to reproduce them and I concluded in the end that it might be something unrelated.

The person that reported compatibility issues with the patch series was Eddi De Pieri <[email protected]>.

Best regards
Grigori