Method and system for managing hot plugging of backplane equipment

Through the coordinated work of the main control chip and the host, the problem that the host cannot directly control the backplane slot power supply and LED lights is solved, simplifying hardware design and supporting hot-swap management of multiple backplanes.

CN115687217BActive Publication Date: 2025-09-02INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211393381.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2025-09-02
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

In the prior art, the host cannot directly control the power supply and LED lights of the backplane slot, resulting in complex hardware design and increasing code volume.

Method used

The main control chip receives interrupts from the backplane device, reads the in-bit state and sets it in the configuration space. The host controls the power supply and LED light state of the backplane device, and communicates using the I2C bus.

Benefits of technology

It realizes the host's direct control of the backplane slot power supply and LED lights, simplifies hardware design, reduces the amount of code, and supports hot-swap management of multiple backplanes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115687217B_ABST
    Figure CN115687217B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of backplane hot-plug management, and specifically provides a method, system, and server for managing the hot plugging of backplane devices. The method comprises the following steps: after a backplane device is hot-plugged, the backplane sends an interrupt to a main control chip; after receiving the backplane interrupt, the main control chip reads the device's in-place status, sets the device's in-place status in a configuration space, and sends an interrupt to a host; after receiving the main control chip interrupt, the host reads the device's in-place status in the configuration space, controls the power supply of the backplane device based on the device's in-place status, and modifies the corresponding LED control bit in the configuration space; after the host completes processing, it sends an interrupt to the main control chip; after receiving the host interrupt and discovering that the LED control bit in the configuration space has been modified, the main chip operates the corresponding LED on the backplane via I2C. The implementation process requires less code and is simple to implement in hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of backplane hot plug management, and in particular to a method and system for managing the hot plug of backplane equipment. Background Art

[0002] A hard drive backplane is a circuit board used to connect multiple hard drives. It is commonly used in servers but can also be used to build personal storage systems. NVMe backplanes can be used to mount hard drives that support the NVMe protocol.

[0003] Hot-swapping of hard drives on servers is a normal phenomenon. PCIe hardware supports hot-swapping and implements basic functions such as requesting and releasing BAR space and configuration space.

[0004] Most existing hardware from various manufacturers supports these basic functions, but some auxiliary functions, such as backplane device power management and LED light control, are implemented solely through the logic of the main control chip. The adapter (the host in this application) cannot directly control the power supply and LED lights of the backplane slots. Some manufacturers register the main control chip as an SES device, allowing the host to control the power supply and LED lights of the backplane slots, but this adds a lot of code and complicates the hardware design. Summary of the Invention

[0005] Aiming at the problem that auxiliary functions such as power management of backplane equipment and control of LED lights are only realized by the main control chip and the host cannot directly control the power supply and LED lights of the backplane slots, the present invention provides a method and system for managing hot plugging of backplane equipment.

[0006] In a first aspect, the technical solution of the present invention provides a method for managing hot plugging of backplane devices, comprising the following steps:

[0007] When a device on the backplane is hot-swapped, the backplane sends an interrupt to the main control chip;

[0008] After receiving the backplane interrupt, the main control chip reads the status of the device on the backplane, sets the status of the device in the configuration space, and sends an interrupt to the host;

[0009] After receiving the interrupt from the main control chip, the host reads the device status in the configuration space, controls the power supply of the device on the backplane according to the device status, and changes the bit of the control LED in the corresponding configuration space;

[0010] After the host completes the processing, it sends an interrupt to the main control chip;

[0011] The main control chip receives the host interrupt and finds that the bit controlling the LED in the configuration space has been modified. It then operates the corresponding LED on the backplane through I2C.

[0012] As a further limitation of the technical solution of the present invention, after receiving the backplane interrupt, the main control chip reads the in-place status of the device on the backplane, sets the in-place status of the device in the configuration space, and sends the interrupt to the host, including the following steps:

[0013] The main control chip receives backplane interrupt;

[0014] Set the global bitmap according to the input interface where the interrupt occurs, and clear the received interrupt;

[0015] After receiving the interrupt, the device's in-place status on the backplane is read, the device's in-place status is set in the configuration space, and an interrupt is sent to the host.

[0016] As a further limitation of the technical solution of the present invention, the steps of reading the in-place status of a device on the backplane, setting the in-place status of the device in the configuration space, and sending an interrupt to the host include:

[0017] Parse the interrupt input interface number according to the bitmap and find the corresponding connector;

[0018] Get the status of the device mounted on the connector through I2C;

[0019] Set the register of the corresponding configuration space according to the portId of the hot-plug device;

[0020] Send an interrupt to the host.

[0021] As a further limitation of the technical solution of the present invention, after the main control chip receives the host interrupt, the step includes:

[0022] Set the global bitmap according to the input interface where the interrupt occurs, and clear the received interrupt;

[0023] Detects configuration space changes.

[0024] As a further limitation of the technical solution of the present invention, the step of detecting and discovering the modified configuration space includes:

[0025] Parse the port group that has experienced an interruption based on the bitmap; all ports in a port group share a common configuration space.

[0026] Get the port where the interrupt occurs by reading the port status register in the configuration space.

[0027] As a further limitation of the technical solution of the present invention, the steps of operating the LED on the corresponding backplane include:

[0028] Read the LED status bit in the slot_ctrl register in the configuration space of the port where the interrupt occurs;

[0029] Determine whether the status bit has changed;

[0030] If so, call the callback function corresponding to the device to set the LED light status and turn on the light;

[0031] If not, select the next device and execute the following steps: Read the LED status bit in the slot_ctrl register in the configuration space of the port where the interrupt occurs.

[0032] As a further limitation of the technical solution of the present invention, the method further includes:

[0033] Create an interrupt service processing thread and initialize it; the interrupt service processing thread is used to handle backplane interrupts and host interrupts;

[0034] Create an LED control thread, which is used to control the LED light status.

[0035] As a further limitation of the technical solution of the present invention, the step of initializing the interrupt service processing thread includes:

[0036] Reading configuration files from non-volatile storage media;

[0037] Convert the connector-related configuration files into a structure and mount it in the connector list;

[0038] Convert device-related configuration files into structures and mount them under the corresponding connector;

[0039] Traverse all connectors and call the corresponding backplane initialization and register various callback functions according to the backplane type hanging on the connector

[0040] Traverse all devices and set their port configuration space to support hot plugging;

[0041] Determine the status of devices mounted on each connector through I2C;

[0042] Set the slot_status and link_status registers in the configuration space according to the device's in-place status;

[0043] The initialization results are recorded in the event log; finally, the next stage is entered to start processing the backplane interrupt and the host interrupt.

[0044] In a second aspect, the technical solution of the present invention provides a system for managing hot plugging of backplane devices, including a host, a main control chip, and a backplane, wherein the backplane is provided with a plurality of slots for connecting hard disks;

[0045] The host is connected to the main control chip;

[0046] The main control chip is equipped with several ports that are connected to the slots on the backplane;

[0047] The system is managed by the method according to the first aspect.

[0048] The interrupt service processing thread and the LED control thread are set in the main control chip.

[0049] In a third aspect, the technical solution of the present invention provides a server, which includes the system for managing hot plugging of backplane devices as described in the second aspect.

[0050] As can be seen from the above technical solution, the present invention has the following advantages: When a hard drive is hot-plugged, the backplane sends an interrupt notification to the main control chip. The main control chip accesses the backplane through the I2C bus to obtain which hard drive has been hot-plugged, and then sends it to the host via an interrupt. After receiving the interrupt, the host can perform operations such as powering on and off the slot and operating the LED. After the host completes the processing, it notifies the main control chip via an interrupt. The implementation process requires less code and the hardware implementation is simple. It can support UBM, VPP, and even self-developed protocol backplanes, and can support multiple backplanes.

[0051] In addition, the present invention has a reliable design principle, a simple structure and a very broad application prospect.

[0052] It can be seen that compared with the prior art, the present invention has outstanding substantial features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0054] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0055] Figure 2 It is a system architecture diagram of an embodiment of the present invention.

[0056] Figure 3 It is the overall flow chart of processing device hot plugging.

[0057] Figure 4 This is a flow chart for processing backplane interrupts.

[0058] Figure 5 This is the flowchart for handling Adaptor interruption.

[0059] Figure 6This is the flowchart for initializing the hotPlugHdr thread.

[0060] Figure 7 This is the connector configuration file and its function diagram.

[0061] Figure 8 This is a diagram of the Drive configuration file and its functions. DETAILED DESCRIPTION

[0062] Most existing manufacturers' hardware supports these basic functions, but some auxiliary functions such as power management of backplane devices, control of LED lights, etc. are only implemented through the main control chip. The Adaptor (the host in this application) cannot directly control the power supply of the backplane slot, LED lights, etc. Some manufacturers register the main control chip as an SES device, thereby enabling the host to control the power supply and LED lights of the backplane slot, but this will add a large amount of code and complicate the hardware design. In order to enable people in this technical field to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 making creative work should fall within the scope of protection of the present invention.

[0063] The English annotations in the article are as follows:

[0064] PCIe (Peripheral Component Interconnect Express): A high-speed serial computer expansion bus standard.

[0065] NVMe (Non Volatile Memory Express): is a logical device interface specification used to access non-volatile memory media attached via the PCIe bus.

[0066] BAR (Base Address Register): Base address register, which stores the base address of the PEIe internal space.

[0067] Adaptor: In this article, it refers specifically to the host.

[0068] SES (Scsi ​​Enclosure Services): Chassis management protocol using the SCSI protocol.

[0069] Drive: The device plugged into the slot on the backplane. In this application, the device is referred to as Drive.

[0070] SlimeLane: A connection line that integrates signal lines for transmitting PEIe data and some sideband signals, such as I2C and interrupt signals.

[0071] connector: connector.

[0072] I2C (Inter-Integrated Circuit): A simple, bidirectional, two-wire synchronous serial bus developed by Philips. It requires only two wires to transmit information between devices connected to the bus.

[0073] UBM (Universal Backplane Management): A backplane management protocol developed by Broadcom.

[0074] VPP (visual pin port): A backplane management protocol developed by Intel.

[0075] Slot: In this article, it specifically refers to the slot on the backplane that is connected to the disk.

[0076] GPIO (General Purpose Input Output): General purpose input and output. In this article, only its input function is used to receive interrupts sent by the backplane. The input interface in this application is GPIO.

[0077] Lane: A group of PCIe differential signal lines.

[0078] Port: In this article, it specifically refers to a PCIe port, which is a logical concept with its own PCIe configuration space. It can consist of multiple lanes, and the number of lanes can be configured through the configuration space.

[0079] DP (downstream port): downstream port.

[0080] Group: In this article, it specifically refers to a PCIe group, a logical combination of one or more ports, consisting of 16 lanes, and sharing a shared configuration space.

[0081] like Figure 1 As shown, an embodiment of the present invention provides a method for managing hot plugging of backplane devices, comprising the following steps:

[0082] Step 1: After a device on the backplane is hot-swapped, the backplane sends an interrupt to the main control chip;

[0083] Step 2: After receiving the backplane interrupt, the main control chip reads the device status on the backplane, sets the device status in the configuration space, and sends an interrupt to the host;

[0084] Step 3: After receiving the interrupt from the main control chip, the host reads the device status in the configuration space, controls the power supply of the device on the backplane according to the device status, and changes the corresponding bit of the LED control in the configuration space;

[0085] Step 4: After the host completes the processing, it sends an interrupt to the main control chip;

[0086] Step 5: The main control chip receives the host interrupt and finds that the bit controlling the LED in the configuration space has been modified. It then operates the corresponding LED on the backplane through I2C.

[0087] When a hard drive is hot-swapped, the backplane sends an interrupt notification to the main control chip. The main control chip accesses the backplane via the I2C bus to determine which hard drive has been hot-swapped and then sends an interrupt notification to the host. Upon receiving the interrupt, the host can control the power cycle of the slots on the backplane and change the status of the corresponding configuration space registers. After the host completes the processing, it notifies the main control chip via an interrupt notification. When the main control chip detects the change in the configuration space register status, it controls the corresponding LED on the backplane via I2C.

[0088] In some embodiments, after receiving the backplane interrupt, the master control chip reads the status of the device on the backplane, sets the status of the device in the configuration space, and sends the interrupt to the host, including the following steps:

[0089] Step 21: The main control chip receives the backplane interrupt;

[0090] Step 22: Set the global bitmap according to the GPIO where the interrupt occurs and clear the received interrupt;

[0091] Step 23: Read the device presence status on the backplane, set the device presence status in the configuration space, and send an interrupt to the host.

[0092] It is further explained that the steps of reading the presence status of a device on the backplane, setting the presence status of the device in the configuration space, and sending an interrupt to the host include:

[0093] Step 231: Parse the interrupt GPIO number according to the bitmap and find the corresponding connector;

[0094] Step 232: Obtain the status of the device mounted on the connector via I2C;

[0095] Step 233: setting a register of a corresponding configuration space according to the portId of the hot-plugged device;

[0096] Step 234: Send an interrupt to the host.

[0097] In some embodiments, in step 5, after the main control chip receives the host interrupt, the following steps are included:

[0098] Step 51: Set the global bitmap according to the GPIO where the interrupt occurs, and clear the received interrupt;

[0099] Step 52: Detect and discover the modified configuration space.

[0100] Accordingly, the steps for detecting and discovering the modified configuration space include:

[0101] Step 521: Parse the port group where the interruption occurred according to the bitmap; all ports in a port group have a common configuration space;

[0102] Step 522: Obtain the port where the interrupt occurs by reading the port status register in the configuration space.

[0103] In step 5, the steps for operating the LED on the corresponding backplane include:

[0104] Step 53: Read the LED status bit in the slot_ctrl register in the configuration space of the port where the interrupt occurs; determine whether the status bit has changed;

[0105] If yes, go to step 54, if no, select the next device and go to step 53;

[0106] Step 54: Call the callback function corresponding to the device for setting the LED light state to turn on the light;

[0107] It should be noted that, in some embodiments, the method further includes:

[0108] Create an interrupt service processing thread and initialize it; the interrupt service processing thread is used to handle backplane interrupts and host interrupts;

[0109] Create an LED control thread, which is used to control the LED light status.

[0110] Here, the steps for initializing the interrupt service processing thread include:

[0111] S01: Reading a configuration file from a non-volatile storage medium;

[0112] S02: Convert the connector-related configuration files into a structure and mount it in a linked list;

[0113] S03: Convert the device-related configuration files into a structure and mount it under the corresponding connector;

[0114] S04: Determine whether it is the last connector;

[0115] If yes, go to step S05, if no, go to step S06;

[0116] S05: cyclic processing of backplane interruption and host interruption;

[0117] S06: Call the corresponding backplane initialization function according to the backplane type of the connector;

[0118] S07: Call and register various callback functions according to the backplane type of the connector;

[0119] S08: traverse all devices and set their port configuration spaces to support hot plugging;

[0120] S09: Determine the status of devices mounted on each connector through I2C;

[0121] S10: Set the slot_status and link_status registers of the configuration space according to the device's in-place status;

[0122] S11: Register host interrupts for all devices;

[0123] S12: Set the attribute information of the GPIO corresponding to the connector;

[0124] S13: Register backplane interrupt;

[0125] S14: Record the event log and execute step S04;

[0126] like Figure 2 As shown, an embodiment of the present invention provides a system for managing hot plugging of backplane devices, including an adaptor, a main control chip, and a backplane, wherein the backplane is provided with a plurality of slots for connecting hard disks;

[0127] The Adaptor is connected to the main control chip;

[0128] The main control chips are connected to the slots on the backplane respectively;

[0129] like Figure 3 As shown, the hot-swap management process of the system is as follows:

[0130] (1) The entire process starts with the hot plugging of the device on the backplane. After the hot plugging, the backplane will send an interrupt to the main control chip through GPIO ( Figure 3 Interrupt 1);

[0131] (2) After receiving the interrupt, the main control chip will read the status of the device on the backplane through I2C. Then it will set the status in the configuration space register and send an interrupt to the adapter. Figure 3 Interrupt 2);

[0132] (3) After receiving the interrupt sent by the main control chip, the Adaptor reads the status of the device in the configuration space, and then controls the power supply of the device on the backplane and sets the corresponding configuration space register status according to the status of the device in place;

[0133] (4) After the Adaptor completes the processing, it will send an interrupt to the main control chip ( Figure 3 Interrupt 3) in the process to inform the main control chip that the process is complete;

[0134] (5) After the main control chip receives the interrupt sent by the Adaptor and finds that the status of the configuration space register has changed, it operates the corresponding LED on the backplane through I2C.

[0135] In the management method provided in this application, the Adaptor controls the LED by changing the slot_ctrl register in the configuration space of the device. When the main control chip finds that the slot_ctrl register has been changed, it will operate the LED on the backplane through I2C.

[0136] The power supply of the Adaptor control backplane slot is directly controlled through the SlimeLane cable without going through the main control chip.

[0137] In step (2), an interrupt service processing thread is set in the main control chip, such as Figure 4 As shown in the figure, the process of the main control chip processing backplane interrupt is as follows:

[0138] (21) The main control chip receives backplane interrupt;

[0139] (22) The interrupt service function sets the global bitmap according to the GPIO where the interrupt occurs, and clears the received interrupt; wakes up the interrupt service processing thread, which is the hotPlugHdr thread here;

[0140] (23) The interrupt service processing thread copies the global bitmap;

[0141] (24) Clear the global bitmap bit by bit with reference to the copied bitmap;

[0142] (25) Parse the interrupt GPIO number according to the bitmap and find the corresponding connector structure;

[0143] (26) Obtain the status of the Drive connected to the connector through I2C according to the connector backplane type;

[0144] (27) Set the slot_status and link_status registers of the corresponding PCIe configuration space according to the pirtID of the hot-swapped Drive;

[0145] (28) Send an interrupt to the Adaptor.

[0146] It should be noted that (1) the hotPlugHdr thread is a resident thread and will loop and wait for the backplane and Adaptor interrupt service functions to wake up and process transactions;

[0147] (2) In the interrupt service function, only set the global bitmap bit, clear the interrupt, and wake up the hotPlugHdr thread, without doing other things, which can effectively reduce the running time of the interrupt service function.

[0148] (3) The bitmap is a two-bit unsigned number. Each bit in one of the 32-bit numbers represents a GPIO interrupt. If a bit is 0, it means that the GPIO represented by the bit has not received an interrupt. If a bit is 1, it means that the GPIO represented by the bit has received an interrupt and needs to be processed. The bitmap can also combine multiple hot-plug interrupts together for processing - when there are too many interrupts from the same connector, all interrupt service functions of the connector will change the same bitmap bit. Each bit of the other 32-bit number represents an interrupt sent by the adapter;

[0149] (4) Since the bitmap is changed before the thread is woken up, and hotPlugHdr first executes a copy of the global bitmap, and clears the global bitmap bit by bit according to the copied bitmap, if multiple hot plug interrupts occur during the operation of hotPlugHdr, it can be guaranteed that after the last interrupt, hotPlugHdr will execute the operation of querying the Drive in-bit status again to ensure that the final state of the Drive is correct. The intermediate state is not guaranteed and there is no need to guarantee it. Clearing the global bitmap bit by bit instead of clearing the entire bitmap can effectively prevent the interruption of other connectors caused by incorrect cleaning. Drive configuration file is as follows Figure 7 shown.

[0150] like Figure 5 As shown, in step (5), the interaction process between the main control chip and the Adaptor is as follows:

[0151] (51) The main control chip receives the Adaptor interrupt;

[0152] (52) The interrupt service function sets the global bitmap according to the GPIO where the interrupt occurs, and clears the received interrupt; wakes up the hotPlugHdr thread;

[0153] (53) hotPlugHdr thread copies the global bitmap;

[0154] (54) Clear the global bitmap bit by bit with reference to the copied bitmap;

[0155] (55) Analyze the port group where the interruption occurred according to the bitmap; all ports in a port group have a common configuration space; that is, analyze which group has been interrupted according to the bitmap;

[0156] (56) Obtain the port where the interrupt occurred by reading the port status register in the configuration space; that is, obtain which port has been interrupted by using the port_intr_status register;

[0157] (57) Execute the callback function provided by the OEM or the default event log function.

[0158] It should be noted that all ports in a group have a common configuration space, and the interrupt flag bit and port_intr_status register generated by the adapter are all in this configuration space.

[0159] In step (57), the purpose of executing the callback function provided by the OEM is actually to control the backplane LED. The main control chip is provided with an LEDCtrl thread, and the control process of the LED is as follows:

[0160] Read the LED status bit in the slot_ctrl register in the configuration space of the port where the interrupt occurs;

[0161] Determine whether the status bit has changed;

[0162] If so, call the callback function corresponding to the device to set the LED light status and turn on the light;

[0163] If not, select the next device and execute the steps to determine whether the status bit has changed;

[0164] It's important to note that, as described above, the Adapter process sets the backplane light status. Specifically, it sets the LED status bit in the slot_ctrl register in the configuration space. The LEDCtrl thread polls this bit, and if a change occurs, it calls the connector's corresponding LED status callback function to turn on the light. Drives are stored in a circular linked list, so there's no chance that the next Drive will be empty.

[0165] In actual application, create an interrupt service processing thread and initialize it; the interrupt service processing thread is used to handle backplane interrupts and host interrupts; create an LED control thread, which is used to control the status of the LED light. The interrupt service processing thread, that is, the hotPlugHdr thread and the LED control thread, that is, the LEDCtrl thread, are set on the main control chip and initialized, such as Figure 6 As shown, the steps of initializing the interrupt service processing thread include:

[0166] S01: Reading a configuration file from a non-volatile storage medium;

[0167] S02: Convert the connector-related configuration files into a structure and mount it in a linked list;

[0168] S03: Convert the device-related configuration files into a structure and mount it under the corresponding connector;

[0169] S04: Determine whether it is the last connector;

[0170] If yes, go to step S05, if no, go to step S06;

[0171] S05: cyclic processing of backplane interruption and host interruption;

[0172] S06: Call the corresponding backplane initialization function according to the backplane type of the connector;

[0173] S07: Call and register various callback functions according to the backplane type of the connector;

[0174] S08: traverse all devices and set their port configuration spaces to support hot plugging;

[0175] S09: Determine the status of devices mounted on each connector through I2C;

[0176] S10: Set the slot status and connection status register of the configuration space according to the device's in-place status;

[0177] S11: Register host interrupts for all devices;

[0178] S12: Set the attribute information of the GPIO corresponding to the connector;

[0179] S13: Register backplane interrupt;

[0180] S14: Record the event log and execute step S04;

[0181] It should be noted that part of the initialization process is placed in the hotPlugHdr thread because this part of the initialization requires a long time to use the I2C bus; the main control chip starts much faster than the Adaptor, and the slot_status and link_status registers are set after the Drive state. These two registers will be read after the host starts, which makes it convenient for the Adaptor to display the in-position status; the GPIO setting supports interrupt mask because if the level is unstable, a large number of interrupts may occur at the same time, which will cause one core of the main control chip to be always in the interrupt service function, causing other threads to not work normally.

[0182] The configuration files related to the initialization thread are divided into two parts: connector and Drive configuration files and their functions are as follows Figure 7 、 8 shown.

[0183] Some of the implemented data structures are as follows:

[0184]

[0185]

[0186] Among them: bplaneMonitorFunctions implements functions such as getting Drive status, setting light status, getting light status, and getting disk type for each backplane protocol.

[0187]

[0188]

[0189] An embodiment of the present invention further provides a server, which includes the system for managing hot plugging of backplane devices described in the above embodiment.

[0190] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who can easily conceive of changes or substitutions within the technical scope disclosed in the present invention shall be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope of protection of the claims.

Claims

1. A method for managing hot plugging of backplane devices, characterized in that: The steps include: When a device on the backplane is hot-swapped, the backplane sends an interrupt to the main control chip; After receiving the backplane interrupt, the main control chip reads the status of the device on the backplane, sets the status of the device in the configuration space, and sends an interrupt to the host; After receiving the interrupt from the main control chip, the host reads the device status in the configuration space, controls the power supply of the device on the backplane according to the device status, and changes the bit of the control LED in the corresponding configuration space; After the host completes the processing, it sends an interrupt to the main control chip; The main control chip receives the host interrupt and finds that the bit controlling the LED in the configuration space has been modified. It then operates the corresponding LED on the backplane through I2C. The steps after the main control chip receives the host interrupt include: Set the global bitmap according to the input interface where the interrupt occurs, and clear the received interrupt; Detection of modified configuration space; The steps to detect a modified configuration space include: Parse the port group that has experienced an interruption based on the bitmap; all ports in a port group share a common configuration space. Get the port where the interrupt occurs by reading the port status register in the configuration space.

2. The method for managing hot plugging of backplane devices according to claim 1, characterized in that: After receiving the backplane interrupt, the main control chip reads the status of the device on the backplane, sets the status of the device in the configuration space, and sends an interrupt to the host. The steps include: The main control chip receives backplane interrupt; Set the global bitmap according to the input interface where the interrupt occurs, and clear the received interrupt; Reads the presence status of the device on the backplane, sets the presence status of the device in the configuration space, and sends an interrupt to the host.

3. The method for managing hot plugging of backplane devices according to claim 2, wherein: The steps of reading the presence status of a device on the backplane, setting the presence status of the device in the configuration space, and sending an interrupt to the host include: Parse the interrupt input interface number according to the bitmap and find the corresponding connector; Get the status of the device mounted on the connector through I2C; Set the register of the corresponding configuration space according to the portId of the hot-plug device; Send an interrupt to the host.

4. The method for managing hot plugging of backplane devices according to claim 3, characterized in that: The steps to operate the corresponding LED on the back panel include: Read the LED status bit in the slot_ctrl register in the configuration space of the port where the interrupt occurs; determine whether the status bit has changed; If so, call the callback function corresponding to the device to set the LED light status and turn on the light; If not, select the next device and execute the following steps: Read the LED status bit in the slot_ctrl register in the configuration space of the port where the interrupt occurs.

5. The method for managing hot plugging of backplane devices according to claim 1, wherein: The method further includes: Create an interrupt service processing thread and initialize it; the interrupt service processing thread is used to handle backplane interrupts and host interrupts; Create an LED control thread, which is used to control the LED light status.

6. The method for managing hot plugging of backplane devices according to claim 5, characterized in that: The steps for initializing the interrupt service processing thread include: Reading configuration files from non-volatile storage media; Convert the connector-related configuration files into a structure and mount it in the connector list; Convert device-related configuration files into structures and mount them under the corresponding connector structures; Call the corresponding backplane initialization function according to the type of backplane connected to the connector, register various callback functions, and set its GPIO attribute information; Traverse all devices and set their port configuration space to support hot plugging; Determine the status of devices mounted on each connector through I2C; Set the slot_status and link_status registers in the configuration space according to the device's in-place status; The initialization results are recorded in the event log, and finally the next stage is entered: loop processing of backplane interruption and host interruption.

7. A system for managing hot plugging of backplane devices, characterized in that: Including host, main control chip and backplane; The back panel is provided with several slots for connecting hard disks; The host is connected to the main control chip; The main control chip is equipped with several ports that are connected to the slots on the backplane; The system performs hot-swap management of backplane devices by using the method according to any one of claims 1 to 6.

8. A server, characterized in that: The server includes the system for managing hot swapping of backplane devices according to claim 7.

Citation Information

Patent Citations

  • Hard disk hot plug processing system, method and device

    CN109933475A

  • Hot plug control method and device for NVMe solid state disk and control main board

    CN112631973A