WO2022012052A1 - 一种i2c死锁并恢复的方法及装置 - Google Patents

一种i2c死锁并恢复的方法及装置 Download PDF

Info

Publication number
WO2022012052A1
WO2022012052A1 PCT/CN2021/077804 CN2021077804W WO2022012052A1 WO 2022012052 A1 WO2022012052 A1 WO 2022012052A1 CN 2021077804 W CN2021077804 W CN 2021077804W WO 2022012052 A1 WO2022012052 A1 WO 2022012052A1
Authority
WO
WIPO (PCT)
Prior art keywords
optical module
module
faulty
optical
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/077804
Other languages
English (en)
French (fr)
Inventor
张智焙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to US18/016,496 priority Critical patent/US12153538B2/en
Publication of WO2022012052A1 publication Critical patent/WO2022012052A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Definitions

  • the invention belongs to the technical field of I2C self-checking of optical modules, and in particular relates to a method and device for I2C deadlock and recovery.
  • EEPROM electrically-Erasable Programmable Read-Only Memory
  • EEPROM electrically-Erasable Programmable Read-Only Memory
  • DOM short for Digital Optical monitoring, is digital optical module monitoring.
  • BMC is the abbreviation of Baseboard Management Controller, baseboard management controller.
  • the I2C bus is also a master-slave architecture like SPI (Serial Peripheral Interface: Serial Peripheral Interface), but it is different from the point-to-point or point-to-multipoint structure of SPI. Multiple masters (master devices) and multiple slaves (slave devices) are allowed. There are many reasons for I2C deadlock, but to put it simply, the master and slave enter a deadlock state of waiting for each other. Another situation is that the slave device is damaged, which will continue to pull down the SDA (serial data line), which will also cause the I2C bus to deadlock.
  • SDA serial data line
  • optical modules are commonly used in switches in the network. The optical module is used as a slave device on the I2C bus.
  • the I2C bus When it is damaged, the I2C bus will also deadlock, and any device on the I2C bus will become inaccessible. In addition, the deadlock of the I2C bus can also be found in time due to the damage of the optical module, and the reasons need to be eliminated one by one.
  • I2C bus recovery procedure One way in the prior art is to add an I2C bus recovery procedure to the I2C master device. This big limitation is because most of the I2C modules of the master device are implemented by built-in hardware circuits, and software cannot directly control the SCL (serial clock line) signal simulation to generate clock pulses. Another way in the prior art is to import commercial hardware and serialize an I2C buffer with deadlock recovery on I2C. The disadvantage of this method is that additional hardware costs are required, and if the hardware has operating problems, it is not easy to debug.
  • the present invention provides an I2C deadlock and recovery method and device, in order to solve the above technical problems.
  • the present invention provides a method for I2C deadlock and recovery, comprising the following steps:
  • step S2 is as follows:
  • step S23 Set the optical module reading unit to determine that there is a faulty optical module, and go to step S3.
  • the optical module whose status is in place but fails to read the content is a faulty optical module.
  • the faulty optical module will cause an I2C deadlock.
  • optical module reading unit is set to read the content in the EEPROM and DOM of the in-position optical module.
  • step S3 is as follows:
  • step S1 the switch CPU also sets the optical module to scan the in-position unit
  • step S3 it also includes the following steps:
  • step S4 is as follows:
  • step S42 If yes, go to step S42;
  • the present invention provides a device for I2C deadlock and recovery, comprising:
  • the optical module functional unit setting module is used to set the optical module reading unit, the optical module isolation unit and the optical module scanning in-position unit on the switch CPU;
  • the faulty optical module acquisition module is used to set the optical module reading unit to periodically scan the status of each optical module in the switch, and read the content of the optical module in place, and determine whether there is a faulty optical module that fails to read the content but the status is in place ;
  • the faulty optical module shielding module is used to set the optical module isolation unit to isolate all the optical modules of the switch, reset the I2C bus, find and shield the faulty optical module, and after shielding the faulty optical module, release the isolation of the normal optical module in the switch, and Notify BMC before and after optical module isolation;
  • the shielding release module is used to set the optical module to scan the in-position unit to regularly detect whether the faulty optical module returns to normal, and after the faulty optical module returns to normal, release the shielding of the faulty optical module.
  • the faulty optical module acquisition module includes:
  • the in-position optical module acquisition sub-module is used to set the optical module reading unit to periodically scan the status of each optical module in the switch, and obtain the optical modules in the in-position state;
  • the optical module content reading sub-module is used to set the optical module reading unit to sequentially read the content of the optical module in the in-position state, and determine whether the reading of the content fails;
  • the faulty optical module determination sub-module is used to set the optical module reading unit to determine that there is a faulty optical module when the content of the in-position optical module fails to be read.
  • the faulty optical module shielding module includes:
  • the optical module isolation sub-module is used to set the optical module isolation unit to mark all optical modules as unreadable in the optical module driver to isolate all optical modules;
  • the I2C reset sub-module is used to set the optical module isolation unit to notify the BMC that the optical module is abnormal and reset the I2C data selector;
  • the damaged optical module port search sub-module is used to set the optical module isolation unit to iteratively read all the ports of the switch, and determine whether the reading is successful, and when there is a failed read port, determine and record the corresponding optical module damage of the port;
  • the faulty optical module shielding sub-module is used to set the optical module isolation unit to mark the faulty port number in the optical module driver, release the isolation of the normal optical module, and synchronously notify the BMC.
  • the shield release module includes:
  • the faulty optical module replacement detection sub-module is used to set the optical module to scan the in-position unit to regularly detect whether the faulty optical module has returned to normal;
  • the sub-module for shielding and releasing the faulty optical module is used to set the optical module to scan the in-position unit to update the corresponding port label of the restored optical module in the optical module driver after the faulty optical module returns to normal, and synchronize it to the BMC at the same time.
  • the beneficial effect of the present invention is that,
  • the method and device for I2C deadlock and recovery provided by the present invention can effectively detect the I2C deadlock caused by the damage of the optical module, reset the I2C bus in time, shield the faulty optical module after the damage, and automatically restore the optical module after the fault is restored. Module unshielded.
  • the present invention has reliable design principle and simple structure, and has a very wide application prospect.
  • Fig. 1 is method flow schematic diagram one of the present invention
  • Fig. 2 is method flow schematic diagram two of the present invention
  • Fig. 3 is the system schematic diagram of the present invention.
  • 1- optical module functional unit setting module 2- fault optical module acquisition module; 2.1- in-position optical module acquisition sub-module; 2.2- optical module content reading sub-module; 2.3- fault optical mode determination sub-module; 3-faulty optical module shielding module; 3.1-optical module isolation submodule; 3.2-I2C reset submodule; 3.3-damaged optical module port search submodule; 3.4-faulty optical module shielding submodule; 4-shield release module; 4.1- Replace the detection sub-module for the faulty optical module;
  • the present invention provides a method for I2C deadlock and recovery, comprising the following steps:
  • the present invention provides a method for I2C deadlock and recovery, comprising the following steps:
  • step S23 Set the optical module reading unit to determine that there is a faulty optical module, and enter step S3;
  • step S42 If yes, go to step S42;
  • the present invention provides a device for I2C deadlock and recovery, including:
  • the optical module functional unit setting module 1 is used to set the optical module reading unit, the optical module isolation unit and the optical module scanning in-position unit on the switch CPU;
  • the faulty optical module acquisition module 2 is used to set the optical module reading unit to regularly scan the status of each optical module in the switch, and read the content of the optical module in place, and determine whether there is a failure to read the content, but the state is the faulty optical module in place.
  • module; the faulty optical module acquisition module 2 includes:
  • the in-position optical module acquisition sub-module 2.1 is used to set the optical module reading unit to periodically scan the status of each optical module in the switch, and obtain the optical modules in the in-position state;
  • the optical module content reading sub-module 2.2 is used to set the optical module reading unit to sequentially read the optical module content in the in-position state, and determine whether the reading of the content fails;
  • the faulty optical mode determination sub-module 2.3 is used to set the optical module reading unit to determine that there is a faulty optical module when the content of the in-position optical module fails to be read;
  • the faulty optical module shielding module 3 is used to set the optical module isolation unit to isolate all the optical modules of the switch, reset the I2C bus, find and shield the faulty optical module, and release the isolation of the normal optical modules in the switch after shielding the faulty optical module. And notify the BMC before and after the optical module isolation; the faulty optical module shielding module 3 includes:
  • Optical module isolation sub-module 3.1 used to set the optical module isolation unit to mark all optical modules as unreadable in the optical module driver to isolate all optical modules;
  • the I2C reset sub-module 3.2 is used to set the optical module isolation unit to notify the BMC that the optical module is abnormal and reset the I2C data selector;
  • Damaged optical module port search sub-module 3.3 is used to set the optical module isolation unit to iteratively read all ports of the switch, and determine whether the reading is successful, and when there is a failed reading port, determine and record the corresponding optical module damage of the port. ;
  • the faulty optical module shielding sub-module 3.4 is used to set the optical module isolation unit to mark the faulty port number in the optical module driver, release the isolation of the normal optical module, and synchronously notify the BMC;
  • the shielding release module 4 is used to set the optical module to scan the in-position unit to regularly detect whether the faulty optical module returns to normal, and after the faulty optical module returns to normal, the shielding of the faulty optical module is released; the shielding release module 4 includes:
  • the faulty optical module replacement detection sub-module 4.1 is used to set the optical module to scan the in-position unit to regularly detect whether the faulty optical module has returned to normal;
  • the faulty optical module shielding and releasing sub-module 4.2 is used to set the optical module scanning in-position unit to update the corresponding port label of the restored optical module in the optical module driver after the faulty optical module returns to normal, and synchronize to the BMC at the same time.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Hardware Redundancy (AREA)
  • Optical Communication System (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种I2C死锁并恢复的方法及装置,所述方法包括如下步骤:S1.在交换机CPU设置光模块读取单元和光模块隔离单元;S2.设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的光模块;若有,判定存在故障光模块;S3.设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC。本发明有效检测光模块损毁造成的I2C死锁,及时对I2C总线进行复位,同时将损毁后故障光模块屏蔽掉,并能自动将故障恢复后光模块解除屏蔽。

Description

一种I2C死锁并恢复的方法及装置
本申请要求于2020年07月17日提交中国专利局、申请号为202010693810.5、发明名称为“一种I2C死锁并恢复的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明属于光模块I2C自检技术领域,具体涉及一种I2C死锁并恢复的方法及装置。
背景技术
EEPROM,是Electrically-Erasable Programmable Read-Only Memory的简称,电子抹除式可复写唯读记忆体。
DOM,是Digital Optical monitoring的简称,是数位光模块监控。
BMC,是Baseboard Management Controller的简称,基板管理控制器。
随着网络世界的快速发展,因特网上的网络设备越来越多,网路线缆也相对地更丰富且多元化,网路线缆大多通过I2C设备存取信息,当线缆故障时,I2C总线将出现死锁的现象,此时,在I2C总线上的任何设备,都会变成无法存取的状态。如何快速的识别I2C总线死锁的情况,并迅速的把总线恢复为正常的状态,是急需解决的问题。
I2C总线和SPI(即Serial Peripheral Interface:串行外设接口)一样也是主从式架构,不过它不同于SPI的点对点或点对多点结构,它是以汇流排型式介接,同时汇流排上允许有多个master(主设备)和多个slave(从设备)。I2C发生死锁的原因有很多种,但简单来说,是主从都进入一个相互等待的死锁状态。另一种情况是从设备损坏,将会持续把SDA(串行数据线)拉低,此时也同样会造成I2C总线死锁的状况。例如,网络中交换机常用光模块,光模块作为I2C总线上的从设备,发生毁损的时候,也会发生I2C总线死锁,在I2C总线上的任何设备,都会变成无法存取的状态。而且造成I2C总线死锁也并能及时发现是由于光模块毁损造成的,需要逐个排除原因。
现有技术中一种方式是在I2C主设备中增加I2C总线恢复程序。这种方 大的局限性,因为大部分主设备的I2C模块由内置的硬件电路来实现,软件并不能够直接控制SCL(串行时钟线)信号模拟产生需要时钟脉冲。现有技术中还有一种方式是导入商用硬件,在I2C上串入一个具有死锁恢复的I2C缓冲器。这种方式的缺点是需增加额外的硬件成本,且此硬件若有运作问题,并不便于除错。
此为现有技术的不足,因此,针对现有技术中的上述缺陷,提供一种I2C死锁并恢复的方法及装置,是非常有必要的。
发明内容
针对现有技术的上述光模块毁损造成I2C死锁不能及时发现,现有的I2C死锁恢复的技术都需要耗费额外硬件电路的缺陷,本发明提供一种I2C死锁并恢复的方法及装置,以解决上述技术问题。
第一方面,本发明提供一种I2C死锁并恢复的方法,包括如下步骤:
S1.在交换机CPU设置光模块读取单元和光模块隔离单元;
S2.设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的故障光模块;
S3.设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC。
进一步地,步骤S2具体步骤如下:
S21.设置光模块读取单元定期扫描交换机内各光模块状态,并获取在位状态的光模块;
S22.设置光模块读取单元依次读取在位状态的光模块内容,并判断是否读取内容失败;
若是,进入步骤S23;
若否,返回步骤S21;
S23.设置光模块读取单元判定存在故障光模块,进入步骤S3。状态在位,但内容读取失败的光模块为故障光模块,故障光模块会造成I2C死锁。
进一步地,设置光模块读取单元读取在位光模块的EEPROM及DOM中 内容。
进一步地,步骤S3具体步骤如下:
S31.设置光模块隔离单元在光模块驱动中将所有光模块标记为不可读,进行所有光模块隔离;
S32.设置光模块隔离单元通知BMC光模块存在异常,并重置I2C数据选择器;
S33.设置光模块隔离单元对交换机所有端口进行迭代读取,定位读取失败端口,判定并记录该端口对应光模块毁损;
S34.设置光模块隔离单元在光模块驱动内标记故障端口号,解除正常光模块的隔离,并同步通知BMC。发现光模块故障,则立即隔离所有光模块,在查找到故障光模块对应端口后,将故障光模块屏蔽,再解除正常光模块的隔离,避免因为光模块故障导致I2C死锁,同时,通过对I2C数据选择器重置进行I2C复位,防止I2C总线已经发生死锁的现象。
进一步地,步骤S1中,在交换机CPU还设置光模块扫描在位单元;
步骤S3之后还包括如下步骤:
S4.设置光模块扫描在位单元定时检测故障光模块是否恢复正常,并在故障光模块恢复正常后,解除故障光模块的屏蔽。
进一步地,步骤S4具体步骤如下:
S41.设置光模块扫描在位单元定时检测故障光模块是否恢复正常;
若是,进入步骤S42;
若否,返回步骤S41;
S42.设置光模块扫描在位单元在光模块驱动内更新恢复正常的光模块对应端口标号,同时同步给BMC。在使用者更换掉故障光模块之后,通过自动扫描,再将对应端口的屏蔽自动解除,恢复更换后光模块的工作。
第二方面,本发明提供一种I2C死锁并恢复的装置,包括:
光模块功能单元设置模块,用于在交换机CPU设置光模块读取单元、光模块隔离单元以及光模块扫描在位单元;
故障光模块获取模块,用于设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但 状态为在位的故障光模块;
故障光模块屏蔽模块,用于设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC;
屏蔽解除模块,用于设置光模块扫描在位单元定时检测故障光模块是否恢复正常,并在故障光模块恢复正常后,解除故障光模块的屏蔽。
进一步地,故障光模块获取模块包括:
在位状态光模块获取子模块,用于设置光模块读取单元定期扫描交换机内各光模块状态,并获取在位状态的光模块;
光模块内容读取子模块,用于设置光模块读取单元依次读取在位状态的光模块内容,并判断是否读取内容失败;
故障光模判定子模块,用于读取在位光模块内容失败时,设置光模块读取单元判定存在故障光模块。
进一步地,故障光模块屏蔽模块包括:
光模块隔离子模块,用于设置光模块隔离单元在光模块驱动中将所有光模块标记为不可读,进行所有光模块隔离;
I2C复位子模块,用于设置光模块隔离单元通知BMC光模块存在异常,并重置I2C数据选择器;
毁损光模块端口查找子模块,用于设置光模块隔离单元对交换机所有端口进行迭代读取,并判断是否读取成功,并在存在读取失败端口时,判定并记录该端口对应光模块毁损;
故障光模块屏蔽子模块,用于设置光模块隔离单元在光模块驱动内标记故障端口号,解除正常光模块的隔离,并同步通知BMC。
进一步地,屏蔽解除模块包括:
故障光模块更换检测子模块,用于设置光模块扫描在位单元定时检测故障光模块是否恢复正常;
故障光模块屏蔽解除子模块,用于在故障光模块恢复正常后,设置光模块扫描在位单元在光模块驱动内更新恢复正常的光模块对应端口标号,同时同步给BMC。
本发明的有益效果在于,
本发明提供的I2C死锁并恢复的方法及装置,有效检测光模块损毁造成的I2C死锁,及时对I2C总线进行复位,同时将损毁后故障光模块屏蔽掉,并能自动将故障恢复后光模块解除屏蔽。
此外,本发明设计原理可靠,结构简单,具有非常广泛的应用前景。
由此可见,本发明与现有技术相比,具有突出的实质性特点和显著的进步,其实施的有益效果也是显而易见的。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的方法流程示意图一;
图2是本发明的方法流程示意图二;
图3为本发明的系统示意图;
图中,1-光模块功能单元设置模块;2-故障光模块获取模块;2.1-在位状态光模块获取子模块;2.2-光模块内容读取子模块;2.3-故障光模判定子模块;3-故障光模块屏蔽模块;3.1-光模块隔离子模块;3.2-I2C复位子模块;3.3-毁损光模块端口查找子模块;3.4-故障光模块屏蔽子模块;4-屏蔽解除模块;4.1-故障光模块更换检测子模块;4.2-故障光模块屏蔽解除子模块。
具体实施方式
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
实施例1:
如图1所示,本发明提供一种I2C死锁并恢复的方法,包括如下步骤:
S1.在交换机CPU设置光模块读取单元和光模块隔离单元;
S2.设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的故障光模块;
S3.设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC。
实施例2:
如图2所示,本发明提供一种I2C死锁并恢复的方法,包括如下步骤:
S1.在交换机CPU设置光模块读取单元、光模块隔离单元和光模块扫描在位单元;
S2.设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的故障光模块;具体步骤如下:
S21.设置光模块读取单元定期扫描交换机内各光模块状态,并获取在位状态的光模块;
S22.设置光模块读取单元依次读取在位状态的光模块内容,并判断是否读取内容失败;
若是,进入步骤S23;
若否,返回步骤S21;
S23.设置光模块读取单元判定存在故障光模块,进入步骤S3;
S3.设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC;具体步骤如下:
S31.设置光模块隔离单元在光模块驱动中将所有光模块标记为不可读,进行所有光模块隔离;
S32.设置光模块隔离单元通知BMC光模块存在异常,并重置I2C数据选择器;
S33.设置光模块隔离单元对交换机所有端口进行迭代读取,定位读取失败端口,判定并记录该端口对应光模块毁损;
S34.设置光模块隔离单元在光模块驱动内标记故障端口号,解除正常光模块的隔离,并同步通知BMC;
S4.设置光模块扫描在位单元定时检测故障光模块是否恢复正常,并在故障光模块恢复正常后,解除故障光模块的屏蔽;具体步骤如下:
S41.设置光模块扫描在位单元定时检测故障光模块是否恢复正常;
若是,进入步骤S42;
若否,返回步骤S41;
S42.设置光模块扫描在位单元在光模块驱动内更新恢复正常的光模块对应端口标号,同时同步给BMC。
实施例3:
如图3所示,本发明提供一种I2C死锁并恢复的装置,包括:
光模块功能单元设置模块1,用于在交换机CPU设置光模块读取单元、光模块隔离单元以及光模块扫描在位单元;
故障光模块获取模块2,用于设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的故障光模块;故障光模块获取模块2包括:
在位状态光模块获取子模块2.1,用于设置光模块读取单元定期扫描交换机内各光模块状态,并获取在位状态的光模块;
光模块内容读取子模块2.2,用于设置光模块读取单元依次读取在位状态的光模块内容,并判断是否读取内容失败;
故障光模判定子模块2.3,用于读取在位光模块内容失败时,设置光模块读取单元判定存在故障光模块;
故障光模块屏蔽模块3,用于设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC;故障光模块屏蔽模块3包括:
光模块隔离子模块3.1,用于设置光模块隔离单元在光模块驱动中将所 有光模块标记为不可读,进行所有光模块隔离;
I2C复位子模块3.2,用于设置光模块隔离单元通知BMC光模块存在异常,并重置I2C数据选择器;
毁损光模块端口查找子模块3.3,用于设置光模块隔离单元对交换机所有端口进行迭代读取,并判断是否读取成功,并在存在读取失败端口时,判定并记录该端口对应光模块毁损;
故障光模块屏蔽子模块3.4,用于设置光模块隔离单元在光模块驱动内标记故障端口号,解除正常光模块的隔离,并同步通知BMC;
屏蔽解除模块4,用于设置光模块扫描在位单元定时检测故障光模块是否恢复正常,并在故障光模块恢复正常后,解除故障光模块的屏蔽;屏蔽解除模块4包括:
故障光模块更换检测子模块4.1,用于设置光模块扫描在位单元定时检测故障光模块是否恢复正常;
故障光模块屏蔽解除子模块4.2,用于在故障光模块恢复正常后,设置光模块扫描在位单元在光模块驱动内更新恢复正常的光模块对应端口标号,同时同步给BMC。
尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种I2C死锁并恢复的方法,其特征在于,包括如下步骤:
    S1.在交换机CPU设置光模块读取单元和光模块隔离单元;
    S2.设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的故障光模块;
    S3.设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC。
  2. 如权利要求1所述的I2C死锁并恢复的方法,其特征在于,步骤S2具体步骤如下:
    S21.设置光模块读取单元定期扫描交换机内各光模块状态,并获取在位状态的光模块;
    S22.设置光模块读取单元依次读取在位状态的光模块内容,并判断是否读取内容失败;
    若是,进入步骤S23;
    若否,返回步骤S21;
    S23.设置光模块读取单元判定存在故障光模块,进入步骤S3。
  3. 如权利要求1或2所述的I2C死锁并恢复的方法,其特征在于,设置光模块读取单元读取在位光模块的EEPROM及DOM中内容。
  4. 如权利要求1所述的I2C死锁并恢复的方法,其特征在于,步骤S3具体步骤如下:
    S31.设置光模块隔离单元在光模块驱动中将所有光模块标记为不可读,进行所有光模块隔离;
    S32.设置光模块隔离单元通知BMC光模块存在异常,并重置I2C数据选择器;
    S33.设置光模块隔离单元对交换机所有端口进行迭代读取,定位读取失败端口,判定并记录该端口对应光模块毁损;
    S34.设置光模块隔离单元在光模块驱动内标记故障端口号,解除正常光模块的隔离,并同步通知BMC。
  5. 如权利要求4所述的I2C死锁并恢复的方法,其特征在于,步骤S1中,在交换机CPU还设置光模块扫描在位单元;
    步骤S3之后还包括如下步骤:
    S4.设置光模块扫描在位单元定时检测故障光模块是否恢复正常,并在故障光模块恢复正常后,解除故障光模块的屏蔽。
  6. 如权利要求5所述的I2C死锁并恢复的方法,其特征在于,步骤S4具体步骤如下:
    S41.设置光模块扫描在位单元定时检测故障光模块是否恢复正常;
    若是,进入步骤S42;
    若否,返回步骤S41;
    S42.设置光模块扫描在位单元在光模块驱动内更新恢复正常的光模块对应端口标号,同时同步给BMC。
  7. 一种I2C死锁并恢复的装置,其特征在于,包括:
    光模块功能单元设置模块(1),用于在交换机CPU设置光模块读取单元、光模块隔离单元以及光模块扫描在位单元;
    故障光模块获取模块(2),用于设置光模块读取单元定期扫描交换机内各光模块状态,并读取在位光模块的内容,判断是否存在读取内容失败,但状态为在位的故障光模块;
    故障光模块屏蔽模块(3),用于设置光模块隔离单元将交换机所有光模块隔离,复位I2C总线,查找并屏蔽故障光模块,以及在屏蔽掉故障光模块后,解除交换机中正常光模块的隔离,并在光模块隔离前后通知BMC;
    屏蔽解除模块(4),用于设置光模块扫描在位单元定时检测故障光模块是否恢复正常,并在故障光模块恢复正常后,解除故障光模块的屏蔽。
  8. 如权利要求7所述的I2C死锁并恢复的装置,其特征在于,故障光模块获取模块(2)包括:
    在位状态光模块获取子模块(2.1),用于设置光模块读取单元定期扫描交换机内各光模块状态,并获取在位状态的光模块;
    光模块内容读取子模块(2.2),用于设置光模块读取单元依次读取在位状态的光模块内容,并判断是否读取内容失败;
    故障光模判定子模块(2.3),用于读取在位光模块内容失败时,设置光模块读取单元判定存在故障光模块。
  9. 如权利要求7所述的I2C死锁并恢复的装置,其特征在于,故障光模块屏蔽模块(3)包括:
    光模块隔离子模块(3.1),用于设置光模块隔离单元在光模块驱动中将所有光模块标记为不可读,进行所有光模块隔离;
    I2C复位子模块(3.2),用于设置光模块隔离单元通知BMC光模块存在异常,并重置I2C数据选择器;
    毁损光模块端口查找子模块(3.3),用于设置光模块隔离单元对交换机所有端口进行迭代读取,并判断是否读取成功,并在存在读取失败端口时,判定并记录该端口对应光模块毁损;
    故障光模块屏蔽子模块(3.4),用于设置光模块隔离单元在光模块驱动内标记故障端口号,解除正常光模块的隔离,并同步通知BMC。
  10. 如权利要求7所述的I2C死锁并恢复的装置,其特征在于,屏蔽解除模块(4)包括:
    故障光模块更换检测子模块(4.1),用于设置光模块扫描在位单元定时检测故障光模块是否恢复正常;
    故障光模块屏蔽解除子模块(4.2),用于在故障光模块恢复正常后,设置光模块扫描在位单元在光模块驱动内更新恢复正常的光模块对应端口标号,同时同步给BMC。
PCT/CN2021/077804 2020-07-17 2021-02-25 一种i2c死锁并恢复的方法及装置 Ceased WO2022012052A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/016,496 US12153538B2 (en) 2020-07-17 2021-02-25 I2C deadlock and recovery method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010693810.5A CN111858448B (zh) 2020-07-17 2020-07-17 一种i2c死锁并恢复的方法及装置
CN202010693810.5 2020-07-17

Publications (1)

Publication Number Publication Date
WO2022012052A1 true WO2022012052A1 (zh) 2022-01-20

Family

ID=73000901

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/077804 Ceased WO2022012052A1 (zh) 2020-07-17 2021-02-25 一种i2c死锁并恢复的方法及装置

Country Status (3)

Country Link
US (1) US12153538B2 (zh)
CN (1) CN111858448B (zh)
WO (1) WO2022012052A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116546352A (zh) * 2023-05-12 2023-08-04 苏州浪潮智能科技有限公司 一种光模块的控制方法、控制装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858448B (zh) * 2020-07-17 2023-01-10 苏州浪潮智能科技有限公司 一种i2c死锁并恢复的方法及装置
CN116185504A (zh) * 2021-11-29 2023-05-30 苏州盛科通信股份有限公司 一种隔离i2c挂死设备的方法、装置及存储介质
CN116048849B (zh) * 2022-07-20 2023-11-07 荣耀终端有限公司 一种i2c总线的通信控制方法、装置、设备及存储介质
KR20240109707A (ko) * 2023-01-05 2024-07-12 매그나칩믹스드시그널 유한회사 데드락 리커버리 회로 및 데드락 리커버리 방법, 이를 포함하는 pll 회로
CN116633431B (zh) * 2023-05-29 2026-03-27 苏州元脑智能科技有限公司 光模块i2c电路的异常处理方法、装置、设备和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412531A (zh) * 2013-07-30 2013-11-27 华为数字技术(苏州)有限公司 一种总线控制方法及装置
CN108073540A (zh) * 2018-02-11 2018-05-25 云丁网络技术(北京)有限公司 I2c总线系统、异常设备排查方法
CN208126373U (zh) * 2018-05-07 2018-11-20 广州视源电子科技股份有限公司 一种iic故障的检测响应电路和iic总线系统
CN109309528A (zh) * 2017-07-27 2019-02-05 阿里巴巴集团控股有限公司 光模块的状态指示方法、装置及光模块和测试系统
CN111858448A (zh) * 2020-07-17 2020-10-30 苏州浪潮智能科技有限公司 一种i2c死锁并恢复的方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047442B (zh) * 2006-04-02 2012-05-30 华为技术有限公司 一种无源光网络的维护方法及其系统
US9875165B2 (en) * 2015-11-24 2018-01-23 Quanta Computer Inc. Communication bus with baseboard management controller
US10296434B2 (en) * 2017-01-17 2019-05-21 Quanta Computer Inc. Bus hang detection and find out
CN107562668B (zh) * 2017-08-31 2019-02-12 Oppo广东移动通信有限公司 总线死锁恢复系统和方法
US10461851B1 (en) * 2018-03-30 2019-10-29 Facebook, Inc. Predicting optical transceiver failure
CN110417464B (zh) * 2019-07-18 2021-01-15 锐捷网络股份有限公司 一种故障处理方法及装置、计算机装置及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412531A (zh) * 2013-07-30 2013-11-27 华为数字技术(苏州)有限公司 一种总线控制方法及装置
CN109309528A (zh) * 2017-07-27 2019-02-05 阿里巴巴集团控股有限公司 光模块的状态指示方法、装置及光模块和测试系统
CN108073540A (zh) * 2018-02-11 2018-05-25 云丁网络技术(北京)有限公司 I2c总线系统、异常设备排查方法
CN208126373U (zh) * 2018-05-07 2018-11-20 广州视源电子科技股份有限公司 一种iic故障的检测响应电路和iic总线系统
CN111858448A (zh) * 2020-07-17 2020-10-30 苏州浪潮智能科技有限公司 一种i2c死锁并恢复的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116546352A (zh) * 2023-05-12 2023-08-04 苏州浪潮智能科技有限公司 一种光模块的控制方法、控制装置

Also Published As

Publication number Publication date
CN111858448B (zh) 2023-01-10
US12153538B2 (en) 2024-11-26
CN111858448A (zh) 2020-10-30
US20230281150A1 (en) 2023-09-07

Similar Documents

Publication Publication Date Title
WO2022012052A1 (zh) 一种i2c死锁并恢复的方法及装置
CN113064747B (zh) 一种服务器启动过程中的故障定位方法、系统及装置
CN109872150B (zh) 具有时钟同步操作的数据处理系统
US20040221198A1 (en) Automatic error diagnosis
US4996687A (en) Fault recovery mechanism, transparent to digital system function
US7035953B2 (en) Computer system architecture with hot pluggable main memory boards
WO2021169260A1 (zh) 一种系统板卡电源检测方法、装置、设备及存储介质
EP1190320B1 (en) System and method of monitoring a distributed fault tolerant computer system
BR112016022329B1 (pt) método para processamento de defeito, aparelho relacionado, e computador
JP3445270B2 (ja) 多重障害時動作可能なフォールトトレラント・クロック
CN115964218A (zh) 高速串行计算机扩展总线设备故障的识别方法及装置
CN111949283A (zh) 一种BMC Flash镜像自恢复系统及方法
JP3030658B2 (ja) 電源故障対策を備えたコンピュータシステム及びその動作方法
US7363531B2 (en) Data synchronization for system controllers
US20250225023A1 (en) Server maintainability configuration method and apparatus, electronic device and storage medium
EP1380950B1 (en) Fault tolerant information processing apparatus
CN117234771A (zh) 故障内存定位方法、系统、装置、计算机设备及存储介质
US20070234101A1 (en) Information error recovery apparatus and methods
CN115392186B (zh) 一种片上系统中故障收集管理系统及方法
WO2014123372A1 (ko) 증명 가능하고 정확한 오류 복구를 위한 플래시 변환 계층 설계 프레임워크
CN111488050A (zh) 一种电源监控方法、系统及服务器
CN119046051A (zh) 一种计算机系统的故障处理方法以及产品
JP2005135063A (ja) 情報処理装置及び情報処理装置の時計異常検出プログラム
CN101206599B (zh) 计算机主板设备诊断和隔离方法
JP3266956B2 (ja) システム記憶装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21842903

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21842903

Country of ref document: EP

Kind code of ref document: A1