discover.h
来自「6440linuxDriver的源代码」· C头文件 代码 · 共 2,308 行 · 第 1/5 页
H
2,308 行
MV_U8 MaximumNumberOfDescriptors; /* byte 10 */ MV_U8 PhyFilter:4; MV_U8 IgnoredByte10Bit4_6:3; MV_U8 IgnoreZoneGroup:1; /* byte 11 */ MV_U8 DescriptorType:4; MV_U8 IgnoredByte11Bit4_7:4; /* byte 12-15 */ MV_U8 IgnoredByte12_15[4]; /* byte 16-27 */ MV_U8 VendorSpecific[12]; /* byte 28-31 */ MV_U32 CRC;}; /* struct SMPRequestDiscoverList *//* request specific bytes for SMP REPORT EXPANDER ROUTE TABLE function */struct SMPRequestReportExpanderRouteTable{ /* byte 4-7 */ MV_U8 ReservedByte4_7[4]; /* byte 8-9 */ MV_U8 MaximumNumberOfDescriptors[2]; /* byte 10-15 */ MV_U8 StartingRoutedSASAddressIndex[6]; /* byte 16-18 */ MV_U8 IgnoredByte16_18[3]; /* byte 19 */ MV_U8 StartingPhyIdentifier; /* byte 20-27 */ MV_U8 IgnoredByte20_27[8]; /* byte 28-31 */ MV_U32 CRC;}; /* struct SMPRequestReportExpanderRouteTable *//* request specific bytes for SMP CONFIGUARE GENERAL function */struct SMPRequestConfigureGeneral{ /* byte 4-5 */ MV_U8 ExpectedExpanderChangeCount[2]; /* byte 6-7 */ MV_U8 IgnoredByte6_7[2]; /* byte 8 */ MV_U8 UpdateSTPBusInactivityTimeLimit:1; MV_U8 UpdateSTPMaxConnectTimeLimit:1; MV_U8 UpdateSTPSMPNexusLossTime:1; MV_U8 IgnoredByte8Bit3_7:5; /* byte 9 */ MV_U8 IgnoredByte9; /* byte 10-11 */ MV_U8 STPBusInactivityTimeLimit[2]; /* byte 12-13 */ MV_U8 STPMaxConnectTimeLimit[2]; /* byte 14-15 */ MV_U8 STPSMPNexusLossTime[2]; /* byte 16-19 */ MV_U32 CRC;}; /* struct SMPRequestConfigureGeneral *//* request specific bytes for ENABLE DISABLE ZONING function */struct SMPRequestEnableDisableZoning{ /* byte 4-5 */ MV_U8 ExpectedExpanderChangeCount[2]; /* byte 6-7 */ MV_U8 IgnoredByte4_5[2]; /* byte 8 */ MV_U8 EnableDisableZoning:1; MV_U8 ReservedByte8Bit1_7:7; /* byte 9-11 */ MV_U8 IgnoredByte9_11; /* byte 12-15 */ MV_U32 CRC;}; /* struct SMPRequestEnableDisableZoning *//* request specific bytes for SMP ZONED BROADCAST function */struct SMPRequestZonedBroadcast{ /* byte 4-5 */ MV_U8 RestrictByte4_5[2]; /* byte 6 */ MV_U8 BroadcastType:3; MV_U8 ReservedByte6Bit3_7:5; /* byte 7 */ MV_U8 NumberOfBroadcastSourceZoneGroups; /* byte 8-135 */ MV_U8 BroadcastSourceZoneGroup[0x80]; //TBD /* value between 0 and 127 */ /* byte 135 -n: PAD field Contains zero,one,two or three bytes set to 0x00 such that total length of the SMP request is a multiple of four */ MV_U8 Pad[3]; /* byte n-4-n */ MV_U32 CRC;}; /* struct SMPRequestZonedBroadcast *//* request specific bytes for SMP ConfigureRouteInformation function */struct SMPRequestConfigureRouteInformation{ /* byte 4-5 */ MV_U8 ExpectedExpanderChangeCount[2]; /* byte 6-7 */ MV_U8 ExpanderRouteIndex[2]; /* byte 8 */ MV_U8 ReservedByte8; /* byte 9 */ MV_U8 PhyIdentifier; /* byte 10-11 */ MV_U8 ReservedByte10_11[2]; /* byte 12 */ MV_U8 IgnoredByte12Bit0_6:7; MV_U8 DisableRouteEntry:1; /* if a routing error is detected then the route is disabled by setting this bit */ /* byte 13-15 */ MV_U8 IgnoredByte13_15[3]; /* byte 16-23 */ MV_U8 RoutedSASAddress[8]; /* identical to the AttachedSASAddress found through discovery */ /* byte 24-39 */ MV_U8 ReservedByte24_39[16]; /* byte 40-43 */ MV_U32 CRC;}; /* struct SMPRequestConfigureRouteInformation *//* request specific bytes for SMP Phy Control function */struct SMPRequestPhyControl{ /* byte 4-5 */ MV_U8 ExpectedExpanderChangeCount[2]; /* byte 6-8 */ MV_U8 IgnoredByte6_8[3]; /* byte 9 */ MV_U8 PhyIdentifier; /* byte 10 */ MV_U8 PhyOperation; /* byte 11 */ MV_U8 UpdatePartialPathwayTimeoutValue:1; MV_U8 ReservedByte11Bit1_7:7; /* byte 12-31 */ MV_U8 IgnoredByte12_31[20]; /* byte 32 */ MV_U8 IgnoredByte32Bit0_3:4; MV_U8 ProgrammedMinimumPhysicalLinkRate:4; /* byte 33 */ MV_U8 IgnoredByte33Bit0_3:4; MV_U8 ProgrammedMaximumPhysicalLinkRate:4; /* byte 34-35 */ MV_U8 IgnoredByte34_35[2]; /* byte 36 */ MV_U8 PartialPathwayTimeoutValue:4; MV_U8 ReservedByte36Bit4_7:4; /* byte 37-39 */ MV_U8 ReservedByte37_39[3]; /* byte 40-43 */ MV_U32 CRC;}; /* struct SMPRequestPhyControl *//* request specific bytes for SMP Phy Test function */struct SMPRequestPhyTest{ /* byte 4-5 */ MV_U8 ExpectedExpanderChangeCount[2]; /* byte 6-8 */ MV_U8 IgnoredByte6_8[3]; /* byte 9 */ MV_U8 PhyIdentifier; /* byte 10 */ MV_U8 PhyTestFunction; /* byte 11 */ MV_U8 PhyTestPattern; /* byte 12-14 */ MV_U8 ReservedByte12_14[3]; /* byte 15 */ MV_U8 PhyTestPatternPhysicalLinkRate:4; MV_U8 ReservedByte15Bit4_7:4; /* byte 16-18 */ MV_U8 ReservedByte16_18[3]; /* byte 19 */ MV_U8 PhyTestPatternDwordsControl; /* byte 20-27 */ MV_U8 PhyTestPatternDwords[8]; /* byte 28-39 */ MV_U8 ReservedByte28_39[12]; /* byte 40-43 */ MV_U32 CRC;}; /* struct SMPRequestPhyTest *//* request specific bytes for SMP CONFIGUARE PHY EVENT INFORMATION function */struct SMPRequestConfigurePhyEventInformation{ /* byte 4-5 */ MV_U8 ExpectedExpanderChangeCount[2]; /* byte 6 */ MV_U8 ClearPeaks:1; MV_U8 ReservedByte6Bit1_7:6; /* byte 7-8 */ MV_U8 ReservedByte7_8[2]; /* byte 9 */ MV_U8 PhyIdentifier; /* byte 10 */ MV_U8 ReservedByte10; /* byte 11 */ MV_U8 NumberOfPhyEventConfigurationDescriptors; /* byte 11-138 */ MV_U8 PhyEventConfigurationDescriptors[0x80]; //TBD MV_U32 CRC;}; /* struct SMPRequestConfigurePhyEventInformation *//* request sent specific to SMP Read SGPIO Corresponds to READ_GPIO_REGISTER define*/struct SMPRequestReadGPIORegister{ /* byte 4 */ MV_U8 RegisterCount; /* byte 5-7 */ MV_U8 ReservedByte[3]; MV_U32 CRC;};/* request sent specific to SMP Write SGPIO Corresponds to WRITE_GPIO_REGISTER define*/struct SMPRequestWriteGPIORegister{ /* byte 4 */ MV_U8 RegisterCount; /* byte 5-7 */ MV_U8 ReservedByte[3]; /* byte 8-15 */ MV_U8 Data_Out_Low[8]; /* byte 16-23 */ MV_U8 Data_Out_High[8]; MV_U32 CRC;};/* generic structure referencing an SMP Request, must be initialized before being used*/typedef struct SMPRequest{ /* byte 0 */ MV_U8 SMPFrameType; /* always SMP_REQUEST_FRAME = 0x40 */ /* byte 1 */ MV_U8 Function; /* byte 2-3 */ MV_U8 ReservedByte2_3[2]; /* bytes 4-n */ union { /* #define REPORT_GENERAL 0x00 */ struct SMPRequestGeneralInput ReportGeneral;/* #define REPORT_MANUFACTURER_INFORMATION 0x01 */ struct SMPRequestGeneralInput ReportManufacturerInformation;/* #define READ_GPIO_REGISTER 0x02 */ struct SMPRequestReadGPIORegister ReadGPIORegister;/* #define REPORT_SELF_CONFGRIGRUATION_STATUS 0x03 */ struct SMPRequestSelfConfigurationInput ReportSelfConfigurationStatus;/* #define DISCOVER 0x10 */ struct SMPRequestPhyInput Discover;/* #define REPORT_PHY_ERROR_LOG 0x11 */ struct SMPRequestPhyInput ReportPhyErrorLog;/* #define REPORT_PHY_SATA 0x12 */ struct SMPRequestPhyInput ReportPhySATA;/* #define REPORT_ROUTE_INFORMATION 0x13 */ struct SMPRequestRouteInformationInput ReportRouteInformation;/* #define REPORT_PHY_EVENT_INFORMATION 0x14 */ struct SMPRequestPhyInput ReportPhyEventInformation;/* #define REPORT_PHY_BROADCAST_COUNTS 0x15 */ struct SMPRequestPhyInput ReportPhyBroadcaseCounts;/* #define DISCOVER_LIST 0x16 */ struct SMPRequestDiscoverList DiscoverList; /* #define REPORT_EXPANDER_ROUTE_TABLE 0x17 */ struct SMPRequestReportExpanderRouteTable ReportExpanderRouteTable;/* #define CONFIGURE_GENERAL 0x80 */ struct SMPRequestConfigureGeneral ConfigureGeneral;/* #define ENABLE_DISABLE_ZONING 0x81 */ struct SMPRequestEnableDisableZoning EnableDisableZoning;/* #define WRITE_GPIO_REGISTER 0x82 */ struct SMPRequestWriteGPIORegister WriteGPIORegister;/* #define ZONED_BROADCAST 0x85 */ struct SMPRequestZonedBroadcast ZonedBroadcast;/* #define CONFIGURE_ROUTE_INFORMATION 0x90 */ struct SMPRequestConfigureRouteInformation ConfigureRouteInformation;/* #define PHY_CONTROL 0x91 */ struct SMPRequestPhyControl PhyControl;/* #define PHY_TEST 0x92 */ struct SMPRequestPhyTest PhyTest;/* #define CONFIGURE_PHY_EVENT_INFORMATION 0x93 */ struct SMPRequestConfigurePhyEventInformation ConfigurePhyEventInformation; } Request;} SMPRequest, *PSMPRequest; /* struct SMPRequest *//* request specific bytes for SMP Report General response, intended to be referenced by SMPResponse*/struct SMPResponseReportGeneral{/* byte 4-5: EXPANDER CHANGE COUNT Counts the number of Broadcast (Change)s originated by an expander device. Management device servers in expander devices shall support this field. Management device servers in other device types (e.g., end devices) shall set this field to 0000h. This field shall be set to at least 0001h at power on. If the expander device has originated Broadcast (Change) for any reason described in 7.11 since transmitting a REPORT GENERAL response, it shall increment this field at least once from the value in the previous REPORT GENERAL response. It shall not increment this field when forwarding a Broadcast (Change). This field shall wrap to at least 0001h after the maximum value (i.e., FFFFh) has been reached.*/ MV_U8 ExpanderChangeCount[2];/* byte 6-7: EXPANDER ROUTE INDEXES Contains the maximum number of expander route indexes per phy for the expander device. Management device servers in externally configurable expander devices containing phy-based expander route tables shall support this field. Management device servers in other device types (e.g., end devices, externally configurable expander devices with expander-based expander route tables, and self-configuring expander devices) shall set the EXPANDER ROUTE INDEXES field to zero. Not all phys in an externally configurable expander device are required to support the maximum number indicated by this field.*/ MV_U8 ExpanderRouteIndexes[2];/* byte 8: reserved */ MV_U8 ReservedByte8;/* byte 9:NUMBER OF PHYS Contains the number of phys in the device, including any virtual phys and any vacant phys*/ MV_U8 NumberOfPhys;/* byte 10-bit0: EXTERNALLY CONFIGURABLE ROUTE TABLE Set to one indicates that the management device server is in an externally configurable expander device that has a phy-based expander route table that is required to be configured with the SMP CONFIGURE ROUTE INFORMATION function. An EXTERNALLY CONFIGURABLE ROUTE TABLE bit set to zero indicates that the management device server is not in an externally configurable expander device (e.g., it is in an end device, in a self-configuring expander device, or in an expander device with no phys with table routing attributes). byte 10-bit1: CONFIGURING Set to one indicates that the management device server is in a self-configuring expander device, the self-configuring expander device’s management application client is currently performing the discover process, and it has identified at least one change to its expander routing table. A CONFIGURING bit set to zero indicates that the management device server is not in a self-configuring expander device currently performing the discover process and changing its expander routing table. Changes in this bit from one to zero result in a Broadcast (Change) being originated. Management device servers in self-configuring expander devices shall support this bit. Management device servers in externally configurable expander devices and in other device types shall set the CONFIGURING bit to zero. byte 10-bit2: CONFIGURES OTHERS Set to one indicates that the expander device is a self-configuring expander device that performs the configuration subprocess. A CONFIGURES OTHERS bit set to zero indicates the expander device may or may not perform the configuration subprocess. Self-configuring expander devices compliant with this standard shall set the CONFIGURES OTHERS bit to one.If the CONFIGURES OTHERS bit is set to zero, the expander device may configure all externally configurable expander devices in the SAS domain.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?