The translation is temporarily closed for contributions due to maintenance, please come back later.

Translation

Example: Firmware download Many devices that have been developed are based on a general purpose processor with an additional USB core added to it. BecausSince the development of drivers and firmware for USB devices is still very new, many devices require the downloading of the firmware after they have been connected.
(itstool) path: sect1/para
English
Example: Firmware download Many devices that have been developed are based on a general purpose processor with an additional USB core added to it. Since the development of drivers and firmware for USB devices is still very new, many devices require the downloading of the firmware after they have been connected.
Context English Chinese (Simplified) (zh_CN) State
<primary>USB</primary> <secondary>probe</secondary> <primary>USB(通用串行总线)</primary><secondary>probe(探测)</secondary>
After the notification by the hub that a new device has been connected, the service layer switches on the port, providing the device with 100 mA of current. At this point the device is in its default state and listening to device address 0. The services layer will proceed to retrieve the various descriptors through the default pipe. After that it will send a Set Address request to move the device away from the default device address (address 0). Multiple device drivers might be able to support the device. For example a modem driver might be able to support an ISDN TA through the AT compatibility interface. A driver for that specific model of the ISDN adapter might however be able to provide much better support for this device. To support this flexibility, the probes return priorities indicating their level of support. Support for a specific revision of a product ranks the highest and the generic driver the lowest priority. It might also be that multiple drivers could attach to one device if there are multiple interfaces within one configuration. Each driver only needs to support a subset of the interfaces. 集中器(hub)通知新设备已连接后,服务层给端口加电(switch on), 为设备提供100mA的电流。 此时设备处于其默认状态,并监听设备地址0。服务层会通过默认 管道继续检取各种描述符。此后它将向设备发送Set Address请求,将设备 从默认设备地址(地址0)移开。可能有多个设备驱动程序支持此设备。例如, 一个调制解调器可能通过AT兼容接口支持ISDN TA。然而,特定型号的ISDN 适配器的驱动程序可能提供对此设备的更好支持。为了支持这样的灵活性, 探测会返回优先级,指示他们的支持级别。支持产品的特定版本会具有最高 优先级,通用驱动程序具有最低优先级。如果一个配置内有多个接口,也可能 多个驱动程序会连接到一个设备。每个驱动程序只需支持所有接口的一个子集。
The probing for a driver for a newly attached device checks first for device specific drivers. If not found, the probe code iterates over all supported configurations until a driver attaches in a configuration. To support devices with multiple drivers on different interfaces, the probe iterates over all interfaces in a configuration that have not yet been claimed by a driver. Configurations that exceed the power budget for the hub are ignored. During attach the driver should initialise the device to its proper state, but not reset it, as this will make the device disconnect itself from the bus and restart the probing process for it. To avoid consuming unnecessary bandwidth should not claim the interrupt pipe at attach time, but should postpone allocating the pipe until the file is opened and the data is actually used. When the file is closed the pipe should be closed again, even though the device might still be attached. 为新连接的设备探测驱动程序时,首先探测设备特定的驱动程序。 如果没有发现,则探测代码在所有支持的配置上重复探测过程,直到 在一个配置中连接到一个驱动程序。为了支持不同接口上使用多个驱动 程序的设备,探测会在一个配置中的所有尚未被驱动程序声明(claim)的 接口上重复进行。超出集中器功率预算的配置会被忽略。连接期间,驱动 程序应当把设备初始化到适当状态,但不能复位,因为那样会使得设备将 它自己从总线上断开,并重新启动探测过程。为了避免消耗不必要的带宽, 不应当在连接时声明中断管道,而应当延迟分配管道,直到打开文件并真的 使用数据。当关闭文件时,管道也应当被再次关闭,尽管设备可能仍然 连接着。
Device Disconnect and Detach 设备断开连接(disconnect)和分离(detach)
<primary>USB</primary> <secondary>disconnect</secondary> <primary>USB(通用串行总线)</primary><secondary>disconnect(断开)</secondary>
A device driver should expect to receive errors during any transaction with the device. The design of USB supports and encourages the disconnection of devices at any point in time. Drivers should make sure that they do the right thing when the device disappears. 设备驱动程序与设备进行任何事务期间,应当预期会接收到错误。 USB的设计支持并鼓励设备在任何点及时断开连接。驱动程序应当确保 当设备不在时做正确的事情。
Furthermore a device that has been disconnected and reconnected will not be reattached at the same device instance. This might change in the future when more devices support serial numbers (see the device descriptor) or other means of defining an identity for a device have been developed. 此外,断开连接(disconnect)后又重新连接(reconnect)的设备不会 被重新连接(reattach)为相同的设备实例。 将来当更多的设备支持序列号(参看设备描述符), 或开发出其他定义设备标识的方法的时候,这种情况可能会改变。
The disconnection of a device is signaled by a hub in the interrupt packet delivered to the hub driver. The status change information indicates which port has seen a connection change. The device detach method for all device drivers for the device connected on that port are called and the structures cleaned up. If the port status indicates that in the mean time a device has been connected to that port, the procedure for probing and attaching the device will be started. A device reset will produce a disconnect-connect sequence on the hub and will be handled as described above. 设备断开连接是由集中器在传递到集中器驱动程序的中断包中发 信号通知(signal)的。状态改变信息指示哪个端口发现了连接改变。 连接到那个端口上的设备的所有设备驱动程序共用的设备分离方法被调用, 结构被彻底清理。如果端口状态指示同时一个设备已经连接(connect)到那个 端口,则探测和连接设备的过程将被启动。设备复位将在集中器上产生 一个断开-连接序列,并将按上面所述进行处理。
USB Drivers Protocol Information USB驱动程序的协议信息
The protocol used over pipes other than the default pipe is undefined by the USB specification. Information on this can be found from various sources. The most accurate source is the developer's section on the USB home pages. From these pages, a growing number of deviceclass specifications are available. These specifications specify what a compliant device should look like from a driver perspective, basic functionality it needs to provide and the protocol that is to be used over the communication channels. The USB specification includes the description of the Hub Class. A class specification for Human Interface Devices (HID) has been created to cater for keyboards, tablets, bar-code readers, buttons, knobs, switches, etc. A third example is the class specification for mass storage devices. For a full list of device classes see the developers section on the USB home pages. USB规范没有定义除默认管道外其他管道上使用的协议。这方面的信息 可以从各种来源获得。最准确的来源是USB主页[1]上的开发者部分。从这些 页面上可以得到数目不断增长的设备类的规范。这些规范指定从驱动程序 角度看起来兼容设备应当怎样,它需要提供的基本功能和通信通道上使用的 协议。USB规范[2]包括了集中器类的描述。人机界面设备(HID)的类规范已经 创建出来,以迎合对键盘、数字输入板、条形码阅读器、按钮、旋钮(手柄knob)、 开关等的要求。另一个例子是用于大容量存储设备的类规范。设备类的完整列表 参看USB主页[1]的开发者部分。
For many devices the protocol information has not yet been published however. Information on the protocol being used might be available from the company making the device. Some companies will require you to sign a Non -Disclosure Agreement (NDA) before giving you the specifications. This in most cases precludes making the driver open source. 然而, 许多设备的协议信息还没有被公布。关于所用协议的信息 可能可以从制造设备的公司获得。一些公司会在给你规范之前要求你签署 保密协议(Non-Disclosure Agreement, NDA)。大多数情况下,这会阻止 将驱动程序开放源代码。
Another good source of information is the Linux driver sources, as a number of companies have started to provide drivers for Linux for their devices. It is always a good idea to contact the authors of those drivers for their source of information. 另一个信息的很好来源是Linux驱动程序源代码,因为很多公司已经 开始为他们的设备提供Linux下的驱动程序。联系那些驱动程序作者询问 他们的信息来源总是一个好主意。
Example: Human Interface Devices The specification for the Human Interface Devices like keyboards, mice, tablets, buttons, dials,etc. is referred to in other device class specifications and is used in many devices. 例子:人机界面设备。如键盘、鼠标、数字输入板、 按钮、拨号盘等的规范被其他设备类规范引用,并在很多设备中使用。
For example audio speakers provide endpoints to the digital to analogue converters and possibly an extra pipe for a microphone. They also provide a HID endpoint in a separate interface for the buttons and dials on the front of the device. The same is true for the monitor control class. It is straightforward to build support for these interfaces through the available kernel and userland libraries together with the HID class driver or the generic driver. Another device that serves as an example for interfaces within one configuration driven by different device drivers is a cheap keyboard with built-in legacy mouse port. To avoid having the cost of including the hardware for a USB hub in the device, manufacturers combined the mouse data received from the PS/2 port on the back of the keyboard and the key presses from the keyboard into two separate interfaces in the same configuration. The mouse and keyboard drivers each attach to the appropriate interface and allocate the pipes to the two independent endpoints. 例如,音频扬声器提供到数模转换器的端点,可能还提供额外管道 用于麦克风。它们也为设备前面的按钮和拨号盘在单独的接口中提供HID 端点。监视器控制类也是如此。通过可用的内核和用户空间的库,与HID 类驱动程序或通用驱动程序一起可以简单直接地创建对这些接口的支持。 另一个设备可以作为在一个配置中的多个接口由不同的设备驱动程序驱动 的例子,这个设备是一种便宜的键盘,带有老的鼠标接口。为了避免在 设备中为USB集中器包括一个硬件而导致的成本上升,制造商将从键盘背面的 PS/2端口接收到的鼠标数据与来自键盘的按键组合成在同一个配置中的 两个单独的接口。鼠标和键盘驱动程序各自连接到适当的接口,并分配到 两个独立端点的管道.
<primary>USB</primary> <secondary>firmware</secondary> <primary>USB(通用串行总线)</primary><secondary>firmware(固件)</secondary>
Example: Firmware download Many devices that have been developed are based on a general purpose processor with an additional USB core added to it. Since the development of drivers and firmware for USB devices is still very new, many devices require the downloading of the firmware after they have been connected. 例子:固件下载。已经开发出来的许多设备是基于通用目的处理器, 并将额外的USB核心加入其中。由于驱动程序的开发和USB设备的固件仍然 非常新,许多设备需要在连接(connect)之后下载固件。
The procedure followed is straightforward. The device identifies itself through a vendor and product Id. The first driver probes and attaches to it and downloads the firmware into it. After that the device soft resets itself and the driver is detached. After a short pause the device announces its presence on the bus. The device will have changed its vendor/product/revision Id to reflect the fact that it has been supplied with firmware and as a consequence a second driver will probe it and attach to it. 下面的步骤非常简明直接。设备通过供应商和产品ID标识自身。第一 个驱动程序探测并连接到它,并将固件下载到其中。此后设备自己软复位, 驱动程序分离。短暂的暂停之后设备宣布它在总线上的存在。设备将改变 其供应商/产品/版本的ID以反映其提供有固件的事实,因此另一个驱动程序 将探测它并连接(attach)到它。
An example of these types of devices is the ActiveWire I/O board, based on the EZ-USB chip. For this chip a generic firmware downloader is available. The firmware downloaded into the ActiveWire board changes the revision Id. It will then perform a soft reset of the USB part of the EZ-USB chip to disconnect from the USB bus and again reconnect. 这些类型的设备的一个例子是基于EZ-USB的ActiveWire I/O板。这个 芯片有一个通用固件下载器。下载到ActiveWire板子上的固件改变版本ID。 然后它将执行EZ-USB芯片的USB部分的软复位,从USB总线上断开,并再次 重新连接。
Example: Mass Storage Devices Support for mass storage devices is mainly built around existing protocols. The Iomega USB Zipdrive is based on the SCSI version of their drive. The SCSI commands and status messages are wrapped in blocks and transferred over the bulk pipes to and from the device, emulating a SCSI controller over the USB wire. ATAPI and UFI commands are supported in a similar fashion. 例子:大容量存储设备。对大容量存储设备的支持主要围绕现有的 协议构建。Iomega USB Zip驱动器是基于SCSI版本的驱动器。SCSI命令和 状态信息被包装到块中,在大块(bulk)管道上传输到/来自设备,在USB线 上模拟SCSI控制器。ATAPI和UFI命令以相似的方式被支持。
<primary>ATAPI</primary> <primary>ATAPI</primary>
The Mass Storage Specification supports 2 different types of wrapping of the command block.The initial attempt was based on sending the command and status through the default pipe and using bulk transfers for the data to be moved between the host and the device. Based on experience a second approach was designed that was based on wrapping the command and status blocks and sending them over the bulk out and in endpoint. The specification specifies exactly what has to happen when and what has to be done in case an error condition is encountered. The biggest challenge when writing drivers for these devices is to fit USB based protocol into the existing support for mass storage devices. CAM provides hooks to do this in a fairly straight forward way. ATAPI is less simple as historically the IDE interface has never had many different appearances. 大容量存储规范支持两种不同类型的对命令块的包装。最初的尝试 基于通过默认管道发送命令和状态信息,使用大块传输在host和设备之间 移动数据。在经验基础上设计出另一种方法,这种方法基于包装命令和 状态块,并在大块out和in端点上发送它们。规范精确地指定了何时必须 发生什么,以及在碰到错误条件的情况下应该做什么。为这些设备编写 驱动程序的最大挑战是协调基于USB的协议,让它适合已有的对大容量存储设备 的支持。CAM提供了钩子,以相当直接了当的方式来完成这个。ATAPI就 没有这么简单了,因为历史上IDE接口从未有过多种不同的表现方式。
The support for the USB floppy from Y-E Data is again less straightforward as a new command set has been designed. 来自Y-E Data的对USB软盘的支持也不是那么直观,因为设计了一套 新的命令集。
Newbus Newbus

<email>asmodai@FreeBSD.org</email>

<email>asmodai@FreeBSD.org</email>
<personname> <firstname>Jeroen</firstname> <surname>Ruigrok van der Werven (asmodai)</surname> </personname> <affiliation> <_:address-1/> </affiliation> <contrib>Written by </contrib> <personname> <firstname>Jeroen</firstname> <surname>Ruigrok van der Werven (asmodai)</surname> </personname> <affiliation> <_:address-1/> </affiliation> <contrib>Written by </contrib>

<email>hiten@uk.FreeBSD.org</email>

<email>hiten@uk.FreeBSD.org</email>
<personname> <firstname>Hiten</firstname> <surname>Pandya</surname> </personname> <affiliation> <_:address-1/> </affiliation> <personname> <firstname>Hiten</firstname> <surname>Pandya</surname> </personname> <affiliation> <_:address-1/> </affiliation>
<emphasis>Special thanks to Matthew N. Dodd, Warner Losh, Bill Paul, Doug Rabson, Mike Smith, Peter Wemm and Scott Long</emphasis>. <emphasis>特别感谢Matthew N. Dodd, Warner Losh, Bill Paul, Doug Rabson, Mike Smith, Peter Wemm and Scott Long</emphasis>.
This chapter explains the Newbus device framework in detail. 本章详细解释了Newbus设备框架。
Purpose of a Device Driver 设备驱动程序的目的
<primary>device driver</primary><secondary>introduction</secondary> <primary>device driver(设备驱动程序)</primary><secondary>introduction(介绍)</secondary>

Loading…

Example: Firmware download Many devices that have been developed are based on a general purpose processor with an additional USB core added to it. BecausSince the development of drivers and firmware for USB devices is still very new, many devices require the downloading of the firmware after they have been connected.
a month ago
Browse all component changes

Glossary

English Chinese (Simplified) (zh_CN)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect1/para
Source string location
book.translate.xml:22363
String age
a month ago
Source string age
a month ago
Translation file
books/zh_CN/arch-handbook.po, string 2480