亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pehci.c

?? usb isp1761驅(qū)動(dòng)源代碼 可編進(jìn)內(nèi)核。
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
            /*
             * Get the base address of the memory allocated in the
             * PAYLOAD region for this ITD
             */
            mem_addr = &itd->mem_addr;
            memset(iso_ptd, 0, sizeof(struct _isp1761_isoptd));

            /* 
             * Read this ptd from the ram address,address is in the
             * td_ptd_map->ptd_header_addr
             */
            isp1761_mem_read( hcd->dev, 
                    td_ptd_map->ptd_header_addr,
                    0,
                    (__u32 *) iso_ptd,
                    PHCI_QHA_LENGTH,
                    0
                    );

            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD0 = 0x%08x\n", iso_ptd->td_info1);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD1 = 0x%08x\n", iso_ptd->td_info2);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD2 = 0x%08x\n", iso_ptd->td_info3);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD3 = 0x%08x\n", iso_ptd->td_info4);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD4 = 0x%08x\n", iso_ptd->td_info5);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD5 = 0x%08x\n", iso_ptd->td_info6);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD6 = 0x%08x\n", iso_ptd->td_info7);
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: DWORD7 = 0x%08x\n", iso_ptd->td_info8);

            /* Go over the status of each of the 8 Micro Frames */
            for( uframe_cnt = 0; uframe_cnt < 8; uframe_cnt++)
            {
                /* 
                 * We go over the status one at a time. The status bits and their
                 * equivalent status are:
                 * Bit 0 - Transaction Error (IN and OUT)
                 * Bit 1 - Babble (IN token only)
                 * Bit 2 - Underrun (OUT token only)
                 */
                usof_stat = iso_ptd->td_info5 >> (8 + (uframe_cnt * 3));

                switch(usof_stat & 0x7) 
                {
                    case INT_UNDERRUN:                          
                        iso_dbg(ISO_DBG_ERR, "[phcd_iso_handler Error]: Buffer underrun\n");         
                        urb->error_count++;
                        break;
                    case INT_EXACT:                                     
                        iso_dbg(ISO_DBG_ERR, "[phcd_iso_handler Error]: Transaction error\n");               
                        urb->error_count++;
                        break;
                    case INT_BABBLE:                                    
                        iso_dbg(ISO_DBG_ERR, "[phcd_iso_handler Error]: Babble error\n");            
                        urb->iso_frame_desc[itd->itd_index].status = -EOVERFLOW;
                        urb->error_count++;
                        break;
                } /* switch(usof_stat & 0x7) */
            } /* end of for( ulMicroFrmCnt = 0; ulMicroFrmCnt < 8; ulMicroFrmCnt++) */

            /*
             * Get the number of bytes transferred. This indicates the number of
             * bytes sent or received for this transaction.
             */                 
            if(urb->dev->speed != USB_SPEED_HIGH)
                /* Length is 1K for full/low speed device */
                length = PTD_XFERRED_NONHSLENGTH(iso_ptd->td_info4);
            else
                /* Length is 32K for high speed device */
                length = PTD_XFERRED_LENGTH(iso_ptd->td_info4);

            /* Halted, need to finish all the transfer on this endpoint*/
            if(iso_ptd->td_info4 & PTD_STATUS_HALTED)
            {
                iso_dbg(ISO_DBG_ERR, "[phcd_iso_handler Error] PTD Halted\n");
                /* 
                 * When there is an error, do not process the other PTDs.
                 * Stop at the PTD with the error and remove all other PTDs.
                 */
                td_ptd_map->lasttd = 1;

                /* 
                 * In case of halt, next transfer will start with toggle zero,
                 * USB specs, 5.8.5
                 */                             
                td_ptd_map->datatoggle = 0;                             
            } /* if(iso_ptd->td_info4 & PTD_STATUS_HALTED) */

            /* Update the actual length of the transfer from the data we got earlier */
            urb->iso_frame_desc[itd->index].actual_length = length;

            /* If the PTD have been executed properly the V bit should be cleared */                    
            if(iso_ptd->td_info1 & QHA_VALID)
            {
                iso_dbg(ISO_DBG_ERR,"[phcd_iso_handler Error]: Valid bit not cleared\n");
                urb->iso_frame_desc[itd->index].status = -ENOSPC;
            }
            else
            {
                urb->iso_frame_desc[itd->index].status = 0;
            }

            /* Check if this is the last ITD either due to some error or normal completion*/
            if((td_ptd_map->lasttd) ||(itd->hw_next == EHCI_LIST_END))
            {
                last_td = TRUE;
            }

            /* Copy data to/from */
            if(length && (length <= MAX_PTD_BUFFER_SIZE))
            {
                switch(PTD_PID(iso_ptd->td_info2))
                {
                    case IN_PID:
                        /* 
                         * Get the data from the PAYLOAD area and place it into
                         * the buffer provided by the requestor.
                         */
                        isp1761_mem_read( hcd->dev,
                                (unsigned long) mem_addr->phy_addr,
                                0,
                                (__u32 *)(le32_to_cpu(itd->hw_bufp[0])),
                                length,
                                0
                                );
                    case OUT_PID:
                        /* 
                         * urb->actual length was initialized to zero, so for the first
                         * uFrame having it incremented immediately is not a problem.
                         */
                        urb->actual_length += length;
                        break;
                }/* switch(PTD_PID(iso_ptd->td_info2)) */
            }/* if(length && (length <= MAX_PTD_BUFFER_SIZE)) */

            if( last_td == TRUE )
            {
                /* Start removing the ITDs in the list */
                while(1)
                {                                       
                    /* 
                     * This indicates that we are processing the tail PTD.
                     * Perform cleanup procedure on this last PTD
                     */
                    if(itd->hw_next == EHCI_LIST_END) 
                    {
                        td_ptd_map = &ptd_map_buff->map_list[itd->itd_index];

                        /* 
                         * Free up our allocation in the PAYLOAD area so that others can use 
                         * it.
                         */
                        phci_hcd_mem_free(&itd->mem_addr);

                        /* Remove this ITD entry in the ITD list */
                        list_del(&itd->itd_list);

                        /* Free up the memory allocated for the ITD structure */
                        qha_free(qha_cache, itd);

                        /* Indicate that the PTD we have used is now free */    
                        td_ptd_map->state = TD_PTD_NEW;

                        /* Decrease the number of active PTDs scheduled*/
                        hcd->periodic_sched --;

                        /* Skip this PTD during the next PTD processing. */
                        skip_map |= td_ptd_map->ptd_bitmap;
                        isp1761_reg_write32(hcd->dev, hcd->regs.isotdskipmap, skip_map);

                        /* All ITDs in this list have been successfully removed. */
                        break;
                    } /* if(itd->hw_next == EHCI_LIST_END) */

                    /* 
                     * This indicates that we stopped due to an error on a PTD that is
                     * not the last in the list. We need to free up this PTD as well as 
                     * the PTDs after it.
                     */
                    else
                    {
                        /* 
                         * Put the current ITD error onto this variable.
                         * We will be unlinking this from the list and free up its
                         * resources later.
                         */
                        current_itd = itd;

                        td_ptd_map = &ptd_map_buff->map_list[itd->itd_index];

                        /* 
                         * Get the next ITD, and place it to the itd variable.
                         * In a way we are moving forward in the ITD list.
                         */
                        itd = (struct ehci_itd *)le32_to_cpu(current_itd->hw_next);

                        /* Free up the current ITD's resources */
                        phci_hcd_mem_free(&current_itd->mem_addr);

                        /* Remove this ITD entry in the ITD list */
                        list_del(&current_itd->itd_list);

                        /* Free up the memory allocated for the ITD structure */
                        qha_free(qha_cache,current_itd);

                        /* Inidicate that the PTD we have used is now free */
                        td_ptd_map->state = TD_PTD_NEW;

                        /* Decrease the number of active PTDs scheduled*/
                        hcd->periodic_sched --;

                        /* Sine it is done, skip this PTD during the next PTD processing. */
                        skip_map |= td_ptd_map->ptd_bitmap;
                        isp1761_reg_write32(hcd->dev, hcd->regs.isotdskipmap, skip_map);

                        /* 
                         * Start all over again until it gets to the tail of the 
                         * list of PTDs/ITDs 
                         */
                        continue;
                    } /* else of if(itd->hw_next == EHCI_LIST_END) */

                    /* It should never get here, but I put this as a precaution */
                    break;
                } /* end of while(1) */

                /* Check if there were ITDs that were not processed due to the error */
                if(urb->status == -EINPROGRESS)
                {
                    if( (urb->actual_length != urb->transfer_buffer_length) && 
                            (urb->transfer_flags & URB_SHORT_NOT_OK))
                    {
                        iso_dbg(ISO_DBG_ERR,"[phcd_iso_handler Error]: Short Packet\n");
                        urb->status = -EREMOTEIO;
                    }
                    else
                    {
                        urb->status = 0;
                    }
                }

                urb->hcpriv = 0;

                /* We need to unlock this here, since this was locked when we are called
                 * from the interrupt handler */
                spin_unlock(&hcd->lock);

                /* Perform URB cleanup */
                usb_hcd_giveback_urb (&hcd->usb_hcd, urb);

                spin_lock(&hcd->lock);
                continue;
            }/* if( last_td == TRUE ) */

            /* 
             * If the last_td is not set then we do not need to check for errors and directly
             * proceed with the cleaning sequence.                       
             */

            /* Decrement the count of active PTDs */
            hcd->periodic_sched --;

            /* Free up the memory we allocated in the PAYLOAD area */
            phci_hcd_mem_free(&itd->mem_addr);

            /* Remove this ITD from the list of active ITDs */
            list_del(&itd->itd_list);

            /* Free up the memory we allocated for the ITD structure */
            qha_free(qha_cache, itd);

            /* 
             * Clear the bit associated with this PTD from the grouptdmap and
             * make this PTD available for other transfers
             */

            td_ptd_map->state = TD_PTD_NEW;         

            /* Skip this PTD during the next PTD processing. */
            skip_map |= td_ptd_map->ptd_bitmap;
            isp1761_reg_write32(hcd->dev, hcd->regs.isotdskipmap, skip_map);
        } /* list_for_each_safe(position, lst_temp, itd_remove) */
        iso_dbg(ISO_DBG_INFO, "[phcd_iso_handler]: ISO-Frame removal done\n");
    } /* if( remove == TRUE) */

    /*
     * When there is no more PTDs queued for scheduling or removal
     * clear the buffer status to indicate there are no more PTDs for 
     * processing and set the skip map to 1 to indicate that the first
     * PTD is also the last PTD.
     */
    if(hcd->periodic_sched <= 0)
    {
        iso_dbg(ISO_DBG_INFO, "[phcd_iso_handler]: No more PTDs queued\n");
        buff_stat &= ~ISO_BUFFER;
        isp1761_reg_write32(hcd->dev, hcd->regs.buffer_status, buff_stat);
        isp1761_reg_write32(hcd->dev,hcd->regs.isotdlastmap, 0x1);
        hcd->periodic_sched = 0;
    }           
} /* end of phcd_iso_handler */

#endif /* CONFIG_ISO_SUPPORT */

/*interrupt transfer handler*/
/********************************************************
  1. read done map
  2. read the ptd to see any errors
  3. copy the payload to and from
  4. update ehci td
  5. make new ptd if transfer there and earlier done
  6. schedule
 *********************************************************/
    static void
pehci_hcd_intl_worker(phci_hcd *hcd)
{
    int i = 0;
    u32 donemap = 0, donetoclear;
    u32 mask = 0x1,index = 0;
    u32 pendingmap = 0;
    u32 location = 0;
    u32 length = 0;
    u32 skipmap = 0;
    u32 ormask = 0;
    u32 usofstatus = 0;
    struct urb *urb;
    struct ehci_qtd *qtd = 0;
    struct ehci_qh *qh = 0;
    struct _isp1761_qhint *qhint = &hcd->qhint;
    td_ptd_map_t                *td_ptd_map;
    td_ptd_map_buff_t   *ptd_map_buff;
    struct isp1761_mem_addr *mem_addr = 0;
    u32 dontschedule = 0;       

    ptd_map_buff = &(td_ptd_map_buff[TD_PTD_BUFF_TYPE_INTL]);
    pendingmap = ptd_map_buff->pending_ptd_bitmap;

    /*read the done map for interrupt transfers*/
    donetoclear = donemap = isp1761_reg_read32(hcd->dev, hcd->regs.inttddonemap,donemap);
    if(donemap){
        /*skip done tds*/
        skipmap = isp1761_reg_read32(hcd->dev, hcd->regs.inttdskipmap, skipmap);
        skipmap |= donemap;
        isp1761_reg_write32(hcd->dev, hcd->regs.inttdskipmap, skipmap);
        donemap |=      pendingmap;
    }
    /*if sof interrupt is enabled*/
#ifdef MSEC_INT_BASED
    else{
        /*if there is something pending , put this transfer in*/
        if(ptd_map_buff->pending_ptd_bitmap){
            pehci_hcd_schedule_pending_ptds(hcd,pendingmap,(u8)TD_PTD_BUFF_TYPE_INTL,1);
        }
        return;
    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国模冰冰炮一区二区| 日韩精品一区二区三区四区| 成人激情开心网| 国产精品一区二区久久不卡| 国产一区二区三区久久久| 麻豆精品久久精品色综合| 美国一区二区三区在线播放| 久久精品免费看| 狠狠v欧美v日韩v亚洲ⅴ| 久久er精品视频| 国产精品一二三四| 成人黄色电影在线| 91在线观看成人| 在线观看一区日韩| 欧美久久久久久久久久| 欧美一区二区三区日韩视频| 日韩视频免费观看高清完整版在线观看 | 日韩综合一区二区| 青娱乐精品视频| 韩国视频一区二区| 成人在线一区二区三区| 成人91在线观看| 在线观看国产精品网站| 日韩亚洲电影在线| 国产亚洲成aⅴ人片在线观看 | 亚洲最大的成人av| 香蕉成人伊视频在线观看| 日产欧产美韩系列久久99| 精品亚洲免费视频| 成人性生交大合| 日本精品一级二级| 欧美一区二区视频在线观看2020 | 亚洲va天堂va国产va久| 久久99九九99精品| 成人伦理片在线| 精品视频全国免费看| 欧美成人激情免费网| 欧美国产精品专区| 亚洲小说欧美激情另类| 捆绑调教一区二区三区| 成人精品国产一区二区4080| 欧美性一二三区| 欧美精品一区在线观看| 亚洲欧美一区二区视频| 日本不卡一二三| 成人午夜免费视频| 欧美美女一区二区在线观看| 国产亚洲欧美日韩日本| 亚洲成在人线在线播放| 国产乱码精品一区二区三区av | 欧美r级电影在线观看| 国产精品欧美综合在线| 亚洲va欧美va天堂v国产综合| 精品一区二区三区在线播放视频| 91在线视频播放地址| 欧美一区日韩一区| 亚洲丝袜另类动漫二区| 韩国女主播成人在线观看| 色婷婷亚洲精品| 国产亚洲污的网站| 五月激情综合网| 色综合久久综合网欧美综合网| 日韩午夜中文字幕| 亚洲自拍另类综合| 成人激情视频网站| 2021久久国产精品不只是精品| 一区二区三区**美女毛片| 丁香激情综合国产| 日韩欧美亚洲国产另类| 亚洲国产成人高清精品| 91在线播放网址| 国产欧美日韩亚州综合| 乱中年女人伦av一区二区| 欧美中文字幕久久| 中文字幕中文字幕一区二区| 国内精品免费**视频| 欧美一卡在线观看| 亚洲最大成人综合| 色综合久久中文综合久久97| 欧美激情资源网| 国内一区二区在线| 日韩视频一区二区| 偷拍自拍另类欧美| 在线中文字幕不卡| 亚洲人成精品久久久久久| 成人网在线播放| 久久久久久久久免费| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美视频在线一区二区三区| **欧美大码日韩| 波多野结衣亚洲一区| 久久精品人人做人人爽人人| 久久99精品国产麻豆婷婷洗澡| 欧美一区二区视频在线观看 | 成人av综合在线| 久久九九久久九九| 国产乱一区二区| 久久久久国色av免费看影院| 国产一区二三区| 久久久久久久综合| 国产成人亚洲综合a∨婷婷| 久久一夜天堂av一区二区三区| 裸体一区二区三区| 欧美mv日韩mv国产网站app| 玖玖九九国产精品| 久久久久久久免费视频了| 国产精品资源网站| 国产欧美精品在线观看| 成人综合在线观看| 中文字幕av在线一区二区三区| 成人中文字幕在线| 亚洲欧美电影院| 欧美少妇一区二区| 日韩电影在线免费| 日韩女优视频免费观看| 国产精品中文字幕日韩精品 | 欧美国产1区2区| 岛国av在线一区| 亚洲欧洲三级电影| 欧美中文字幕一区| 日韩成人免费看| 久久新电视剧免费观看| 成人黄页在线观看| 一区二区三区久久久| 欧美日韩国产高清一区二区三区| 奇米影视一区二区三区| 久久精品人人做人人爽人人| av成人老司机| 日韩不卡一区二区三区| 国产日本欧洲亚洲| 99久久精品99国产精品| 亚洲国产美女搞黄色| 日韩一卡二卡三卡国产欧美| 国产丶欧美丶日本不卡视频| 亚洲免费观看高清在线观看| 欧美精品粉嫩高潮一区二区| 精品一区在线看| ...中文天堂在线一区| 欧美精品xxxxbbbb| 国产福利视频一区二区三区| 亚洲欧美日韩久久精品| 欧美一区二区三区婷婷月色| 国产不卡视频一区二区三区| 亚洲色图20p| 日韩精品一区二区三区三区免费 | 综合久久一区二区三区| 欧美日韩国产综合久久| 国产美女在线观看一区| 亚洲欧美成aⅴ人在线观看| 日韩欧美一区在线| 91香蕉视频mp4| 美女在线观看视频一区二区| 国产欧美日韩在线视频| 5566中文字幕一区二区电影| 成人午夜短视频| 奇米888四色在线精品| 中文字幕在线不卡国产视频| 在线综合亚洲欧美在线视频| aaa欧美日韩| 狠狠狠色丁香婷婷综合激情| 一区二区三区 在线观看视频| 久久精品夜夜夜夜久久| 欧美日韩精品一区二区| av网站免费线看精品| 激情偷乱视频一区二区三区| 亚洲综合丁香婷婷六月香| 久久久久久久综合色一本| 欧美理论片在线| 色综合欧美在线视频区| 国产精品香蕉一区二区三区| 日一区二区三区| 亚洲欧洲国产专区| 久久精品人人做| 精品日韩一区二区| 欧美欧美欧美欧美| 色香蕉成人二区免费| 国产xxx精品视频大全| 极品销魂美女一区二区三区| 亚洲bt欧美bt精品777| 最近中文字幕一区二区三区| 国产偷v国产偷v亚洲高清| 日韩一区二区精品| 欧美精品日韩一本| 欧美午夜寂寞影院| 91丨porny丨户外露出| 国产69精品一区二区亚洲孕妇| 久久精品国产一区二区三区免费看| 亚洲在线视频免费观看| 一区视频在线播放| 国产精品久久毛片av大全日韩| 国产区在线观看成人精品| 欧美成人欧美edvon| 欧美一区二区三区视频免费| 欧美乱熟臀69xxxxxx| 欧美性大战久久| 在线观看日韩电影| 欧美亚日韩国产aⅴ精品中极品| 在线观看亚洲专区| 色偷偷一区二区三区| 91麻豆.com|