Skip to contentSkip to conversation

USB-serial dummy cable driver

PATCH In review Marek Vasut 2 participants 8 messages Aug 2, 2010 – Aug 3, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB-serial dummy cable driver

This driver is used to implement USB-serial like behaviour over dummy USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable
HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver
ViVOpay USB Serial Driver
ZIO Motherboard USB driver

---
 drivers/usb/serial/Kconfig            |   59 ++++++---------------
 drivers/usb/serial/Makefile           |    7 +--
 drivers/usb/serial/funsoft.c          |   69 ------------------------
 drivers/usb/serial/hp4x.c             |   86 ------------------------------
 drivers/usb/serial/moto_modem.c       |   71 -------------------------
 drivers/usb/serial/siemens_mpi.c      |   77 ---------------------------
 drivers/usb/serial/usb-serial-dummy.c |   92 +++++++++++++++++++++++++++++++++
 drivers/usb/serial/vivopay-serial.c   |   76 ---------------------------
 drivers/usb/serial/zio.c              |   64 -----------------------
 9 files changed, 111 insertions(+), 490 deletions(-)
 delete mode 100644 drivers/usb/serial/funsoft.c
 delete mode 100644 drivers/usb/serial/hp4x.c
 delete mode 100644 drivers/usb/serial/moto_modem.c
 delete mode 100644 drivers/usb/serial/siemens_mpi.c
 create mode 100644 drivers/usb/serial/usb-serial-dummy.c
 delete mode 100644 drivers/usb/serial/vivopay-serial.c
 delete mode 100644 drivers/usb/serial/zio.c
drivers/usb/serial/Kconfig +18 -41
index bd8aab0..9466c4e 100644
@@ -116,6 +116,24 @@ config USB_SERIAL_DIGI_ACCELEPORT
 	  To compile this driver as a module, choose M here: the
 	  module will be called digi_acceleport.
 
+config USB_SERIAL_DUMMY
+       tristate "USB-serial dummy cable driver"
+       help
+         Say Y here if you want to use the USB-serial dummy cable driver.
+
+         This driver is used to implement USB-serial like behaviour over dummy
+	 USB cables. These are used in the following devices:
+		Genesys Logic GL620USB USB Laplink cable
+		HP4x (48/49) Serial cable
+		Motorola phones
+		Funsoft Serial USB driver
+		ViVOpay USB Serial Driver
+		ZIO Motherboard USB driver
+		Siemens USB-MPI Serial USB driver
+
+         To compile this driver as a module, choose M here: the
+         module will be called usb-serial-dummy.
+
 config USB_SERIAL_CP210X
 	tristate "USB CP210x family of UART Bridge Controllers"
 	help
@@ -449,15 +467,6 @@ config USB_SERIAL_MOS7840
 	  To compile this driver as a module, choose M here: the
 	  module will be called mos7840.  If unsure, choose N.
 
-config USB_SERIAL_MOTOROLA
-	tristate "USB Motorola Phone modem driver"
-	---help---
-	  Say Y here if you want to use a Motorola phone with a USB
-	  connector as a modem link.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called moto_modem.  If unsure, choose N.
-
 config USB_SERIAL_NAVMAN
 	tristate "USB Navman GPS device"
 	help
@@ -512,14 +521,6 @@ config USB_SERIAL_SPCP8X5
 	  To compile this driver as a module, choose M here: the
 	  module will be called spcp8x5.
 
-config USB_SERIAL_HP4X
-        tristate "USB HP4x Calculators support"
-        help
-          Say Y here if you want to use an Hewlett-Packard 4x Calculator.
-
-          To compile this driver as a module, choose M here: the
-          module will be called hp4x.
-
 config USB_SERIAL_SAFE
 	tristate "USB Safe Serial (Encapsulated) Driver"
 
@@ -527,14 +528,6 @@ config USB_SERIAL_SAFE_PADDED
 	bool "USB Secure Encapsulated Driver - Padded"
 	depends on USB_SERIAL_SAFE
 
-config USB_SERIAL_SIEMENS_MPI
-	tristate "USB Siemens MPI driver"
-	help
-	  Say M here if you want to use a Siemens USB/MPI adapter.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called siemens_mpi.
-
 config USB_SERIAL_SIERRAWIRELESS
 	tristate "USB Sierra Wireless Driver"
 	help
@@ -626,22 +619,6 @@ config USB_SERIAL_OPTICON
 	  To compile this driver as a module, choose M here: the
 	  module will be called opticon.
 
-config USB_SERIAL_VIVOPAY_SERIAL
-        tristate "USB ViVOpay serial interface driver"
-        help
-          Say Y here if you want to use a ViVOtech ViVOpay USB device.
-
-          To compile this driver as a module, choose M here: the
-          module will be called vivopay-serial.
-
-config USB_SERIAL_ZIO
-	tristate "ZIO Motherboard USB serial interface driver"
-	help
-	  Say Y here if you want to use ZIO Motherboard.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called zio.
-
 config USB_SERIAL_DEBUG
 	tristate "USB Debugging Device"
 	help
drivers/usb/serial/Makefile +1 -6
index e54c728..c96e81e 100644
@@ -20,13 +20,12 @@ obj-$(CONFIG_USB_SERIAL_CYBERJACK)		+= cyberjack.o
 obj-$(CONFIG_USB_SERIAL_CYPRESS_M8)		+= cypress_m8.o
 obj-$(CONFIG_USB_SERIAL_DEBUG)			+= usb_debug.o
 obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT)	+= digi_acceleport.o
+obj-$(CONFIG_USB_SERIAL_DUMMY)			+= usb-serial-dummy.o
 obj-$(CONFIG_USB_SERIAL_EDGEPORT)		+= io_edgeport.o
 obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI)		+= io_ti.o
 obj-$(CONFIG_USB_SERIAL_EMPEG)			+= empeg.o
 obj-$(CONFIG_USB_SERIAL_FTDI_SIO)		+= ftdi_sio.o
-obj-$(CONFIG_USB_SERIAL_FUNSOFT)		+= funsoft.o
 obj-$(CONFIG_USB_SERIAL_GARMIN)			+= garmin_gps.o
-obj-$(CONFIG_USB_SERIAL_HP4X)			+= hp4x.o
 obj-$(CONFIG_USB_SERIAL_IPAQ)			+= ipaq.o
 obj-$(CONFIG_USB_SERIAL_IPW)			+= ipw.o
 obj-$(CONFIG_USB_SERIAL_IR)			+= ir-usb.o
@@ -38,7 +37,6 @@ obj-$(CONFIG_USB_SERIAL_KOBIL_SCT)		+= kobil_sct.o
 obj-$(CONFIG_USB_SERIAL_MCT_U232)		+= mct_u232.o
 obj-$(CONFIG_USB_SERIAL_MOS7720)		+= mos7720.o
 obj-$(CONFIG_USB_SERIAL_MOS7840)		+= mos7840.o
-obj-$(CONFIG_USB_SERIAL_MOTOROLA)		+= moto_modem.o
 obj-$(CONFIG_USB_SERIAL_NAVMAN)			+= navman.o
 obj-$(CONFIG_USB_SERIAL_OMNINET)		+= omninet.o
 obj-$(CONFIG_USB_SERIAL_OPTICON)		+= opticon.o
@@ -48,7 +46,6 @@ obj-$(CONFIG_USB_SERIAL_PL2303)			+= pl2303.o
 obj-$(CONFIG_USB_SERIAL_QCAUX)			+= qcaux.o
 obj-$(CONFIG_USB_SERIAL_QUALCOMM)		+= qcserial.o
 obj-$(CONFIG_USB_SERIAL_SAFE)			+= safe_serial.o
-obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI)		+= siemens_mpi.o
 obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS)		+= sierra.o
 obj-$(CONFIG_USB_SERIAL_SPCP8X5)		+= spcp8x5.o
 obj-$(CONFIG_USB_SERIAL_SYMBOL)			+= symbolserial.o
@@ -57,6 +54,4 @@ obj-$(CONFIG_USB_SERIAL_TI)			+= ti_usb_3410_5052.o
 obj-$(CONFIG_USB_SERIAL_VISOR)			+= visor.o
 obj-$(CONFIG_USB_SERIAL_WHITEHEAT)		+= whiteheat.o
 obj-$(CONFIG_USB_SERIAL_XIRCOM)			+= keyspan_pda.o
-obj-$(CONFIG_USB_SERIAL_VIVOPAY_SERIAL)	+= vivopay-serial.o
-obj-$(CONFIG_USB_SERIAL_ZIO)			+= zio.o
 
drivers/usb/serial/funsoft.c deleted +0 -69

69 lines not on this page · raw message

drivers/usb/serial/hp4x.c deleted +0 -86

86 lines not on this page · raw message

drivers/usb/serial/moto_modem.c deleted +0 -71

71 lines not on this page · raw message

drivers/usb/serial/siemens_mpi.c deleted +0 -77

77 lines not on this page · raw message

drivers/usb/serial/usb-serial-dummy.c new file +92 -0

92 lines not on this page · raw message

drivers/usb/serial/vivopay-serial.c deleted +0 -76

76 lines not on this page · raw message

drivers/usb/serial/zio.c deleted +0 -64

64 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw
Quoted 9 lines · Marek Vasut

This driver is used to implement USB-serial like behaviour over dummy USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable
HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver
ViVOpay USB Serial Driver
ZIO Motherboard USB driver

I like the idea, but not the name :)

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

So you lost the names of the devices with this patch, which isn't good.

It's my end-goal to move the usb-serial layer to be more like libata, where it is dirt-simple to make a new disk driver, only a few fields to fill in, what you want to override. So, any work toward simplification of the generic layer would be appreciated to make these individual drivers even smaller in the end.

So don't delete them, but try to consolidate the code, or just make it so that it can be deleted, and you only need a simple module init/exit function that registeres a single structure, like libata.

Sound reasonable?

thanks,

greg k-h

#2 lore raw

Dne ?t 3. srpna 2010 00:47:18 Greg KH napsal(a):

Quoted 12 lines · Marek Vasut
Quoted 10 lines

This driver is used to implement USB-serial like behaviour over dummy

USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver ViVOpay USB Serial Driver
ZIO Motherboard USB driver

Quoted 1 line

I like the idea, but not the name :)

Please don't expect miracles from me after 26 hours without sleep ;-)

Quoted 3 lines

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

I just noticed that one. Stupid me.

Quoted 6 lines

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

So you lost the names of the devices with this patch, which isn't good.

Sheesh ... that's true, but having pile of copies of the same code is not good either. Can't we then just deprecate all these drivers and set correct udev rules?

Quoted 7 lines

It's my end-goal to move the usb-serial layer to be more like libata, where it is dirt-simple to make a new disk driver, only a few fields to fill in, what you want to override. So, any work toward simplification of the generic layer would be appreciated to make these individual drivers even smaller in the end.

Quoted 5 lines

So don't delete them, but try to consolidate the code, or just make it so that it can be deleted, and you only need a simple module init/exit function that registeres a single structure, like libata.

Sound reasonable?

Sounds ok, I'd like to help you but I'm dead busy with a pile of ARM machines here. This hack was really just a side-job. I'll try looking into it if I wont get insane ;-)

Cheers

Quoted 4 lines

thanks,

greg k-h

#3 lore raw
Quoted 22 lines · Marek Vasut

Dne ?t 3. srpna 2010 00:47:18 Greg KH napsal(a):

Quoted 12 lines · Marek Vasut
Quoted 10 lines

This driver is used to implement USB-serial like behaviour over dummy

USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver ViVOpay USB Serial Driver
ZIO Motherboard USB driver

Quoted 1 line

I like the idea, but not the name :)

Please don't expect miracles from me after 26 hours without sleep ;-)

Quoted 3 lines

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

I just noticed that one. Stupid me.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

So you lost the names of the devices with this patch, which isn't good.

Sheesh ... that's true, but having pile of copies of the same code is not good either.

I agree, that's why I said it should be reduced.

Quoted 2 lines

Can't we then just deprecate all these drivers and set correct udev rules?

udev can not change the name of the device in sysfs, or the name in the kernel of the device.

thanks,

greg k-h

#4 lore raw

Dne ?t 3. srpna 2010 18:38:26 Greg KH napsal(a):

Quoted 33 lines · Marek Vasut
Quoted 27 lines

Dne ?t 3. srpna 2010 00:47:18 Greg KH napsal(a):

Quoted 12 lines · Marek Vasut
Quoted 10 lines

This driver is used to implement USB-serial like behaviour over dummy

USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver ViVOpay USB Serial Driver
ZIO Motherboard USB driver

Quoted 1 line

I like the idea, but not the name :)

Please don't expect miracles from me after 26 hours without sleep ;-)

Quoted 2 lines

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

I just noticed that one. Stupid me.

Quoted 5 lines

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

Quoted 4 lines
Quoted 1 line

So you lost the names of the devices with this patch, which isn't good.

Sheesh ... that's true, but having pile of copies of the same code is not good either.

Quoted 7 lines

I agree, that's why I said it should be reduced.

Quoted 2 lines

Can't we then just deprecate all these drivers and set correct udev rules?

udev can not change the name of the device in sysfs, or the name in the kernel of the device.

That's right, but it can bind the generic driver with the hardware. And who would care about the driver name, really ? The interface just appears and that's what matters (to me and probably to users) ...

Quoted 4 lines

thanks,

greg k-h

#5 lore raw
Quoted 39 lines · Marek Vasut

Dne ?t 3. srpna 2010 18:38:26 Greg KH napsal(a):

Quoted 38 lines · Marek Vasut
Quoted 27 lines

Dne ?t 3. srpna 2010 00:47:18 Greg KH napsal(a):

Quoted 12 lines · Marek Vasut
Quoted 10 lines

This driver is used to implement USB-serial like behaviour over dummy

USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver ViVOpay USB Serial Driver
ZIO Motherboard USB driver

Quoted 1 line

I like the idea, but not the name :)

Please don't expect miracles from me after 26 hours without sleep ;-)

Quoted 2 lines

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

I just noticed that one. Stupid me.

Quoted 5 lines

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

Quoted 4 lines
Quoted 1 line

So you lost the names of the devices with this patch, which isn't good.

Sheesh ... that's true, but having pile of copies of the same code is not good either.

I agree, that's why I said it should be reduced.

Quoted 2 lines

Can't we then just deprecate all these drivers and set correct udev rules?

Quoted 6 lines
Quoted 2 lines

udev can not change the name of the device in sysfs, or the name in the kernel of the device.

That's right, but it can bind the generic driver with the hardware. And who would care about the driver name, really ? The interface just appears and that's what matters (to me and probably to users) ...

There are persistant device links in /dev/serial/ that might care about the driver name. We don't want to break them, right?

thanks,

greg k-h

#6 lore raw

Dne ?t 3. srpna 2010 19:49:12 Greg KH napsal(a):

Quoted 45 lines · Marek Vasut
Quoted 44 lines

Dne ?t 3. srpna 2010 18:38:26 Greg KH napsal(a):

Quoted 42 lines · Marek Vasut
Quoted 28 lines

Dne ?t 3. srpna 2010 00:47:18 Greg KH napsal(a):

Quoted 13 lines · Marek Vasut
Quoted 11 lines

This driver is used to implement USB-serial like behaviour over dummy

USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver ViVOpay USB Serial Driver
ZIO Motherboard USB driver

Quoted 1 line

I like the idea, but not the name :)

Please don't expect miracles from me after 26 hours without sleep ;-)

Quoted 2 lines

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

I just noticed that one. Stupid me.

Quoted 5 lines

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

Quoted 5 lines
Quoted 2 lines

So you lost the names of the devices with this patch, which isn't good.

Sheesh ... that's true, but having pile of copies of the same code is not good either.

I agree, that's why I said it should be reduced.

Quoted 2 lines

Can't we then just deprecate all these drivers and set correct udev rules?

udev can not change the name of the device in sysfs, or the name in the kernel of the device.

Quoted 6 lines
Quoted 3 lines

That's right, but it can bind the generic driver with the hardware. And who would care about the driver name, really ? The interface just appears and that's what matters (to me and probably to users) ...

There are persistant device links in /dev/serial/ that might care about the driver name. We don't want to break them, right?

We can start a slow migration though. Eg. push the serial-generic as a way-to-go so the distro teams can pick this change and incorporate it into their stuff.

Maybe just mark all those drivers as "DEPRECATED" and add a note there "use generic-serial".

Quoted 4 lines

thanks,

greg k-h

#7 lore raw
Quoted 50 lines · Marek Vasut

Dne ?t 3. srpna 2010 19:49:12 Greg KH napsal(a):

Quoted 49 lines · Marek Vasut
Quoted 47 lines

Dne ?t 3. srpna 2010 18:38:26 Greg KH napsal(a):

Quoted 35 lines · Marek Vasut
Quoted 28 lines

Dne ?t 3. srpna 2010 00:47:18 Greg KH napsal(a):

Quoted 13 lines · Marek Vasut
Quoted 11 lines

This driver is used to implement USB-serial like behaviour over dummy

USB cables. These are used in the following devices:
Funsoft Serial USB driver
Genesys Logic GL620USB USB Laplink cable HP4x (48/49) Serial cable
Motorola phones
Siemens USB-MPI Serial USB driver ViVOpay USB Serial Driver
ZIO Motherboard USB driver

Quoted 1 line

I like the idea, but not the name :)

Please don't expect miracles from me after 26 hours without sleep ;-)

Quoted 2 lines

Ideally, all of these would be able to be handled by the usb-serial generic driver directly.

I just noticed that one. Stupid me.

Quoted 5 lines

But really, having these multiple drivers is a good thing, they properly convey to the user what the device is, and it gives these developers and companies a sense of ownership over the code, and that matters at times.

Quoted 5 lines
Quoted 2 lines

So you lost the names of the devices with this patch, which isn't good.

Sheesh ... that's true, but having pile of copies of the same code is not good either.

Quoted 7 lines

I agree, that's why I said it should be reduced.

Quoted 2 lines

Can't we then just deprecate all these drivers and set correct udev rules?

udev can not change the name of the device in sysfs, or the name in the kernel of the device.

That's right, but it can bind the generic driver with the hardware. And who would care about the driver name, really ? The interface just appears and that's what matters (to me and probably to users) ...

Quoted 8 lines
Quoted 2 lines

There are persistant device links in /dev/serial/ that might care about the driver name. We don't want to break them, right?

We can start a slow migration though. Eg. push the serial-generic as a way-to-go so the distro teams can pick this change and incorporate it into their stuff.

Maybe just mark all those drivers as "DEPRECATED" and add a note there "use generic-serial".

{sigh}

No, the goal is to provide a way for the generic driver to be able to specify a "name" so that you don't have to worry about ever breaking userspace like this.

thanks,

greg k-h