================================== これは、 linux-2.6.13/Documentation/usb/error-codes.txt の和訳(ドラフト) です。 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 更新日 : 2005/9/10 翻訳者 : Hiroshi.Suzuki < setter at reset dot jp > 校正者 : ================================== Revised: 2004-Oct-21 改訂: 2004年10月21日 This is the documentation of (hopefully) all possible error codes (and their interpretation) that can be returned from usbcore. これは、usbcore が返す、発生し得る (願わくば) 全エラーコード (および、その説明) の文書です。 Some of them are returned by the Host Controller Drivers (HCDs), which device drivers only see through usbcore. As a rule, all the HCDs should behave the same except for transfer speed dependent behaviors and the way certain faults are reported. いくつかは、ホストコントローラドライバ (HCD) (デバイスドライバだけが usbcore 経由で見る) が返します。 一般的に、すべての HCD は、動作に応じた転送速度と、報告された失敗を確認する方法 を除き、同じ動作をしなければなりません。 ************************************************************************** * Error codes returned by usb_submit_urb * * usb_submit_urb が返すエラーコード * ************************************************************************** Non-USB-specific: USB 特有ではないもの: 0 URB submission went fine 0 URB は正常に処理されました -ENOMEM no memory for allocation of internal structures -ENOMEM 内部構造体を割り当てるためのメモリが不足しています。 USB-specific: USB 特有のもの: -ENODEV specified USB-device or bus doesn't exist -ENODEV 指定された USB デバイスかバスは存在しません -ENOENT specified interface or endpoint does not exist or is not enabled -ENOENT 指定されたインタフェースか末端 (デバイス) は、存在しないか使えま せん。 -ENXIO host controller driver does not support queuing of this type of urb. (treat as a host controller bug.) -ENXIO ホストコントローラドライバで、この種の URB をキューに入れ られません (ホストコントローラのバグとみなします)。 -EINVAL a) Invalid transfer type specified (or not supported) b) Invalid or unsupported periodic transfer interval c) ISO: attempted to change transfer interval d) ISO: number_of_packets is < 0 e) various other cases -EINVAL a) 無効 (または、使えない) な転送の種類が指定されました b) 無効か使えない転送周期です c) ISO: 転送間隔の変更が試みられました d) ISO: number_of_packets (パケットの数) が 0 未満です e) その他の場合 -EAGAIN a) specified ISO start frame too early b) (using ISO-ASAP) too much scheduled for the future wait some time and try again. -EAGAIN a) 指定した、ISO 開始フレームは早すぎます。 b) (ISO-ASAP の使用で) 予約が多過ぎます。しばらく待ってから再度 試みます。 -EFBIG Host controller driver can't schedule that many ISO frames. -EFBIG ホストコントローラドライバは、たくさんの ISO フレームを予約でき ません。 -EPIPE Specified endpoint is stalled. For non-control endpoints, reset this status with usb_clear_halt(). -EPIPE 指定した末端 (デバイス) は止まっています。 末端 (デバイス) が制御できないなら、usb_clear_halt() でこの状態 を、リセットします。 -EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable in the current interface altsetting. (b) ISO packet is biger than endpoint maxpacket (c) requested data transfer size is invalid (negative) -EMSGSIZE (a) 末端 (デバイス) の最大パケットサイズは、0 です。現在のインタ フェースで選択した設定は使えません。 (b) ISO パケットが、末端 (デバイス) の最大パケットより大きくなっ ています。 (c) 要求したデータ転送サイズは無効 (禁止) です。 -ENOSPC This request would overcommit the usb bandwidth reserved for periodic transfers (interrupt, isochronous). -ENOSPC この要求は、周期的 (割り込み、等時性) 転送に予約された帯域まで使 ってしまいます。 -ESHUTDOWN The device or host controller has been disabled due to some problem that could not be worked around. -ESHUTDOWN デバイスかホストコントローラは、何か問題が発生して稼働できないの で、無効になっています。 -EPERM Submission failed because urb->reject was set. -EPERM urb->reject がセットされたので、処理は失敗しました。 -EHOSTUNREACH URB was rejected because the device is suspended. -EHOSTUNREACH デバイスが一時停止しているので、URB は拒否されました。 ************************************************************************** * Error codes returned by in urb->status * * or in iso_frame_desc[n].status (for ISO) * * urb->status か iso_frame_desc[n].status (ISO 用) 内で* * 返されたエラーコード * ************************************************************************** USB device drivers may only test urb status values in completion handlers. This is because otherwise there would be a race between HCDs updating these values on one CPU, and device drivers testing them on another CPU. USB デバイスドライバは、完了ハンドラ内の urb 状態値を検査するだけかもしれません。 なぜなら、そうしないと、単一の CPU でそれら値を更新する時に、他の CPU 上のデバイ スドライバがその値を検査するので、HCD 間で競合するかもしれないからです。 A transfer's actual_length may be positive even when an error has been reported. That's because transfers often involve several packets, so that one or more packets could finish before an error stops further endpoint I/O. エラーが報告されても、転送の actual_length は存在するかもしれません。 それは、転送がしばしば、いくつかのパケットを含んでいるからですが、そのおかげで、 エラーで相手の末端 (デバイス) の入出力が止まる前に、1つ以上のパケットを送信する ことができます。 0 Transfer completed successfully 0 転送は正常に終了しました -ENOENT URB was synchronously unlinked by usb_unlink_urb -ENOENT URB は、 usb_unlink_urb により、同期的に分解されました。 -EINPROGRESS URB still pending, no results yet (That is, if drivers see this it's a bug.) -EINPROGRESS URB が待機中で、結果はまだ返ってきていません。 (すなわち、ドライバがこれを見るなら、それはバグです) -EPROTO (*, **) a) bitstuff error b) no response packet received within the prescribed bus turn-around time c) unknown USB error -EPROTO (*, **) a) ビットエラー b) 所定のバス応答待ち時間内に、応答パケットを受信しませ んでした c) 未知の USB エラー -EILSEQ (*, **) a) CRC mismatch b) no response packet received within the prescribed bus turn-around time c) unknown USB error -EILSEQ (*, **) a) CRC エラー b) 所定のバス応答待ち時間内に、応答パケットを受信しませ んでした c) 未知の USB エラー Note that often the controller hardware does not distinguish among cases a), b), and c), so a driver cannot tell whether there was a protocol error, a failure to respond (often caused by device disconnect), or some other fault. -ETIMEDOUT (**) No response packet received within the prescribed bus turn-around time. This error may instead be reported as -EPROTO or -EILSEQ. -ETIMEDOUT (**) 所定のバス応答待ち時間内に、応答パケットを受信しませんで した。このエラーは、-EPROTO か -EILSEQ として報告される かもしれません Note that the synchronous USB message functions also use this code to indicate timeout expired before the transfer completed. 同期 USB メッセージ機能も、転送が完了する前にタイムアウ トが失効したことを示すために、このコードを使うことに注意 してください。 -EPIPE (**) Endpoint stalled. For non-control endpoints, reset this status with usb_clear_halt(). -EPIPE (**) 末端 (デバイス) は停止しています。 末端 (デバイス) が制御できないなら、usb_clear_halt() で この状態を、リセットします。 -ECOMM During an IN transfer, the host controller received data from an endpoint faster than it could be written to system memory -ECOMM IN (受信) 転送中、ホストコントローラが、末端 (デバイス) からデータを受信する速度が、システムメモリへの書き込み処 理能力を超えています。 -ENOSR During an OUT transfer, the host controller could not retrieve data from system memory fast enough to keep up with the USB data rate -ENOSR OUT (出力) 転送中、システムメモリからの読み出し処理速度 が、USB データ転送速度を維持できません。 -EOVERFLOW (*) The amount of data returned by the endpoint was greater than either the max packet size of the endpoint or the remaining buffer size. "Babble". -EOVERFLOW (*) 末端 (デバイス) から返ってきたデータ量が、末端 (デバイス)の最大パケットサイズか残存バッファサイズを超え てます。"Babble" (はっきりとは言いませんが / たぶん ?) -EREMOTEIO The data read from the endpoint did not fill the specified buffer, and URB_SHORT_NOT_OK was set in urb->transfer_flags. -EREMOTEIO 末端 (デバイス) からの受信データは、指定したバッファを使 いきらず、URB_SHORT_NOT_OK が、urb->transfer_flags にセ ットされました。 -ENODEV Device was removed. Often preceded by a burst of other errors, since the hub driver does't detect device removal events immediately. -ENODEV デバイスは取り除かれました。 ハブドライバがデバイスが取り除かれたことを直ちに検出しな いので、しばしば、他の突然発生したエラーが先になります。 -EXDEV ISO transfer only partially completed look at individual frame status for details -EXDEV ISO 転送は、個々のフレーム状態の詳細を見て、一部分だけ完 了しました。 -EINVAL ISO madness, if this happens: Log off and go home -EINVAL ISO 狂乱、これが発生したなら: ログオフして家に帰りましょ う。 -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb -ECONNRESET URB は、 usb_unlink_urb により、非同期に分解されました。 -ESHUTDOWN The device or host controller has been disabled due to some problem that could not be worked around, such as a physical disconnect. -ESHUTDOWN デバイスかホストコントローラは、何か問題 (物理的な切断な どの) が発生して稼働できないので、無効になっています。 (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate hardware problems such as bad devices (including firmware) or cables. (*) -EPROTO, -EILSEQ , -EOVERFLOW のようなエラーコードは、通常、デバイスかケーブ ル不良のような、ハードウェアの問題を示しています。 (**) This is also one of several codes that different kinds of host controller use to to indicate a transfer has failed because of device disconnect. In the interval before the hub driver starts disconnect processing, devices may receive such fault reports for every request. (**) これは、デバイスが取り除かれたために転送が失敗したことを示すために、異なる 種類のホストコントローラを使う、いくつかのコードのひとつでもあります。ハブドライ バが取り外し処理を開始するまでの間、デバイスは、すべての要求でそのような失敗の報 告を受けるかもしれません。 ************************************************************************** * Error codes returned by usbcore-functions * * (expect also other submit and transfer status codes) * * usbcore 機能が返すエラーコード * * (他の、処理依頼と転送状態コードも必要です) * ************************************************************************** usb_register(): -EINVAL error during registering new driver -EINVAL 新しいドライバを登録中のエラー usb_get_*/usb_set_*(): usb_control_msg(): usb_bulk_msg(): -ETIMEDOUT Timeout expired before the transfer completed. In the future this code may change to -ETIME, whose definition is a closer match to this sort of error. -ETIMEDOUT 転送が完了する前にタイムアウトが失効した。 将来、コードは -ETIME に変更されるかもしれません。 しかし、定義は、このエラーのようなものに、よく似ています。