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
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
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
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
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
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
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
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
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
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
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-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,
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
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
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
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
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
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
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 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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
. 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
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
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
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,
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
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
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
.
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
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
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
[ 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
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
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).
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
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
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
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
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
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
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
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
> >
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
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
/* Mark task needing completion */
> set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks);
> --
> 2.27.0.rc2.251.g90737beb825-goog
>
Reviewed-by: 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
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
*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
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
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
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
64 matches
Mail list logo