[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 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 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

[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 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 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 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

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: 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/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 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,

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

[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

[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 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

[RESEND PATCH] Bluetooth: Only mark socket zapped after unlocking

2020-09-11 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

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

2020-09-11 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 v2 2/3] Bluetooth: Add suspend reason for device disconnect

2020-09-11 Thread Abhishek Pandit-Subedi
Update device disconnect event with reason 0x5 to indicate that device disconnected because the controller is suspending. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Sonny Sasaka --- Changes in v2: None include/net/bluetooth/mgmt.h | 1 + net/bluetooth

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

2020-09-11 Thread Abhishek Pandit-Subedi
. Patch for btmon changes: https://patchwork.kernel.org/patch/11743863/ Please take a look. Abhishek Changes in v2: - Added suspend/resume events to list of mgmt events Abhishek Pandit-Subedi (3): Bluetooth: Add mgmt suspend and resume events Bluetooth: Add suspend reason for device disconnect

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

2020-09-11 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 --- Changes in v2: - Added suspend/resume even

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

2020-09-11 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

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

2020-09-11 Thread Abhishek Pandit-Subedi
. Patch for btmon changes: https://patchwork.kernel.org/patch/11743863/ Please take a look. Abhishek Abhishek Pandit-Subedi (3): Bluetooth: Add mgmt suspend and resume events Bluetooth: Add suspend reason for device disconnect Bluetooth: Emit controller suspend and resume events include/net

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

2020-09-11 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

[RESEND PATCH 2/3] Bluetooth: Add suspend reason for device disconnect

2020-09-11 Thread Abhishek Pandit-Subedi
Update device disconnect event with reason 0x5 to indicate that device disconnected because the controller is suspending. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Sonny Sasaka --- include/net/bluetooth/mgmt.h | 1 + net/bluetooth/mgmt.c | 4

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

2020-09-11 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

[PATCH] Bluetooth: Re-order clearing suspend tasks

2020-09-09 Thread Abhishek Pandit-Subedi
Unregister_pm_notifier is a blocking call so suspend tasks should be cleared beforehand. Otherwise, the notifier will wait for completion before returning (and we encounter a 2s timeout on resume). Fixes: 0e9952804ec9c8 (Bluetooth: Clear suspend tasks on unregister) Signed-off-by: Abhishek Pandit

[PATCH] Bluetooth: Re-order clearing suspend tasks

2020-09-09 Thread Abhishek Pandit-Subedi
Unregister_pm_notifier is a blocking call so suspend tasks should be cleared beforehand. Otherwise, the notifier will wait for completion before returning (and we encounter a 2s timeout on resume). Fixes: 0e9952804ec9c8 (Bluetooth: Clear suspend tasks on unregister) Signed-off-by: Abhishek Pandit

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] 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: 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

[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

Request to queue patch for 5.7 and 5.8 stable

2020-08-20 Thread Abhishek Pandit-Subedi
Hi netdev@, Please include upstream commit 6fb00d4e94bc28c39fa077b03e6531956de87802 for release to stable branches 5.7 and 5.8. This fixes a suspend/resume issue on Bluetooth controllers and has been extensively tested on Chromebooks. It's also needed to fix the bug reported at https://bugzilla.k

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

[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

[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

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 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

[PATCH 2/3] Bluetooth: Add suspend reason for device disconnect

2020-07-28 Thread Abhishek Pandit-Subedi
Update device disconnect event with reason 0x5 to indicate that device disconnected because the controller is suspending. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Sonny Sasaka --- include/net/bluetooth/mgmt.h | 1 + net/bluetooth/mgmt.c | 4

[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 0/3] Bluetooth: Emit events for suspend/resume

2020-07-28 Thread Abhishek Pandit-Subedi
. Please take a look. Abhishek Abhishek Pandit-Subedi (3): Bluetooth: Add mgmt suspend and resume events Bluetooth: Add suspend reason for device disconnect Bluetooth: Emit controller suspend and resume events include/net/bluetooth/hci_core.h | 6 +++ include/net/bluetooth/mgmt.h | 16

[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

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 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

[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] 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] Bluetooth: Add hci_dev_lock to get/set device flags

2020-06-19 Thread Abhishek Pandit-Subedi
Adding hci_dev_lock since hci_conn_params_(lookup|add) require this lock. Suggested-by: Miao-chen Chou Signed-off-by: Abhishek Pandit-Subedi --- net/bluetooth/mgmt.c | 8 1 file changed, 8 insertions(+) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 2a732cab1dc99d

[PATCH 2/4] Bluetooth: Replace wakeable list with flag

2020-06-16 Thread Abhishek Pandit-Subedi
Since the classic device list now supports flags, convert the wakeable list into a flag on the existing device list. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net/bluetooth/hci_core.h | 11 ++- net/bluetooth/hci_core.c | 1 - net/bluetooth

[PATCH 1/4] Bluetooth: Add bdaddr_list_with_flags for classic whitelist

2020-06-16 Thread Abhishek Pandit-Subedi
In order to more easily add device flags to classic devices, create a new type of bdaddr_list that supports setting flags. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net/bluetooth/hci_core.h | 18 -- net/bluetooth/hci_core.c | 58

[PATCH 3/4] Bluetooth: Replace wakeable in hci_conn_params

2020-06-16 Thread Abhishek Pandit-Subedi
Replace the wakeable boolean with flags in hci_conn_params and all users of this boolean. This will be used by the get/set device flags mgmt op. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net/bluetooth/hci_core.h | 2 +- net/bluetooth/hci_request.c | 3

[PATCH 4/4] Bluetooth: Add get/set device flags mgmt op

2020-06-16 Thread Abhishek Pandit-Subedi
c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ... @ MGMT Event: Unknown (0x002a) plen 15 {0x0001} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ... Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net

[PATCH 0/4] Bluetooth: Implement get/set device flags and device flags changed

2020-06-16 Thread Abhishek Pandit-Subedi
patches once they're cleaned up). I verified that Add Device generates the Device Flags changed on all mgmt interfaces and Set Device Flags skips the one that requested it. This was tested on a Chromebook running kernel 5.4. Abhishek Abhishek Pandit-Subedi (4): Bluetooth

[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

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 > >

[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

[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

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

[PATCH 0/3] Bluetooth: Prevent scanning when device is not configured for wakeup

2020-05-12 Thread Abhishek Pandit-Subedi
when no `prevent_wake` hook is implemented, we always configure scanning for wake-up. Thanks Abhishek Abhishek Pandit-Subedi (3): Bluetooth: Rename BT_SUSPEND_COMPLETE Bluetooth: Add hook for driver to prevent wake from suspend Bluetooth: btusb: Implement hdev->prevent_wake driver

[PATCH 1/3] Bluetooth: Rename BT_SUSPEND_COMPLETE

2020-05-12 Thread Abhishek Pandit-Subedi
Renamed BT_SUSPEND_COMPLETE to BT_SUSPEND_CONFIGURE_WAKE since it sets up the event filter and whitelist for wake-up. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net/bluetooth/hci_core.h | 2 +- net/bluetooth/hci_core.c | 2 +- net/bluetooth

[PATCH 2/3] Bluetooth: Add hook for driver to prevent wake from suspend

2020-05-12 Thread Abhishek Pandit-Subedi
*hdev) { struct btusb_data *data = hci_get_drvdata(hdev); return !device_may_wakeup(&data->udev->dev); } Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 6 -- 2 fil

[PATCH 0/2] Bluetooth: Update LE scanning parameters for suspend

2020-05-12 Thread Abhishek Pandit-Subedi
LE peers (mouse, keyboard, Raspberry Pi running bluez) and all of them are able to wake the system with those parameters. Thanks Abhishek Abhishek Pandit-Subedi (2): Bluetooth: Fix incorrect type for window and interval Bluetooth: Modify LE window and interval for suspend net/bluetooth

[PATCH 1/2] Bluetooth: Fix incorrect type for window and interval

2020-05-12 Thread Abhishek Pandit-Subedi
The types for window and interval should be uint16, not uint8. Signed-off-by: Abhishek Pandit-Subedi --- net/bluetooth/hci_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 3f470f0e432c7..f6870e98faab2

[PATCH 2/2] Bluetooth: Modify LE window and interval for suspend

2020-05-12 Thread Abhishek Pandit-Subedi
ed to work with HID devices (which are currently the only devices capable of wake up). Signed-off-by: Abhishek Pandit-Subedi --- net/bluetooth/hci_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index f6870e98