Problem of Serial_State in cdc-acm.c

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

 



Hi Greg,
    Thanks for your kind reminding. I never notice the footer if you
don't tell me...
I resend my mail by another mail account. Following is the original message.

    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
--
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