A method of performing an automatic firmware upgrade on a device is provided. The method includes providing a combo file comprising a plurality of firmware files for a plurality of data storage device product categories. The method also includes downloading the combo file to a data storage device that belongs to one of the plurality of data storage device product categories. The method further includes comparing parameters of the data storage device with parameters of individual firmware files of the plurality of firmware files. When parameters of a particular one of the plurality of firmware files are found to correspond with the parameters of the data storage device, the method includes utilizing the particular one of the plurality of firmware files to perform an automatic firmware upgrade in the data storage device.
In another embodiment, a method is provided. The method includes generating a plurality of firmware files for upgrading a plurality of devices wherein each firmware file of the plurality of firmware files includes a header and a firmware code portion. The method also includes combining the plurality of firmware files into a combo file. The method further includes providing a combo file header for the combo file, wherein the combo file header includes parameters of the combo file to enable one of the plurality of devices to select one of the plurality of firmware files for compatibility.
In yet another embodiment, a computer-readable storage medium having encoded therein computer-executable instructions for programming a computing device is provided. The computer-executable instructions include a combo file comprising a plurality of firmware files for updating a plurality of devices. The computer-executable instructions also include a firmware file header for each of the plurality of firmware files. The computer-executable instructions further include a combo file header for the combo file, wherein the combo file header includes parameters of the combo file to enable one of the plurality of devices to select one of the plurality of firmware files for compatibility to perform an automatic firmware upgrade in the data storage device.
This summary is not intended to describe each disclosed embodiment or every implementation of the combined file firmware upgrade technique. Many other novel advantages, features, and relationships will become apparent as this description proceeds. Other features and benefits that characterize embodiments of the disclosure will be apparent upon reading the following detailed description and review of the associated drawings.
Although the present disclosure has been described with reference to embodiments, workers skilled in the art will recognize that changes may be made in form and detail without departing from the scope of the disclosure. The present disclosure generally describes a method for automatically matching firmware to a product during a field upgrade.
In order to enable utilization for different customer applications, a wide variety of data storage device products may be offered under a product family tree. The variety of data storage device products that enable the utilization for different applications may use different firmware. Further, each product may include different variants, such as single disk or dual disk variant when the data storage device is a hard disk drive. Firmware code released for field upgrade may include a plurality of firmware files. Each of the plurality of firmware files may be compatible with a particular data storage device product or product category, but not compatible with all data storage device product categories. Thus, firmware upgrades, which may be carried out by field engineers, involve matching various firmware codes to specific data storage device configurations to avoid data storage device malfunction through firmware mismatch. Manually matching firmware to a specific data storage device configuration is time consuming and may result in errors. To address these problems, embodiments of the disclosure provide a combined file firmware upgrade technique.
It should be noted that the same reference numerals are used in different figures for same or similar elements. It should also be understood that the terminology used herein is for the purpose of describing embodiments, and the terminology is not intended to be limiting. Unless indicated otherwise, ordinal numbers (e.g., first, second, third, etc.) are used to distinguish or identify different elements or steps in a group of elements or steps, and do not supply a serial or numerical limitation on the elements or steps of the embodiments thereof. For example, “first,” “second,” and “third” elements or steps need not necessarily appear in that order, and the embodiments thereof need not necessarily be limited to three elements or steps. It should also be understood that, unless indicated otherwise, any labels such as “left,” “right,” “front,” “back,” “top,” “bottom,” “forward,” “reverse,” “clockwise,” “counter clockwise,” “up,” “down,” or other similar terms such as “upper,” “lower,” “aft,” “fore,” “vertical,” “horizontal,” “proximal,” “distal,” “intermediate” and the like are used for convenience and are not intended to imply, for example, any particular fixed location, orientation, or direction. Instead, such labels are used to reflect, for example, relative location, orientation, or directions. It should also be understood that the singular forms of “a,” “an,” and “the” include plural references unless the context clearly dictates otherwise.
The storage controller 106 may utilize communication interfaces and protocols including SATA (serial advanced technology attachment), SCSI (small computer system interface), eSATA (external serial advanced technology attachment), SAS (serial attached SCSI), USB (universal serial bus), and others to communicate with the host 104 via the host interface 122.
As can be seen in
In one embodiment, module 110 may include multiple sub-modules. The sub-modules may include a parameter matching module 112 and an updating module 116. The host 104 may contain a plurality of different firmware files including a firmware file for a data storage device 102 upgrade. In an implementation, the plurality of firmware files from host 104 may be sent to sub-modules of module 110 to update the firmware of data storage device 102. The parameter matching module 112 may be used to validate at least one of the firmware from from host 104 by matching parameters of data storage device 102 to a corresponding firmware file of the plurality of files from host 104. Updating module 116 may then perform the update of the data storage device 102 with the validated firmware file from host 104.
Typically, when device 102 is to be upgraded, a file is selected (such as by a field engineer) and then downloaded to an internal buffer of the device 102 (e.g., a buffer allocated in memory 124 or memory 127 of
Combo file 220 includes three firmware files 210A, 210B, and 210C each with a file length 213A, 213B, and 213C respectively, where combo file length 225 is equal to the sum of file lengths (e.g., 213A+213B+213C). In
Not every header 217 may be read if a segment ends at the end of a firmware file 210. As can be seen during this download, the total host data X is equal to three segments (e.g., 401B+402B+403B) and the total expected file size Y is equal to the sum of firmware file lengths for firmware files 210A and 210B (e.g., firmware file lengths 213A and 213B). Here, both segment 403B and footer 218B end at the same point. Thus, the download firmware (e.g., firmware of storage controller 106) detects that X is equal to Y and deduces incorrectly that segment 403B is the last segment of the host data (e.g., combo file 220). The total expected file size Y is incorrect because firmware file header 217C has not been read and the firmware file length 213C is unknown. The download command will be terminated and subsequent download commands, e.g., segment 404B and segment 405B, will be aborted due to the combo file size 225 being determined incorrectly. Thus, firmware file 210C will not be downloaded and the automatic firmware upgrade may fail.
For example, when upgrading device 102, the combo file 550 is downloaded to dummy buffer 337 in the internal buffer 335, and the total combo file length 555 is obtained from the combo file header 551. Next, the firmware may process each header 217 to determine the individual firmware file length 213 and device parameters that each of the plurality of firmware files 210 correspond to. The parameters of the device 102 are matched against the plurality of firmware file 210 device parameters, and one firmware file 210 is validated, or selected, based on the matched parameters. Finally, the validated firmware file 210 is transferred to the dedicated buffer 340 for updating.
Combo file 550 may be used in either download mode 307 or download mode 313. In download mode 307, the combo file 550 may include a plurality of firmware files 210 which may then be sent to device 102 in a single download command. Although the number firmware files that may be sent to device 102 depends in part on the size of the buffer allocated for download (e.g., memory 127 or dummy buffer 337), the number of firmware files 210 that may be combined into combo file 550 need not be so limited, and a plurality of firmware files 210 for a plurality of devices 102 or products may be combined into a combo file 550 for a field upgrade. In another embodiment, the combo file length 555, e.g., the number of firmware files 210 combined into combo file 550, need not be so limited as with download mode 313. As only a portion of buffer 335 is used when a plurality of segments 343 are sent in multiple download commands, there is no combo file length limitation, and combo file 550 may contain any number of firmware files 210 when using download mode 313.
The methods and software described herein include many advantages. First, the methods provide a seamless field firmware upgrade for both customers and field engineers. For example, a combo file as described herein may be provided to a customer who has multiple types of devices and configurations, such that upgrade code for all product configurations are provided in a single file for automatic device upgrade. Although embodiments as described herein discusse firmware for upgrading data storage devices, the embodiments need not be so limited, and a variety of computer-executable instructions may be applied to a variety of products according to the embodiments disclosed herein. The methods can be applied across different firmware configurations and may be expanded across different products. The methods may also be applied across different system-on-chip devices.
Another advantage includes that a combo file, such as combo file 550, will maintain integrity during download such that the firmware's integrity will not be affected during download. A download using the embodiments discussed is also transparent to security designs and the signing process of individual firmware will not be affected. Further, download time may not be significantly affected by the methods discussed herein, as data transfer may be accomplished through a native interface. The embodiments as described may also save extensive firmware code space by splitting up different firmware features under different firmware configurations. Further, the embodiments may also be applied to reduce firmware footprint and thereby further reduce firmware memory costs.
In accordance with various embodiments, the methods described herein may be implemented as one or more software programs running on one or more computer processors or controllers such as those included in device 102. Dedicated hardware implementations, including but not limited to, application specific integrated circuits, programmable logic arrays, and other hardware devices can likewise be constructed to implement the methods described herein.
The illustrations of the embodiments described herein are intended to provide a general understanding of the method of the various embodiments. The illustrations are not intended to serve as a complete description of all of the elements and features of methods and systems described herein. Many other embodiments may be apparent to those of skill in the art upon reviewing the disclosure. Other embodiments may be utilized and derived from the disclosure, such that structural and logical substitutions and changes may be made without departing from the scope of the disclosure. Accordingly, the disclosure and the figures are to be regarded as illustrative rather than restrictive.
Although specific embodiments have been illustrated and described herein, it should be appreciated that any subsequent arrangement designed to achieve the same or similar purpose may be substituted for the specific embodiments shown. This disclosure is intended to cover any and all subsequent adaptations or variations of various embodiments. Combinations of the above embodiments, and other embodiments not specifically described herein, will be apparent to those of skill in the art upon reviewing the description.
In addition, in the foregoing Detailed Description, various features may be grouped together or described in a single embodiment for the purpose of streamlining the disclosure. This disclosure is not to be interpreted as reflecting an intention that the claimed embodiments employ more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter may be directed to less than all of the features of any of the disclosed embodiments.
The above-disclosed subject matter is to be considered illustrative, and not restrictive, and the appended claims are intended to cover all such modifications, enhancements, and other embodiments, which fall within the true spirit and scope of the present disclosure. Thus, to the maximum extent allowed by law, the scope of the present disclosure is to be determined by the broadest permissible interpretation of the following claims and their equivalents and shall not be restricted or limited by the foregoing detailed description.