Re: [Ftdi-usb-sio-devel] Multiple serial ports on one adapter
Brought to you by:
bryder
From: Toan P. <tph...@gm...> - 2009-01-07 15:42:27
|
>From my study of the ftdi kernel driver recently, the ftdi driver supports multiple ports. Here is a confirmation of the ftdi driver cleaning up all the ports upon disconnection. static void destroy_serial(struct kref *kref) { struct usb_serial *serial; struct usb_serial_port *port; int i; serial = to_usb_serial(kref); dbg("%s - %s", __FUNCTION__, serial->type->description); serial->type->shutdown(serial); /* return the minor range that this device had */ return_serial(serial); for (i = 0; i < serial->num_ports; ++i) serial->port[i]->open_count = 0; /* the ports are cleaned up and released in port_release() */ for (i = 0; i < serial->num_ports; ++i) if (serial->port[i]->dev.parent != NULL) { device_unregister(&serial->port[i]->dev); serial->port[i] = NULL; } /* If this is a "fake" port, we have to clean it up here, as it will * not get cleaned up in port_release() as it was never registered with * the driver core */ if (serial->num_ports < serial->num_port_pointers) { for (i = serial->num_ports; i < serial->num_port_pointers; ++i) { port = serial->port[i]; if (!port) continue; port_free(port); } } usb_put_dev(serial->dev); /* free up any memory that we allocated */ kfree (serial); } On Wed, Jan 7, 2009 at 9:39 AM, Fred Labrosse <ff...@ab...> wrote: > All, > > I need to have multiple RS422 ports on one computer and was looking at buying > a USB/serial adapter with multiple (2) serial ports. My application is to > plug two SICK laser scanners (lms200) into the computer. > > I have essentially two questions. > > The kernel driver help seems to say that it only supports single port adapters > and I have seen at least one report on the archive of the mailing list saying > that the driver didn't work with a multiple port adapter. Is that indeed the > case? > > Second, is there a specific adapter that I should look at? The one at > <http://www.easysync.co.uk/index.html?lang=en-uk&target=d11.html> seems > interesting. Anybody has any experience with it? The vendors explicitly say > that it works with linux (related to the question above). > > TIA, > > Fred > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > Ftdi-usb-sio-devel mailing list > Ftd...@li... > https://lists.sourceforge.net/lists/listinfo/ftdi-usb-sio-devel > |