The present invention relates to a host device, storage device, and method for accessing a storage device that execute the initialization of the storage device and data transmission and reception with use of a command, wherein the storage device is connected to the host device by using a bus.
In devices (referred to as host devices below) that control digital data such as a digital camera, movie, and portable music player, there is a memory card, as a storage device for retaining digital information, mounting a non-volatile memory. In order to realize compatibility between memory cards and host devices manufactured by a plurality of manufacturers, a scheme for a host devise to access a memory card is standardized. A version of the standard is upgraded along with enlargement of capacity and addition of functions of a memory card. A method for making a host device to execute access by showing different storage capacities to each host device with use of multiple ways of capacity reference is proposed (for example, see Patent document 1).
However, the conventional technique described above has following problems. That is to say, there is such a problem that a host device of an old version may destroy data written by a host device of a new version because host devices which are in different version can access the same storage area. Also, there is such a problem that internal configuration and control of a memory card becomes complex since multiple areas are provided in a memory card and access control based on a host device is executed.
In view of the above mentioned problem, the present invention is designed to provide a host device, storage device, and method for accessing a storage device that can prevent data destruction by a host device of an old version with simple control in the host device and storage device.
To solve the problem, a host device of the present invention is a host device which is connected to a storage device via a bus and reads and writes data in the storage device comprising: a command transmission unit for transmitting a command including host function information to the storage device; a response reception unit for accepting a response from the storage device after transmission of a command from the command transmission unit; and an acceptable/unacceptable access determination unit for determining that access is acceptable when normal reception from the response reception unit is identified after transmission of each command from the command transmission unit and otherwise determining that access is unacceptable.
To solve the problem, a storage device of the present invention is a storage device which is connected to a host device via a bus and stores and reads data based on a commands from the host device comprising: a memory for retaining data given from the host device; a memory control unit for controlling data-reading and data-writing to the memory; a command reception unit for receiving a command issued from the host device and executing processing in accordance with each command; an access determination unit for accepting access when a function indicated by the host function information added to a command received by the command reception unit is supported; and a response transmission unit for returning a normal response when the access determination unit determines acceptance of access.
To solve the problem, a method for accessing a storage device of the present invention is a method for accessing a storage device by a host device which is connected to the storage device via a bus and reads and writes data in the storage device comprising: transmitting a command including host function information to the storage device; accepting a response from the storage device after transmission of a command; determining that access is possible when a response received after command transmission is determined as a normal response, and otherwise determining that access is impossible.
As described above, in the present invention, since a host device cannot access a storage device whose version of the standard is different from that of the host device, data destruction can be prevented. In addition, a host device and storage device can be realized in a simple configuration since it is possible to determine availability of access only in transmission and reception processing of a command. A host device, storage device, and method for accessing a storage device that prevent data destruction by a host device of an old version can be provided with simple control.
The storage device 2 includes an interface 201, control unit 202, memory control unit 203, and memory 204. The interface 201 receives a command and data from the host device 1 and transmits a response. In addition, the control unit 202 includes a command reception unit 202a, response transmission unit 202b, and access determination unit 202c. The command reception unit 202a receives a command issued from the host device and executes processing based on each command. The access determination unit 202c determines whether a function included in a command received by the command reception unit is supported or not, and when it is supported, processing to accept access is executed. The reception transmission unit 202b responds based on a determination result of the access determination unit 202c. The memory control unit 203 controls reading and writing of data from and to the memory 204 and the memory 204 retains data given from the host device. The storage device 2 determines access from the host device 1 as acceptable when the storage device supports a function included in a command transmitted from the host device 1.
Host function information showing a function provided by the host device 1 is added to a command to be transmitted. The host function information, for example, may be a version number of a standard that the host device 1 meets, and may be an unique bit pattern or flag showing that a predetermined function is provided. For instance, the host function information includes a kind of a file system such as FAT16, FAT32, or UDF, or an addressing mode, and further includes, as an additional function, existence or nonexistence of a cache function, existence or nonexistence of an interruption function, or supporting or non-supporting a high-speed interface.
When receiving a command from the host device 1, the storage device 2 determines whether the storage device can execute the function shown in the host function information included in the command.
In the embodiment described above, a normal response is returned only when all of the shown functions are supported, but, even when only some of the functions are supported, the storage device may return a normal response and may add storage device information showing a function that is provided by the storage device to a response. The storage device information, for example, may be a version number of a standard that the storage device 2 meets, or may be an unique bit pattern or flag showing that a predetermined function is provided.
a) is a view showing another example of a command issued by the host device 1 and
In addition, as shown in
When the formats shown in
According to the present invention, a storage device determines a function included in a transmission command of a host device, and determines access of the host device as acceptable only when the storage device supports the function, and thereby access control can be executed by a simple configuration and under simple control and it is useful for the host device, storage device, and method for accessing a storage device that execute initialization of the storage device and data transmission and reception by using a command.
Number | Date | Country | Kind |
---|---|---|---|
2004-201509 | Jul 2004 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2005/011800 | 6/28/2005 | WO | 00 | 3/20/2007 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2006/006388 | 1/19/2006 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5408082 | Takagi et al. | Apr 1995 | A |
5678029 | Iijima | Oct 1997 | A |
6279114 | Toombs et al. | Aug 2001 | B1 |
6574294 | Lynch et al. | Jun 2003 | B1 |
6609167 | Bastiani et al. | Aug 2003 | B1 |
7159075 | Moro | Jan 2007 | B2 |
20010032277 | Igarashi et al. | Oct 2001 | A1 |
20020191612 | Curtis | Dec 2002 | A1 |
20030090953 | Kawai et al. | May 2003 | A1 |
20040107316 | Moro | Jun 2004 | A1 |
20040136533 | Takagaki et al. | Jul 2004 | A1 |
20050021885 | Anderson et al. | Jan 2005 | A1 |
20050053091 | Lee | Mar 2005 | A1 |
20060097061 | Moro | May 2006 | A1 |
Number | Date | Country |
---|---|---|
2-28741 | Jan 1990 | JP |
6-60235 | Mar 1994 | JP |
2001-249802 | Sep 2001 | JP |
2003-223623 | Aug 2003 | JP |
2004-086505 | Mar 2004 | JP |
Number | Date | Country | |
---|---|---|---|
20080046606 A1 | Feb 2008 | US |