CN115586913A - Method and device for upgrading network card firmware - Google Patents

Method and device for upgrading network card firmware Download PDF

Info

Publication number
CN115586913A
CN115586913A CN202211285856.9A CN202211285856A CN115586913A CN 115586913 A CN115586913 A CN 115586913A CN 202211285856 A CN202211285856 A CN 202211285856A CN 115586913 A CN115586913 A CN 115586913A
Authority
CN
China
Prior art keywords
pcie
firmware
network card
equipment
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211285856.9A
Other languages
Chinese (zh)
Inventor
姜璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211285856.9A priority Critical patent/CN115586913A/en
Publication of CN115586913A publication Critical patent/CN115586913A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention provides a method and a device for upgrading a network card firmware, wherein the method comprises the following steps: acquiring firmware information aiming at the external network card, and refreshing and writing the firmware information into the external network card; responding to a triggered PCIE equipment restarting event, and controlling the PCIE equipment to power off; responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the power-on of the PCIE equipment; responding to a triggered firmware validation check event, and performing firmware validation check on the external network card; and when the firmware is validated and passes the check, determining that the firmware of the external network card is successfully upgraded. By the embodiment of the invention, the network card firmware is quickly upgraded and validated without restarting the whole computer, and the operation of other equipment in the system is not influenced; moreover, the refreshing of multiple PCIE network cards can be completed in a batch refreshing mode, and the refreshing efficiency is greatly improved.

Description

Method and device for upgrading network card firmware
Technical Field
The invention relates to the technical field of firmware upgrading, in particular to a method and a device for upgrading network card firmware.
Background
The normal operation of the PCIE (peripheral component interconnect express) add-in network card requires the normal loading of FirmWare (FirmWare, FW). Due to upgrading of hardware devices, or occurrence of various compatibility problems, the network card needs to continuously upgrade FWs to solve various problems. In the process of upgrading FW of the network card, the FW needs to be refreshed and written in, then the server needs to be cold restarted, and the FW can be thoroughly ensured to take effect only when the network card equipment has a power-on and power-off process.
Since the system must be reloaded and then the validation check is performed, the whole FW upgrading process is time-consuming and inefficient.
Disclosure of Invention
In view of the above, it is proposed to provide a method and apparatus for network card firmware upgrade that overcomes or at least partially solves the above mentioned problems, comprising:
a method for upgrading a network card firmware is applied to a server, the server is connected with PCIE equipment, the PCIE equipment comprises an external network card, the PCIE equipment is provided with a signal detection position, and the method comprises the following steps:
acquiring firmware information aiming at an external network card, and refreshing and writing the firmware information into the external network card;
responding to a triggered PCIE equipment restarting event, and controlling the PCIE equipment to power off;
responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the PCIE equipment to be powered on;
responding to a triggered firmware validation check event, and performing firmware validation check on the external network card;
and when the firmware validation check passes, determining that the firmware of the external network card is successfully upgraded.
Optionally, the server includes a driver, where the driver stores PCIE resources of the PCIE device, and the PCIE device is controlled to power down in response to a triggered PCIE device restart event;
responding to a triggered PCIE equipment restarting event, and generating a restarting instruction of the PCIE equipment;
according to the restart instruction, unloading the drive of the operating system and releasing PCIE resources in the drive;
when the PCIE resource release is detected to be finished, a release completion signal is generated;
and sending the release completion signal to the PCIE equipment so as to control the power-off of the PCIE equipment.
Optionally, the method further comprises:
generating a restart signal aiming at the PCIE equipment according to the restart instruction;
and sending the restart signal to the PCIE equipment.
Optionally, after the controlling the PCIE device to power down, the method further includes:
determining first time information of power-off of the PCIE equipment;
acquiring current second time information;
determining power-off duration information according to the first time information and the second time information;
and when detecting that the power-off duration information is greater than or equal to the preset duration information, triggering a power-on event of the PCIE equipment.
Optionally, the method further comprises:
and triggering a PCIE equipment restarting event in response to the user restarting operation aiming at the PCIE equipment.
Optionally, the method further comprises:
and triggering a power-on event of the PCIE equipment in response to the power-on operation of the user for the PCIE equipment.
Optionally, the method further comprises:
and triggering a firmware validation check event in response to validation check operation of the firmware by a user.
The utility model provides a device of network card firmware upgrading, is applied to the server, the server is connected with PCIE equipment, PCIE equipment includes external network card, PCIE equipment is provided with the signal and detects the position, the device includes:
the firmware writing module is used for acquiring firmware information aiming at an external network card and refreshing and writing the firmware information into the external network card;
the device power-off module is used for responding to a triggered PCIE device restarting event and controlling the PCIE device to be powered off;
the device power-on module is used for responding to a triggered PCIE device power-on event, generating a device loading signal aiming at the PCIE device, and sending the device loading signal to a signal detection position of the PCIE device so as to control the PCIE device to be powered on;
the firmware validation checking module is used for responding to a triggered firmware validation checking event and carrying out firmware validation checking on the external network card;
and the upgrading validation module is used for determining that the firmware upgrading of the external network card is successful when the firmware validation check passes.
An electronic device comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements a method for upgrading a firmware of a network card as described above.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for network card firmware upgrade as described above.
The embodiment of the invention has the following advantages:
the embodiment of the invention obtains the firmware information aiming at the external network card and refreshes and writes the firmware information into the external network card; responding to a triggered PCIE equipment restarting event, and controlling the PCIE equipment to power off; responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the PCIE equipment to be powered on; responding to a triggered firmware validation check event, and performing firmware validation check on the external network card; when the firmware is passed through the effective check, the firmware of the external network card is determined to be successfully upgraded, so that the firmware of the network card is quickly upgraded and takes effect without the need of restarting the whole machine, and the operation of other equipment under the system is not influenced; moreover, the refreshing of multiple PCIE network cards can be completed in a batch refreshing mode, and the refreshing efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating a network card firmware upgrading method for system restart;
FIG. 2 is a system architecture diagram of the present invention:
fig. 3 is a flowchart illustrating steps of a method for upgrading a network card firmware according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps of another method for upgrading firmware of a network card according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating steps of another method for upgrading firmware of a network card according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating steps of another method for upgrading firmware of a network card according to an embodiment of the present invention;
FIG. 7a is a schematic diagram of another system architecture according to an embodiment of the present invention;
fig. 7b is a flowchart illustrating steps of a method for upgrading a network card firmware based on a PCIE adapter card according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a device for upgrading a network card firmware according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention more comprehensible, the present invention is described in detail with reference to the accompanying drawings and the detailed description thereof. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
As shown in fig. 1, a schematic diagram of a physical implementation scheme of a universal network card is shown, which includes three processes of network card FW refreshing, whole system restarting, and FW validation checking.
In the process of upgrading the FW, the network card needs to use a corresponding refreshing tool under a system to refresh and write the FW file into the network card. After the write is completed, there is a prompt that the refresh is successful. But at this time, the new FW does not take effect, a cold restart needs to be performed on the whole system, a network card is ensured to have a reinitialization process, and after the system is restarted, the FW version is checked to take effect normally. Restarting the system may result in upgrading FW in a significant amount of time and may have an impact on the operation of other devices.
As shown in fig. 2, which is a schematic diagram of a server architecture according to an embodiment of the present invention, a server 201 is connected to a PCIE device 202, and the PCIE device 202 includes an external network card 2021.
In the embodiment of the invention, the signal detection position is arranged in the PCIE equipment, the whole equipment is not required to be restarted in the FW upgrading process of the network card, and only the PCIE equipment carrying the network card is restarted to initialize the network card, so that the FW upgrading of the network card is quickly effective, the normal operation of other equipment is not influenced, and batch upgrading can be realized.
Referring to fig. 3, a flowchart illustrating steps of a method for upgrading a network card firmware according to an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a PCIE device, the PCIE device includes an external network card, and the PCIE device is provided with a signal detection bit, and specifically includes the following steps:
step 301, acquiring firmware information for an external network card, and refreshing and writing the firmware information into the external network card;
due to upgrading of hardware devices, or occurrence of various compatibility problems, the network card needs to continuously upgrade FWs to solve various problems.
Firmware information to be upgraded aiming at the external network card can be stored in the server, when the PCIE equipment is in a power-on state, the external network card can be accessed into the server, and the server can send the firmware information to the external network card in the PCIE equipment so as to refresh and write the firmware information into the external network card.
Step 302, in response to a triggered PCIE device restart event, controlling the PCIE device to power down;
after the firmware information is written into the external network card, the firmware in the network card cannot be immediately effective, and the external network card needs to be initialized to realize the effect of upgrading the network card.
At this time, when a triggered PCIE device restart event is detected, the server may power down the PCIE device in response to the PCIE device restart event, so that the network card is also powered down.
Specifically, the event of restarting the PCIE device may be automatically triggered after the server completes the firmware information refresh writing, or triggered in response to an operation of a user.
Under the condition that the PCIE equipment is in a power-off state, the server can normally operate, and other equipment controlled or connected by the server can also normally operate.
Step 303, in response to a triggered PCIE device power-on event, generating a device loading signal for the PCIE device, and sending the device loading signal to the signal detection bit of the PCIE device to control power-on of the PCIE device.
The signal detection position in the PCIE device may be set on the PCIE adapter card, and may also be set on an HBA card, an HCA card, or the like.
When the server detects a triggered power-on event of the PCIE device, the server may generate a device loading signal of the PCIE device in response to the power-on event of the PCIE device, and the device loading signal may control the PCIE device to be powered on again.
A signal detection position may be provided in the PCIE device, when the server generates a device loading signal, the server sends the device loading signal to the information detection position, and when the signal detection position detects the device loading signal, the PCIE device may be powered on again, so that the external network card is powered on again, thereby completing initialization of the external network card after firmware information is refreshed and written based on step 302 and step 303,
specifically, the power-on event of the PCIE device may be automatically triggered by the server in a preset scene, or triggered in response to an operation of the user.
Step 304, responding to a triggered firmware validation check event, and performing firmware validation check on the external network card;
after the initialization of powering off and powering on the external network card is completed, when the server detects a triggered firmware validation check event, the server may respond to the firmware validation check event to perform firmware validation check on the external network card, and determine whether the firmware of the external network card is in effect.
Specifically, the firmware validation check event may be automatically triggered by the server in a preset scenario, or triggered in response to an operation of the user.
Step 305, when the firmware validation check passes, determining that the firmware of the external network card is successfully upgraded.
And under the condition that the firmware validation check is passed, the firmware of the external network card can be determined to be valid, so that the network card firmware is successfully upgraded.
In the embodiment of the invention, the firmware information aiming at the external network card is obtained and is refreshed and written into the external network card; responding to a triggered PCIE equipment restarting event, and controlling the PCIE equipment to power off; responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the power-on of the PCIE equipment; responding to a triggered firmware validation check event, and performing firmware validation check on the external network card; when the firmware is passed through the effective check, the firmware of the external network card is determined to be successfully upgraded, so that the firmware of the network card is quickly upgraded and takes effect without the need of restarting the whole machine, and the operation of other equipment under the system is not influenced; moreover, the refreshing of multiple PCIE network cards can be completed in a batch refreshing mode, and the refreshing efficiency is greatly improved.
Referring to fig. 4, a flowchart of steps of another method for upgrading a network card firmware according to an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a PCIE device, the PCIE device includes an external network card, the driver stores PCIE resources of the PCIE device, the PCIE device is provided with a signal detection bit, the server includes a driver, and the method specifically includes the following steps:
step 401, acquiring firmware information for an external network card, and refreshing and writing the firmware information into the external network card;
due to upgrading of hardware devices, or occurrence of various compatibility problems, the network card needs to continuously upgrade FWs to solve various problems.
Firmware information to be upgraded aiming at the external network card can be stored in the server, when the PCIE equipment is in a power-on state, the external network card can be accessed into the server, and the server can send the firmware information to the external network card in the PCIE equipment so as to refresh and write the firmware information into the external network card.
Step 402, in response to a triggered PCIE device restart event, generating a restart instruction of the PCIE device;
the PCIE device restart event may be automatically triggered by the server after the firmware information is refreshed and written, or triggered in response to an operation of a user.
After the firmware information is written into the external network card, the firmware in the network card cannot take effect immediately, and the external network card needs to be initialized to realize the effect of upgrading the network card.
At this time, when a triggered PCIE device restart event is detected, the server may respond to the PCIE device restart event, and the server may generate a restart instruction of the PCIE device, where the restart instruction is used to instruct the server to prepare for restarting the PCIE device.
In an embodiment of the present invention, the method further includes: generating a restart signal aiming at the PCIE equipment according to the restart instruction; and sending the restart signal to the PCIE equipment.
In practical application, after the server generates the restart instruction, a restart signal for the PCIE device may be generated based on the restart instruction, and the PCIE device determines, according to the restart signal, that the server is to be restarted for the PCIE device.
Step 403, according to the restart instruction, unloading the driver and releasing PCIE resources in the driver;
after the server generates the restart instruction, the unloading of the driver and the release of the PCIE resources in the driver may be performed based on the restart instruction, so as to prepare for the restart of the PCIE device.
Step 404, when detecting that the release of the PCIE resource is finished, generating a release completion signal;
when the release of the PCIE resources is finished, the server may generate a release completion signal, where the release completion signal is used to indicate that the release of the driven PCIE resources is finished.
Step 405, sending the release completion signal to the PCIE device to control the PCIE device to power down.
After the release completion signal is generated, the release completion signal can be sent to the PCIE device, and after the signal detection position of the PCIE device receives the release completion signal, the release completion signal is analyzed to determine that the current drive is unloaded and the release of the PCIE resource is completed, so that the PCIE device is triggered to be powered off, and the PCIE device is controlled to be powered off, so that the network card is powered off.
Under the condition that the PCIE equipment is in a power-off state, the server can normally operate, and other equipment controlled or connected by the server can also normally operate.
Step 406, in response to a triggered PCIE device power-on event, generating a device loading signal for the PCIE device, and sending the device loading signal to the signal detection bit of the PCIE device to control power-on of the PCIE device;
when the server detects a triggered power-on event of the PCIE device, the server may generate a device loading signal of the PCIE device in response to the power-on event of the PCIE device, and the device loading signal may control the PCIE device to be powered on again.
A signal detection bit may be disposed in the PCIE device, when the server generates a device loading signal, the server sends the device loading signal to the information detection bit, and when the signal detection bit detects the device loading signal, the PCIE device may be powered on again, so that the external network card is powered on again, thereby completing initialization of the external network card after firmware information is refreshed and written based on steps 402 and 406,
specifically, the power-on event of the PCIE device may be automatically triggered by the server in a preset scene, or triggered in response to an operation of the user.
In an example, after the device is powered down, the PCIE device is reloaded, the driver is loaded, and the server may re-identify the PCIE device.
Step 407, responding to a triggered firmware validation check event, and performing firmware validation check on the external network card;
after the initialization of powering off and powering on the external network card is completed, when the server detects a triggered firmware validation check event, the server may respond to the firmware validation check event to perform firmware validation check on the external network card, and determine whether the firmware of the external network card is in effect.
Specifically, the firmware validation check event may be automatically triggered by the server in a preset scenario, or triggered in response to an operation of the user.
And step 408, determining that the firmware of the external network card is successfully upgraded when the firmware validation check passes.
And under the condition that the firmware validation check is passed, the firmware of the external network card can be determined to be valid, so that the network card firmware is successfully upgraded.
In the embodiment of the invention, the firmware information aiming at the external network card is obtained and is refreshed and written into the external network card; responding to a triggered PCIE equipment restarting event, and generating a restarting instruction of the PCIE equipment; unloading the drive and releasing PCIE resources in the drive according to the restart instruction; when the PCIE resource release is detected to be finished, a release completion signal is generated; sending the release completion signal to the PCIE equipment to control the power-off of the PCIE equipment; responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the PCIE equipment to be powered on; responding to a triggered firmware validation check event, and performing firmware validation check on the external network card; when the firmware is passed through the effective check, the firmware of the external network card is determined to be successfully upgraded, so that the firmware of the network card is quickly upgraded and takes effect without the need of restarting the whole machine, and the operation of other equipment under the system is not influenced; moreover, the refreshing of multiple PCIE network cards can be completed in a batch refreshing mode, and the refreshing efficiency is greatly improved.
Referring to fig. 5, a flowchart of steps of another method for upgrading a network card firmware according to an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a PCIE device, the PCIE device includes an external network card, a PCIE resource of the PCIE device is stored in the driver, the PCIE device is provided with a signal detection bit, and the server includes the driver, which specifically includes the following steps:
step 501, acquiring firmware information aiming at an external network card, and refreshing and writing the firmware information into the external network card;
due to upgrading of hardware devices or occurrence of various compatibility problems, the network card needs to continuously upgrade FW to solve various problems.
Firmware information to be upgraded aiming at the external network card can be stored in the server, when the PCIE equipment is in a power-on state, the external network card can be accessed into the server, and the server can send the firmware information to the external network card in the PCIE equipment so as to refresh and write the firmware information into the external network card.
Step 502, in response to a triggered PCIE device restart event, generating a restart instruction of the PCIE device;
the PCIE device restart event may be automatically triggered by the server after the firmware information is refreshed and written, or triggered in response to an operation of a user.
After the firmware information is written into the external network card, the firmware in the network card cannot take effect immediately, and the external network card needs to be initialized to realize the effect of upgrading the network card.
At this time, when a triggered PCIE device restart event is detected, the server may respond to the PCIE device restart event, and the server may generate a restart instruction of the PCIE device, where the restart instruction is used to instruct the server to prepare for a PCIE device restart.
In an embodiment of the present invention, the method further includes: generating a restart signal aiming at the PCIE equipment according to the restart instruction; and sending the restart signal to the PCIE equipment.
In practical application, after the server generates the restart instruction, a restart signal for the PCIE device may be generated based on the restart instruction, and the PCIE device determines, according to the restart signal, that the server is to be restarted for the PCIE device.
Step 503, according to the restart instruction, uninstalling the driver of the operating system and releasing PCIE resources in the driver;
after the server generates the restart instruction, the unloading driver and the releasing of the PCIE resources in the driver may be executed based on the restart instruction, so as to prepare for restarting the PCIE device.
Step 504, when detecting that the release of the PCIE resource is finished, generating a release completion signal;
when the release of the PCIE resources is finished, the server may generate a release completion signal, where the release completion signal is used to indicate that the release of the driven PCIE resources is finished.
Step 505, sending the release completion signal to the PCIE device to control powering off of the PCIE device.
After the release completion signal is generated, the release completion signal can be sent to the PCIE device, and after the signal detection position of the PCIE device receives the release completion signal, the release completion signal is analyzed to determine that the current drive is unloaded and the release of the PCIE resource is completed, so that the PCIE device is triggered to be powered off, and the PCIE device is controlled to be powered off, so that the network card is powered off.
Under the condition that the PCIE equipment is in a power-off state, the server can normally operate, and other equipment controlled or connected by the server can also normally operate.
Step 506, determining first time information of powering off the PCIE device;
when the PCIE device is powered off, first time information of the powering off of the PCIE device may be recorded.
Step 507, acquiring current second time information;
step 508, determining power-off duration information according to the first time information and the second time information;
and calculating a time difference through the first time information and the second time information, wherein the time difference is power-off time length information.
In step 509, when it is detected that the power-off duration information is greater than or equal to the preset duration information, a power-on event of the PCIE device is triggered.
By setting the preset duration for power-off, the server can automatically control the power-on of the PCIE equipment, and meanwhile, the phenomenon that the operation pressure of the server is large due to too close power-on and power-off intervals of the PCIE equipment can be avoided.
Step 510, in response to a triggered PCIE device power-on event, generating a device loading signal for the PCIE device, and sending the device loading signal to a signal detection bit of the PCIE device to control power-on of the PCIE device;
when the server detects a triggered power-on event of the PCIE device, the server may generate a device loading signal of the PCIE device in response to the power-on event of the PCIE device, and the device loading signal may control the PCIE device to be powered on again.
The PCIE equipment can be provided with a signal detection position, when the server generates an equipment loading signal, the server sends the equipment loading signal to the information detection position, when the signal detection position detects the equipment loading signal, the PCIE equipment can be electrified again, so that the external network card is electrified again, based on the step 502 and the step 510, the initialization of the external network card after the firmware information is refreshed and written is completed,
specifically, the power-on event of the PCIE device may be automatically triggered by the server in a preset scene, or triggered in response to an operation of the user.
Step 511, responding to a triggered firmware validation check event, and performing firmware validation check on the external network card;
after the initialization of powering off and powering on the external network card is completed, when the server detects a triggered firmware validation check event, the server may respond to the firmware validation check event to perform firmware validation check on the external network card, and determine whether the firmware of the external network card is in effect.
Specifically, the firmware validation check event may be automatically triggered by the server in a preset scenario, or triggered in response to an operation of the user.
Step 512, when the firmware validation check passes, it is determined that the firmware of the external network card is successfully upgraded.
And under the condition that the firmware validation check is passed, the firmware of the external network card can be determined to be valid, so that the network card firmware is successfully upgraded.
In the embodiment of the invention, the firmware information aiming at the external network card is obtained and is refreshed and written into the external network card; responding to a triggered PCIE equipment restarting event, and generating a restarting instruction of the PCIE equipment; unloading the drive and releasing PCIE resources in the drive according to the restart instruction; when detecting that the release of the PCIE resources is finished, generating a release completion signal; sending the release completion signal to the PCIE equipment to control the PCIE equipment to be powered off; determining first time information of power-off of the PCIE equipment; acquiring current second time information; determining power-off duration information according to the first time information and the second time information; when detecting that the power-off duration information is greater than or equal to the preset duration information, triggering a power-on event of the PCIE equipment to respond to the triggered power-on event of the PCIE equipment, generating an equipment loading signal for the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment to control the power-on of the PCIE equipment; responding to a triggered firmware validation check event, and performing firmware validation check on the external network card; when the firmware is passed through the validation check, the firmware of the external network card is determined to be successfully updated, so that the firmware of the network card is quickly updated and validated without restarting the whole machine, and the operation of other equipment under the system is not influenced; moreover, the refreshing of multiple PCIE network cards can be completed in a batch refreshing mode, and the refreshing efficiency is greatly improved.
Referring to fig. 6, a flowchart illustrating steps of another method for upgrading a network card firmware according to an embodiment of the present invention is shown, where the method is applied to a server, where the server is connected to a PCIE device, the PCIE device includes an external network card, the driver stores PCIE resources of the PCIE device, the PCIE device is provided with a signal detection bit, the server includes the driver, and the method specifically includes the following steps:
601, acquiring firmware information aiming at an external network card, and refreshing and writing the firmware information into the external network card;
due to upgrading of hardware devices or occurrence of various compatibility problems, the network card needs to continuously upgrade FW to solve various problems.
Firmware information to be upgraded aiming at the external network card can be stored in the server, when the PCIE equipment is in a power-on state, the external network card can be accessed into the server, and the server can send the firmware information to the external network card in the PCIE equipment so as to refresh and write the firmware information into the external network card.
Step 602, in response to a restart operation of the user for the PCIE device, a PCIE device restart event is triggered.
When a user performs a restart operation on a PCIE device, the server may trigger a PCIE device restart event in response to the restart operation.
Step 603, in response to a triggered PCIE device restart event, generating a restart instruction of the PCIE device;
after the firmware information is written into the external network card, the firmware in the network card cannot be immediately effective, and the external network card needs to be initialized to realize the effect of upgrading the network card.
At this time, when a triggered PCIE device restart event is detected, the server may respond to the PCIE device restart event, and the server may generate a restart instruction of the PCIE device, where the restart instruction is used to instruct the server to prepare for a PCIE device restart.
In an embodiment of the present invention, the method further includes: generating a restart signal aiming at the PCIE equipment according to the restart instruction; and sending the restart signal to the PCIE equipment.
In practical application, after the server generates the restart instruction, a restart signal for the PCIE device may be generated based on the restart instruction, and the PCIE device determines, according to the restart signal, that the server is to be restarted for the PCIE device.
Step 604, according to the restart instruction, uninstalling the drive of the operating system and releasing PCIE resources in the drive;
after the server generates the restart instruction, the unloading of the driver and the release of the PCIE resources in the driver may be performed based on the restart instruction, so as to prepare for the restart of the PCIE device.
Step 605, when detecting that the release of the PCIE resource is finished, generating a release completion signal;
when the release of the PCIE resources is finished, the server may generate a release completion signal, where the release completion signal is used to indicate that the release of the driven PCIE resources is finished.
Step 606, sending the release completion signal to the PCIE device to control powering down of the PCIE device.
After the release completion signal is generated, the release completion signal can be sent to the PCIE equipment, the signal detection position of the PCIE equipment analyzes the release completion signal after receiving the release completion signal, the current drive unloading and the PCIE resource release completion are determined, and therefore the PCIE equipment is triggered to be powered off, the PCIE equipment is controlled to be powered off, and therefore the network card is powered off.
Under the condition that the PCIE equipment is in a power-off state, the server can normally operate, and other equipment controlled or connected by the server can also normally operate.
Step 607, responding to the power-on operation of the user for the PCIE device, triggering a power-on event of the PCIE device.
The user can perform a power-on operation for the PCIE device that is powered off, and then the server responds to the power-on operation to trigger a power-on event of the PCIE device.
Step 608, in response to a triggered PCIE device power-on event, generating a device loading signal for the PCIE device, and sending the device loading signal to a signal detection bit of the PCIE device to control power-on of the PCIE device;
when the server detects a triggered power-on event of the PCIE device, the server may generate a device loading signal of the PCIE device in response to the power-on event of the PCIE device, and the device loading signal may control the PCIE device to be powered on again.
A signal detection bit may be disposed in the PCIE device, when the server generates a device loading signal, the server sends the device loading signal to the information detection bit, and when the signal detection bit detects the device loading signal, the PCIE device may be powered on again, so that the external network card is powered on again, thereby completing initialization of the external network card after firmware information is refreshed and written based on step 602 and step 608,
in an example, after the server generates the device loading signal, the device loading signal may also be sent to the PCIE device to control the PCIE device to power on.
And step 609, responding to the effective checking operation of the firmware by the user, and triggering a firmware effective checking event.
For the initialized PCIE device, an effective detection operation of the firmware may be performed, and a trigger firmware effective check event is performed.
Step 610, responding to a triggered firmware validation check event, and performing firmware validation check on the external network card;
after the initialization of powering off and powering on the external network card is completed, when the server detects a triggered firmware validation check event, the server may respond to the firmware validation check event to perform firmware validation check on the external network card, and determine whether the firmware of the external network card is in effect.
Step 611, when the firmware validation check passes, determining that the firmware of the external network card is successfully updated.
And under the condition that the firmware validation check is passed, the firmware of the external network card can be determined to be valid, so that the network card firmware is successfully upgraded.
In the embodiment of the invention, the firmware information aiming at the external network card is obtained and is refreshed and written into the external network card; triggering a PCIE equipment restarting event in response to a user restarting operation aiming at the PCIE equipment; responding to a triggered PCIE equipment restarting event, and generating a restarting instruction of the PCIE equipment; unloading the drive and releasing PCIE resources in the drive according to the restart instruction; when detecting that the release of the PCIE resources is finished, generating a release completion signal; sending the release completion signal to the PCIE equipment to control the PCIE equipment to be powered off; responding to the power-on operation of a user for the PCIE equipment, and triggering a power-on event of the PCIE equipment; responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the power-on of the PCIE equipment; triggering a firmware validation check event in response to a validation check operation of a user on the firmware; responding to a triggered firmware validation check event, and performing firmware validation check on the external network card; when the firmware is passed through the effective check, the firmware of the external network card is determined to be successfully upgraded, so that the firmware of the network card is quickly upgraded and takes effect without the need of restarting the whole machine, and the operation of other equipment under the system is not influenced; moreover, the refreshing of multiple PCIE network cards can be completed in a batch refreshing mode, and the refreshing efficiency is greatly improved.
The above-described embodiments of the present invention are illustrated below in conjunction with fig. 7a-7 b:
as shown in fig. 7a, a server architecture diagram is shown, where a server 701 is connected to a PCIE device 702, the server 701 includes a driver 7011 for storing PCIE resources, the PCIE device 702 includes a PCIE adapter card 7021 and an external network card 7022, and a signal detection position for detecting a signal is set in the PCIE adapter card of the PCIE device.
Fig. 7b is a schematic flow chart illustrating upgrading of the firmware of the external network card based on the architecture in fig. 7a, including the following steps:
step S11, the network card FW is refreshed.
The server acquires the firmware information of the network card and refreshes and writes the firmware information into the external network card.
And step S12, triggering the PCIE equipment to restart.
After the refreshing and writing of the external network card is completed, the user performs a restart operation for the PCIE device, and the server generates a restart instruction, for example: and # send reset-cmd, and further execute the restart instruction, the server may further generate a PCIE device restart signal, and send the PCIE device restart signal to the signal detection bit of the PCIE switch card.
And step S13, driving unloading.
During execution of the restart instruction by the server, the driver may be unloaded.
Step S14, release the PCIE resource.
The server may also release PCIE resources stored in the drive.
Step S15, a release completion signal is sent.
After the release of the PCIE resources is completed, the server may generate a release completion signal, and send the release completion signal to the signal detection position of the PCIE adapter card.
Step S16, the equipment is powered off.
After receiving the release completion signal, the PCIE switch card may control the PCIE device to power down, and the external network card is also in a power down state.
Step S17, a device loading signal is sent.
When a user powers on the PCIE device which is powered off, the server generates a device loading signal and sends the device loading signal to the signal detection position of the PCIE adapter card. For example: # send load-cmd.
Step S18, the equipment is powered on.
The signal detection position detects a device loading signal, and controls the PCIE device to be powered on, so that the external network card is also in a powered-on state.
Step S19, load the PCIE device.
The server may load the PCIE device when the PCIE device is powered on.
Step S20, a driver is loaded.
The server may further load drivers.
Step S21, check FW valid.
And when the user performs the operation of checking the validity of the firmware of the external network card, the server generates a corresponding command. FW check is performed in accordance with the command. For example: and (5) ethtool-i eth0.
In an example, when a batch of PCIE devices is applied to a server, the above scheme may be applied to a plurality of slot positions at the same time to refresh the firmware, so that a plurality of network cards are refreshed in batch.
It should be noted that for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently depending on the embodiment of the invention. Further, those of skill in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the embodiments of the invention.
Referring to fig. 8, a schematic structural diagram of a device for upgrading a network card firmware according to an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a PCIE device, the PCIE device includes an external network card, and the PCIE device is provided with a signal detection bit, and specifically includes the following modules:
a firmware writing module 801, configured to acquire firmware information for an external network card, and refresh and write the firmware information into the external network card;
a device power-down module 802, configured to respond to a triggered PCIE device restart event and control the PCIE device to power down;
an equipment power-on module 803, configured to generate an equipment loading signal for a PCIE device in response to a triggered PCIE device power-on event, and send the equipment loading signal to a signal detection bit of the PCIE device to control power-on of the PCIE device;
an effective check module 804, configured to perform firmware effective check on the external network card in response to a triggered firmware effective check event;
the upgrade validation module 805 is configured to determine that the firmware upgrade of the external network card is successful when the firmware validation check passes.
In an embodiment of the present invention, the server includes a driver, the driver stores PCIE resources of the PCIE device,
in an embodiment of the present invention, the device power down module 802 includes:
the restarting instruction generating sub-module is used for responding to a triggered PCIE equipment restarting event and generating a restarting instruction of the PCIE equipment;
the resource release module is used for unloading the drive of the operating system and releasing the PCIE resources in the drive according to the restart instruction;
a release completion signal generation submodule, configured to generate a release completion signal when it is detected that the release of the PCIE resource is completed;
and the device power-off module is used for sending the release completion signal to the PCIE device so as to control the PCIE device to power off.
In an embodiment of the present invention, the power down module 802 of the device further includes:
the restarting instruction generating submodule is used for generating a restarting signal aiming at the PCIE equipment according to the restarting instruction;
and the restart instruction sending submodule is used for sending the restart signal to the PCIE equipment.
In one embodiment of the present invention, the apparatus includes:
a first time information determining module, configured to determine first time information of powering down of the PCIE device;
the second time information determining module is used for acquiring current second time information;
the power-off duration determining module is used for determining power-off duration information according to the first time information and the second time information;
the first trigger module is configured to trigger a power-on event of the PCIE device when it is detected that the power-off duration information is greater than or equal to preset duration information.
In one embodiment of the present invention, the apparatus includes:
and the second triggering module is used for responding to the restarting operation of the user for the PCIE equipment and triggering a PCIE equipment restarting event.
In one embodiment of the present invention, the apparatus includes:
and the third triggering module is used for responding to the power-on operation of the user for the PCIE equipment and triggering a power-on event of the PCIE equipment.
In one embodiment of the present invention, the apparatus includes:
and the fourth triggering module is used for responding to the validation check operation of the user for the firmware and triggering the firmware validation check event.
An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where when the computer program is executed by the processor, the method for upgrading the firmware of the network card is implemented.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for upgrading the firmware of the network card is implemented.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of 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, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations 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 inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The method and the device for upgrading the network card firmware are introduced in detail, specific examples are applied in the method to explain the principle and the implementation mode of the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for upgrading network card firmware is applied to a server, the server is connected with PCIE equipment, the PCIE equipment comprises an external network card, the PCIE equipment is provided with a signal detection position, and the method comprises the following steps:
acquiring firmware information aiming at an external network card, and refreshing and writing the firmware information into the external network card;
responding to a triggered PCIE equipment restarting event, and controlling the PCIE equipment to power off;
responding to a triggered PCIE equipment power-on event, generating an equipment loading signal aiming at the PCIE equipment, and sending the equipment loading signal to a signal detection position of the PCIE equipment so as to control the PCIE equipment to be powered on;
responding to a triggered firmware validation check event, and performing firmware validation check on the external network card;
and when the firmware validation check passes, determining that the firmware of the external network card is successfully upgraded.
2. The method of claim 1, wherein the server includes a driver that stores PCIE resources of the PCIE device, and the controlling the PCIE device to power down in response to a triggered PCIE device restart event comprises:
responding to a triggered PCIE equipment restarting event, and generating a restarting instruction of the PCIE equipment;
unloading the drive and releasing PCIE resources in the drive according to the restart instruction;
when the PCIE resource release is detected to be finished, a release completion signal is generated;
and sending the release completion signal to the PCIE equipment so as to control the power-off of the PCIE equipment.
3. The method of claim 2, further comprising:
generating a restart signal aiming at the PCIE equipment according to the restart instruction;
and sending the restart signal to the PCIE equipment.
4. The method of claim 1, after the controlling the PCIE device to power down, further comprising:
determining first time information of power-off of the PCIE equipment;
acquiring current second time information;
determining power-off duration information according to the first time information and the second time information;
and when detecting that the power-off duration information is greater than or equal to the preset duration information, triggering a power-on event of the PCIE equipment.
5. The method of claim 1, further comprising:
and triggering a PCIE equipment restarting event in response to the user restarting operation aiming at the PCIE equipment.
6. The method of claim 1, further comprising:
and triggering a power-on event of the PCIE equipment in response to the power-on operation of the user for the PCIE equipment.
7. The method of claim 1, further comprising:
and triggering a firmware validation check event in response to a validation check operation of the firmware by the user.
8. The utility model provides a device of network card firmware upgrading, its characterized in that is applied to the server, the server is connected with PCIE equipment, PCIE equipment includes external network card, PCIE equipment is provided with the signal and detects the position, the device includes:
the firmware writing module is used for acquiring firmware information aiming at an external network card and refreshing and writing the firmware information into the external network card;
the device power-off module is used for responding to a triggered PCIE device restarting event and controlling the PCIE device to be powered off;
the device power-on module is used for responding to a triggered PCIE device power-on event, generating a device loading signal aiming at the PCIE device, and sending the device loading signal to a signal detection position of the PCIE device so as to control the PCIE device to be powered on;
the firmware validation checking module is used for responding to a triggered firmware validation checking event and performing firmware validation checking on the external network card;
and the upgrading validation module is used for determining that the firmware upgrading of the external network card is successful when the firmware validation check passes.
9. An electronic device comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method of upgrading the firmware of the network card according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a method of upgrading a network card firmware according to any one of claims 1 to 7.
CN202211285856.9A 2022-10-20 2022-10-20 Method and device for upgrading network card firmware Pending CN115586913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211285856.9A CN115586913A (en) 2022-10-20 2022-10-20 Method and device for upgrading network card firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211285856.9A CN115586913A (en) 2022-10-20 2022-10-20 Method and device for upgrading network card firmware

Publications (1)

Publication Number Publication Date
CN115586913A true CN115586913A (en) 2023-01-10

Family

ID=84780893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211285856.9A Pending CN115586913A (en) 2022-10-20 2022-10-20 Method and device for upgrading network card firmware

Country Status (1)

Country Link
CN (1) CN115586913A (en)

Similar Documents

Publication Publication Date Title
CN106990958B (en) Expansion assembly, electronic equipment and starting method
US8874953B2 (en) System and method of cloud testing and remote monitoring for integrated circuit components in system validation
CN102385535B (en) Handling errors during device bootup from a non-volatile memory
EP3002677A1 (en) System and method for managing multiple bios default configurations
JP2016058071A (en) System and method for automatically setting bios performance profile
CN113590511B (en) Bandwidth deceleration repairing method and device and electronic equipment
US11314665B2 (en) Information processing system, information processing device, BIOS updating method for information processing device, and BIOS updating program for information processing device
CN109582332B (en) System upgrading method and device for Internet camera
CN112506745B (en) Memory temperature reading method and device and computer readable storage medium
US20160103688A1 (en) Method of Starting Computing System
CN111124509B (en) Server starting method and device
TWI515557B (en) Computer system and control method
EP2645239A1 (en) Electronic apparatus and booting method
CN110058973B (en) Test system and test method for data storage device
CN112084064B (en) Master-slave BIOS switching method, board card and equipment
CN112667442B (en) Control method, device and equipment based on nonvolatile memory device starting system
KR20070008908A (en) Data processing device and control method of the same
CN115586913A (en) Method and device for upgrading network card firmware
CN112912743B (en) Calculation force control method, device, equipment and storage medium
CN112784276B (en) Method and device for realizing trusted measurement
CN115168146A (en) Anomaly detection method and device
CN113961252A (en) PCIE board card loss prevention method and device and computer readable storage medium
TW202223655A (en) Computer system and method capable of self-monitoring and restoring an operation of operating system
CN111382009B (en) Automatic system maintenance method and computer equipment with automatic maintenance function
CN109684134B (en) Method and server for rapidly deploying firmware settings among multiple devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination