A method for handling I2C deadlock problems of PCIe devices and related components

Through the connection between I2C Switch and PCIe devices, the problem of I2C hanging of PCIe devices is solved, rapid unlocking of devices and accurate monitoring of server status are achieved, improving the reliability and efficiency of server management.

CN115129516BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210764575.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-10-22
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

The PCIe device I2C hangup problem causes the BMC to be unable to accurately monitor the server status, affecting the normal operation and adjustment of the server. The existing technology has a low unlocking success rate and affects the polling of other devices.

Method used

Connect to the PCIe device through I2C Switch and send continuous clock signals to determine whether the device is unlocked. If it is not unlocked, reset or power on and off to restart the abnormal device, skipping it for polling to avoid affecting other devices.

Benefits of technology

It improves the success rate of PCIe device unlocking, ensures that abnormal devices are unlocked in time, avoids the impact of polling on other devices, and ensures accurate monitoring and timely adjustment of server status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129516B_ABST
    Figure CN115129516B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device and storage medium for handling the I2C deadlock problem of a PCIe device, relates to the field of server management, and is applied to BMC. If an I2C deadlocked PCIe device is detected when polling each PCIe device, a continuous clock signal is first sent to the I2C deadlocked PCIe device. If it is not unlocked, the I2C Switch is first controlled to reset, and each PCIe device is polled by skipping the abnormal PCIe device through the reset I2C Switch to avoid the influence on the polling of other PCIe devices, and the abnormal PCIe device is reset and / or the abnormal PCIe device is powered on and off to restart, so that the abnormal PCIe device is unlocked. In the present application, not only can the abnormal PCIe device be prevented from affecting the polling of other normal PCIe devices, but also a plurality of unlocking methods are set to ensure that the abnormal PCIe device is unlocked in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of server management, and in particular to a method for processing an I2C deadlock problem of a PCIe device and related components. Background Art

[0002] With the rapid development of cloud computing and big data technology, the information and intelligent trends of current society are accelerating. As the core equipment of the information system, the server has the characteristics of high storage performance and strong I / O (Input / Output) expansion capability.

[0003] As we all know, PCIe (peripheral component interconnect express, high-speed serial computer expansion bus standard) devices are an important part of the server system architecture, including NVME (Non Volatile Memory Host Controller Interface Specification, non-volatile memory host controller interface specification) hard disk, SAS (Serial Attached SCSI, serial connection SCSI interface) / Raid (Redundant Arrays of Independent Disks, disk array) card, network card, GPU (graphics processing unit, graphics processor), etc., which are key components for servers to realize storage, computing, communication and other functions. The PCIe bus of these PCIe devices is connected to the CPU (central processing unit, central processing unit) to quickly interact with the CPU for data, and the I2C (Inter-Integrated Circuit, two-wire serial bus) bus is connected to the BMC (Baseboard Management Controller, used for the management of the server motherboard) to realize out-of-band management. In order to ensure the stable and reliable operation of PCIe devices, the BMC needs to monitor the status of PCIe devices in real time. Specifically, the temperature and other working parameters of each PCIe device are read through the I2C bus polling. However, due to the large number of PCIe device types and manufacturers and the irregular upgrade of FW (Firmware), the I2C hang problem of PCIe devices often occurs during R&D debugging, production line production and customer sites. The I2C hang problem in the existing technology is slow to locate and will reduce the product experience.

[0004] In the prior art, when the BMC detects the existence of an I2C-hung PCIe device during polling of each PCIe device, it will send a continuous clock signal to the I2C-hung PCIe device to try to unlock the I2C-hung PCIe device. If the unlocking is successful, normal communication with the PCIe device can be restored. If the unlocking fails, the I2C hang log is recorded, and the I2C bus of the I2C-hung PCIe device will remain in a hung state until it is unlocked and restored or the entire machine is powered on and off again before normal communication can be restored.

[0005] In addition, due to the large number of types and manufacturers of PCIe devices, the success rate of BMC trying to unlock I2C-hung PCIe devices by sending continuous clocks is low. Because there are many PCIe devices on the server, multiple PCIe devices will be mounted under one I2C bus of BMC. As long as one PCIe device is hung, other PCIe devices cannot be released. In other words, BMC cannot skip the I2C-hung PCIe device and continue to poll other PCIe devices, resulting in abnormal reading of working parameters of PCIe devices that are not I2C-hung. It is impossible to accurately determine whether the server is working normally and cannot adjust the server in time. Summary of the invention

[0006] The purpose of the present invention is to provide a method, system, device and storage medium for handling the I2C deadlock problem of a PCIe device, which can not only avoid the abnormal PCIe device from affecting the polling of other normal PCIe devices, but also set multiple unlocking methods to ensure that the abnormal PCIe device is unlocked in time.

[0007] In order to solve the above technical problems, the present invention provides a method for processing the I2C deadlock problem of a PCIe device, which is applied to a BMC, wherein the BMC is connected to an I2C Switch via an I2C bus, and the I2C Switch is connected to each of the PCIe devices via each I2C bus. The method comprises:

[0008] When polling each PCIe device, if an I2C-dead PCIe device is detected, a continuous clock signal is sent to the I2C-dead PCIe device;

[0009] Determine whether the PCIe device that is hung by I2C is unlocked;

[0010] If not, the PCIe device that is located to be I2C-hung is an abnormal PCIe device;

[0011] Controlling the I2C Switch to reset, and polling each of the PCIe devices by skipping the abnormal PCIe device through the reset I2C Switch;

[0012] The abnormal PCIe device is controlled to reset and / or the abnormal PCIe device is controlled to be powered on and off and restarted, so that the abnormal PCIe device is unlocked.

[0013] Preferably, controlling the abnormal PCIe device to reset and / or controlling the abnormal PCIe device to power on and off to restart, so as to unlock the abnormal PCIe device, includes:

[0014] Controlling the abnormal PCIe device to reset;

[0015] Determining whether the abnormal PCIe device is unlocked;

[0016] If yes, it is determined that the abnormal PCIe device has been unlocked;

[0017] If not, the abnormal PCIe device is controlled to be powered on and off and restarted to unlock the abnormal PCIe device.

[0018] Preferably, the BMC is also connected to the CPLD via an I2C bus, and each first reset signal output terminal of the CPLD is connected to a reset terminal of each PCIe device in a one-to-one correspondence;

[0019] Controlling the abnormal PCIe device to reset, including:

[0020] A first reset instruction is sent to the CPLD, so that the CPLD sets the reset terminal of the abnormal PCIe device to a first reset level based on the first reset instruction, so as to reset the abnormal PCIe device.

[0021] Preferably, each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence;

[0022] Controlling the abnormal PCIe device to power on, off, and restart, including:

[0023] A restart instruction is sent to the CPLD, so that the CPLD sends a restart enable level to the EFUSE connected to the abnormal PCIe device based on the restart instruction, so that the EFUSE connected to the abnormal PCIe device disconnects the power supply to the abnormal PCIe device through the power supply output end and then powers on the abnormal PCIe device again to restart.

[0024] Preferably, the second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch;

[0025] Controlling the I2C Switch reset includes:

[0026] A second reset instruction is sent to the CPLD, so that the CPLD sets the reset terminal of the I2CSwitch to a second reset level based on the second reset instruction, so as to reset the I2C Switch.

[0027] Preferably, determining whether the abnormal PCIe device is unlocked includes:

[0028] Controlling the I2C Switch to select the I2C bus connected to the abnormal PCIe device;

[0029] Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level;

[0030] If not, it is determined that the abnormal PCIe device is not unlocked, the I2C Switch is controlled to skip the abnormal PCIe device to poll each of the PCIe devices, and the abnormal PCIe device is controlled to be powered on and off to restart, so as to unlock the abnormal PCIe device.

[0031] Preferably, after controlling the abnormal PCIe device to be powered on and off and restarted, the method further includes:

[0032] Determining whether the abnormal PCIe device is unlocked;

[0033] If not, the operator is alerted.

[0034] Preferably, after the operator is warned, the method further includes:

[0035] Control the abnormal PCIe device to power off.

[0036] Preferably, when polling each PCIe device, if an I2C-dead PCIe device is detected, before sending a continuous clock signal to the I2C-dead PCIe device, the method further includes:

[0037] Controlling the I2C Switch to sequentially select the I2C buses connected to the respective PCIe devices to poll the respective PCIe devices;

[0038] Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level;

[0039] If so, it is determined that the I2C of the PCIe device connected to the I2C bus currently selected by the I2C Switch is hung.

[0040] In order to solve the above technical problems, the present invention provides a PCIe device I2C deadlock problem processing system, which is applied to BMC, wherein the BMC is connected to an I2C Switch via an I2C bus, and the I2C Switch is connected to each of the PCIe devices via each I2C bus. The system comprises:

[0041] A signal sending unit, configured to send a continuous clock signal to the PCIe device that is hung with I2C if a PCIe device that is hung with I2C is detected when polling each PCIe device;

[0042] A judging unit, used to judge whether the PCIe device that is hung by I2C is unlocked;

[0043] A positioning unit, used for positioning the PCIe device that is hung by I2C as an abnormal PCIe device when the PCIe device that is hung by I2C is not unlocked;

[0044] A first control unit, configured to control the I2C Switch to reset, and to poll each of the PCIe devices by skipping the abnormal PCIe device through the reset I2C Switch;

[0045] The second control unit is used to control the abnormal PCIe device to reset and / or control the abnormal PCIe device to power on and off and restart, so as to unlock the abnormal PCIe device.

[0046] In order to solve the above technical problems, the present invention provides a device for processing the I2C deadlock problem of a PCIe device, which is applied to a BMC, and the device comprises:

[0047] Memory for storing computer programs;

[0048] The processor is used to implement the steps of the method for handling the I2C hang problem of the PCIe device as described above when executing the computer program.

[0049] Preferably, the BMC is connected to the I2C Switch via an I2C bus, and the I2C Switch is connected to each of the PCIe devices via each I2C bus;

[0050] The BMC is also connected to the CPLD via an I2C bus, and each first reset signal output terminal of the CPLD is connected to a reset terminal of each PCIe device in a one-to-one correspondence;

[0051] Each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence;

[0052] The second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch.

[0053] To solve the above technical problems, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for handling the I2C deadlock problem of a PCIe device as described above are implemented.

[0054] The present application provides a method, system, device and storage medium for handling the I2C deadlock problem of a PCIe device, which relates to the field of server management and is applied to BMC. If an I2C deadlocked PCIe device is detected when polling each PCIe device, a continuous clock signal is first sent to the I2C deadlocked PCIe device. If it is not unlocked, the I2C Switch is first controlled to reset, and the abnormal PCIe device is skipped through the reset I2C Switch to poll each PCIe device to avoid affecting the polling of other PCIe devices, and the abnormal PCIe device is controlled to reset and / or the abnormal PCIe device is controlled to power on and off to restart, so that the abnormal PCIe device is unlocked. In the present application, not only can the abnormal PCIe device be prevented from affecting the polling of other normal PCIe devices, but also a variety of unlocking methods are set to ensure that the abnormal PCIe device is unlocked in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 A flowchart of a method for handling an I2C deadlock problem of a PCIe device provided by the present invention;

[0057] Figure 2 A specific flow chart of a method for handling an I2C deadlock problem of a PCIe device provided by the present invention;

[0058] Figure 3 A structural schematic diagram of a system for processing I2C deadlock problems of PCIe devices provided by the present invention;

[0059] Figure 4 A schematic diagram of the structure of a device for processing I2C deadlock problems of a PCIe device provided by the present invention;

[0060] Figure 5A schematic diagram of the connection between a BMC and various modules provided by the present invention. DETAILED DESCRIPTION

[0061] The core of the present invention is to provide a method, system, device and storage medium for handling the I2C deadlock problem of PCIe devices, which can not only avoid the abnormal PCIe devices from affecting the polling of other normal PCIe devices, but also set up multiple unlocking methods to ensure that the abnormal PCIe devices are unlocked in time.

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] Please refer to Figure 1 , Figure 1 A flowchart of a method for handling an I2C deadlock problem of a PCIe device provided by the present invention is provided. The method is applied to a BMC. The BMC is connected to an I2C Switch (I2C routing chip) via an I2C bus. The I2C Switch is connected to each PCIe device via each I2C bus. The method includes:

[0064] S11: When polling each PCIe device, if an I2C-dead PCIe device is detected, a continuous clock signal is sent to the I2C-dead PCIe device;

[0065] Considering that in the prior art, when BMC polls PCIe devices to collect the working parameters of each PCIe device, and then determines whether each PCIe device is working normally according to the working parameters, if it is detected that a certain PCIe device is in an I2C hung state, that is, I2C cannot transmit signals normally, a continuous clock signal will be sent to the I2C hung PCIe device to unlock the PCIe device.

[0066] However, due to the large number of PCIe device types and manufacturers, different PCIe devices have different unlocking conditions. Sending continuous clock signals may unlock some PCIe devices, but some PCIe devices still cannot be unlocked normally and remain in the I2C hung state. If the PCIe device is not unlocked, the BMC will not be able to skip the I2C hung PCIe device to poll other PCIe devices, which will affect the collection of working parameters of other PCIe devices, that is, it is impossible to determine whether other PCIe devices are working normally. Among them, the working parameters can include but are not limited to the temperature of the PCIe device, and if each PCIe device cannot be obtained in time, the cooling strategy of the whole machine cannot be adjusted in time.

[0067] In order to solve the above technical problems, in the present application, when an I2C-hung PCIe device is detected, a continuous clock signal is first sent to the I2C-hung PCIe device, such as sending a clock with a continuous time of a preset time, or continuously sending a clock signal for a preset number of times, to determine whether the current PCIe device can be unlocked.

[0068] S12: Determine whether the PCIe device hung by I2C is unlocked;

[0069] It should be noted that since the I2C bus includes two buses, SDA (Serial Data, data signal line of the I2C bus) and SCL (clock signal line of the I2C bus), SDA is used to transmit data signals, and SCL is used to transmit clock signals. If the level of SDA is always low when the I2C is hung, and SCL is normal, then sending a continuous clock signal through SCL may unlock the PCIe device hung by I2C, but there is also a possibility that it cannot be unlocked. If the level of SCL is always low when the I2C is hung, and SDA is normal, then a continuous clock signal cannot be sent through SDA, and this method cannot unlock the PCIe device hung by I2C. However, first try to unlock the PCIe device hung by I2C based on sending a continuous clock signal. If it can be unlocked, there is no need for subsequent processing, which reduces the difficulty of the BMC's work and improves the polling efficiency. Therefore, it is necessary to judge whether the PCIe device hung by I2C is unlocked to determine whether sending a continuous clock signal can unlock the PCIe device hung by I2C.

[0070] Specifically, since the I2C Switch is equivalent to a multi-way switch between the PCIe device and the BMC, the I2C-dead PCIe device is connected to the BMC through the I2C Switch. When the PCIe device is I2C-dead, the SDA or SCL level of the I2C bus connected between the I2C-dead PCIe device and the I2CSwitch is always low. At this time, the corresponding SDA or SCL level between the I2C Switch and the BMC will also be always low. Based on this, the BMC can determine whether the PCIe device is I2C-dead according to whether the I2C bus connected between itself and the I2C Switch has a phenomenon of always low level.

[0071] S13: If the I2C-hung PCIe device is not unlocked, the I2C-hung PCIe device is located as an abnormal PCIe device;

[0072] If the I2C-hung PCIe device is not unlocked, since the current I2C-hung PCIe device remains connected to the BMC, the BMC can directly send a continuous clock signal to the I2C-hung PCIe device. However, in order to avoid affecting other PCIe devices, the I2C-hung PCIe device is also positioned as an abnormal PCIe device in this embodiment so that the abnormal PCIe device can be unlocked in other ways.

[0073] S14: Control the I2C Switch to reset, and poll each PCIe device by skipping the abnormal PCIe device through the reset I2C Switch;

[0074] In the process of unlocking the abnormal PCIe device, in order to ensure that the BMC polls other PCIe devices, the I2C Switch is directly controlled to reset in this application. After the reset, the I2C bus between the I2C Switch and each PCIe device is all shut down, that is, the level of the I2C bus between the BMC and the I2C Switch will not be pulled down, and the BMC can poll each PCIe device again.

[0075] However, since it has been determined that the abnormal PCIe device is in an I2C hung state, in order to prevent the BMC from polling the abnormal PCIe device again, after the I2C Switch is reset, the BMC skips the abnormal PCIe device and polls each PCIe device, that is, polls all PCIe devices except the abnormal PCIe device to collect the working parameters of other PCIe devices.

[0076] S15: Control the abnormal PCIe device to reset and / or control the abnormal PCIe device to power on and off to restart, so as to unlock the abnormal PCIe device.

[0077] After resetting the I2C Switch, the I2C Switch can poll other PCIe devices. In this embodiment, the abnormal PCIe device is unlocked by controlling the abnormal PCIe device to reset and / or power on and off the abnormal PCIe device to release the I2C hung state.

[0078] Among them, after the whole machine is powered on, if the CPU and BMC and other systems have been powered on and started, the PCH (Platform Controller Hub, integrated south bridge) needs to send a reset signal to each PCIe device to enable each PCIe device to start in a normal working state. In this embodiment, if the abnormal PCIe device cannot be unlocked by sending a continuous clock signal, the abnormal PCIe device can be controlled to reset, and / or the abnormal PCIe device can be controlled to power on and off and restart, thereby avoiding the whole machine being unable to maintain continuous operation due to power on and off and restarting, increasing the probability of unlocking the abnormal PCIe device, and ensuring that more abnormal PCIe devices can work normally.

[0079] In summary, the present application can not only prevent abnormal PCIe devices from affecting the polling of other normal PCIe devices, but also set up multiple unlocking methods to ensure that abnormal PCIe devices are unlocked in time.

[0080] Based on the above embodiments:

[0081] Please refer to Figure 2 , Figure 2 A specific flow chart of a method for processing an I2C deadlock problem of a PCIe device provided by the present invention.

[0082] As a preferred embodiment, controlling the abnormal PCIe device to reset and / or controlling the abnormal PCIe device to power on and off to restart, so as to unlock the abnormal PCIe device, includes:

[0083] Control abnormal PCIe device reset;

[0084] Determine whether the abnormal PCIe device is unlocked;

[0085] If yes, it is determined that the abnormal PCIe device has been unlocked;

[0086] If not, the abnormal PCIe device is controlled to be powered on and off and restarted to unlock the abnormal PCIe device.

[0087] In this embodiment, when the abnormal PCIe device is unlocked by controlling the abnormal PCIe device to reset and / or controlling the abnormal PCIe device to power on and off, the abnormal PCIe device is first controlled to reset to determine whether this method can directly unlock the abnormal PCIe device. If so, no subsequent processing is required, and the normal operation of the abnormal PCIe device is ensured as soon as possible, thereby reducing the workload of the BMC.

[0088] If controlling the abnormal PCIe device to reset cannot unlock the abnormal PCIe device, the abnormal PCIe device is controlled to be powered on and off and restarted, thereby unlocking the abnormal PCIe device.

[0089] Based on this, multiple unlocking methods can unlock more types of abnormal PCIe devices, restore their normal operation, and ensure the orderly operation of the entire machine.

[0090] As a preferred embodiment, the BMC is further connected to a CPLD (Complex Programmable Logic Device) via an I2C bus, and each first reset signal output terminal of the CPLD is connected to a reset terminal of each PCIe device in a one-to-one correspondence.

[0091] Control abnormal PCIe device reset, including:

[0092] A first reset instruction is sent to the CPLD, so that the CPLD sets the reset terminal of the abnormal PCIe device to a first reset level based on the first reset instruction, so as to reset the abnormal PCIe device.

[0093] In this embodiment, a CPLD is set between the BMC and each PCIe device. When controlling the reset of an abnormal PCIe device, the BMC sends a first reset instruction to the CPLD, thereby indirectly controlling the reset of the abnormal PCIe device. Specifically, after receiving the first reset instruction, the CPLD can convert the first reset instruction to output a first reset level from its first reset signal terminal connected to the abnormal PCIe device, so as to reset the abnormal PCIe device and ensure accurate control of the abnormal PCIe device.

[0094] It should also be noted that the PCH in this embodiment is also connected to the CPLD. When the entire machine is powered on, if the CPU, BMC and other systems have been powered on and started, the PCH sends a PLTRST signal to the CPLD. At this time, the CPLD can send a reset signal to each PCIe device through its own first reset signal output terminals according to PLTRST, so that each PCIe device can start in a normal working state.

[0095] As a preferred embodiment, each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE (one-time programmable memory) in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence;

[0096] Control the power-on, power-off and restart of abnormal PCIe devices, including:

[0097] A restart instruction is sent to the CPLD, so that the CPLD sends a restart enable level to the EFUSE connected to the abnormal PCIe device based on the restart instruction, so that the EFUSE connected to the abnormal PCIe device disconnects the power supply to the abnormal PCIe device through the power supply output terminal and then powers on and restarts the abnormal PCIe device.

[0098] In this embodiment, an EFUSE is also set between the CPLD and each PCIe device. The EFUSE can control the power supply of the PCIe device. The BMC sends a restart instruction to the CPLD so that the CPLD controls the EFUSE to power on and off the abnormal PCIe device and restart it.

[0099] After receiving the restart instruction, CPLD outputs the restart enable level through its enable output terminal connected to the abnormal PCIe device based on the restart instruction. Specifically, it can stop outputting the enable signal to make EFUSE stop supplying power to the abnormal PCIe device. After the abnormal PCIe device loses power, it outputs the enable signal again to make EFUSE supply power to the abnormal PCIe device again, thereby realizing the power-on and power-off restart of the abnormal PCIe device, avoiding restarting the entire machine, and improving the unlocking efficiency.

[0100] As a preferred embodiment, the second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch;

[0101] Control I2C Switch reset, including:

[0102] A second reset instruction is sent to the CPLD, so that the CPLD sets the reset terminal of the I2C Switch to a second reset level based on the second reset instruction, so as to reset the I2C Switch.

[0103] In this embodiment, the second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch. Therefore, when the BMC controls the I2C Switch to reset, it can actually send a second reset instruction to the CPLD through the I2C bus.

[0104] After receiving the second reset instruction, the CPLD sets the level of its second reset signal output terminal to the second reset level based on the second reset instruction, so as to reset the I2C Switch and enable the I2C Switch to select other PCIe devices.

[0105] As a preferred embodiment, determining whether the abnormal PCIe device is unlocked includes:

[0106] Control the I2C Switch to select the I2C bus connected to the abnormal PCIe device;

[0107] Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level;

[0108] If not, it is determined that the abnormal PCIe device is not unlocked, and the I2C Switch is controlled to skip the abnormal PCIe device to poll each PCIe device, and the abnormal PCIe device is controlled to be powered on and off and restarted to unlock the abnormal PCIe device.

[0109] In this embodiment, when judging whether the abnormal PCIe device is unlocked, the I2C Switch is first controlled to select the I2C bus connected to the abnormal PCIe device, that is, the BMC attempts to obtain the working parameters of the abnormal PCIe device through the I2C Switch. If the level of the I2C bus between the BMC and the I2C Switch is not pulled to a constant low at this time, it can be determined that the abnormal PCIe device has been unlocked, and it is no longer in the I2C hung state, and it can be polled normally.

[0110] If the level of the I2C bus between the BMC and the I2C Switch is still pulled to a constant low at this time, it can be determined that the abnormal PCIe device is not unlocked and needs to continue to be unlocked, while the I2C Switch still keeps skipping the abnormal PCIe device and polling other PCIe devices.

[0111] As a preferred embodiment, after controlling the abnormal PCIe device to be powered on and off and restarted, the method further includes:

[0112] Determine whether the abnormal PCIe device is unlocked;

[0113] If not, the operator is alerted.

[0114] If the abnormal PCIe device is still not unlocked after being powered on and off and restarted, an alarm may be issued to an operator so that the operator can perform manual maintenance on the abnormal PCIe device to prevent it from being in an I2C hung state.

[0115] As a preferred embodiment, after the operator is warned, the method further includes:

[0116] Control abnormal PCIe devices to power off.

[0117] In order to prevent the abnormal PCIe device from failing to work properly or being damaged due to the inability to collect its operating parameters such as temperature when its I2C is hung, this embodiment also controls the abnormal PCIe device to be powered off after alerting the operator to ensure that it can work normally and communicate with it normally after the I2C hang state ends.

[0118] In addition, when the abnormal PCIe device is controlled to be powered off after the operator is warned, a power-off instruction may be sent to the CPLD, so that the CPLD sets its enable output terminal to a power-off enable level, causing EFUSE to stop supplying power to the abnormal PCIe device.

[0119] As a preferred embodiment, when polling each PCIe device, if an I2C-dead PCIe device is detected, before sending a continuous clock signal to the I2C-dead PCIe device, the method further includes:

[0120] Control the I2C Switch to sequentially select the I2C bus connected to each PCIe device to poll each PCIe device;

[0121] Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level;

[0122] If so, it is determined that the I2C of the PCIe device connected to the I2C bus currently selected by the I2C Switch is hung.

[0123] In this embodiment, when determining whether the currently polled PCIe device is an abnormal PCIe device, the I2C Switch is specifically controlled to sequentially select the I2C buses connected to each PCIe device, that is, the BMC sequentially obtains the working parameters of each PCIe device. It should be noted that the BMC collects the working parameters of the PCIe device connected to which the I2C bus currently selected by the I2C Switch. Therefore, the BMC can poll each PCIe device when the I2C Switch sequentially selects the I2C buses connected to each PCIe device.

[0124] During the process of collecting the working parameters of the PCIe device, if the BMC detects that the I2C bus currently connected to the I2C Switch is set to a low level, that is, it is set to a constant low, this indicates that the I2C bus connected to the PCIe device selected by the I2C Switch is in a hung state, that is, the PCIe device whose working parameters are currently being obtained is an abnormal PCIe device.

[0125] Based on this, it is possible to accurately determine whether the currently polled PCIe device is in an I2C hung state, so that it can be unlocked in time.

[0126] It should be noted that the BMC in this application can collect the working parameters of multiple PCIe devices at the same time, that is, the I2CSwitch can simultaneously select multiple I2C buses connected to the PCIe devices to improve the polling efficiency. However, in order to avoid address conflicts, it is preferred to select one I2C bus at a time.

[0127] Please refer to Figure 3 , Figure 3 The present invention provides a structural schematic diagram of a system for processing an I2C deadlock problem of a PCIe device. The system is applied to a BMC. The BMC is connected to an I2C Switch via an I2C bus. The I2C Switch is connected to each PCIe device via each I2C bus. The system includes:

[0128] The signal sending unit 31 is used to send a continuous clock signal to the I2C-hung PCIe device if an I2C-hung PCIe device is detected when polling each PCIe device;

[0129] A judging unit 32 is used to judge whether the I2C-hung PCIe device is unlocked;

[0130] A positioning unit 33, used for locating the I2C-hung PCIe device as an abnormal PCIe device when the I2C-hung PCIe device is not unlocked;

[0131] A first control unit 34, used for controlling the I2C Switch to reset, and polling each PCIe device by skipping the abnormal PCIe device through the reset I2C Switch;

[0132] The second control unit 35 is used to control the abnormal PCIe device to reset and / or control the abnormal PCIe device to power on and off to restart, so as to unlock the abnormal PCIe device.

[0133] For an introduction to a system for processing an I2C deadlock problem of a PCIe device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here.

[0134] Please refer to Figure 4 , Figure 4 A schematic diagram of a PCIe device I2C deadlock problem processing device provided by the present invention, the device is applied to BMC, and the device includes:

[0135] A memory 41, used for storing computer programs;

[0136] The processor 42 is used to implement the steps of the method for handling the I2C hang problem of the PCIe device as described above when executing the computer program.

[0137] Please refer to Figure 5 , Figure 5 A schematic diagram of the connection between a BMC and various modules provided by the present invention.

[0138] As a preferred embodiment, the BMC is connected to the I2C Switch via the I2C bus, and the I2C Switch is connected to each PCIe device via each I2C bus.

[0139] The BMC is also connected to the CPLD via the I2C bus, and each first reset signal output terminal of the CPLD is connected to the reset terminal of each PCIe device in a one-to-one correspondence;

[0140] Each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence;

[0141] The second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch.

[0142] in Figure 5 Taking two PCIe devices, namely PCIe device 1 and PCIe device 2 as an example, BMC, I2C Switch, CPLD and PCH are set in the server motherboard, PCIe device 1, PCIe device 2 and EFUSE for powering PCIe device 1 and PCIe device 2 are set on the server backplane / Riser, I2C Switch is connected to PCIe device 1 through the I2C bus of S0 port, and is connected to PCIe device 2 through the I2C bus of S1 port, BMC sends the first reset instruction, the second reset instruction and the restart instruction through the I2C bus connected to CPLD, and PCIe_RST output by CPLD is the first reset level, EN is the restart enable level, RST is the second reset level, and EFUSE is used to provide POWER, that is, power supply, to PCIe devices.

[0143] For an introduction to a device for handling an I2C deadlock problem of a PCIe device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here.

[0144] The computer-readable storage medium in the present invention stores a computer program, and when the computer program is executed by a processor, the steps of the method for handling the I2C hang problem of the PCIe device as described above are implemented.

[0145] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here.

[0146] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0147] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for handling the I2C hang problem of a PCIe device, characterized in that: Applied to BMC, the BMC is connected to the I2C Switch via an I2C bus, and the I2C Switch is connected to each of the PCIe devices via each I2C bus. The method includes: When polling each PCIe device, if an I2C-dead PCIe device is detected, a continuous clock signal is sent to the I2C-dead PCIe device; Determine whether the PCIe device that is hung by I2C is unlocked; If not, the PCIe device that is located to be I2C-hung is an abnormal PCIe device; Controlling the I2C Switch to reset, and polling each of the PCIe devices by skipping the abnormal PCIe device through the reset I2C Switch; Controlling the abnormal PCIe device to reset and / or controlling the abnormal PCIe device to power on and off and restart, so that the abnormal PCIe device is unlocked; The BMC is also connected to the CPLD via an I2C bus, and each first reset signal output terminal of the CPLD is connected to a reset terminal of each PCIe device in a one-to-one correspondence; Controlling the abnormal PCIe device to reset, including: Sending a first reset instruction to the CPLD, so that the CPLD sets the reset terminal of the abnormal PCIe device to a first reset level based on the first reset instruction, so as to reset the abnormal PCIe device; Each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence; Controlling the abnormal PCIe device to power on, off, and restart, including: Sending a restart instruction to the CPLD, so that the CPLD sends a restart enable level to the EFUSE connected to the abnormal PCIe device based on the restart instruction, so that the EFUSE connected to the abnormal PCIe device disconnects the power supply to the abnormal PCIe device through the power supply output end and then re-powers on the abnormal PCIe device to restart; The second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch; Controlling the I2C Switch reset, including: Sending a second reset instruction to the CPLD, so that the CPLD sets the reset terminal of the I2C Switch to a second reset level based on the second reset instruction, so as to reset the I2C Switch; Determining whether the abnormal PCIe device is unlocked includes: Controlling the I2C Switch to select the I2C bus connected to the abnormal PCIe device; Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level; If not, it is determined that the abnormal PCIe device is not unlocked, the I2C Switch is controlled to skip the abnormal PCIe device to poll each of the PCIe devices, and the abnormal PCIe device is controlled to be powered on and off to restart, so as to unlock the abnormal PCIe device.

2. The method for handling the I2C deadlock problem of a PCIe device as claimed in claim 1, characterized in that: Controlling the abnormal PCIe device to reset and / or controlling the abnormal PCIe device to power on and off to restart, so that the abnormal PCIe device is unlocked, includes: Controlling the abnormal PCIe device to reset; Determining whether the abnormal PCIe device is unlocked; If yes, it is determined that the abnormal PCIe device has been unlocked; If not, the abnormal PCIe device is controlled to be powered on and off and restarted to unlock the abnormal PCIe device.

3. The method for handling the I2C deadlock problem of a PCIe device as claimed in claim 2, characterized in that: After controlling the abnormal PCIe device to be powered on and off and restarted, the method further includes: Determining whether the abnormal PCIe device is unlocked; If not, the operator is alerted.

4. The method for handling the I2C deadlock problem of a PCIe device as claimed in claim 3, characterized in that: After the operator is alerted, the following also applies: Control the abnormal PCIe device to power off.

5. The method for handling the I2C deadlock problem of a PCIe device according to any one of claims 1 to 4, characterized in that: When polling each PCIe device, if a PCIe device with an I2C hanging is detected, before sending a continuous clock signal to the PCIe device with an I2C hanging, the method further includes: Controlling the I2C Switch to sequentially select the I2C buses connected to the respective PCIe devices to poll the respective PCIe devices; Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level; If so, it is determined that the I2C of the PCIe device connected to the I2C bus currently selected by the I2C Switch is hung.

6. A system for handling I2C deadlock problems of PCIe devices, characterized in that: Applied to BMC, the BMC is connected to the I2C Switch via an I2C bus, the I2C Switch is connected to each of the PCIe devices via each I2C bus, and the system includes: A signal sending unit, configured to send a continuous clock signal to the PCIe device that is hung with I2C if a PCIe device that is hung with I2C is detected when polling each PCIe device; A judging unit, used to judge whether the PCIe device that is hung by I2C is unlocked; A positioning unit, used for positioning the PCIe device that is hung by I2C as an abnormal PCIe device when the PCIe device that is hung by I2C is not unlocked; A first control unit, configured to control the I2C Switch to reset, and to poll each of the PCIe devices by skipping the abnormal PCIe device through the reset I2C Switch; A second control unit, used for controlling the abnormal PCIe device to reset and / or control the abnormal PCIe device to power on and off and restart, so as to unlock the abnormal PCIe device; The BMC is also connected to the CPLD via an I2C bus, and each first reset signal output terminal of the CPLD is connected to a reset terminal of each PCIe device in a one-to-one correspondence; Controlling the abnormal PCIe device to reset, including: Sending a first reset instruction to the CPLD, so that the CPLD sets the reset terminal of the abnormal PCIe device to a first reset level based on the first reset instruction, so as to reset the abnormal PCIe device; Each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence; Controlling the abnormal PCIe device to power on, off, and restart, including: Sending a restart instruction to the CPLD, so that the CPLD sends a restart enable level to the EFUSE connected to the abnormal PCIe device based on the restart instruction, so that the EFUSE connected to the abnormal PCIe device disconnects the power supply to the abnormal PCIe device through the power supply output end and then re-powers on the abnormal PCIe device to restart; The second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch; Controlling the I2C Switch reset, including: Sending a second reset instruction to the CPLD, so that the CPLD sets the reset terminal of the I2C Switch to a second reset level based on the second reset instruction, so as to reset the I2C Switch; Determining whether the abnormal PCIe device is unlocked includes: Controlling the I2C Switch to select the I2C bus connected to the abnormal PCIe device; Determine whether the I2C bus connected between itself and the I2C Switch is set to a low level; If not, it is determined that the abnormal PCIe device is not unlocked, the I2C Switch is controlled to skip the abnormal PCIe device to poll each of the PCIe devices, and the abnormal PCIe device is controlled to be powered on and off to restart, so as to unlock the abnormal PCIe device.

7. A device for handling I2C deadlock problems of PCIe devices, characterized in that: Applied to BMC, the device comprises: Memory for storing computer programs; A processor, configured to implement the steps of the method for handling the I2C hang problem of a PCIe device as claimed in any one of claims 1 to 5 when executing the computer program.

8. The PCIe device I2C deadlock problem processing device as claimed in claim 7, characterized in that: The BMC is connected to the I2C Switch via an I2C bus, and the I2C Switch is connected to each of the PCIe devices via each I2C bus; The BMC is also connected to the CPLD via an I2C bus, and each first reset signal output terminal of the CPLD is connected to a reset terminal of each PCIe device in a one-to-one correspondence; Each enable output terminal of the CPLD is connected to the enable terminal of each EFUSE in a one-to-one correspondence, and each power supply output terminal of the EFUSE is connected to the power supply terminal of each PCIe device in a one-to-one correspondence; The second reset signal output terminal of the CPLD is connected to the reset terminal of the I2C Switch.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for handling the I2C hang problem of a PCIe device according to any one of claims 1 to 5 are implemented.