Commit a56c56e7 authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Fix config change for firmware loading

The switching between firmware loading and running state is done via
different configurations. To get this right the USB toggle and halted
bits must be reset to zero after it.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent bd3f0ebb
...@@ -585,6 +585,9 @@ static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int ...@@ -585,6 +585,9 @@ static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int
return -EBUSY; return -EBUSY;
} }
bfusb->udev->toggle[0] = bfusb->udev->toggle[1] = 0;
bfusb->udev->halted[0] = bfusb->udev->halted[1] = 0;
buf = kmalloc(BFUSB_MAX_BLOCK_SIZE + 3, GFP_ATOMIC); buf = kmalloc(BFUSB_MAX_BLOCK_SIZE + 3, GFP_ATOMIC);
if (!buf) { if (!buf) {
BT_ERR("Can't allocate memory chunk for firmware"); BT_ERR("Can't allocate memory chunk for firmware");
...@@ -624,6 +627,9 @@ static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int ...@@ -624,6 +627,9 @@ static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int
goto error; goto error;
} }
bfusb->udev->toggle[0] = bfusb->udev->toggle[1] = 0;
bfusb->udev->halted[0] = bfusb->udev->halted[1] = 0;
BT_INFO("BlueFRITZ! USB device ready"); BT_INFO("BlueFRITZ! USB device ready");
kfree(buf); kfree(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment