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

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

?? cdrom-standard.tex

?? 嵌入式系統設計與實驗教材二源碼linux內核移植與編譯
?? TEX
?? 第 1 頁 / 共 4 頁
字號:
\documentclass{article}\def\version{$Id: cdrom-standard.tex,v 1.9 1997/12/28 15:42:49 david Exp $}\newcommand{\newsection}[1]{\newpage\section{#1}}\evensidemargin=0pt\oddsidemargin=0pt\topmargin=-\headheight \advance\topmargin by -\headsep\textwidth=15.99cm \textheight=24.62cm % normal A4, 1'' margin\def\linux{{\sc Linux}}\def\cdrom{{\sc cd-rom}}\def\UCD{{\sc Uniform cd-rom Driver}}\def\cdromc{{\tt {cdrom.c}}}\def\cdromh{{\tt {cdrom.h}}}\def\fo{\sl}                    % foreign words\def\ie{{\fo i.e.}}\def\eg{{\fo e.g.}}\everymath{\it} \everydisplay{\it}\catcode `\_=\active \def_{\_\penalty100 }\catcode`\<=\active \def<#1>{{\langle\hbox{\rm#1}\rangle}}\begin{document}\title{A \linux\ \cdrom\ standard}\author{David van Leeuwen\\{\normalsize\tt david@ElseWare.cistron.nl}\\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}\\{\footnotesize updated by Jens Axboe {\tt(axboe@image.dk)}}}\date{12 March 1999}\maketitle\newsection{Introduction}\linux\ is probably the Unix-like operating system that supportsthe widest variety of hardware devices. The reasons for this arepresumably \begin{itemize} \item   The large list of hardware devices available for the many platforms  that \linux\ now supports (\ie, i386-PCs, Sparc Suns, etc.)\item   The open design of the operating system, such that anybody can write a  driver for \linux.\item   There is plenty of source code around as examples of how to write a driver.\end{itemize}The openness of \linux, and the many different types of availablehardware has allowed \linux\ to support many different hardware devices.Unfortunately, the very openness that has allowed \linux\ to supportall these different devices has also allowed the behavior of eachdevice driver to differ significantly from one device to another.This divergence of behavior has been very significant for \cdrom\devices; the way a particular drive reacts to a `standard' $ioctl()$call varies greatly from one device driver to another. To avoid makingtheir drivers totally inconsistent, the writers of \linux\ \cdrom\drivers generally created new device drivers by understanding, copying,and then changing an existing one. Unfortunately, this practice did notmaintain uniform behavior across all the \linux\ \cdrom\ drivers. This document describes an effort to establish Uniform behavior acrossall the different \cdrom\ device drivers for \linux. This document alsodefines the various $ioctl$s, and how the low-level \cdrom\ devicedrivers should implement them. Currently (as of the \linux\ 2.1.$x$development kernels) several low-level \cdrom\ device drivers, includingboth IDE/ATAPI and SCSI, now use this Uniform interface.When the \cdrom\ was developed, the interface between the \cdrom\ driveand the computer was not specified in the standards. As a result, manydifferent \cdrom\ interfaces were developed. Some of them had theirown proprietary design (Sony, Mitsumi, Panasonic, Philips), othermanufacturers adopted an existing electrical interface and changedthe functionality (CreativeLabs/SoundBlaster, Teac, Funai) or simplyadapted their drives to one or more of the already existing electricalinterfaces (Aztech, Sanyo, Funai, Vertos, Longshine, Optics Storage andmost of the `NoName' manufacturers). In cases where a new drive reallybrought its own interface or used its own command set and flow controlscheme, either a separate driver had to be written, or an existingdriver had to be enhanced. History has delivered us \cdrom\ support formany of these different interfaces. Nowadays, almost all new \cdrom\drives are either IDE/ATAPI or SCSI, and it is very unlikely that anymanufacturer will create a new interface. Even finding drives for theold proprietary interfaces is getting difficult.When (in the 1.3.70's) I looked at the existing software interface,which was expressed through \cdromh, it appeared to be a rather wildset of commands and data formats.\footnote{I cannot recollect whatkernel version I looked at, then, presumably 1.2.13 and 1.3.34---thelatest kernel that I was indirectly involved in.} It seemed that manyfeatures of the software interface had been added to accommodate thecapabilities of a particular drive, in an {\fo ad hoc\/} manner. Moreimportantly, it appeared that the behavior of the `standard' commandswas different for most of the different drivers: \eg, some driversclose the tray if an $open()$ call occurs when the tray is open, whileothers do not. Some drivers lock the door upon opening the device, toprevent an incoherent file system, but others don't, to allow softwareejection. Undoubtedly, the capabilities of the different drives vary,but even when two drives have the same capability their drivers'behavior was usually different.I decided to start a discussion on how to make all the \linux\ \cdrom\drivers behave more uniformly. I began by contacting the developers ofthe many \cdrom\ drivers found in the \linux\ kernel. Their reactionsencouraged me to write the \UCD\ which this document is intended todescribe. The implementation of the \UCD\ is in the file \cdromc. Thisdriver is intended to be an additional software layer that sits on topof the low-level device drivers for each \cdrom\ drive. By adding thisadditional layer, it is possible to have all the different \cdrom\devices behave {\em exactly\/} the same (insofar as the underlyinghardware will allow).The goal of the \UCD\ is {\em not\/} to alienate driver developers whohave not yet taken steps to support this effort. The goal of \UCD\ issimply to give people writing application programs for \cdrom\ drives{\em one\/} \linux\ \cdrom\ interface with consistent behavior for all\cdrom\ devices. In addition, this also provides a consistent interfacebetween the low-level device driver code and the \linux\ kernel. Careis taken that 100\,\% compatibility exists with the data structures andprogrammer's interface defined in \cdromh. This guide was written tohelp \cdrom\ driver developers adapt their code to use the \UCD\ codedefined in \cdromc.Personally, I think that the most important hardware interfaces arethe IDE/ATAPI drives and, of course, the SCSI drives, but as pricesof hardware drop continuously, it is also likely that people may havemore than one \cdrom\ drive, possibly of mixed types. It is importantthat these drives behave in the same way. In December 1994, one of thecheapest \cdrom\ drives was a Philips cm206, a double-speed proprietarydrive. In the months that I was busy writing a \linux\ driver for it,proprietary drives became obsolete and IDE/ATAPI drives became thestandard. At the time of the last update to this document (November1997) it is becoming difficult to even {\em find} anything less than a16 speed \cdrom\ drive, and 24 speed drives are common.\newsection{Standardizing through another software level}\label{cdrom.c}At the time this document was conceived, all drivers directlyimplemented the \cdrom\ $ioctl()$ calls through their own routines. Thisled to the danger of different drivers forgetting to do important thingslike checking that the user was giving the driver valid data. Moreimportantly, this led to the divergence of behavior, which has alreadybeen discussed.For this reason, the \UCD\ was created to enforce consistent \cdrom\drive behavior, and to provide a common set of services to the variouslow-level \cdrom\ device drivers. The \UCD\ now provides anothersoftware-level, that separates the $ioctl()$ and $open()$ implementationfrom the actual hardware implementation. Note that this effort hasmade few changes which will affect a user's application programs. Thegreatest change involved moving the contents of the various low-level\cdrom\ drivers' header files to the kernel's cdrom directory. This wasdone to help ensure that the user is only presented with only one cdrominterface, the interface defined in \cdromh.\cdrom\ drives are specific enough (\ie, different from otherblock-devices such as floppy or hard disc drives), to define a setof common {\em \cdrom\ device operations}, $<cdrom-device>_dops$.These operations are different from the classical block-device fileoperations, $<block-device>_fops$.The routines for the \UCD\ interface level are implemented in the file\cdromc. In this file, the \UCD\ interfaces with the kernel as a blockdevice by registering the following general $struct\ file_operations$:$$\halign{$#$\ \hfil&$#$\ \hfil&$/*$ \rm# $*/$\hfil\crstruct& file_operations\ cdrom_fops = \{\hidewidth\cr        &NULL,                  & lseek \cr        &block_read,            & read---general block-dev read \cr        &block_write,           & write---general block-dev write \cr        &NULL,                  & readdir \cr        &NULL,                  & select \cr        &cdrom_ioctl,           & ioctl \cr        &NULL,                  & mmap \cr        &cdrom_open,            & open \cr        &cdrom_release,         & release \cr        &NULL,                  & fsync \cr        &NULL,                  & fasync \cr        &cdrom_media_changed,   & media change \cr        &NULL                   & revalidate \cr\};\cr}$$ Every active \cdrom\ device shares this $struct$. The routinesdeclared above are all implemented in \cdromc, since this file is theplace where the behavior of all \cdrom-devices is defined andstandardized. The actual interface to the various types of \cdrom\ hardware is still performed by various low-level \cdrom-devicedrivers. These routines simply implement certain {\em capabilities\/}that are common to all \cdrom\ (and really, all removable-mediadevices).Registration of a low-level \cdrom\ device driver is now done throughthe general routines in \cdromc, not through the Virtual File System(VFS) any more. The interface implemented in \cdromc\ is carried outthrough two general structures that contain information about thecapabilities of the driver, and the specific drives on which thedriver operates. The structures are:\begin{description}\item[$cdrom_device_ops$]   This structure contains information about the low-level driver for a  \cdrom\ device. This structure is conceptually connected to the major  number of the device (although some drivers may have different  major numbers, as is the case for the IDE driver).\item[$cdrom_device_info$]   This structure contains information about a particular \cdrom\ drive,  such as its device name, speed, etc. This structure is conceptually  connected to the minor number of the device.\end{description}Registering a particular \cdrom\ drive with the \UCD\ is done by thelow-level device driver though a call to:$$register_cdrom(struct\ cdrom_device_info * <device>_info)  $$The device information structure, $<device>_info$, contains all theinformation needed for the kernel to interface with the low-level\cdrom\ device driver. One of the most important entries in thisstructure is a pointer to the $cdrom_device_ops$ structure of thelow-level driver.The device operations structure, $cdrom_device_ops$, contains a listof pointers to the functions which are implemented in the low-leveldevice driver. When \cdromc\ accesses a \cdrom\ device, it does itthrough the functions in this structure. It is impossible to know allthe capabilities of future \cdrom\ drives, so it is expected that thislist may need to be expanded from time to time as new technologies aredeveloped. For example, CD-R and CD-R/W drives are beginning to becomepopular, and support will soon need to be added for them. For now, thecurrent $struct$ is:$$\halign{$#$\ \hfil&$#$\ \hfil&\hbox to 10em{$#$\hss}&  $/*$ \rm# $*/$\hfil\crstruct& cdrom_device_ops\ \{ \hidewidth\cr  &int& (* open)(struct\ cdrom_device_info *, int)\cr  &void& (* release)(struct\ cdrom_device_info *);\cr   &int& (* drive_status)(struct\ cdrom_device_info *, int);\cr       &int& (* media_changed)(struct\ cdrom_device_info *, int);\cr   &int& (* tray_move)(struct\ cdrom_device_info *, int);\cr  &int& (* lock_door)(struct\ cdrom_device_info *, int);\cr  &int& (* select_speed)(struct\ cdrom_device_info *, int);\cr  &int& (* select_disc)(struct\ cdrom_device_info *, int);\cr  &int& (* get_last_session) (struct\ cdrom_device_info *,         struct\ cdrom_multisession *{});\cr  &int& (* get_mcn)(struct\ cdrom_device_info *, struct\ cdrom_mcn *{});\cr  &int& (* reset)(struct\ cdrom_device_info *);\cr  &int& (* audio_ioctl)(struct\ cdrom_device_info *, unsigned\ int,         void *{});\cr   &int& (* dev_ioctl)(struct\ cdrom_device_info *, unsigned\ int,         unsigned\ long);\cr\noalign{\medskip}  &const\ int& capability;& capability flags \cr  &int& n_minors;& number of active minor devices \cr\};\cr}$$When a low-level device driver implements one of these capabilities,it should add a function pointer to this $struct$. When a particularfunction is not implemented, however, this $struct$ should contain aNULL instead. The $capability$ flags specify the capabilities of the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久不卡8050| 欧美亚洲国产bt| 精品国产三级电影在线观看| 日韩国产一二三区| 欧美精品第一页| 久久精品国产久精国产爱| 欧美一级二级三级乱码| 久久精品99国产精品日本| 精品美女在线播放| 国产很黄免费观看久久| 国产精品―色哟哟| 91成人在线精品| 天堂在线亚洲视频| 日韩精品一区二区三区在线 | 中文字幕第一页久久| 成人免费精品视频| 亚洲亚洲精品在线观看| 91精品国产高清一区二区三区| 麻豆精品视频在线观看免费| 国产丝袜美腿一区二区三区| 成人午夜又粗又硬又大| 樱桃国产成人精品视频| 欧美一级在线免费| 国产福利精品导航| 亚洲制服丝袜av| 久久久综合网站| 色综合天天综合网国产成人综合天| 亚洲综合一二区| 久久综合网色—综合色88| voyeur盗摄精品| 午夜伦欧美伦电影理论片| 国产午夜精品在线观看| 欧美视频在线播放| 国产在线不卡一卡二卡三卡四卡| 中文字幕亚洲一区二区va在线| 欧美日韩一区二区三区四区五区| 激情综合五月婷婷| 亚洲综合男人的天堂| 2021久久国产精品不只是精品| av亚洲精华国产精华精华| 日本欧美一区二区三区| 国产精品乱人伦| 日韩一二三四区| 色婷婷激情久久| 国产精品2024| 丝袜亚洲另类丝袜在线| 国产精品护士白丝一区av| 欧美一区二区免费观在线| 97精品国产97久久久久久久久久久久| 五月婷婷综合网| 亚洲日本青草视频在线怡红院 | 99精品在线观看视频| 麻豆精品久久久| 亚洲人成精品久久久久| 久久久久国产精品麻豆| 91精品蜜臀在线一区尤物| 97精品久久久午夜一区二区三区| 激情文学综合丁香| 日产精品久久久久久久性色| 亚洲视频 欧洲视频| 久久久国际精品| 欧美成人精品高清在线播放| 91成人免费网站| 91亚洲精品久久久蜜桃网站 | 久久久久九九视频| 日韩欧美的一区二区| 欧美日本视频在线| 色婷婷一区二区| 波多野结衣在线一区| 黄色日韩三级电影| 麻豆视频观看网址久久| 亚洲第一成人在线| 亚洲一区二区精品3399| 亚洲欧美日韩久久| 亚洲天堂成人网| 亚洲欧美怡红院| 国产精品对白交换视频| 国产欧美一区二区在线| 久久久一区二区| 2欧美一区二区三区在线观看视频| 欧美喷潮久久久xxxxx| 欧美伊人久久久久久久久影院| 不卡的电影网站| 95精品视频在线| 91在线视频网址| 91蝌蚪porny| 91黄色激情网站| 色婷婷综合久久久中文字幕| 色8久久精品久久久久久蜜| 色哟哟在线观看一区二区三区| 91免费国产在线观看| 91成人在线免费观看| 欧美女孩性生活视频| 69久久99精品久久久久婷婷| 制服丝袜在线91| 精品国产免费一区二区三区四区| 精品精品国产高清a毛片牛牛| 精品第一国产综合精品aⅴ| 久久久久国产精品麻豆ai换脸| 日本一区二区三区四区在线视频 | 91精品国产一区二区三区蜜臀| 欧美日韩国产综合一区二区| 91麻豆精品国产91久久久久| 日韩西西人体444www| 久久伊99综合婷婷久久伊| 中文字幕免费观看一区| 亚洲色图清纯唯美| 亚洲成av人综合在线观看| 免费成人在线视频观看| 国产不卡免费视频| 一本一本大道香蕉久在线精品 | 久久精品视频免费| 中文字幕一区免费在线观看| 亚洲高清三级视频| 精品一区二区三区在线观看| 成人av在线影院| 欧美色图12p| 久久亚洲私人国产精品va媚药| 国产精品无人区| 午夜精品久久久久久久99水蜜桃| 激情文学综合插| 日本福利一区二区| 欧美不卡一区二区三区| 中文字幕一区二区在线观看| 美日韩一区二区三区| 成人aa视频在线观看| 91麻豆精品国产91久久久久久久久 | 精品久久久久久无| 国产精品久久夜| 蜜臀a∨国产成人精品| 99久久精品情趣| 欧美tickling网站挠脚心| 亚洲免费资源在线播放| 国产精品主播直播| 56国语精品自产拍在线观看| 中文字幕视频一区| 精品一区二区三区不卡 | 久久综合五月天婷婷伊人| 亚洲自拍偷拍网站| 国产99久久久国产精品潘金网站| 6080国产精品一区二区| 曰韩精品一区二区| 成人福利电影精品一区二区在线观看| 欧美精品在线观看播放| 亚洲男人天堂av网| 成人高清免费观看| 国产欧美精品一区| 美日韩黄色大片| 欧美性生活一区| 欧美精品欧美精品系列| 国产精品视频在线看| 日韩电影免费一区| 欧美自拍丝袜亚洲| 国产亚洲综合在线| 日产精品久久久久久久性色| 91在线观看美女| 国产精品嫩草影院av蜜臀| 琪琪一区二区三区| 色偷偷88欧美精品久久久| 911精品国产一区二区在线| 亚洲另类色综合网站| 成人午夜在线免费| 久久中文字幕电影| 亚洲一区在线播放| 色悠久久久久综合欧美99| 欧美高清在线一区| 国产精品99久久久久久久vr | 粗大黑人巨茎大战欧美成人| 欧美少妇bbb| 亚洲桃色在线一区| 亚洲va欧美va国产va天堂影院| 成人永久aaa| 日韩欧美一级二级三级| 蜜桃视频一区二区三区在线观看| 欧美性色欧美a在线播放| 亚洲欧美综合另类在线卡通| 国产剧情一区在线| 日韩欧美一区在线| 人妖欧美一区二区| 67194成人在线观看| 亚洲国产欧美在线| 色噜噜狠狠一区二区三区果冻| 国产精品久久久久久久久果冻传媒 | 久久无码av三级| 国内精品伊人久久久久影院对白| 欧美日韩欧美一区二区| 午夜视频在线观看一区二区三区| 91热门视频在线观看| 亚洲天堂精品在线观看| 色综合久久久久| 日韩中文字幕麻豆| 欧美一区二区三区四区在线观看| 亚洲一区二区欧美日韩| 欧美色欧美亚洲另类二区| 美国av一区二区| 久久免费的精品国产v∧| 国产伦精一区二区三区| 69成人精品免费视频| 国产高清视频一区| 亚洲国产成人在线|