PHY equipment management method and system, medium and equipment
By transferring the power control function of the PHY device from the MAC driver module to the PHY driver module, dynamically managing the power state of the PHY device is solved, and the problem of being unable to dynamically control the power up and down of the PHY device in the existing technology is solved, and the system power consumption management efficiency is improved and maintainability.
Patent Information
- Application Number
- CN202410961010.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the MAC driver is responsible for controlling the power management of the PHY device, which leads to the inability to dynamically control the power up and down of the PHY device during the system operation, resulting in low system power consumption management efficiency.
Transfer the power control function of the PHY device from the MAC driver module to the PHY driver module, and dynamically manage the power state of the PHY device through the control instructions sent by the operating system, and realize dynamic power-on and power-off control of the PHY device.
It reduces the overall power consumption of the system, simplifies the system architecture, improves power consumption management efficiency, and improves the maintainability and reliability of the system.
Smart Images

Figure CN119052301A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a management method, system, medium and device for a PHY device. Background Art
[0002] In network communications, the PHY (physical layer) and MAC (media access control) layers are responsible for the physical connection of the network and the data link layer protocol, respectively. In the prior art, the MAC driver is responsible for controlling the power supply of the PHY, including turning on the PHY power supply, managing the PHY power supply mode, etc. This approach increases the complexity of the MAC driver and has limitations in the flexibility and efficiency of the power management strategy. The most important defect is that the MAC driver can only power on the PHY when the system starts, and during the system operation, it is impossible to dynamically control the power on and off of the PHY, resulting in inefficient system power management. Summary of the invention
[0003] The present application provides a management method, system, medium and device for a PHY device, which transfers the power control function of the PHY device from a MAC driver module to a PHY driver module to achieve dynamic power-on and power-off control of the PHY device.
[0004] A first aspect of an embodiment of the present application provides a management method for a PHY device, which is applied to a PHY driver module. The method includes:
[0005] Receive a control instruction sent by an operating system; the control instruction is used to indicate a power state of a PHY device;
[0006] In response to the control instruction, power of the PHY device is managed.
[0007] Optionally, the control instruction includes a first sleep instruction;
[0008] In response to the control instruction, managing the power supply of the PHY device includes:
[0009] In response to the first sleep instruction, the PHY device is controlled to be powered off so that the PHY device enters a low power consumption state.
[0010] Optionally, in response to the first sleep instruction, controlling the PHY device to power off includes:
[0011] In response to the first sleep instruction, calling a newly added PHY power disable function to generate a second sleep instruction;
[0012] The second sleep instruction is sent to the PHY device to power off the PHY device.
[0013] Optionally, the control instruction includes a first wake-up instruction;
[0014] In response to the control instruction, managing the power supply of the PHY device includes:
[0015] In response to the first wake-up instruction, the PHY device is controlled to be powered on, so that the PHY device recovers from the low power consumption state to the working state.
[0016] Optionally, in response to the first wake-up instruction, controlling the PHY device to power on includes:
[0017] In response to the first wake-up instruction, calling a newly added PHY power enable function to generate a second wake-up instruction;
[0018] The second wake-up instruction is sent to the PHY device to power on the PHY device.
[0019] Optionally, after sending the second wake-up instruction to the PHY device to power on the PHY device, the method further includes:
[0020] Call the reset function to generate a reset instruction;
[0021] The reset instruction is sent to the PHY device to restore the PHY device from the low power consumption state to a working state.
[0022] Optionally, the method further comprises:
[0023] Receiving an initialization instruction sent by the operating system; the initialization instruction is generated when the operating system is started;
[0024] In response to the initialization instruction, initialization settings are performed on the PHY device.
[0025] Based on the same inventive concept, a second aspect of an embodiment of the present application provides a management system for a PHY device, the system comprising an operating system and a PHY driver module;
[0026] The operating system is used to generate a control instruction in response to a control request triggered by a user or a preset application program, and send the control instruction to the PHY driver module; the control instruction is used to indicate the power state of the PHY device;
[0027] The PHY driving module is used to manage the power supply of the PHY device in response to the control instruction.
[0028] Based on the same inventive concept, a third aspect of an embodiment of the present application provides a management device for a PHY device, which is applied to a PHY driver module, and the device includes:
[0029] A receiving module, used for receiving a control instruction sent by an operating system; the control instruction is used for indicating a power state of a PHY device;
[0030] An execution module is used to manage the power supply of the PHY device in response to the control instruction.
[0031] Based on the same inventive concept, the fourth aspect of an embodiment of the present application provides a storage medium, in which machine executable instructions are stored. When the machine executable instructions are executed by a processor, the management method of the PHY device proposed in the first aspect of the present application is implemented.
[0032] A fifth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes, the management method of the PHY device proposed in the first aspect of the present application is implemented.
[0033] Compared with the prior art, this application has the following advantages:
[0034] A management method for a PHY device provided in an embodiment of the present application is applied to a PHY driver module. The PHY driver module receives a control instruction sent by the operating system, and manages the power supply of the PHY device in response to the control instruction. The control instruction is used to indicate the power status of the PHY device. Thus, by transferring the power control function of the PHY device from the MAC driver module to the PHY driver module, the function of dynamically controlling the power on or off of the PHY device is implemented according to system needs, so as to reduce unnecessary power consumption and reduce the overall power consumption of the system. In addition, the PHY driver is closer to the physical layer, and managing the power supply of the PHY device through the PHY driver module not only simplifies the system architecture and improves the power consumption management efficiency of the system, but also helps to improve the maintainability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the prior art in which the power supply of a PHY device is managed by a MAC driver module;
[0036] Figure 2 is a flow chart of a method for managing a PHY device in one embodiment of the present application;
[0037] Figure 3 It is a schematic diagram of the PHY device power being managed by the PHY driver module in this application;
[0038] Figure 4 It is a schematic diagram of the SOC power control pin output by the PHY driver module in this application;
[0039] Figure 5is a circuit diagram of the power supply control of the PHY device in this application;
[0040] Figure 6 It is a chip pin diagram of the PHY device in this application;
[0041] Figure 7 It is a schematic diagram of the SOC reset pin output by the PHY driver module in this application;
[0042] Figure 8 This is a schematic diagram of the structure of a management system of a PHY device in one embodiment of the present application;
[0043] Fig. 9 This is a functional module diagram of a management device for a PHY device in an embodiment of the present application;
[0044] Fig.10 It is a structural schematic diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] PHY device (Physical Layer Device), also known as port physical layer device, refers to the physical layer of the OSI model (Open System Interconnect). PHY devices connect a data link layer device (MAC) to a physical medium, such as optical fiber or copper cable. PHY chips can send and receive Ethernet data frames and usually include a physical coding sublayer (PCS) and a physical medium dependent sublayer (PMD).
[0047] MAC driver (Media Access Control Driver) is used to control and manage the hardware of the MAC layer (data link layer). The MAC layer is mainly responsible for data encapsulation and decapsulation, as well as data frame transmission control. The MAC driver communicates with the PHY device through a specific interface (such as MII, GMII, etc.) to achieve data exchange between the physical layer and the data link layer.
[0048] In network communication, when data needs to be transmitted from the sender to the receiver, the MAC driver first encapsulates the data into Ethernet frames and then passes the frames to the PHY device through the MII interface. The PHY device converts the frames into signals suitable for transmission on the physical medium and sends them out through the physical medium. At the receiving end, the PHY device converts the received signals back into Ethernet frames and passes them to the MAC driver through the MII interface, which decapsulates and processes them.
[0049] In the prior art, the power control of PHY is usually managed by the MAC driver, which is integrated into the system CPU, and the PHY device chip is connected to the MAC driver through a standard interface. Figure 1 As shown in the figure, after the system starts, the application layer generates a power-on instruction and sends it to the MAC driver. The MAC driver controls the power-on and reset of the PHY device chip through the standard interface, so that the PHY device can reach a normal working state and realize the subsequent data receiving and sending functions together with the MAC driver. However, this architecture has some limitations, including increased complexity, difficulty in debugging, and potential problems of inefficient power management. Among them, the most important defect is that the MAC-side driver can only power on the PHY when the system starts, and during the operation of the system, it cannot dynamically control the power on and off of the PHY, resulting in inefficient system power management.
[0050] In view of this, the present application proposes a management method for a PHY device, which realizes the function of dynamically controlling the power on or off of the PHY device according to system needs by transferring the power control function of the PHY device from the MAC driver module to the PHY driver module, so as to reduce unnecessary power consumption and reduce the overall power consumption of the system. In addition, the PHY driver is closer to the physical layer, and the power supply of the PHY device is managed through the PHY driver module, which not only simplifies the system architecture and improves the power consumption management efficiency of the system, but also helps to improve the maintainability and reliability of the system.
[0051] Please refer to Figure 2 , Figure 2 1 is a flow chart of a method for managing a PHY device proposed in an embodiment of the present application. The method is applied to a PHY driver module, such as Figure 2 As shown, the method comprises the following steps:
[0052] S101: Receive a control instruction sent by an operating system; the control instruction is used to indicate a power state of a PHY device.
[0053] In this embodiment, the operating system communicates with the PHY driver module through a standardized power management interface to send control instructions, wherein the control instructions are used to indicate the power state of the PHY device, including sleep instructions and wake-up instructions.
[0054] In specific implementation, during the operation of the operating system, the application layer of the operating system detects the network activity status, generates a sleep command when there is no network activity, and sends the sleep command to the PHY driver module through the standardized electrical management interface; when network activity is detected, it generates a wake-up command, and sends the wake-up command to the PHY driver module through the standardized electrical management interface.
[0055] Exemplarily, no network activity means that no packets are being sent or received, or no activity is detected within a specific time window. For example, these activities can be monitored through the API (interface) of the network stack. Typically, the network stack provides callback functions or events to notify the system when a packet arrives or is sent. In addition, the duration of network activity can also be tracked by a timer or counter. If no activity is detected within a specific time period, it can be considered that no network activity occurs and the network is idle.
[0056] S102: In response to the control instruction, manage the power supply of the PHY device.
[0057] In this embodiment, the PHY driver module is connected to the PHY device through a specific interface. After receiving the control instruction, the PHY driver module will respond to the control instruction and execute the corresponding function to generate a corresponding control signal (such as a high-level or low-level analog signal), and send the control signal to the PHY device through a specific interface to power on or off the PHY device, thereby realizing power management of the PHY device through the PHY driver module.
[0058] For details, please refer to Figure 3 , Figure 3 Schematic diagram of the PHY device power being managed by the PHY driver module in this application. Figure 3 As shown, during the operation of the operating system, the application layer generates a power-on (or power-off) instruction according to the current network activity status and sends it to the operating system, and sends it to the PHY driver module through the MAC driver module (the MAC driver module can be regarded as a part integrated in the operating system). The PHY driver module controls the power-on and reset (or power-off) of the PHY device chip through a specific interface, so that the PHY device reaches a normal working state, so as to realize the subsequent data receiving and sending functions together with the MAC driver module.
[0059] In the prior art, the MAC driver module is responsible for controlling the power supply of the PHY device, including turning on the PHY power supply, managing the PHY power supply mode, etc. This method increases the complexity of the MAC driver module and has limitations in the flexibility and efficiency of the power management strategy. In this embodiment, the MAC driver module no longer directly manages the power supply control of the PHY device, but the operating system communicates with the PHY driver module through a standard interface and issues a power management control instruction, thereby directly being responsible for the power supply control of the PHY device through the PHY driver module that is closer to the physical layer. Then, the PHY driver module can dynamically adjust the power supply state of the PHY device according to the requirements of the application layer to reduce unnecessary power consumption and improve the power consumption management efficiency of the system.
[0060] Furthermore, in order to migrate the power management function of the PHY device from the MAC driver module to the PHY driver module, the inventors made the following modifications to the underlying logic coding:
[0061] 1. Modification of the device tree: In the device tree code segment, move the reset and power pins of the phy device from the MAC node to the phy0 node. In the driver, obtain the information of the power and reset pins through the information of the phy0 node.
[0062] 2. Modification of network MAC driver: In the MAC controlled driver, only the power of phy device can be enabled, and there is no function to disable the power of phy device. In the MAC driver code, the powerup_emac_phy(eqos) and reset_emac_phy(eqos) functions are blocked (the former is used to activate the PHY device, and the latter is used to reset the PHY device), so that the MAC driver has no operation on the power of the PHY device.
[0063] 3. Network phy driver modification: In order to transfer the power supply operation of the PHY device to the PHY driver, the following two functions are added to the phy driver:
[0064] static int rtl9000b_power_up(struct phy_device*phydev)
[0065] static int rtl9000b_power_down(struct phy_device*phydev)
[0066] The former is a PHY power enable function, which is used to power on the PHY device, and the latter is a PHY power disable function, which is used to power off the PHY device. Thus, the PHY driver module can realize power control of the PHY device by calling the corresponding function.
[0067] Optionally, the control instruction includes a first sleep instruction. In response to the control instruction, managing the power supply of the PHY device includes: in response to the first sleep instruction, controlling the PHY device to power off so that the PHY device enters a low power consumption state.
[0068] Specifically, the PHY driver module generates a second sleep instruction by calling the newly added PHY power disabling function in response to the first sleep instruction, and then sends the second sleep instruction to the PHY device to power off the PHY device.
[0069] In this implementation, the first sleep instruction is sent by the operating system to the PHY driver module, and the second sleep instruction is sent by the PHY driver module to the PHY device. Exemplarily, the first sleep instruction may be ifconfig eth0 down, and the second sleep instruction may be a low level signal.
[0070] The PHY power disabling function is a newly added function function in the PHY driver module for powering off the PHY device. In the specific implementation process, after the PHY driver module receives the first sleep instruction sent by the operating system, it will respond to the first sleep instruction by calling and executing related function functions (such as the newly added PHY power disabling function) to generate a second sleep instruction, and send the second sleep instruction to the PHY device to control the PHY device to power off and put the PHY device into sleep mode (or sleep mode). The specific implementation of the sleep mode depends on the hardware specifications of the PHY device and the implementation of the PHY driver, and may involve shutting down certain parts of the PHY device, but maintaining its ability to receive wake-up signals (so that network operations can be restored when awakened), thereby putting the PHY device in a low-power state to reduce system power consumption.
[0071] For example, after receiving the first sleep instruction of ifconfig eth0 down, the PHY driver module will eventually call the static int rtl9000b_suspend(struct phy_device*phydev) function, in which the static int rtl9000b_power_down(struct phy_device*phydev) function is nestedly called to disable the power of the PHY device.
[0072] Optionally, the control instruction includes a first wake-up instruction. In response to the control instruction, managing the power supply of the PHY device includes: in response to the first wake-up instruction, controlling the PHY device to power on so that the PHY device recovers from a low power consumption state to a working state.
[0073] Specifically, the PHY driver module generates a second wake-up instruction by calling a newly added PHY power enable function in response to the first wake-up instruction, and then sends the second wake-up instruction to the PHY device to power on the PHY device.
[0074] In this implementation, the first wake-up instruction is sent by the operating system to the PHY driver module, and the second wake-up instruction is sent by the PHY driver module to the PHY device. Exemplarily, the first wake-up instruction may be ifconfig eth0 up, and the second wake-up instruction may be a high-level signal.
[0075] The PHY power enable function is a function newly added in the PHY driver module for powering on the PHY device. In the specific implementation process, after the PHY driver module receives the first wake-up instruction sent by the operating system, it will respond to the first wake-up instruction by calling and executing related function functions (such as the newly added PHY power enable function) to generate a second wake-up instruction, and send the second wake-up instruction to the PHY device to control the PHY device to power on and put the PHY device into wake-up mode.
[0076] Meanwhile, after the PHY device is powered on, the method further includes: calling a reset function to generate a reset instruction; and sending the reset instruction to the PHY device to restore the PHY device from a low power consumption state to a working state.
[0077] In this implementation, after the PHY device is powered on, the power supply and clock signals need some time to stabilize, that is, the PHY device may not be able to enter the normal working state immediately after powering on. Therefore, the reset operation can be used to ensure that the PHY device waits for these signals to stabilize before starting normal operation, thereby avoiding operation in an unstable state. At the same time, the reset operation will reset the internal registers of the PHY device to default values or known states. This helps eliminate uncertainty and potential misconfigurations, and ensures that the PHY device starts working from a known and consistent state.
[0078] Therefore, in order to wake up the PHY device from sleep mode and resume normal operation in the present application, after the PHY device is powered on, it is also necessary to perform hardware and software reset on the PHY device so that the PHY device can be restored from a low power consumption state to a working state. The reset instruction can be a high level signal.
[0079] For example, after receiving the first wake-up instruction of ifconfig eth0 up, the PHY driver module will eventually call the function int rtl9000b_soft_reset(struct phy_device*phydev), in which the static int rtl9000b_power_up(struct phy_device*phydev) function is nested to enable the power of the PHY device. Then, the rtl9000b_hard_reset(phydev) and genphy_soft_reset(phydev) functions are called to perform hardware and software resets on the PHY device, so that the PHY device can re-enter the normal working mode.
[0080] Optionally, the method further includes: receiving an initialization instruction sent by an operating system; the initialization instruction is generated when the operating system is started; and in response to the initialization instruction, initializing the PHY device.
[0081] In this embodiment, when the operating system starts, it will automatically trigger the generation of an initialization instruction and send it to the PHY driver module. The PHY driver module will respond to the initialization instruction and call the corresponding initialization function to initialize the configuration of the PHY device (the PHY device is powered on during the initialization configuration) to ensure that the physical layer of the Ethernet communication can work normally.
[0082] Specifically, the initialization process of the PHY device includes the steps of powering on and waiting for stabilization, calling the initialization function, self-negotiation, setting the link status, and subsequent operations (configuring network parameters, starting network communication). The implementation principle can refer to the process of initializing and managing the PHY device through the MAC driver module in the prior art. This application mainly migrates the initialization function to the PHY driver module through another interface, which will not be repeated here.
[0083] For further information on the hardware connection between the PHY driver module and the PHY device, please refer to Figures 4 to 7 ,in, Figure 4 It is a schematic diagram of the SOC power control pin output by the PHY driver module in this application; Figure 5 is a circuit diagram of the power supply control of the PHY device in this application; Figure 6 It is a chip pin diagram of the PHY device in this application; Figure 7 It is a schematic diagram of the SOC reset pin output by the PHY driver module in this application.
[0084] In a possible implementation, Figure 4 As shown, the BOT_GPIO_0 pin (i.e., pin W14) of the PHY driver module is connected Figure 5The SOC_3V3_EN_PHY1 power enable terminal of the PHY device power control circuit is used to control Figure 5 The on / off of transistor Q107 (model S-LMUN2232LT1G) and field effect transistor Q106 (model S-LMUN2232LT1G) in the middle controls the output voltage of PHY1_3V3. Figure 6 As shown in the figure, the PHY1_3V3 terminal is connected to the 8th pin of the chip of the PHY device (model RTL9000BR), so as to control the power on and off of the chip RTL. Figure 7 As shown, the EPHY_RSTN pin of the PHY driver module is connected to the PHY1_PHYRSTB_SOC reset terminal, and the PHY1_PHYRSTB_SOC reset terminal is connected to Figure 6 Pin 2 of the chip RTL is used to reset the chip RTL.
[0085] When the PHY driver module receives the first sleep instruction sent by the operating system, it will respond to the first sleep instruction by calling and executing related function functions (such as the newly added PHY power disable function) to generate a second sleep instruction, that is, a low level signal, and Figure 4 The BOT_GPIO_0 pin in the outputs the low level signal, making Figure 5 The transistor Q107 and the field effect transistor Q106 in the circuit are turned off (ie, not conducting), so that the output voltage of the PHY1_3V3 terminal is 0V, and finally the control Figure 6 The chip RTL in the PHY is powered off, so that the PHY device enters a low power consumption state and waits to be woken up next time.
[0086] When the PHY driver module receives the first wake-up instruction sent by the operating system, it will respond to the first wake-up instruction by calling and executing related function functions (such as the newly added PHY power enable function and reset function) to generate a second wake-up instruction and a reset instruction. The second wake-up instruction is a high-level signal and is transmitted through Figure 4 The BOT_GPIO_0 pin in the outputs the high level signal, making Figure 5 The transistor Q107 and the field effect transistor Q106 in the PHY1_3V3 are turned on, which makes the output voltage of the PHY1_3V3 terminal 3.3V, and finally controls Figure 6 The chip RTL in the power-on. And the reset instruction is also a high-level signal, and through Figure 7 The EPHY_RSTN pin in the PHY1_PHYRSTB_SOC reset terminal controls the high level signal. Figure 6The chip RTL in the PHY device is reset to wake up the PHY device, so that the PHY device recovers from a low power consumption state to a normal working state, thereby achieving effective management of the power supply of the PHY device.
[0087] Based on the same inventive concept, the second aspect of the embodiment of the present application provides a management system for a PHY device, please refer to Figure 8 The management system 800 of the PHY device includes an operating system 801 and a PHY driver module 802. The operating system 801 is used to generate a control instruction in response to a control request triggered by a user or a preset application program, and send the control instruction to the PHY driver module 802; the control instruction is used to indicate the power state of the PHY device. The PHY driver module 802 is used to manage the power supply of the PHY device in response to the control instruction.
[0088] In this embodiment, the control instruction of sleep or wake-up can be manually triggered by the user. For example, in the test and debugging stage, the control request manually input by the user can be detected through the user state interface to generate a sleep or wake-up control instruction to send to the PHY driver module 802 to test whether its PHY power control function can be executed normally. For example, it is possible to confirm whether the PHY device has entered the sleep state or verify whether the PHY device has been awakened by monitoring the status indicator of the PHY device or reading the status register. Therefore, by recording the results of each test and analyzing any possible abnormal conditions, the system is adjusted in time to ensure that the PHY driver module 802 can correctly control the power on and off of the PHY device.
[0089] In addition, the sleep or wake-up control instruction can also be triggered by one or more application programs in the application layer. For example, when an application program in the application layer needs to use the PHY device, a control request will be generated. At this time, the application layer detects that there is network activity, and generates a wake-up instruction to send to the PHY driver module 802 to wake up the PHY device.
[0090] In this embodiment, the control instruction for the power supply of the PHY device can be triggered by manual input of the user or a preset application program, which is convenient for testing and application and realizes effective management of the power supply of the PHY device.
[0091] Please refer to Fig. 9 Based on the same inventive concept, the third aspect of the embodiment of the present application provides a management device for a PHY device, which is applied to a PHY driver module. The management device 900 of the PHY device includes:
[0092] The receiving module 901 is used to receive a control instruction sent by the operating system; the control instruction is used to indicate the power state of the PHY device;
[0093] The execution module 902 is used to manage the power supply of the PHY device in response to the control instruction.
[0094] Optionally, the control instruction includes a first sleep instruction, and the execution module 902 includes:
[0095] The first execution submodule is used to control the PHY device to power off in response to the first sleep instruction, so that the PHY device enters a low power consumption state.
[0096] Optionally, the first execution submodule is specifically used for:
[0097] In response to the first sleep instruction, calling a newly added PHY power disable function to generate a second sleep instruction;
[0098] The second sleep instruction is sent to the PHY device to power off the PHY device.
[0099] Optionally, the control instruction includes a first wake-up instruction, and the execution module 902 further includes:
[0100] The second execution submodule is used to control the PHY device to power on in response to the first wake-up instruction, so that the PHY device recovers from the low power consumption state to the working state.
[0101] Optionally, the second execution submodule is specifically used for:
[0102] In response to the first wake-up instruction, calling a newly added PHY power enable function to generate a second wake-up instruction;
[0103] The second wake-up instruction is sent to the PHY device to power on the PHY device.
[0104] Optionally, the second execution submodule is further used for:
[0105] Call the reset function to generate a reset instruction;
[0106] The reset instruction is sent to the PHY device to restore the PHY device from the low power consumption state to a working state.
[0107] Optionally, the device further includes an initialization module, and the initialization module is used to:
[0108] Receiving an initialization instruction sent by the operating system; the initialization instruction is generated when the operating system is started;
[0109] In response to the initialization instruction, initialization settings are performed on the PHY device.
[0110] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0111] In a fourth aspect, based on the same inventive concept, an embodiment of the present application provides a storage medium, in which machine executable instructions are stored. When the machine executable instructions are executed by a processor, the management method of the PHY device proposed in the first aspect of the present application is implemented.
[0112] It should be noted that the specific implementation of the storage medium in the embodiment of the present application refers to the specific implementation of the PHY device management method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0113] In the fifth aspect, based on the same inventive concept, refer to Fig.10 An embodiment of the present application provides an electronic device 100, including a processor 101 and a memory 102; the memory 102 stores machine executable instructions that can be executed by the processor 101, and the processor 101 is used to execute the machine executable instructions to implement the management method of the PHY device proposed in the first aspect of the present application.
[0114] It should be noted that the specific implementation of the electronic device 100 in the embodiment of the present application refers to the specific implementation of the PHY device management method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0115] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0116] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.
[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0120] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0121] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0122] The above is a detailed introduction to the management method, system, medium and device of a PHY device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for managing a PHY device, It is characterized in that The method is applied to a PHY driver module, and the method comprises: Receive a control instruction sent by an operating system; the control instruction is used to indicate a power state of a PHY device; In response to the control instruction, power of the PHY device is managed.
2. The method according to claim 1, It is characterized in that The control instruction includes a first sleep instruction; In response to the control instruction, managing the power supply of the PHY device includes: In response to the first sleep instruction, the PHY device is controlled to be powered off so that the PHY device enters a low power consumption state.
3. The method according to claim 2, It is characterized in that In response to the first sleep instruction, controlling the PHY device to power off includes: In response to the first sleep instruction, calling a newly added PHY power disable function to generate a second sleep instruction; The second sleep instruction is sent to the PHY device to power off the PHY device.
4. The method according to claim 2, It is characterized in that The control instruction includes a first wake-up instruction; In response to the control instruction, managing the power supply of the PHY device includes: In response to the first wake-up instruction, the PHY device is controlled to be powered on, so that the PHY device recovers from the low power consumption state to the working state.
5. The method according to claim 4, It is characterized in that In response to the first wake-up instruction, controlling the PHY device to power on includes: In response to the first wake-up instruction, calling a newly added PHY power enable function to generate a second wake-up instruction; The second wake-up instruction is sent to the PHY device to power on the PHY device.
6. The method according to claim 5, It is characterized in that After sending the second wake-up instruction to the PHY device to power on the PHY device, the method further includes: Call the reset function to generate a reset instruction; The reset instruction is sent to the PHY device to restore the PHY device from the low power consumption state to a working state.
7. The method according to claim 1, It is characterized in that The method further comprises: Receiving an initialization instruction sent by the operating system; the initialization instruction is generated when the operating system is started; In response to the initialization instruction, initialization settings are performed on the PHY device.
8. A management system for a PHY device, It is characterized in that The system includes an operating system and a PHY driver module; The operating system is used to generate a control instruction in response to a control request triggered by a user or a preset application program, and send the control instruction to the PHY driver module; The control instruction is used to indicate the power status of the PHY device; The PHY driving module is used to manage the power supply of the PHY device in response to the control instruction.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method for managing a PHY device according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method for managing a PHY device according to any one of claims 1 to 7 is implemented.
