Patent ID: 7490232

Claim:
A disk device comprising: a nonvolatile memory storing first firmware for performing basic control of said disk device, said first firmware stored in said nonvolatile memory including a first hardware code that represents an attribute of hardware of said disk device, and second firmware stored on a disk including a second hardware code that represents an attribute of target hardware, said first hardware code including a first attribute code that substantially represents the attribute of the hardware of said disk device, and said second hardware code including a second attribute code that substantially represents the attribute of said target hardware and that is different in code length from said first attribute code, and at least one of said first hardware code and said second hardware code further including a reserve code adjusting the code length of the attribute code of said at least one of said first hardware code and said second hardware code so as to match the code length of said first hardware code with the code length of said second hardware code; and a control unit responding to a command to rewrite said first firmware to compare said first hardware code with said second hardware code while ignoring a code corresponding to said reserve code and, when said first and second hardware codes match each other, determining that said second firmware is compatible firmware to start a a rewrite operation and, when said first and second hardware codes mismatch, determining that said second firmware is incompatible firmware to cancel a rewrite operation.