1394 Bus Driver in Windows 7

June 18, 2009

Abstract

This paper provides information about IEEE 1394 support in Windows® 7. It provides information for 1394 developers to understand the new 1394 bus driver in Windows 7. The 1394 bus driver was rewritten for Windows 7 to provide support for higher speeds and alternative media, as defined in the IEEE-1394b specification. The 1394 bus driver that is included with Windows 7 replaces the 1394 bus drivers that were included with earlier versions of Windows. This paper provides information about the differences between the new 1394 bus driver implementation and the earlier implementation, as well as information about the new functionality that is included in the 1394 bus driver for Windows 7. This information applies to the Windows 7 operating system. References and resources discussed here are listed at the end of this paper. The current version of this paper is maintained on the Web at: http://www.microsoft.com/whdc/connect/1394_Windows7.mspx

2009 © 2009 Microsoft Corporation. EXPRESS. MSDN. IMPLIED OR STATUTORY. and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. logo. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. or other intellectual property. without the express written permission of Microsoft Corporation.1394 Bus Driver in Windows 7 . stored in or introduced into a retrieval system. products. person. domain names. trademarks. e-mail addresses. organizations. All rights reserved. place or event is intended or should be inferred. trademarks. photocopying. © 2009 Microsoft Corporation. AS TO THE INFORMATION IN THIS DOCUMENT. recording. places and events depicted herein are fictitious. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. copyrights. logos. and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. the furnishing of this document does not give you any license to these patents. Except as expressly provided in any written license agreement from Microsoft. or other intellectual property rights covering subject matter in this document. Complying with all applicable copyright laws is the responsibility of the user. and no association with any real company. Microsoft. mechanical. MICROSOFT MAKES NO WARRANTIES. product. 2009 First publication June 18. This White Paper is for informational purposes only. All rights reserved. the example companies. Unless otherwise noted. or transmitted in any form or by any means (electronic. or otherwise). email address. Document History Date Change June 18. or for any purpose.2 Disclaimer: This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein. Because Microsoft must respond to changing market conditions. organization. Microsoft may have patents. . patent applications. people. Without limiting the rights under copyright. it should not be interpreted to be a commitment on the part of Microsoft. no part of this document may be reproduced. domain name. copyrights.

............................................................................................... 10 1394 DDIs with Speed or Payload Changes .................. 18 June 18........................ 7 Previously Retrieved Configuration ROM ...................................................................................................... 11 REQUEST_ASYNC_READ ................................. 5 Configuration ROM Retrieval ......................... 12 REQUEST_ISOCH_MODIFY_STREAM_PROPERTIES ................................................................................................................................................................ 6 Device Driver Interface (DDI) Changes ............................................................................................................................. 6 Retrieving the Contents of a 1394 Node’s Configuration ROM ............... 8 Modifying the Default Behavior ................... 9 Registry Value Locations ............................................................................................... 12 REQUEST_ASYNC_STREAM.................................................................................................... All rights reserved........................................ 10 1394 DDI Speed and Payload Definitions ............................................. 12 REQUEST_GET_SPEED_BETWEEN_DEVICES ......................3 Contents Introduction ......... 5 All I/O Requests Pended ........................................................................................................................... 7 New Configuration ROM ............................................................................ 12 REQUEST_ISOCH_FREE_BANDWIDTH ..................................................................... ............................. 16 Resources ........................................... 13 Extended Bus Reset Notification DDIs .... 12 REQUEST_SET_DEVICE_XMIT_PROPERTIES ...................................................................................................................................... 15 Retrieve Configuration ROM DDI .. 11 REQUEST_ISOCH_ALLOCATE_RESOURCES ..................................................................................... 11 REQUEST_ISOCH_ALLOCATE_BANDWIDTH ............. 13 Determining New or Legacy DDI Support ............................................ 11 REQUEST_ASYNC_WRITE.............................................................................................................................................................................................................................1394 Bus Driver in Windows 7 ................................................. 4 Differences in Functional Behavior ............................................................ 6 Retrieving the Configuration ROM Header .................................................................. 13 PHY Packet Support DDIs ............................................................................................................................. 14 REQUEST_SEND_PHY_PACKET.................................................................. 4 New and Legacy 1394 Bus Drivers ............................................................................................................................................................... 9 Registry Values ............................................. 2009 © 2009 Microsoft Corporation........................................................................................ 5 IEEE-1394-1995 PHY Support ....................................................................................... 8 Gap Count Optimization....................... 6 Referencing NODE_DEVICE_EXTENSION ............ 14 REQUEST_RECEIVE_PHY_PACKETS ..................................................... 9 General DDI Changes......................................................................................................................

Figure 1 compares the new and the legacy 1394 bus drivers.SYS. New and Legacy 1394 Bus Drivers The new 1394 bus driver is a single (monolithic) device driver. 1394OHCI. This paper assumes that you are familiar with 1394 technology and its corresponding implementation for Windows.SYS. Changes to the device driver interfaces (DDIs) for the new 1394 bus driver.SYS 1394OHCI. The port driver is 1394BUS. All rights reserved. 2009 © 2009 Microsoft Corporation. It also assumes that you are familiar with the basic terminology that is related to Windows kernel-mode device drivers as well as basic knowledge of the 1394 DDIs and their corresponding I/O request blocks (IRBs). The legacy 1394 bus driver included multiple device drivers that were implemented by using the Windows Driver Model (WDM) in a port/miniport configuration. . This paper refers to the Windows 7 version of the 1394 bus driver as the new 1394 bus driver and the earlier version of the 1394 bus driver as the legacy 1394 bus driver.4 Introduction The 1394 bus driver was rewritten for Windows® 7 to add support for higher speeds and alternative media as defined in the IEEE-1394b specification.SYS. Legacy 1394 Bus Driver New 1394 Bus Driver 1394BUS.SYS OHCI1394.SYS Figure 1. which was implemented by using the kernel-mode driver framework (KMDF). For more information about 1394 and Windows kernel-mode device drivers. This paper provides the following information about the new 1394 bus driver:    Design and implementation differences between the new 1394 bus driver and the legacy 1394 bus driver. and the primary miniport driver is OHCI1394. see “Resources” at the end of this paper. Behavior of the new 1394 bus driver. Legacy versus new 1394 bus drivers June 18.1394 Bus Driver in Windows 7 .

SYS Additional AVC Subunits (Audio?) AVC.SYS and OHCI1394. Client device drivers must wait until I/O requests that are sent to the new 1394 bus driver complete.SYS MSDV.SYS 1394DBG. This differs from the behavior of the legacy 1394 bus driver.SYS SONYDCAM.SYS* * New 1394 bus driver. You can do this by using an I/O completion routine.SYS 1394 Driver Stack KD1394.SYS. .SYS Debug Tools Disk Subsystem 61883. All rights reserved.SYS SBP2PORT. This differs from the behavior of the legacy 1394 bus driver. This change in behavior is because the new 1394 bus driver is implemented by using KMDF instead of WDM. This section describes some of the known differences in behavior between the new 1394 bus driver and the legacy 1394 bus driver.5 Figure 2 shows the 1394 stack with the new 1394 bus driver and the Microsoftsupported 1394 client drivers. The status of the completed I/O request is in the IRP. Figure 2. where certain I/O requests complete immediately. June 18. MSTAPE. The new 1394 bus driver also uses the values that are specified in the generation and max_rom entries in the node’s configuration ROM header to improve the retrieval of the remaining content of the configuration ROM. 2009 © 2009 Microsoft Corporation. which uses asynchronous quadlet reads at S100 speed—or 100 megabits per second (Mbps). All I/O Requests Pended All I/O requests that are sent to the new 1394 bus driver return STATUS_PENDING. Replaces 1394BUS. 1394 Driver Stack Differences in Functional Behavior The new 1394 bus driver was designed to be fully backward compatible with the legacy 1394 bus driver. Configuration ROM Retrieval The new 1394 bus driver tries to use asynchronous block transactions at higher bus speeds to retrieve the contents of a node’s configuration ROM.DLL (1394 Kernel Debug) 1394OHCI.1394 Bus Driver in Windows 7 .

This device extension is described by the NODE_DEVICE_EXTENSION structure. Device Driver Interface (DDI) Changes The following are known changes in functional behavior of the 1394 DDIs between the new 1394 bus driver and the legacy 1394 bus driver: REQUEST_GET_LOCAL_HOST_INFO In the new 1394 bus driver. REQUEST_GET_SPEED_BETWEEN_DEVICES In the new 1394 bus driver.1394 Bus Driver in Windows 7 . see “Retrieving the Contents of a 1394 Node’s Configuration ROM” later in this paper. . and PortDeviceObject. setting nLevel to GET_HOST_CSR_CONTENTS and specifying the SPEED_MAP_LOCATION as CsrBaseAddress is not supported.GetMaxSpeedBetweenDevices. see ”IEEE 1394 Bus” in the Windows Driver Kit (WDK). they must ensure that the data that they access in this structure is valid. 2009 © 2009 Microsoft Corporation. DeviceObject. REQUEST_GET_SPEED_TOPOLOGY_MAPS This DDI has been obsolete since Windows 2000. June 18. Client device drivers must not reference these members. For more information about how the contents of a node's configuration ROM is processed. The USE_LOCAL_NODE flag must be set in the u. which is later used for device enumeration. The speed map is obsolete in the IEEE-1394a specification.fulFlags parameter. All other members of the NODE_DEVICE_EXTENSION structure are not static. The static members of the NODE_DEVICE_EXTENSION structure that contain valid data are Tag. this DDI returns only the speed between the local node and the device. All rights reserved. When client device drivers use the new 1394 bus driver. but the nonstatic members of the structure might not be valid. Referencing NODE_DEVICE_EXTENSION Some client device drivers reference the device extension in the 1394 bus driver that is associated with the physical device object (PDO) for the device. This requirement is because of the new 1394 bus driver’s exclusive use of short (arbitrated) bus resets. It does not support a PHY that supports IEEE-1394-1995. Retrieving the Contents of a 1394 Node’s Configuration ROM This section provides details about how the new 1394 bus driver retrieves the contents of a node’s configuration ROM. Calling this DDI on the new 1394 bus driver returns STATUS_INVALID_PARAMETER.6 For more information about the logic that the new 1394 bus driver uses to retrieve the contents of a node's configuration ROM. IEEE-1394-1995 PHY Support The new 1394 bus driver requires a physical layer (PHY) that supports IEEE-1394a or IEEE-1394b. In the new 1394 bus driver. Processing the contents of a node’s configuration ROM for device discovery has not changed for Windows 7 and therefore is not discussed. this structure remains at the same location as in the legacy 1394 bus driver.

If the asynchronous read transaction fails to complete at the slowest possible speed. then the new 1394 bus driver fails to retrieve the contents of the node’s configuration ROM. that speed is used for all further communication with the node until another 1394 bus reset occurs. Otherwise. All rights reserved. it proceeds to retrieve the remaining contents of the node’s configuration ROM. the new 1394 bus driver must retrieve the remaining contents of the node’s configuration ROM. The speed of communication with a node is determined during retrieval of the node's configuration ROM header. then the new 1394 bus driver sends another asynchronous read transaction to the node at a slower speed.1394 Bus Driver in Windows 7 . certain 1394 devices fail to respond to this transaction correctly. 2009 © 2009 Microsoft Corporation. However. Retrieving the Configuration ROM Header The first step to retrieve the contents of a node’s configuration ROM is to retrieve the node’s configuration ROM header. the new 1394 bus driver can reuse its cached version. If any asynchronous read transaction fails—regardless of the max_rom value—the new 1394 bus driver uses asynchronous quadlet read transactions to retrieve the remaining contents of the node’s configuration ROM. The new 1394 bus driver tries to retrieve the configuration ROM header in a single asynchronous block read transaction. The new 1394 bus driver tries to minimize the number of asynchronous read transactions that are sent to a node to retrieve the contents of the node's configuration ROM. as defined in the IEEE-1394a specification. This header includes the entire contents of the bus information block. June 18. The configuration ROM header is in the first five quadlets of a node’s configuration ROM. The new 1394 bus driver uses the max_rom value in the bus information block of the configuration ROM header to determine the size of the asynchronous read transactions to send to the node to retrieve the remaining contents of the configuration ROM.7 The new 1394 bus driver retrieves the contents of a node’s configuration ROM after a 1394 bus reset by sending asynchronous read transactions to the node. the new 1394 bus driver checks whether the contents of the node’s configuration ROM were previously retrieved. The new 1394 bus driver sends the asynchronous read transaction to the node at the highest supported speed and considers any slower nodes between the local node and the target node. . If the asynchronous read transaction fails to complete successfully at the highest supported speed. In this situation. New Configuration ROM If the new 1394 bus driver determines that the contents of the node’s configuration ROM was not previously retrieved. If so. After the configuration ROM header is retrieved. After the asynchronous transaction completes successfully at a particular speed. the new 1394 bus driver uses five asynchronous quadlet read transactions to retrieve the configuration ROM header. The new 1394 bus driver continues to send asynchronous read transactions to the node at slower and slower speeds until a transaction completes successfully.

If the generation value has not changed (or if it is set to 1. then determine whether the generation value in the bus information block also matches. if the system that is running the new 1394 bus driver has a host controller that complies with IEEE-1394b but all devices on the bus comply with IEEE-1394a. then the new 1394 bus driver considers the node to comply with IEEE-1394a. The new 1394 bus driver determines whether a device complies with IEEE-1394a by the speed setting in the node’s self-id packet. ”Modifying the Default Behavior. then the new 1394 bus driver considers the node to comply with IEEE-1394b. For more information. and chip_id-lo values in the bus information block of the node's configuration ROM header match those same values in the header of one of the driver's cached copies of configuration ROM contents. . it determines whether the header matches the header of one of the cached copies of configuration ROM contents that the driver previously retrieved. You can change the default gap count behavior by using a registry value. If the new 1394 bus driver fails to find a matching cached configuration ROM header or if it must reread the contents of the node’s configuration ROM because the generation value changed. The new 1394 bus driver does not compute the gap count. If the speed field contains any other value. then it reuses the cached configuration ROM contents. The gap count value that is used is based on table E-1 in the IEEE-1394a specification. If a node sets both of the bits in the speed (sp) field in the self-id packet. Gap count optimization occurs only if the new 1394 bus driver determines that the local node is the bus manager. Determine whether the node_vendor_id. then it follows the preceding steps to retrieve the contents of a new configuration ROM. excluding the local node. You can find descriptions of the configuration ROM values in the preceding steps in the IEEE-1394 specifications. 2009 © 2009 Microsoft Corporation. If a match is found in step 1.8 Previously Retrieved Configuration ROM After the new 1394 bus driver retrieves the contents of a node’s configuration ROM header. All rights reserved.” June 18. If the new 1394 bus driver finds a matching configuration ROM header. then the driver reuses the cached contents of the configuration ROM. 2. The new 1394 bus driver uses the following steps to determine whether it can reuse a cached copy of the contents of a node's configuration ROM: 1. which provides the gap count as a function of hops. which indicates that it never changes).1394 Bus Driver in Windows 7 . chip_id-hi. Gap Count Optimization The default behavior of the new 1394 bus driver is to optimize the gap count when it finds only IEEE-1394a devices on the 1394 bus. see the following section. then the new 1394 bus driver tries to optimize the gap count. For example.

You can do this by setting certain registry values that the new 1394 bus driver supports. All rights reserved.1394 Bus Driver in Windows 7 . 1394 Registry Values Name Type Value DisableGenerationCountCompare DWORD 0 or 1 Default Description 0 The new 1394 bus driver compares the generation count value in the self_id register of the 1394 controller with the generation count value that is received in the asynchronous receive DMA request context buffer when it processes received asynchronous requests. Setting this value to 1 disables generation count comparison. .9 Modifying the Default Behavior We understand that in some situations you might want to override the default behavior of the new 1394 bus driver. Registry Values Table 1 describes the registry values that the new 1394 bus driver supports. Table 1. The following location in the registry contains the global 1394 registry values: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\1394ohci \Parameters The following location in the registry contains the individual 1394 controller registry values: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class \{6BDD1FC1-810F-11D0-BEC7-08002BE2092F}\<NNNN> <NNNN> represents the instance identification number for each individual 1394 controller. You can specify all registry values either globally or for a particular 1394 controller. The new 1394 bus driver first queries the global 1394 registry values and then queries the individual 1394 controller registry values. Any registry values that are specified for a particular 1394 controller override any corresponding globally specified registry values. UseQuadletReadsForEnumeration DWORD 0 or 1 June 18. 2009 © 2009 Microsoft Corporation. Setting this value to 1 causes the new 1394 bus driver to use asynchronous quadlet read transactions to retrieve the contents of the configuration ROM. 0 Setting this value to 0 enables the default method for retrieving the contents of the configuration ROM. Registry Value Locations You can set the 1394-related registry values either globally for all 1394 controllers in the system or individually for each 1394 controller. Setting this value to 0 enables generation count comparison.

1394 DDI Speed and Payload Definitions Beginning with the Windows 7 WDK. Table 2. 1394. Asynchronous Payload Size Name Value ASYNC_PAYLOAD_800_RATE 4096 ASYNC_PAYLOAD_1600_RATE 4096 ASYNC_PAYLOAD_3200_RATE 4096 Description 800 Mb/s 160 Mb/s 3. topology Note: Enabling gap count optimization only optimizes the gap count for all 1394 bus topologies. End users must ensure that the gap count that is used is valid for their 1394 bus topology. The gap count value that is used is based on the table method. All rights reserved. . Table 2 describes the maximum asynchronous payload size for each of the newly supported speeds. includes definitions for higher speeds and greater sized payloads. the 1394 header file. as specified in the IEEE-1394a specification. EnablePersistentCycleStarts DWORD 0 or 1 0 General DDI Changes For Windows 7. DWORD 0 or 1 Optimize Setting this value to 0 disables gap for count optimization. For more information about these 1394 DDIs. Setting this value to 0 disables cycle start packets if no isochronous-capable nodes are found on the 1394 bus. Setting this value to 1 enables enumeration of IP1394 devices on the 1394 bus. Setting this value to 1 enables cycle start packets regardless of whether isochronous-capable nodes are found on the 1394 bus. including 1394b. This section describes the general DDI changes that the new 1394 bus driver supports. 2009 © 2009 Microsoft Corporation. Setting this value 1394a to 1 enables gap count optimization.10 Name EnumerateIP1394 Type Value DWORD 0 or 1 EnableGapCountOptimization Default Description 0 Setting this value to 0 disables enumeration of IP1394 devices on the 1394 bus.h. The following tables describe these new flags and values.200 Mb/s June 18. Note: The new 1394 bus driver disables and enables cycle start packets only if the local node is the bus manager. see the WDK. the 1394 DDIs were changed to support greater speeds as defined by the 1394b specification and enhanced to simplify the development of 1394 client drivers.1394 Bus Driver in Windows 7 .

where xxx is the (approximate) transfer rate in mbps. then the maximum packet size for the selected speed is used to divide these write requests. the maximum packet size for the device and speed selected is used to issue these read requests.600 Mb/s 3. Speed Codes Name SCODE_800_RATE SCODE_1600_RATE SCODE_3200_RATE Value 3 4 5 Description 800 Mb/s 1. If this parameter is zero. .SpeedSelected Specifies the actual speed that is selected to allocate bandwidth. We recommend that client drivers set the nBlockSize parameter to 0 so that the 1394 bus driver uses the maximum supported value. u. REQUEST_ISOCH_ALLOCATE_BANDWIDTH u. If this parameter is zero.IsochAllocateBandwidth. You can specify the new values in Table 2 for the nBlockSize parameter.nBlockSize Specifies the size of each individual block within the data stream that is read as a whole from the 1394 node. The value is one of SPEED_FLAGS_xxx (see the fulSpeed member description).1394 Bus Driver in Windows 7 . June 18. The possible speed values are SPEED_FLAGS_xxx.200 Mb/s 1394 DDIs with Speed or Payload Changes The following is a list of the 1394 I/O requests that use the new speed and payload size values that were described earlier in this paper: REQUEST_ASYNC_READ u.fulSpeed Specifies the connection speed to use to allocate bandwidth. Table 4. REQUEST_ASYNC_WRITE u. All rights reserved.IsochAllocateBandwidth. You can specify the new values in Table 2 for the nBlockSize parameter.11 Table 3 describes the speed flags for each of the newly supported speeds. Table 3. 2009 © 2009 Microsoft Corporation.AsyncWrite.AsyncRead.600 Mb/s 3.200 Mb/s Table 4 describes the speed code values for each of the newly supported speeds.nBlockSize Specifies the size of each individual block within the data stream that is written as a whole to the 1394 node. Speed Flags Name SPEED_FLAGS_800 SPEED_FLAGS_1600 SPEED_FLAGS_3200 Value 0x08 0x10 0x20 Description 800 Mb/s 1. We recommend that client drivers set the nBlockSize parameter to 0 so that the 1394 bus driver uses the maximum supported value.

June 18. The possible speed values are SPEED_FLAGS_xxx. REQUEST_ISOCH_ALLOCATE_RESOURCES u. The possible speed values are SPEED_FLAGS_xxx.AsyncStream. The possible speed values are SPEED_FLAGS_xxx.fulSpeed Specifies the maximum speed for transactions to the device. The possible speed values are SPEED_FLAGS_xxx.fulSpeed Specifies the connection speed to use to free bandwidth. REQUEST_SET_DEVICE_XMIT_PROPERTIES u.IsochModifyStreamProperties. You can specify the new values in Table 3 for the fulSpeed parameter.nSpeed Specifies the transfer rate. where xxx is the (approximate) transfer rate in mbps. where xxx is the (approximate) transfer rate in mbps. In all other situations. The new 1394 bus driver can return the new values in Table 3 in the SpeedSelected parameter. All rights reserved.IsochAllocateResources. You can specify the new values in Table 3 for the fulSpeed parameter.SetDeviceXmitProperties. the new 1394 bus driver ignores the fulSpeed parameter. where xxx is the (approximate) transfer rate in mbps. You can specify the new values in Table 3 for the fulSpeed parameter. where xxx is the (approximate) transfer rate in mbps.12 You can specify the new values in Table 3 for the fulSpeed parameter.fulSpeed Specifies the maximum speed for transactions to the device. REQUEST_ISOCH_MODIFY_STREAM_PROPERTIES u. The new 1394 bus driver uses the fulSpeed parameter only when the IRB_FLAG_ALLOW_REMOTE_FREE flag is set and the IRB_FLAG_USE_PRE_CALCULATE_VALUE flag is not set in the Flags parameter of the IRB. 2009 © 2009 Microsoft Corporation. . You can specify the new values in Table 3 for the fulSpeed parameter. You can specify the new values in Table 3 for the nSpeed parameter. REQUEST_ISOCH_FREE_BANDWIDTH u. The possible speed values are SPEED_FLAGS_xxx.IsochFreeBandwidth. REQUEST_ASYNC_STREAM u.fulSpeed Specifies the connection speed to use to communicate on the channel.1394 Bus Driver in Windows 7 . where xxx is the (approximate) transfer rate in mbps.

June 18.GetMaxSpeedBetweenDevices. USHORT MinorVersion. *PGET_LOCAL_HOST_INFO8. New REQUEST_GET_LOCAL_HOST_INFO nLevel value nLevel value Description GET_HOST_DDI_VERSION Returns the DDI version of the 1394 bus driver. The legacy 1394 bus driver returns a status value of STATUS_INVALID_PARAMETER if the nLevel parameter is set to GET_HOST_DDI_VERSION. has been added to the REQUEST_GET_LOCAL_HOST_INFO I/O request to return the version of the DDIs that the 1394 bus driver supports. } GET_LOCAL_HOST_INFO8. You can use the REQUEST_GET_LOCAL_HOST_INFO I/O request with this new nLevel value to determine whether the 1394 bus driver is the new 1394 bus driver or the legacy 1394 bus driver.GetMaxSpeedBetweenDevices. This notification returns information about the current generation of the bus. All rights reserved. such as the generation count and node ids. The returned value is the maximum speed that all devices simultaneously support. GET_HOST_DDI_VERSION. Table 6.nLevel parameter to GET_HOST_DDI_VERSION. The new 1394 bus driver sets the MajorVersion and MinorVersion members of this structure to the values in Table 6. The possible speed values are SPEED_FLAGS_xxx.fulFlags parameter to request that an SCODE_xxx_RATE speed code value. If you set the u. . 2009 © 2009 Microsoft Corporation.13 REQUEST_GET_SPEED_BETWEEN_DEVICES u. This nLevel value is described in Table 5. DDI Version Values Name BUS1394_DDI_MAJOR_VERSION BUS1394_DDI_MINOR_VERSION Description The major version of the 1394 bus driver interface. Table 5. to 1394 client drivers in the context of the bus reset notification. A client driver can also specify USE_SCODE_SPEED flag in the u.1394 Bus Driver in Windows 7 .GetLocalHostInformation. where xxx is the (approximate) transfer rate in mbps. The minor version of the 1394 bus driver interface. then the u. as defined in Table 4. The new 1394 bus driver returns a status value of STATUS_SUCCESS. be returned in the fulSpeed parameter instead of a SPEED_FLAGS_xxx value.GetLocalHostInformation. You can return the new values in Table 3 in the fulSpeed parameter. Extended Bus Reset Notification DDIs The new 1394 bus driver supports an extended bus reset notification.Information parameter must point to a data structure of the following type: typedef struct _GET_LOCAL_HOST_INFO8 { USHORT MajorVersion.fulSpeed Specifies the maximum possible transaction speed between the source device and the set of destination devices. Determining New or Legacy DDI Support A new nLevel value.

It replaces the REQUEST_SEND_PHY_CONFIG_PACKET DDI. ULONG GenerationCount. 2009 © 2009 Microsoft Corporation. PHY Packet Support DDIs The new 1394 bus driver includes new DDIs for sending and receiving PHY packets. *PBUS_RESET_DATA. The latter I/O request did not allow for specifying the generation count. node ids. as defined in the IEEE-1394a specification. This value is a speed code value. a client driver uses the existing REQUEST_BUS_RESET_NOTIFICATION I/O request and specifies the new EXTENDED_NOTIFICATION_ROUTINE flag in the u. To register for extended bus reset notifications. . as defined in Table 4. When the EXTENDED_NOTIFICATION_ROUTINE flag is specified. then the Context parameter that is passed to the ResetRoutine points to a data structure of the following type: typedef struct _BUS_RESET_DATA { PVOID ResetContext. DeviceNodeId The 1394 address for the device. with its bus reset notification handler.1394 Bus Driver in Windows 7 .fulFlags parameter. UCHAR SpeedToNode.14 This information can eliminate the need for a 1394 client driver to synchronize the retrieval of the generation count.BusResetNotification. LocalNodeId The 1394 address for the local host. NODE_ADDRESS LocalNodeId. You should use the new REQUEST_SEND_PHY_PACKET I/O request instead of REQUEST_SEND_PHY_CONFIG_PACKET. GenerationCount The current generation of the 1394 bus. } BUS_RESET_DATA.BusResetNotification. REQUEST_SEND_PHY_PACKET This is a new DDI to send 1394 PHY packets. SpeedToNode The negotiated speed to the device. June 18.ResetContext parameter when the REQUEST_BUS_RESET_NOTIFICATION request is sent. Members ResetContext The argument that is specified in the u. which could result in a PHY packet being sent to the wrong generation of the 1394 bus. All rights reserved. and other information. NODE_ADDRESS DeviceNodeId.

Status to STATUS_SUCCESS. I/O Status Block If successful. If the specified generation count does not match the actual generation of the bus. . } IRB. the new 1394 bus driver sets Irp->IoStatus. } SendPhyPacket. . .PhyPacket Specifies the 64-bit PHY packet that is sent to the 1394 bus.GenerationCount Specifies the bus reset generation as known by the device driver that submits this request. regardless of whether the send PHY packet succeeds or fails. . . . } u. 2009 © 2009 Microsoft Corporation. REQUEST_RECEIVE_PHY_PACKETS This is a new DDI to receive 1394 PHY packets. IRB Input FunctionNumber REQUEST_SEND_PHY_PACKET u. . union { June 18.Status to STATUS_INVALID_GENERATION. ULONG GenerationCount. The following are the relevant members of the IRB for this request: typedef struct _IRB { ULONG FunctionNumber. . union { struct { ULONG Flags. ULARGE_INTEGER PhyPacket.GenerationCount does not match the current bus generation count. The following flags are provided: Flag ASYNC_FLAGS_NO_STATUS Description Always return success from the send PHY packet operation. this request is returned with a status of STATUS_INVALID_GENERATION. u. . u.SendPhyPacket. If u.SendPhyPacket. All rights reserved.Flags Specifies any nondefault settings for this operation. .15 The following are the relevant members of the IRB for this request: typedef struct _IRB { ULONG FunctionNumber.1394 Bus Driver in Windows 7 .SendPhyPacket.SendPhyPacket. the new 1394 bus driver sets Irp->IoStatus.

u. IRB Input FunctionNumber REQUEST_RECEIVE_PHY_PACKET u. } IRB.ReceivePhyPackets.ReceivePhyPackets. . Use DEREGISTER_PHY_PACKET_NOTIFICATION to deactivate any previously registered callback. } u.PhyPacketContext Specifies the Context argument to be passed to the PhyPacketRoutine. Context. . Use REGISTER_PHY_PACKET_NOTIFICATION to register PhyPacketRoutine as the callback.ReceivePhyPackets. The following is a prototype for the notification routine: void PhyPacketRoutine( __in PVOID __in ULONG __in ULARGE_INTEGER ). GenerationCount. ReceivePhyPackets. which is the same as the legacy 1394 bus driver.PhyPacketRoutine Points to the notification routine for received PHY packets. The new 1394 bus driver supports only 1-KB configuration ROMs. GenerationCount The generation count of the bus for this PHY packet.1394 Bus Driver in Windows 7 . u. Operation The PhyPacketRoutine is called at DISPATCH_LEVEL. PhyPacketRoutine. It returns the entire contents of the device’s configuration ROM. PhyPacket The 64-bit PHY packet that is received from the 1394 bus. . 2009 © 2009 Microsoft Corporation. up to a maximum size of 1 kilobyte (KB). PhyPacket Parameters Context The argument that is specified in the u.PhyPacketContext parameter when the REQUEST_RECEIVE_PHY_PACKET request is sent. All rights reserved. . PhyPacketContext. Retrieve Configuration ROM DDI This new DDI returns the contents of a node’s configuration ROM. June 18. Flags.Flags Specifies whether a callback should be registered or deactivated.16 struct { ULONG PBUS_PHY_PACKET_NOTIFICATION PVOID } ReceivePhyPackets.

This is an index to the Entries array in the u. u.GetConfigRom.17 The following are the relevant members of the IRB for this request: typedef struct _IRB { ULONG FunctionNumber. . This is an index to the Entries array in the u. union { struct { ULONG GenerationCount.ConfigRom structure. ULONG UnitDirectoryIndex.GenerationCount Receives the generation of the bus for which the contents of this configuration ROM was retrieved. u.1394 Bus Driver in Windows 7 . . u.GetConfigRom. .GetConfigRom. PCROM ConfigRom. This is an index to the Entries array in the u. All rights reserved.ModelLeafIndex Receives the index to the node's model textual leaf in the configuration ROM. } u. .UnitDirectoryIndex Receives the index to the node’s unit directory in its configuration ROM. } GetConfigRom.GetConfigRom.ConfigRom structure. June 18.UnitDependentDirectoryIndex Receives the index to the node's unit dependent directory in its configuration ROM. 2009 © 2009 Microsoft Corporation.GetConfigRom. IRB Input FunctionNumber REQUEST_GET_CONFIG_ROM u. . ULONG ModelLeafIndex. This is an index to the Entries array in the u. ULONG VendorLeafIndex.VendorLeafIndex Receives the index to the node's vendor textual leaf in the configuration ROM.GetConfigRom. } IRB.GetConfigRom.ConfigRom structure. u. ULONG UnitDependentDirectoryIndex.GetConfigRom.ConfigRom A structure that receives the contents of the node's configuration ROM. u.GetConfigRom. . .ConfigRom structure.GetConfigRom.

ieee.com/en-us/library/aa972908. .org/ 1394 Trade Association http://www. 2009 © 2009 Microsoft Corporation.1394ta.18 Resources Windows Driver Kit on MSDN® http://msdn.microsoft.1394 Bus Driver in Windows 7 .aspx IEEE http://www. All rights reserved.aspx IEEE 1394 Bus http://msdn.org/ June 18.com/en-us/library/ms789423.microsoft.

Sign up to vote on this title
UsefulNot useful