Fwd: Codeless KEXT for CDC ACM device

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

 



Any comments on the comments by Paul? I also do
not like the warning message.

Regards,
Xiaofan


---------- Forwarded message ----------
From: Paul Stoffregen <paul@xxxxxxxx>
Date: Sat, Sep 24, 2011 at 5:32 AM
Subject: Re: Codeless KEXT for CDC ACM device
To: Donald Delmar Davis <ddelmardavis@xxxxxxxxx>, usb@xxxxxxxxxxxxxxx


On 09/23/2011 12:47 PM, Donald Delmar Davis wrote:

Was there any resolution to this.
It is downright annoying.

I pretty much let this drop.  It seemed like I'd stirred the pot enough.
I didn't have a standards-compliant proposal.  That, and it was also
the end of a week.  The next week brought many seemingly more
urgent things...

I was actually thinking about this yesterday.  I recently ran across this
bit of code in Linux's cdc-acm.c:

        case USB_CDC_CALL_MANAGEMENT_TYPE:
                call_management_function = buffer[3];
                call_interface_num = buffer[4];
                if ( (quirks & NOT_A_MODEM) == 0 &&
(call_management_function & 3) != 3)
                        dev_err(&intf->dev, "This device cannot do
calls on its own. It is not a modem.\n");
                break;

Is it really a standards compliant way to indicate a communication
class device is not a modem?  It seems almost too good to be true!?

I pulled up a copy of the spec, and I believe the relevant part is
section 5.2.3.2 on page 34 to 35.  Here is what the spec says
regarding that byte:

        The capabilities that this configuration
        supports:

          D7..D2:    RESERVED (Reset to zero)
          D1:        0 - Device sends/receives call
                     management information only over
                     the Communication Class
                     interface.
                     1 - Device can send/receive call
                     management information over a
                     Data Class interface.
          D0:        0 - Device does not handle call
                     management itself.
                     1 - Device handles call
                     management itself.

        The previous bits, in combination, identify
        which call management scenario is used. If bit
        D0 is reset to 0, then the value of bit D1 is
        ignored. In this case, bit D1 is reset to zero for
        future compatibility.

So this does seem to say that if the byte is zero (or the lowest bit
is zero), the device does not handle call management, which seems
 to mean it can not possibly be a modem.  The Linux check should
probably only look at the lowest bit, since 0x01 would indicate a
modem that requires the call management ("AT" commands if ACM)
sent on the communication interface rather than the data interface
(which Linux's driver doesn't support).

Then again, maybe this interpretation of the communication class
spec is colored by my desire for better usability for non-modem
devices?

Could it really be this easy, just a single bit: 1 = modem,
0 = something not a modem.

Of course, if there's an ECM or other networking descriptor, then
the network prefs dialog should obviously apply.  But if there's an
ACM descriptor and no ECM or other networking, and that bit is 0,
is that a good enough standards compliant way to avoid popping
up the network prefs which causes user confusion when the device
isn't a modem?


-Paul

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (Usb@xxxxxxxxxxxxxxx)
--
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