]> git.neil.brown.name Git - history.git/commitdiff
[Bluetooth] Fix config change for firmware loading
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 20 Jun 2004 18:18:48 +0000 (20:18 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 20 Jun 2004 18:18:48 +0000 (20:18 +0200)
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: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/bfusb.c

index 45e35bc2190665c9f14c29b38938bf630352356d..bffbc85c1f5c8633dcd0e3908220c8e891633ff9 100644 (file)
@@ -585,6 +585,9 @@ static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int
                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);
        if (!buf) {
                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
                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");
 
        kfree(buf);