An I2C wiring diagnosis method, device, equipment and storage medium
By matching the backplane layout information and the I2C channel register mapping relationship, I2C wiring problems are detected, which solves the problem of inaccurate detection when connecting backplanes of the same model in the prior art and realizes accurate wiring detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2022-10-21
- Publication Date
- 2026-06-26
Smart Images

Figure CN115543711B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of I2C wiring diagnostics, and more particularly to an I2C wiring diagnostic method, apparatus, device, and storage medium. Background Technology
[0002] After assembly and before shipment, servers undergo a series of tests to ensure their stability. These tests are primarily conducted through the DIAG system. The DIAG system checks device information according to a test procedure, such as the backplane CPLD version, number of hard drives, and hard drive version. To ensure order consistency, the current DIAG system test protocol is as follows: For each production order, a configuration file is generated for the first device tested, recording the information that needs to be consistent for that order. For subsequent devices tested, the information that needs to be consistent (actual values) in the device is compared with the information (expected values) in the previously generated configuration file. If the information remains completely consistent, the test proceeds normally. If any item or items are inconsistent, the DIAG system considers the device unable to meet order consistency requirements and fails the configuration check.
[0003] The DIAG system's diagnostic principle for multiple I2C channel connections on a server motherboard is as follows: During testing, the DIAG system sequentially reads the CPLD version from the boards connected to each I2C channel of the first test device in the production order. For subsequent devices in the order, the DIAG system uses the same method to retrieve the CPLD version from the boards connected to each I2C channel. By comparing the CPLD versions of the boards connected to an I2C channel, it determines whether the I2C channel wiring is incorrect. However, if different I2C channels are connected to different backplanes of the same model, and the backplanes of the same model have the same CPLD version, it cannot identify whether the different I2C channels connected to backplanes with the same CPLD version are connected incorrectly. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, the present invention provides an I2C wiring diagnostic method, apparatus, device, and storage medium.
[0005] In a first aspect, the present invention provides an I2C wiring diagnostic method, applied to a device including a motherboard and at least two identical backplanes, comprising: matching preset backplane layout information with connection information to determine the position information of each identical backplane in the backplane layout; after determining the position information of each identical backplane, illuminating the hard disk positioning lights in the backplanes identified by the position information according to a set lighting strategy; reading the lighting status into the register corresponding to the I2C channel through the I2C channel between the motherboard and the identical backplanes, and detecting whether the first correspondence and the second correspondence are consistent according to the mapping relationship between the I2C channel and the register, wherein the first correspondence is the correspondence between each register and each backplane with different position information, and the second correspondence is the preset correspondence between each I2C channel and each backplane with different position information; if there is an inconsistency, there is a problem with the I2C wiring between the motherboard and the backplanes.
[0006] Furthermore, by matching the connection information with preset backplane connection relationships, the position information of each identical backplane is determined, including:
[0007] Based on the backplane SAS address and attached SAS address and / or the PHY distribution of backplane extension, and based on the correspondence between RAID card ports and backplane SAS address and / or PHY, the connection information of each identical backplane is obtained. The connection information is then used to match the preset backplane layout information to determine the position information of each identical backplane in the backplane layout.
[0008] Furthermore, obtaining connection information for the same backplanes based on the backplane SAS address and attached SAS address includes: obtaining the SAS address and attached SAS address of the same backplanes through system commands, wherein the attached SAS address of the backplane is the SAS address of the backplane to which the backplane is connected; for a backplane with an attached SAS address, obtaining the backplanes connected to the backplane by matching its attached SAS address with the SAS addresses of the other backplanes.
[0009] Furthermore, obtaining the same connection information for each backplane based on the PHY distribution of backplane expansion includes: obtaining the PHY distribution of backplane expansion through system instructions. The PHY distribution includes the PHY ID of the backplane, a fixed number of PHY IDs forming a port, and the type of the device corresponding to each port. Among them, the device type is END, which indicates a RAID card, and the device type is EXP, which indicates a backplane. The backplane connection information is determined according to the PHY distribution.
[0010] Furthermore, obtaining the connection information for each backplane based on the correspondence between the RAID card port and the backplane SAS address and / or PHY includes:
[0011] When it is determined by the SAS address and attached SAS address and / or PHY distribution that there are multiple backplanes with the same cascading method, or when it is determined that there are multiple backplanes that are directly connected to the RAID card but are not cascaded;
[0012] Examine the SAS address of the backplane corresponding to different ports of the RAID card and / or the PHY of the backplane extension. Use the RAID port information in the connection information to identify the different identities of multiple backplanes that are not cascaded or structures with the same backplane cascading method, thereby determining the position information of multiple backplanes that are not cascaded or structures with the same backplane cascading method in the backplane layout.
[0013] Furthermore, the lighting strategy includes: traversing the same backplane, lighting the fixed hard disk positioning lights on each identical backplane, and performing a check on each backplane lighting operation to verify whether the first and second correspondences are consistent by utilizing the mapping relationship between the I2C channel and registers.
[0014] Furthermore, the lighting strategy includes: for backplanes with different location information, multiple hard drive positioning lights are programmed to form a code, with different codes between different backplanes, and the hard drive positioning lights on the backplanes are lit according to the preset programming when they are powered on.
[0015] In a second aspect, the present invention provides an I2C wiring diagnostic device, comprising: a backplane identification module, wherein the backplane identification module uses connection information to match preset backplane layout information to determine the position information of each identical backplane in the backplane layout, and distinguishes each identical backplane by the position information;
[0016] The lighting module illuminates the hard drive positioning lights in the backplane, which are identified by location information, according to a set lighting strategy.
[0017] The analysis module reads the LED status through the I2C channel between the motherboard and the same backplane into the register corresponding to the I2C channel. It checks whether the first correspondence and the second correspondence are consistent based on the mapping relationship between the I2C channel and the register. The first correspondence is the correspondence between each register and each backplane with different position information, and the second correspondence is the preset correspondence between each I2C channel and each backplane with different position information. If there is an inconsistency, there is a problem with the I2C wiring between the motherboard and the backplane.
[0018] Thirdly, the present invention provides an I2C wiring diagnostic electronic device, comprising: at least one processing unit, a storage unit and a bus unit, wherein the bus unit connects the processing unit and the storage unit, the storage unit stores a computer program, and the processing unit processes the computer program to implement the I2C wiring diagnostic method.
[0019] Fourthly, the present invention provides a storage medium for implementing an I2C wiring diagnostic method, the storage medium being configured with a computer program, the computer program being executed by a processor to implement the I2C wiring diagnostic method.
[0020] The technical solutions provided in the embodiments of the present invention have the following advantages compared with the prior art:
[0021] This invention utilizes connection information to match preset backplane layout information, determining the position information of each identical backplane within the backplane layout, thus enabling the identification of different backplanes of the same model based on their position information. After determining the position information of each identical backplane, the hard drive positioning lights in the backplanes identified by the position information are illuminated according to a set lighting strategy. The lighting status is read from the I2C channel between the motherboard and the identical backplane into the register corresponding to the I2C channel. The mapping relationship between the I2C channel and the register is used to check whether the first and second correspondences are consistent to analyze whether there are any problems with the I2C wiring. This application can effectively detect whether there are any problems with the I2C wiring between the motherboard and different backplanes of the same model, solving the problem of inaccurate I2C wiring detection between the motherboard and different backplanes of the same model in existing DIAG systems. Furthermore, it uses the method of illuminating hard drive positioning lights to detect wiring problems, making the implementation simple. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the backplane layout of a 4U server provided in an embodiment of the present invention;
[0025] Figure 2 A flowchart of an I2C wiring diagnostic method provided in an embodiment of the present invention;
[0026] Figure 3 A flowchart for obtaining connection information of the same backplanes based on backplane SAS address and attached SAS address, provided for embodiments of the present invention;
[0027] Figure 4 This is a schematic diagram of a scenario where there are multiple backplanes with the same cascading method, provided by an embodiment of the present invention, and multiple backplanes that are directly connected to a RAID card but not cascaded.
[0028] Figure 5 A schematic diagram illustrating the first and second correspondence relationships provided in an embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of an I2C wiring diagnostic device provided in an embodiment of the present invention;
[0030] Figure 7 This is a schematic diagram of an I2C wiring diagnostic electronic device provided in an embodiment of the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0033] Example 1
[0034] See Figure 2 As shown, the present invention provides an I2C wiring diagnostic method, applied to a device including a motherboard and at least two identical backplanes, comprising:
[0035] S100, using connection information to match preset backplane layout information, determines the position information of each identical backplane in the backplane layout; see reference. Figure 1 As shown, Figure 1 The backplane layout information of a certain 4U server has been disclosed. The 4U server has three identical 12-port backplanes with CPLD version 2.0. Among them, 12-port backplane 1 is connected to the RAID card and cascaded with the system disk backplane. Its position in the backplane layout is the front upper backplane. 12-port backplane 2 is connected to the RAID card and cascaded with 12-port backplane 3. Its position in the backplane layout is the front lower backplane. 12-port backplane 3 is the rear lower backplane.
[0036] The back panel layout information includes: the connection methods of the back panels in different locations, such as... Figure 1 The front backplane of the 4U server shown has a connection method in the backplane layout information that includes connecting the front backplane to the RAID card's xx port and cascading the system disk backplane.
[0037] In the specific implementation process, the connection information of each backplane is obtained based on the backplane SAS address and attached SAS address and / or the distribution of PHYs extended on the backplane, and based on the correspondence between RAID card ports and backplane SAS addresses and / or PHYs.
[0038] See Figure 3 As shown, obtaining connection information for the same backplanes based on the backplane SAS address and attached SAS address includes: obtaining the SAS address and attached SAS address of the same backplanes through system commands and recording them accordingly; identifying the backplanes with attached SAS addresses; where the attached SAS address is the SAS address of the backplane connected to the backplane; traversing the attached SAS addresses of the backplanes with attached SAS addresses, and matching the attached SAS addresses with the SAS addresses of the other backplanes to obtain the backplanes connected to the backplane. For example, the system commands can be used to obtain the SAS addresses and attached SAS addresses of 12-port backplane 1, 12-port backplane 2, and 12-port backplane 3. The attached SAS address of 12-port backplane 1 is the SAS address of the system backplane, the attached SAS address of 12-port backplane 2 is the SAS address of 12-port backplane 3, and 12-port backplane 3 has no attached SAS address. For a backplane with an attached SAS address, its attached SAS address can be matched with the SAS addresses of the other backplanes to obtain the backplanes connected to it, and the connection information between the backplanes can be obtained.
[0039] Obtaining connection information for backplanes based on backplane-extended PHY distribution includes: acquiring and recording the backplane-extended PHY distribution via system commands. The PHY distribution includes the backplane's PHY ID, a fixed number of PHY IDs forming a port, and the device type corresponding to each port. Here, device type END indicates a RAID card, and device type EXP indicates a backplane. Connection information between backplanes or between a backplane and a RAID card is determined based on the PHY distribution. A feasible system command for acquiring PHY distribution information is the `phyinfo` command of the `scrtnycli` tool.
[0040] Connection information for the same backplanes can be obtained based on the backplane SAS address and attached SAS address, or based on the PHY distribution of the backplane extension; however, the obtained connection information is somewhat incomplete, although for example... Figure 1 The 4U server shown can obtain the connection information of each backplane based on the backplane SAS address and attached SAS address, or based on the PHY distribution of the backplane extension, which is already able to match the backplane layout information to obtain the location information of each backplane. However, for servers like... Figure 4 As shown, there are multiple backplanes with the same cascading method (a structure consisting of 12-port backplane 1 and 12-port backplane 4, and a structure consisting of 12-port backplane 2 and 12-port backplane 3), or there are multiple backplanes that are directly connected to the RAID card but are not cascaded (12-port backplane 5 and 12-port backplane 6). The above connection information is not enough to determine the location information of the backplane.
[0041] Further, based on the correspondence between RAID card ports and backplane SAS addresses and / or PHYs, the connection information of each backplane is obtained, including: viewing the SAS addresses of backplanes corresponding to different ports of the RAID card and / or the PHYs of backplane extensions, using the RAID port information in the connection information to identify the different identities of multiple backplanes that are not cascaded or structures with the same backplane cascading method, thereby determining the position information of multiple backplanes that are not cascaded or structures with the same backplane cascading method in the backplane layout.
[0042] S200: After determining the position information of each identical backplane, the hard drive positioning lights in the backplane identified by the position information are lit according to the set lighting strategy.
[0043] In specific implementation, a feasible lighting strategy includes: traversing the same backplane and lighting the fixed hard disk positioning lights on each of the same backplanes. This lighting strategy requires that for each pair of backplanes, the mapping relationship between the I2C channel and the register be used to check whether the first and second correspondences are consistent.
[0044] Another feasible lighting strategy includes: for backplanes with different location information, multiple hard drive positioning lights are arranged into codes, with different codes between different backplanes. The backplanes are powered on, and the hard drive positioning lights are lit according to the preset arrangement. Preferably, the number of hard drive lights on the backplanes is counted as N, and 2^N is used to obtain the maximum number of codes. The maximum number of codes is compared to the number of backplanes. If it is less, the backplanes are grouped and then lit. After each group is lit, the mapping relationship between the I2C channel and registers is used to check whether the first and second correspondences are consistent, ensuring that the number of backplanes in each group is less than the maximum number of codes.
[0045] The S300 reads the LED status into the register corresponding to the I2C channel through the I2C channel between the motherboard and the same backplane.
[0046] The S400 uses the mapping relationship between the I2C channel and registers to detect whether the first and second correspondences are consistent. If there is a discrepancy, it indicates an incorrect I2C wiring problem between the motherboard and the backplane. (See also...) Figure 5 As shown, the first correspondence is the correspondence between each register and each backplane with different location information, and the second correspondence is the preset correspondence between each I2C channel and each backplane with different location information.
[0047] In one preferred embodiment, the incorrectly connected I2C channel is determined by using the first and second correspondences of the detection inconsistencies, and recorded as log information to prompt the user.
[0048] Example 2
[0049] See Figure 6 As shown in the figure, an I2C wiring diagnostic device according to an embodiment of the present invention includes: a backplane identification module, which uses connection information to match preset backplane layout information to determine the position information of each identical backplane in the backplane layout, and distinguishes each identical backplane by the position information.
[0050] The lighting module illuminates the hard drive positioning lights in the backplane, which are identified by location information, according to a set lighting strategy.
[0051] The analysis module reads the LED status through the I2C channel between the motherboard and the same backplane into the register corresponding to the I2C channel. It uses the mapping relationship between the I2C channel and the register to detect whether the first correspondence and the second correspondence are consistent. The first correspondence is the correspondence between each register and each backplane with different position information. The second correspondence is the preset correspondence between each I2C channel and each backplane with different position information. If there is an inconsistency, there is a problem with the I2C wiring between the motherboard and the backplane.
[0052] Example 3
[0053] See Figure 7As shown, this embodiment of the invention provides an I2C wiring diagnostic electronic device, including: at least one processing unit, a storage unit, and a bus unit. The bus unit connects the processing unit and the storage unit. The storage unit stores a computer program. The processing unit processes the computer program to: match connection information with preset backplane layout information to determine the position information of each identical backplane in the backplane layout; after determining the position information of each identical backplane, illuminate the hard disk positioning lights in the backplane identified by the position information according to a set illumination strategy; read the illumination status into the register corresponding to the I2C channel through the I2C channel between the motherboard and the identical backplane, and use the mapping relationship between the I2C channel and the register to detect whether the first correspondence and the second correspondence are consistent. The first correspondence is the correspondence between each register and each backplane with different position information, and the second correspondence is the preset correspondence between each I2C channel and each backplane with different position information. If there is an inconsistency, there is a problem with the I2C wiring between the motherboard and the backplane.
[0054] Example 4
[0055] This invention provides a storage medium for implementing an I2C wiring diagnostic method. The storage medium is configured with a computer program, which is executed by a processor to implement the I2C wiring diagnostic method.
[0056] In the embodiments provided by this invention, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0057] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0058] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0059] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the invention should also be covered within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.
Claims
1. An I2C wiring diagnostic method, applied to a device including a motherboard and at least two identical backplanes, characterized in that, include: Based on the connection information, match the preset backplane layout information to determine the position information of each identical backplane in the backplane layout, including: The connection information of the same backplanes is obtained based on the backplane SAS address and attached SAS address; including: obtaining the SAS address and attached SAS address of the same backplanes through system instructions, wherein the attached SAS address of the backplane is the SAS address of the backplane to which the backplane is connected; for a backplane with an attached SAS address, the backplanes connected to the backplane are obtained by matching its attached SAS address with the SAS addresses of the other backplanes. Alternatively, the same connection information for each backplane can be obtained based on the PHY distribution extended by the backplane. Based on the correspondence between RAID card ports and backplane SAS addresses, and / or PHYs, the connection information of each backplane is obtained. This includes: determining the existence of multiple backplanes with the same cascading method through the distribution of SAS addresses, attached SAS addresses, and / or PHYs, or determining the existence of multiple backplanes directly connected to the RAID card but not cascaded; examining the SAS addresses of the backplanes corresponding to different ports of the RAID card and / or the PHYs of the backplane extensions, and using the RAID port information in the connection information to identify the different identities of multiple backplanes that are not cascaded or structures with the same cascading method, thereby determining the position information of multiple backplanes that are not cascaded or structures with the same cascading method in the backplane layout. By matching the connection information with the preset backplane layout information, the position information of each identical backplane in the backplane layout is determined. After determining the location information of each identical backplane, the hard drive positioning lights in the backplanes identified by the location information are illuminated according to the set lighting strategy. The lighting strategy includes: traversing identical backplanes and illuminating the fixed hard drive positioning lights on each identical backplane. For each backplane illumination, the mapping relationship between the I2C channel and registers is used to check whether the first and second correspondences are consistent. For backplanes with different location information, multiple hard drive positioning lights are arranged to form a code, and the codes are different between different backplanes. The backplane is powered on and the hard drive positioning lights are illuminated according to the preset arrangement. The LED status is read through the I2C channel between the motherboard and the same backplane and then transferred to the register corresponding to the I2C channel. The mapping relationship between the I2C channel and the register is checked to see if the first and second correspondences are consistent. The first correspondence is the correspondence between each register and each backplane with different position information, and the second correspondence is the preset correspondence between each I2C channel and each backplane with different position information. If there is a discrepancy, there is a problem with the I2C wiring between the motherboard and the backplane.
2. The I2C wiring diagnostic method according to claim 1, characterized in that, Obtaining the same connection information for each backplane based on the PHY distribution of backplane expansion includes: obtaining the PHY distribution of backplane expansion through system instructions. The PHY distribution includes the PHY ID of the backplane, a fixed number of PHY IDs forming a port, and the type of the device corresponding to each port. Among them, the device type is END, which indicates a RAID card, and the device type is EXP, which indicates a backplane. The backplane connection information is determined based on the PHY distribution.
3. An I2C wiring diagnostic device, characterized in that, include: A backplane identification module, which uses connection information to match preset backplane layout information to determine the position information of each identical backplane in the backplane layout, including: The connection information of the same backplanes is obtained based on the backplane SAS address and attached SAS address; including: obtaining the SAS address and attached SAS address of the same backplanes through system instructions, wherein the attached SAS address of the backplane is the SAS address of the backplane to which the backplane is connected; for a backplane with an attached SAS address, the backplanes connected to the backplane are obtained by matching its attached SAS address with the SAS addresses of the other backplanes. Alternatively, the same connection information for each backplane can be obtained based on the PHY distribution extended by the backplane. Based on the correspondence between RAID card ports and backplane SAS addresses, and / or PHYs, the connection information of each backplane is obtained. This includes: determining the existence of multiple backplanes with the same cascading method through the distribution of SAS addresses, attached SAS addresses, and / or PHYs, or determining the existence of multiple backplanes directly connected to the RAID card but not cascaded; examining the SAS addresses of the backplanes corresponding to different ports of the RAID card and / or the PHYs of the backplane extensions, and using the RAID port information in the connection information to identify the different identities of multiple backplanes that are not cascaded or structures with the same cascading method, thereby determining the position information of multiple backplanes that are not cascaded or structures with the same cascading method in the backplane layout. By matching the connection information with the preset backplane layout information, the position information of each identical backplane in the backplane layout is determined. The lighting module illuminates the hard drive positioning lights in the backplane identified by location information according to a set lighting strategy. The lighting strategy includes: traversing identical backplanes and illuminating the fixed hard drive positioning lights on each identical backplane; for each backplane illumination, performing a check to see if the first and second correspondences are consistent using the mapping relationship between the I2C channel and registers; for backplanes with different location information, arranging multiple hard drive positioning lights into a code, with different codes between different backplanes, and controlling the backplane to power on and illuminate the hard drive positioning lights according to the preset arrangement. The analysis module reads the LED status through the I2C channel between the motherboard and the same backplane into the register corresponding to the I2C channel. It uses the mapping relationship between the I2C channel and the register to detect whether the first correspondence and the second correspondence are consistent. The first correspondence is the correspondence between each register and each backplane with different position information. The second correspondence is the preset correspondence between each I2C channel and each backplane with different position information. If there is an inconsistency, there is a problem with the I2C wiring between the motherboard and the backplane.
4. An I2C-connected diagnostic electronic device, characterized in that, include: The system includes at least one processing unit, a storage unit, and a bus unit, wherein the bus unit connects the processing unit and the storage unit, the storage unit stores a computer program, and the processing unit processes the computer program to implement the I2C wiring diagnostic method as described in any one of claims 1 or 2.
5. A storage medium for implementing an I2C wiring diagnostic method, the storage medium being configured with a computer program, characterized in that, The computer program is executed by a processor to implement the I2C wiring diagnostic method as described in either claim 1 or 2.