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

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

?? ncr.c

?? 國產CPU-龍芯(loongson)BIOS源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*	$OpenBSD: ncr.c,v 1.46 1999/06/06 23:17:24 deraadt Exp $	*//*	$NetBSD: ncr.c,v 1.63 1997/09/23 02:39:15 perry Exp $	*//******************************************************************************  Id: ncr.c,v 1.112 1997/11/07 09:20:56 phk Exp****  Device driver for the   NCR 53C8xx   PCI-SCSI-Controller.****  FreeBSD / NetBSD / OpenBSD****-------------------------------------------------------------------------****  Written for 386bsd and FreeBSD by**	Wolfgang Stanglmeier	<wolf@cologne.de>**	Stefan Esser		<se@mi.Uni-Koeln.de>****  Ported to NetBSD by**	Charles M. Hannum	<mycroft@gnu.ai.mit.edu>****  Modified for big endian systems by**	Per Fogelstrom for RTMX Inc, North Carolina. <pefo@opsycon.se>****-------------------------------------------------------------------------**** Copyright (c) 1994 Wolfgang Stanglmeier.  All rights reserved.**** Redistribution and use in source and binary forms, with or without** modification, are permitted provided that the following conditions** are met:** 1. Redistributions of source code must retain the above copyright**    notice, this list of conditions and the following disclaimer.** 2. Redistributions in binary form must reproduce the above copyright**    notice, this list of conditions and the following disclaimer in the**    documentation and/or other materials provided with the distribution.** 3. The name of the author may not be used to endorse or promote products**    derived from this software without specific prior written permission.**** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.******************************************************************************/#define NCR_DATE "pl24 96/12/14"#define NCR_VERSION	(2)#define	MAX_UNITS	(16)#define NCR_GETCC_WITHMSG#if defined (__FreeBSD__) && defined(KERNEL)#include "opt_ncr.h"#endif /* defined (__FreeBSD__) && defined(KERNEL) */#ifdef FAILSAFE#ifndef SCSI_NCR_DFLT_TAGS#define	SCSI_NCR_DFLT_TAGS (0)#endif /* SCSI_NCR_DFLT_TAGS */#define	NCR_CDROM_ASYNC#endif /* FAILSAFE *//*==========================================================****	Configuration and Debugging****	May be overwritten in <arch/conf/xxxx>****==========================================================*//***    SCSI address of this device.**    The boot routines should have set it.**    If not, use this.*/#ifndef SCSI_NCR_MYADDR#define SCSI_NCR_MYADDR      (7)#endif /* SCSI_NCR_MYADDR *//***    The default synchronous period factor**    (0=asynchronous)**    If maximum synchronous frequency is defined, use it instead.*/#ifndef	SCSI_NCR_MAX_SYNC#ifndef SCSI_NCR_DFLT_SYNC#define SCSI_NCR_DFLT_SYNC   (12)#endif /* SCSI_NCR_DFLT_SYNC */#else#if	SCSI_NCR_MAX_SYNC == 0#define	SCSI_NCR_DFLT_SYNC 0#else#define	SCSI_NCR_DFLT_SYNC (250000 / SCSI_NCR_MAX_SYNC)#endif#endif/***    The minimal asynchronous pre-scaler period (ns)**    Shall be 40.*/#ifndef SCSI_NCR_MIN_ASYNC#define SCSI_NCR_MIN_ASYNC   (40)#endif /* SCSI_NCR_MIN_ASYNC *//***    The maximal bus with (in log2 byte)**    (0=8 bit, 1=16 bit)*/#ifndef SCSI_NCR_MAX_WIDE#define SCSI_NCR_MAX_WIDE   (1)#endif /* SCSI_NCR_MAX_WIDE *//***    The maximum number of tags per logic unit.**    Used only for disk devices that support tags.*/#ifndef SCSI_NCR_DFLT_TAGS#define SCSI_NCR_DFLT_TAGS    (4)#endif /* SCSI_NCR_DFLT_TAGS *//*==========================================================****      Configuration and Debugging****==========================================================*//***    Number of targets supported by the driver.**    n permits target numbers 0..n-1.**    Default is 16, meaning targets #0..#15.**    #7 is the host adapter.*/#define MAX_TARGET  (16)/***    Number of logic units supported by the driver.**    n enables logic unit numbers 0..n-1.**    The common SCSI devices require only**    one lun, so take 1 as the default.*/#ifndef	MAX_LUN#define MAX_LUN     (8)#endif	/* MAX_LUN *//***    The maximum number of jobs scheduled for starting.**    There should be one slot per target, and one slot**    for each tag of each target in use.**    The calculation below is actually quite silly ...*/#define MAX_START   (MAX_TARGET + (MAX_TARGET - 1) * SCSI_NCR_DFLT_TAGS)/***    The maximum number of segments a transfer is split into.*/#define MAX_SCATTER (33)/***    The maximum transfer length (should be >= 64k).**    MUST NOT be greater than (MAX_SCATTER-1) * PAGE_SIZE.*/#ifdef __OpenBSD__#define MAX_SIZE  ((MAX_SCATTER-1) * (long) NBPG)#else#define MAX_SIZE  ((MAX_SCATTER-1) * (long) PAGE_SIZE)#endif/***	other*/#define NCR_SNOOP_TIMEOUT (1000000)/*==========================================================****      Include files****==========================================================*/#ifdef __OpenBSD__#ifdef _KERNEL#define KERNEL#endif#else#include <stddef.h>#endif#define	offsetof(type, member)	((size_t)(&((type *)0)->member))#include <sys/param.h>#include <sys/time.h>#ifdef KERNEL#include <sys/systm.h>#include <sys/malloc.h>#include <sys/buf.h>#include <sys/kernel.h>#ifndef __OpenBSD__#include <sys/sysctl.h>#include <machine/clock.h>#endif#include <vm/vm.h>#if 0#include <vm/pmap.h>#include <vm/vm_extern.h>#endif#endif /* KERNEL */#ifndef __OpenBSD__#include <pci/pcivar.h>#include <pci/pcireg.h>#include <pci/ncrreg.h>#else#include <sys/device.h>#include <machine/bus.h>#include <machine/intr.h>#include <dev/pci/ncrreg.h>#include <dev/pci/pcireg.h>#include <dev/pci/pcivar.h>#if !defined(__alpha__) && !defined(__mips__) && !defined(__powerpc__)#define DELAY(x)	delay(x)#endif#include <scsi/scsi_all.h>#endif /* __OpenBSD__ */#include <scsi/scsiconf.h>#ifdef __OpenBSD__#define	__BROKEN_INDIRECT_CONFIG#ifdef NCR_VERBOSE#define bootverbose	NCR_VERBOSE#else#define bootverbose	0#endif#endif#if !defined(NCR_KVATOPHYS)#define NCR_KVATOPHYS(sc, va) vtophys(va)#endif#if defined(__OpenBSD__) && defined(__alpha__)/* XXX XXX NEED REAL DMA MAPPING SUPPORT XXX XXX */#undef vtophys#define	vtophys(va)	alpha_XXX_dmamap((vm_offset_t)(va))#endif/*==========================================================****	Debugging tags****==========================================================*/#define DEBUG_ALLOC    (0x0001)#define DEBUG_PHASE    (0x0002)#define DEBUG_POLL     (0x0004)#define DEBUG_QUEUE    (0x0008)#define DEBUG_RESULT   (0x0010)#define DEBUG_SCATTER  (0x0020)#define DEBUG_SCRIPT   (0x0040)#define DEBUG_TINY     (0x0080)#define DEBUG_TIMING   (0x0100)#define DEBUG_NEGO     (0x0200)#define DEBUG_TAGS     (0x0400)#define DEBUG_FREEZE   (0x0800)#define DEBUG_RESTART  (0x1000)/***    Enable/Disable debug messages.**    Can be changed at runtime too.*/#ifdef SCSI_NCR_DEBUG	#define DEBUG_FLAGS ncr_debug#else /* SCSI_NCR_DEBUG */	#define SCSI_NCR_DEBUG	0	#define DEBUG_FLAGS	0#endif /* SCSI_NCR_DEBUG *//*==========================================================****	assert ()****==========================================================****	modified copy from 386bsd:/usr/include/sys/assert.h****----------------------------------------------------------*/#undef assert#define	assert(expression) { \	if (!(expression)) { \		(void)printf(\			"assertion \"%s\" failed: file \"%s\", line %d\n", \			#expression, \			__FILE__, __LINE__); \	} \}/*==========================================================****	Access to the controller chip.****==========================================================*/#ifdef __OpenBSD__#define	INB(r) \    INB_OFF(offsetof(struct ncr_reg, r))#define	INB_OFF(o) \    bus_space_read_1 (np->sc_st, np->sc_sh, (o))#define	INW(r) \    bus_space_read_2 (np->sc_st, np->sc_sh, offsetof(struct ncr_reg, r))#define	INL(r) \    INL_OFF(offsetof(struct ncr_reg, r))#define	INL_OFF(o) \    bus_space_read_4 (np->sc_st, np->sc_sh, (o))#define	OUTB(r, val) \    bus_space_write_1 (np->sc_st, np->sc_sh, offsetof(struct ncr_reg, r), (val))#define	OUTW(r, val) \    bus_space_write_2 (np->sc_st, np->sc_sh, offsetof(struct ncr_reg, r), (val))#define	OUTL(r, val) \    OUTL_OFF(offsetof(struct ncr_reg, r), (val))#define	OUTL_OFF(o, val) \    bus_space_write_4 (np->sc_st, np->sc_sh, (o), (val))#define	READSCRIPT_OFF(base, off) \    SCR_BO(base ? *((int32_t *)((char *)base + (off))) : \    bus_space_read_4 (np->ram_tag, np->ram_handle, off))#define	WRITESCRIPT_OFF(base, off, val) \    do {								\    	if (base)							\    		*((int32_t *)((char *)base + (off))) = (SCR_BO(val));	\    	else								\    		bus_space_write_4 (np->ram_tag, np->ram_handle, off, SCR_BO(val)); \    } while (0)#define	READSCRIPT(r) \    READSCRIPT_OFF(np->script, offsetof(struct script, r))#define	WRITESCRIPT(r, val) \    WRITESCRIPT_OFF(np->script, offsetof(struct script, r), val)#else /* !__OpenBSD__ */#ifdef NCR_IOMAPPED#define	INB(r) inb (np->port + offsetof(struct ncr_reg, r))#define	INB_OFF(o) inb (np->port + (o))#define	INW(r) inw (np->port + offsetof(struct ncr_reg, r))#define	INL(r) inl (np->port + offsetof(struct ncr_reg, r))#define	INL_OFF(o) inl (np->port + (o))#define	OUTB(r, val) outb (np->port+offsetof(struct ncr_reg,r),(val))#define	OUTW(r, val) outw (np->port+offsetof(struct ncr_reg,r),(val))#define	OUTL(r, val) outl (np->port+offsetof(struct ncr_reg,r),(val))#define	OUTL_OFF(o, val) outl (np->port+(o),(val))#else#define	INB(r) (np->reg->r)#define	INB_OFF(o) (*((volatile int8_t *)((char *)np->reg + (o))))#define	INW(r) (np->reg->r)#define	INL(r) (np->reg->r)#define	INL_OFF(o) (*((volatile int32_t *)((char *)np->reg + (o))))#define	OUTB(r, val) np->reg->r = (val)#define	OUTW(r, val) np->reg->r = (val)#define	OUTL(r, val) np->reg->r = (val)#define	OUTL_OFF(o, val) *((volatile int32_t *)((char *)np->reg + (o))) = val#endif#define	READSCRIPT_OFF(base, off) (*((int32_t *)((char *)base + (off))))#define	READSCRIPT(r) (np->script->r)#define	WRITESCRIPT(r, val) np->script->r = (val)#endif /* __OpenBSD__ *//***	Set bit field ON, OFF*/#define OUTONB(r, m)	OUTB(r, INB(r) | (m))#define OUTOFFB(r, m)	OUTB(r, INB(r) & ~(m))#define OUTONW(r, m)	OUTW(r, INW(r) | (m))#define OUTOFFW(r, m)	OUTW(r, INW(r) & ~(m))#define OUTONL(r, m)	OUTL(r, INL(r) | (m))#define OUTOFFL(r, m)	OUTL(r, INL(r) & ~(m))/*==========================================================****	Command control block states.****==========================================================*/#define HS_IDLE		(0)#define HS_BUSY		(1)#define HS_NEGOTIATE	(2)	/* sync/wide data transfer*/#define HS_DISCONNECT	(3)	/* Disconnected by target */#define HS_COMPLETE	(4)#define HS_SEL_TIMEOUT	(5)	/* Selection timeout      */#define HS_RESET	(6)	/* SCSI reset	     */#define HS_ABORTED	(7)	/* Transfer aborted       */#define HS_TIMEOUT	(8)	/* Software timeout       */#define HS_FAIL		(9)	/* SCSI or PCI bus errors */#define HS_UNEXPECTED	(10)	/* Unexpected disconnect  */#define HS_DONEMASK	(0xfc)/*==========================================================****	Software Interrupt Codes****==========================================================*/#define	SIR_SENSE_RESTART	(1)#define	SIR_SENSE_FAILED	(2)#define	SIR_STALL_RESTART	(3)#define	SIR_STALL_QUEUE		(4)#define	SIR_NEGO_SYNC		(5)#define	SIR_NEGO_WIDE		(6)#define	SIR_NEGO_FAILED		(7)#define	SIR_NEGO_PROTO		(8)#define	SIR_REJECT_RECEIVED	(9)#define	SIR_REJECT_SENT		(10)#define	SIR_IGN_RESIDUE		(11)#define	SIR_MISSING_SAVE	(12)#define	SIR_MAX			(12)/*==========================================================****	Extended error codes.**	xerr_status field of struct ccb.****==========================================================*/#define	XE_OK		(0)#define	XE_EXTRA_DATA	(1)	/* unexpected data phase */#define	XE_BAD_PHASE	(2)	/* illegal phase (4/5)   *//*==========================================================****	Negotiation status.**	nego_status field	of struct ccb.****==========================================================*/#define NS_SYNC		(1)#define NS_WIDE		(2)/*==========================================================****	"Special features" of targets.**	quirks field		of struct tcb.**	actualquirks field	of struct ccb.****==========================================================*/#define	QUIRK_AUTOSAVE	(0x01)#define	QUIRK_NOMSG	(0x02)#define QUIRK_NOSYNC	(0x10)#define QUIRK_NOWIDE16	(0x20)#define QUIRK_NOTAGS	(0x40)#define	QUIRK_UPDATE	(0x80)/*==========================================================****	Capability bits in Inquire response byte 7.****==========================================================*/#define	INQ7_QUEUE	(0x02)#define	INQ7_SYNC	(0x10)#define	INQ7_WIDE16	(0x20)/*==========================================================****	Misc.****==========================================================*/#define CCB_MAGIC	(0xf2691ad2)#define	MAX_TAGS	(16)		/* hard limit *//*==========================================================****	OS dependencies.****	Note that various types are defined in ncrreg.h.****==========================================================*/#define PRINT_ADDR(xp) sc_print_addr(xp->sc_link)/*==========================================================****	Declaration of structs.****==========================================================*/struct tcb;struct lcb;struct ccb;struct ncb;struct script;typedef struct ncb * ncb_p;typedef struct tcb * tcb_p;typedef struct lcb * lcb_p;typedef struct ccb * ccb_p;struct link {	ncrcmd	l_cmd;	ncrcmd	l_paddr;};struct	usrcmd {	u_long	target;	u_long	lun;	u_long	data;	u_long	cmd;};#define UC_SETSYNC      10#define UC_SETTAGS	11#define UC_SETDEBUG	12#define UC_SETORDER	13#define UC_SETWIDE	14#define UC_SETFLAG	15#define	UF_TRACE	(0x01)/*---------------------------------------****	Timestamps for profiling****---------------------------------------*/struct tstamp {	struct timeval	start;	struct timeval	end;	struct timeval	select;	struct timeval	command;	struct timeval	data;	struct timeval	status;	struct timeval	disconnect;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区精品视频| 激情综合色综合久久综合| 国产精品不卡在线观看| 韩日av一区二区| 欧美一二三区在线| 日韩精品一二区| 欧美二区三区的天堂| 午夜精品一区二区三区电影天堂| 欧美性一级生活| 亚洲国产一二三| 制服丝袜国产精品| 久久精品99久久久| 久久久精品一品道一区| 国产成人福利片| 国产精品国产三级国产aⅴ原创| 成人性生交大片免费看中文| 国产日韩欧美激情| 国产美女在线精品| 日韩美女视频19| 欧美日韩一级视频| 日产国产欧美视频一区精品| 欧美成人一区二区三区在线观看| 狠狠色狠狠色综合| 日本一区二区高清| 91免费视频大全| 热久久一区二区| 久久久蜜桃精品| 高清av一区二区| 国产亚洲精品福利| 一本一道久久a久久精品 | 福利一区二区在线观看| 亚洲欧美色一区| 色一情一伦一子一伦一区| 午夜免费久久看| 欧美精品一区二区高清在线观看| 大胆欧美人体老妇| 天堂资源在线中文精品| 欧美xxxx老人做受| 国产成人免费av在线| 一区二区三区四区视频精品免费 | 精品久久久久久无| 国产精品一二三| 夜夜嗨av一区二区三区中文字幕| 欧美精品三级日韩久久| 国产高清不卡二三区| 亚洲综合丁香婷婷六月香| 99久久精品国产一区二区三区| 亚洲第一搞黄网站| 国产日韩精品一区| 欧美福利视频导航| 成人激情文学综合网| 三级在线观看一区二区| 亚洲欧洲国产日韩| 日韩欧美中文字幕制服| 99久久夜色精品国产网站| 自拍偷拍国产亚洲| 99国产麻豆精品| 美女精品一区二区| 一区二区三区不卡视频| 91麻豆精品国产91久久久使用方法| 国产成人精品一区二区三区四区 | 99久久精品国产精品久久| 亚洲va韩国va欧美va| 日本一区二区成人在线| 日韩午夜中文字幕| 色屁屁一区二区| 国产91精品免费| 日韩激情av在线| 久久久国际精品| 欧美日韩在线不卡| 床上的激情91.| 久久精品国产澳门| 欧美伦理电影网| 9191国产精品| 日韩午夜激情电影| 日韩欧美国产综合在线一区二区三区 | 麻豆精品一区二区| 国产综合色在线| 不卡的电影网站| 在线视频综合导航| 欧美日韩电影一区| 精品国产一区二区三区久久影院| 久久综合成人精品亚洲另类欧美| 久久久久久久性| 成人欧美一区二区三区白人| 亚洲综合一区二区三区| 午夜久久电影网| 加勒比av一区二区| 99久久er热在这里只有精品66| 日本韩国视频一区二区| 欧美一级二级三级蜜桃| 欧美激情一区二区三区不卡| 亚洲激情图片小说视频| 喷白浆一区二区| 久久精品久久精品| 经典三级视频一区| 色综合天天天天做夜夜夜夜做| 91丨porny丨中文| 欧美日韩1234| 欧美精品一区二区三区高清aⅴ| 精品国产区一区| 亚洲人吸女人奶水| 蜜桃精品视频在线| 91网站在线观看视频| 欧美一级片免费看| 中文字幕亚洲综合久久菠萝蜜| 亚洲成人激情av| 成人高清视频免费观看| 欧美疯狂做受xxxx富婆| 国产嫩草影院久久久久| 午夜成人在线视频| 91丨porny丨蝌蚪视频| 日韩午夜精品电影| 一区二区三区在线播| 国产成a人亚洲| 日韩亚洲欧美在线| 亚洲一区二区视频在线观看| 国产高清久久久久| 日韩精品一区二区三区中文精品| 亚洲男人的天堂网| 国产一区二区三区在线观看免费视频 | 久久99精品久久久久久| 欧美日韩在线三级| 日韩美女久久久| 成人毛片视频在线观看| 精品久久久久香蕉网| 日韩国产在线观看| 在线视频亚洲一区| 亚洲日穴在线视频| 成人综合婷婷国产精品久久 | 成人成人成人在线视频| 日韩视频一区二区在线观看| 亚洲h动漫在线| 91亚洲大成网污www| 亚洲欧洲日韩综合一区二区| 国产成人在线视频免费播放| 欧美成人女星排行榜| 青青青爽久久午夜综合久久午夜| 欧美中文一区二区三区| 亚洲女与黑人做爰| 91麻豆福利精品推荐| 一色屋精品亚洲香蕉网站| 成人伦理片在线| 中文字幕av一区二区三区| 国产黄色精品网站| 国产人伦精品一区二区| 国产精品2024| 欧美激情一区二区三区不卡| 精品综合免费视频观看| 日韩免费成人网| 美女视频黄久久| 精品免费日韩av| 老司机精品视频线观看86| 欧美精品一区二区在线观看| 国产一区二三区好的| 国产精品高清亚洲| 成人18视频日本| 亚洲男女毛片无遮挡| 欧美中文字幕久久| 午夜视频在线观看一区二区三区| 在线精品观看国产| 午夜成人免费电影| 日韩亚洲欧美成人一区| 激情综合色播五月| 欧美一区二区免费观在线| 亚洲国产精品一区二区久久| 欧美日韩第一区日日骚| 国产精品网站一区| www.成人网.com| 一区二区三区在线观看动漫| 欧美日韩亚洲不卡| 久久精品国产免费| 国产午夜精品福利| 国产福利精品导航| 中文字幕日韩一区| 成人国产精品免费观看| 亚洲精品成a人| 欧美午夜电影在线播放| 日韩在线一区二区三区| 91小视频免费观看| 亚洲成人一区在线| 欧美精品一区二区高清在线观看| 美女一区二区视频| 日韩一区二区电影在线| 亚洲一区视频在线| 久久久影院官网| 欧美日韩视频在线第一区| 黄页网站大全一区二区| 亚洲乱码国产乱码精品精98午夜 | 欧美日韩一级黄| 国产91精品在线观看| 五月天亚洲精品| 136国产福利精品导航| 日韩三级精品电影久久久| 91网站在线观看视频| 狠狠色狠狠色综合系列| 午夜精品爽啪视频| 亚洲欧美日韩国产成人精品影院 | 怡红院av一区二区三区| 久久精品亚洲精品国产欧美kt∨|