Hi folks. This patch series is my first attempt to port the USB-Serial layer to the Serial Core API. Currently USB-Serial uses the TTY layer directly, duplicating code and solutions from the Serial Core implementation.
The final (ported) USB-Serial code is simpler and cleaner. Now I'd like to know whether I'm doing it right or not. Note that this is a work in progress though. I've only ported the USB-Serial core and one of its drivers, the pl2303 one. Most of my questions and design decisions are adressed in the patches, please refer to them for details. The following are general issues. 1. Patch split Patches in this series are split as follows: o Patches 1 to 3 are just small changes, which improves USB-Serial's error and debug messages. They have helped me a lot while making the port, that's because they're here. o Patches 4 to 7 ports the USB-Serial's core to the Serial Core API. o Patches 7 to 11 ports the pl2303 to the new USB-Serial's core. Please, do note that until patch 4 every patch should be 'self-contained' (ie, they don't break the compilation). But patch number 5 will break every USB-Serial driver in the kernel, and all the patches from 7 to 11 are needed to compile the pl2303 driver. It was hard to make the split, because there is no way to make it without breaking things. I chose to make it in a way that makes easy to review. If it's baaaaaad, please, just say. 2. Porting more drivers As I said, only the pl2303 driver has been ported. That's because it's the only device I have for testing, and also because I can't port everything myself.. There are several drivers, and every single one needs proper testing. Then, if the core porting is ok, we have to think how the other drivers will be ported. 3. USB-Serial console not ported either Console support will be ported when USB-Serial's core port is ok. 4. Tests The devices I have to test are two Prolific 2303 cables, which I use to access a Siemens mobile's serial port. One cable is pretty normal, the other one is also a charger. The tests I've done so far weren't anything serious: as the mobile supports a AT command set, I have used the ones (with minicom) which transfers more data. Of course that I also did module load/unload tests, tried to disconnect the device while it's transfering data and so on. With the charger cable everything went fine. But I caught something I can't explain with the non-charger one: to use minicom, I have to disable the 'Hardware flow control' option, otherwise it doesn't work. I'm still checking this, but it's a regression since I don't have to do it with the current USB-Serial's version. This patchset is against 2.6.17-rc5, bellow there is the diffstat. Thanks a lot for reading this. drivers/usb/serial/bus.c | 19 + drivers/usb/serial/generic.c | 6 drivers/usb/serial/pl2303.c | 716 ++++++++++++++++++++++----------------- drivers/usb/serial/usb-serial.c | 590 +++++++++++--------------------- drivers/usb/serial/usb-serial.h | 50 +-- 5 files changed, 648 insertions(+), 733 deletions(-) _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel