RE: Problem of Serial_State in cdc-acm.c

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

 



Hi,
    I have encounter a problem while sending Serial_State packet of CDC-ACM from Linux gadget to Linux host .
Here is my question:
    The environment is a USB device which runs Linux is using CDC-ACM(f_acm.c) to communicate with a Linux host(cdc-acm.c). When device tries to send Serial_State packet to host, host always can't get correct data. I look into the host driver(cdc-acm.c) and found driver calls get_unaligned_le16 on data and this function inverts byte order of data.
    Following is the link of cdc-acm.c and f_acm.c
ACM host:     http://lxr.free-electrons.com/source/drivers/usb/class/cdc-acm.c#L325
ACM gadget:    http://lxr.free-electrons.com/source/drivers/usb/gadget/function/f_acm.c#L493
    From the current code, gadget send Serial_State in big-endian but host treat it as little-endian.
Is this a problem?

Appreciate for your time
Benson


________________________________

Important Notice: This email message and any attachments thereto are confidential and/or privileged and/or subject to privacy laws and are intended only for use by the addressee(s) named above. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution, copying or use of this email and any attachments thereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system and notify us at the telephone number or email address appearing above. The writer asserts in respect of this message and attachments all rights for confidentiality, privilege or privacy to the fullest extent permitted by law.
--
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