Re: [PATCH] Bluetooth: Check scan state before disabling during suspend

2020-06-01 Thread Abhishek Pandit-Subedi
/* Mark task needing completion */ > set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks); > -- > 2.27.0.rc2.251.g90737beb825-goog > Reviewed-by: Abhishek Pandit-Subedi

Re: [PATCH v2] Bluetooth: hci_qca: Enable WBS support for wcn3991

2020-05-18 Thread Abhishek Pandit-Subedi
are for WCN3991 in linux-firmware: > >1a8b0dc00f77 (qca: Enable transparent WBS for WCN3991) > > > > Signed-off-by: Abhishek Pandit-Subedi > > --- > > > > Changes in v2: > > - Rename struct to qca_capabilities and fix enum naming > > > > drivers/b

[PATCH] Revert "Bluetooth: btusb: Disable runtime suspend on Realtek devices"

2020-07-29 Thread Abhishek Pandit-Subedi
to enable autosuspend on working systems so it should be reverted. Disabling autosuspend should be done via module param or udev in userspace instead. Signed-off-by: Abhishek Pandit-Subedi --- We have a few Chromebooks using the RTL 8822CE part over USB and they are running without problems with

[PATCH] Bluetooth: hci_qca: Fix uninitialized access to hdev

2020-05-20 Thread Abhishek Pandit-Subedi
hdev is always allocated and not only when power control is required. Reported-by: Dan Carpenter Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/hci_qca.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth

Re: [PATCH 0/3] Bluetooth: Emit events for suspend/resume

2020-08-18 Thread Abhishek Pandit-Subedi
. finding spurious wakes due to BT in suspend stress tests, asserting that wakeup from peers occurred as expected in tests) Abhishek On Tue, Aug 4, 2020 at 10:11 AM Abhishek Pandit-Subedi wrote: > > Hi, > > Gentle reminder that this is waiting for feedback. Related userspace > chan

Re: [PATCH v1] Bluetooth: Set missing suspend task bits

2020-12-21 Thread Abhishek Pandit-Subedi
etion handler. Thanks, Abhishek On Mon, Dec 21, 2020 at 6:35 AM Dmitry Osipenko wrote: > > 04.12.2020 06:14, Howard Chung пишет: > > From: Abhishek Pandit-Subedi > > > > When suspending, mark SUSPEND_SCAN_ENABLE and SUSPEND_SCAN_DISABLE tasks > > correctly when either

[PATCH] Bluetooth: btrtl: Enable central-peripheral role

2020-12-22 Thread Abhishek Pandit-Subedi
Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/btrtl.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 94df4e94999d5c8..1abf6a4d672734f 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers

[PATCH] Bluetooth: btrtl: Add null check in setup

2020-12-22 Thread Abhishek Pandit-Subedi
l role) Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/btrtl.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 1abf6a4d672734f..978f3c773856b05 100644 --- a/drivers/bluetooth/b

[PATCH 1/1] Bluetooth: Remove hci_req_le_suspend_config

2020-12-07 Thread Abhishek Pandit-Subedi
in Michaud Signed-off-by: Abhishek Pandit-Subedi --- net/bluetooth/hci_request.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 71bffd745472043..5aa7bd5030a218c 100644 --- a/net

[PATCH 0/1] Bluetooth: Further improvements for suspend tasks

2020-12-07 Thread Abhishek Pandit-Subedi
ernel/git/bluetooth/bluetooth-next.git/commit/?id=36afe87ac10fd71f98c40ccf9923b83e0d3fab68 This fix was tested after reverting all our local patches, applying the upstream patches and this patch on top. Thanks Abhishek Abhishek Pandit-Subedi (1): Bluetooth: Remove hci_req_le_suspend_config

Re: [PATCH] Bluetooth: btrtl: Enable WBS for the specific Realtek devices

2021-01-18 Thread Abhishek Pandit-Subedi
Hi Max, On Mon, Jan 18, 2021 at 3:28 AM wrote: > > From: Max Chou > > By this change, it will enable WBS supported on the specific Realtek BT > devices, such as RTL8822C and RTL8852A. > In the future, it's able to maintain what the Realtek devices support WBS > here. > > Tested-by: Hilda Wu > S

[PATCH 2/3] Bluetooth: btusb: Trigger gpio reset quicker

2021-01-19 Thread Abhishek Pandit-Subedi
flight so they recommend resetting on the third failed command). Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Daniel Winkler --- drivers/bluetooth/btusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers

[PATCH 3/3] Bluetooth: btusb: Expose reset gpio to debugfs

2021-01-19 Thread Abhishek Pandit-Subedi
If btusb has a reset gpio, expose it to userspace so we can toggle the reset gpio directly. This is useful for testing and error recovery. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou --- drivers/bluetooth/btusb.c | 46 +++ 1 file

[PATCH 1/3] Bluetooth: btusb: Refactor gpio reset

2021-01-19 Thread Abhishek Pandit-Subedi
Refactor gpio reset to use a common gpio reset function. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou --- drivers/bluetooth/btusb.c | 59 +-- 1 file changed, 19 insertions(+), 40 deletions(-) diff --git a/drivers/bluetooth/btusb.c b

[PATCH 0/3] Bluetooth: btusb: Expose hw reset to debugfs

2021-01-19 Thread Abhishek Pandit-Subedi
5, etc) in subsequent changes. Thanks Abhishek Abhishek Pandit-Subedi (3): Bluetooth: btusb: Refactor gpio reset Bluetooth: btusb: Trigger gpio reset quicker Bluetooth: btusb: Expose reset gpio to debugfs drivers/bluetooth/btusb.c | 107 +++--- 1 file c

[PATCH v3 0/1] Bluetooth: Suspend improvements

2021-03-03 Thread Abhishek Pandit-Subedi
tests). Thanks Abhishek Changes in v3: * Minor change to if statement Changes in v2: * Removed hci_dev_lock from hci_cc_set_event_filter since flags are set/cleared atomically Abhishek Pandit-Subedi (1): Bluetooth: Remove unneeded commands for suspend include/net/bluetooth/hci.h | 1 + net

[PATCH v3 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Abhishek Pandit-Subedi
er to clear the event filter. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka Reviewed-by: Alain Michaud --- Changes in v3: * Minor change to if statement Changes in v2: * Removed hci_dev_lock from hci_cc_set_event_filter since flags are set/cleared atomically include/net/blue

[PATCH 0/3] Bluetooth: Power down controller when suspending

2020-11-18 Thread Abhishek Pandit-Subedi
h_AdapterSRHealth (basic suite) - bluetooth_AdapterSRHealth.sr_reconnect_classic_hid_stress - bluetooth_AdapterSRHealth.sr_reconnect_le_hid_stress Thanks, Abhishek Abhishek Pandit-Subedi (3): Bluetooth: Rename and move clean_up_hci_state Bluetooth: Add quirk to power down on suspend Bluetooth

[PATCH 1/3] Bluetooth: Rename and move clean_up_hci_state

2020-11-18 Thread Abhishek Pandit-Subedi
Rename clean_up_hci_state and move to the core header so that we can power down the controller from within the kernel rather than just via mgmt commands. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Daniel Winkler Reviewed-by: Miao-chen Chou --- include/net/bluetooth/hci_core.h | 2

[PATCH 3/3] Bluetooth: btmrvl_sdio: Power down when suspending

2020-11-18 Thread Abhishek Pandit-Subedi
meter, power_down_suspend (which defaults to false). Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/btmrvl_sdio.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 33d58b30c5acfc..e2e4917b4fe589 100644

[PATCH 2/3] Bluetooth: Add quirk to power down on suspend

2020-11-18 Thread Abhishek Pandit-Subedi
Some older controllers fail to enter a quiescent state reliably when supporting remote wake. For those cases, add a quirk that will power down the controller when suspending and power it back up when resuming. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou --- include/net

Re: [PATCH 0/3] Bluetooth: Power down controller when suspending

2020-11-24 Thread Abhishek Pandit-Subedi
Hi Marcel, On Mon, Nov 23, 2020 at 3:46 AM Marcel Holtmann wrote: > > Hi Abhishek, > > > This patch series adds support for a quirk that will power down the > > Bluetooth controller when suspending and power it back up when resuming. > > > > On Marvell SDIO Bluetooth controllers (SD8897 and SD89

Re: [PATCH 0/3] Bluetooth: Power down controller when suspending

2020-11-24 Thread Abhishek Pandit-Subedi
Re-send to NXP email addresses for Chin-Ran Lo and Amitkumar Karwar (Marvell wireless IP acquired by NXP) On Tue, Nov 24, 2020 at 11:02 AM Abhishek Pandit-Subedi wrote: > > Hi Marcel, > > > On Mon, Nov 23, 2020 at 3:46 AM Marcel Holtmann wrote: > > > > Hi Abhishek,

[PATCH] Bluetooth: Pause service discovery for suspend

2020-12-17 Thread Abhishek Pandit-Subedi
Just like MGMT_OP_START_DISCOVERY, we should reject MGMT_OP_START_SERVICE_DISCOVERY with MGMT_STATUS_BUSY when we are paused for suspend. Signed-off-by: Abhishek Pandit-Subedi --- On ChromeOS, we started getting reports of scanning failing after resuming from suspend. The root cause was that

[PATCH 1/2] Bluetooth: Notify suspend on le conn failed

2021-03-01 Thread Abhishek Pandit-Subedi
spend thread when that is the case. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- Here is an HCI trace when the issue occurred. < HCI Command: LE Create Connection (0x08|0x000d) plen 25 #18 [hci0] 2021-02-03 21:42:35.130208

[PATCH 0/2] Bluetooth: Suspend improvements

2021-03-01 Thread Abhishek Pandit-Subedi
tests). Thanks Abhishek Abhishek Pandit-Subedi (2): Bluetooth: Notify suspend on le conn failed Bluetooth: Remove unneeded commands for suspend include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_conn.c| 10 + net/bluetooth/hci_event.c | 31 ++ net

[PATCH 2/2] Bluetooth: Remove unneeded commands for suspend

2021-03-01 Thread Abhishek Pandit-Subedi
er to clear the event filter. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka Reviewed-by: Alain Michaud --- include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_event.c | 31 ++ net/bluetooth/hci_request.c | 44 +++-- 3

[PATCH v2 0/1] Bluetooth: Suspend improvements

2021-03-02 Thread Abhishek Pandit-Subedi
tests). Thanks Abhishek Changes in v2: * Removed hci_dev_lock from hci_cc_set_event_filter since flags are set/cleared atomically Abhishek Pandit-Subedi (1): Bluetooth: Remove unneeded commands for suspend include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_event.c | 24

[PATCH v2 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-02 Thread Abhishek Pandit-Subedi
er to clear the event filter. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka Reviewed-by: Alain Michaud --- Changes in v2: * Removed hci_dev_lock from hci_cc_set_event_filter since flags are set/cleared atomically include/net/bluetooth/hci.h | 1 + net/bluetooth/hci_event.c

Re: [PATCH v2] Bluetooth: btrtl: Enable WBS for the specific Realtek devices

2021-01-21 Thread Abhishek Pandit-Subedi
e. > > Tested-by: Hilda Wu > Reviewed-by: Abhishek Pandit-Subedi > Signed-off-by: Max Chou > > --- > v2: > - edit the null check > --- > drivers/bluetooth/btrtl.c | 28 > 1 file changed, 24 insertions(+), 4 deletions(-) > > d

Re: [PATCH v3] Bluetooth: btrtl: Enable WBS for the specific Realtek devices

2021-01-21 Thread Abhishek Pandit-Subedi
Thanks Max. Patch v3 looks good to me. Reviewed-by: Abhishek Pandit-Subedi On Thu, Jan 21, 2021 at 5:59 PM wrote: > > From: Max Chou > > By this change, it will enable WBS supported on the specific Realtek BT > devices, such as RTL8822C and RTL8852A. > In the future, it&

[PATCH v2] Bluetooth: btrtl: Add null check in setup

2021-01-05 Thread Abhishek Pandit-Subedi
l role) Signed-off-by: Abhishek Pandit-Subedi --- Changes in v2: - Added nullcheck with goto done drivers/bluetooth/btrtl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 1abf6a4d6727..24f03a1f8d57 100644 --- a/drivers/blu

[PATCH 0/2] Reset realtek bluetooth devices during user suspend

2019-09-17 Thread Abhishek Pandit-Subedi
observe a detach + reattach on resume). Abhishek Pandit-Subedi (2): usb: support suspend_noirq Bluetooth: btusb: Reset realtek devices on user suspend drivers/bluetooth/btusb.c | 26 ++ drivers/usb/core/driver.c | 56 +++ drivers/usb/core

[PATCH 1/2] usb: support suspend_noirq

2019-09-17 Thread Abhishek Pandit-Subedi
reset in suspend, it disconnects, the resume is never called e.g. Desirable new behavior: bluetooth driver asserts reset in suspend_noirq, device doesn't disconnect, resume is called where power is restored and usb disconnects and reconnects device Signed-off-by: Abhishek Pandit-Subedi --- dr

[PATCH 2/2] Bluetooth: btusb: Reset realtek devices on user suspend

2019-09-17 Thread Abhishek Pandit-Subedi
Reset realtek devices on user suspend if not configured as a wakeup source. Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/btusb.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index

Re: [PATCH 0/2] Reset realtek bluetooth devices during user suspend

2019-09-18 Thread Abhishek Pandit-Subedi
Sorry, last reply went out with HTML. Re-sending in plain text. On Wed, Sep 18, 2019 at 7:23 AM Alan Stern wrote: > > On Tue, 17 Sep 2019, Abhishek Pandit-Subedi wrote: > > > On a Realtek USB bluetooth device, I wanted a simple and consistent way > > to put the device in re

Re: [PATCH 0/2] Reset realtek bluetooth devices during user suspend

2019-09-26 Thread Abhishek Pandit-Subedi
On Wed, Sep 18, 2019 at 11:51 AM Alan Stern wrote: > > On Wed, 18 Sep 2019, Abhishek Pandit-Subedi wrote: > > > Sorry, last reply went out with HTML. Re-sending in plain text. > > > > On Wed, Sep 18, 2019 at 7:23 AM Alan Stern > > wrote: > > > > &g

[PATCH 0/3] Bluetooth: btmrvl_sdio: Refactor remote wakeup support

2020-06-10 Thread Abhishek Pandit-Subedi
omated and manual suspend+resume tests that make sure wakeup is working properly. Thanks Abhishek Abhishek Pandit-Subedi (3): Bluetooth: btmrvl_sdio: Set parent dev to hdev Bluetooth: btmrvl_sdio: Implement prevent_wake Bluetooth: btmrvl_sdio: Refactor irq wakeup drivers/bluetooth/btm

[PATCH 3/3] Bluetooth: btmrvl_sdio: Refactor irq wakeup

2020-06-10 Thread Abhishek Pandit-Subedi
Use device_init_wakeup to allow the Bluetooth dev to wake the system from suspend. Currently, the device can wake the system but no power/wakeup entry is created in sysfs to allow userspace to disable wakeup. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson --- drivers

[PATCH 1/3] Bluetooth: btmrvl_sdio: Set parent dev to hdev

2020-06-10 Thread Abhishek Pandit-Subedi
/mmc1:0001:2/bluetooth/hci0 Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson --- drivers/bluetooth/btmrvl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 708ad21683eb31..47e450903af423 100644

[PATCH 2/3] Bluetooth: btmrvl_sdio: Implement prevent_wake

2020-06-10 Thread Abhishek Pandit-Subedi
Use the parent device's power/wakeup to control whether we support remote wake. If remote wakeup is disabled, Bluetooth will not enable scanning for incoming connections. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson --- drivers/bluetooth/btmrvl_main.c | 9 +++

[PATCH] ARM: dts: rockchip: Add marvell BT irq config

2020-06-10 Thread Abhishek Pandit-Subedi
Veyron Jaq and Mighty both use the Marvel 8897 WiFi+BT chip. Add wakeup and pinctrl block to devicetree so the btmrvl driver can correctly configure the wakeup interrupt. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Reviewed-by: Douglas Anderson --- The Veyron Mighty Chromebook (rk3288

Re: [PATCH v2] bluetooth: hci_qca: Fix QCA6390 memdump failure

2020-05-27 Thread Abhishek Pandit-Subedi
Hi Zijun, On Tue, May 26, 2020 at 8:37 PM Zijun Hu wrote: > > QCA6390 memdump VSE sometimes come to bluetooth driver > with wrong sequence number as illustrated as follows: > frame # in DEC: frame data in HEX > 1396: ff fd 01 08 74 05 00 37 8f 14 > 1397: ff fd 01 08 75 05 00 ff bf 38 > 1414: ff f

[PATCH] Bluetooth: btusb: Reset port on cmd timeout

2020-06-24 Thread Abhishek Pandit-Subedi
QCA_ROME doesn't have support for the reset gpio but sometimes gets into a state where it is unresponsive to commands. When this happens, reset the port to attempt to revive the chip. Signed-off-by: Abhishek Pandit-Subedi --- On Chromebooks with this chipset, we encountered cmd_timeout

[PATCH v2] Bluetooth: btusb: Reset port on cmd timeout

2020-06-24 Thread Abhishek Pandit-Subedi
QCA_ROME sometimes gets into a state where it is unresponsive to commands. Since it doesn't have support for a reset gpio, reset the usb port when this occurs instead. Signed-off-by: Abhishek Pandit-Subedi --- On Chromebooks with this chipset, we encountered cmd_timeout after running su

[PATCH] Bluetooth: btusb: BTUSB_WAKEUP_DISABLE prevents wake

2020-06-24 Thread Abhishek Pandit-Subedi
When the BTUSB_WAKEUP_DISABLE flag is set, always return true for prevent wake. This tells the suspend notifier not to prepare the controller for reconnections during suspend. Signed-off-by: Abhishek Pandit-Subedi --- Realtek chipsets currently lose their firmware when suspending (except in

[PATCH] Bluetooth: Don't restart scanning if paused

2020-06-24 Thread Abhishek Pandit-Subedi
When restarting LE scanning, check if it's currently paused before enabling passive scanning. Signed-off-by: Abhishek Pandit-Subedi --- When running suspend stress tests on Chromebooks, we discovered instances where the Chromebook didn't enter the deepest idle states (i.e. S0ix).

[PATCH 0/1] power: Emit change uevent when updating sysfs

2020-06-24 Thread Abhishek Pandit-Subedi
luetooth) KERNEL[36.417447] add /devices/pci:00/:00:15.0/usb1/1-3/1-3:1.0/bluetooth/hci0/rfkill2 (rfkill) KERNEL[36.417481] add /devices/pci:00/:00:15.0/usb1/1-3/1-3:1.1 (usb) Thanks Abhishek Abhishek Pandit-Subedi (1): power: Emit changed uevent on wakeup_sysfs_add/remov

[PATCH 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-06-24 Thread Abhishek Pandit-Subedi
nable to emit a changed event when adding or removing attributes on the device. Signed-off-by: Abhishek Pandit-Subedi --- drivers/base/power/sysfs.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c

Re: [PATCH v2] Bluetooth: btusb: Reset port on cmd timeout

2020-06-25 Thread Abhishek Pandit-Subedi
Thanks for the heads up Oliver -- I will send a patch with a comment on this. On Thu, Jun 25, 2020 at 3:22 AM Oliver Neukum wrote: > > Am Mittwoch, den 24.06.2020, 11:11 -0700 schrieb Abhishek Pandit- > Subedi: > > QCA_ROME sometimes gets into a state where it is unresponsive

[PATCH] Bluetooth: btusb: Comment on unbalanced pm reference

2020-06-25 Thread Abhishek Pandit-Subedi
Add a comment clarifying that a PM reference in btusb_qca_cmd_timeout is not unbalanced because it results in a device reset. Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth

Re: [PATCH v2 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
Hi Greg, On Tue, Jul 7, 2020 at 7:29 AM Greg Kroah-Hartman wrote: > > On Mon, Jul 06, 2020 at 02:07:17PM -0700, Abhishek Pandit-Subedi wrote: > > Udev rules that depend on the power/wakeup attribute don't get triggered > > correctly if device_set_wakeup_capable is cal

[PATCH v3 0/1] power: Emit change uevent when updating sysfs

2020-07-07 Thread Abhishek Pandit-Subedi
nd of bt_dev_err Abhishek Pandit-Subedi (1): power: Emit changed uevent on wakeup_sysfs_add/remove drivers/base/power/sysfs.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.27.0.212.ge8ba1cc988-goog

[PATCH v3 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
nable to emit a changed event when adding or removing attributes on the device. Signed-off-by: Abhishek Pandit-Subedi --- Changes in v3: - Simplified error handling Changes in v2: - Add newline at end of bt_dev_err drivers/base/power/sysfs.c | 9 - 1 file changed, 8 insertions(+), 1 del

Re: [PATCH v3 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
Abhishek On Tue, Jul 7, 2020 at 9:00 AM Greg Kroah-Hartman wrote: > > On Tue, Jul 07, 2020 at 08:49:05AM -0700, Abhishek Pandit-Subedi wrote: > > Udev rules that depend on the power/wakeup attribute don't get triggered > > correctly if device_set_wakeup_capable is called a

[PATCH v4 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
nable to emit a changed event when adding or removing attributes on the device. Signed-off-by: Abhishek Pandit-Subedi --- Changes in v4: - Fix warning where returning from void and tested on device Changes in v3: - Simplified error handling Changes in v2: - Add newline at end of bt_dev_err dr

[PATCH v4 0/1] power: Emit change uevent when updating sysfs

2020-07-07 Thread Abhishek Pandit-Subedi
-3:1.1 (usb) Thanks Abhishek Changes in v4: - Fix warning where returning from void and tested on device Changes in v3: - Simplified error handling Changes in v2: - Add newline at end of bt_dev_err Abhishek Pandit-Subedi (1): power: Emit changed uevent on wakeup_sysfs_add/remove drivers/b

Re: [PATCH v4 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
Built and tested on Chromebook w/ 5.4 kernel. Sorry about the churn -- will start building with warnings = errors before I send patches upstream. Thanks Abhishek On Tue, Jul 7, 2020 at 9:24 AM Abhishek Pandit-Subedi wrote: > > Udev rules that depend on the power/wakeup attribute don

Re: [PATCH v4 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
Hi Rafael, (resent in plain text) On Tue, Jul 7, 2020 at 9:28 AM Rafael J. Wysocki wrote: > > On Tue, Jul 7, 2020 at 6:24 PM Abhishek Pandit-Subedi > wrote: > > > > Udev rules that depend on the power/wakeup attribute don't get triggered > > correctly if dev

Re: [PATCH v4 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
Sounds good to me. Patch v5 incoming after compile-test. Thanks Abhishek On Tue, Jul 7, 2020 at 10:16 AM Rafael J. Wysocki wrote: > > On Tue, Jul 7, 2020 at 6:48 PM Abhishek Pandit-Subedi > wrote: > > > > Hi Rafael, > > > > (resent in plain text) > > >

[PATCH v5 0/1] power: Emit change uevent when updating sysfs

2020-07-07 Thread Abhishek Pandit-Subedi
-3:1.1 (usb) Thanks Abhishek Changes in v5: - Ignore return from kobject_uevent when adding to sysfs Changes in v4: - Fix warning where returning from void and tested on device Changes in v3: - Simplified error handling Changes in v2: - Add newline at end of bt_dev_err Abhishek Pandit-Subedi (1):

[PATCH v5 1/1] power: Emit changed uevent on wakeup_sysfs_add/remove

2020-07-07 Thread Abhishek Pandit-Subedi
nable to emit a changed event when adding or removing attributes on the device. Signed-off-by: Abhishek Pandit-Subedi --- Changes in v5: - Ignore return from kobject_uevent when adding to sysfs Changes in v4: - Fix warning where returning from void and tested on device Changes in v3: - Simpl

[PATCH v2] ARM: dts: rockchip: Add marvell BT irq config

2020-06-12 Thread Abhishek Pandit-Subedi
Veyron Jaq and Mighty both use the Marvel 8897 WiFi+BT chip. Add wakeup and pinctrl block to devicetree so the btmrvl driver can correctly configure the wakeup interrupt. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Reviewed-by: Douglas Anderson --- The Veyron Mighty Chromebook (rk3288

Re: [PATCH v1] Bluetooth: hci_qca: Enhance retry logic in qca_setup

2020-10-06 Thread Abhishek Pandit-Subedi
Reviewed-by: Abhishek Pandit-Subedi On Mon, Oct 5, 2020 at 11:33 PM Balakrishna Godavarthi wrote: > > Currently driver only retries to download FW if FW downloading > is failed. Sometimes observed command timeout for version request > command, if this happen on some platforms duri

Re: [PATCH v1] Bluetooth: hci_qca: Wait for timeout during suspend

2020-10-06 Thread Abhishek Pandit-Subedi
Reviewed-by: Abhishek Pandit-Subedi On Tue, Oct 6, 2020 at 8:20 AM Balakrishna Godavarthi wrote: > > From: Venkata Lakshmi Narayana Gubba > > Currently qca_suspend() is relied on IBS mechanism. During > FW download and memory dump collections, IBS will be disabled. > In t

[PATCH] Bluetooth: btqca: Add valid le states quirk

2020-09-30 Thread Abhishek Pandit-Subedi
WCN3991 supports connectable advertisements so we need to add the valid le states quirk so the 'central-peripheral' role is exposed in userspace. Signed-off-by: Abhishek Pandit-Subedi --- Example result showing the central-peripheral role correctly. localhost # bluetoothctl show Con

[PATCH] Bluetooth: Clear suspend tasks on unregister

2020-08-26 Thread Abhishek Pandit-Subedi
While unregistering, make sure to clear the suspend tasks before cancelling the work. If the unregister is called during resume from suspend, this will unnecessarily add 2s to the resume time otherwise. Signed-off-by: Abhishek Pandit-Subedi --- This was discovered with RT8822CE using the btusb

[PATCH] Bluetooth: Clear suspend tasks on unregister

2020-08-26 Thread Abhishek Pandit-Subedi
While unregistering, make sure to clear the suspend tasks before cancelling the work. If the unregister is called during resume from suspend, this will unnecessarily add 2s to the resume time otherwise. Fixes: 4e8c36c3b0d73d (Bluetooth: Fix suspend notifier race) Signed-off-by: Abhishek Pandit

Re: [PATCH] Bluetooth: Clear suspend tasks on unregister

2020-08-26 Thread Abhishek Pandit-Subedi
Please disregard this earlier email without the Fixes tag. On Wed, Aug 26, 2020 at 3:26 PM Abhishek Pandit-Subedi wrote: > > While unregistering, make sure to clear the suspend tasks before > cancelling the work. If the unregister is called during resume from > suspend, this will u

[PATCH] Bluetooth: hci_h5: Add driver capabilities for RTL8822CS

2020-10-09 Thread Abhishek Pandit-Subedi
822CS capabilities to show it supports wideband speech and has valid le states (allows central peripheral role). Signed-off-by: Abhishek Pandit-Subedi --- drivers/bluetooth/hci_h5.c | 53 +++--- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/drivers/blue

Re: [PATCH v2] bluetooth: hci_qca: Fix QCA6390 memdump failure

2020-05-28 Thread Abhishek Pandit-Subedi
Hi, On Wed, May 27, 2020 at 11:19 PM Zijun Hu wrote: > > > > On 5/28/2020 11:42 AM, Abhishek Pandit-Subedi wrote: > > Hi Zijun, > > > > On Tue, May 26, 2020 at 8:37 PM Zijun Hu wrote: > >> > >> QCA6390 memdump VSE sometimes come to bluetooth drive

[PATCH] Bluetooth: Allow suspend even when preparation has failed

2020-06-03 Thread Abhishek Pandit-Subedi
the suspend timeout. Signed-off-by: Abhishek Pandit-Subedi --- To verify this is properly working, I added an additional change to hci_suspend_wait_event to always return -16. This validates that suspend continues even when an error has occurred during the suspend preparation. Example on

[PATCH v2] Bluetooth: Allow suspend even when preparation has failed

2020-06-04 Thread Abhishek Pandit-Subedi
the suspend timeout. Fixes: dd522a7429b07e ("Bluetooth: Handle LE devices during suspend") Reported-by: Len Brown Signed-off-by: Abhishek Pandit-Subedi --- To verify this is properly working, I added an additional change to hci_suspend_wait_event to always return -16. This validates th

Re: [PATCH] Bluetooth: Allow suspend even when preparation has failed

2020-06-04 Thread Abhishek Pandit-Subedi
Sent a v2 with proper fixes and reported-by tags. Thanks Abhishek On Thu, Jun 4, 2020 at 3:46 AM Rafael J. Wysocki wrote: > > On Wed, Jun 3, 2020 at 10:22 PM Abhishek Pandit-Subedi > wrote: > > > > It is preferable to allow suspend even when Bluetooth has problems > >

Re: [PATCH v1] Bluetooth: hci_qca: Fix double free during SSR timeout

2020-06-04 Thread Abhishek Pandit-Subedi
Hi, On Thu, Jun 4, 2020 at 6:59 AM Venkata Lakshmi Narayana Gubba wrote: > > Due to race conditions between qca_hw_error and qca_controller_memdump > during SSR timeout,the same pointer is freed twice. Which results to > double free error. Now a lock is acquired while SSR state moved to timeout.

Re: [PATCH 1/3] Bluetooth: hci_qca: Only remove TX clock vote after TX is completed

2020-06-05 Thread Abhishek Pandit-Subedi
EP, > msecs_to_jiffies(IBS_BTSOC_TX_IDLE_TIMEOUT_MS)); > > - if (ret > 0) > + if (ret > 0) { > + qca_wq_serial_tx_clock_vote_off(&qca->ws_tx_vote_off); > return 0; > + } > > if (ret == 0) > ret = -ETIMEDOUT; > -- > 2.27.0.278.ge193c7cf3a9-goog > I checked the order of calls and it looks correct per commit message. Reviewed-by: Abhishek Pandit-Subedi

Re: [PATCH 2/3] Bluetooth: hci_qca: Skip serdev wait when no transfer is pending

2020-06-05 Thread Abhishek Pandit-Subedi
Reviewed-by: Abhishek Pandit-Subedi On Fri, Jun 5, 2020 at 11:46 AM Matthias Kaehlcke wrote: > > qca_suspend() calls serdev_device_wait_until_sent() regardless of > whether a transfer is pending. While it does no active harm since > the function should return immediately it makes t

Re: [PATCH 3/3] Bluetooth: hci_qca: Refactor error handling in qca_suspend()

2020-06-05 Thread Abhishek Pandit-Subedi
Reviewed-by: Abhishek Pandit-Subedi On Fri, Jun 5, 2020 at 11:46 AM Matthias Kaehlcke wrote: > > If waiting for IBS sleep times out jump to the error handler, this is > easier to read than multiple 'if' branches and a fall through to the > error handler. > > Sign

[PATCH v3] Bluetooth: Allow suspend even when preparation has failed

2020-06-05 Thread Abhishek Pandit-Subedi
the suspend timeout. Fixes: dd522a7429b07e ("Bluetooth: Handle LE devices during suspend") Reported-by: Len Brown Signed-off-by: Abhishek Pandit-Subedi --- To verify this is properly working, I added an additional change to hci_suspend_wait_event to always return -16. This validates th

[PATCH] Bluetooth: hci_qca: Enable WBS support for wcn3991

2020-05-13 Thread Abhishek Pandit-Subedi
WCN3991 supports transparent WBS (host encoded mSBC). Add a flag to the device match data to show WBS is supported. This requires the matching firmware for WCN3991 in linux-firmware: 1a8b0dc00f77 (qca: Enable transparent WBS for WCN3991) Signed-off-by: Abhishek Pandit-Subedi

Re: [PATCH] Bluetooth: hci_qca: Enable WBS support for wcn3991

2020-05-14 Thread Abhishek Pandit-Subedi
Hi, On Thu, May 14, 2020 at 9:30 AM Matthias Kaehlcke wrote: > > Hi Abhishek, > > On Wed, May 13, 2020 at 08:41:25PM -0700, Abhishek Pandit-Subedi wrote: > > WCN3991 supports transparent WBS (host encoded mSBC). Add a flag to the > > device match data to show WBS is s

[PATCH v2] Bluetooth: hci_qca: Enable WBS support for wcn3991

2020-05-14 Thread Abhishek Pandit-Subedi
WCN3991 supports transparent WBS (host encoded mSBC). Add a flag to the device match data to show WBS is supported. This requires the matching firmware for WCN3991 in linux-firmware: 1a8b0dc00f77 (qca: Enable transparent WBS for WCN3991) Signed-off-by: Abhishek Pandit-Subedi

Re: [PATCH] Bluetooth: Clear suspend tasks on unregister

2020-08-31 Thread Abhishek Pandit-Subedi
y add 2s to the resume time otherwise. > > > > Fixes: 4e8c36c3b0d73d (Bluetooth: Fix suspend notifier race) > > Signed-off-by: Abhishek Pandit-Subedi > > --- > > This was discovered with RT8822CE using the btusb driver. This chipset > > will reset on resume dur

[PATCH v2] Bluetooth: Clear suspend tasks on unregister

2020-08-31 Thread Abhishek Pandit-Subedi
While unregistering, make sure to clear the suspend tasks before cancelling the work. If the unregister is called during resume from suspend, this will unnecessarily add 2s to the resume time otherwise. Fixes: 4e8c36c3b0d73d (Bluetooth: Fix suspend notifier race) Signed-off-by: Abhishek Pandit

Re: [PATCH 0/3] Bluetooth: Emit events for suspend/resume

2020-08-04 Thread Abhishek Pandit-Subedi
Hi, Gentle reminder that this is waiting for feedback. Related userspace changes are here to see how we plan on using it: https://patchwork.kernel.org/project/bluetooth/list/?series=325777 Thanks Abhishek On Tue, Jul 28, 2020 at 6:42 PM Abhishek Pandit-Subedi wrote: > > > Hi Marcel,

[PATCH] bluetooth: Set ext scan response only when it exists

2020-08-14 Thread Abhishek Pandit-Subedi
Data length: 0x0d Name (short): Chromebook > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1 Status: Invalid HCI Command Parameters (0x12) Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Daniel Winkler --- net

[PATCH] Bluetooth: Only mark socket zapped after unlocking

2020-08-15 Thread Abhishek Pandit-Subedi
lock: 0xff804410aac0, .magic: , .owner: /-1, .owner_cpu: 0 [ 3465.430332] Causing a watchdog bite! Signed-off-by: Abhishek Pandit-Subedi Reported-by: Balakrishna Godavarthi Reviewed-by: Manish Mandlik --- We had some more data available (outside of dmesg and oops) that led us to suspect a

Re: Update WCN3991 FW file

2020-10-19 Thread Abhishek Pandit-Subedi
Nack. This resulted in a boot loop on ChromeOS. It looks like only 'crbtfw32.tlv' was changed and not 'crnv32.bin'. Abhishek On Sat, Oct 17, 2020 at 8:33 AM wrote: > > > Hi Team, > > Please include updated firmware bin for WCN3991. > > Snapshot of pull request is as below, let me know if anythi

[PATCH 0/1] kobject: Don't emit change events if not in sysfs

2020-10-19 Thread Abhishek Pandit-Subedi
s/bus/usb/devices/2-3 > Check class of first interface ... > No access to first interface. Exit I've added a patch to fix the former problem here and confirmed via udevadm monitor that no CHANGE requests are seen for devices before they emit the ADD event. Thanks Abhis

[PATCH 1/1] kobject: Don't emit change events if not in sysfs

2020-10-19 Thread Abhishek Pandit-Subedi
nt on wakeup_sysfs_add/remove) Signed-off-by: Abhishek Pandit-Subedi --- lib/kobject_uevent.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 7998affa45d49a..f08197e907d5ce 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c @@ -473,6 +4

Re: Update WCN3991 FW file

2020-10-20 Thread Abhishek Pandit-Subedi
It looks like we hadn't merged an earlier update to crnv32.bin in ChromeOS: ad1da95 - QCA : Updated firmware files for WCN3991 (3 weeks ago) After merging that commit, everything is working as expected. -- Tested-by: Abhishek Pandit-Subedi On Mon, Oct 19, 2020 at 2:37 PM Abhishek P

Re: [PATCH 1/1] kobject: Don't emit change events if not in sysfs

2020-10-20 Thread Abhishek Pandit-Subedi
ged. Please consider this patch abandoned. Abhishek On Mon, Oct 19, 2020 at 10:56 PM Greg Kroah-Hartman wrote: > > On Mon, Oct 19, 2020 at 03:32:57PM -0700, Abhishek Pandit-Subedi wrote: > > Add a check to make sure the kobj is created and in sysfs before sending > > a change eve

Re: [PATCH v1] Bluetooth: hci_qca: Handle spurious wakeup from SoC

2020-11-16 Thread Abhishek Pandit-Subedi
Hi Venkata, I think this code would be simplified by using a delayed_work struct instead of a timer. Based on your commit description: On Sun, Nov 15, 2020 at 9:59 AM Venkata Lakshmi Narayana Gubba wrote: > > Added timer to handle spurious wakeup from SoC. > Timer is started when wake indicator

Re: [power] 47b918cf9a: kmsg.power_supply_ADP1:Error_in_uevent_for_wakeup_sysfs_add

2020-07-14 Thread Abhishek Pandit-Subedi
; > Greeting, > > FYI, we noticed the following commit (built with gcc-9): > > commit: 47b918cf9a1d2b6e36706fd2be2b91e65f490146 ("[PATCH v2 1/1] power: Emit > changed uevent on wakeup_sysfs_add/remove") > url: > https://github.com/0day-ci/linux/commits/Abhis

[PATCH] Bluetooth: Fix suspend notifier race

2020-07-27 Thread Abhishek Pandit-Subedi
Unregister from suspend notifications and cancel suspend preparations before running hci_dev_do_close. Otherwise, the suspend notifier may race with unregister and cause cmd_timeout even after hdev has been freed. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou --- Hi Marcel

[PATCH v2] Bluetooth: Fix suspend notifier race

2020-07-28 Thread Abhishek Pandit-Subedi
[ 832.751147] kthread+0x138/0x140 [ 832.754377] ? pr_cont_work+0x58/0x58 [ 832.758037] ? kthread_blkcg+0x2e/0x2e [ 832.761787] ret_from_fork+0x22/0x40 [ 832.846191] ---[ end trace fa93f466da517212 ]--- Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou --- Hi Marcel, This

Re: [PATCH v2] Bluetooth: Fix suspend notifier race

2020-07-28 Thread Abhishek Pandit-Subedi
I sent this a bit too quick without a Fixes tag. Please disregard. v3 coming up. On Tue, Jul 28, 2020 at 9:53 AM Abhishek Pandit-Subedi wrote: > > Unregister from suspend notifications and cancel suspend preparations > before running hci_dev_do_close. Otherwise, the suspend notifier m

[PATCH v3] Bluetooth: Fix suspend notifier race

2020-07-28 Thread Abhishek Pandit-Subedi
t;) Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou --- Hi Marcel, This fixes a race between hci_unregister_dev and the suspend notifier. The suspend notifier handler seemed to be scheduling commands even after it was cleaned up and this was resulting in a panic in cmd_timeou

[PATCH 3/3] Bluetooth: Emit controller suspend and resume events

2020-07-28 Thread Abhishek Pandit-Subedi
spend state: Page scanning and/or passive scanning (2) @ MGMT Event: Controller Resumed (0x002e) plen 8 Wake reason: Remote wake due to peer device connection (2) LE Address: CD:F3:CD:13:C5:9A (OUI CD-F3-CD) Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen

[PATCH 1/3] Bluetooth: Add mgmt suspend and resume events

2020-07-28 Thread Abhishek Pandit-Subedi
Add the controller suspend and resume events, which will signal when Bluetooth has completed preparing for suspend and when it's ready for resume. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Sonny Sasaka --- include/net/bluetooth/hci_core.h

  1   2   >