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

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

?? seagate.c

?? 內核是系統的心臟
?? C
?? 第 1 頁 / 共 3 頁
字號:
                                ++buffer;
                                len = buffer->length;
                                data = (unsigned char *) buffer->address;
#if (DEBUG & DEBUG_SG)
	printk("scsi%d : next scatter-gather buffer len = %d address = %08x\n",
		hostno, len, data);
#endif
                        }
			break;

		case REQ_DATAIN : 
#ifdef SLOW_HANDSHAKE
	if (borken) {
#if (DEBUG & (PHASE_DATAIN))
		transfered += len;
#endif
		for (; len && (STATUS & (REQ_MASK | STAT_REQ)) == (REQ_DATAIN |
			STAT_REQ); --len) {
				*data++ = DATA;
				borken_wait();
}
#if (DEBUG & (PHASE_DATAIN))
		transfered -= len;
#endif
	} else
#endif
#ifdef FAST
if (fast && transfersize && !(len % transfersize) && (len >= transfersize)
#ifdef FAST32
	&& !(transfersize % 4)
#endif
	) {
#if (DEBUG & DEBUG_FAST) 
        printk("scsi%d : FAST transfer, underflow = %d, transfersize = %d\n"
               "         len = %d, data = %08x\n", hostno, SCint->underflow, 
               SCint->transfersize, len, data);
#endif
        __asm__("
	cld;
"
#ifdef FAST32
"	shr $2, %%ecx;
1:	movl (%%esi), %%eax;
	stosl;
"
#else
"1:	movb (%%esi), %%al;
        stosb;
"
#endif

"	loop 1b;" : :
        /* input */
        "S" (st0x_dr), "D" (data), "c" (SCint->transfersize) :
        /* clobbered */
        "eax", "ecx", "edi");

	len -= transfersize;
	data += transfersize;

#if (DEBUG & PHASE_DATAIN)
	printk("scsi%d: transfered += %d\n", hostno, transfersize);
	transfered += transfersize;
#endif

#if (DEBUG & DEBUG_FAST)
	printk("scsi%d : FAST transfer complete len = %d data = %08x\n", 
		hostno, len, data);
#endif

} else
#endif
{

#if (DEBUG & PHASE_DATAIN)
	printk("scsi%d: transfered += %d\n", hostno, len);
	transfered += len;	/* Assume we'll transfer it all, then
				   subtract what we *didn't* transfer */
#endif
	
/*
 * 	We loop as long as we are in a data in phase, there is room to read, 
 * 	and BSY is still active
 */
 
			__asm__ (
/*
	Local variables : 
	ecx = len
	edi = data
	esi = st0x_cr_sr
	ebx = st0x_dr

	Test for room to read
*/
	"\torl %%ecx, %%ecx
	jz 2f

	cld
	movl _st0x_cr_sr, %%esi
	movl _st0x_dr, %%ebx

1:	movb (%%esi), %%al\n"
/*
	Test for BSY
*/

	"\ttest $1, %%al 
	jz 2f\n"

/*
	Test for data in phase - STATUS & REQ_MASK should be REQ_DATAIN, = STAT_IO, which is 4.
*/
	"\tmovb $0xe, %%ah	
	andb %%al, %%ah
	cmpb $0x04, %%ah
	jne 2f\n"
		
/*
	Test for REQ
*/	
	"\ttest $0x10, %%al
	jz 1b

	movb (%%ebx), %%al	
	stosb	
	loop 1b\n"

"2:\n"
									:
/* output */
"=D" (data), "=c" (len) :
/* input */
"0" (data), "1" (len) :
/* clobbered */
"eax","ebx", "esi"); 

#if (DEBUG & PHASE_DATAIN)
	printk("scsi%d: transfered -= %d\n", hostno, len);
	transfered -= len;		/* Since we assumed all of Len got 
					 * transfered, correct our mistake */
#endif
}
	
                        if (!len && nobuffs) {
                                --nobuffs;
                                ++buffer;
                                len = buffer->length;
                                data = (unsigned char *) buffer->address;
#if (DEBUG & DEBUG_SG)
	printk("scsi%d : next scatter-gather buffer len = %d address = %08x\n",
		hostno, len, data);
#endif
                        }

			break;

		case REQ_CMDOUT : 
			while (((status_read = STATUS) & STAT_BSY) && 
			       ((status_read & REQ_MASK) == REQ_CMDOUT))
				if (status_read & STAT_REQ) {
					DATA = *(unsigned char *) cmnd;
					cmnd = 1+(unsigned char *) cmnd;
#ifdef SLOW_HANDSHAKE
					if (borken) 
						borken_wait();
#endif
				}
			break;
	
		case REQ_STATIN : 
			status = DATA;
			break;
				
		case REQ_MSGOUT : 
/*
 *	We can only have sent a MSG OUT if we requested to do this 
 *	by raising ATTN.  So, we must drop ATTN.
 */

			CONTROL = BASE_CMD | CMD_DRVR_ENABLE;
/*
 * 	If we are reconecting, then we must send an IDENTIFY message in 
 *	 response  to MSGOUT.
 */
			switch (reselect) {
			case CAN_RECONNECT:
				DATA = IDENTIFY(1, lun);

#if (DEBUG & (PHASE_RESELECT | PHASE_MSGOUT)) 
				printk("scsi%d : sent IDENTIFY message.\n", hostno);
#endif
				break;
#ifdef LINKED
			case LINKED_WRONG:
				DATA = ABORT;
				linked_connected = 0;
				reselect = CAN_RECONNECT;
				goto connect_loop;
#if (DEBUG & (PHASE_MSGOUT | DEBUG_LINKED))
				printk("scsi%d : sent ABORT message to cancle incorrect I_T_L nexus.\n", hostno);
#endif
#endif /* LINKED */
#if (DEBUG & DEBUG_LINKED) 
	    printk("correct\n");
#endif
			default:
				DATA = NOP;
				printk("scsi%d : target %d requested MSGOUT, sent NOP message.\n", hostno, target);
			}
			break;
					
		case REQ_MSGIN : 
			switch (message = DATA) {
			case DISCONNECT :
				should_reconnect = 1;
                                current_data = data;    /* WDE add */
				current_buffer = buffer;
                                current_bufflen = len;  /* WDE add */
				current_nobuffs = nobuffs;
#ifdef LINKED
				linked_connected = 0;
#endif
				done=1;
#if (DEBUG & (PHASE_RESELECT | PHASE_MSGIN))
				printk("scsi%d : disconnected.\n", hostno);
#endif
				break;

#ifdef LINKED
			case LINKED_CMD_COMPLETE:
			case LINKED_FLG_CMD_COMPLETE:
#endif
			case COMMAND_COMPLETE :
/*
 * Note : we should check for underflow here.   
 */
#if (DEBUG & PHASE_MSGIN)	
				printk("scsi%d : command complete.\n", hostno);
#endif
				done = 1;
				break;
			case ABORT :
#if (DEBUG & PHASE_MSGIN)
				printk("scsi%d : abort message.\n", hostno);
#endif
				done=1;
				break;
			case SAVE_POINTERS :
				current_buffer = buffer;
                                current_bufflen = len;  /* WDE add */
				current_data = data;	/* WDE mod */
				current_nobuffs = nobuffs;
#if (DEBUG & PHASE_MSGIN)
				printk("scsi%d : pointers saved.\n", hostno);
#endif 
				break;
			case RESTORE_POINTERS:
				buffer=current_buffer;
				cmnd=current_cmnd;
				data=current_data;	/* WDE mod */
				len=current_bufflen;
				nobuffs=current_nobuffs;
#if (DEBUG & PHASE_MSGIN)
				printk("scsi%d : pointers restored.\n", hostno);
#endif
				break;
			default:

/*
 * 	IDENTIFY distinguishes itself from the other messages by setting the
 *	high byte.
 * 	
 *	Note : we need to handle at least one outstanding command per LUN,
 *	and need to hash the SCSI command for that I_T_L nexus based on the 
 *	known ID (at this point) and LUN.
 */

				if (message & 0x80) {
#if (DEBUG & PHASE_MSGIN)
					printk("scsi%d : IDENTIFY message received from id %d, lun %d.\n",
						hostno, target, message & 7);
#endif
				} else {

/*
 *      We should go into a MESSAGE OUT phase, and send  a MESSAGE_REJECT 
 * 	if we run into a message that we don't like.  The seagate driver 
 * 	needs some serious restructuring first though.
 */

#if (DEBUG & PHASE_MSGIN)
					printk("scsi%d : unknown message %d from target %d.\n",
						hostno,  message,   target);
#endif	
				}
			}
			break;

		default : 
			printk("scsi%d : unknown phase.\n", hostno); 
			st0x_aborted = DID_ERROR; 
		}	

#ifdef SLOW_HANDSHAKE
/*
 * I really don't care to deal with borken devices in each single 
 * byte transfer case (ie, message in, message out, status), so
 * I'll do the wait here if necessary.
 */
		if (borken)
			borken_wait();
#endif
 
		} /* if ends */
		} /* while ends */

#if (DEBUG & (PHASE_DATAIN | PHASE_DATAOUT | PHASE_EXIT))
	printk("scsi%d : Transfered %d bytes\n", hostno, transfered);
#endif

#if (DEBUG & PHASE_EXIT)
#if 0		/* Doesn't work for scatter / gather */
	printk("Buffer : \n");
	for (i = 0; i < 20; ++i) 
		printk ("%02x  ", ((unsigned char *) data)[i]);	/* WDE mod */
	printk("\n");
#endif
	printk("scsi%d : status = ", hostno);
        print_status(status);
	printk("message = %02x\n", message);
#endif


/* We shouldn't reach this until *after* BSY has been deasserted */
#ifdef notyet
	if (st0x_aborted) {
		if (STATUS & STAT_BSY) {	
			seagate_st0x_reset(NULL);
			st0x_aborted = DID_RESET;
		} 
		abort_confirm = 1;
	} 
#endif

#ifdef LINKED
else {
/*
 * Fix the message byte so that unsuspecting high level drivers don't 
 * puke when they see a LINKED COMMAND message in place of the COMMAND 
 * COMPLETE they may be expecting.  Shouldn't be necessary, but it's 
 * better to be on the safe side. 
 *
 * A non LINKED* message byte will indicate that the command completed, 
 * and we are now disconnected.
 */

		switch (message) {
		case LINKED_CMD_COMPLETE :
		case LINKED_FLG_CMD_COMPLETE : 
			message = COMMAND_COMPLETE;
			linked_target = current_target;
			linked_lun = current_lun;
			linked_connected = 1;
#if (DEBUG & DEBUG_LINKED)
			printk("scsi%d : keeping I_T_L nexus established for linked command.\n", 
				hostno);
#endif
/*
 * We also will need to adjust status to accomodate intermediate conditions.
 */
			if ((status == INTERMEDIATE_GOOD) ||
				(status == INTERMEDIATE_C_GOOD))
				status = GOOD;
			
			break;
/*
 * We should also handle what are "normal" termination messages 
 * here (ABORT, BUS_DEVICE_RESET?, and COMMAND_COMPLETE individually, 
 * and flake if things aren't right.
 */

		default :
#if (DEBUG & DEBUG_LINKED)
			printk("scsi%d : closing I_T_L nexus.\n", hostno);
#endif
			linked_connected = 0;
		}
	}
#endif /* LINKED */




	if (should_reconnect) {
#if (DEBUG & PHASE_RESELECT)
		printk("scsi%d : exiting seagate_st0x_queue_command() with reconnect enabled.\n",
			hostno);
#endif
		CONTROL = BASE_CMD | CMD_INTR ;
	} else 
		CONTROL = BASE_CMD;

	return retcode (st0x_aborted);
	}

int seagate_st0x_abort (Scsi_Cmnd * SCpnt, int code)
	{
	if (code)
		st0x_aborted = code;
	else
		st0x_aborted = DID_ABORT;

		return 0;
	}

/*
	the seagate_st0x_reset function resets the SCSI bus
*/
	
int seagate_st0x_reset (Scsi_Cmnd * SCpnt)
	{
	unsigned clock;
	/*
		No timeouts - this command is going to fail because 
		it was reset.
	*/

#ifdef DEBUG
	printk("In seagate_st0x_reset()\n");
#endif


	/* assert  RESET signal on SCSI bus.  */
		
	CONTROL = BASE_CMD  | CMD_RST;
	clock=jiffies+2;

	
	/* Wait.  */
	
	while (jiffies < clock);

	CONTROL = BASE_CMD;
	
	st0x_aborted = DID_RESET;

#ifdef DEBUG
	printk("SCSI bus reset.\n");
#endif
	if(SCpnt) SCpnt->flags |= NEEDS_JUMPSTART;
	return 0;
	}

#ifdef CONFIG_BLK_DEV_SD

#include <asm/segment.h>
#include "sd.h"
#include "scsi_ioctl.h"

int seagate_st0x_biosparam(int size, int dev, int* ip) {
  unsigned char buf[256 + sizeof(int) * 2], cmd[6], *data, *page;
  int *sizes, result, formatted_sectors, total_sectors;
  int cylinders, heads, sectors;

  Scsi_Device *disk;

  disk = rscsi_disks[MINOR(dev) >> 4].device;

/*
 * Only SCSI-I CCS drives and later implement the necessary mode sense 
 * pages.  
 */

  if (disk->scsi_level < 2) 
	return -1;

  sizes = (int *) buf;
  data = (unsigned char *) (sizes + 2);

  cmd[0] = MODE_SENSE;
  cmd[1] = (disk->lun << 5) & 0xe5;
  cmd[2] = 0x04; /* Read page 4, rigid disk geometry page current values */
  cmd[3] = 0;
  cmd[4] = 255;
  cmd[5] = 0;

/*
 * We are transfering 0 bytes in the out direction, and expect to get back
 * 24 bytes for each mode page.
 */

  sizes[0] = 0;
  sizes[1] = 256;

  memcpy (data, cmd, 6);

  if (!(result = kernel_scsi_ioctl (disk, SCSI_IOCTL_SEND_COMMAND, (void *) buf))) {
/*
 * The mode page lies beyond the MODE SENSE header, with length 4, and 
 * the BLOCK DESCRIPTOR, with length header[3].
 */

    page = data + 4 + data[3];
    heads = (int) page[5];
    cylinders = (page[2] << 16) | (page[3] << 8) | page[4];

    cmd[2] = 0x03; /* Read page 3, format page current values */
    memcpy (data, cmd, 6);

    if (!(result = kernel_scsi_ioctl (disk, SCSI_IOCTL_SEND_COMMAND, (void *) buf))) {
      page = data + 4 + data[3];
      sectors = (page[10] << 8) | page[11];	

	
/*
 * Get the total number of formatted sectors from the block descriptor, 
 * so we can tell how many are being used for alternates.  
 */

      formatted_sectors = (data[4 + 1] << 16) | (data[4 + 2] << 8) |
	data[4 + 3] ;

      total_sectors = (heads * cylinders * sectors);

/*
 * Adjust the real geometry by subtracting 
 * (spare sectors / (heads * tracks)) cylinders from the number of cylinders.
 *
 * It appears that the CE cylinder CAN be a partial cylinder.
 */

     
printk("scsi%d : heads = %d cylinders = %d sectors = %d total = %d formatted = %d\n",
    hostno, heads, cylinders, sectors, total_sectors, formatted_sectors);

      if (!heads || !sectors || !cylinders)
	result = -1;
      else
	cylinders -= ((total_sectors - formatted_sectors) / (heads * sectors));

/*
 * Now, we need to do a sanity check on the geometry to see if it is 
 * BIOS compatable.  The maximum BIOS geometry is 1024 cylinders * 
 * 256 heads * 64 sectors. 
 */

      if ((cylinders > 1024) || (sectors > 64)) 
	result = -1;
      else {
	ip[0] = heads;
	ip[1] = sectors;
	ip[2] = cylinders;
      }

/* 
 * There should be an alternate mapping for things the seagate doesn't
 * understand, but I couldn't say what it is with reasonable certainty.
 */

      }
    }
    
  return result;
}
#endif /* CONFIG_BLK_DEV_SD */

#endif	/* defined(CONFIG_SCSI_SEGATE) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品免费视频| 欧美卡1卡2卡| 久久久精品欧美丰满| 26uuu亚洲综合色| 中文字幕的久久| 日韩二区三区四区| 4438x成人网最大色成网站| 亚洲欧洲色图综合| 色一情一伦一子一伦一区| 国产精品电影一区二区| 国产综合一区二区| 国产亚洲欧美日韩在线一区| 日产欧产美韩系列久久99| 欧美色网站导航| 国产精品电影一区二区| 一本色道久久综合亚洲精品按摩| 中文字幕av一区二区三区| av中文字幕在线不卡| 亚洲免费高清视频在线| 欧美日韩另类国产亚洲欧美一级| 亚洲伊人伊色伊影伊综合网| 3d动漫精品啪啪一区二区竹菊| 精品一区二区三区免费视频| 日本一区二区三区免费乱视频| 欧美日韩激情一区| 裸体歌舞表演一区二区| 久久久国产一区二区三区四区小说 | 91啪亚洲精品| 亚洲午夜一区二区| av高清不卡在线| 亚洲成人动漫在线免费观看| 日韩欧美一级精品久久| 91蜜桃在线观看| 久久精品99国产精品日本| 精品久久久久香蕉网| 99久久国产综合精品麻豆 | 精品一区二区三区久久| 一区二区三区欧美亚洲| 337p粉嫩大胆噜噜噜噜噜91av | 日韩欧美成人激情| 不卡av在线网| 成人av手机在线观看| 丝袜亚洲另类欧美综合| 亚洲特黄一级片| 久久久不卡网国产精品二区| 欧美亚洲综合一区| 99re这里都是精品| 懂色av中文一区二区三区| 日韩专区在线视频| 亚洲电影激情视频网站| 亚洲美女屁股眼交3| 欧美不卡123| 精品国产乱码久久久久久闺蜜 | ww久久中文字幕| 欧美日韩视频在线第一区| 色吊一区二区三区| www.亚洲人| 99久久国产综合色|国产精品| 成人av在线一区二区| a4yy欧美一区二区三区| av午夜一区麻豆| 99re热视频这里只精品| 国产91精品久久久久久久网曝门| 国产一区二区在线观看免费| 激情小说亚洲一区| 成人免费视频网站在线观看| 91麻豆精东视频| 欧美大片在线观看| 中文字幕永久在线不卡| 国产欧美日韩卡一| 中文字幕精品在线不卡| 国产欧美一区二区精品忘忧草| 久久天堂av综合合色蜜桃网| 国产精品色一区二区三区| 中文字幕乱码久久午夜不卡| 亚洲国产精品久久久男人的天堂| 午夜精品一区二区三区免费视频 | 精品国产一二三区| 亚洲少妇30p| 久88久久88久久久| 色欧美乱欧美15图片| 欧美电影免费观看高清完整版在线观看 | 色欧美乱欧美15图片| www激情久久| 性做久久久久久免费观看欧美| 国产原创一区二区| 91成人在线精品| 久久久久久99久久久精品网站| 一区二区三区四区乱视频| 欧美影片第一页| 国产精品你懂的| 福利视频网站一区二区三区| 2014亚洲片线观看视频免费| 丝袜诱惑亚洲看片| 在线观看不卡一区| **性色生活片久久毛片| 国产69精品久久久久毛片| 欧美一二三四区在线| 丝袜国产日韩另类美女| 欧美亚洲国产一区二区三区va| 国产精品视频一二| 国产丶欧美丶日本不卡视频| 久久久亚洲精华液精华液精华液| 奇米四色…亚洲| 精品国产一区久久| 日韩中文字幕不卡| 日韩欧美亚洲一区二区| 久久精品国产99国产精品| 日韩写真欧美这视频| 精品午夜久久福利影院| 久久老女人爱爱| 不卡视频一二三| 亚洲一区视频在线观看视频| 欧美精品久久99| 日韩专区在线视频| 26uuu亚洲| 欧美色老头old∨ideo| 麻豆一区二区三区| 国产欧美日韩不卡免费| 成人av网址在线观看| 亚洲午夜一二三区视频| 51精品秘密在线观看| 国产乱人伦精品一区二区在线观看 | 国产成人免费在线观看| 日韩美女视频一区二区| 欧美大片一区二区三区| 风流少妇一区二区| 亚洲高清免费一级二级三级| 久久综合久久综合九色| 99国产欧美久久久精品| 免费人成在线不卡| 国产精品视频免费看| 在线电影院国产精品| 成人网页在线观看| 日韩精品亚洲一区二区三区免费| 欧美r级在线观看| 欧美亚洲国产一区二区三区 | 成人性生交大片免费看视频在线 | 中文字幕欧美一| 日韩免费性生活视频播放| 福利91精品一区二区三区| 麻豆免费看一区二区三区| 亚洲午夜在线电影| 日韩一区有码在线| 国产精品人人做人人爽人人添| 日韩欧美一区二区久久婷婷| 91.com视频| 91同城在线观看| 成人h动漫精品| 蜜臀av一级做a爰片久久| 亚洲精品中文在线观看| 一区二区三区中文字幕精品精品 | 国产精品看片你懂得| 亚洲日本中文字幕区| 亚洲视频一二区| 国产精品视频看| 亚洲午夜在线电影| 午夜久久福利影院| 日本欧美久久久久免费播放网| 亚洲成av人影院| 免费人成精品欧美精品| 国内久久精品视频| av在线播放一区二区三区| 色婷婷精品久久二区二区蜜臀av | 色噜噜久久综合| 欧美一区二区三区日韩视频| 欧美日韩国产高清一区二区| 欧美日韩国产精选| 亚洲精品在线免费播放| 亚洲精品视频在线看| 视频一区二区三区中文字幕| 国产乱子伦一区二区三区国色天香| 成人精品视频.| 91精品国产综合久久久久久| 国产亚洲精品久| 亚洲一区二区av电影| 亚洲成人第一页| 欧美专区亚洲专区| 久久理论电影网| 五月天激情综合网| 97久久精品人人爽人人爽蜜臀 | 国产精品一区二区在线观看不卡| 韩国理伦片一区二区三区在线播放 | 国产精品美女一区二区三区| 天涯成人国产亚洲精品一区av| 国产福利精品导航| 日韩一级视频免费观看在线| 亚洲色欲色欲www在线观看| 国产在线精品免费| 欧美放荡的少妇| 亚洲黄一区二区三区| 国产精品一区二区在线播放| 日韩欧美黄色影院| 亚洲制服丝袜一区| 91黄色激情网站| 亚洲影院在线观看| 欧美日韩国产免费| 亚洲成a人片在线观看中文| 在线看不卡av| 亚洲一二三区在线观看|