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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pehci.c

?? ISP 1761 usb host driver for linux
?? C
?? 第 1 頁 / 共 5 頁
字號:

            /*
             * Set the ISO_BUF_FILL bit to 1 to indicate that there is a PTD for ISO that needs to
             * be processed.
             */
            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: Buffer Status: 0x%08x\n", (unsigned int) (buff_stat | ISO_BUFFER));
            isp1761_reg_write32(hcd->dev, hcd->regs.buffer_status, (buff_stat | ISO_BUFFER));
        } /* list_for_each(position, itd_sched) */      

        iso_dbg(ISO_DBG_INFO, "[phcd_iso_handler]: ISO-Frame scheduling done\n");
    } /* if( schedule == TRUE ) */

    if( remove == TRUE)
    {
        iso_dbg(ISO_DBG_INFO, "[phcd_iso_handler]: Something is for removal\n");             
        list_for_each_safe(position, lst_temp, itd_remove)
        {
            last_td = FALSE;

            /* Get an ITD in the list for processing */
            itd = list_entry(position, struct ehci_itd, itd_list);

            /* Get the PTD that was allocated for this particular ITD. */
            td_ptd_map = &ptd_map_buff->map_list[itd->itd_index];

            iso_dbg(ISO_DBG_DATA, "[phcd_iso_handler]: ITD Index: %d\n", itd->itd_index);            
            urb = itd->urb;

            /*
             * 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 */
#ifdef LINUX_269
                usb_hcd_giveback_urb (&hcd->usb_hcd, urb, regs);
#else
                usb_hcd_giveback_urb (&hcd->usb_hcd, urb);
#endif
                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,struct pt_regs *regs)
{
    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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频在线观看一区| 国产三级欧美三级日产三级99| 欧美三级日韩三级国产三级| 日韩色视频在线观看| 亚洲欧美综合色| 免费成人在线视频观看| 波多野结衣亚洲一区| 欧美一级艳片视频免费观看| 国产精品第四页| 狠狠色2019综合网| 欧美久久久久久蜜桃| 亚洲精选在线视频| 国产一区二区三区| 91精选在线观看| 亚洲欧美色一区| 国产黄色91视频| 欧美变态tickling挠脚心| 一区二区三区国产精品| 波多野结衣亚洲| 日本一区二区综合亚洲| 国产自产视频一区二区三区| 欧美二区三区的天堂| 洋洋av久久久久久久一区| 粉嫩一区二区三区性色av| 26uuu亚洲综合色| 青青草视频一区| 欧美一区二区三区免费观看视频 | 91黄色免费观看| 成人免费小视频| k8久久久一区二区三区 | 在线电影院国产精品| 一区二区三区高清在线| 色综合激情久久| 亚洲另类在线制服丝袜| 色婷婷亚洲综合| 亚洲一区二区三区视频在线 | 狠狠色伊人亚洲综合成人| 宅男噜噜噜66一区二区66| 亚洲成人免费视频| 欧美日韩综合在线| 日本欧美一区二区| 日韩精品一区二区三区在线观看 | 色噜噜狠狠一区二区三区果冻| 国产精品视频一二三区| av成人老司机| 一区二区欧美视频| 欧美精品日日鲁夜夜添| 久久精品国产精品亚洲综合| 欧美成人一级视频| 风间由美一区二区av101| 中文字幕免费不卡| 色综合久久中文字幕| 亚洲高清三级视频| 欧美一级视频精品观看| 精品亚洲porn| 国产欧美中文在线| 91福利国产成人精品照片| 亚洲国产精品天堂| 日韩精品在线一区二区| 粉嫩av亚洲一区二区图片| 国产精品国产三级国产有无不卡 | 91.com在线观看| 丁香啪啪综合成人亚洲小说| 亚洲视频一二三| 91精品国产麻豆国产自产在线| 国内精品视频一区二区三区八戒| 中文无字幕一区二区三区 | 亚洲人快播电影网| 欧美情侣在线播放| 国产在线视频精品一区| 亚洲人吸女人奶水| 日韩一区二区影院| www.视频一区| 蜜桃精品视频在线| 亚洲视频你懂的| 日韩精品一区二区三区视频播放 | 蜜桃在线一区二区三区| 国产精品久久毛片av大全日韩| 欧美浪妇xxxx高跟鞋交| 粉嫩欧美一区二区三区高清影视| 性感美女极品91精品| 久久精品在线免费观看| 欧美日韩一区二区三区四区| 国产成人精品亚洲日本在线桃色| 亚洲综合色噜噜狠狠| 国产日韩精品久久久| 欧美挠脚心视频网站| 99热在这里有精品免费| 久久99国内精品| 亚洲国产精品尤物yw在线观看| 中文欧美字幕免费| 精品国产一区二区精华| 欧美性高清videossexo| 成人av动漫在线| 激情综合色播激情啊| 视频一区欧美日韩| 一区二区免费看| 综合中文字幕亚洲| 国产精品污网站| 精品国产精品网麻豆系列| 在线不卡中文字幕播放| 在线亚洲一区二区| 色网综合在线观看| 99久久免费视频.com| 国产91高潮流白浆在线麻豆| 久久精品国产澳门| 另类小说综合欧美亚洲| 性做久久久久久免费观看| 亚洲激情av在线| 亚洲猫色日本管| 自拍偷在线精品自拍偷无码专区 | 亚洲午夜日本在线观看| 亚洲免费伊人电影| 亚洲三级视频在线观看| 成人欧美一区二区三区在线播放| 国产欧美va欧美不卡在线| 国产视频一区二区在线| 久久久久国产精品麻豆ai换脸| 精品国产一区二区亚洲人成毛片| 欧美一区二区三区在线观看视频| 7878成人国产在线观看| 欧美男同性恋视频网站| 欧美精品黑人性xxxx| 欧美一区二区三区喷汁尤物| 日韩天堂在线观看| 欧美成人vps| 久久毛片高清国产| 国产亚洲人成网站| 国产精品欧美一区喷水| 亚洲视频综合在线| 亚洲国产三级在线| 蜜臀va亚洲va欧美va天堂| 六月丁香婷婷久久| 成人综合在线视频| 色婷婷av一区二区三区软件| 欧洲中文字幕精品| 4hu四虎永久在线影院成人| 欧美一级二级三级蜜桃| 精品久久久久久久久久久久久久久久久| 日韩一区二区免费视频| 久久亚洲综合色| 亚洲狠狠丁香婷婷综合久久久| 国产精品二三区| 亚洲sss视频在线视频| 美洲天堂一区二卡三卡四卡视频 | 日韩国产在线观看一区| 久久99这里只有精品| 国产风韵犹存在线视精品| 91在线视频播放地址| 在线不卡a资源高清| 久久久久久久久免费| 亚洲精品视频在线观看免费| 午夜精品久久久久| 国产一区二区福利视频| 色婷婷综合五月| 精品国产sm最大网站| 成人欧美一区二区三区白人| 天天影视网天天综合色在线播放| 豆国产96在线|亚洲| 色诱视频网站一区| 一个色妞综合视频在线观看| 亚洲成a人片在线不卡一二三区| 开心九九激情九九欧美日韩精美视频电影| 国产精品99久久久久| 欧美性大战久久久久久久蜜臀| 欧美本精品男人aⅴ天堂| 自拍偷拍欧美激情| 老司机精品视频一区二区三区| av一本久道久久综合久久鬼色| 欧美一区二区三区婷婷月色| 亚洲欧洲性图库| 国产精品一二三| 91麻豆精品久久久久蜜臀| 亚洲欧洲日韩在线| 久久99热狠狠色一区二区| 在线观看视频一区二区| 欧美国产精品v| 精品一区二区三区不卡| 日本久久精品电影| 亚洲欧洲另类国产综合| 国产精品一区二区三区四区| 在线播放中文一区| 一区二区三区免费| 成人在线视频首页| 欧美精品一区二区三区在线 | 91.com视频| 亚洲第四色夜色| 色伊人久久综合中文字幕| 欧美国产一区二区在线观看| 精品一区二区三区蜜桃| 日韩午夜激情av| 蜜桃视频一区二区三区在线观看 | eeuss鲁片一区二区三区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 99国产精品久久久久| 国产精品久久久久桃色tv| 国产高清久久久久| 国产欧美一区二区精品性色| 九九视频精品免费| 精品对白一区国产伦|