提交 0e96643c 编写于 作者: P Peter Maydell

Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-5' into staging

usb: mtp filesharing

# gpg: Signature made Wed 23 Apr 2014 09:28:37 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-usb-5:
  usb: mtp filesharing
  usb: add CompatibleID support to msos
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
CONFIG_USB_TABLET_WACOM=y CONFIG_USB_TABLET_WACOM=y
CONFIG_USB_STORAGE_BOT=y CONFIG_USB_STORAGE_BOT=y
CONFIG_USB_STORAGE_UAS=y CONFIG_USB_STORAGE_UAS=y
CONFIG_USB_STORAGE_MTP=y
CONFIG_USB_SMARTCARD=y CONFIG_USB_SMARTCARD=y
CONFIG_USB_AUDIO=y CONFIG_USB_AUDIO=y
CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL=y
......
...@@ -26,6 +26,10 @@ common-obj-y += ccid-card-passthru.o ...@@ -26,6 +26,10 @@ common-obj-y += ccid-card-passthru.o
common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o
endif endif
ifeq ($(CONFIG_POSIX),y)
common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o
endif
# usb redirection # usb redirection
common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
......
...@@ -44,7 +44,7 @@ typedef struct msos_compat_hdr { ...@@ -44,7 +44,7 @@ typedef struct msos_compat_hdr {
typedef struct msos_compat_func { typedef struct msos_compat_func {
uint8_t bFirstInterfaceNumber; uint8_t bFirstInterfaceNumber;
uint8_t reserved_1; uint8_t reserved_1;
uint8_t compatibleId[8]; char compatibleId[8];
uint8_t subCompatibleId[8]; uint8_t subCompatibleId[8];
uint8_t reserved_2[6]; uint8_t reserved_2[6];
} QEMU_PACKED msos_compat_func; } QEMU_PACKED msos_compat_func;
...@@ -59,6 +59,10 @@ static int usb_desc_msos_compat(const USBDesc *desc, uint8_t *dest) ...@@ -59,6 +59,10 @@ static int usb_desc_msos_compat(const USBDesc *desc, uint8_t *dest)
func = (void *)(dest + length); func = (void *)(dest + length);
func->bFirstInterfaceNumber = 0; func->bFirstInterfaceNumber = 0;
func->reserved_1 = 0x01; func->reserved_1 = 0x01;
if (desc->msos->CompatibleID) {
snprintf(func->compatibleId, sizeof(func->compatibleId),
"%s", desc->msos->CompatibleID);
}
length += sizeof(*func); length += sizeof(*func);
count++; count++;
......
...@@ -184,6 +184,7 @@ struct USBDescOther { ...@@ -184,6 +184,7 @@ struct USBDescOther {
}; };
struct USBDescMSOS { struct USBDescMSOS {
const char *CompatibleID;
const wchar_t *Label; const wchar_t *Label;
bool SelectiveSuspendEnabled; bool SelectiveSuspendEnabled;
}; };
......
此差异已折叠。
...@@ -433,6 +433,27 @@ usb_uas_tmf_abort_task(int addr, uint16_t tag, uint16_t task_tag) "dev %d, tag 0 ...@@ -433,6 +433,27 @@ usb_uas_tmf_abort_task(int addr, uint16_t tag, uint16_t task_tag) "dev %d, tag 0
usb_uas_tmf_logical_unit_reset(int addr, uint16_t tag, int lun) "dev %d, tag 0x%x, lun %d" usb_uas_tmf_logical_unit_reset(int addr, uint16_t tag, int lun) "dev %d, tag 0x%x, lun %d"
usb_uas_tmf_unsupported(int addr, uint16_t tag, uint32_t function) "dev %d, tag 0x%x, function 0x%x" usb_uas_tmf_unsupported(int addr, uint16_t tag, uint32_t function) "dev %d, tag 0x%x, function 0x%x"
# hw/usb/dev-mtp.c
usb_mtp_reset(int addr) "dev %d"
usb_mtp_command(int dev, uint16_t code, uint32_t trans, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4) "dev %d, code 0x%x, trans 0x%x, args 0x%x, 0x%x, 0x%x, 0x%x, 0x%x"
usb_mtp_success(int dev, uint32_t trans, uint32_t arg0, uint32_t arg1) "dev %d, trans 0x%x, args 0x%x, 0x%x"
usb_mtp_error(int dev, uint16_t code, uint32_t trans, uint32_t arg0, uint32_t arg1) "dev %d, code 0x%x, trans 0x%x, args 0x%x, 0x%x"
usb_mtp_data_in(int dev, uint32_t trans, uint32_t len) "dev %d, trans 0x%x, len %d"
usb_mtp_data_out(int dev, uint32_t trans, uint32_t len) "dev %d, trans 0x%x, len %d"
usb_mtp_xfer(int dev, uint32_t ep, uint32_t dlen, uint32_t plen) "dev %d, ep %d, %d/%d"
usb_mtp_nak(int dev, uint32_t ep) "dev %d, ep %d"
usb_mtp_stall(int dev, const char *reason) "dev %d, reason: %s"
usb_mtp_op_get_device_info(int dev) "dev %d"
usb_mtp_op_open_session(int dev) "dev %d"
usb_mtp_op_close_session(int dev) "dev %d"
usb_mtp_op_get_storage_ids(int dev) "dev %d"
usb_mtp_op_get_storage_info(int dev) "dev %d"
usb_mtp_op_get_num_objects(int dev, uint32_t handle, const char *path) "dev %d, handle 0x%x, path %s"
usb_mtp_op_get_object_handles(int dev, uint32_t handle, const char *path) "dev %d, handle 0x%x, path %s"
usb_mtp_op_get_object_info(int dev, uint32_t handle, const char *path) "dev %d, handle 0x%x, path %s"
usb_mtp_op_get_object(int dev, uint32_t handle, const char *path) "dev %d, handle 0x%x, path %s"
usb_mtp_op_get_partial_object(int dev, uint32_t handle, const char *path, uint32_t offset, uint32_t length) "dev %d, handle 0x%x, path %s, off %d, len %d"
# hw/usb/host-libusb.c # hw/usb/host-libusb.c
usb_host_open_started(int bus, int addr) "dev %d:%d" usb_host_open_started(int bus, int addr) "dev %d:%d"
usb_host_open_success(int bus, int addr) "dev %d:%d" usb_host_open_success(int bus, int addr) "dev %d:%d"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册