From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5YHz-0002q7-7Z for qemu-devel@nongnu.org; Fri, 11 Jul 2014 06:42:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5YHj-00030z-Rs for qemu-devel@nongnu.org; Fri, 11 Jul 2014 06:42:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5YHj-00030m-Hr for qemu-devel@nongnu.org; Fri, 11 Jul 2014 06:42:35 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6BAgYnC003996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 11 Jul 2014 06:42:34 -0400 From: Gerd Hoffmann Date: Fri, 11 Jul 2014 12:42:30 +0200 Message-Id: <1405075350-20697-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1405075350-20697-1-git-send-email-kraxel@redhat.com> References: <1405075350-20697-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 1/1] mtp: linux guest detection fix. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Attach a name to the MTP interface (android phones have this too). With this patch recent linux guests such as fedora 20 happily detect and use the device. It shows up in nautilus file manager automatically, and simple-mtpfs can mount it. Signed-off-by: Gerd Hoffmann --- hw/usb/dev-mtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 380b465..1b51a90 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -145,6 +145,7 @@ enum { STR_MANUFACTURER = 1, STR_PRODUCT, STR_SERIALNUMBER, + STR_MTP, STR_CONFIG_FULL, STR_CONFIG_HIGH, STR_CONFIG_SUPER, @@ -154,6 +155,7 @@ static const USBDescStrings desc_strings = { [STR_MANUFACTURER] = MTP_MANUFACTURER, [STR_PRODUCT] = MTP_PRODUCT, [STR_SERIALNUMBER] = "34617", + [STR_MTP] = "MTP", [STR_CONFIG_FULL] = "Full speed config (usb 1.1)", [STR_CONFIG_HIGH] = "High speed config (usb 2.0)", [STR_CONFIG_SUPER] = "Super speed config (usb 3.0)", @@ -165,6 +167,7 @@ static const USBDescIface desc_iface_full = { .bInterfaceClass = USB_CLASS_STILL_IMAGE, .bInterfaceSubClass = 0x01, .bInterfaceProtocol = 0x01, + .iInterface = STR_MTP, .eps = (USBDescEndpoint[]) { { .bEndpointAddress = USB_DIR_IN | EP_DATA_IN, @@ -206,6 +209,7 @@ static const USBDescIface desc_iface_high = { .bInterfaceClass = USB_CLASS_STILL_IMAGE, .bInterfaceSubClass = 0x01, .bInterfaceProtocol = 0x01, + .iInterface = STR_MTP, .eps = (USBDescEndpoint[]) { { .bEndpointAddress = USB_DIR_IN | EP_DATA_IN, -- 1.8.3.1