Hard disk interface identification method and device, storage medium and computer program product

By designing the hard disk interface recognition method and device in the general storage architecture, the interface indicator signal and OOB detection and identify the type of hard disk interface type are used to solve the problem of incompatibility between the general storage architecture and the SAS/SATA hard disk, and the normal recognition and access to the hard disk is realized Essence

CN119336557APending Publication Date: 2025-01-21SAGE MICROELECTRONICS CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411337989.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing three-mode general storage architecture is incompatible with SAS/SATA hard disks, resulting in the inability to properly identify and use SAS/SATA hard disks in the general storage architecture.

Method used

The hard disk interface recognition method and device are designed, and the interface type of the hard disk is determined by detecting the received interface indicator signal. When a conventional detection and identification cannot be passed, the SAS/SATA interface is recognized by the OOB detection of an external signaling OOB.

Benefits of technology

The correct recognition and access to the SAS/SATA hard disk, the compatibility of the general storage architecture and the SAS/SATA hard disk solve the problem, and ensure that the hard disk can work normally in the general storage architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336557A_ABST
    Figure CN119336557A_ABST
Patent Text Reader

Abstract

The invention discloses a hard disk interface identification method which is used for solving the problem that an existing three-mode general storage framework is incompatible with an SAS / SATA hard disk. The method comprises the following steps: detecting a received first interface indication signal, and judging whether an interface type of a to-be-accessed hard disk is identified or not; when the judgment result is yes, outputting an interface indication signal corresponding to the interface type, and completing hard disk interface identification; when the judgment result is no, performing out-of-band signaling OOB detection by sending a control signal, and generating an OOB detection result; according to the OOB detection result, identifying the interface type of the to-be-accessed hard disk, and generating a second interface indication signal; and outputting an interface indication signal corresponding to the interface type according to the second interface indication signal to complete hard disk interface identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a hard disk interface identification method, apparatus, device, storage medium, and computer program product. Background Art

[0002] With the rapid development of solid state drive (SSD) technology, SSDs have become one of the mainstream storage devices for servers and storage systems due to their characteristics such as fast read and write speeds, light weight, low power consumption, and small size.

[0003] With the advancement of solid-state drive technology, Non-Volatile Memory Express (NVMe) hard drives have become a mainstream form of hard drive technology. Serial ATA (SATA) and Serial Attached SCSI (SAS) hard drives are also mainstream in both new and existing applications. These are older and more mature than NVMe drives, and they still hold a significant market share and are expected to continue to do so for a long time to come.

[0004] Therefore, the three mainstream hard drives on the market today are NVMe, SAS, and SATA, which are suitable for servers / storage systems with NVMe storage architecture and SAS storage architecture, respectively. To facilitate unified access and storage read and write for hard drives with various interfaces, servers and storage systems are currently evolving towards a universal storage architecture that supports NVMe, SAS, and SATA. This allows the same server or storage system to simultaneously connect to NVMe, SAS, and SATA hard drives, providing greater system flexibility and scalability to meet current and future data storage requirements.

[0005] Currently, servers and storage systems in common storage architectures typically utilize a connector interface (U.3) that complies with the SFF-TA-1001 (Universal x4 Link Definition for SFF-8639) standard. This interface is also compatible with the U.2 interface that complies with the PCI Express SFF-8639 Module Specification and the SFF-8639 (Multifunction 6X Unshielded Connector) standards. Therefore, U.3 hard drives, along with standard-compliant U.2 SAS / SATA drives and U.2 NVMe drives, can generally function normally in servers and storage systems using common storage architectures.

[0006] However, the technical solutions used in general storage architecture and SAS storage architecture are incompatible in terms of hard drive presence detection and interface identification. This leads to application compatibility issues for SAS / SATA hard drives in general storage architecture, preventing them from working properly.

[0007] Therefore, how to achieve compatibility between general storage architectures and SAS / SATA hard drives has become a pressing technical problem that needs to be solved. Summary of the Invention

[0008] This application provides a hard disk interface identification method to solve the problem of incompatibility between existing tri-mode universal storage architecture and SAS / SATA hard disks.

[0009] This application also provides a hard disk interface identification device to solve the problem of incompatibility between existing tri-mode universal storage architecture and SAS / SATA hard disks.

[0010] This application also provides a hard disk interface identification device to solve the problem of incompatibility between existing tri-mode universal storage architecture and SAS / SATA hard disks.

[0011] This application also provides a computer-readable storage medium to solve the problem of incompatibility between existing tri-mode universal storage architecture and SAS / SATA hard drives.

[0012] This application also provides a computer program product to solve the problem of incompatibility between existing tri-mode universal storage architecture and SAS / SATA hard drives.

[0013] The embodiments of this application adopt the following technical solutions: A hard disk interface identification method includes: detecting a received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified; when the determination result is yes, outputting an interface indication signal corresponding to the interface type to complete the hard disk interface identification; when the determination result is no, performing out-of-band signaling (OOB) detection by sending a control signal to generate an OOB detection result; based on the OOB detection result, identifying the interface type of the hard disk to be connected, generating a second interface indication signal; based on the second interface indication signal, outputting an interface indication signal corresponding to the interface type to complete the hard disk interface identification.

[0014] A hard disk identification device includes: a first identification unit, configured to detect a received first interface indication signal and determine whether the interface type of the hard disk to be connected is identified; a first type output unit, configured to output an interface indication signal corresponding to the interface type when the determination result obtained by the first identification unit is yes, thereby completing hard disk interface identification; an OOB detection unit, configured to perform out-of-band signaling OOB detection by sending a control signal and generate an OOB detection result when the determination result obtained by the first identification unit is no; a second identification unit, configured to identify the interface type of the hard disk to be connected based on the OOB detection result and generate a second interface indication signal; and a second type output unit, configured to output an interface indication signal corresponding to the interface type based on the second interface indication signal, thereby completing hard disk interface identification.

[0015] A hard disk interface identification device, comprising: The processor; and a memory for storing computer-executable instructions, which, when executed, cause the processor to perform the following operations: detect a received first interface indication signal and determine whether the interface type of the hard disk to be connected is identified; when the determination result is yes, output an interface indication signal corresponding to the interface type to complete hard disk interface identification; when the determination result is no, perform out-of-band (OOB) signaling detection by sending a control signal to generate an OOB detection result; identify the interface type of the hard disk to be connected based on the OOB detection result and generate a second interface indication signal; output an interface indication signal corresponding to the interface type based on the second interface indication signal to complete hard disk interface identification.

[0016] A computer-readable storage medium stores one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the following operations: detect a received first interface indication signal and determine whether the interface type of the hard disk to be connected is identified; when the determination result is yes, output an interface indication signal corresponding to the interface type to complete hard disk interface identification; when the determination result is no, perform out-of-band (OOB) signaling detection by sending a control signal to generate an OOB detection result; identify the interface type of the hard disk to be connected based on the OOB detection result and generate a second interface indication signal; and output an interface indication signal corresponding to the interface type based on the second interface indication signal to complete hard disk interface identification.

[0017] A computer program product includes a computer program, which, when executed by a processor, implements the following: detecting a received first interface indication signal to determine whether the interface type of a hard disk to be connected is identified; when the determination result is yes, outputting an interface indication signal corresponding to the interface type to complete hard disk interface identification; when the determination result is no, performing out-of-band signaling (OOB) detection by sending a control signal to generate an OOB detection result; based on the OOB detection result, identifying the interface type of the hard disk to be connected, generating a second interface indication signal; and based on the second interface indication signal, outputting an interface indication signal corresponding to the interface type to complete hard disk interface identification.

[0018] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: The hard disk interface identification method provided by the embodiment of the present application is adopted. When performing hard disk interface identification, the first interface indication signal received is detected to determine whether the interface type of the hard disk to be connected is identified; when the judgment result is yes, the interface indication signal corresponding to the interface type is output to complete the hard disk interface identification; when the judgment result is no, an out-of-band signaling OOB detection is performed by sending a control signal to generate an OOB detection result; according to the OOB detection result, the interface type of the hard disk to be connected is identified and a second interface indication signal is generated; according to the second interface indication signal, an interface indication signal corresponding to the interface type is output to complete the hard disk interface identification. The hard disk interface identification method provided by the embodiment of the present application is adopted. According to the hard disk presence and interface identification method defined in the universal storage architecture and the unique OOB signaling principle in the SAS storage architecture, an interface self-identification module is designed outside the standard storage interface module of the host storage controller. Then, for the hard disk interface type that cannot be identified according to the hard disk presence and interface identification method defined in the universal storage architecture, the interface self-identification module can be used to identify the hard disk interface type based on the OOB signaling principle, and then the SAS / SATA interface of the hard disk can be identified, thereby solving the problem of incompatibility between the existing three-mode universal storage architecture and the SAS / SATA hard disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 This is a schematic diagram of the specific structure of the SAS storage architecture in the existing technology; Figure 2 This is a schematic diagram of the specific structure of the NVMe storage architecture in the existing technology; Figure 3 This is a schematic diagram of the specific structure of a general storage architecture in the existing technology; Figure 4 A schematic diagram of the specific structure of a host storage controller provided in an embodiment of the present application; Figure 5 A schematic diagram of the specific structure of an interface self-identification module provided in an embodiment of the present application; Figure 6 A schematic diagram of a specific process of a hard disk interface identification method provided in an embodiment of the present application; Figure 7 It is a schematic diagram of the specific structure of the PHY module in the prior art; Figure 8 Schematic diagram of the specific structure of OOB signaling in the prior art; Figure 9 1. Detailed flow chart of SAS OOB signaling sending / receiving sequence in the prior art; Figure 10 1. Serial Number Transmitting / Receiving Sequence of SATA OOB Signaling in the Prior Art Figure 11 1. Detailed flow chart of the SAS-to-SATA OOB signaling sending / receiving sequence in the prior art; Figure 12 A schematic diagram of the specific structure of a hard disk identification device provided in an embodiment of the present application; Figure 13 A schematic diagram of the specific structure of a hard disk identification device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0021] To facilitate understanding of this solution, the following explains the relevant background technology of this solution: In existing technologies, servers and storage systems usually use the SAS storage architecture based on the SAS storage standard system to connect a large number of hard drives to form a large-capacity hard drive array. In addition to the central processing unit (CPU), the SAS storage architecture usually consists of a SAS host storage controller (SAS host for short), expanders / midplanes, backplanes, etc., and has high performance, high reliability, large capacity, and manageability. At the same time, the SAS standard is compatible with the SATA standard, so the SAS storage architecture can support both SAS and SATA hard drives. Figure 1The figure below is a diagram of the commonly used SAS storage architecture, in which the backplane, SAS hard drives, and SATA hard drives usually use connectors that comply with the standard "SFF-8639 (Multifunction 6X Unshielded Connector)". This connector standard is abbreviated as U.2-SAS / SATA.

[0022] With the maturity and continuous development of solid-state drive (SSD) technology, NVMe technology emerged and has continued to evolve, becoming an important technology and standard system for SSDs (referred to as the NVMe storage standard system). NVMe is an application layer protocol, with the underlying layer being the high-speed serial interface for computers (PCI Express, PCIe). The PCIe interface offers high performance advantages such as high bandwidth, high IOPS, and low latency, connecting various high-speed external computer devices, such as hard drives, graphics cards, and network cards. The NVMe storage architecture is similar to the SAS storage architecture, typically consisting of an NVMe host storage controller (NVMe host), switches / middleboards, and backplanes, in addition to the central processing unit (CPU). Figure 2 Figure 2 shows a diagram of a commonly used NVMe storage architecture. NVMe backplanes and NVMe hard drives typically use connectors that comply with the PCI Express SFF-8639 Module Specification, also known as U.2-PCIe. In the storage industry, both U.2-SAS / SATA and U.2-PCIe interfaces are based on the SFF-8639 connector standard and are therefore collectively referred to as the U.2 interface.

[0023] With the development of application scenarios, the storage architecture of servers and storage systems has evolved and upgraded from SAS storage architecture and NVMe storage architecture to a universal storage architecture of SAS / SATA / NVMe three modes, enabling the same server and storage system to simultaneously access NVMe hard drives, SAS hard drives, and SATA hard drives, thereby providing greater system flexibility and scalability to meet current and future data storage requirements. Figure 3The diagram illustrates a commonly used general-purpose storage architecture. Similar to SAS and NVMe storage architectures, besides the central processing unit (CPU), a general-purpose storage architecture typically consists of a general-purpose host storage controller (referred to as the general-purpose host), expanders / middleboards, and a general-purpose backplane. Both the general-purpose backplane and hard drives require connectors conforming to the SFF-TA-1001 standard (Universal x4 Link Definition for SFF-8639). This connector standard is abbreviated as U.3 and is compatible with the previous U.2-PCIe and U.2-SAS / SATA standards. The mechanical and electrical specifications of these three are completely identical to SFF-8639.

[0024] Generally, in servers and storage systems, the host storage controller must know exactly the interface type of the hard disk in place in order to properly communicate with the hard disk and read and write data.

[0025] In the SAS storage architecture, in accordance with SAS standards (such as SAS Protocol Layer-3 (SPL-3)) and SATA standards (such as Serial ATA Revision 3.2), the SAS / SATA host storage controller uses out-of-band (OOB) signaling of the SAS / SATA standard to detect whether the hard drive is present and what its interface type is (i.e., whether the present hard drive is a SAS hard drive or a SATA hard drive). This is the only way to detect whether the hard drive is present. If OOB signaling is detected, the host storage controller determines that the SAS / SATA hard drive is present; otherwise, it determines that the hard drive is not present.

[0026] In the NVMe storage architecture, due to the unique specifications of the PCIe interface, the PCIe standard (e.g., PCI_Express_Base_4.0) does not use OOB signaling to detect the presence of PCIe end devices. Instead, it uses dedicated physical signals. In the U.2-PCIe standard (e.g., PCIe_SFF-8639 Module Spec_R4.0_V1.0), NVMe hard drives use two dedicated physical signals, PRSNT# (presentment detection) and IfDet# (interface type detection), to indicate whether the NVMe hard drive is present. The specific signal combinations are as follows: PRSNT#=1, IfDet#=0: The NVMe hard drive is in place; PRSNT#=1, IfDet#=1: The NVMe hard drive is not present.

[0027] The Universal Storage Architecture is an upgrade and fusion of the SAS and NVMe storage architectures, maximizing compatibility with both U.2 NVMe and U.2 SAS / SATA drives. In accordance with the SFF-TA-1001 standard, the Universal Storage Architecture uses three dedicated physical signals—PRSNT#, IfDet#, and IfDet2# (Interface Type Detect 2)—to detect drive presence and interface type, rather than OOB signaling. These three signals, PRSNT#, IfDet#, and IfDet2#, are collectively referred to as interface indicator signals.

[0028] As can be seen, in general storage architectures, servers and storage systems typically utilize the U.3 connector standard and are compatible with the U.2 interface. Therefore, U.3 interface hard drives, along with strictly standard U.2 interface SAS / SATA and U.2 interface NVMe hard drives, can generally function normally in servers and storage systems using general storage architectures. However, regarding hard drive presence detection and interface identification, the technical solutions used by general storage architectures are incompatible with those used by SAS storage architectures.

[0029] To address the aforementioned compatibility issues, this application embodiment combines the hard disk presence and interface identification method defined in the general storage architecture (hereinafter referred to as the conventional hard disk interface detection method for ease of description) with the OOB signaling principle unique to the SAS storage architecture. This application embodiment provides a host storage controller, the specific structure of which is as follows: Figure 4 As shown, the host storage controller provided in the embodiment of the present application designs an interface self-identification module in addition to the standard storage interface module. The specific structure of the interface self-identification module is as follows: Figure 5 As shown, it mainly includes: an interface identification control submodule, an OOB signaling generation submodule, an OOB signaling detection submodule, a selector-1 and a selector-2.

[0030] The interface identification and control submodule is the core of the interface self-identification module. It is mainly used for the entire process of interface identification and control, including the control part of the conventional detection function of the hard disk interface and the OOB signaling detection function. Its functions and processing are the main functions and processing of the interface self-identification module. The specific processing method is described in detail below.

[0031] OOB signaling generation submodule: mainly used to generate OOB signaling that complies with the SAS Protocol Layer (SPL) standard and output differential signals.

[0032] OOB signaling detection submodule: mainly used to detect OOB signaling on the differential signal receiving line of the tri-mode PHY module.

[0033] Selector-1: used to select interface indication signal-1 or interface indication signal-2 as the output of selector-1 under the control of the interface identification control submodule.

[0034] Selector-2: used to select phy_Tx+ / phy_Tx- or oobTx+ / oobTx- as the output of selector-2 under the control of the interface identification control submodule.

[0035] Based on the above host storage controller, the specific implementation flow diagram of the hard disk interface identification method provided by this application is as follows: Figure 6 As shown, the main steps include the following: Step 11, detecting the received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified; In the embodiment of the present application, before performing hard disk identification on the hard disk to be connected, the interface identification control submodule in the interface self-identification module first performs module initialization according to the following substeps, including: Sub-step 1101 , controlling selector-2 to select phy_Tx+ / phy_Tx- as its output by differentially sending an output control signal TxOutCtrl, so as to ensure the normal operation of the tri-mode PHY module.

[0036] Sub-step 1102: Set all three signals in interface indication signal-2 to 1, indicating an empty slot, that is, the hard disk is not in place.

[0037] Sub-step 1103 , controlling selector- 1 to select a default output value through the interface type control signal IfTpCtrl.

[0038] Specifically, when the function of the interface self-identification module is enabled, the default output is the interface indication signal-2, and when the function of the interface self-identification module is disabled, the default output is the interface indication signal-1.

[0039] In an embodiment of the present application, based on the received first interface indication signal, the interface identification control submodule can specifically identify the interface type of the hard disk to be connected according to the following method, including: determining the first level value corresponding to the first interface indication signal; judging whether the interface type of the hard disk to be connected is identified based on the first level value and a preset interface type comparison table; wherein the interface type comparison table includes interface type information, the level value corresponding to the interface type information, the first interface detection indication of the interface type information, and the OOB detection indication of the interface type information.

[0040] In an embodiment of the present application, the interface type comparison table is shown in Table 1 below. After obtaining the first level value combination corresponding to the first interface indication signal, the interface identification control submodule can determine whether to identify the interface type of the hard disk to be connected according to Table 1.

[0041] As shown in Table 1 below, the values ​​of the interface detection indication IfDetInd corresponding to the first level value combination corresponding to the first interface indication signal are defined as follows: a. Valid: indicates that the interface type is detected; b. Invalid: indicates that the interface type is not detected; c. Unknown: Indicates that detection has not yet started. This is also the default value.

[0042] When the first level value combination corresponding to the first interface indication signal obtained by the interface identification control submodule is the same as sequence number 1, sequence number 3, sequence number 4, sequence number 7 and sequence number 8 in Table 1 below, it can be determined that the interface type of the hard disk to be connected has been identified, and then step 12 is executed.

[0043] When the first level value combination corresponding to the first interface indication signal obtained by the interface identification control submodule is the same as sequence number 2, sequence number 5 and sequence number 6 in Table 1 below, it can be determined that the interface type of the hard disk to be connected is not currently identified, and then step 13 is executed.

[0044] Table 1 Interface type comparison table

[0045] Step 12: When the determination result of step 11 is yes, output an interface indication signal corresponding to the interface type of the hard disk in place, thereby completing hard disk interface identification; When the interface detection indication IfDetInd obtained by executing step 11 is "valid", the interface identification control submodule can control the selector-1 to select the interface indication signal-1 corresponding to the interface type of the in-place hard disk as the output value through the interface type control signal IfTpCtrl.

[0046] At this point, the interface self-identification module has identified the hard disk interface type through the conventional detection function of the hard disk interface, and then the host storage controller can use the interface indication signal to start the corresponding protocol controller and PHY module.

[0047] Step 13: When the judgment result obtained by executing step 11 is negative, perform out-of-band signaling OOB detection by sending a control signal to generate an OOB detection result; In this embodiment of the application, when the interface detection indication IfDetInd obtained by executing step 11 is "invalid", that is, when the interface self-identification module fails to identify the interface type of the hard drive to be connected by conventional detection methods, the interface self-identification module can start out-of-band signaling (OOB) detection. By simulating the OOB signaling interaction process of the SAS / SATA host storage controller, it actively detects OOB signaling and thus identifies SAS / SATA hard drives that are difficult to identify by conventional detection methods.

[0048] In one implementation, the interface self-identification module can specifically perform out-of-band (OOB) signaling detection using the following method: generating OOB signaling by sending a first control signal; generating an OOB signaling sequence based on the OOB signaling, and transmitting the OOB signaling sequence through a differential signal transmission line; detecting the signaling received on the differential signal receiving line by sending a second control signal; generating a first OOB detection result when the OOB signaling and the OOB signaling sequence are detected on the differential signal receiving line; and generating a second OOB detection result when the OOB signaling and the OOB signaling sequence are not detected on the differential signal receiving line.

[0049] Specifically, the interface identification control submodule in the interface self-identification module can use the OOB signaling generation control signal oobGenCtrl to control the OOB signaling generation submodule to generate OOB signaling conforming to the SAS Protocol Layer (SPL) standard, and generate the OOB signaling transmission sequence according to the reset requirements of the PHY module. After parallel-to-serial conversion and differential driving, the sequence is output in the differential transmission signal oobTx+ / oobTx. For detailed explanations regarding OOB signaling, please refer to the following text; further details will not be repeated here.

[0050] At the same time, the interface identification control submodule can control the OOB signaling detection submodule to detect the OOB signaling on the differential signal Rx+ / Rx- from the PHY module through the OOB signaling detection control signal oobDetCtrl, and output the OOB signaling detection indication signal oobDetInd according to the detection result, as follows: (1) During the OOB signaling detection period (OOB_Timer), if OOB signaling and an OOB signaling sequence are detected on the differential signal Rx+ / Rx-, the oobDetInd signal output value is "valid" (i.e., the first OOB detection result described above), indicating that a SAS / SATA hard disk has been detected.

[0051] (2) During the OOB signaling detection period (OOB_Timer), if no OOB signaling is detected on the differential receive signal Rx+ / Rx-, the oobDetInd signal output value is "invalid" (i.e., the second OOB detection result described above), indicating that no SAS / SATA hard disk is detected.

[0052] The OOB signaling detection period (OOB_Timer) can be configured according to business needs. The configuration range is usually 10 milliseconds to 15 seconds, and the default value is 200 milliseconds.

[0053] In addition, it should be noted that the initial value of the oobDetInd signal must be distinguished from the two detection results of "valid" and "invalid". In one embodiment, the initial value of the oobDetInd signal can be defined as "unknown".

[0054] The following describes the OOB signaling applicable to the embodiments of the present application: In SAS storage architectures, as defined in SAS standards (such as SAS Protocol Layer-3 (SPL-3)) and SATA standards (such as Serial ATA Revision 3.2), OOB signaling (Out of Band signaling) is a proprietary signaling standard for SAS / SATA interfaces. It is an out-of-band signal that must be sent and received first after a SAS / SATA interface reset. OOB signaling is used to detect the presence of a SAS / SATA hard drive and the drive type (i.e., whether it is a SAS drive or a SATA drive).

[0055] OOB signaling includes three specific signals, defined in the standard as follows: COMRESET / COMINIT: Communication reset / communication initialization. The sender uses COMINIT signaling to inform the other party to "reset / initialize the SAS / SATA link." COMINIT and COMRESET are the same signaling.

[0056] COMSAS: Communication SAS indication. The sender uses COMSAS signaling to inform the other party that "the sender is a SAS device."

[0057] COMWAKE: Communication wake-up. The host or SAS / SATA hard disk sends COMWAKE signaling to inform "the sender's PHY has left the power saving state."

[0058] As defined by the standard, each OOB signaling message includes three parts: OOB burst, OOB idle, and OOB negation. Figure 8 As shown, a brief introduction is as follows: OOB burst: OOB signaling burst state, where the value of the differential signal is fixed to the SAS protocol link layer primitive ALIGN(0) or ALIGN(3).

[0059] OOB idle: OOB signaling idle state, in which the value of the differential signal is 0 or the SAS protocol link layer primitive OOB_IDLE, and the differential signal has no data.

[0060] OOB negation: OOB signaling silence state, in which the value of the differential signal is the same as OOB idle.

[0061] When the storage controller or hard drive resets the SAS / SATA interface, the SAS / SATA interface physical layer begins to send the OOB signaling transmission sequence on the Tx+ / Tx- differential signal lines, and simultaneously receives and detects the OOB signaling reception sequence on the Rx+ / Rx- differential signal lines.

[0062] like Figure 9 The diagram shows a SAS OOB signaling transmission / reception sequence. Phy A and Phy B represent the physical layers of two SAS interfaces. The COMSAS signal indicates that this is a SAS interface; therefore, only the SAS interface physical layer sends the COMSAS signal in the OOB signaling sequence, while the SATA interface physical layer does not send the COMSAS signal.

[0063] like Figure 10 The diagram shows the SATA OOB signaling transmission / reception sequence. The SATA storage controller (i.e., the SATA host) first sends the COMRESET signal. The SATA hard drive (i.e., the SATA device) sends the COMINIT signal only after receiving the COMRESET signal. Neither the SATA host nor the SATA device sends the COMSAS signal.

[0064] like Figure 11 The diagram shows a SAS-To-SATA OOB signaling transmission / reception sequence. The SAS phy is the physical layer of the SAS interface of the SAS storage controller (i.e., the SAS host), and the SATA phy is the physical layer of the SATA interface of the SATA hard drive. After receiving the COMSAS signal, the SATA phy will not send back the COMSAS signal, but will optionally send back the COMINIT signal.

[0065] From the OOB signaling sending / receiving timing, it can be seen that when the host storage controller (i.e., storage host) detects OOB signaling, it can detect that the SAS / SATA hard drive is in place; further, when it can recognize the OOB signaling sequence, it can identify whether the hard drive is a SAS hard drive or a SATA hard drive.

[0066] Step 14: Identify the interface type of the hard disk to be connected based on the OOB detection result obtained by executing step 13, and generate a second interface indication signal; In one embodiment, when the OOB detection result obtained by executing step 13 is the first OOB detection result (i.e., valid), the second interface indication signal can be generated specifically by the following method, including: determining a second level value corresponding to the first OOB detection result according to an interface type comparison table; and generating a second interface indication signal according to the second level value.

[0067] Specifically, when the oobDetInd signal is valid, the interface identification control submodule can set the level values ​​of the three signals in the interface indication signal-2 to in_PRSNT# = 0, in_IfDet# = 0, and in_IfDet2# = 1 according to Table 1 above, indicating that the hard disk in place is detected to be a SAS / SATA interface.

[0068] In one embodiment, when the OOB detection result obtained by executing step 13 is the second OOB detection result (i.e., invalid), the second interface indication signal can be generated specifically by the following method, including: generating the second interface indication signal according to the first level value corresponding to the first interface indication signal.

[0069] Specifically, when the oobDetInd signal is invalid, the interface identification control submodule determines that "interface detection is invalid", so the level values ​​of the three signals in the interface indication signal-2 are set to be the same as those of the interface indication signal-1, that is, the interface indication signal-2 is kept consistent with the interface indication signal-1, indicating that the OOB detection result is consistent with the conventional detection result, both of which are "interface detection invalid".

[0070] Step 15: Output an interface indication signal corresponding to the interface type according to the second interface indication signal, and complete hard disk interface identification.

[0071] When the second interface indication signal is generated by executing step 14, in one embodiment, the interface identification control submodule can control the selector-1 to select the interface indication signal-2 corresponding to the interface type of the in-place hard disk as the output value through the interface type control signal IfTpCtrl.

[0072] Specifically, when the generated OOB detection result is the first OOB detection result, it is determined according to the second interface indication signal that the interface type of the hard disk to be connected is SAS and / or SATA.

[0073] When the generated OOB detection result is the second OOB detection result, it is determined, based on the second interface indication signal, that no valid interface type of the hard drive to be connected has been detected.

[0074] At this point, through the OOB signaling detection function of the hard disk interface, the interface self-identification module can also identify the interface type of SAS / SATA hard disks that are not identified in routine detection. Then, the host storage controller can use the interface indication signal to start the SAS / SATA protocol controller and PHY module.

[0075] It should also be noted that in order to ensure compatibility with the SFF-TA-1001 standard, the interface self-identification module can be set to enable or disable mode. The default setting is generally disable mode. The functional behaviors of these two modes are as follows: Disable mode: The interface self-identification module disables its interface self-identification function and directly selects "Interface Indication Signal - 1" as its interface indication signal.

[0076] Enable mode: The interface self-identification module enables its interface self-identification function and ultimately outputs an interface indication signal after detection and identification.

[0077] In addition, in order to ensure compatibility with the SFF-TA-1001 standard, the interface self-identification module should use the encoding method defined in the SFF-TA-1001 standard to encode the interface indication signal it outputs.

[0078] When the interface self-identification module adopts a customized encoding method for the interface indication signal, a coding conversion function needs to be added between the selector-1 and the interface indication signal-1.

[0079] In the interface self-identification module, the hard disk interface detection function supports two interface detection modes: compatible mode and autonomous mode. The interface detection mode can be configured as needed. The default is compatible mode. The details are as follows: Compatibility mode: The interface self-identification module sets the internal signal IfDetInd according to Table 1, thereby realizing the hard disk interface detection function that is fully compatible with SFF-TA-1001.

[0080] Autonomous mode: When performing routine hard drive interface detection, if ex_PRSNT# = 0 and ex_IfDet# = 0 are detected in the interface indication signal -1, the internal signal IfDetInd is set to "invalid". This allows all SAS / SATA hard drives to use the OOB signaling detection function to identify their hard drive interfaces. This allows SAS / SATA hard drives and NVMe hard drives to use their own respective technical systems for in-place detection and interface detection.

[0081] In addition, it should be noted that the interface self-identification module can also be integrated into Figure 7 The PHY module shown constitutes a self-identifying three-mode PHY module.

[0082] Furthermore, by redefining the specific signal definition of the interface indication signal in the interface type comparison table, the hard disk interface identification method of the embodiment of the present application is also applicable to other application scenarios that require identification of hard disk interface types (NVMe, SAS, SATA), such as a storage bridge controller from a USB interface to a SATA / SAS / NVMe interface, and is not limited to applications in general storage architectures.

[0083] The hard disk interface identification method provided by the embodiment of the present application is adopted. When performing hard disk interface identification, the first interface indication signal received is detected to determine whether the interface type of the hard disk to be connected is identified; when the judgment result is yes, the interface indication signal corresponding to the interface type is output to complete the hard disk interface identification; when the judgment result is no, an out-of-band signaling OOB detection is performed by sending a control signal to generate an OOB detection result; according to the OOB detection result, the interface type of the hard disk to be connected is identified and a second interface indication signal is generated; according to the second interface indication signal, an interface indication signal corresponding to the interface type is output to complete the hard disk interface identification. The hard disk interface identification method provided by the embodiment of the present application is adopted. According to the hard disk presence and interface identification method defined in the universal storage architecture and the unique OOB signaling principle in the SAS storage architecture, an interface self-identification module is designed outside the standard storage interface module of the host storage controller. Then, for the hard disk interface type that cannot be identified according to the hard disk presence and interface identification method defined in the universal storage architecture, the interface self-identification module can be used to identify the hard disk interface type based on the OOB signaling principle, and then the SAS / SATA interface of the hard disk can be identified, thereby solving the problem of incompatibility between the existing three-mode universal storage architecture and the SAS / SATA hard disk.

[0084] In one embodiment, the present application also provides a hard disk interface identification device to solve the problem of incompatibility between the existing three-mode universal storage architecture and SAS / SATA hard disks. The specific structural diagram of the hard disk interface identification device is as follows Figure 12As shown, it includes: a first identification unit 31, a first type output unit 32, an OOB detection unit 33, a second identification unit 34, and a second type output unit 35.

[0085] The first identification unit 31 is configured to detect the received first interface indication signal and determine whether the interface type of the hard disk to be connected is identified; The first type output unit 32 is used to output the interface indication signal corresponding to the interface type when the judgment result obtained by the first identification unit is yes, so as to complete the hard disk interface identification. OOB detection unit 33 is used to perform out-of-band signaling OOB detection by sending a control signal when the judgment result obtained by the first identification unit is negative, and generate an OOB detection result. The second identification unit 34 is used to identify the interface type of the hard drive to be connected based on the OOB detection result and generate a second interface indication signal. The second type output unit 35 is configured to output an interface indication signal corresponding to the interface type according to the second interface indication signal, thereby completing hard disk interface identification.

[0086] In one embodiment, the first identification unit 31 is specifically used to: determine the first level value corresponding to the first interface indication signal; determine whether the interface type of the hard disk to be connected is identified based on the first level value and a preset interface type comparison table; wherein the interface type comparison table includes interface type information, the level value corresponding to the interface type information, the first interface detection indication of the interface type information, and the OOB detection indication of the interface type information.

[0087] In one embodiment, the OOB detection unit 33 is specifically configured to: generate OOB signaling by sending a first control signal; generate an OOB signaling sequence based on the OOB signaling, and send the OOB signaling sequence through the differential signal transmission line; detect the signaling received on the differential signal reception line by sending a second control signal; generate a first OOB detection result when the OOB signaling and the OOB signaling sequence are detected on the differential signal reception line; and generate a second OOB detection result when the OOB signaling and the OOB signaling sequence are not detected on the differential signal reception line.

[0088] In one embodiment, the second identification unit 34 is specifically configured to: determine a second level value corresponding to the first OOB detection result according to an interface type comparison table; and generate a second interface indication signal according to the second level value.

[0089] In one embodiment, the second identification unit 34 is specifically configured to generate a second interface indication signal according to a first level value corresponding to the first interface indication signal.

[0090] In one embodiment, the second type output unit 35 is specifically used to: when the generated OOB detection result is the first OOB detection result, determine that the interface type of the hard disk to be connected is SAS and / or SATA according to the second interface indication signal; when the generated OOB detection result is the second OOB detection result, determine that the hard disk to be connected has not detected a valid interface type according to the second interface indication signal.

[0091] The hard disk interface identification method provided by the embodiment of the present application is adopted. When performing hard disk interface identification, the first interface indication signal received is detected to determine whether the interface type of the hard disk to be connected is identified; when the judgment result is yes, the interface indication signal corresponding to the interface type is output to complete the hard disk interface identification; when the judgment result is no, an out-of-band signaling OOB detection is performed by sending a control signal to generate an OOB detection result; according to the OOB detection result, the interface type of the hard disk to be connected is identified and a second interface indication signal is generated; according to the second interface indication signal, an interface indication signal corresponding to the interface type is output to complete the hard disk interface identification. The hard disk interface identification method provided by the embodiment of the present application is adopted. According to the hard disk presence and interface identification method defined in the universal storage architecture and the unique OOB signaling principle in the SAS storage architecture, an interface self-identification module is designed outside the standard storage interface module of the host storage controller. Then, for the hard disk interface type that cannot be identified according to the hard disk presence and interface identification method defined in the universal storage architecture, the interface self-identification module can be used to identify the hard disk interface type based on the OOB signaling principle, and then the SAS / SATA interface of the hard disk can be identified, thereby solving the problem of incompatibility between the existing three-mode universal storage architecture and the SAS / SATA hard disk.

[0092] Figure 13 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 13 At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.

[0093] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, an EISA (Extended Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or a PCIe (PCI Express) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, Figure 13 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0094] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0095] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming a hard disk interface identification device at the logical level. The processor executes the program stored in the memory and is specifically configured to perform the following operations: detecting a received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified; if the determination result is yes, outputting an interface indication signal corresponding to the interface type to complete hard disk interface identification; if the determination result is no, performing out-of-band signaling (OOB) detection by sending a control signal to generate an OOB detection result; based on the OOB detection result, identifying the interface type of the hard disk to be connected, generating a second interface indication signal; based on the second interface indication signal, outputting an interface indication signal corresponding to the interface type to complete hard disk interface identification.

[0096] The above is as stated in this application. Figure 13The method disclosed in the illustrated embodiment and executed by an electronic device for identifying a hard disk interface can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the method described above can be performed by hardware integrated logic circuits within the processor or by software instructions. The processor described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly executed by a hardware decoding processor or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0097] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0098] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including multiple application programs, can enable the portable electronic device to execute Figure 6 The method of the embodiment shown is specifically used to perform the following operations: Detect the received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified; when the judgment result is yes, output the interface indication signal corresponding to the interface type to complete the hard disk interface identification; when the judgment result is no, perform out-of-band signaling OOB detection by sending a control signal to generate an OOB detection result; based on the OOB detection result, identify the interface type of the hard disk to be connected and generate a second interface indication signal; based on the second interface indication signal, output the interface indication signal corresponding to the interface type to complete the hard disk interface identification.

[0099] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatuses, devices, systems, and computer program products. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0100] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, devices, systems, and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1A step that specifies a function in one or more boxes.

[0103] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0104] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0105] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0106] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0107] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, apparatuses, devices, systems, and computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0108] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A hard disk interface identification method, characterized in that: include: Detecting the received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified; When the judgment result is yes, an interface indication signal corresponding to the interface type is output to complete the hard disk interface identification; When the judgment result is no, an out-of-band signaling OOB detection is performed by sending a control signal to generate an OOB detection result; According to the OOB detection result, identifying the interface type of the hard disk to be connected, and generating a second interface indication signal; According to the second interface indication signal, an interface indication signal corresponding to the interface type is output to complete hard disk interface identification.

2. The method according to claim 1, characterized in that The detecting of the received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified specifically includes: Determine a first level value corresponding to the first interface indication signal; According to the first level value and the preset interface type comparison table, determine whether the interface type of the hard disk to be connected is identified; wherein the interface type comparison table includes interface type information, the level value corresponding to the interface type information, the first interface detection indication of the interface type information, and the OOB detection indication of the interface type information.

3. The method according to claim 1, characterized in that The sending of a control signal to perform out-of-band signaling OOB detection and generate an OOB detection result specifically includes: Generate OOB signaling by sending a first control signal; Generate an OOB signaling sequence according to the OOB signaling, and send the OOB signaling sequence through a differential signal transmission line; Detecting the signaling received on the differential signal receiving line by sending a second control signal; When the OOB signaling and the OOB signaling sequence are detected on the differential signal receiving line, a first OOB detection result is generated; When the OOB signaling and the OOB signaling sequence are not detected on the differential signal receiving line, a second OOB detection result is generated.

4. The method according to claim 3, characterized in that When the generated OOB detection result is the first OOB detection result, generating a second interface indication signal according to the OOB detection result specifically includes: Determine, according to the interface type comparison table, a second level value corresponding to the first OOB detection result; A second interface indication signal is generated according to the second level value.

5. The method according to claim 3, characterized in that: When the generated OOB detection result is the second OOB detection result, generating a second interface indication signal according to the OOB detection result specifically includes: A second interface indication signal is generated according to a first level value corresponding to the first interface indication signal.

6. The method according to any one of claims 4 or 5, characterized in that: Identifying the interface type of the hard disk to be connected according to the second interface indication signal specifically includes: When the generated OOB detection result is the first OOB detection result, determining, according to the second interface indication signal, that the interface type of the hard disk to be connected is SAS / SATA; When the generated OOB detection result is the second OOB detection result, it is determined, according to the second interface indication signal, that the hard disk to be connected is not detected with a valid interface type.

7. A hard disk interface identification device, characterized in that: include: A first identification unit, used to detect the received first interface indication signal, and determine whether the interface type of the hard disk to be connected is identified; A first type output unit, configured to output an interface indication signal corresponding to the interface type when the judgment result obtained by the first identification unit is yes, so as to complete the hard disk interface identification; An OOB detection unit, configured to, when the judgment result obtained by the first identification unit is negative, perform an out-of-band signaling OOB detection by sending a control signal to generate an OOB detection result; A second identification unit, configured to identify the interface type of the hard disk to be connected according to the OOB detection result, and generate a second interface indication signal; The second type output unit is used to output an interface indication signal corresponding to the interface type according to the second interface indication signal to complete hard disk interface identification.

8. A hard disk interface identification device, comprising: processor; a memory arranged to store computer executable instructions which, when executed, cause the processor to: Detecting the received first interface indication signal to determine whether the interface type of the hard disk to be connected is identified; When the judgment result is yes, an interface indication signal corresponding to the interface type is output to complete the hard disk interface identification; When the judgment result is no, an out-of-band signaling OOB detection is performed by sending a control signal to generate an OOB detection result; According to the OOB detection result, identifying the interface type of the hard disk to be connected, and generating a second interface indication signal; According to the second interface indication signal, an interface indication signal corresponding to the interface type is output to complete hard disk interface identification.

9. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, enables the electronic device to execute the hard disk interface identification method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the hard disk interface identification method as described in any one of claims 1 to 6.