From patchwork Sat May 11 10:11:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: howaboutsynergy@protonmail.com X-Patchwork-Id: 10939729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76419112C for ; Sat, 11 May 2019 10:12:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F0091FF7E for ; Sat, 11 May 2019 10:12:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5232E2018E; Sat, 11 May 2019 10:12:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCD151FF7E for ; Sat, 11 May 2019 10:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728525AbfEKKL7 (ORCPT ); Sat, 11 May 2019 06:11:59 -0400 Received: from mail-40130.protonmail.ch ([185.70.40.130]:33155 "EHLO mail-40130.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbfEKKL7 (ORCPT ); Sat, 11 May 2019 06:11:59 -0400 Date: Sat, 11 May 2019 10:11:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1557569514; bh=kAF4OhwgdH6IXKS4WeyUSib6EMVyoqvOoRwfjFP6nwE=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=AgJij8N2vWStX1KhQwD+dPgDn0kGHFszVtPFkzHlZB8pKBl1mVEeKluZDvN8Xv89x MNm5c8Ro99jEp8AtzGVtATYAI7lZIl/L6xsK543adBNGavl81Bsyc/dQgL4ynpbHlL 0+ur1kYRf0VhZb9bCM6n5iRfxju5pufhjLhdEGtc= To: "linux-usb@vger.kernel.org" From: howaboutsynergy@protonmail.com Reply-To: howaboutsynergy@protonmail.com Subject: Eaton 5E UPS (aka MGE UPS) auto-disconnecting after `usb_submit_urb(ctrl) failed: -1` and `timeout initializing reports` Message-ID: <43W7RqIKYXiPgdTYUdZnO_ZvCI7FCgsahPEdc5p4haN6EOynzDbGKswDeRGGPfNajHNVT_eOIWZMzOvvf5lvs4BjfeMwi9IM9wLnJlcZpDE=@protonmail.com> Feedback-ID: cNV1IIhYZ3vPN2m1zihrGlihbXC6JOgZ5ekTcEurWYhfLPyLhpq0qxICavacolSJ7w0W_XBloqfdO_txKTblOQ==:Ext:ProtonMail MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without the attached patch, upowerd (via upower.service) will cause repeated disconnect&reconnect of the USB device for Eaton 5E UPS (known in kernel headers as MGE UPS) and just spam things like this every 10 seconds (I thought it was 20, oh well): [ 1156.492171] hid-generic 0003:0463:FFFF.003F: usb_submit_urb(ctrl) failed: -1 [ 1156.492215] hid-generic 0003:0463:FFFF.003F: timeout initializing reports [ 1161.918674] usb 1-14: USB disconnect, device number 63 [ 1162.659694] gpg-agent[1068]: handler 0x752b0f137700 for fd 10 started [ 1162.711817] gpg-agent[1068]: handler 0x752b0f137700 for fd 10 terminated [ 1162.806042] usb 1-14: new low-speed USB device number 64 using xhci_hcd [ 1163.569330] usb 1-14: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01 [ 1163.569339] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1163.569344] usb 1-14: Product: 5E [ 1163.569347] usb 1-14: Manufacturer: EATON [ 1165.529902] hid-generic 0003:0463:FFFF.0040: hiddev97,hidraw4: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-14/input0 [ 1165.540017] mtp-probe[5586]: checking bus 1, device 64: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1165.540180] mtp-probe[5586]: bus: 1, device: 64 was not an MTP device [ 1166.081247] mtp-probe[5608]: checking bus 1, device 64: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1166.081500] mtp-probe[5608]: bus: 1, device: 64 was not an MTP device [ 1172.042315] usb 1-14: USB disconnect, device number 64 originally reported here: https://bugzilla.kernel.org/show_bug.cgi?id=203569 Here's more info via `sudo lsusb -vvvv`: Bus 001 Device 005: ID 0463:ffff MGE UPS Systems UPS Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0463 MGE UPS Systems idProduct 0xffff UPS bcdDevice 0.01 iManufacturer 1 (error) iProduct 2 (error) iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0022 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 20mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 549 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 20 ^ that's with the patch, no idea why those two now show `error` instead of `Eaton` and `5E`: iManufacturer 1 (error) iProduct 2 (error) ...maybe it's the patch or the fact that the patch now allows upowerd or xfce4-power-manager (?) to communicate or something with the UPS and confused it? no idea, just guessing. Without the patch xfce4-power-manager-settings segfaults as seen here: https://bugzilla.xfce.org/show_bug.cgi?id=15387#c5 Note: vger.kernel.org is http-only so I wasn't able to read/load it(can do https-only) thus I don't know if sending to this email works. PS: if any devs want me to test any patches(even if unrelated to this issue), please let me know for I'll be happy to. will prevent auto-disconnection dmesg spam for Eaton 5E UPS connection via USB cable thanks to Reyad Attiyat for https://bugzilla.kernel.org/show_bug.cgi?id=73321#c11 and #c12 [ 1156.492171] hid-generic 0003:0463:FFFF.003F: usb_submit_urb(ctrl) failed: -1 [ 1156.492215] hid-generic 0003:0463:FFFF.003F: timeout initializing reports [ 1161.918674] usb 1-14: USB disconnect, device number 63 [ 1162.659694] gpg-agent[1068]: handler 0x752b0f137700 for fd 10 started [ 1162.711817] gpg-agent[1068]: handler 0x752b0f137700 for fd 10 terminated [ 1162.806042] usb 1-14: new low-speed USB device number 64 using xhci_hcd [ 1163.569330] usb 1-14: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01 [ 1163.569339] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1163.569344] usb 1-14: Product: 5E [ 1163.569347] usb 1-14: Manufacturer: EATON [ 1165.529902] hid-generic 0003:0463:FFFF.0040: hiddev97,hidraw4: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-14/input0 [ 1165.540017] mtp-probe[5586]: checking bus 1, device 64: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1165.540180] mtp-probe[5586]: bus: 1, device: 64 was not an MTP device [ 1166.081247] mtp-probe[5608]: checking bus 1, device 64: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1166.081500] mtp-probe[5608]: bus: 1, device: 64 was not an MTP device [ 1172.042315] usb 1-14: USB disconnect, device number 64 [ 1172.042948] hid-generic 0003:0463:FFFF.0040: usb_submit_urb(ctrl) failed: -19 [ 1172.931037] usb 1-14: new low-speed USB device number 65 using xhci_hcd [ 1173.692895] usb 1-14: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01 [ 1173.692903] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1173.692907] usb 1-14: Product: 5E [ 1173.692912] usb 1-14: Manufacturer: EATON [ 1175.653569] hid-generic 0003:0463:FFFF.0041: hiddev97,hidraw4: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-14/input0 [ 1175.663973] mtp-probe[5671]: checking bus 1, device 65: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1175.664700] mtp-probe[5671]: bus: 1, device: 65 was not an MTP device [ 1176.192214] mtp-probe[5693]: checking bus 1, device 65: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1176.192415] mtp-probe[5693]: bus: 1, device: 65 was not an MTP device [ 1182.156218] usb 1-14: USB disconnect, device number 65 [ 1182.156301] hid-generic 0003:0463:FFFF.0041: usb_submit_urb(ctrl) failed: -19 [ 1183.044037] usb 1-14: new low-speed USB device number 66 using xhci_hcd [ 1183.808062] usb 1-14: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01 [ 1183.808070] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1183.808075] usb 1-14: Product: 5E [ 1183.808078] usb 1-14: Manufacturer: EATON [ 1185.767289] hid-generic 0003:0463:FFFF.0042: hiddev97,hidraw4: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-14/input0 [ 1185.777254] mtp-probe[5757]: checking bus 1, device 66: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1185.777378] mtp-probe[5757]: bus: 1, device: 66 was not an MTP device [ 1186.318828] mtp-probe[5778]: checking bus 1, device 66: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14" [ 1186.318946] mtp-probe[5778]: bus: 1, device: 66 was not an MTP device [ 1196.428121] hid-generic 0003:0463:FFFF.0042: usb_submit_urb(ctrl) failed: -1 [ 1196.428161] hid-generic 0003:0463:FFFF.0042: timeout initializing reports diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index 77ffba48cc73..1afc38515719 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -112,6 +112,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), HID_QUIRK_NO_INIT_REPORTS }, + { HID_USB_DEVICE(USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS), HID_QUIRK_NO_INIT_REPORTS }, //added by je { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL), HID_QUIRK_NO_INIT_REPORTS },