Intel Extensible Firmware Interface User Manual

Page 963

Advertising
background image

Using the EFI SCSI Pass Thru Protocol

Version 1.10

12/01/02

G-3

//
// Get first Target ID and LUN on the SCSI channel
//
Target = 0xffffffff;
Lun = 0;
Status = ScsiPassThruProtocol->GetNextDevice(
ScsiPassThruProtocol,
&Target,
&Lun
);

//
// Loop through all the SCSI devices on the SCSI channel
//
while (!EFI_ERROR (Status)) {

//
// Blocking I/O example.
// Fill in Packet before calling PassThru()
//
Status = ScsiPassThruProtocol->PassThru(
ScsiPassThruProtocol,
Target,
Lun,
&Packet,
NULL
);

//
// Non Blocking I/O
// Fill in Packet and create Event before calling PassThru()
//
Status = ScsiPassThruProtocol->PassThru(
ScsiPassThruProtocol,
Target,
Lun,
&Packet,
&Event
);

//
// Get next Target ID and LUN on the SCSI channel
//
Status = ScsiPassThruProtocol->GetNextDevice(
ScsiPassThruProtocol,
&Target,
&Lun
);
}

return EFI_SUCCESS;
}

Advertising