[go: up one dir, main page]

JP2012073663A - Usb host device and program - Google Patents

Usb host device and program Download PDF

Info

Publication number
JP2012073663A
JP2012073663A JP2010215862A JP2010215862A JP2012073663A JP 2012073663 A JP2012073663 A JP 2012073663A JP 2010215862 A JP2010215862 A JP 2010215862A JP 2010215862 A JP2010215862 A JP 2010215862A JP 2012073663 A JP2012073663 A JP 2012073663A
Authority
JP
Japan
Prior art keywords
usb
data
scsi command
scsi
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010215862A
Other languages
Japanese (ja)
Inventor
Fumitoshi Uno
文敏 宇野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2010215862A priority Critical patent/JP2012073663A/en
Publication of JP2012073663A publication Critical patent/JP2012073663A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

【課題】USBストレージデバイスとの間で複数回にわたるデータ伝送を繰り返しても、USBホスト装置の処理能力がUSBストレージデバイスに対する処理ばかりに専有されてしまうのを回避可能なUSBホスト装置の提供。
【解決手段】USBホスト装置は、先頭セクタをT、リード/ライトセクタ数をnとして(S501)、セクタTからmセクタのリード/ライトを行うためのSCSIコマンドを発行する(S507)。そして、T+mを新たにTとし、n−mを新たにnとし(S509)、リード/ライト可能な最大セクタ数mの値に比例する長さの待機時間だけWAITする(S511)。これにより、S507でのデータ転送量に応じた長さの待機時間だけ、S511では待機状態となり、その間にCPU11は他の処理を実行することができる。
【選択図】図6
Provided is a USB host device capable of avoiding that the processing capability of the USB host device is exclusively used only for processing the USB storage device even if data transmission to and from the USB storage device is repeated a plurality of times.
A USB host device issues a SCSI command to read / write m sectors from sector T, where T is the first sector and n is the number of read / write sectors (S501). Then, T + m is newly set as T, nm is newly set as n (S509), and WAIT is performed for a waiting time having a length proportional to the value of the maximum number of sectors m that can be read / written (S511). As a result, only the standby time corresponding to the data transfer amount in S507 is in the standby state in S511, during which the CPU 11 can execute other processes.
[Selection] Figure 6

Description

本発明は、USB(Universal Serial Bus)規格に準拠した方式で、USBストレージデバイスとの通信を行うUSBホスト装置と、USBホスト装置が備えるコンピュータをUSBストレージドライバとして機能させるためのプログラムに関する。   The present invention relates to a USB host device that communicates with a USB storage device by a method compliant with the USB (Universal Serial Bus) standard, and a program for causing a computer included in the USB host device to function as a USB storage driver.

USBホスト装置は、USBストレージデバイスをSCSI(Small Computer System Interface)デバイスとして認識し、USBストレージデバイスへのアクセスを行う際には、USBホスト装置内においてSCSIコマンドが発行される。そして、そのSCSIコマンドがUSBストレージドライバ(USBマスストレージクラスドライバ)に渡される(例えば、特許文献1:段落[0027]参照。)。   The USB host device recognizes the USB storage device as a SCSI (Small Computer System Interface) device, and when accessing the USB storage device, a SCSI command is issued in the USB host device. Then, the SCSI command is passed to a USB storage driver (USB mass storage class driver) (see, for example, Patent Document 1: Paragraph [0027]).

USBストレージドライバは、渡されたSCSIコマンドに対しUSB用のヘッダを付加してから、そのSCSIコマンドをUSBプロトコルスタックに渡し、SCSIコマンドはUSBプロトコルスタック経由でUSBストレージデバイスへと伝送される。   The USB storage driver adds a USB header to the passed SCSI command, and then passes the SCSI command to the USB protocol stack, which is transmitted to the USB storage device via the USB protocol stack.

特開2004−171536号公報JP 2004-171536 A

ところで、USBストレージデバイスに対するデータのリード又はライトが複数回にわたって繰り返される場合、USBストレージドライバからは、USBストレージデバイスに対し複数回分のSCSIコマンドが伝送される。   By the way, when data reading or writing with respect to a USB storage device is repeated a plurality of times, a SCSI command for a plurality of times is transmitted from the USB storage driver to the USB storage device.

その際、データリードであれば、USBホスト装置側からUSBストレージデバイス側へ複数回にわたってリード対象となったデータが伝送される。また、データライトであれば、USBストレージデバイス側からUSBホスト装置側へ複数回にわたってライト対象となったデータが伝送される。   At this time, if it is a data read, the data to be read is transmitted from the USB host device side to the USB storage device side a plurality of times. In the case of data write, data to be written is transmitted from the USB storage device side to the USB host device side multiple times.

しかし、USBホスト装置側のデータ処理能力に十分な余力がない場合、上記のような複数回にわたるデータ伝送を繰り返していると、USBホスト装置側のデータ処理能力の大半が、USBストレージデバイスとの間のデータ伝送に割かれる状況となる。   However, if the data processing capability on the USB host device side is not sufficient, if the data transmission is repeated multiple times as described above, most of the data processing capability on the USB host device side is It becomes a situation that is devoted to data transmission between.

そのため、そのような状況に陥った際、USBホスト装置において、他のUSBデバイスとの通信やUSBデバイスとの通信以外の処理などが並行して実行されていると、それらの処理が適切に実行されず、処理の遅延やデータの消失を招くことがあった。   Therefore, when such a situation occurs, if processing other than communication with another USB device or communication with the USB device is executed in parallel in the USB host device, those processing are executed appropriately. In other words, processing delays and data loss may occur.

本発明は、上記問題を解決するためになされたものであり、その目的は、USBストレージデバイスとの間で複数回にわたるデータ伝送を繰り返しても、USBホスト装置の処理能力がUSBストレージデバイスに対する処理ばかりに専有されてしまうのを回避可能なUSBホスト装置と、そのようなUSBホスト装置が備えるコンピュータをUSBストレージドライバとして機能させるためのプログラムを提供することにある。   The present invention has been made to solve the above-described problem, and the object of the present invention is to process the USB host device with the processing capability of the USB storage device even when data transmission is repeated multiple times with the USB storage device. Another object is to provide a USB host device that can avoid being exclusively used, and a program for causing a computer included in such a USB host device to function as a USB storage driver.

以下、本発明において採用した構成について説明する。
請求項1に記載のUSBホスト装置は、USBデバイスと通信可能で、USBストレージデバイスに対するリード又はライトを行う際には、SCSIドライバ、USBストレージドライバ、及びUSBホストコントローラが協働して前記USBストレージデバイスに対する制御を行うUSBホスト装置であって、前記USBストレージドライバは、前記USBストレージデバイスに対し、複数回にわたってSCSIコマンドを発行して、各SCSIコマンドに対応するリード又はライトを行う際に、先に発行されたSCSIコマンドに対応するリード又はライトが完了した後、次のSCSIコマンドを発行する前に、前記先に発行されたSCSIコマンド内のパラメータで指定されたデータのサイズに応じて待機時間を決定するとともに、当該待機時間分のウェイト制御を実行するウェイト制御手段を備えることを特徴とする。
Hereinafter, the configuration employed in the present invention will be described.
The USB host device according to claim 1 is communicable with a USB device, and when reading or writing to a USB storage device, a SCSI driver, a USB storage driver, and a USB host controller cooperate to form the USB storage device. A USB host device that controls a device, wherein the USB storage driver issues a SCSI command to the USB storage device a plurality of times, and performs a read or write corresponding to each SCSI command. After the completion of the read or write corresponding to the SCSI command issued at the time, and before issuing the next SCSI command, the waiting time according to the data size specified by the parameter in the SCSI command issued earlier. And determine Characterized in that it comprises a weight control means for executing a wait time of the wait control.

このように構成されたUSBホスト装置によれば、先に発行されたSCSIコマンドによってリード又はライトが行われたデータのサイズに応じて待機時間が決定されて、その待機時間分のウェイト制御が実行される。   According to the USB host device configured as described above, the standby time is determined according to the size of data read or written by the previously issued SCSI command, and wait control for the standby time is executed. Is done.

そのため、リード又はライト対象となったデータサイズが大きい場合には、USBストレージドライバが、USBホスト装置の処理能力を相応に専有することになるものの、その場合には、相応に長時間のウェイト制御が実行される。したがって、ウェイト制御が実行されている間には、USBホスト装置の処理能力を、他の処理に割り当てることができる。   For this reason, when the data size to be read or written is large, the USB storage driver will occupy the processing capability of the USB host device accordingly, but in that case, the wait control is correspondingly long. Is executed. Therefore, while the wait control is being executed, the processing capability of the USB host device can be assigned to another process.

一方、リード又はライト対象となったデータサイズが小さい場合には、相応に短時間のウェイト制御しか実行されない。したがって、USBストレージドライバが、USBホスト装置の処理能力をそれほど専有していないにもかかわらず、USBストレージドライバの実行する処理が遅延させられることはない。   On the other hand, when the data size to be read or written is small, only a short time wait control is executed. Therefore, although the USB storage driver does not occupy the processing capability of the USB host device so much, the processing executed by the USB storage driver is not delayed.

よって、以上のような制御を行えば、USBホスト装置の処理能力が、過剰にUSBストレージドライバに専有されてしまうこと、及びUSBストレージドライバの実行する処理が過剰に遅延させられてしまうこと、双方を両立させて未然に防止することができる。   Therefore, if the above control is performed, the processing capability of the USB host device is excessively dedicated to the USB storage driver, and the processing executed by the USB storage driver is excessively delayed. Can be prevented in advance.

請求項2に記載のUSBホスト装置は、請求項1に記載のUSBホスト装置において、前記USBストレージドライバは、前記USBストレージデバイスから読取対象データを読み取る際に前記SCSIドライバから発行されるSCSIコマンドを取得するSCSIコマンド取得手段と、前記SCSIコマンド取得手段によって取得された前記SCSIコマンド内のパラメータで指定された読取対象データのサイズが、前記USBホストコントローラが備えるデータバッファに格納可能なサイズよりも大きい場合に、前記読取対象データをいくつかのデータに分割することで、分割後の各データのサイズを前記データバッファに格納可能なサイズとした上で、前記分割後の各データを前記USBストレージデバイスから読み取るため、前記分割後の各データそれぞれを読取対象として指定するパラメータが設定されたいくつかのSCSIコマンドを生成するSCSIコマンド生成手段と、前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行するSCSIコマンド発行手段と、前記SCSIコマンド発行手段によって前記いくつかのSCSIコマンドそれぞれを発行するごとに、各SCSIコマンドに対する応答として前記USBストレージデバイスから転送されて前記データバッファに格納されるデータを、前記データバッファから順次取得するデータ取得手段と、前記データ取得手段によって順次取得される前記分割後の各データをすべて取得したら、それら分割後の各データを一括して、前記SCSIコマンド取得手段によって取得された前記SCSIコマンドに対する応答として前記SCSIドライバへと転送するデータ転送手段とを備え、前記ウェイト制御手段は、前記SCSIコマンド発行手段により、前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行する際に、前記ウェイト制御を実行することを特徴とする。   The USB host device according to claim 2 is the USB host device according to claim 1, wherein the USB storage driver issues a SCSI command issued from the SCSI driver when reading data to be read from the USB storage device. The size of the data to be read specified by the SCSI command acquisition means to be acquired and the parameter in the SCSI command acquired by the SCSI command acquisition means is larger than the size that can be stored in the data buffer of the USB host controller In this case, the data to be read is divided into several pieces of data so that the size of each piece of divided data can be stored in the data buffer, and each piece of the divided data is stored in the USB storage device. To read from SCSI command generation means for generating several SCSI commands in which parameters for specifying each subsequent data as a reading target are set, and each of the several SCSI commands generated by the SCSI command generation means, SCSI command issuing means for sequentially issuing to the storage device, and each time the several SCSI commands are issued by the SCSI command issuing means, the data buffer is transferred from the USB storage device as a response to each SCSI command. Data acquisition means for sequentially acquiring the data stored in the data buffer, and when all the divided data sequentially acquired by the data acquisition means are acquired, the divided data are collectively Data transfer means for transferring to the SCSI driver as a response to the SCSI command acquired by the SCSI command acquisition means, the wait control means by the SCSI command generation means by the SCSI command generation means. The wait control is executed when each of the generated SCSI commands is sequentially issued to the USB storage device.

このように構成されたUSBホスト装置によれば、USBストレージデバイスに対し大量のデータリードを要求するSCSIリードコマンドがUSBホスト装置内において発行されたとしても、USBストレージドライバからUSBストレージデバイスに対しては、大量のデータリードを要求するSCSIリードコマンドが発行されなくなる。したがって、安全に利用可能なデータバッファの容量を上回るデータがUSBストレージデバイスから転送されてくるのを、未然に防ぐことができる。   According to the USB host device configured as described above, even if a SCSI read command for requesting a large amount of data read to the USB storage device is issued in the USB host device, the USB storage driver sends the USB storage device to the USB storage device. Does not issue a SCSI read command requesting a large amount of data read. Therefore, it is possible to prevent data exceeding the capacity of the data buffer that can be safely used from being transferred from the USB storage device.

また、分割された各SCSIコマンドを発行するタイミングについては、USBホスト装置側の処理能力に応じた都合のよいタイミングとすることができる。したがって、USBホスト装置側のデータ処理能力に十分な余力がない場合でも、USBストレージデバイスから転送されてくるデータを適切に受信することができる。   Further, the timing of issuing each divided SCSI command can be set to a convenient timing according to the processing capability on the USB host device side. Therefore, even when there is not enough remaining data processing capability on the USB host device side, data transferred from the USB storage device can be properly received.

しかも、いくつかのSCSIコマンドそれぞれを、USBストレージデバイスに対して順次発行する際には、上述のウェイト制御を実行する。したがって、USBホスト装置側のデータ処理能力に十分な余力がない場合でも、その処理能力がUSBストレージデバイスに対する処理ばかりに専有されてしまうのを、未然に防ぐことができる。   Moreover, the above-described wait control is executed when each of the SCSI commands is sequentially issued to the USB storage device. Therefore, even when the data processing capability on the USB host device side does not have sufficient capacity, it is possible to prevent the processing capability from being exclusively used for processing the USB storage device.

請求項3に記載のUSBホスト装置は、請求項1に記載のUSBホスト装置において、前記USBストレージドライバは、前記USBストレージデバイスへ書込対象データを書き込む際に前記SCSIドライバから発行されるSCSIコマンドを取得するSCSIコマンド取得手段と、前記SCSIコマンド取得手段によって取得された前記SCSIコマンド内のパラメータで指定された書込対象データのサイズが、前記USBホストコントローラが備えるデータバッファに格納可能なサイズよりも大きい場合に、前記書込対象データをいくつかのデータに分割することで、分割後の各データのサイズを前記データバッファに格納可能なサイズとした上で、前記分割後の各データを前記USBストレージデバイスへ書き込むため、前記分割後の各データそれぞれを書込対象として指定するパラメータが設定されたいくつかのSCSIコマンドを生成するSCSIコマンド生成手段と、前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行するSCSIコマンド発行手段と、前記SCSIコマンド発行手段によって前記いくつかのSCSIコマンドそれぞれを発行するごとに、前記USBストレージデバイスから返される応答を、順次取得する応答取得手段と、前記応答取得手段によって順次取得される前記応答をすべて取得したら、前記SCSIコマンド取得手段によって取得された前記SCSIコマンドに対する応答を返す応答発行手段とを備え、前記ウェイト制御手段は、前記SCSIコマンド発行手段により、前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行する際に、前記ウェイト制御を実行することを特徴とする。   The USB host device according to claim 3 is the USB host device according to claim 1, wherein the USB storage driver issues a SCSI command issued from the SCSI driver when writing write target data to the USB storage device. The size of the write target data specified by the parameter in the SCSI command acquired by the SCSI command acquisition unit acquired by the SCSI command acquisition unit is larger than the size that can be stored in the data buffer included in the USB host controller. If the data to be written is divided into several pieces of data, the size of each divided data is set to a size that can be stored in the data buffer. After writing to write to USB storage device SCSI command generation means for generating a number of SCSI commands in which parameters for designating each data as a writing target are set, and each of the number of SCSI commands generated by the SCSI command generation means for the USB storage A SCSI command issuing means for issuing sequentially to the device, and a response acquisition means for sequentially acquiring responses returned from the USB storage device each time the SCSI command issuing means issues each of the SCSI commands. Response acquisition means for returning a response to the SCSI command acquired by the SCSI command acquisition means when all the responses sequentially acquired by the response acquisition means are acquired, the wait control means comprising the SCS The command issuing unit, each said SCSI command said several SCSI command generated by the generating means, when successively issued to the USB storage device, and executes the weight control.

このように構成されたUSBホスト装置によれば、USBストレージデバイスに対し大量のデータライトを要求するSCSIライトコマンドがUSBホスト装置内において発行されたとしても、USBストレージドライバからUSBストレージデバイスに対しては、大量のデータライトを要求するSCSIライトコマンドが発行されなくなる。したがって、安全に利用可能なデータバッファの容量を上回るデータをUSBストレージデバイスへ転送してしまうのを、未然に防ぐことができる。   According to the USB host device configured as described above, even if a SCSI write command for requesting a large amount of data write to the USB storage device is issued in the USB host device, the USB storage driver sends the USB storage device to the USB storage device. Does not issue a SCSI write command requesting a large amount of data write. Therefore, it is possible to prevent data exceeding the capacity of the data buffer that can be safely used from being transferred to the USB storage device.

また、分割された各SCSIコマンドを発行するタイミングについては、USBホスト装置側の処理能力に応じた都合のよいタイミングとすることができる。したがって、USBホスト装置側のデータ処理能力に十分な余力がない場合でも、USBストレージデバイスへ転送するデータを適切に送信することができる。   Further, the timing of issuing each divided SCSI command can be set to a convenient timing according to the processing capability on the USB host device side. Therefore, even when there is not enough remaining data processing capability on the USB host device side, the data to be transferred to the USB storage device can be appropriately transmitted.

しかも、いくつかのSCSIコマンドそれぞれを、USBストレージデバイスに対して順次発行する際には、上述のウェイト制御を実行する。したがって、USBホスト装置側のデータ処理能力に十分な余力がない場合でも、その処理能力がUSBストレージデバイスに対する処理ばかりに専有されてしまうのを、未然に防ぐことができる。   Moreover, the above-described wait control is executed when each of the SCSI commands is sequentially issued to the USB storage device. Therefore, even when the data processing capability on the USB host device side does not have sufficient capacity, it is possible to prevent the processing capability from being exclusively used for processing the USB storage device.

請求項4に記載のUSBホスト装置は、請求項2又は請求項3に記載のUSBホスト装置において、前記データバッファに格納可能なデータのサイズに関する情報を、複数の異なる前記USBホストコントローラそれぞれに対応づけて記憶するUSBホストコントローラ情報記憶手段を備え、前記SCSIコマンド生成手段は、前記USBホストコントローラ情報記憶手段に記憶された情報に基づいて、前記データバッファに格納可能なデータのサイズを決定することを特徴とする。   4. The USB host device according to claim 4, wherein in the USB host device according to claim 2 or 3, information relating to the size of data that can be stored in the data buffer corresponds to each of a plurality of different USB host controllers. A USB host controller information storage unit for storing the data, and the SCSI command generation unit determines the size of data that can be stored in the data buffer based on the information stored in the USB host controller information storage unit; It is characterized by.

このように構成されたUSBホスト装置によれば、複数の異なるUSBホストコントローラそれぞれで、データバッファに格納可能なデータのサイズが異なっていても、それに応じて読取対象データがより適切な分割数に分割されることになる。   According to the USB host device configured in this way, even if the size of data that can be stored in the data buffer is different in each of a plurality of different USB host controllers, the data to be read is divided into a more appropriate number of divisions accordingly. Will be divided.

したがって、比較的大きなデータバッファを備えるUSBホストコントローラであるにもかかわらず、データの分割数が過剰に多くなるようなことはない。また、比較的小さなデータバッファを備えるUSBホストコントローラであるにもかかわらず、データの分割数が過剰に少なくなるようなこともない。   Therefore, although the USB host controller has a relatively large data buffer, the number of data divisions does not increase excessively. Even though the USB host controller has a relatively small data buffer, the number of data divisions does not become excessively small.

請求項5に記載のUSBホスト装置は、請求項2〜請求項4のいずれか一項に記載のUSBホスト装置において、前記USBホストコントローラの制御下に存在するUSBデバイスの数に関する情報を取得するデバイス数情報取得手段を備え、前記SCSIコマンド生成手段は、前記デバイス数情報取得手段によって取得された情報に基づいて、前記データバッファに格納可能なデータのサイズを決定することを特徴とする。   The USB host device according to claim 5 acquires information relating to the number of USB devices existing under the control of the USB host controller in the USB host device according to any one of claims 2 to 4. Device number information acquisition means is provided, and the SCSI command generation means determines the size of data that can be stored in the data buffer based on the information acquired by the device number information acquisition means.

このように構成されたUSBホスト装置によれば、USBホストコントローラの制御下に存在するUSBデバイスの数に基づいて、データバッファに格納可能なデータのサイズが決定される。   According to the USB host device configured as described above, the size of data that can be stored in the data buffer is determined based on the number of USB devices existing under the control of the USB host controller.

したがって、同じUSBホストコントローラの制御下で、様々なUSBデバイスがそれぞれデータバッファを利用している場合でも、そのようなUSBデバイスの数を動的に把握できる。そして、そのUSBデバイス数に応じてリード/ライトの対象となるデータをより適切な分割数に分割することができる。   Therefore, even when various USB devices use data buffers under the control of the same USB host controller, the number of such USB devices can be dynamically grasped. Then, the data to be read / written can be divided into more appropriate division numbers according to the number of USB devices.

請求項6に記載のプログラムは、USBデバイスと通信可能で、USBストレージデバイスに対するリード又はライトを行う際には、SCSIドライバ、USBストレージドライバ、及びUSBホストコントローラが協働して前記USBストレージデバイスに対する制御を行うUSBホスト装置において、前記USBホスト装置が備えるコンピュータを前記USBストレージドライバとして機能させるためのプログラムであって、前記コンピュータを、前記USBストレージドライバが、前記USBストレージデバイスに対し、複数回にわたってSCSIコマンドを発行して、各SCSIコマンドに対応するリード又はライトを行う際に、先に発行されたSCSIコマンドに対応するリード又はライトが完了した後、次のSCSIコマンドを発行する前に、前記先に発行されたSCSIコマンド内のパラメータで指定されたデータのサイズに応じて待機時間を決定するとともに、当該待機時間分のウェイト制御を実行するウェイト制御手段として機能させることを特徴とする。   The program according to claim 6 can communicate with a USB device, and when reading or writing to a USB storage device, a SCSI driver, a USB storage driver, and a USB host controller cooperate with each other to the USB storage device. A USB host device that performs control, a program for causing a computer included in the USB host device to function as the USB storage driver, wherein the USB storage driver is connected to the USB storage device a plurality of times. When issuing a SCSI command and performing a read or write corresponding to each SCSI command, after the read or write corresponding to the previously issued SCSI command is completed, the next SCSI command is Before executing, the standby time is determined according to the size of the data specified by the parameter in the previously issued SCSI command, and functions as weight control means for executing the wait control for the standby time. It is characterized by.

このように構成されたプログラムによれば、USBホスト装置が備えるコンピュータを上述した通りのUSBストレージドライバとして機能させ、これにより、このUSBホスト装置では、請求項1に記載した通りの各手段が機能することになる。   According to the program configured as described above, the computer included in the USB host device is caused to function as the USB storage driver as described above. Thus, in the USB host device, each unit described in claim 1 functions. Will do.

したがって、このようなUSBホスト装置であれば、処理能力が過剰にUSBストレージドライバに専有されてしまうこと、及びUSBストレージドライバの実行する処理が過剰に遅延させられてしまうこと、双方を両立させて未然に防止することができる。   Therefore, with such a USB host device, both the processing capability is excessively dedicated to the USB storage driver and the processing executed by the USB storage driver is excessively delayed. It can be prevented in advance.

なお、請求項6に記載のプログラムは、USBホスト装置が備えるコンピュータを、さらに請求項2〜請求項5のいずれか一項に記載の各手段として機能させるプログラムとして構成されていてもよいことはもちろんである。   The program according to claim 6 may be configured as a program that causes a computer included in the USB host device to further function as each means according to any one of claims 2 to 5. Of course.

USBホスト装置を中心に構成されたシステムを示すブロック図。The block diagram which shows the system comprised focusing on the USB host apparatus. USBホスト装置内のデータ伝送経路を示すブロック図。The block diagram which shows the data transmission path | route in a USB host device. SCSIコマンド処理のフローチャート。The flowchart of a SCSI command process. 安全セクタ数取得処理のフローチャート。The flowchart of a safe sector number acquisition process. (a)はUSBデバイス接続検出処理のフローチャート、(b)はUSBデバイス切断検出処理のフローチャート。(A) is a flowchart of a USB device connection detection process, (b) is a flowchart of a USB device disconnection detection process. リード/ライトコマンド分割処理のフローチャート。The flowchart of a read / write command division process.

次に、本発明の実施形態について一例を挙げて説明する。
[装置の構成]
図1に示すUSBホスト装置1は、制御部2、補助記憶部3、USBインターフェース4、その他の入出力インターフェース5などを備えている。USBインターフェース4には、USBハブ6を介して、USBストレージデバイス7やUSBハンドセット8が接続されている。その他の入出力インターフェース5は、具体的には、LANインターフェース、ディスプレイインターフェース、キーボードインターフェース等である。これら各インターフェースには、各インターフェースに対応したその他のデバイス類9(LAN、ディスプレイ、キーボードなど)が接続されている。
Next, an embodiment of the present invention will be described with an example.
[Device configuration]
The USB host device 1 shown in FIG. 1 includes a control unit 2, an auxiliary storage unit 3, a USB interface 4, and other input / output interfaces 5. A USB storage device 7 and a USB handset 8 are connected to the USB interface 4 via a USB hub 6. The other input / output interface 5 is specifically a LAN interface, a display interface, a keyboard interface, or the like. Each of these interfaces is connected to other devices 9 (LAN, display, keyboard, etc.) corresponding to each interface.

制御部2は、周知のCPU11、ROM12、RAM13などを備えてなるマイクロコンピュータによって構成されている。また、補助記憶部3は、ハードディスク装置や不揮発性メモリなどのストレージデバイスによって構成されている。   The control unit 2 is configured by a microcomputer including a well-known CPU 11, ROM 12, RAM 13, and the like. The auxiliary storage unit 3 is configured by a storage device such as a hard disk device or a nonvolatile memory.

補助記憶部3には、ディスクデバイスドライバ15、USBホストコントローラドライバ16、USBマスストレージクラスドライバ17、及びUSBハンドセットドライバ18に対応するプログラムが格納されている。   The auxiliary storage unit 3 stores programs corresponding to the disk device driver 15, USB host controller driver 16, USB mass storage class driver 17, and USB handset driver 18.

これらのプログラムは、USBホスト装置1の起動時に、補助記憶部3から制御部2が備えるRAM13にロードされ、以降、CPU11がRAM13上のプログラムに基づく処理を実行する。これにより、USBホスト装置1では、ディスクデバイスドライバ15、USBホストコントローラドライバ16、USBマスストレージクラスドライバ17、及びUSBハンドセットドライバ18が機能する状態になる。   These programs are loaded from the auxiliary storage unit 3 to the RAM 13 included in the control unit 2 when the USB host device 1 is started up, and thereafter the CPU 11 executes processing based on the programs on the RAM 13. As a result, in the USB host device 1, the disk device driver 15, the USB host controller driver 16, the USB mass storage class driver 17, and the USB handset driver 18 function.

USBインターフェース4は、USBホストコントローラ19を中心に構成されている。このUSBホストコントローラ19は、PCIバスインターフェース、アービター、OHCI(Open Host Controller Interface)ホストコントローラ、EHCI(Enhanced Host Controller Interface)ホストコントローラ、ルートハブ、USB物理層などが1チップ上に集積されたハードウェアである。   The USB interface 4 is configured around a USB host controller 19. The USB host controller 19 is a hardware in which a PCI bus interface, an arbiter, an OHCI (Open Host Controller Interface) host controller, an EHCI (Enhanced Host Controller Interface) host controller, a root hub, a USB physical layer, and the like are integrated on one chip. is there.

さらに、USBホスト装置1では、図2に示すように、USBプロトコルスタック21などのソフトウェアが機能している。そして、このUSBプロトコルスタック21経由で、USBマスストレージクラスドライバ17やUSBハンドセットドライバ18などのUSB系ドライバが、USBデバイスへのアクセスを行う仕組みになっている。   Furthermore, in the USB host device 1, software such as the USB protocol stack 21 functions as shown in FIG. A USB system driver such as the USB mass storage class driver 17 and the USB handset driver 18 accesses the USB device via the USB protocol stack 21.

これらUSBマスストレージクラスドライバ17、USBハンドセットドライバ18、USBホストコントローラ19、及びUSBプロトコルスタック21は、それぞれがデータ格納用のバッファ17A,18A,19A,21Aを備えている。   Each of the USB mass storage class driver 17, USB handset driver 18, USB host controller 19, and USB protocol stack 21 includes buffers 17A, 18A, 19A, and 21A for storing data.

ここで、USBホスト装置1内でアプリケーションソフトウェアが機能し、その処理の中でUSBストレージデバイス7に対するデータのリード又はライトが行われる場合、USBマスストレージクラスドライバ17には、リード要求又はライト要求が伝達される。   Here, when the application software functions in the USB host device 1 and data is read or written to the USB storage device 7 in the process, the USB mass storage class driver 17 receives a read request or write request. Communicated.

このリード要求又はライト要求は、USBホスト装置1のOS(Operating System)が備えるファイルシステム経由で、アプリケーションソフトウェアから伝達されるものである。   This read request or write request is transmitted from the application software via a file system provided in the OS (Operating System) of the USB host device 1.

ファイルシステムは、アプリケーションソフトウェアの発行するリード要求又はライト要求を、セクタ単位でUSBストレージデバイス7にアクセスするためのSCSIコマンドに変換する。そして、そのSCSIコマンドをUSBマスストレージクラスドライバ17に伝達する。   The file system converts the read request or write request issued by the application software into a SCSI command for accessing the USB storage device 7 in units of sectors. Then, the SCSI command is transmitted to the USB mass storage class driver 17.

このSCSIコマンドを受けたUSBマスストレージクラスドライバ17は、SCSIコマンドをUSBプロトコルに準拠した方式で送信するため、必要な情報をSCSIコマンドに付加した上で、そのSCSIコマンドをUSBプロトコルスタック21に渡す。なお、本実施形態においては、SCSIコマンドを解析して、必要があればSCSIコマンドの分割を行うが、その詳細については後述する。   Upon receiving this SCSI command, the USB mass storage class driver 17 transmits the SCSI command in a method conforming to the USB protocol, and therefore adds the necessary information to the SCSI command and then passes the SCSI command to the USB protocol stack 21. . In this embodiment, the SCSI command is analyzed, and if necessary, the SCSI command is divided. Details thereof will be described later.

USBプロトコルスタック21に渡されたSCSIコマンドは、USBホストコントローラ19経由でUSBストレージデバイス7へと伝送される。その結果、このSCSIコマンドを受けたUSBストレージデバイス7とUSBホスト装置1との間で、リード要求又はライト要求に対応するデータが転送されることになる。   The SCSI command passed to the USB protocol stack 21 is transmitted to the USB storage device 7 via the USB host controller 19. As a result, data corresponding to the read request or write request is transferred between the USB storage device 7 that has received this SCSI command and the USB host device 1.

[USBストレージデバイスに対するリード/ライト処理]
次に、ファイルシステム側のSCSIドライバから発行されるSCSIコマンドがUSBマスストレージクラスドライバ17に伝達されたときに、USBマスストレージクラスドライバ17が実行する処理について、図3〜図6のフローチャートに基づいて説明する。
[Read / write processing for USB storage devices]
Next, processing executed by the USB mass storage class driver 17 when a SCSI command issued from the SCSI driver on the file system side is transmitted to the USB mass storage class driver 17 is based on the flowcharts of FIGS. I will explain.

この処理を開始すると、USBマスストレージクラスドライバ17としての処理を実行するCPU11(以下、単にCPU11と称する。)は、まず、USBマスストレージクラスドライバ17に伝達されたSCSIコマンドが、SCSIリード/ライトコマンドか否かを判断する(S101)。   When this process is started, the CPU 11 (hereinafter simply referred to as CPU 11) that executes the process as the USB mass storage class driver 17 first receives the SCSI command transmitted to the USB mass storage class driver 17 as the SCSI read / write. It is determined whether the command is received (S101).

ここで、SCSIリードコマンド又はSCSIライトコマンドのいずれかであった場合(S101:はい)、CPU11は、1コマンド当たりの最大セクタ数を仮決定する(S103)。本実施形態の場合、仮決定される最大セクタ数としては固定値=16が用いられ、S103では固定値=16が変数mに代入される。   If the command is either a SCSI read command or a SCSI write command (S101: Yes), the CPU 11 provisionally determines the maximum number of sectors per command (S103). In the present embodiment, a fixed value = 16 is used as the maximum number of sectors to be provisionally determined. In S103, the fixed value = 16 is substituted into the variable m.

そして、CPU11は、1コマンド当たりの安全セクタ数を取得する処理を実行する(S105)。このS105の具体的な処理内容は、様々なものを考え得るが、本実施形態では、図4に示すような処理を実行する。   Then, the CPU 11 executes a process for acquiring the number of safe sectors per command (S105). Various specific processing contents of S105 can be considered, but in the present embodiment, the processing shown in FIG. 4 is executed.

すなわち、図4に示す処理を開始すると、CPU11は、まず、「USBストレージデバイス7が接続されているUSBホストコントローラ19」のドライバ(USBホストコントローラドライバ16)からプラグアンドプレイIDを取得する(S201)。S201で取得するプラグアンドプレイIDは、USBホストコントローラ19の製造者及び形式を一意に特定可能な識別子である。   That is, when the processing shown in FIG. 4 is started, the CPU 11 first acquires the plug and play ID from the driver (USB host controller driver 16) of the “USB host controller 19 to which the USB storage device 7 is connected” (S201). ). The plug-and-play ID acquired in S201 is an identifier that can uniquely identify the manufacturer and type of the USB host controller 19.

続いて、CPU11は、取得したプラグアンドプレイIDをテーブルから検索する(S203)。USBホスト装置1には、S201で取得する可能性のあるプラグアンドプレイIDと、そのプラグアンドプレイIDに対応するUSBホストコントローラのパケットバッファ数との対応関係が、あらかじめテーブル化されて記憶されている(下記表1参照。)。S203では、S201で取得したプラグアンドプレイIDを、表1に示すようなテーブル内からサーチする。   Subsequently, the CPU 11 searches the obtained plug and play ID from the table (S203). In the USB host device 1, the correspondence between the plug-and-play ID that may be acquired in step S <b> 201 and the number of USB host controller packet buffers corresponding to the plug-and-play ID is tabulated in advance and stored. (See Table 1 below.) In S203, the plug and play ID acquired in S201 is searched from the table as shown in Table 1.

Figure 2012073663
そして、CPU11は、テーブル上にUSBホストコントローラ19の情報が見つかった否かを判断し(S205)、見つかった場合には(S205:はい)、テーブルから取得した値(Q)を以降の演算で使用する(S207)。
Figure 2012073663
Then, the CPU 11 determines whether or not the information of the USB host controller 19 is found on the table (S205). If it is found (S205: Yes), the value (Q) obtained from the table is calculated by the following calculation. Used (S207).

一方、S205において、テーブル上からUSBホストコントローラ19の情報が見つからなかった場合(S205:いいえ)、CPU11は、デフォルト値を以降の演算で使用する。このデフォルト値は、利用される可能性のあるUSBホストコントローラのうち、性能が比較的低いものを想定してあらかじめ取り決められている値であり、例えば、Q=32などの固定値が使用される。   On the other hand, if the information of the USB host controller 19 is not found on the table in S205 (S205: No), the CPU 11 uses the default value in the subsequent calculations. This default value is a value determined in advance assuming a relatively low performance among USB host controllers that may be used. For example, a fixed value such as Q = 32 is used. .

続いて、CPU11は、「USBストレージデバイスが接続されているUSBホストコントローラ」に接続されているUSBデバイス数を、変数Pに代入する(S211)。そして、変数P,Qの値に基づいて、Q÷(P+1)の演算結果を変数kに代入する(S213)。なお、S213において、変数kが0となるときは、変数kの値を1に補正する。そして、この変数kの値をリターン値として上位手段(図4に示す処理を呼び出した処理手段)へと返し、図4に示す処理を終了する。   Subsequently, the CPU 11 substitutes the variable P for the number of USB devices connected to the “USB host controller to which the USB storage device is connected” (S211). Based on the values of the variables P and Q, the calculation result of Q / (P + 1) is substituted into the variable k (S213). In S213, when the variable k becomes 0, the value of the variable k is corrected to 1. Then, the value of this variable k is returned as a return value to the higher-level means (processing means that called the processing shown in FIG. 4), and the processing shown in FIG. 4 is terminated.

このようにして安全セクタ数kを決定すれば、例えば、USBデバイス数が1のときは、全パケットバッファの1/2がひとつのUSBストレージデバイスに利用される。また、USBデバイス数が2のときは、全パケットバッファの1/3がひとつのUSBストレージデバイスに利用され、USBデバイス数が3のときは、全パケットバッファの1/4がひとつのUSBストレージデバイスに利用される。つまり、USBデバイス数Pに応じて、全パケットバッファの1/(P+1)が、P個のUSBデバイスのうちの、各USBストレージデバイスに利用されることになる。   If the number of safe sectors k is determined in this way, for example, when the number of USB devices is 1, 1/2 of all packet buffers are used for one USB storage device. When the number of USB devices is 2, 1/3 of all packet buffers are used for one USB storage device, and when the number of USB devices is 3, 1/4 of all packet buffers is one USB storage device. Used for That is, according to the number of USB devices P, 1 / (P + 1) of all packet buffers is used for each USB storage device among the P USB devices.

したがって、この場合、仮に全USBデバイスがUSBストレージデバイスであっても、USBデバイス数が1のときは、全パケットバッファの1/2が全USBストレージデバイスに利用される。また、USBデバイス数が2のときは、全パケットバッファの2/3が全USBストレージデバイスに利用され、USBデバイス数が3のときは、全パケットバッファの3/4が全USBストレージデバイスに利用される。   Therefore, in this case, even if all USB devices are USB storage devices, if the number of USB devices is 1, 1/2 of all packet buffers are used for all USB storage devices. When the number of USB devices is 2, 2/3 of all packet buffers are used for all USB storage devices, and when the number of USB devices is 3, 3/4 of all packet buffers are used for all USB storage devices. Is done.

よって、USBストレージデバイス数Pのときにも、全パケットバッファは、1/(P+1)の割合で、各USBストレージデバイスに利用されることになるので、いくらか余裕が残る状態でバッファが利用されることになる。   Therefore, even when the number of USB storage devices is P, all packet buffers are used for each USB storage device at a rate of 1 / (P + 1), so the buffers are used in a state where some margin remains. It will be.

ちなみに、S211で変数Pに代入されるUSBデバイス数は、USBデバイスの接続・切断に応じて、図5(a)及び同図(b)に示すような処理により、動的に変更される値である。   Incidentally, the number of USB devices assigned to the variable P in S211 is a value that is dynamically changed by the processes shown in FIGS. 5A and 5B according to the connection / disconnection of the USB device. It is.

すなわち、プラグアンドプレイ機能により、USBデバイスの接続が検出された場合には、図5(a)に示す処理が実行され、この場合、CPU11は、接続を検出したUSBデバイスが接続しているUSBホストアダプタのUSBデバイス数をカウントアップし(S301)、以下、通常のUSBデバイス接続処理を実行する(S303)。なお、S303で行われる処理の詳細は、USBデバイスにおける一般的な処理に過ぎないので、ここでの説明は省略する。   That is, when the connection of the USB device is detected by the plug and play function, the processing shown in FIG. 5A is executed. In this case, the CPU 11 connects the USB device to which the USB device that has detected the connection is connected. The number of USB devices of the host adapter is counted up (S301), and then normal USB device connection processing is executed (S303). Note that the details of the processing performed in S303 are only general processing in the USB device, and thus description thereof is omitted here.

また、プラグアンドプレイ機能により、USBデバイスの切断が検出された場合には、図5(b)に示す処理が実行され、この場合、CPU11は、切断を検出したUSBデバイスが接続していたUSBホストアダプタのUSBデバイス数をカウントダウンし(S401)、以下、通常のUSBデバイス切断処理を実行する(S403)。なお、S403で行われる処理の詳細も、USBデバイスにおける一般的な処理に過ぎないので、ここでの説明は省略する。   If disconnection of the USB device is detected by the plug and play function, the process shown in FIG. 5B is executed. In this case, the CPU 11 connects the USB to which the USB device that detected disconnection is connected. The number of USB devices of the host adapter is counted down (S401), and then normal USB device disconnection processing is executed (S403). Note that the details of the processing performed in S403 are only general processing in the USB device, and thus description thereof is omitted here.

さて、図4に示す処理を終了すると図3に示すS105を終えたことになるので、続いて、CPU11は、S103で仮決定した最大セクタ数mが安全か否か(すなわち、安全セクタ数k以下か否か)を判断する(S107)。   When the process shown in FIG. 4 is finished, S105 shown in FIG. 3 is finished. Subsequently, the CPU 11 determines whether the maximum sector number m provisionally determined in S103 is safe (that is, the safe sector number k). Whether or not) is determined (S107).

ここで、仮決定した最大セクタ数mが危険(すなわち、安全セクタ数kより大)である場合(S107:いいえ)、CPU11は、安全セクタ数kを変数mに代入することにより、最大セクタ数mを補正して(S109)、S111へと進む。一方、仮決定した最大セクタ数mが安全(すなわち、安全セクタ数k以下)である場合(S107:はい)、CPU11は、S109を実行することなく、S111へと進む。   Here, when the temporarily determined maximum sector number m is dangerous (that is, larger than the safe sector number k) (S107: No), the CPU 11 substitutes the safe sector number k into the variable m to thereby determine the maximum sector number. m is corrected (S109), and the process proceeds to S111. On the other hand, when the tentatively determined maximum sector number m is safe (that is, safe sector number k or less) (S107: Yes), the CPU 11 proceeds to S111 without executing S109.

そして、このようにして最大セクタ数mが確定したら、CPU11は、リード/ライトのセクタ数が最大セクタ数mを超えているか否かを判断する(S111)。ここで、リード/ライトのセクタ数が最大セクタ数mを超えていれば(S111:超えている)、そのままリード/ライトコマンドを発行すると、最大セクタ数mを超えるデータがUSBストレージデバイス7との間で転送されるおそれがある。そこで、CPU11は、SCSIリード/ライトコマンドの分割を実行する(S113)。   When the maximum sector number m is determined in this way, the CPU 11 determines whether or not the read / write sector number exceeds the maximum sector number m (S111). Here, if the read / write sector count exceeds the maximum sector count m (S111: exceeds), when the read / write command is issued as it is, data exceeding the maximum sector count m is transferred to the USB storage device 7. May be transferred between. Therefore, the CPU 11 executes SCSI read / write command division (S113).

このS113は、詳しくは図6に示すような処理となる。すなわち、この処理を開始すると、CPU11は、まず、リード/ライトの開始位置となる先頭セクタ番号を変数Tに代入し、リード/ライトセクタ数を変数nに代入する(S501)。   This S113 is a process as shown in detail in FIG. That is, when this process is started, the CPU 11 first substitutes the leading sector number, which is the read / write start position, into the variable T, and substitutes the read / write sector number into the variable n (S501).

そして、CPU11は、変数n,mについて、n≦mか否かを判断する(S503)。ここで、S111ではn>mが成立したからこそ図6に示す処理に移行しているので、少なくとも初回はn≦mではないと判断されることになる(S503:いいえ)。この場合、CPU11は、USBプロトコルに準拠した方式にて、セクタTからmセクタのリード/ライトを行うためのSCSIコマンドを発行する(S507)。   Then, the CPU 11 determines whether or not n ≦ m for the variables n and m (S503). Here, since n> m is established in S111, the process proceeds to the process shown in FIG. 6, and therefore it is determined that at least the first time does not satisfy n ≦ m (S503: No). In this case, the CPU 11 issues a SCSI command for reading / writing m sectors from the sector T by a method compliant with the USB protocol (S507).

すなわち、S507では、基となったSCSIコマンド(図3に示す処理を開始する契機となったSCSIコマンド)で要求されたセクタ数nではなく、S103〜S109を経て確定した最大セクタ数mのリード/ライトを行うSCSIコマンドを発行する。   That is, in S507, the read of the maximum number of sectors m determined through S103 to S109, not the number of sectors n requested by the basic SCSI command (the SCSI command that triggered the processing shown in FIG. 3). / Issue a SCSI command to write.

なお、S507で発行するSCSIリードコマンドは、USBプロトコルスタック21経由でUSBストレージデバイス7にSCSIコマンドを伝達するためのコマンドである。より具体的には、最大セクタ数mのSCSIリードコマンドに対し、USB規格に準拠したヘッダを付加したものである。   The SCSI read command issued in S507 is a command for transmitting the SCSI command to the USB storage device 7 via the USB protocol stack 21. More specifically, a header conforming to the USB standard is added to the SCSI read command having the maximum number of sectors m.

このようなSCSIコマンドにより、USBストレージデバイス7にSCSIコマンドが伝達されると、USBストレージデバイス7との間で最大セクタ数mのデータ転送が行われる。その際、転送されるデータは、USBホストコントローラ19のバッファ19Aなどを経由して転送されるが、そのデータ量は最大セクタ数mに抑えられることになるので、バッファ19Aなどの容量不足に起因してデータの損失が起こることはない。   When the SCSI command is transmitted to the USB storage device 7 by such a SCSI command, data transfer of the maximum number of sectors m to the USB storage device 7 is performed. At that time, the transferred data is transferred via the buffer 19A of the USB host controller 19 or the like, but the amount of data is limited to the maximum number of sectors m, which is caused by insufficient capacity of the buffer 19A or the like. Data loss will not occur.

さて、S507を終えたら、CPU11は、変数T,mの値に基づき、T+mの演算結果を新たに変数Tに代入し、変数n,mの値に基づき、n−mの演算結果を新たに変数nに代入する(S509)。   After completing S507, the CPU 11 newly substitutes the calculation result of T + m into the variable T based on the values of the variables T and m, and newly calculates the calculation result of n−m based on the values of the variables n and m. Substitute in variable n (S509).

そして、変数mの値に比例する長さの待機時間だけWAITする(S511)。具体的には、S511では、変数mとあらかじめ取り決められた固定値とを乗算して積を求め、その値相当の待機時間が経過するまではWAIT状態となるように、ウェイト制御を実行する。これにより、S507でのデータ転送量に応じた長さの待機時間だけ、S511で待機状態となり、その間にCPU11は他の処理を実行することができる。   Then, WAIT is performed for a waiting time having a length proportional to the value of the variable m (S511). Specifically, in S511, the product is obtained by multiplying the variable m by a predetermined fixed value, and weight control is executed so that the WAIT state is maintained until a waiting time corresponding to the value elapses. As a result, the standby state is set in S511 for the waiting time having a length corresponding to the data transfer amount in S507, and the CPU 11 can execute other processes during that period.

その後、待機時間が経過したら、S503へと戻る。以降、S503においてn≦mではないと判断される間は、S503〜S511を繰り返し、USBストレージデバイス7との間で最大セクタ数mのデータ転送が繰り返されることになる。   Thereafter, when the standby time has elapsed, the process returns to S503. Thereafter, while it is determined in S503 that n ≦ m is not satisfied, S503 to S511 are repeated, and data transfer with the maximum number of sectors m to the USB storage device 7 is repeated.

そして、S503において、n≦mであると判断された場合(S503:はい)、CPU11は、USBプロトコルに準拠した方式にて、セクタTからnセクタのリード/ライトを行うためのSCSIコマンドを発行する(S513)。これにより、USBストレージデバイス7との間でセクタ数nのデータが転送され、その結果、所期のセクタ数分のデータ転送が完了し、図6に示す処理を終了する。図6に示す処理を終了すると、図3に示すS113を終えることになるので、図3に示す処理全体を終了する。   If it is determined in step S503 that n ≦ m is satisfied (S503: Yes), the CPU 11 issues a SCSI command for reading / writing n sectors from the sector T using a method compliant with the USB protocol. (S513). As a result, the data of the sector number n is transferred to and from the USB storage device 7, and as a result, the data transfer for the desired number of sectors is completed, and the processing shown in FIG. When the process shown in FIG. 6 ends, S113 shown in FIG. 3 ends, and thus the entire process shown in FIG. 3 ends.

なお、図3に示す処理のうち、S101において、SCSIリード/ライトコマンドではないと判断された場合(S101:いいえ)、上記のようなリード/ライトコマンドの分割処理は不要となる。また、S111において、リード/ライトのセクタ数が最大セクタ数を超えていないと判断されたら(S111:超えていない)、上記のようなリード/ライトコマンドの分割処理は不要となる。   In the processing shown in FIG. 3, when it is determined in S101 that the command is not a SCSI read / write command (S101: No), the read / write command division processing as described above becomes unnecessary. If it is determined in S111 that the number of read / write sectors does not exceed the maximum number of sectors (S111: not exceeded), the read / write command division processing as described above becomes unnecessary.

したがって、これらの場合、CPU11は、従来通りのSCSIコマンド処理を実行し(S115)、図3に示す処理を終了する。ちなみに、従来通りのSCSIコマンド処理とは、SCSIコマンドに対し、USB規格に準拠したヘッダを付加して、そのSCSIコマンドを発行する処理のことである。このような処理により、USBプロトコルスタック21経由でUSBストレージデバイス7にSCSIコマンドが伝達されることになる。   Therefore, in these cases, the CPU 11 executes the conventional SCSI command processing (S115) and ends the processing shown in FIG. Incidentally, the conventional SCSI command processing is processing for adding a header conforming to the USB standard to a SCSI command and issuing the SCSI command. By such processing, the SCSI command is transmitted to the USB storage device 7 via the USB protocol stack 21.

[効果]
以上説明したように、上記USBホスト装置1によれば、S507,S513の各ステップが到来するたびにSCSIコマンドを発行するものの、その際に、バッファ19A内で使用可能な容量を上回るデータがUSBストレージデバイス7との間で転送されることはない。
[effect]
As described above, according to the USB host device 1, although the SCSI command is issued every time the steps S507 and S513 arrive, data exceeding the capacity available in the buffer 19A is transferred to the USB 19 at that time. There is no transfer with the storage device 7.

しかも、分割されたデータを複数回にわたって転送する際には、S507でのデータ転送量に応じた長さの待機時間だけ、S511で待機状態となる。したがって、データ転送量が多い場合ほど、より長時間にわたって待機状態となり、待機状態となっている間に、CPU11は他の処理を実行することができる。   In addition, when the divided data is transferred a plurality of times, the standby state is set in S511 for the waiting time having a length corresponding to the data transfer amount in S507. Therefore, the larger the data transfer amount, the longer the standby state, and the CPU 11 can execute other processes while in the standby state.

すなわち、リード又はライト対象となったデータサイズが大きい場合には、USBストレージデバイス7との通信で、USBホスト装置1(CPU11)の処理能力を相応に専有することになるものの、その場合には、相応に長時間のウェイト制御が実行される。したがって、ウェイト制御が実行されている間には、USBホスト装置1の処理能力を、他の処理に割り当てることができる。   That is, when the data size to be read or written is large, the processing capacity of the USB host device 1 (CPU 11) is exclusively occupied by communication with the USB storage device 7, but in that case Accordingly, long-time weight control is executed accordingly. Therefore, while the wait control is being executed, the processing capability of the USB host device 1 can be assigned to another process.

一方、リード又はライト対象となったデータサイズが小さい場合には、相応に短時間のウェイト制御しか実行されない。したがって、USBストレージデバイス7との通信で、USBホスト装置1の処理能力をそれほど専有していないにもかかわらず、USBストレージデバイス7に対する処理が遅延させられることはない。   On the other hand, when the data size to be read or written is small, only a short time wait control is executed. Accordingly, the communication with the USB storage device 7 does not delay processing for the USB storage device 7 even though the processing capability of the USB host device 1 is not so exclusive.

よって、以上のような処理を行えば、USBホスト装置1の処理能力が、過剰にUSBマスストレージクラスドライバ17に専有されてしまうこと、及びUSBマスストレージクラスドライバ17の実行する処理が過剰に遅延させられてしまうこと、双方を両立させて未然に防止することができる。   Therefore, if the processing as described above is performed, the processing capability of the USB host device 1 is excessively occupied by the USB mass storage class driver 17 and the processing executed by the USB mass storage class driver 17 is excessively delayed. It is possible to prevent both of them and the both.

ちなみに、仮にUSBホスト装置1側のデータ処理能力に十分な余力があるとすれば、上述のようなウェイト制御を行わなくても済むが、その場合は、CPU11に高度な処理能力が要求されることになる。そのため、その分だけUSBホスト装置1を高性能化する必要があり、USBホスト装置1にかかるコストが増大することになる。   Incidentally, if there is sufficient capacity in the data processing capacity on the USB host device 1 side, it is not necessary to perform the wait control as described above, but in that case, the CPU 11 is required to have a high level of processing capacity. It will be. Therefore, it is necessary to improve the performance of the USB host device 1 by that amount, and the cost for the USB host device 1 increases.

この点、上記実施形態のような構成を採用すれば、CPU11に高度な処理能力は要求されないので、USBホスト装置1を過度に高性能にしなくても済み、USBホスト装置1にかかるコストを低減することができる。   In this regard, if the configuration as in the above embodiment is adopted, the CPU 11 is not required to have a high level of processing capability, so the USB host device 1 does not have to be overly high performance, and the cost of the USB host device 1 is reduced can do.

しかも、このような機能を実現するに当たって、バッファ19A内で使用可能な容量を上回るような大量のデータのリード/ライトを要求するSCSIコマンドがUSBホスト装置1内において発行されること自体は許容しているので、アプリケーションソフトウェアの改修は不要である。   In addition, in order to realize such a function, it is allowed that a SCSI command for requesting reading / writing of a large amount of data exceeding the usable capacity in the buffer 19A is issued in the USB host device 1 itself. Therefore, it is not necessary to modify the application software.

また、USBプロトコルスタック21についても、何ら変更を加える必要はないので、すでに信頼性が高く、高度な処理を行っているUSBプロトコルスタック21について、不用意な改修を加えなくても済み、USBホスト装置1の信頼性をいたずらに低下させてしまうことがない。   Also, since there is no need to make any changes to the USB protocol stack 21, the USB protocol stack 21 that is already highly reliable and performing advanced processing need not be inadvertently modified. The reliability of the device 1 is not unnecessarily lowered.

加えて、USBプロトコルスタック21でデータ転送を制限すると、USB音声デバイスなどのデータ転送で問題が生じる可能性があるが、上記実施形態であれば、そのような問題もない。   In addition, if data transfer is restricted by the USB protocol stack 21, there may be a problem in data transfer of a USB audio device or the like, but there is no such problem in the above embodiment.

より詳しくは、USBプロトコルスタック21は、上記のようなUSBストレージデバイス7の他、USBハンドセット8のような音声デバイスにも利用されるソフトウェアである。   More specifically, the USB protocol stack 21 is software used not only for the USB storage device 7 as described above but also for an audio device such as the USB handset 8.

この種のUSB音声デバイスの場合、データ処理が間に合わなければ、一部の音声データを破棄して、後から到来する新しいデータの受け取りを優先することで、多少の音飛びが発生してもリアルタイム性が損なわれないようにしている。   In the case of this type of USB audio device, if the data processing is not in time, a part of the audio data is discarded, and priority is given to receiving new data that arrives later, so that even if some sound skipping occurs, real time We are trying not to impair the sex.

そのため、CPU11の処理性能が低い状態にある場合に、USBプロトコルスタック21でデータ転送を制限すると、データ損失を防止できるとしても、新しいデータの受け取りで遅れが生じ、リアルタイム性が損なわれてしまうという問題が起こる。   Therefore, if the data transfer is restricted by the USB protocol stack 21 when the processing performance of the CPU 11 is low, even if data loss can be prevented, a delay occurs in receiving new data, and real-time performance is impaired. Problems arise.

この点、上記実施形態では、USBプロトコルスタック21の構成を変えることなく対処しているので、USBハンドセット8のような音声デバイスに対し、悪影響を及ぼしてしまうおそれがない。   In this regard, in the above-described embodiment, since the measures are taken without changing the configuration of the USB protocol stack 21, there is no possibility of adversely affecting an audio device such as the USB handset 8.

[変形例等]
以上、本発明の実施形態について説明したが、本発明は上記の具体的な一実施形態に限定されず、この他にも種々の形態で実施することができる。
[Modifications, etc.]
As mentioned above, although embodiment of this invention was described, this invention is not limited to said specific one Embodiment, In addition, it can implement with a various form.

例えば、上記実施形態では、大量のデータを複数に分割して複数回にわたってデータ転送を行う際に、1回のデータの転送を行うたびにウェイト制御を行っていたが、2回以上のデータ転送を行うたびにウェイト制御を行ってもよい。すなわち、データ転送を何回行うごとにウェイト制御を入れるかは、USBホスト装置1(CPU11)の処理性能を考慮して任意に決めればよい。   For example, in the above-described embodiment, when a large amount of data is divided into a plurality of pieces and data transfer is performed a plurality of times, the wait control is performed each time one data transfer is performed. Wait control may be performed each time. That is, how many times data transfer is performed may be arbitrarily determined in consideration of the processing performance of the USB host device 1 (CPU 11).

また、上記実施形態では、ひとつのSCSIコマンドをUSBマスストレージクラスドライバ17において複数のSCSIコマンドに分割して発行する際に、上記ウェイト制御を行う事例を示したが、複数のSCSIコマンドがUSBマスストレージクラスドライバ17に繰り返し渡される場合に、上記のようなウェイト制御を実行してもよい。   In the above-described embodiment, an example in which the above-described wait control is performed when one SCSI command is divided into a plurality of SCSI commands and issued by the USB mass storage class driver 17 has been described. When the data is repeatedly passed to the storage class driver 17, the wait control as described above may be executed.

1・・・USBホスト装置、2・・・制御部、3・・・補助記憶部、4・・・USBインターフェース、5・・・その他の入出力インターフェース、6・・・USBハブ、7・・・USBストレージデバイス、8・・・USBハンドセット、9・・・その他のデバイス類、11・・・CPU、12・・・ROM、13・・・RAM、15・・・ディスクデバイスドライバ、16・・・USBホストコントローラドライバ、17・・・USBマスストレージクラスドライバ、18・・・USBハンドセットドライバ、19・・・USBホストコントローラ、21・・・USBプロトコルスタック、17A,18A,19A,21A・・・バッファ。   DESCRIPTION OF SYMBOLS 1 ... USB host device, 2 ... Control part, 3 ... Auxiliary storage part, 4 ... USB interface, 5 ... Other input / output interfaces, 6 ... USB hub, 7 ... USB storage device, 8 ... USB handset, 9 ... other devices, 11 ... CPU, 12 ... ROM, 13 ... RAM, 15 ... disk device driver, 16 ... USB host controller driver, 17 ... USB mass storage class driver, 18 ... USB handset driver, 19 ... USB host controller, 21 ... USB protocol stack, 17A, 18A, 19A, 21A ... buffer.

Claims (6)

USB(Universal Serial Bus)デバイスと通信可能で、USBストレージデバイスに対するリード又はライトを行う際には、SCSI(Small Computer System Interface)ドライバ、USBストレージドライバ、及びUSBホストコントローラが協働して前記USBストレージデバイスに対する制御を行うUSBホスト装置であって、
前記USBストレージドライバは、
前記USBストレージデバイスに対し、複数回にわたってSCSIコマンドを発行して、各SCSIコマンドに対応するリード又はライトを行う際に、先に発行されたSCSIコマンドに対応するリード又はライトが完了した後、次のSCSIコマンドを発行する前に、前記先に発行されたSCSIコマンド内のパラメータで指定されたデータのサイズに応じて待機時間を決定するとともに、当該待機時間分のウェイト制御を実行するウェイト制御手段
を備えることを特徴とするUSBホスト装置。
When communicating with a USB (Universal Serial Bus) device and performing reading or writing to a USB storage device, a SCSI (Small Computer System Interface) driver, a USB storage driver, and a USB host controller cooperate to provide the USB storage. A USB host device that controls the device,
The USB storage driver
When the SCSI command is issued to the USB storage device a plurality of times and the read or write corresponding to each SCSI command is performed, the read or write corresponding to the previously issued SCSI command is completed. Before issuing the SCSI command, wait time is determined according to the data size specified by the parameter in the previously issued SCSI command, and weight control means for executing wait control for the wait time A USB host device comprising:
前記USBストレージドライバは、
前記USBストレージデバイスから読取対象データを読み取る際に前記SCSIドライバから発行されるSCSIコマンドを取得するSCSIコマンド取得手段と、
前記SCSIコマンド取得手段によって取得された前記SCSIコマンド内のパラメータで指定された読取対象データのサイズが、前記USBホストコントローラが備えるデータバッファに格納可能なサイズよりも大きい場合に、前記読取対象データをいくつかのデータに分割することで、分割後の各データのサイズを前記データバッファに格納可能なサイズとした上で、前記分割後の各データを前記USBストレージデバイスから読み取るため、前記分割後の各データそれぞれを読取対象として指定するパラメータが設定されたいくつかのSCSIコマンドを生成するSCSIコマンド生成手段と、
前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行するSCSIコマンド発行手段と、
前記SCSIコマンド発行手段によって前記いくつかのSCSIコマンドそれぞれを発行するごとに、各SCSIコマンドに対する応答として前記USBストレージデバイスから転送されて前記データバッファに格納されるデータを、前記データバッファから順次取得するデータ取得手段と、
前記データ取得手段によって順次取得される前記分割後の各データをすべて取得したら、それら分割後の各データを一括して、前記SCSIコマンド取得手段によって取得された前記SCSIコマンドに対する応答として前記SCSIドライバへと転送するデータ転送手段と
を備え、
前記ウェイト制御手段は、前記SCSIコマンド発行手段により、前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行する際に、前記ウェイト制御を実行する
ことを特徴とする請求項1に記載のUSBホスト装置。
The USB storage driver
SCSI command acquisition means for acquiring a SCSI command issued from the SCSI driver when reading data to be read from the USB storage device;
When the size of the read target data specified by the parameter in the SCSI command acquired by the SCSI command acquisition means is larger than the size that can be stored in the data buffer included in the USB host controller, the read target data is By dividing the data into several pieces of data, the size of each divided data is set to a size that can be stored in the data buffer, and each divided data is read from the USB storage device. SCSI command generating means for generating several SCSI commands in which parameters for specifying each data as a reading target are set;
SCSI command issuing means for sequentially issuing each of the several SCSI commands generated by the SCSI command generating means to the USB storage device;
Each time the SCSI commands are issued by the SCSI command issuing means, data transferred from the USB storage device and stored in the data buffer as a response to each SCSI command is sequentially acquired from the data buffer. Data acquisition means;
When all the divided data sequentially obtained by the data obtaining means are obtained, the divided data are collectively sent to the SCSI driver as a response to the SCSI command obtained by the SCSI command obtaining means. And a data transfer means for transferring,
The wait control unit executes the wait control when the SCSI command issuing unit sequentially issues each of the several SCSI commands generated by the SCSI command generating unit to the USB storage device. The USB host device according to claim 1.
前記USBストレージドライバは、
前記USBストレージデバイスへ書込対象データを書き込む際に前記SCSIドライバから発行されるSCSIコマンドを取得するSCSIコマンド取得手段と、
前記SCSIコマンド取得手段によって取得された前記SCSIコマンド内のパラメータで指定された書込対象データのサイズが、前記USBホストコントローラが備えるデータバッファに格納可能なサイズよりも大きい場合に、前記書込対象データをいくつかのデータに分割することで、分割後の各データのサイズを前記データバッファに格納可能なサイズとした上で、前記分割後の各データを前記USBストレージデバイスへ書き込むため、前記分割後の各データそれぞれを書込対象として指定するパラメータが設定されたいくつかのSCSIコマンドを生成するSCSIコマンド生成手段と、
前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行するSCSIコマンド発行手段と、
前記SCSIコマンド発行手段によって前記いくつかのSCSIコマンドそれぞれを発行するごとに、前記USBストレージデバイスから返される応答を、順次取得する応答取得手段と、
前記応答取得手段によって順次取得される前記応答をすべて取得したら、前記SCSIコマンド取得手段によって取得された前記SCSIコマンドに対する応答を返す応答発行手段と
を備え、
前記ウェイト制御手段は、前記SCSIコマンド発行手段により、前記SCSIコマンド生成手段によって生成される前記いくつかのSCSIコマンドそれぞれを、前記USBストレージデバイスに対して順次発行する際に、前記ウェイト制御を実行する
ことを特徴とする請求項1に記載のUSBホスト装置。
The USB storage driver
SCSI command acquisition means for acquiring a SCSI command issued from the SCSI driver when writing target data to the USB storage device;
When the size of the write target data specified by the parameter in the SCSI command acquired by the SCSI command acquisition means is larger than the size that can be stored in the data buffer included in the USB host controller, the write target The data is divided into several pieces of data so that the size of each divided data can be stored in the data buffer and the divided data is written to the USB storage device. SCSI command generation means for generating several SCSI commands in which parameters for designating each subsequent data as a writing target are set;
SCSI command issuing means for sequentially issuing each of the several SCSI commands generated by the SCSI command generating means to the USB storage device;
Response acquisition means for sequentially acquiring responses returned from the USB storage device each time the SCSI command issuance means issues each of the several SCSI commands.
Response issuing means for returning a response to the SCSI command acquired by the SCSI command acquiring means when all the responses sequentially acquired by the response acquiring means are acquired,
The wait control unit executes the wait control when the SCSI command issuing unit sequentially issues each of the several SCSI commands generated by the SCSI command generating unit to the USB storage device. The USB host device according to claim 1.
前記データバッファに格納可能なデータのサイズに関する情報を、複数の異なる前記USBホストコントローラそれぞれに対応づけて記憶するUSBホストコントローラ情報記憶手段
を備え、
前記SCSIコマンド生成手段は、前記USBホストコントローラ情報記憶手段に記憶された情報に基づいて、前記データバッファに格納可能なデータのサイズを決定する
ことを特徴とする請求項2又は請求項3に記載のUSBホスト装置。
USB host controller information storage means for storing information on the size of data that can be stored in the data buffer in association with each of a plurality of different USB host controllers,
The said SCSI command production | generation means determines the size of the data which can be stored in the said data buffer based on the information memorize | stored in the said USB host controller information storage means. The Claim 2 or Claim 3 characterized by the above-mentioned. USB host device.
前記USBホストコントローラの制御下に存在するUSBデバイスの数に関する情報を取得するデバイス数情報取得手段
を備え、
前記SCSIコマンド生成手段は、前記デバイス数情報取得手段によって取得された情報に基づいて、前記データバッファに格納可能なデータのサイズを決定する
ことを特徴とする請求項2〜請求項4のいずれか一項に記載のUSBホスト装置。
Device number information acquisition means for acquiring information related to the number of USB devices existing under the control of the USB host controller;
The SCSI command generation unit determines the size of data that can be stored in the data buffer based on the information acquired by the device number information acquisition unit. The USB host device according to one item.
USBデバイスと通信可能で、USBストレージデバイスに対するリード又はライトを行う際には、SCSIドライバ、USBストレージドライバ、及びUSBホストコントローラが協働して前記USBストレージデバイスに対する制御を行うUSBホスト装置において、前記USBホスト装置が備えるコンピュータを前記USBストレージドライバとして機能させるためのプログラムであって、
前記コンピュータを、
前記USBストレージドライバが、前記USBストレージデバイスに対し、複数回にわたってSCSIコマンドを発行して、各SCSIコマンドに対応するリード又はライトを行う際に、先に発行されたSCSIコマンドに対応するリード又はライトが完了した後、次のSCSIコマンドを発行する前に、前記先に発行されたSCSIコマンド内のパラメータで指定されたデータのサイズに応じて待機時間を決定するとともに、当該待機時間分のウェイト制御を実行するウェイト制御手段
として機能させることを特徴とするプログラム。
In a USB host device that is communicable with a USB device and performs control on the USB storage device in cooperation with a SCSI driver, a USB storage driver, and a USB host controller when reading or writing to the USB storage device. A program for causing a computer included in a USB host device to function as the USB storage driver,
The computer,
When the USB storage driver issues a SCSI command to the USB storage device a plurality of times and performs read or write corresponding to each SCSI command, the read or write corresponding to the previously issued SCSI command After completing the above, before issuing the next SCSI command, the waiting time is determined according to the data size specified by the parameter in the previously issued SCSI command, and the wait control for the waiting time is performed. A program characterized by functioning as a weight control means for executing.
JP2010215862A 2010-09-27 2010-09-27 Usb host device and program Pending JP2012073663A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010215862A JP2012073663A (en) 2010-09-27 2010-09-27 Usb host device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010215862A JP2012073663A (en) 2010-09-27 2010-09-27 Usb host device and program

Publications (1)

Publication Number Publication Date
JP2012073663A true JP2012073663A (en) 2012-04-12

Family

ID=46169799

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010215862A Pending JP2012073663A (en) 2010-09-27 2010-09-27 Usb host device and program

Country Status (1)

Country Link
JP (1) JP2012073663A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007249938A (en) * 2006-02-14 2007-09-27 Matsushita Electric Ind Co Ltd USB host system, AV data reproducing apparatus and AV data recording apparatus
JP2008278053A (en) * 2007-04-26 2008-11-13 Kyocera Corp Mobile terminal device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007249938A (en) * 2006-02-14 2007-09-27 Matsushita Electric Ind Co Ltd USB host system, AV data reproducing apparatus and AV data recording apparatus
JP2008278053A (en) * 2007-04-26 2008-11-13 Kyocera Corp Mobile terminal device

Similar Documents

Publication Publication Date Title
JP5159900B2 (en) Computer program, apparatus, and method for reducing access conflict of reserved device
JP5159901B2 (en) Method for facilitating input/output (I/O) processing for I/O operations in a host computer system configured to communicate with a control device - Patents.com
US8635386B2 (en) Communication control device, data communication method and program
CN102411549B (en) Memory system, host controller and method for controlling DMA
US8843663B2 (en) Data transmission device and method for merging multiple commands
US11010094B2 (en) Task management method and host for electronic storage device
US7685331B2 (en) Direct memory access controller
EP3255553A1 (en) Transmission control method and device for direct memory access
US8694698B2 (en) Storage system and method for prioritizing data transfer access
US20170185401A1 (en) Data read/write method and apparatus, storage device, and computer system
TW202029000A (en) Interface adapter circuit
US9330033B2 (en) System, method, and computer program product for inserting a gap in information sent from a drive to a host device
TWI784120B (en) Memory controller for stoarge device, stoarge device, control method for storage device, and recording medium
US20080225858A1 (en) Data transferring apparatus and information processing system
US20180173639A1 (en) Memory access method, apparatus, and system
JP5908416B2 (en) Interface control device, data storage device, and interface control method
JP5949224B2 (en) Storage control device, program, and method
JP2012073663A (en) Usb host device and program
JP2008282237A (en) Interface board, simulator, synchronization method, synchronization program
KR101399833B1 (en) Storage device, control method for storage device and computer-readable recording medium
KR100633742B1 (en) Direct memory access control device and method for automatically updating data transfer size from peripheral device
JP2012048309A (en) Usb host device and program
CN113934671B (en) Interface control chip and network equipment
JP2009093225A (en) Storage control device, method, program, and storage device
JP4867897B2 (en) Command queuing control device, command queuing program, and storage system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121009

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121210

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130319