From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Subject: Re: [PATCH] Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version Date: Tue, 9 Jan 2018 09:48:55 +0100 Message-ID: <61d91b1b-b46a-11db-b2aa-bc419dd68e30@redhat.com> References: <20180108094416.4789-1-hdegoede@redhat.com> <28EBA1CE-4DFF-4828-BF00-99BC2B487484@holtmann.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <28EBA1CE-4DFF-4828-BF00-99BC2B487484-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org> Content-Language: en-US Sender: linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Marcel Holtmann Cc: "Gustavo F. Padovan" , Johan Hedberg , "open list:BLUETOOTH DRIVERS" , linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ACPI Devel Maling List , stable , Leif Liddy , Matthias Kaehlcke , Brian Norris , Daniel Drake , Kai-Heng Feng List-Id: linux-acpi@vger.kernel.org Hi, On 08-01-18 21:46, Marcel Holtmann wrote: > Hi Hans, > >> Commit 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"") >> removed the setting of the BTUSB_RESET_RESUME quirk for QCA Rome devices, >> instead favoring adding USB_QUIRK_RESET_RESUME quirks in usb/core/quirks.c. >> >> This was done because the DIY BTUSB_RESET_RESUME reset-resume handling >> has several issues (see the original commit message). An added advantage >> of moving over to the USB-core reset-resume handling is that it also >> disables autosuspend for these devices, which is similarly broken on these. >> >> But there are 2 issues with this approach: >> 1) It leaves the broken DIY BTUSB_RESET_RESUME code in place for Realtek >> devices. >> 2) Sofar only 2 of the 10 QCA devices known to the btusb code have been >> added to usb/core/quirks.c and if we fix the Realtek case the same way >> we need to add an additional 14 entries. So in essence we need to >> duplicate a large part of the usb_device_id table in btusb.c in >> usb/core/quirks.c and manually keep them in sync. >> >> This commit instead restores setting a reset-resume quirk for QCA devices >> in the btusb.c code, avoiding the duplicate usb_device_id table problem. >> >> This commit avoids the problems with the original DIY BTUSB_RESET_RESUME >> code by simply setting the USB_QUIRK_RESET_RESUME quirk directly on the >> usb_device. >> >> This commit also moves the BTUSB_REALTEK case over to directly setting the >> USB_QUIRK_RESET_RESUME on the usb_device and removes the now unused >> BTUSB_RESET_RESUME code. >> >> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836 >> Fixes: 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"") >> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> Cc: Leif Liddy >> Cc: Matthias Kaehlcke >> Cc: Brian Norris >> Cc: Daniel Drake >> Cc: Kai-Heng Feng >> Signed-off-by: Hans de Goede >> --- >> Note: >> 1) Once this has been merged, the 2 commits adding QCA device entries to >> drivers/usb/core/quirks.c should be reverted or dropped from bluetooth-next. >> 2) I don't have any of the affected devices, please test >> --- >> drivers/bluetooth/btusb.c | 22 ++++++++++------------ >> 1 file changed, 10 insertions(+), 12 deletions(-) > > patch has been applied to bluetooth-next tree. I see that you've also dropped the 2 commits adding QCA device entries to drivers/usb/core/quirks.c, great. Thank you. Regards, Hans From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version To: Marcel Holtmann Cc: "Gustavo F. Padovan" , Johan Hedberg , "open list:BLUETOOTH DRIVERS" , linux-serial@vger.kernel.org, ACPI Devel Maling List , stable , Leif Liddy , Matthias Kaehlcke , Brian Norris , Daniel Drake , Kai-Heng Feng References: <20180108094416.4789-1-hdegoede@redhat.com> <28EBA1CE-4DFF-4828-BF00-99BC2B487484@holtmann.org> From: Hans de Goede Message-ID: <61d91b1b-b46a-11db-b2aa-bc419dd68e30@redhat.com> Date: Tue, 9 Jan 2018 09:48:55 +0100 MIME-Version: 1.0 In-Reply-To: <28EBA1CE-4DFF-4828-BF00-99BC2B487484@holtmann.org> Content-Type: text/plain; charset=utf-8; format=flowed List-ID: Hi, On 08-01-18 21:46, Marcel Holtmann wrote: > Hi Hans, > >> Commit 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"") >> removed the setting of the BTUSB_RESET_RESUME quirk for QCA Rome devices, >> instead favoring adding USB_QUIRK_RESET_RESUME quirks in usb/core/quirks.c. >> >> This was done because the DIY BTUSB_RESET_RESUME reset-resume handling >> has several issues (see the original commit message). An added advantage >> of moving over to the USB-core reset-resume handling is that it also >> disables autosuspend for these devices, which is similarly broken on these. >> >> But there are 2 issues with this approach: >> 1) It leaves the broken DIY BTUSB_RESET_RESUME code in place for Realtek >> devices. >> 2) Sofar only 2 of the 10 QCA devices known to the btusb code have been >> added to usb/core/quirks.c and if we fix the Realtek case the same way >> we need to add an additional 14 entries. So in essence we need to >> duplicate a large part of the usb_device_id table in btusb.c in >> usb/core/quirks.c and manually keep them in sync. >> >> This commit instead restores setting a reset-resume quirk for QCA devices >> in the btusb.c code, avoiding the duplicate usb_device_id table problem. >> >> This commit avoids the problems with the original DIY BTUSB_RESET_RESUME >> code by simply setting the USB_QUIRK_RESET_RESUME quirk directly on the >> usb_device. >> >> This commit also moves the BTUSB_REALTEK case over to directly setting the >> USB_QUIRK_RESET_RESUME on the usb_device and removes the now unused >> BTUSB_RESET_RESUME code. >> >> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836 >> Fixes: 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"") >> Cc: stable@vger.kernel.org >> Cc: Leif Liddy >> Cc: Matthias Kaehlcke >> Cc: Brian Norris >> Cc: Daniel Drake >> Cc: Kai-Heng Feng >> Signed-off-by: Hans de Goede >> --- >> Note: >> 1) Once this has been merged, the 2 commits adding QCA device entries to >> drivers/usb/core/quirks.c should be reverted or dropped from bluetooth-next. >> 2) I don't have any of the affected devices, please test >> --- >> drivers/bluetooth/btusb.c | 22 ++++++++++------------ >> 1 file changed, 10 insertions(+), 12 deletions(-) > > patch has been applied to bluetooth-next tree. I see that you've also dropped the 2 commits adding QCA device entries to drivers/usb/core/quirks.c, great. Thank you. Regards, Hans