Re: cdc_acm and sam_ba support the same device

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

 



On Wed, Mar 16, 2011 at 08:23:11AM -0700, Greg KH wrote:
> On Wed, Mar 16, 2011 at 03:48:53PM +0100, Sven Köhler wrote:
> > Hi,
> > 
> > I'm not sure, whether you consider this is an issue. However, the device
> > I have (Lego NXT in SAM-BA mode, lsusb shows it as 03eb:6124 Atmel Corp.
> > at91sam SAMBA bootloader) is supported by both cdc_acm and sam_ba kernel
> > modules, which leads to unpredictable behaviour.
> > (Tested 2.6.38 - same issue in 2.6.37)
> 
> I think Johan is the best one to answer this, as he submitted the sam-ba
> driver.
> 
> Johan, any thoughts on the below info?
> 
> 
> > 
> > If I plug the device in, the following happens if cdc_acm is already loaded:
> > > usb 4-1: new full speed USB device using uhci_hcd and address 3
> > > cdc_acm 4-1:1.0: This device cannot do calls on its own. It is not a modem.
> > > cdc_acm 4-1:1.0: ttyACM0: USB ACM device
> > > usbcore: registered new interface driver cdc_acm
> > > cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
> > > USB Serial support registered for sam-ba
> > > usbcore: registered new interface driver sam-ba
> > > sam_ba: v1.0: Atmel SAM Boot Assistant (SAM-BA) driver
> > 
> > After unloading both cdc_acm and sam_ba, the following happends:
> > > usb 4-1: new full speed USB device using uhci_hcd and address 4
> > > USB Serial support registered for sam-ba
> > > sam-ba 4-1:1.1: sam-ba converter detected
> > > usb 4-1: sam-ba converter now attached to ttyUSB0
> > > usbcore: registered new interface driver sam-ba
> > > sam_ba: v1.0: Atmel SAM Boot Assistant (SAM-BA) driver
> > > cdc_acm 4-1:1.0: This device cannot do calls on its own. It is not a modem.
> > > cdc_acm: probe of 4-1:1.0 failed with error -16
> > > usbcore: registered new interface driver cdc_acm
> > > cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
> > 
> > As you can see, the device is recognized by cdc_acm as well as sam_ba.
> > Depending on which module is loaded, the device is either claimed by
> > cdc_acm or sam_ba. The device name may be either ttyACM* or ttyUSB*

Tradionally the generic usb-serial driver was used to access the SAM-BA
boot application; this is documented in the Atmel tools, which also
expect the device to show up as a ttyUSBx node. Due to changes in the
generic driver the tools stopped working from 2.6.32 and a dedicated
driver was later written (sam-ba).

A couple of weeks after the sam-ba driver was submitted, however,
5b239f0aebd4dd6f85b13decf5e18e86e35d57f0 (USB: cdc-acm: Add pseudo modem
without AT command capabilities) was submitted, which causes cdc_acm to
bind to these devices as well.

> > I have no clue, whether there are Atmel SAM-BA implementations that do
> > not support the cdc profile.
> > 
> > I'm not sure, whether the device should be blacklisted in cdc_acm in
> > favor of sam_ba. However, I have the feeling that if sam_ba is actually
> > installed, sam_ba should claim the device even if cdc_acm is already loaded.
> > 
> > Last time I tested, the device was working fine with cdc_acm, though.

I just connected a at91sam9260-ek board and can confirm that the samba
tools do seem to work with the cdc-acm driver, although it does require
a ttyUSBx symlink for the device to be recognised by the user-space tools
(latest v2.10).

I'm not sure about how to proceed with this. What do you say, Greg?

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux