usb: wusbcore: Add isoc transfer type enum and packet definitions
This patch adds transfer type enum and packet definitions for WA_XFER_ISO_PACKET_INFO and WA_XFER_ISO_PACKET_STATUS packets. It also changes instances of __attribute__((packed)) to __packed to make checkpatch.pl happy. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1a7ff0e367
commit
4ae1a5bd3f
|
@ -142,7 +142,7 @@ enum wa_notif_type {
|
||||||
struct wa_notif_hdr {
|
struct wa_notif_hdr {
|
||||||
u8 bLength;
|
u8 bLength;
|
||||||
u8 bNotifyType; /* enum wa_notif_type */
|
u8 bNotifyType; /* enum wa_notif_type */
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HWA DN Received notification [(WUSB] section 8.5.4.2)
|
* HWA DN Received notification [(WUSB] section 8.5.4.2)
|
||||||
|
@ -158,7 +158,7 @@ struct hwa_notif_dn {
|
||||||
u8 bSourceDeviceAddr; /* from errata 2005/07 */
|
u8 bSourceDeviceAddr; /* from errata 2005/07 */
|
||||||
u8 bmAttributes;
|
u8 bmAttributes;
|
||||||
struct wusb_dn_hdr dndata[];
|
struct wusb_dn_hdr dndata[];
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
/* [WUSB] section 8.3.3 */
|
/* [WUSB] section 8.3.3 */
|
||||||
enum wa_xfer_type {
|
enum wa_xfer_type {
|
||||||
|
@ -167,6 +167,8 @@ enum wa_xfer_type {
|
||||||
WA_XFER_TYPE_ISO = 0x82,
|
WA_XFER_TYPE_ISO = 0x82,
|
||||||
WA_XFER_RESULT = 0x83,
|
WA_XFER_RESULT = 0x83,
|
||||||
WA_XFER_ABORT = 0x84,
|
WA_XFER_ABORT = 0x84,
|
||||||
|
WA_XFER_ISO_PACKET_INFO = 0xA0,
|
||||||
|
WA_XFER_ISO_PACKET_STATUS = 0xA1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* [WUSB] section 8.3.3 */
|
/* [WUSB] section 8.3.3 */
|
||||||
|
@ -177,28 +179,47 @@ struct wa_xfer_hdr {
|
||||||
__le32 dwTransferID; /* Host-assigned ID */
|
__le32 dwTransferID; /* Host-assigned ID */
|
||||||
__le32 dwTransferLength; /* Length of data to xfer */
|
__le32 dwTransferLength; /* Length of data to xfer */
|
||||||
u8 bTransferSegment;
|
u8 bTransferSegment;
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
struct wa_xfer_ctl {
|
struct wa_xfer_ctl {
|
||||||
struct wa_xfer_hdr hdr;
|
struct wa_xfer_hdr hdr;
|
||||||
u8 bmAttribute;
|
u8 bmAttribute;
|
||||||
__le16 wReserved;
|
__le16 wReserved;
|
||||||
struct usb_ctrlrequest baSetupData;
|
struct usb_ctrlrequest baSetupData;
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
struct wa_xfer_bi {
|
struct wa_xfer_bi {
|
||||||
struct wa_xfer_hdr hdr;
|
struct wa_xfer_hdr hdr;
|
||||||
u8 bReserved;
|
u8 bReserved;
|
||||||
__le16 wReserved;
|
__le16 wReserved;
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
|
/* [WUSB] section 8.5.5 */
|
||||||
struct wa_xfer_hwaiso {
|
struct wa_xfer_hwaiso {
|
||||||
struct wa_xfer_hdr hdr;
|
struct wa_xfer_hdr hdr;
|
||||||
u8 bReserved;
|
u8 bReserved;
|
||||||
__le16 wPresentationTime;
|
__le16 wPresentationTime;
|
||||||
__le32 dwNumOfPackets;
|
__le32 dwNumOfPackets;
|
||||||
/* FIXME: u8 pktdata[]? */
|
} __packed;
|
||||||
} __attribute__((packed));
|
|
||||||
|
struct wa_xfer_packet_info_hwaiso {
|
||||||
|
__le16 wLength;
|
||||||
|
u8 bPacketType;
|
||||||
|
u8 bReserved;
|
||||||
|
__le16 PacketLength[0];
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct wa_xfer_packet_status_len_hwaiso {
|
||||||
|
__le16 PacketLength;
|
||||||
|
__le16 PacketStatus;
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct wa_xfer_packet_status_hwaiso {
|
||||||
|
__le16 wLength;
|
||||||
|
u8 bPacketType;
|
||||||
|
u8 bReserved;
|
||||||
|
struct wa_xfer_packet_status_len_hwaiso PacketStatus[0];
|
||||||
|
} __packed;
|
||||||
|
|
||||||
/* [WUSB] section 8.3.3.5 */
|
/* [WUSB] section 8.3.3.5 */
|
||||||
struct wa_xfer_abort {
|
struct wa_xfer_abort {
|
||||||
|
@ -206,7 +227,7 @@ struct wa_xfer_abort {
|
||||||
u8 bRequestType;
|
u8 bRequestType;
|
||||||
__le16 wRPipe; /* RPipe index */
|
__le16 wRPipe; /* RPipe index */
|
||||||
__le32 dwTransferID; /* Host-assigned ID */
|
__le32 dwTransferID; /* Host-assigned ID */
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WA Transfer Complete notification ([WUSB] section 8.3.3.3)
|
* WA Transfer Complete notification ([WUSB] section 8.3.3.3)
|
||||||
|
@ -216,7 +237,7 @@ struct wa_notif_xfer {
|
||||||
struct wa_notif_hdr hdr;
|
struct wa_notif_hdr hdr;
|
||||||
u8 bEndpoint;
|
u8 bEndpoint;
|
||||||
u8 Reserved;
|
u8 Reserved;
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
/** Transfer result basic codes [WUSB] table 8-15 */
|
/** Transfer result basic codes [WUSB] table 8-15 */
|
||||||
enum {
|
enum {
|
||||||
|
@ -243,7 +264,7 @@ struct wa_xfer_result {
|
||||||
u8 bTransferSegment;
|
u8 bTransferSegment;
|
||||||
u8 bTransferStatus;
|
u8 bTransferStatus;
|
||||||
__le32 dwNumOfPackets;
|
__le32 dwNumOfPackets;
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wire Adapter Class Descriptor ([WUSB] section 8.5.2.7).
|
* Wire Adapter Class Descriptor ([WUSB] section 8.5.2.7).
|
||||||
|
@ -267,7 +288,7 @@ struct usb_wa_descriptor {
|
||||||
u8 bPwrOn2PwrGood;
|
u8 bPwrOn2PwrGood;
|
||||||
u8 bNumMMCIEs;
|
u8 bNumMMCIEs;
|
||||||
u8 DeviceRemovable; /* FIXME: in DWA this is up to 16 bytes */
|
u8 DeviceRemovable; /* FIXME: in DWA this is up to 16 bytes */
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HWA Device Information Buffer (WUSB1.0[T8.54])
|
* HWA Device Information Buffer (WUSB1.0[T8.54])
|
||||||
|
@ -277,6 +298,6 @@ struct hwa_dev_info {
|
||||||
u8 bDeviceAddress;
|
u8 bDeviceAddress;
|
||||||
__le16 wPHYRates;
|
__le16 wPHYRates;
|
||||||
u8 bmDeviceAttribute;
|
u8 bmDeviceAttribute;
|
||||||
} __attribute__((packed));
|
} __packed;
|
||||||
|
|
||||||
#endif /* #ifndef __LINUX_USB_WUSB_WA_H */
|
#endif /* #ifndef __LINUX_USB_WUSB_WA_H */
|
||||||
|
|
Loading…
Reference in New Issue