JPH07271704A - Device controller - Google Patents
Device controllerInfo
- Publication number
- JPH07271704A JPH07271704A JP8357194A JP8357194A JPH07271704A JP H07271704 A JPH07271704 A JP H07271704A JP 8357194 A JP8357194 A JP 8357194A JP 8357194 A JP8357194 A JP 8357194A JP H07271704 A JPH07271704 A JP H07271704A
- Authority
- JP
- Japan
- Prior art keywords
- command
- control
- timer
- file
- scsi
- 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
Links
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、SCSIインターフェ
イスをもつプロセッサ型デバイスの制御を行なうデバイ
ス制御装置に関し、特に、1つの駆動プログラムで複数
の異なる種類のプロセッサ型デバイスの制御を可能にし
たものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device control device for controlling a processor type device having a SCSI interface, and more particularly to a device control apparatus capable of controlling a plurality of different types of processor type devices with one drive program. is there.
【0002】[0002]
【従来の技術】近年、パソコンやワークステーションの
標準インターフェイスとして注目を集めているSCSI
(Small Computer System In
terface)は、ANSI(アメリカ規格協会)で
承認されている、小型コンピュータと周辺装置とを接続
する標準インターフェイスである。SCSIによってイ
ンタフェースを図るバスには、最大8台の装置を接続す
ることができ、各装置のそれぞれには0〜7の認識番号
が付けられる。各装置は、バス上でデータを転送すると
き、イニシエータになる場合とターゲットになる場合と
がある。イニシエータとは、必要とするデバイスを選択
しコマンドを与えて制御する機能を備えた装置であり、
ターゲットとは、イニシエータの管理下で命令コマンド
に従い実行する機能を備えた装置である。イニシエータ
は、ターゲットを選択する場合、ターゲットとなるそれ
ぞれの装置がもつロジカル・ユニットという子装置に付
けられた論理ユニット番号(LUN:Logical
Unit Number)を指定する。2. Description of the Related Art In recent years, SCSI has attracted attention as a standard interface for personal computers and workstations.
(Small Computer System In
The interface is a standard interface for connecting a small computer and a peripheral device, which is approved by ANSI (American National Standards Institute). A maximum of eight devices can be connected to the bus that is interfaced by SCSI, and each device is given an identification number of 0 to 7. Each device may be an initiator or a target when transferring data on the bus. An initiator is a device equipped with a function of selecting a required device and giving a command to control the device.
The target is a device having a function of executing an instruction command under the control of the initiator. When selecting a target, the initiator has a logical unit number (LUN: Logical) attached to a child device called a logical unit of each target device.
(Unit Number) is specified.
【0003】SCSI規格で規定されたデバイスの型に
は、ハード・ディスクなどのダイレクト・アクセス・デ
バイス、磁気テープなどのシーケンシャル・アクセス・
デバイス、プロセッサ型デバイスがあり、その他にプリ
ンタ・デバイス、スキャナ・デバイス、ライト・ワンス
・デバイス、CD−ROMデバイス、MOディスクなど
の光記憶デバイスや、媒体交換装置、通信デバイスがあ
る。イニシエータから送られる命令は、各デバイス型に
対してそれぞれの標準コマンドが定義されている。The types of devices defined by the SCSI standard include direct access devices such as hard disks and sequential access devices such as magnetic tapes.
There are devices and processor type devices, and in addition, there are printer devices, scanner devices, write-once devices, CD-ROM devices, optical storage devices such as MO disks, medium exchange devices, and communication devices. The standard command defined for each device type is defined as the command sent from the initiator.
【0004】プロセッサ型デバイスは、コンピュータデ
バイスとしての機能をもつターゲットであり、イニシエ
ータから受取ったコマンドに応じて、データパケットの
送受信、属性情報の転送、センスデータの取得、及びバ
ス上デバイスの存在確認を行なう。The processor type device is a target having a function as a computer device, and according to the command received from the initiator, data packet transmission / reception, attribute information transfer, sense data acquisition, and existence confirmation of the device on the bus are performed. Do.
【0005】以下に、イニシエータとプロセッサ型デバ
イスとの間で使用されるコマンドの説明をする。イニシ
エータは、ターゲットからデータを受信する場合に、タ
ーゲットに対してRECEIVEコマンドを発行し、タ
ーゲットへデータを送信する場合に、SENDコマンド
を発行する。SENDコマンドおよびRECEIVEコ
マンドによって送られる情報の内容については規定がな
いため、プロセッサ型デバイス装置の駆動を制御するプ
ログラムは、様々なプロセッサ型デバイス装置に対応す
ることが可能である。The commands used between the initiator and the processor type device will be described below. The initiator issues a RECEIVE command to the target when receiving data from the target, and issues a SEND command when transmitting data to the target. Since the content of the information sent by the SEND command and the RECEIVE command is not specified, the program for controlling the drive of the processor type device unit can correspond to various processor type device units.
【0006】また、イニシエータは、デバイスの属性情
報を取得する場合に、ターゲットに対してINQUIR
Yコマンドを発行する。それを受けて、デバイスの属性
情報がINQUIRYデータとしてターゲットから通知
される。また、前に実行されたコマンドがエラーの場合
には、異常理由を確認するため、ターゲットに対してR
EQUEST SENSEコマンドを発行し、異常理由
をSENSEデータとしてターゲットから取得する。ま
た、イニシエータは、バス上にデバイスが存在するか、
使用可能な状態かを確認する場合に、ターゲットに対し
てTEST UNIT READYコマンドを発行す
る。Further, when the initiator acquires the attribute information of the device, the initiator INQUIRs the target.
Issue a Y command. In response to this, the attribute information of the device is notified from the target as INQUIRY data. If the command executed previously is an error, the R
Issue the EQUEST SENSE command and acquire the reason for the abnormality as SENSE data from the target. Also, the initiator will check if there are any devices on the bus.
When checking whether it is in a usable state, a TEST UNIT READY command is issued to the target.
【0007】次にSCSIプロセッサ型デバイスを制御
する装置の構成を説明する。図10は米国サンソフト社
のソラリス2.2システムにおける従来のSCSIプロ
セッサ型デバイス制御装置の構成図である。図10にお
いて、1001はユーザプロセスでシステムコールの発
行により装置とのデータ転送を行なう。1002はソラ
リス2.2オペレーティングシステムで米国サンソフト
社のOSであり、ハードウェア資源を複数のユーザプロ
セスへ有効に割り当てる。1003は磁気ディスク型タ
ーゲットドライバで1008のハード・ディスク型装置
の駆動を制御し、1001のユーザプロセスが発行した
システムコールをハード・ディスク型装置用のSCSI
コマンドに変換し、前記コマンドの実行を1006のホ
ストアダプタドライバに依頼する。1004は磁気テー
プ型ターゲットドライバで1009の磁気テープ型装置
の駆動を制御し、1001のユーザプロセスが発行した
システムコールを磁気テープ型装置用のSCSIコマン
ドに変換し、前記コマンドの実行を1006のホストア
ダプタドライバに依頼する。1005はプロセッサデバ
イス型ターゲットドライバで1010のプロセッサデバ
イス型装置の駆動を制御し、1001のユーザプロセス
が発行したシステムコールをプロセッサデバイス型装置
用のSCSIコマンドに変換し、前記コマンドの実行を
1006のホストアダプタドライバに依頼する。100
6はホストアダプタドライバで前記各ターゲットドライ
バより依頼されたSCSIコマンドを前記各デバイス装
置に発行する。1007はSCSIバスでコンピュータ
本体と周辺装置を接続する。Next, the structure of an apparatus for controlling a SCSI processor type device will be described. FIG. 10 is a block diagram of a conventional SCSI processor type device control device in the Solaris 2.2 system of Sunsoft Corporation. In FIG. 10, a user process 1001 transfers data with the device by issuing a system call. Reference numeral 1002 denotes a Solaris 2.2 operating system, which is an OS of Sunsoft Corp. of the United States of America, which effectively allocates hardware resources to a plurality of user processes. A magnetic disk type target driver 1003 controls driving of the hard disk type device 1008, and executes a system call issued by a user process 1001 to the SCSI for the hard disk type device.
It is converted into a command, and the host adapter driver 1006 is requested to execute the command. A magnetic tape type target driver 1004 controls the drive of the magnetic tape type device 1009, converts the system call issued by the user process 1001 into a SCSI command for the magnetic tape type device, and executes the command by the host 1006. Ask the adapter driver. A processor device type target driver 1005 controls driving of the processor device type device 1010, converts a system call issued by a user process 1001 into a SCSI command for the processor device type device, and executes the command by a host 1006. Ask the adapter driver. 100
A host adapter driver 6 issues a SCSI command requested by each target driver to each device. Reference numeral 1007 is a SCSI bus for connecting the computer main body and peripheral devices.
【0008】次にSCSIプロセッサ型デバイスの認識
手順について説明する。図11は従来のSCSIプロセ
ッサ型デバイスを認識する手順のフローであり、プロセ
ッサ型デバイスターゲットドライバ1005により実行
される。Next, a procedure for recognizing a SCSI processor type device will be described. FIG. 11 is a flow of a procedure for recognizing a conventional SCSI processor type device, which is executed by the processor type device target driver 1005.
【0009】ステップ1101;プロセッサ型デバイス
ターゲットドライバ1005は、TEST UNIT
READYコマンドを発行して、バス上のデバイスが使
用可能な状態であるかを検査する。Step 1101; the processor-type device target driver 1005 uses the TEST UNIT
Issue a READY command to verify that the devices on the bus are ready for use.
【0010】ステップ1102;前記検査結果により、
使用不可能である場合は、ステップ1109;エラーコ
ードに、デバイスが故障である旨を設定しエラー終了す
る。Step 1102; According to the inspection result,
If the device cannot be used, step 1109; The error code is set to indicate that the device is defective, and the processing ends in error.
【0011】ステップ1103;使用可能であるとき
は、INQUIRYコマンドを発行することにより、デ
バイスの情報であるデバイスの型、製造元であるベン
ダ、製品ID、その他デバイスの固有情報をINQUI
RYデータとして取得する。Step 1103; When the device is available, the INQUIRY command is issued to display the device type, which is the device information, the vendor, the product ID, and other unique information of the device.
Obtained as RY data.
【0012】ステップ1104;この実行コマンドが正
常終了したかを検査し、エラーの場合は、ステップ11
10;エラーコードに、問い合わせに対する応答がない
旨を設定しエラー終了する。Step 1104: It is checked whether or not this execution command has ended normally, and if there is an error, Step 11
10; The error code is set to indicate that there is no response to the inquiry, and the processing ends in error.
【0013】ステップ1105;この実行コマンドが正
常終了しているときは、取得したデバイス情報に基づ
き、デバイス型がプロセッサ型デバイスであるかどうか
を検査する。プロセッサ型デバイスでない場合は、ステ
ップ1111;エラーコードに、プロセッサ型デバイス
でない旨を設定しエラー終了する。Step 1105: When this execution command is completed normally, it is checked whether the device type is a processor type device based on the acquired device information. If it is not a processor type device, step 1111; The error code is set to the effect that it is not a processor type device, and the processing ends in error.
【0014】ステップ1106;プロセッサ型デバイス
であるときは、デバイス情報に基づき、製品IDがプロ
セッサ型デバイスターゲットドライバのプログラム内で
あらかじめ固定的に定めている制御対象デバイスに該当
するかどうかを検査する。そうでない場合は、ステップ
1112;該当デバイスでない旨を設定しエラー終了す
る。Step 1106: If it is a processor type device, it is checked based on the device information whether or not the product ID corresponds to a control target device fixed in advance in the program of the processor type device target driver. If not, step 1112; it is set that the device is not the corresponding device, and the process ends in error.
【0015】ステップ1107;制御対象デバイスであ
るときは、作業領域を確保し、ステップ1108;制御
対象デバイスに対応する名前をもつデバイスファイルを
作成し、正常終了する。Step 1107: If the device is a control target device, a work area is secured, and step 1108; a device file having a name corresponding to the control target device is created, and the process ends normally.
【0016】このデバイスファイルは、ユーザプロセス
1001がデバイス装置を制御する時に使用するアクセ
スポイントであり、ソラリス2.2オペレーティングシ
ステム内に作成される。This device file is an access point used when the user process 1001 controls the device, and is created in the Solaris 2.2 operating system.
【0017】次にSCSIプロセッサ型デバイス制御装
置のデータ転送制御手順について説明する。図12は従
来のSCSIプロセッサ型デバイス制御装置のデータ転
送制御手順を示すフローであり、図10のユーザプロセ
ス101がプロセッサ型デバイス装置1010に対して
read、write等のシステムコールを発行した時
にコールされる。Next, a data transfer control procedure of the SCSI processor type device controller will be described. FIG. 12 is a flow chart showing a data transfer control procedure of the conventional SCSI processor type device control apparatus, which is called when the user process 101 of FIG. 10 issues a system call such as read or write to the processor type device apparatus 1010. It
【0018】ステップ1201;SCSIコマンドの実
行に必要とされる資源を取得する。 ステップ1202;ユーザプロセスがプロセッサ型デバ
イスに対し処理を要求するために発行するシステムコー
ルをプロセッサ型デバイス装置用のSCSIコマンドに
変換する。例えばreadシステムコールの場合はRE
CEIVEコマンドに、writeシステムコールの場
合はSENDコマンドに、ioctlシステムコールは
指示命令により異なり、デバイスの存在確認を行なう命
令の時はTEST UNIT READYコマンドに、
デバイス情報取得命令の時はINQUIRYコマンドに
それぞれ変換される。Step 1201; Get the resources needed to execute the SCSI command. Step 1202: The system call issued by the user process to request the processor type device for processing is converted into a SCSI command for the processor type device unit. For example, in case of read system call, RE
The CIVE command, the SEND command for the write system call, the ioctl system call differ depending on the instruction command, and the TEST UNIT READY command for the command to confirm the existence of the device.
When it is a device information acquisition command, it is converted into an INQUIRY command.
【0019】ステップ1203;ステップ1202で作
成したSCSIコマンドの実行をホストアダプタドライ
バ1006に依頼し、ステップ1204;コマンドの実
行終了待ち状態となる。実行が終了すると、ステップ1
205;SCSIコマンドの実行結果の解析を行ない、
ステップ1206;解析の結果が正常かどうかを検査
し、異常が無ければ正常終了し、異常が検知された場合
は、ステップ1207;エラーコードを設定し、エラー
終了する。Step 1203: The host adapter driver 1006 is requested to execute the SCSI command created in Step 1202, and Step 1204; the command execution completion waiting state is entered. When execution is complete, step 1
205; analyze the execution result of the SCSI command,
Step 1206: It is checked whether or not the result of the analysis is normal, and if there is no abnormality, the operation ends normally. If an abnormality is detected, Step 1207; an error code is set and the operation ends in error.
【0020】[0020]
【発明が解決しようとする課題】しかし、従来のデバイ
ス制御装置では、次のような問題がある。第1に、制御
の対象となるデバイスの製品IDがプロセッサ型デバイ
スターゲットドライバ1005のプログラム内にあらか
じめ定められているため、複数の種類のプロセッサ型デ
バイスの駆動を制御する場合、それぞれのデバイス毎に
専用の認識処理部をもつ駆動プログラムが必要となる。
従って、複数のデバイスに対し、図12に示した手順を
採るデータ転送制御処理部を共通に使用できる場合で
も、認識処理部については重複してメモリに展開される
ので、メモリ資源が無駄に使われるという問題点を有し
ていた。However, the conventional device control apparatus has the following problems. First, since the product ID of the device to be controlled is predetermined in the program of the processor-type device target driver 1005, when controlling the driving of a plurality of types of processor-type devices, each device is controlled individually. A drive program with a dedicated recognition processing unit is required.
Therefore, even if the data transfer control processing unit adopting the procedure shown in FIG. 12 can be commonly used for a plurality of devices, the recognition processing unit is redundantly expanded in the memory, and the memory resources are wasted. It had the problem of being exposed.
【0021】第2に、制御対象となる装置がOEMされ
た場合、OEM先で装置の販売元に応じて製品IDが変
更される可能性がある。製品IDを変更した場合は、製
品IDの認識処理部において、図11のステップ110
6に示す製品IDの「A」を逐次変更しなければならな
いため、メンテナンスが面倒であり、汎用性の乏しい駆
動プログラムであるという問題点を有していた。Second, when the device to be controlled is OEM, the product ID may be changed at the OEM destination according to the vendor of the device. If the product ID has been changed, the product ID recognition processing unit proceeds to step 110 of FIG.
Since the product ID “A” shown in FIG. 6 has to be changed sequentially, there is a problem that the maintenance is troublesome and the driving program is poor in versatility.
【0022】第3に、従来のシステムでは、制御対象が
SCSIデバイスの場合、図12のステップ1202で
ユーザプロセスがプロセッサ型装置に対して発行したシ
ステムコールをSCSIコマンドに変換し、ステップ1
203で前記コマンドの実行をホストアダプタドライバ
1006に依頼し、ステップ1204で前記コマンドの
実行終了待ち状態となるが、この実行終了待ち状態の時
には、シグナルを受信しても、前記システムコールを中
断することができない。そのため、装置から前記コマン
ドの実行終了通知が来ない場合は、何時間でもシステム
コールが終了しないので、ユーザプロセスはデバイス制
御以外の、例えばパイプ読み込みなどの処理を並行して
行なうことが不可能になる。Thirdly, in the conventional system, when the control target is a SCSI device, the system call issued by the user process to the processor type device in step 1202 of FIG. 12 is converted into a SCSI command, and step 1
In step 203, the host adapter driver 1006 is requested to execute the command, and in step 1204, the command execution end wait state is entered. In this execution end wait state, the system call is interrupted even if a signal is received. I can't. Therefore, if the device does not receive the execution completion notification of the command, the system call does not end for many hours, so it is impossible for the user process to perform processing other than device control, such as pipe reading, in parallel. Become.
【0023】実行中のSCSIコマンドを、一定時間経
過後に中断し、制御をユーザプロセスへ復帰する手段と
して、ステップ1203でSCSIコマンドの実行を依
頼する際、ホストアダプタドライバ1006に対して、
前記コマンドの実行終了を監視するタイマを指定する方
法がある。しかしこの場合、前記タイマがタイムアウト
すると、デバイスの状態に関わらず全ての装置がリセッ
トされてしまい、装置によっては不具合が生じることが
ある。When the execution of the SCSI command is requested in step 1203 as a means for interrupting the running SCSI command after a lapse of a certain time and returning control to the user process, the host adapter driver 1006
There is a method of designating a timer for monitoring the completion of execution of the command. However, in this case, when the timer times out, all the devices are reset regardless of the state of the device, which may cause a problem in some devices.
【0024】例えば、後述する8チャネルFAX通信装
置(図1の103に示すFEP装置)では、通常イニシ
エータからのRECEIVEコマンド受信により、バス
をdisconnect(切断)し、通信イベント発生
時に、バスをreconnect(再接続)し、発生し
た通信イベントの内容をデータとしてイニシエータに転
送し、終了ステータスを同様にイニシエータに転送する
処理が行なわれる。しかし、次に発生する通信イベント
が到着するまでの時間は一定時間内に制限できないた
め、装置がアイドル状態の場合などには、通信イベント
がなく、RECEIVEコマンド終了までの時間が予測
できない。このようなときに、前記タイマを使用する
と、コマンドの実行中にホストアダプタドライバ100
6が装置をリセットする可能性がある。その場合、装置
は電源投入後の状態となり、再度起動、及びシステムパ
ラメタ初期値の設定など、起動時に行なわれるべき処理
が必要となり、その時点まで行なわれていた処理が全て
無駄になってしまうという不具合が発生する。For example, in an 8-channel FAX communication device (FEP device shown by 103 in FIG. 1) which will be described later, when the RECEIVE command is normally received from the initiator, the bus is disconnected and the bus is connected when the communication event occurs. Reconnection), the content of the communication event that occurred is transferred to the initiator as data, and the end status is similarly transferred to the initiator. However, since the time until the arrival of the next communication event cannot be limited within a fixed time, when the device is in the idle state, there is no communication event and the time until the end of the RECEIVE command cannot be predicted. In such a case, if the timer is used, the host adapter driver 100 can be executed during the execution of the command.
6 may reset the device. In that case, the device will be in a state after the power is turned on, and the processes that should be performed at the time of startup, such as restarting and setting the initial values of system parameters, are required, and all the processes that have been performed up to that point are wasted. A problem occurs.
【0025】こうしたことから、従来の装置では、コマ
ンドの実行が開始すると、実行中コマンドを中断するこ
となく、その終了を待っている。そのため、シグナルを
受信しても、前記システムコールから復帰できないた
め、ユーザプロセスは、デバイス制御と並行して、パイ
プ読み込みなどの他の処理を行なうことができないとい
う問題点を有している。For this reason, in the conventional apparatus, when the execution of a command is started, the command being executed is awaited for its end without being interrupted. Therefore, even if a signal is received, the system call cannot return, so that the user process has a problem that it cannot perform other processing such as pipe reading in parallel with device control.
【0026】本発明は、こうした従来の問題点を解決す
るものであり、1つの駆動プログラムをメモリ上に展開
するだけで複数の異なる種類のプロセッサ型デバイスを
制御することができる、メモリ資源の節約が可能なデバ
イス制御装置を提供することを目的としている。The present invention solves these conventional problems and saves memory resources by controlling a plurality of different types of processor-type devices simply by developing a single drive program on the memory. It is an object of the present invention to provide a device control device capable of
【0027】また、デバイス情報が変更された場合で
も、駆動制御のドライバプログラムをその都度変更する
必要がない、メンテナンスの楽な、汎用性の高いプログ
ラムを備えたデバイス制御装置を提供することを目的と
している。It is another object of the present invention to provide a device control apparatus equipped with a highly versatile program that does not require a driver program for drive control to be changed each time even when device information is changed. I am trying.
【0028】また、装置からのコマンド実行終了通知が
ない場合でも、一定の時間をもって実行中のコマンドを
中断し、システムコールを終了させることができ、ま
た、そのために生ずる不具合を抑えることができるデバ
イス制御装置を提供することを目的としている。Even if there is no command execution end notification from the device, the command being executed can be interrupted for a certain period of time to terminate the system call, and a device which can prevent the trouble caused thereby can be suppressed. The purpose is to provide a control device.
【0029】[0029]
【課題を解決するための手段】そこで、本発明では、S
CSIバスに接続されたプロセッサ型デバイスに対して
制御を行なうデバイス制御装置において、制御対象とな
るデバイスとこのデバイスに対応するデバイスファイル
との集合を規定する制御対象規定手段と、プロセッサ型
デバイスから得たデバイス情報を基に、このデバイスが
制御対象のデバイスに含まれるかどうかを検査するデバ
イス認識手段とを設け、デバイスが前記集合に含まれる
場合に前記デバイスファイルを作成するように構成して
いる。Therefore, in the present invention, S
In a device control device for controlling a processor type device connected to a CSI bus, a control target defining means for defining a set of a device to be controlled and a device file corresponding to the device, and a device to be controlled from the processor type device. Device recognition means for inspecting whether this device is included in the devices to be controlled based on the device information, and is configured to create the device file when the device is included in the set. .
【0030】また、制御対象規定手段を、デバイスとそ
の名前との集合を規定する変数と、この変数の内容を設
定するファイルとによって構成している。The controlled object defining means is composed of a variable defining a set of devices and their names, and a file for setting the contents of this variable.
【0031】また、SCSIコマンドの実行終了を監視
するタイマと、タイマのタイマ値を設定するタイマ値設
定手段と、タイマがタイムアウトした場合に実行中のS
CSIコマンドを、ターゲットをリセットせずにアボー
ト(中断)するアボート処理手段とを設けている。Further, a timer for monitoring the completion of execution of the SCSI command, a timer value setting means for setting the timer value of the timer, and an S which is being executed when the timer times out.
Abort processing means for aborting (interrupting) the CSI command without resetting the target is provided.
【0032】また、処理の必要なイベントの種類につい
て設定する設定手段とこのイベントの発生を検査する検
査手段とを設け、タイマがタイムアウトしたとき、この
イベントが発生している場合にのみ、アボート処理手段
にアボート処理を行なわせている。Further, setting means for setting the type of event that needs to be processed and inspection means for inspecting the occurrence of this event are provided, and when the timer times out, the abort processing is performed only when this event has occurred. Causes the means to perform an abort process.
【0033】さらに、デバイスの故障の有無を調査する
調査手段を設け、アボート処理手段がアボート処理を行
なった後に、この調査手段がデバイスについての調査を
行なうように構成している。Further, an inspection means for inspecting the presence or absence of a device failure is provided, and after the abort processing means performs the abort processing, this inspection means is configured to inspect the device.
【0034】[0034]
【作用】そのため、制御対象となるデバイスを集合によ
り規定しているので、デバイスを個々に認識処理するた
めのプログラムが不要になり、1つの駆動プログラムで
複数の異なる種類のプロセッサ型デバイスを制御するこ
とが可能になり、メモリ資源を節減することができる。Therefore, since the devices to be controlled are defined by a set, a program for individually recognizing the devices is not required, and one drive program controls a plurality of different types of processor type devices. It becomes possible to save memory resources.
【0035】また、制御対象を変数で規定するととも
に、変数の内容をファイルで規定しているため、OEM
先において製品IDが変更される場合でも、ファイルの
内容を変更することで対応することができ、プログラム
のメンテナンスが簡単になり、汎用性が増す。Further, since the controlled object is defined by the variable and the content of the variable is defined by the file, the OEM
Even if the product ID is changed in advance, it can be dealt with by changing the content of the file, which simplifies the maintenance of the program and increases versatility.
【0036】また、SCSIコマンドの実行終了を監視
するタイマを設けたものでは、タイムアウトの場合、ア
ボート処理手段により、デバイスをリセットせずに実行
中コマンドの中断が行なわれる。その結果、制御をユー
ザプロセスに復帰させることができ、ユーザプロセスは
他のイベントの処理を行なうことが可能になる。また、
SCSIコマンドの実行を再開する必要が生じた場合に
は、デバイスがリセットされていないため、迅速に再開
させることができる。Further, in the case where the timer for monitoring the completion of the execution of the SCSI command is provided, in the case of timeout, the abort processing means suspends the command being executed without resetting the device. As a result, control can be returned to the user process, and the user process can process other events. Also,
If it becomes necessary to restart the execution of the SCSI command, the device is not reset and can be restarted quickly.
【0037】また、イベントの種類を設定する手段を設
けたものでは、タイムアウトの場合に、設定したイベン
トが実際に発生しているときに限って、アボート処理を
行ない、その他のときはタイマを再スタートさせる。そ
のため、実行中コマンドのアボート処理の回数が減り、
イニシエータとターゲットとの両方の負荷が軽減でき
る。また、コマンドの実行の継続を優先させることもで
きるし、それを上回る優先度を備えたイベントが発生し
たときには、タイムアウト後に直ちにその処理を実行す
る態勢を組むこともできる。With the means for setting the type of event, the abort process is executed only when the set event actually occurs in the case of a timeout, and the timer is restarted in other cases. Start. Therefore, the number of abort processing of the command being executed decreases,
The load on both the initiator and target can be reduced. Further, the continuation of command execution can be prioritized, and when an event having a priority higher than that can occur, the process can be executed immediately after a timeout.
【0038】さらに、デバイスの調査手段を設けたもの
では、タイムアウトした原因がデバイスの故障によるも
のか、またはデバイスは正常動作しているがイニシエー
タに対して送るデータがないためにタイムアウトになっ
たものかを切り分けることができ、この判定結果をユー
ザプロセスに通知することにより、ユーザプロセスは、
自らシステムコール発行してデバイス状態を確認する必
要が無くなり、負荷を軽減することができる。Further, in the case where the device investigation means is provided, the time-out may be due to the device failure, or the device may be operating normally but there is no data to be sent to the initiator. Can be separated, and by notifying the user process of this determination result, the user process can
It is no longer necessary to issue a system call by itself to check the device status, and the load can be reduced.
【0039】[0039]
【実施例】本発明の実施例におけるSCSIプロセッサ
型デバイス制御装置の構成を図面を参照しながら説明す
る。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The configuration of a SCSI processor type device controller according to an embodiment of the present invention will be described with reference to the drawings.
【0040】図1は、プロセッサ型デバイス装置である
FEP装置とVRC装置とを制御する装置の構成図であ
る。図1において、101はホストコンピュータであ
り、ターゲットとなるプロセッサ型デバイス装置に対し
てSCSIコマンドを与えて制御する機能をもつイニシ
エータである。102のSCSIバスは、ホストコンピ
ュータ101と、103のFEP装置及び106のVR
C装置とを接続する。FEP装置103は、8チャネル
FAX通信装置であり、2つの論理ユニット104、1
05をもつ。104の論理ユニット0は、イニシエータ
からSENDコマンドを受付け、イニシエータからの命
令及びデータを受信する。105の論理ユニット1は、
イニシエータからRECEIVEコマンドを受付け、イ
ニシエータに対して応答及びデータを転送する。106
のVRC装置は、コード情報をラスタ変換する装置であ
り、FEP装置103と同様に2つの論理ユニット10
7、108をもつ。107の論理ユニット0は、イニシ
エータからSENDコマンドを受付け、イニシエータか
らの命令及びデータを受信する。108の論理ユニット
1は、イニシエータからRECEIVEコマンドを受付
け、イニシエータに対して応答及びデータを転送する。
109はFEP制御送信プロセスで、論理ユニット0
(104)に対応するデバイスファイルである、115
の/dev/fep0に対してwriteシステムコー
ルを発行し、FEP装置103へ命令及びデータを転送
する。110はFEP制御受信プロセスで、論理ユニッ
ト1(105)に対応するデバイスファイルである、1
16の/dev/fep1に対してreadシステムコ
ールを発行し、FEP装置103からの応答及びデータ
を受信する。FIG. 1 is a block diagram of a device for controlling the FEP device and the VRC device which are processor type device devices. In FIG. 1, reference numeral 101 denotes a host computer, which is an initiator having a function of giving a SCSI command to a target processor-type device unit to control it. The SCSI bus 102 includes a host computer 101, a FEP device 103, and a VR VR 106.
Connect to C device. The FEP device 103 is an 8-channel FAX communication device, and includes two logical units 104, 1
With 05. Logic unit 0 at 104 accepts the SEND command from the initiator and receives instructions and data from the initiator. Logical unit 1 of 105
It receives a RECEIVE command from the initiator and transfers a response and data to the initiator. 106
The VRC device is a device for rasterizing code information, and like the FEP device 103, it has two logical units 10.
7 and 108. Logic unit 0 at 107 accepts the SEND command from the initiator and receives instructions and data from the initiator. The logical unit 1 of 108 receives the RECEIVE command from the initiator and transfers a response and data to the initiator.
109 is an FEP control transmission process, which is a logical unit 0
115, which is the device file corresponding to (104)
A write system call is issued to / dev / fep0 of the device and the instruction and data are transferred to the FEP device 103. Reference numeral 110 denotes an FEP control reception process, which is a device file corresponding to the logical unit 1 (105).
A read system call is issued to 16 / dev / fep1, and a response and data from the FEP device 103 are received.
【0041】前記プロセス109、110は、双方向の
データパスである、111のパイプにより繋がれてお
り、FEP装置103の制御の同期をとるため互いにデ
ータ転送を行なう。FEP制御送信プロセス109は、
FEP制御受信プロセス110にデータを転送する場
合、パイプ111に対してwriteシステムコールを
発行する。その際、FEP制御送信プロセス109は、
SIGINTと呼ばれる割込みシグナルを発行し、FE
P制御受信プロセス110に対しデータの到着を通知す
る。FEP制御受信プロセス110は、このシグナルを
受信すると、パイプ111に対し、readシステムコ
ールを発行しFEP制御送信プロセス109からのデー
タを受信する。FEP制御受信プロセス110からFE
P制御送信プロセス109への逆方向でのデータ転送の
場合も同様の処理をする。112はVRC制御プロセス
で、論理ユニット0(107)に対応するデバイスファ
イルである、117の/dev/vrc0に対してwr
iteシステムコールを発行し、VRC装置106へ命
令及びデータを転送し、また、論理ユニット1(10
8)に対応するデバイスファイルである、118の/d
ev/vrc1に対してreadシステムコールを発行
し、VRC装置106からの応答及びデータを受信す
る。113はソラリス2.2オペレーティングシステム
(以下OSと呼ぶ。)で米国サンソフト社のOSであ
り、ハードウェア資源を複数のユーザプロセスへ有効に
割り当てる。The processes 109 and 110 are connected by a pipe 111, which is a bidirectional data path, and perform data transfer with each other in order to synchronize the control of the FEP device 103. The FEP control transmission process 109
When transferring data to the FEP control reception process 110, a write system call is issued to the pipe 111. At that time, the FEP control transmission process 109
Issue an interrupt signal called SIGINT and
The P control reception process 110 is notified of the arrival of data. Upon receiving this signal, the FEP control reception process 110 issues a read system call to the pipe 111 and receives the data from the FEP control transmission process 109. FEP control reception process 110 to FE
Similar processing is performed in the case of data transfer in the reverse direction to the P control transmission process 109. Reference numeral 112 denotes a VRC control process, which is a device file corresponding to the logical unit 0 (107) and is wr for 117 / dev / vrc0.
ITE system call to transfer instructions and data to the VRC device 106, and also to the logical unit 1 (10
8 / d, which is a device file corresponding to 8)
It issues a read system call to ev / vrc1 and receives a response and data from the VRC device 106. Reference numeral 113 denotes a Solaris 2.2 operating system (hereinafter referred to as an OS), which is an OS of Sunsoft, Inc. in the United States, which effectively allocates hardware resources to a plurality of user processes.
【0042】OS113は、114のファイルシステム
をもつ。ファイルシステム114上のデバイスファイル
である/dev/fep0(115)は、FEP制御送
信プロセス109に対して、FEP装置103の論理ユ
ニット0(104)へのアクセスポイントを提供し、ま
た、/dev/fep1(116)は、FEP制御受信
プロセス110に対して、FEP装置103の論理ユニ
ット1(105)へのアクセスポイントを提供し、ま
た、/dev/vrc0(117)は、VRC制御プロ
セス112に対して、VRC装置106の論理ユニット
0(107)へのアクセスポイントを提供し、また、/
dev/vrc1(118)は、VRC制御プロセス1
12に対して、VRC装置106の論理ユニット1(1
08)へのアクセスポイントを提供する。119の/e
tc/systemファイルは、OS113内部のシス
テムパラメタ情報初期値を規定するもので、OS113
は起動時に前記ファイルを読み、規定されている変数に
対して規定されている初期値を設定する。The OS 113 has 114 file systems. The device file / dev / fep0 (115) on the file system 114 provides the FEP control transmission process 109 with an access point to the logical unit 0 (104) of the FEP device 103, and also / dev / The fep1 (116) provides the FEP control reception process 110 with an access point to the logical unit 1 (105) of the FEP device 103, and / dev / vrc0 (117) provides the VRC control process 112. To provide an access point to the logical unit 0 (107) of the VRC device 106, and /
dev / vrc1 (118) is the VRC control process 1
12 to the logical unit 1 (1
08) to provide access points. 119 of / e
The tc / system file defines system parameter information initial values inside the OS 113.
Reads the file at startup and sets the specified initial values for the specified variables.
【0043】120はプロセッサ型デバイスターゲット
ドライバsprcであり、FEP装置103及びVRC
装置106の駆動制御を行ない、前記プロセス109、
110、112が発行したシステムコールをプロセッサ
型デバイス装置用のSCSIコマンドに変換し、前記コ
マンドの実行を131のホストアダプタドライバに依頼
する。ホストアダプタドライバ131は、sprcドラ
イバ120より依頼されたSCSIコマンドを前記各デ
バイス装置103、106に発行する。Reference numeral 120 denotes a processor type device target driver sprc, which is used for the FEP device 103 and VRC.
The drive control of the device 106 is performed, and the process 109,
The system calls issued by 110 and 112 are converted into SCSI commands for the processor type device unit, and the host adapter driver 131 is requested to execute the commands. The host adapter driver 131 issues the SCSI command requested by the sprc driver 120 to each of the device units 103 and 106.
【0044】sprcドライバ120は、121のタイ
マ値設定処理を有し、122のtimer変数の値を指
定するためのインターフェイスを前記プロセス109、
110、112に対して提供する。timer変数12
2は、FEP装置103、VRC装置106の各論理ユ
ニット104、105、107、108毎にそれぞれ1
つづつ存在し、sprcドライバ120が論理ユニット
104、105、107、108に対して発行するSC
SIコマンドの実行終了待ち時間を設定するものであ
る。また、sprcドライバ120は、123のユーザ
プロセスID設定処理を有し、124のprocid変
数の値を指定できるインターフェイスを前記プロセス1
09、110、112に対して提供する。procid
変数124は、FEP装置103、VRC装置106の
各論理ユニット104、105、107、108毎にそ
れぞれ1つづつ存在し、それぞれの論理ユニットを制御
するプロセス(109〜112)のプロセスIDを設定
するものである。また、sprcドライバ120は、1
25のシグナル番号設定処理を有し、126のsign
o変数の値を指定できるインターフェイスを前記プロセ
ス109、110、112に対して提供する。このsi
gno変数126は、FEP装置103、VRC装置1
06の各論理ユニット104、105、107、108
毎にそれぞれ1つづつ存在し、それぞれの論理ユニット
を制御するプロセス(109〜112)が、処理を必要
とするイベントをシグナル番号により設定するものであ
る。更にsprcドライバ120は、127のアボート
処理を有し、実行中のSCSIコマンドを、ターゲット
をリセットせずに中断(アボート)する。128はデー
タ転送処理であり、FEP装置103、VRC装置10
6に対してデータ転送を行なう。129はデバイス認識
処理であり、接続されたデバイス103、106がプロ
セッサ型デバイスであるかどうか、あるいは、それらの
デバイスが130のdev_set変数に規定されたデ
バイスに該当するかどうかを検査する。ただ、dev_
set変数130は、OS113の/etc/syst
emファイル119に指定された文字列(キャラクタ)
を指し示すポインタであり、実際の制御対象となるデバ
イス(の集合)は、この/etc/systemファイ
ル119に文字列で表わされる。The sprc driver 120 has a timer value setting process 121, and an interface for designating the value of the timer variable 122 is the process 109,
It is provided to 110 and 112. timer variable 12
2 is 1 for each logical unit 104, 105, 107, 108 of the FEP device 103 and VRC device 106.
SCs that exist one after another and are issued by the sprc driver 120 to the logical units 104, 105, 107, 108.
The SI command execution end waiting time is set. Further, the sprc driver 120 has a user process ID setting process 123, and an interface that can specify the value of the process variable 124 is the process 1
09, 110, 112. procid
There is one variable 124 for each logical unit 104, 105, 107, 108 of the FEP device 103 and VRC device 106, and sets the process ID of the process (109 to 112) that controls each logical unit. It is a thing. Also, the sprc driver 120
25 signal number setting processing, 126 sign
An interface is provided to the processes 109, 110, 112 that allows the value of the o variable to be specified. This si
The gno variable 126 is the FEP device 103, the VRC device 1
06 logical units 104, 105, 107, 108
There is one for each, and the process (109 to 112) that controls each logical unit sets an event that requires processing by a signal number. Furthermore, the sprc driver 120 has 127 abort processing, and interrupts (aborts) the SCSI command being executed without resetting the target. Reference numeral 128 denotes a data transfer process, which includes the FEP device 103 and the VRC device 10.
Data is transferred to 6. Reference numeral 129 is a device recognition process, which checks whether the connected devices 103 and 106 are processor-type devices, or whether those devices correspond to the devices specified by the dev_set variable of 130. Just dev_
The set variable 130 is / etc / system of the OS 113.
Character string specified in em file 119
A device (collection of devices) that is a pointer that indicates an actual control target is represented by a character string in this / etc / system file 119.
【0045】(実施例1)以下、本発明の第一の実施例
について、図面を参照しながら説明する。図2は、/e
tc/systemファイル119の一部を示してお
り、プロセッサ型デバイスターゲットドライバsprc
120の内部変数であるdev_set変数130の内
容を初期化する値を表わしている。OS113は、sp
rcドライバ120が起動される時に、キャラクタへの
ポインタであるdev_set変数130を図2に示す
文字列を指すように初期設定する。(First Embodiment) A first embodiment of the present invention will be described below with reference to the drawings. 2 is / e
A part of the tc / system file 119 is shown, and the processor type device target driver sprc is shown.
It represents a value for initializing the contents of the dev_set variable 130 which is an internal variable of 120. OS113 is sp
When the rc driver 120 is activated, the dev_set variable 130, which is a pointer to a character, is initialized to point to the character string shown in FIG.
【0046】図2に示す文字列は、sprcドライバ1
20が駆動を制御するデバイスと、そのデバイスファイ
ル名とを規定しており、「:」の右側にsprcドライ
バ120が駆動を制御するデバイスの製品IDが、左側
にsprcデバイス120のデバイスファイル名が規定
され、それを1組として、複数組をコンマで区切って列
記することにより、sprcドライバ120の制御対象
とするデバイスを複数規定することができる。図2で
は、製品IDがFEPで、デバイスファイル名がfep
であるものと、製品IDがVRCで、デバイスファイル
名がvrcであるものとを制御対象デバイスとして規定
している。The character string shown in FIG. 2 is the sprc driver 1
The device 20 controls the drive and the device file name thereof. The product ID of the device that the sprc driver 120 controls the drive is on the right side of “:”, and the device file name of the sprc device 120 is on the left side. A plurality of devices to be controlled by the sprc driver 120 can be defined by defining them as one set and separating the plurality of sets by separating them with commas. In FIG. 2, the product ID is FEP and the device file name is fep.
And a product ID of VRC and a device file name of vrc are defined as control target devices.
【0047】図3は、SCSIプロセッサ型デバイスを
認識する手順のフローであり、デバイス認識処理129
の内容を表わし、120のプロセッサ型デバイスターゲ
ットドライバsprcにより実行される。FIG. 3 is a flow of a procedure for recognizing a SCSI processor type device, which is device recognition processing 129.
Of the processor type device target driver sprc.
【0048】ステップ301;TEST UNIT R
EADYコマンドを発行することにより、バス上にデバ
イスが存在するか、使用可能な状態であるかを検査す
る。Step 301; TEST UNIT R
By issuing the EADY command, it is checked whether the device exists on the bus or is in a usable state.
【0049】ステップ302;この検査結果により、使
用不可能である場合は、ステップ311;エラーコード
に、デバイスが故障である旨を設定し、エラー終了す
る。Step 302; If the inspection result indicates that the device cannot be used, Step 311; The error code is set to indicate that the device is defective, and the processing ends with an error.
【0050】ステップ303;使用可能であるときは、
INQUIRYコマンドを発行することにより、デバイ
スの情報であるデバイスの型、製造元であるベンダ、製
品ID、その他デバイスの固有情報をINQUIRYデ
ータとして取得する。Step 303; if available,
By issuing the INQUIRY command, the device type that is the device information, the vendor that is the manufacturer, the product ID, and other unique information of the device are acquired as INQUIRY data.
【0051】ステップ304;前記実行コマンドが正常
終了したかどうかを検査し、ステップ312;エラーの
場合は、エラーコードに、問合わせに対する応答がない
旨を設定し、エラー終了する。Step 304: It is checked whether or not the execution command has ended normally. Step 312: If an error occurs, the error code is set to indicate that there is no response to the inquiry, and the processing ends in error.
【0052】ステップ305;正常終了しているとき
は、前記デバイス情報に基づき、デバイス型がプロセッ
サ型デバイスであるかどうかを検査する。プロセッサ型
デバイス型でない場合は、ステップ313;エラーコー
ドに、プロセッサ型デバイスでない旨を設定し、エラー
終了する。Step 305: When the processing is normally completed, it is checked whether the device type is a processor type device based on the device information. If it is not a processor type device type, step 313; the fact that it is not a processor type device is set in the error code, and the processing ends in error.
【0053】ステップ306;プロセッサ型デバイスで
あるときは、dev_set変数130が指す文字列の
次のコンマまでの文字列を切り出し、次の制御対象とな
るデバイスの製品IDとそのデバイスファイル名とを取
得し、それぞれローカルな変数pidとdnameとに
設定する。Step 306: When the device is a processor type device, the character string up to the next comma in the character string pointed to by the dev_set variable 130 is cut out, and the product ID of the next device to be controlled and its device file name are acquired. Then, the local variables pid and dname are set respectively.
【0054】ステップ307;前記変数設定の結果を判
断し、次要素となるデバイスがない場合は、ステップ3
14;エラーコードに、該当デバイスがない旨を設定
し、エラー終了する。Step 307; Judge the result of the variable setting, and if there is no device which becomes the next element, step 3
14: The error code is set to indicate that there is no corresponding device, and the processing ends with an error.
【0055】ステップ308;次要素となるデバイスが
あるときは、前記デバイス情報に基づき、製品IDが前
記pid変数と一致するかどうかを検査する。一致しな
い場合はステップ306へ戻る。一致した場合は、ステ
ップ309;作業領域を確保し、ステップ310;前記
dname変数を元にデバイスファイルを作成し、正常
終了する。Step 308: If there is a device to be the next element, it is checked based on the device information whether the product ID matches the pid variable. If they do not match, the process returns to step 306. If they match, step 309; a work area is secured, step 310; a device file is created based on the dname variable, and the process ends normally.
【0056】以上のように本実施例では、制御の対象と
なるデバイスの集合を規定するdev_set変数13
0を設け、/etc/systemファイル119に前
記変数130の実際の内容を記述し、デバイス認識処理
129により、SCSIデバイスの製品ID等の固有情
報を取得し、前記製品IDが前記変数に含まれているか
どうかを検査し、含まれている場合は、前記変数で規定
されたデバイス名をもつデバイスファイルを作成してい
るため、データ転送制御方式が同じである異種のプロセ
ッサ型デバイスを1つの駆動制御プログラムで制御する
ことが可能となり、システムのメモリが効率良く使え
る。更に制御対象となる装置がOEMされて製品IDが
変更されたとしても、dev_set変数130の内容
は、/etc/systemファイル119で記述され
ているので、このファイルの内容をOEM先の製品ID
に変更するだけで、駆動制御プログラムのソースを変更
する必要がなく、メンテナンスが楽になると同時にプロ
グラムの汎用性を増すことができる。As described above, in the present embodiment, the dev_set variable 13 that defines the set of devices to be controlled
0 is set, the actual content of the variable 130 is described in the / etc / system file 119, and unique information such as the product ID of the SCSI device is acquired by the device recognition processing 129, and the product ID is included in the variable. If it is included, a device file with the device name defined by the above variable is created, so that a single type of heterogeneous processor type device with the same data transfer control method is driven. It can be controlled by the control program, and the system memory can be used efficiently. Even if the device to be controlled is OEM and the product ID is changed, the content of the dev_set variable 130 is described in the / etc / system file 119. Therefore, the content of this file is the product ID of the OEM destination.
It is not necessary to change the source of the drive control program simply by changing to, maintenance can be facilitated and the versatility of the program can be increased.
【0057】(実施例2)以下、本発明の第二の実施例
について、図面を参照しながら説明する。図4は、タイ
マ値設定処理121の処理手順を表したフローである。
タイマ値設定処理121は、図1のプロセス109、1
10、112(以下制御プロセスと呼ぶ)に対して、i
octlシステムコールのSETTIMER命令インタ
ーフェイスを提供し、制御プロセスは、SCSIコマン
ドの実行終了を監視するタイマ値であるtimer変数
122の値を設定することが可能となる。制御プロセス
は、SETTIMER命令を実行する際、ioctlシ
ステムコールのパラメータとして、制御を担当する論理
ユニットに対応するデバイスファイルのファイル記述子
と、設定するタイマ値とを指定する。ファイル記述子
は、デバイスファイルをopenシステムコールの発行
によりオープンした際に復帰値として返された値であ
る。(Second Embodiment) A second embodiment of the present invention will be described below with reference to the drawings. FIG. 4 is a flow showing the processing procedure of the timer value setting processing 121.
The timer value setting process 121 is the process 109, 1 of FIG.
For 10, 112 (hereinafter referred to as control process), i
It provides a SETTIMER instruction interface for the octl system call, and allows the control process to set the value of the timer variable 122, which is a timer value that monitors the end of execution of a SCSI command. When executing the SETTIMER instruction, the control process specifies the file descriptor of the device file corresponding to the logical unit in charge of control and the timer value to be set, as parameters of the ioctl system call. The file descriptor is a value returned as a return value when the device file is opened by issuing the open system call.
【0058】ステップ401;入力されたタイマ値が指
定可能な値かどうかを検査し、ステップ402;タイマ
値が指定不可能な値の場合には、ステップ404;エラ
ーコードに、タイマ値エラーである旨を設定し、エラー
終了する。Step 401; It is checked whether the input timer value is a specifiable value. Step 402; If the timer value is an unspecifiable value, Step 404; The error code indicates a timer value error. Set a message and end with an error.
【0059】ステップ403;タイマ値が正常であると
きは、ファイル記述子に対応する論理ユニットに対して
設けられたtimer変数122に前記タイマ値を保存
し、ioctlシステムコールを正常終了する。Step 403: When the timer value is normal, the timer value is stored in the timer variable 122 provided for the logical unit corresponding to the file descriptor, and the ioctl system call is terminated normally.
【0060】図5は、タイマ値設定処理121により設
定されたtimer変数122を使用したsprcドラ
イバ120のデータ転送制御フローであり、128のデ
ータ転送処理の内容を表わしている。この処理は、制御
プロセスがFEP装置103とVRC装置106とに対
してread、write等のシステムコールを発行し
た時にコールされる。FIG. 5 is a data transfer control flow of the sprc driver 120 using the timer variable 122 set by the timer value setting process 121, and shows the contents of 128 data transfer process. This process is called when the control process issues a system call such as read or write to the FEP device 103 and the VRC device 106.
【0061】ステップ501;SCSIコマンドの実行
に必要とされる資源を取得する。ステップ502;制御
プロセスがFEP装置103またはVRC装置106に
対して処理を要求するために発行するシステムコールを
プロセッサ型デバイス装置用のSCSIコマンドに変換
する。例えば、readシステムコールの場合はREC
EIVEコマンドに、また、writeシステムコール
の場合はSENDコマンドに変換し、ioctlシステ
ムコールの場合は、命令内容に応じて、デバイスの存在
確認を行なう命令の時は、TEST UNIT REA
DYコマンドに、また、デバイス情報取得命令の時は、
INQUIRYコマンドにそれぞれ変換する。制御プロ
セスは、これらのシステムコールを発行する際、制御を
担当する論理ユニットに対応するデバイスファイルのフ
ァイル記述子と、readシステムコールの場合はデー
タ受信用バッファとそのサイズとを、また、write
システムコールの場合はデータ送信バッファとそのサイ
ズとを、それぞれパラメータとして指定する。このファ
イル記述子は対応する論理ユニット番号として、また、
バッファサイズは転送バイト数としてそれぞれRECE
IVE、SENDのSCSIコマンドに反映される。Step 501: Acquire the resources required to execute the SCSI command. Step 502; The system call issued by the control process to request the FEP device 103 or the VRC device 106 for processing is converted into a SCSI command for the processor type device device. For example, REC for read system call
Convert to EIVE command or SEND command in case of write system call, and in case of ioctl system call, according to the instruction content, if there is an instruction to confirm the existence of the device, TEST UNIT REA
For the DY command, and for the device information acquisition command,
Convert to INQUIRY command respectively. When issuing these system calls, the control process issues the file descriptor of the device file corresponding to the logical unit in charge of control, the data reception buffer and its size in the case of the read system call, and the write command.
In the case of a system call, the data transmission buffer and its size are specified as parameters. This file descriptor is the corresponding logical unit number, and
The buffer size is the number of transfer bytes
It is reflected in the SCSI command of IVE and SEND.
【0062】ステップ503;前記ファイル記述子に対
応する論理ユニットに対して設けられたtimer変数
122に基づき、タイマをスタートする。Step 503: A timer is started based on the timer variable 122 provided for the logical unit corresponding to the file descriptor.
【0063】ステップ504;ステップ502で作成し
たSCSIコマンドの実行をホストアダプタドライバ1
31に依頼し、ステップ505;前記コマンドの実行終
了待ち状態となる。前記コマンドの実行が終了したとき
は、ステップ506;前記タイマがタイムアウトのため
に終了状態となったのかどうかを検査する。タイムアウ
トの場合は、ステップ507;アボート処理127によ
りアボート処理を実行し、ステップ508;エラーコー
ドに、タイムアウトである旨を設定し、エラー終了す
る。Step 504: The host adapter driver 1 executes the SCSI command created in step 502.
31 and step 505; the command execution waiting state is entered. When the execution of the command is completed, step 506; It is checked whether the timer is in the ended state due to timeout. In the case of time-out, the abort process is executed by the abort process 127 in step 507, and step 508 is set in the error code indicating that the time is out, and the process ends in error.
【0064】ステップ506;前記コマンドの終了状態
がタイムアウトでない場合は、ステップ509;SCS
Iコマンド実行結果の解析を行ない、ステップ510;
前記解析の結果が正常かどうかを検査し、正常の場合は
正常終了する。異常が検知された場合は、ステップ51
1;エラーコードの設定を行なってエラー終了する。Step 506; If the end status of the command is not timeout, step 509; SCS
The I command execution result is analyzed, step 510;
It is checked whether the result of the analysis is normal, and if normal, the process ends normally. If an abnormality is detected, step 51
1; Sets an error code and ends with an error.
【0065】以上のように本実施例では、タイマ値設定
処理121により、SCSIコマンドの実行終了を監視
するtimer変数122のタイマ値を設定し、タイマ
がタイムアウトした場合に、装置(103、106)を
リセットせずに、実行中のSCSIコマンドをアボート
している。そのため、前記コマンドの実行に対する装置
側からの応答がない場合でも、一定の時間をもってシス
テムコールから制御をユーザプロセスへ復帰することが
でき、制御プロセスは111のパイプ読み込み等の他の
イベントに対する処理を行なうことが可能となる。As described above, in this embodiment, the timer value setting process 121 sets the timer value of the timer variable 122 for monitoring the completion of execution of the SCSI command, and when the timer times out, the device (103, 106) Aborts the SCSI command that is being executed without resetting. Therefore, even if there is no response from the device side to the execution of the command, control can be returned from the system call to the user process after a certain period of time, and the control process can process other events such as 111 pipe reading. It becomes possible to do it.
【0066】(実施例3)以下、本発明の第三の実施例
について、図面を参照しながら説明する。図6は、ユー
ザプロセスID設定処理123の処理手順を表わしたフ
ローである。この処理は、制御プロセスに対して、io
ctlシステムコールのSETPROCID命令インタ
ーフェイスを提供し、制御プロセスが、そのプロセスI
Dをsprcドライバ120に通知することを可能にし
ている。制御プロセスは、SETPROCID命令を実
行する際、ioctlシステムコールのパラメータとし
て、制御を担当する論理ユニットに対応するデバイスフ
ァイルのファイル記述子と、自分のプロセスIDとを指
定する。ファイル記述子は、前記デバイスファイルをo
penシステムコールの発行によりオープンした際に復
帰値として返された値である。(Third Embodiment) A third embodiment of the present invention will be described below with reference to the drawings. FIG. 6 is a flow showing the processing procedure of the user process ID setting processing 123. This process is executed by the io for the control process.
Provides the SETPROCID command interface for the ctl system call so that the controlling process can
It is possible to notify D to the sprc driver 120. When executing the SETPROCID instruction, the control process specifies, as parameters of the ioctl system call, the file descriptor of the device file corresponding to the logical unit in charge of control and its own process ID. The file descriptor is the device file
This is the value returned as the return value when opened by issuing the pen system call.
【0067】ステップ601;指定されたプロセスID
が実際に存在しているかどうかを検査し、ステップ60
2;プロセスIDが存在しない場合には、ステップ60
4;エラーコードに、プロセスIDエラーである旨を設
定し、エラー終了する。Step 601: Specified process ID
Check if is actually present, step 60
2; Step 60 if the process ID does not exist
4; The process error is set to the error code, and the process ends with an error.
【0068】ステップ603;プロセスIDが存在する
ときは、前記ファイル記述子に対応する論理ユニットに
対して設けられたprocid変数124に、指定され
たプロセスIDを保存し、ioctlシステムコールを
正常終了する。Step 603: When the process ID exists, the specified process ID is stored in the process variable 124 provided for the logical unit corresponding to the file descriptor, and the ioctl system call is normally terminated. .
【0069】図7は、シグナル番号設定処理125の内
容を表したフローである。このシグナル番号は、SCS
Iコマンドの実行が一定時間内に終了しないときに、そ
れに代わって実行する必要のある処理の種類を番号で表
わしている。このシグナル番号設定処理は、制御プロセ
スに対してioctlシステムコールのSETSIGN
O命令インターフェイスを提供し、制御プロセスが、処
理を必要とするシグナルの番号をsprcドライバ12
0に通知できるようにしている。制御プロセスは、SE
TSIGNO命令を実行する際、ioctlシステムコ
ールのパラメータとして、制御を担当する論理ユニット
に対応するデバイスファイルのファイル記述子と、処理
を必要とするシグナル番号とを指定する。FIG. 7 is a flow showing the contents of the signal number setting processing 125. This signal number is SCS
When the execution of the I command is not completed within a certain period of time, the type of processing that needs to be executed instead is represented by a number. This signal number setting process is executed by the control process, SETUP signal of ioctl system call.
It provides an O instruction interface, and the control process specifies the number of the signal that needs to be processed by the sprc driver 12
0 can be notified. The control process is SE
When executing the TSIGNO instruction, the file descriptor of the device file corresponding to the logical unit in charge of control and the signal number that requires processing are specified as parameters of the ioctl system call.
【0070】ステップ701;指定されたシグナル番号
の値を検査し、ステップ702;このシグナル番号が不
正の値である場合には、ステップ704;エラーコード
に、シグナル番号エラーである旨を設定し、エラー終了
する。Step 701: The value of the designated signal number is inspected. Step 702; If this signal number is an invalid value, Step 704; The error code is set to indicate that a signal number error has occurred. End with an error.
【0071】ステップ703;シグナル番号が正常のと
きは、前記ファイル記述子に対応する論理ユニットに対
して設けられたsigno変数126に前記シグナル番
号を保存し、ioctlシステムコールを正常終了す
る。Step 703: When the signal number is normal, the signal number is stored in the signo variable 126 provided for the logical unit corresponding to the file descriptor, and the ioctl system call is normally terminated.
【0072】図8は、ユーザプロセスID設定処理12
3により設定されたprocid変数124と、シグナ
ル番号設定処理125により設定されたsigno変数
126とを使用したsprcドライバ120のデータ転
送制御フローであり、データ転送処理128の内容を表
わしている。このフローに示す処理は、制御プロセスが
FEP装置103またはVRC装置106に対してre
ad、write等のシステムコールを発行した時にコ
ールされる。FIG. 8 shows the user process ID setting process 12
3 is a data transfer control flow of the sprc driver 120 using the procid variable 124 set by No. 3 and the signo variable 126 set by the signal number setting process 125, and represents the contents of the data transfer process 128. In the processing shown in this flow, the control process is executed by the FEP device 103 or the VRC device 106 to
Called when a system call such as ad or write is issued.
【0073】このフローでは、SCSIコマンドの実行
を監視するタイマがタイムアウトしたとき、予め設定さ
れたシグナル番号の処理要求が実際に発生しているかど
うかを検査し、発生しているときに限り、コマンドのア
ボートが行なわれる。In this flow, when the timer for monitoring the execution of the SCSI command times out, it is checked whether or not the processing request of the preset signal number is actually generated, and only when it is generated, the command is processed. Will be aborted.
【0074】ステップ801からステップ805までの
手順は、実施例2で示した、ステップ501からステッ
プ505までの動作と同様であり、SCSIコマンドの
実行に必要な資源を取得し、制御プロセスから受信した
システムコールをSCSIコマンドに変換し、前記コマ
ンドの実行終了を監視するタイマをスタートし、前記コ
マンドの実行をホストアダプタドライバ131に依頼し
て実行終了を待つ。The procedure from step 801 to step 805 is the same as the operation from step 501 to step 505 shown in the second embodiment, and the resources necessary for executing the SCSI command are acquired and received from the control process. The system call is converted into a SCSI command, a timer for monitoring the completion of execution of the command is started, the host adapter driver 131 is requested to execute the command, and the completion of execution is awaited.
【0075】ステップ806;ステップ803におい
て、制御プロセスが制御を担当する論理ユニットに対し
て設けられたtimer変数122に基づきスタートし
たタイマがタイムアウトしたかどうかを検査する。タイ
ムアウトの場合は、ステップ807;前記論理ユニット
に対して設けられたprocid変数124により、制
御プロセスのプロセスIDを取得し、ステップ808;
前記論理ユニットに対して設けられたsigno変数1
26により、前記プロセスIDをもつ制御プロセスが処
理を必要とするシグナルの番号を取得する。Step 806; In step 803, the control process checks whether the timer started based on the timer variable 122 provided for the logical unit in charge of control has timed out. In the case of time-out, step 807; the process ID of the control process is acquired by the process variable 124 provided for the logical unit, and step 808;
Signo variable 1 provided for the logic unit
26, the control process having the process ID obtains the number of the signal that needs to be processed.
【0076】ステップ809;前記シグナルが前記プロ
セスに対して実際に発生しているかどうかを検査する。
発生している場合は、ステップ810;アボート処理1
27によりアボート処理を実行し、ステップ811;エ
ラーコードに、タイムアウトである旨を設定し、エラー
終了する。Step 809; Check if the signal is actually occurring for the process.
If it has occurred, step 810; abort processing 1
The abort process is executed according to 27, and step 811; the error code is set to timeout, and the process ends in error.
【0077】ステップ812;前記シグナルが発生して
いない場合は、前記タイマを再スタートして、ステップ
805へ戻る。Step 812: If the signal is not generated, the timer is restarted and the process returns to step 805.
【0078】ステップ813;ステップ806において
SCSIコマンドの終了状態がタイムアウトでない場合
は、SCSIコマンド実行結果の解析を行ない、ステッ
プ814;この解析の結果、異常が検知されなければ、
正常終了し、異常が検知された場合は、ステップ81
5;エラーコードを設定してエラー終了する。Step 813; If the termination status of the SCSI command is not timeout in step 806, the SCSI command execution result is analyzed. Step 814; If no abnormality is detected as a result of this analysis,
If the processing ends normally and an abnormality is detected, step 81
5: Set an error code and end with an error.
【0079】以上のように本実施例では、プロセスID
設定処理123により制御プロセスのプロセスIDを設
定し、シグナル番号設定処理125により前記プロセス
が処理を必要とするシグナルの番号を設定し、また、タ
イマ値設定処理125によりタイマをセットしてSCS
Iコマンドの実行を開始する。コマンド実行終了監視タ
イマがタイムアウトした時には、その制御プロセスにお
いて前記シグナルが発生しているかどうかを検査手段に
より検査し、シグナルが発生している場合に限り、アボ
ート処理を行ない、制御をユーザプロセスに復帰させ
る。前記プロセスは、復帰した後、シグナルの発生に応
じて111のパイプ読み込み等の処理すべき他の処理を
行なうことができる。As described above, in this embodiment, the process ID
The setting process 123 sets the process ID of the control process, the signal number setting process 125 sets the number of the signal that the process needs to process, and the timer value setting process 125 sets the timer to set the SCS.
Start executing the I command. When the command execution end monitoring timer has timed out, the control means checks whether or not the above signal is generated, and if only the signal is generated, abort processing is performed and control is returned to the user process. Let After returning, the process can perform other processing to be processed such as reading the pipe of 111 in response to the generation of the signal.
【0080】このように、実施例3では、実施例2と異
なり、処理を必要とするイベントの発生時にのみアボー
ト処理を実行しているので、デバイスはアボート処理を
行なう回数が減り負荷が軽減される。As described above, in the third embodiment, unlike the second embodiment, the abort process is executed only when the event requiring the process occurs. Therefore, the device reduces the number of times the abort process is performed and the load is reduced. It
【0081】(実施例4)本発明の第四の実施例では、
データ転送制御において、SCSIコマンドの実行終了
を監視するタイマがタイムアウトした原因を調査するた
めの手順を設けている。このデータ転送制御フローは、
図9に示している。この図9において、SCSIコマン
ドの実行に必要な資源を取得してからアボート処理を実
行するまでのステップ901からステップ910の動
作、及び、コマンドの実行がタイムアウトでない状態で
終了したときのステップ915からステップ917まで
の動作は、実施例3のデータ転送制御の場合(図8)と
変わりがない。(Embodiment 4) In the fourth embodiment of the present invention,
In the data transfer control, a procedure for investigating the cause of the timeout of the timer for monitoring the completion of execution of the SCSI command is provided. This data transfer control flow is
It is shown in FIG. In FIG. 9, operations from steps 901 to 910 from acquisition of resources required to execute a SCSI command to execution of abort processing, and from step 915 when execution of a command ends without a timeout The operation up to step 917 is the same as in the case of the data transfer control of the third embodiment (FIG. 8).
【0082】ステップ911;アボート処理を実行した
後、TEST UNIT READYコマンドを発行し
て、バス上のデバイスが使用可能な状態であるかどうか
を検査し、ステップ912;この検査結果、デバイスが
使用不可能である場合は、ステップ913;エラーコー
ドに、デバイスが故障である旨を設定し、エラー終了す
る。Step 911; After executing the abort process, issue a TEST UNIT READY command to check whether or not the device on the bus is in a usable state. Step 912; As a result of this check, the device is not used. If it is possible, step 913; The error code is set to indicate that the device is in failure, and the processing ends in error.
【0083】ステップ912において、検査結果が正常
の場合は、制御プロセスに転送するデータがないため
に、実行終了せず、タイムアウトに至ったものと判定し
て正常終了する。In step 912, if the inspection result is normal, there is no data to be transferred to the control process, so execution is not ended, and it is judged that a time-out has been reached and the processing is normally ended.
【0084】このように、本実施例では、実行中のSC
SIコマンドに対してアボート処理を実行した後、装置
(103、106)の状態を検査して、SCSIコマン
ドの実行終了を監視するタイマがタイムアウトした原因
を調査し、デバイスの故障など使用不可能な状態である
場合と、デバイスの動作は正常終了したが、イニシエー
タに対して送るデータがなくSCSIコマンドの実行終
了待ち状態となっている場合とに切り分けている。As described above, in this embodiment, the SC being executed is
After the abort process is executed for the SI command, the state of the device (103, 106) is inspected, and the cause of the time-out of the timer for monitoring the completion of the execution of the SCSI command is investigated, and the device is unusable due to device failure or the like. The state is divided into a state in which the device operation ends normally, but there is no data to be sent to the initiator, and the device is in a waiting state for completion of execution of a SCSI command.
【0085】この判定結果をユーザプロセスに通知する
ことにより、ユーザプロセスでは、システムコールを発
行してデバイスの状態を確認する必要がなくなる。従っ
て、ユーザプロセスでの処理を簡略化することができ、
システムの負荷を軽減することができる。By notifying the user process of this determination result, the user process does not need to issue a system call to check the state of the device. Therefore, the processing in the user process can be simplified,
The system load can be reduced.
【0086】[0086]
【発明の効果】以上の実施例の説明から明らかなよう
に、本発明のデバイス制御装置では、制御対象となるデ
バイスの集合を規定し、デバイスがその集合に含まれる
ときにそのデバイスに対応する名前をもつデバイスファ
イルを作成しているため、1つの駆動プログラムで、デ
ータ転送制御方式を同じくする、複数の異なる種類のプ
ロセッサ型デバイスを制御することができ、システムの
メモリを節約することができる。As is apparent from the above description of the embodiments, in the device control apparatus of the present invention, a set of devices to be controlled is defined, and when a device is included in the set, it corresponds to the device. Since a device file with a name is created, one drive program can control a plurality of different types of processor-type devices that share the same data transfer control method, saving system memory. .
【0087】また、制御対象となるデバイスの集合とそ
のデバイスファイル名とを変数で規定し、その変数を定
めるファイルを別に設けているため、OEM先で装置の
製品IDが変更されたような場合でも、前記ファイルを
変更するだけで対応することができ、駆動制御のドライ
バプログラムを変更する必要がない。従って、メンテナ
ンスが簡単となり、プログラムの汎用性を増すことがで
きる。Further, since a set of devices to be controlled and a device file name thereof are defined by variables and a file for defining the variables is separately provided, it is possible to change the product ID of the device at the OEM destination. However, this can be dealt with only by changing the file, and there is no need to change the driver program for drive control. Therefore, maintenance is simplified and the versatility of the program can be increased.
【0088】また、SCSIコマンドの実行終了をタイ
マで監視するとともに、タイマがタイムアウトしたとき
に、ターゲットをリセットせずに実行中のSCSIコマ
ンドをアボートしているため、コマンドの実行に対する
応答がデバイス側からない場合でも、一定の時間経過後
には、ユーザプロセスに制御能力を復帰させることがで
き、ユーザプロセスが他のイベントに対する処理を行な
うことが可能になる。また、SCSIコマンドの実行を
再開する場合にも、デバイスがリセットされていないた
め、速やかな再開が可能になる。Also, the completion of the execution of the SCSI command is monitored by the timer, and when the timer times out, the SCSI command being executed is aborted without resetting the target. Therefore, the response to the execution of the command is the device side. Even if it does not occur, the control capability can be restored to the user process after a certain time has elapsed, and the user process can perform processing for another event. Further, even when the execution of the SCSI command is restarted, the device is not reset, so that the restart can be promptly performed.
【0089】また、このアボート処理を、注目するイベ
ントが発生した場合に限って、実行しているため、必要
なイベントに対して迅速に処理する機会を確保しなが
ら、アボート処理の回数を軽減することができ、イニシ
エータとターゲットの負荷を減らすことができる。Since the abort process is executed only when the event of interest occurs, the number of abort processes is reduced while ensuring the opportunity to process the necessary event quickly. It is possible to reduce the load on the initiator and the target.
【0090】さらに、アボート処理実行後に、タイムア
ウトした原因を調査し、デバイスの故障によるものか、
または、デバイスは正常動作しているが、イニシエータ
に対して送るデータが無いためにタイムアウトしたもの
かを切り分けているため、ユーザプロセスは、自らシス
テムコールを発行して、デバイスの状態を確認する必要
がなくなり、負荷を軽減することができる。Further, after executing the abort processing, the cause of the time-out is investigated, and it may be due to a device failure.
Alternatively, the device is operating normally, but since it has timed out because there is no data to send to the initiator, the user process must issue a system call to check the device status. Can be reduced and the load can be reduced.
【図1】本発明の実施例におけるデバイス制御装置の構
成を示すブロック図、FIG. 1 is a block diagram showing the configuration of a device control apparatus according to an embodiment of the present invention,
【図2】実施例1における/etc/systemファ
イルの一部を示す図、FIG. 2 is a diagram showing a part of an / etc / system file in the first embodiment,
【図3】実施例1におけるSCSIプロセッサ型デバイ
ス認識手順を示すフロー図、FIG. 3 is a flow chart showing a SCSI processor type device recognition procedure according to the first embodiment;
【図4】実施例2におけるタイマ値設定処理の手順を示
すフロー図、FIG. 4 is a flowchart showing a procedure of timer value setting processing in the second embodiment;
【図5】実施例2におけるプロセッサ型デバイスへの転
送制御動作を示すフロー図、FIG. 5 is a flowchart showing a transfer control operation to a processor type device according to the second embodiment;
【図6】実施例3におけるユーザプロセスID設定処理
の手順を示すフロー図、FIG. 6 is a flowchart showing the procedure of user process ID setting processing in the third embodiment;
【図7】実施例3におけるシグナル番号設定処理の手順
を示すフロー図、FIG. 7 is a flow chart showing a procedure of signal number setting processing in Embodiment 3;
【図8】実施例3におけるプロセッサ型デバイスへの転
送制御動作を示すフロー図、FIG. 8 is a flowchart showing a transfer control operation to a processor type device in the third embodiment;
【図9】実施例4におけるプロセッサ型デバイスへの転
送制御動作を示すフロー図、FIG. 9 is a flowchart showing a transfer control operation to a processor type device in the fourth embodiment;
【図10】従来のSCSIプロセッサ型デバイス制御装
置の構成を示すブロック図、FIG. 10 is a block diagram showing the configuration of a conventional SCSI processor type device control device;
【図11】従来の制御装置におけるプロセッサ型デバイ
ス認識手順を示すフロー図、FIG. 11 is a flowchart showing a processor type device recognition procedure in a conventional control device;
【図12】従来の制御装置におけるプロセッサ型デバイ
スへの転送制御動作を示すフロー図である。FIG. 12 is a flowchart showing a transfer control operation to a processor type device in a conventional control device.
101 ホストコンピュータ 102 SCSIバス 103 FEP装置 104 論理ユニット0 105 論理ユニット1 106 VRC装置 107 論理ユニット0 108 論理ユニット1 109 FEP制御送信プロセス 110 FEP制御受信プロセス 111 パイプ 112 VRC制御プロセス 113 ソラリス2.2オペレーティングシステム 114 ファイルシステム 115 /dev/fep0デバイスファイル 116 /dev/fep1デバイスファイル 117 /dev/vrc0デバイスファイル 118 /dev/vrc1デバイスファイル 119 /etc/systemファイル 120 プロセッサ型デバイスターゲットドライバ 121 タイマ値設定処理 122 timer変数 123 ユーザプロセスID設定処理 124 procid変数 125 シグナル番号設定設定処理 126 signo変数 127 アボート処理 128 データ転送処理 129 デバイス認識処理 130 dev_set変数 131 ホストアダプタドライバ 1001 ユーザプロプロセス 1002 ソラリス2.2オペレーティングシステム 1003 磁気ディスク型ターゲットドライバ 1004 磁気テープ型ターゲットドライバ 1005 プロセッサ型デバイスターゲットドライバ 1006 ホストアダプタドライバ 1007 SCSIバス 1008 ハード・ディスク型装置 1009 磁気テープ型装置 1010 プロセッサ型デバイス装置 101 Host Computer 102 SCSI Bus 103 FEP Device 104 Logical Unit 0 105 Logical Unit 1 106 VRC Device 107 Logical Unit 0 108 Logical Unit 1 109 FEP Control Send Process 110 FEP Control Receive Process 111 Pipe 112 VRC Control Process 113 Solaris 2.2 Operating System System 114 File system 115 / dev / fep0 device file 116 / dev / fep1 device file 117 / dev / vrc0 device file 118 / dev / vrc1 device file 119 / etc / system file 120 Processor type device target driver 121 Timer value setting process 122 timer variable 123 user process ID setting process 124 p ocid variable 125 signal number setting setting process 126 signo variable 127 abort process 128 data transfer process 129 device recognition process 130 dev_set variable 131 host adapter driver 1001 user pro process 1002 Solaris 2.2 operating system 1003 magnetic disk type target driver 1004 magnetic tape type Target driver 1005 Processor type device Target driver 1006 Host adapter driver 1007 SCSI bus 1008 Hard disk type device 1009 Magnetic tape type device 1010 Processor type device device
Claims (5)
デバイスに対して制御を行なうデバイス制御装置におい
て、 制御対象となるデバイスと前記デバイスに対応するデバ
イスファイルとの集合を規定する制御対象規定手段と、 前記プロセッサ型デバイスから得たデバイス情報を基に
前記デバイスが制御対象のデバイスに含まれるかどうか
を検査するデバイス認識手段とを設け、前記デバイスが
前記集合に含まれる場合に前記デバイスファイルを作成
することを特徴とするデバイス制御装置。1. A device control apparatus for controlling a processor-type device connected to a SCSI bus, and a control target defining means for defining a set of a device to be controlled and a device file corresponding to the device. A device recognition unit that checks whether or not the device is included in a device to be controlled based on device information obtained from the processor-type device, and creates the device file when the device is included in the set A device control device characterized by the above.
の名前との集合を規定する変数と、前記変数の内容を設
定するファイルとによって構成されることを特徴とする
請求項1に記載のデバイス制御装置。2. The device according to claim 1, wherein the controlled object defining unit is configured by a variable that defines a set of a device and its name, and a file that sets the content of the variable. Control device.
デバイスに対して制御を行なうデバイス制御装置におい
て、 SCSIコマンドの実行終了を監視するタイマと、 前記タイマのタイマ値を設定するタイマ値設定手段と、 前記タイマがタイムアウトした場合に実行中のSCSI
コマンドを、ターゲットをリセットせずにアボート(中
断)するアボート処理手段とを設けたことを特徴とする
デバイス制御装置。3. A device control device for controlling a processor type device connected to a SCSI bus, comprising: a timer for monitoring the completion of execution of a SCSI command; and a timer value setting means for setting a timer value of the timer. SCSI running when the timer times out
A device control apparatus, comprising: an abort processing unit that aborts a command without resetting the target.
定する設定手段と、前記イベントの発生を検査する検査
手段とを設け、前記タイマがタイムアウトしたとき、前
記イベントが発生している場合にのみ、前記アボート処
理手段にアボート処理を行なわせることを特徴とする請
求項3に記載のデバイス制御装置。4. Setting means for setting the type of event that needs to be processed and inspection means for inspecting the occurrence of the event are provided, and only when the event has occurred when the timer has timed out, The device control apparatus according to claim 3, wherein the abort processing unit is caused to perform the abort processing.
査手段を設け、前記アボート処理手段がアボート処理を
行なった後に、前記調査手段による前記デバイスについ
ての調査を行なうことを特徴とする請求項3に記載のデ
バイス制御装置。5. An inspection means for investigating the presence or absence of a failure of the device is provided, and after the abort processing means performs the abort processing, the investigation means conducts the inspection of the device. The device control device according to 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8357194A JPH07271704A (en) | 1994-03-31 | 1994-03-31 | Device controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8357194A JPH07271704A (en) | 1994-03-31 | 1994-03-31 | Device controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH07271704A true JPH07271704A (en) | 1995-10-20 |
Family
ID=13806204
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8357194A Pending JPH07271704A (en) | 1994-03-31 | 1994-03-31 | Device controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH07271704A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10228352A (en) * | 1997-02-14 | 1998-08-25 | Fujitsu Ltd | Library control apparatus and method for logically dividing and controlling a library apparatus |
-
1994
- 1994-03-31 JP JP8357194A patent/JPH07271704A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10228352A (en) * | 1997-02-14 | 1998-08-25 | Fujitsu Ltd | Library control apparatus and method for logically dividing and controlling a library apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7197626B2 (en) | Plural microcontrollers for managing CPU allocation and device resources including establishing connections without a centralized operating system | |
US7752029B2 (en) | Method to change USB device descriptors from host to emulate a new device | |
EP1588260B1 (en) | Hot plug interfaces and failure handling | |
US9529750B2 (en) | Service processor (SP) initiated data transaction with bios utilizing interrupt | |
US5937200A (en) | Using firmware to enhance the functionality of a controller | |
US6173339B1 (en) | System for monitoring execution of commands from a host for shared I/O devices by setting a time-out period based on control parameters sent by the host | |
US20080098246A1 (en) | Computer system and control method thereof | |
US9529410B2 (en) | Service processor (SP) initiated data transaction with BIOS utilizing power off commands | |
US5394527A (en) | Method and apparatus facilitating use of a hard disk drive in a computer system having suspend/resume capability | |
US20070006020A1 (en) | Inter-host data transfer method, program, and system | |
US6948025B2 (en) | System and method for transferring data between an IEEE 1394 device and a SCSI device | |
US20070124462A1 (en) | State Information Acquisition Processing Program, State Information Acquisition Apparatus, and State Information Acquisition System | |
JPH07271704A (en) | Device controller | |
US8151028B2 (en) | Information processing apparatus and control method thereof | |
JPH06274354A (en) | Method and system for control of operation of destructive hardware | |
US20050229019A1 (en) | Method, apparatus and program storage device for providing self-quiesced logic to handle an error recovery instruction | |
JPH10254738A (en) | Emulator device and emulation method | |
WO1996029654A1 (en) | Interface control system | |
JP2809164B2 (en) | Two-way data communication system | |
JPS598038A (en) | Data input and output processor | |
JPH0668011A (en) | Scsi interface device | |
JP3316739B2 (en) | Device interface control method | |
JPH06103116A (en) | Operating time monitoring processing method | |
JPH0683226B2 (en) | Information transfer control method | |
JPH04305758A (en) | Information processor |