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

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

?? ataiopci.c

?? ~{S2EL~}wdm~{G}6/~}
?? C
?? 第 1 頁 / 共 2 頁
字號:
            inportb( busMasterRegs + BM_STATUS_REG ),
            TRC_LLT_DEBUG );     // for debugging
   #endif

   // End of command...
   // now wait for the PCI BM DMA channel to flush the data.

   while ( 1 )
   {
      if ( ( inportb( busMasterRegs + BM_STATUS_REG )
             & BM_SR_MASK_INT )
         )                                // done yet ?
         break;                           // yes
      if ( tmr_chk_timeout() )            // time out yet ?
      {
         trc_llt( 0, 0, TRC_LLT_TOUT );   // yes
         reg_cmd_info.to = 1;
         reg_cmd_info.ec = 71;
         trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
         break;
      }
   }

   #if 0
   trc_llt( 0,
            inportb( busMasterRegs + BM_STATUS_REG ),
            TRC_LLT_DEBUG );     // for debugging
   #endif

   // End of command...
   // disable/stop the dma channel

   trc_llt( 0, 0, TRC_LLT_DMA3 );
   disableChan();

   // End of command...
   // Read the primary status register.  In keeping with the rules
   // stated above the primary status register is read only
   // ONCE.

   status = pio_inbyte( CB_STAT );

   // Final status check...
   // if no error, check final status...
   // Error if BUSY, DEVICE FAULT, DRQ or ERROR status now.

   if ( reg_cmd_info.ec == 0 )
   {
      if ( status & ( CB_STAT_BSY | CB_STAT_DF | CB_STAT_DRQ | CB_STAT_ERR ) )
      {
         reg_cmd_info.ec = 74;
         trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
      }
   }

   // Final status check...
   // if no error, check make sure the device asserted the INTRQ signal.

   if ( ( reg_cmd_info.ec == 0 )
        &&
        ( ( inportb( busMasterRegs + BM_STATUS_REG ) & BM_SR_MASK_INT ) == 0 )
      )
   {
      reg_cmd_info.ec = 71;
      trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
   }

   // Final status check...
   // if any error, update total bytes transferred.

   if ( reg_cmd_info.ec == 0 )
      reg_cmd_info.totalBytesXfer = ns * 512L;
   else
      reg_cmd_info.totalBytesXfer = 0L;

   // Done...
   // Read the output registers and trace the command.

   sub_trace_command();

   // Done...
   // For interrupt mode, restore the INT 7x vector.

   int_restore_int_vect();

   // Done...
   // mark end of a R/W DMA command in low level trace

   trc_llt( 0, 0, TRC_LLT_E_RWD );

   // All done.  The return values of this function are described in
   // ATAIO.H.

   if ( reg_cmd_info.ec )
      return 1;
   return 0;
}

//***********************************************************
//
// dma_pci_packet() - PCI Bus Master for ATAPI Packet command
//
//***********************************************************

int dma_pci_packet( int dev,
                    unsigned int cpbc,
                    unsigned int cpseg, unsigned int cpoff,
                    int dir,
                    long dpbc,
                    unsigned int dpseg, unsigned int dpoff )

{
   unsigned char devCtrl;
   unsigned char devHead;
   unsigned char cylLow;
   unsigned char cylHigh;
   unsigned char fr;
   unsigned char status;
   unsigned char reason;
   unsigned char lowCyl;
   unsigned char highCyl;
   int ndx;
   unsigned char * cp;
   unsigned char far * cfp;

   // mark start of isa dma PI cmd in low level trace

   trc_llt( 0, 0, TRC_LLT_S_PID );

   // setup register values

   devCtrl = 0;      // in the old days we would set CB_DC_HD15 = 1
   devHead = dev ? CB_DH_DEV1 : CB_DH_DEV0;
   cylLow = dpbc & 0x00ff;
   cylHigh = ( dpbc & 0xff00 ) >> 8;
   fr = 0x01;

   // Reset error return data.

   sub_zero_return_data();
   reg_cmd_info.flg = TRC_FLAG_CMD;
   reg_cmd_info.ct  = dir ? TRC_TYPE_PDMAO : TRC_TYPE_PDMAI;
   reg_cmd_info.cmd = CMD_PACKET;
   reg_cmd_info.fr1 = fr;
   reg_cmd_info.sc1 = 0;
   reg_cmd_info.sn1 = 0;
   reg_cmd_info.cl1 = cylLow;
   reg_cmd_info.ch1 = cylHigh;
   reg_cmd_info.dh1 = devHead;
   reg_cmd_info.dc1 = devCtrl;

   // Make sure the command packet size is either 12 or 16
   // and save the command packet size and data.

   cpbc = cpbc < 12 ? 12 : cpbc;
   cpbc = cpbc > 12 ? 16 : cpbc;
   reg_atapi_cp_size = cpbc;
   cp = reg_atapi_cp_data;
   cfp = MK_FP( cpseg, cpoff );
   for ( ndx = 0; ndx < cpbc; ndx ++ )
   {
      * cp = * cfp;
      cp ++ ;
      cfp ++ ;
   }

   // Quit now if no dma channel set up

   if ( ! busMasterRegs )
   {
      reg_cmd_info.ec = 70;
      trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
      sub_trace_command();
      trc_llt( 0, 0, TRC_LLT_E_PID );
      reg_atapi_max_bytes = 32768L;    // reset max bytes
      return 1;
   }

   // set up the dma transfer(s) --
   // the data packet byte count must be even
   // and must not be zero

   if ( dpbc == 0xffff )
      dpbc = 0xfffe;
   if ( dpbc < 2 )
      dpbc = 2;
   if ( dpbc & 0x0001 )
      dpbc ++ ;
   set_up_xfer( dir, dpbc, dpseg, dpoff );

   // Set command time out.

   tmr_set_timeout();

   // Select the drive - call the reg_select function.
   // Quit now if this fails.

   if ( sub_select( dev ) )
   {
      sub_trace_command();
      trc_llt( 0, 0, TRC_LLT_E_PID );
      reg_atapi_max_bytes = 32768L;    // reset max bytes
      return 1;
   }

   // Set up all the registers except the command register.

   pio_outbyte( CB_DC, devCtrl );
   pio_outbyte( CB_FR, fr );
   pio_outbyte( CB_SC, 0 );
   pio_outbyte( CB_SN, 0 );
   pio_outbyte( CB_CL, 0 );
   pio_outbyte( CB_CH, 0 );
   pio_outbyte( CB_DH, devHead );

   // For interrupt mode,
   // Take over INT 7x and initialize interrupt controller
   // and reset interrupt flag.

   int_save_int_vect();

   // Start the command by setting the Command register.  The drive
   // should immediately set BUSY status.

   pio_outbyte( CB_CMD, CMD_PACKET );

   // Waste some time by reading the alternate status a few times.
   // This gives the drive time to set BUSY in the status register on
   // really fast systems.  If we don't do this, a slow drive on a fast
   // system may not set BUSY fast enough and we would think it had
   // completed the command when it really had not even started the
   // command yet.

   DELAY400NS;

   // Command packet transfer...
   // Check for protocol failures,
   // the device should have BSY=1 or
   // if BSY=0 then either DRQ=1 or CHK=1.

   sub_atapi_delay( dev );
   status = pio_inbyte( CB_ASTAT );
   if ( status & CB_STAT_BSY )
   {
      // BSY=1 is OK
   }
   else
   {
      if ( status & ( CB_STAT_DRQ | CB_STAT_ERR ) )
      {
         // BSY=0 and DRQ=1 is OK
         // BSY=0 and ERR=1 is OK
      }
      else
      {
         reg_cmd_info.failbits |= FAILBIT0;  // not OK
      }
   }

   // Command packet transfer...
   // Poll Alternate Status for BSY=0.

   trc_llt( 0, 0, TRC_LLT_PNBSY );
   while ( 1 )
   {
      status = pio_inbyte( CB_ASTAT );       // poll for not busy
      if ( ( status & CB_STAT_BSY ) == 0 )
         break;
      if ( tmr_chk_timeout() )               // time out yet ?
      {
         trc_llt( 0, 0, TRC_LLT_TOUT );      // yes
         reg_cmd_info.to = 1;
         reg_cmd_info.ec = 75;
         trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
         break;
      }
   }

   // Command packet transfer...
   // Check for protocol failures... no interrupt here please!
   // Clear any interrupt the command packet transfer may have caused.

   if ( int_intr_flag )
      reg_cmd_info.failbits |= FAILBIT1;
   int_intr_flag = 0;

   // Command packet transfer...
   // If no error, transfer the command packet.

   if ( reg_cmd_info.ec == 0 )
   {

      // Command packet transfer...
      // Read the primary status register and the other ATAPI registers.

      status = pio_inbyte( CB_STAT );
      reason = pio_inbyte( CB_SC );
      lowCyl = pio_inbyte( CB_CL );
      highCyl = pio_inbyte( CB_CH );

      // Command packet transfer...
      // check status: must have BSY=0, DRQ=1 now

      if (    ( status & ( CB_STAT_BSY | CB_STAT_DRQ | CB_STAT_ERR ) )
           != CB_STAT_DRQ
         )
      {
         reg_cmd_info.ec = 76;
         trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
      }
      else
      {
         // Command packet transfer...
         // Check for protocol failures...
         // check: C/nD=1, IO=0.

         if ( ( reason &  ( CB_SC_P_TAG | CB_SC_P_REL | CB_SC_P_IO ) )
              || ( ! ( reason &  CB_SC_P_CD ) )
            )
            reg_cmd_info.failbits |= FAILBIT2;
         if ( ( lowCyl != cylLow ) || ( highCyl != cylHigh ) )
            reg_cmd_info.failbits |= FAILBIT3;

         // Command packet transfer...
         // trace cdb byte 0,
         // xfer the command packet (the cdb)

         trc_llt( 0, * (unsigned char far *) MK_FP( cpseg, cpoff ), TRC_LLT_P_CMD );
         pio_rep_outword( CB_DATA, cpseg, cpoff, cpbc >> 1 );
      }
   }

   // enable/start the dma channel.

   trc_llt( 0, 0, TRC_LLT_DMA1 );
   enableChan();

   // Data transfer...
   // the device and dma channel transfer the data here while we start
   // checking for command completion...

   // End of command...
   // if no error,
   // wait for drive to signal command completion
   // -or-
   // time out if this takes to long.

   if ( reg_cmd_info.ec == 0 )
   {
      if ( int_use_intr_flag )
         trc_llt( 0, 0, TRC_LLT_WINT );
      else
         trc_llt( 0, 0, TRC_LLT_PNBSY );
      while ( 1 )
      {
         if ( chk_cmd_done() )               // done yet ?
            break;                           // yes
         if ( tmr_chk_timeout() )            // time out yet ?
         {
            trc_llt( 0, 0, TRC_LLT_TOUT );   // yes
            reg_cmd_info.to = 1;
            reg_cmd_info.ec = 73;
            trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
            break;
         }
      }
   }

   #if 0
   trc_llt( 0,
            inportb( busMasterRegs + BM_STATUS_REG ),
            TRC_LLT_DEBUG );     // for debugging
   #endif

   // End of command...
   // now wait for the PCI BM DMA channel to flush the data.

   while ( 1 )
   {
      if ( ( inportb( busMasterRegs + BM_STATUS_REG )
             & BM_SR_MASK_INT )
         )                                // done yet ?
         break;                           // yes
      if ( tmr_chk_timeout() )            // time out yet ?
      {
         trc_llt( 0, 0, TRC_LLT_TOUT );   // yes
         reg_cmd_info.to = 1;
         reg_cmd_info.ec = 71;
         trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
         break;
      }
   }

   #if 0
   trc_llt( 0,
            inportb( busMasterRegs + BM_STATUS_REG ),
            TRC_LLT_DEBUG );     // for debugging
   #endif

   // End of command...
   // disable/stop the dma channel

   trc_llt( 0, 0, TRC_LLT_DMA3 );
   disableChan();

   // End of command...
   // Read the primary status register.  In keeping with the rules
   // stated above the primary status register is read only
   // ONCE.

   status = pio_inbyte( CB_STAT );

   // Final status check...
   // if no error, check final status...
   // Error if BUSY, DEVICE FAULT, DRQ or ERROR status now.

   if ( reg_cmd_info.ec == 0 )
   {
      if ( status & ( CB_STAT_BSY | CB_STAT_DRQ | CB_STAT_ERR ) )
      {
         reg_cmd_info.ec = 74;
         trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
      }
   }

   // Final status check...
   // Check for protocol failures...
   // check: C/nD=1, IO=1.

   reason = pio_inbyte( CB_SC );
   if ( ( reason & ( CB_SC_P_TAG | CB_SC_P_REL ) )
        || ( ! ( reason & CB_SC_P_IO ) )
        || ( ! ( reason & CB_SC_P_CD ) )
      )
      reg_cmd_info.failbits |= FAILBIT8;

   // Final status check...
   // if no error, check make sure the device asserted the INTRQ signal.

   if ( ( reg_cmd_info.ec == 0 )
        &&
        ( ( inportb( busMasterRegs + BM_STATUS_REG ) & BM_SR_MASK_INT ) == 0 )
      )
   {
      reg_cmd_info.ec = 71;
      trc_llt( 0, reg_cmd_info.ec, TRC_LLT_ERROR );
   }

   // Final status check...
   // if any error, update total bytes transferred.

   if ( reg_cmd_info.ec == 0 )
      reg_cmd_info.totalBytesXfer = dpbc;
   else
      reg_cmd_info.totalBytesXfer = 0L;

   // Done...
   // Read the output registers and trace the command.
   // Also put the command packet in the trace.

   sub_trace_command();
   trc_cht_pkt();

   // Done...
   // For interrupt mode, restore the INT 7x vector.

   int_restore_int_vect();

   // Done...
   // mark end of isa dma PI cmd in low level trace

   trc_llt( 0, 0, TRC_LLT_E_PID );

   // All done.  The return values of this function are described in
   // ATAIO.H.

   reg_atapi_max_bytes = 32768L;    // reset max bytes
   if ( reg_cmd_info.ec )
      return 1;
   return 0;
}

// end ataiopci.c

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆成人91精品二区三区| 亚洲国产精品激情在线观看| 亚洲自拍偷拍网站| 在线观看日韩精品| 亚洲影院久久精品| 欧美日韩日日摸| 91社区在线播放| 一区二区视频在线看| 在线视频一区二区三区| 亚洲国产综合91精品麻豆| 欧美欧美午夜aⅴ在线观看| 日韩av在线免费观看不卡| 欧美一级理论性理论a| 国产一区二区女| 欧美韩国日本综合| 在线观看视频一区| 日韩精品免费专区| 国产三级欧美三级日产三级99| 成人国产精品免费观看动漫 | 亚洲r级在线视频| 日韩欧美国产精品一区| 成人网在线免费视频| 亚洲精品国产一区二区三区四区在线| 欧美日韩国产精选| 精品无人码麻豆乱码1区2区| 一色屋精品亚洲香蕉网站| 欧美一区二区三区在线视频| 国产精品一二三| 亚洲一区欧美一区| 久久久久国产精品人| 91福利区一区二区三区| 激情综合色播五月| 亚洲一区中文日韩| 国产亚洲午夜高清国产拍精品| 日本精品一级二级| 久久精品国产免费| 亚洲综合另类小说| 日本一区二区在线不卡| 欧美丰满嫩嫩电影| av男人天堂一区| 精品一区免费av| 亚洲国产综合人成综合网站| 久久久久国产成人精品亚洲午夜 | 亚洲国产中文字幕| 欧美国产精品劲爆| 欧美成人国产一区二区| 欧美亚洲综合久久| 成人的网站免费观看| 六月丁香综合在线视频| 亚洲综合在线电影| 国产精品毛片无遮挡高清| 日韩欧美不卡在线观看视频| 日本精品裸体写真集在线观看| 国内精品国产成人国产三级粉色| 亚洲国产va精品久久久不卡综合 | 色综合婷婷久久| 国产九色精品成人porny| 日韩国产精品久久| 性做久久久久久| 亚洲精品视频自拍| 中文字幕欧美一区| 日本一区二区在线不卡| 精品日韩av一区二区| 91精品中文字幕一区二区三区| 色婷婷久久久综合中文字幕| 成人成人成人在线视频| 国产aⅴ综合色| 国产成人av网站| 欧美性色综合网| 91在线视频播放地址| 国产99久久久国产精品潘金网站| 激情六月婷婷综合| 国内精品久久久久影院薰衣草| 日本中文一区二区三区| 日韩国产成人精品| 日韩精品一二三| 免费的国产精品| 精品一区中文字幕| 国产中文字幕一区| 国产成人精品亚洲午夜麻豆| 国产精品一区免费视频| 国产精一品亚洲二区在线视频| 国产一区二区女| 高清shemale亚洲人妖| 豆国产96在线|亚洲| 成人涩涩免费视频| 91尤物视频在线观看| 日本精品视频一区二区| 欧美日韩黄色一区二区| 91精品国产综合久久精品app| 欧美日韩国产乱码电影| 日韩欧美一级精品久久| 精品国产乱码久久久久久久 | 日本一区二区三区电影| 久久午夜国产精品| 国产精品国产三级国产aⅴ入口| 国产精品国产三级国产aⅴ中文 | 国产高清久久久| 国产成人av自拍| 91视频国产观看| 欧美亚洲动漫制服丝袜| 在线成人高清不卡| 日韩精品最新网址| 中文字幕成人在线观看| 一区二区三区小说| 欧美aaaaaa午夜精品| 国产精品99久久久| 94色蜜桃网一区二区三区| 欧美日本在线视频| 国产亚洲欧美一区在线观看| 成人欧美一区二区三区黑人麻豆 | 激情综合色丁香一区二区| 高清日韩电视剧大全免费| 在线视频一区二区三| 91麻豆精品国产91久久久久久久久| 26uuu亚洲| 亚洲激情综合网| 国产在线播放一区三区四| www.激情成人| 日韩欧美中文字幕制服| 国产精品国产三级国产aⅴ入口 | 国产欧美日韩另类一区| 亚洲综合一区二区精品导航| 久久99精品国产麻豆不卡| 成人av集中营| 一区二区三区四区乱视频| 日本不卡视频在线| 91在线视频18| 精品国偷自产国产一区| 亚洲自拍偷拍av| 成人一区二区三区视频在线观看 | 3atv一区二区三区| 国产精品成人一区二区三区夜夜夜| 日韩精品福利网| 色噜噜狠狠一区二区三区果冻| 日韩欧美国产一二三区| 亚洲精品写真福利| 成人综合婷婷国产精品久久蜜臀| 欧美日韩一区二区电影| 亚洲欧洲精品一区二区精品久久久 | av不卡在线播放| 精品91自产拍在线观看一区| 香蕉加勒比综合久久| 色综合久久六月婷婷中文字幕| 久久久综合网站| 久久99精品国产.久久久久久| 欧美三级韩国三级日本三斤| 久久精品亚洲精品国产欧美kt∨| 日韩av电影免费观看高清完整版 | 亚洲精品免费视频| 福利一区二区在线| 337p粉嫩大胆噜噜噜噜噜91av| 日本特黄久久久高潮| 欧美日韩在线电影| 尤物av一区二区| 91蜜桃免费观看视频| 国产精品麻豆欧美日韩ww| 国产精品18久久久久久久网站| 欧美电视剧免费全集观看| 日本不卡一区二区| 这里只有精品免费| 亚洲成人综合网站| 欧美日韩小视频| 亚洲成人在线观看视频| 欧美三区在线观看| 午夜精品一区在线观看| 欧美日韩视频第一区| 亚洲bt欧美bt精品777| 欧美色视频一区| 三级在线观看一区二区| 欧美日本乱大交xxxxx| 亚洲综合一二三区| 欧美视频精品在线| 日韩精品三区四区| 日韩欧美精品在线视频| 韩国欧美一区二区| 国产清纯白嫩初高生在线观看91 | 亚洲视频你懂的| 色综合天天综合网国产成人综合天 | 日韩欧美高清在线| 久久精品国产秦先生| 亚洲在线视频网站| 日本韩国欧美一区二区三区| 亚洲日本欧美天堂| 欧美丝袜丝交足nylons| 人妖欧美一区二区| 久久久另类综合| 91蜜桃网址入口| 同产精品九九九| 亚洲精品在线免费播放| 粉嫩一区二区三区在线看| 亚洲视频网在线直播| 欧美日韩视频在线一区二区| 青青草视频一区| 国产欧美1区2区3区| 在线观看中文字幕不卡| 免费成人av在线| 国产欧美精品一区| 欧美在线免费播放| 精品一区二区三区免费视频|