Skip to content

Commit c435a8c

Browse files
holtmannjnettlet
authored andcommitted
Bluetooth: hci_bcm: Use default baud rate if missing shutdown GPIO
In case the shutdown GPIO is not wired up, it is impossible to reset the Bluetooth controller to its original state. This include the initial default baud rate which leads to issues when reloading the module or when something unexpected happens. To avoid any kind of runtime deadlocks, stick with the initial default baud rate. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 349ab9c commit c435a8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/bluetooth/hci_bcm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,12 @@ static int bcm_serdev_probe(struct serdev_device *serdev)
10911091
if (err)
10921092
return err;
10931093

1094+
if (!bcmdev->shutdown) {
1095+
dev_warn(&serdev->dev,
1096+
"No reset resource, using default baud rate\n");
1097+
bcmdev->oper_speed = bcmdev->init_speed;
1098+
}
1099+
10941100
err = bcm_gpio_set_power(bcmdev, false);
10951101
if (err)
10961102
dev_err(&serdev->dev, "Failed to power down\n");

0 commit comments

Comments
 (0)