BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is related to access of flash memory, more particularly, to a method and apparatus for performing communications corresponding to a second communications protocol on a storage device conforming to a first communications protocol.

2. Description of the Prior Art

Developments in memory technology have enabled the wide application of portable or non-portable memory devices (e.g. a memory card conforming to SD/MMC, CF, MS, XD or UFS specification, a solid state drive, an embedded storage device conforming to UFS or EMMC specification). Therefore, improving access control of memories in these memory devices remains an issue to be solved in the art.

NAND flash memories may comprise single level cell (SLC) and multiple level cell (MLC) flash memories. In an SLC flash memory, each transistor used as a memory cell may have either of two electrical charge values, which may represent logic values 0 and 1, respectively. In addition, the storage ability of each transistor used as a memory cell in an MLC flash memory may be fully utilized. The transistor in the MLC flash memory is driven by a voltage higher than that in the SLC flash memory, and different voltage levels can be utilized to record information of at least two bits (e.g. 00, 01, 11, or 10). In theory, the recording density of the MLC flash memory may reach at least twice the recording density of the SLC flash memory, and is therefore preferred by manufacturers of NAND flash memories.

The lower cost and larger capacity of the MLC flash memory means it is more likely to be applied in memory devices than an SLC flash memory. The MLC flash memory does have instability issues, however. To ensure that access control of the flash memory in the memory devices meets required specifications, a controller of the flash memory is configured to apply management mechanisms for properly managing data access.

According to related art, the memory devices with the above management mechanism still have certain deficiencies. For example, although internal architecture of the memory devices may have excellent communication ability, some host devices utilize old type interfaces, which may become a bottleneck. Thus, there is a need for a novel method and associated architecture to improve overall performance without introducing side effects or in a way that is less likely to introduce side effects.

SUMMARY OF THE INVENTION

An objective of the present invention is to provide a method for controlling a storage device, to solve the aforementioned problems.

Another objective of the present invention is to provide a method for controlling a storage device, to achieve optimal performance of the memory devices without introducing side effects or in a way that is less likely to introduce side effects.

At least one embodiment of the present invention provides a method for controlling a storage device. The method comprises: transmitting an initial command conforming to a first communications protocol and a data payload comprising a command parameter to the storage device, wherein the command parameter conforms to a second communications protocol; transmitting a setting command conforming to the first communications protocol to the storage device; and generating an operation command conforming to the second communications protocol according to the initial command, the setting command and the data payload comprising the command parameter. More particularly, the initial command and the setting command are different commands.

One of advantages of the present invention is that the method and associated apparatus of the present invention can perform properly controlling, to achieve optimal performance of storage devices. For example, the first communication protocol may comprise a small computer system interface (SCSI) protocol, and the second communications protocol may comprise a non-volatile memory express (NVMe) protocol. According to associated technologies, any definition related to NVMe commands cannot be seen in the SCSI protocol, currently. The method and associated apparatus of the present invention can perform a novel workflow, such as that with one or a combination of a write buffer command and a read buffer command, through standard commands within current SCSI protocol, more particularly, can implement command transmitting and information receiving of the NVMe protocol.

These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.

