I also changed:

        case RTBTH_IOCDMAC:
            do {
                struct rtbth_dmac dmac;

                if (copy_from_user(&dmac, (void *)arg, sizeof(dmac))) {
                    retval = -EFAULT;
                    DebugPrint(ERROR, DBG_INIT,"copy_from_user failed at %d\n", 
__LINE__);
                    break;
                }
                DebugPrint(ERROR, DBG_INIT,"RTBTH_IOCDMAC: dmac.dmac_op=%d\n", 
dmac.dmac_op);

                if(dmac.dmac_op == 0){
                    RtbtResetPDMA(gpAd);
                }else if(dmac.dmac_op == 1){
                    BthEnableRxTx(gpAd);
                }else if(dmac.dmac_op == 2){
                    DebugPrint(TRACE, DBG_MISC, "%s:kfifo reset ==>\n", 
__func__);
                    kfifo_reset(gpAd->acl_fifo);
                    kfifo_reset(gpAd->hci_fifo);
                    kfifo_reset(gpAd->evt_fifo);
                    kfifo_reset(gpAd->sco_fifo);
                    kfifo_reset(gpAd->rx_fifo);
                    DebugPrint(TRACE, DBG_MISC, "%s:kfifo reset <== \n", 
__func__);
                }
                else {
                     DebugPrint(ERROR, DBG_INIT,"No such the dma op = %d\n", 
dmac.dmac_op);
                }
            }while(0);
break;

to:


        case RTBTH_IOCDMAC:
            do {
                struct rtbth_dmac dmac;

                if (copy_from_user(&dmac, (void *)arg, sizeof(dmac))) {
                    retval = -EFAULT;
                    DebugPrint(ERROR, DBG_INIT,"copy_from_user failed at %d\n", 
__LINE__);
                    break;
                }
                DebugPrint(ERROR, DBG_INIT,"RTBTH_IOCDMAC: dmac.dmac_op=%d\n", 
dmac.dmac_op);
                
                if(dmac.dmac_op == 2){
                    DebugPrint(TRACE, DBG_MISC, "%s:kfifo reset ==>\n", 
__func__);
                    kfifo_reset(gpAd->acl_fifo);
                    kfifo_reset(gpAd->hci_fifo);
                    kfifo_reset(gpAd->evt_fifo);
                    kfifo_reset(gpAd->sco_fifo);
                    kfifo_reset(gpAd->rx_fifo);
                    DebugPrint(TRACE, DBG_MISC, "%s:kfifo reset <== \n", 
__func__);
                }
                
                if(dmac.dmac_op == 0){
                    RtbtResetPDMA(gpAd);
                }
                if(dmac.dmac_op == 1){
                    BthEnableRxTx(gpAd);
                } else {
                     DebugPrint(ERROR, DBG_INIT,"No such the dma op = %d\n", 
dmac.dmac_op);
                }
                
            }while(0);
            break;

Now it is the pairing even more reliable. Paired 5 different devices
including bluetooth audio device.

Somehow the execution was not reaching this part:

  if(dmac.dmac_op == 2){
                    DebugPrint(TRACE, DBG_MISC, "%s:kfifo reset ==>\n", 
__func__);
                    kfifo_reset(gpAd->acl_fifo);
                    kfifo_reset(gpAd->hci_fifo);
                    kfifo_reset(gpAd->evt_fifo);
                    kfifo_reset(gpAd->sco_fifo);
                    kfifo_reset(gpAd->rx_fifo);
                    DebugPrint(TRACE, DBG_MISC, "%s:kfifo reset <== \n", 
__func__);
                }

It is the interrupt causing it?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1189721

Title:
  Ralink RT3290 doesn't have a bluetooth driver

To manage notifications about this bug go to:
https://bugs.launchpad.net/bluetooth/+bug/1189721/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to