A firmware upgrade method, applied in Management Data Input/Output, MDIO, Multi Source Agreement, MSA, an optical module configured with a firmware upgrade type identification register, and the firmware upgrade type identification register saving type identifications of firmwares whose upgrade is supported by the optical module, wherein the method comprises: writing a type identification of a to-be-upgraded firmware into a firmware upgrade type identification register corresponding to the optical module, characterized in that, a type of the to-be-upgraded firmware represented by the type identification comprises: a Micro Control Unit, MCU, software image type, a Field Programmable Gate Array, FPGA, logic image type and a digital signal processer, DSP, chip image type; and judging whether the optical module supports the type of the to-be-upgraded firmware by reading a firmware upgrade state register of the optical module; when determining that the optical module supports the type of the to-be-upgraded firmware, executing a corresponding type of firmware upgrade processing on the optical module; the judging whether the optical module supports the type of the to-be-upgraded firmware by reading the firmware upgrade state register of the optical module comprises: reading an upgrade command execution state bit in the firmware upgrade state register of the optical module, if the read bit indicates that a command is executed successfully, determining that the optical module supports the upgrade of a firmware whose type corresponds to a written firmware type identification; if the execution of the command fails, reading an upgrade command execution failure reason register in the firmware upgrade state register of the optical module, if the reason register indicates that the type of the firmware is not supported, determining that the optical module does not support the upgrade of the firmware whose type corresponds to the written firmware type identification (S201, 202, 203). writing a type identification of a to-be-upgraded firmware into a firmware upgrade type identification register corresponding to the optical module, characterized in that, a type of the to-be-upgraded firmware represented by the type identification comprises: a Micro Control Unit, MCU, software image type, a Field Programmable Gate Array, FPGA, logic image type and a digital signal processer, DSP, chip image type; and judging whether the optical module supports the type of the to-be-upgraded firmware by reading a firmware upgrade state register of the optical module; when determining that the optical module supports the type of the to-be-upgraded firmware, executing a corresponding type of firmware upgrade processing on the optical module; the judging whether the optical module supports the type of the to-be-upgraded firmware by reading the firmware upgrade state register of the optical module comprises: reading an upgrade command execution state bit in the firmware upgrade state register of the optical module, if the read bit indicates that a command is executed successfully, determining that the optical module supports the upgrade of a firmware whose type corresponds to a written firmware type identification; if the execution of the command fails, reading an upgrade command execution failure reason register in the firmware upgrade state register of the optical module, if the reason register indicates that the type of the firmware is not supported, determining that the optical module does not support the upgrade of the firmware whose type corresponds to the written firmware type identification (S201, 202, 203).