The AHA and BusLogic SCSI controllers now only check for ID:0 when deciding on selection timeout, the LUN handling is done by the SCSI Command Phase 0 handler and returns CHECK CONDITION status with INVALID LUN sense if nothing is on present on that LUN.
This commit is contained in:
@@ -578,12 +578,12 @@ BuslogicSCSIBIOSRequestSetup(x54x_t *dev, uint8_t *CmdBuf, uint8_t *DataInBuf, u
|
||||
|
||||
SCSIStatus = SCSI_STATUS_OK;
|
||||
|
||||
if (!scsi_device_present(ESCSICmd->TargetId, ESCSICmd->LogicalUnit)) {
|
||||
buslogic_log("SCSI Target ID %i and LUN %i have no device attached\n",ESCSICmd->TargetId,ESCSICmd->LogicalUnit);
|
||||
if (!scsi_device_present(ESCSICmd->TargetId, 0)) {
|
||||
buslogic_log("SCSI Target ID %i has no device attached\n",ESCSICmd->TargetId,ESCSICmd->LogicalUnit);
|
||||
DataInBuf[2] = CCB_SELECTION_TIMEOUT;
|
||||
DataInBuf[3] = SCSI_STATUS_OK;
|
||||
} else {
|
||||
buslogic_log("SCSI Target ID %i and LUN %i detected and working\n", ESCSICmd->TargetId, ESCSICmd->LogicalUnit);
|
||||
buslogic_log("SCSI Target ID %i detected and working\n", ESCSICmd->TargetId, ESCSICmd->LogicalUnit);
|
||||
|
||||
buslogic_log("Transfer Control %02X\n", ESCSICmd->DataDirection);
|
||||
buslogic_log("CDB Length %i\n", ESCSICmd->CDBLength);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include "scsi_disk.h"
|
||||
|
||||
|
||||
static uint8_t scsi_null_device_sense[14] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
static uint8_t scsi_null_device_sense[14] = { 0x70,0,SENSE_ILLEGAL_REQUEST,0,0,0,0,0,0,0,0,0,ASC_INV_LUN,0 };
|
||||
|
||||
|
||||
static void scsi_device_target_command(int lun_type, uint8_t id, uint8_t *cdb)
|
||||
|
@@ -1033,9 +1033,8 @@ x54x_scsi_cmd(x54x_t *dev)
|
||||
|
||||
SenseBufferFree(req, (SCSIStatus != SCSI_STATUS_OK));
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
SenseBufferFree(req, (SCSIStatus != SCSI_STATUS_OK));
|
||||
}
|
||||
|
||||
x54x_set_residue(req, target_data_len);
|
||||
|
||||
@@ -1103,14 +1102,15 @@ x54x_req_setup(x54x_t *dev, uint32_t CCBPointer, Mailbox32_t *Mailbox32)
|
||||
|
||||
SCSIStatus = SCSI_STATUS_OK;
|
||||
|
||||
if (! scsi_device_present(id, lun)) {
|
||||
/* If there is no device at ID:0, timeout the selection - the LUN is then checked later. */
|
||||
if (! scsi_device_present(id, 0)) {
|
||||
x54x_log("SCSI Target ID %i and LUN %i have no device attached\n",id,lun);
|
||||
x54x_mbi_setup(dev, CCBPointer, &req->CmdBlock,
|
||||
CCB_SELECTION_TIMEOUT, SCSI_STATUS_OK, MBI_ERROR);
|
||||
x54x_log("%s: Callback: Send incoming mailbox\n", dev->name);
|
||||
x54x_notify(dev);
|
||||
} else {
|
||||
x54x_log("SCSI Target ID %i and LUN %i detected and working\n", id, lun);
|
||||
x54x_log("SCSI Target ID %i detected and working\n", id);
|
||||
|
||||
x54x_log("Transfer Control %02X\n", req->CmdBlock.common.ControlByte);
|
||||
x54x_log("CDB Length %i\n", req->CmdBlock.common.CdbLength);
|
||||
|
Reference in New Issue
Block a user