Propagate is-ATAPI restriction to the SCSI bus manager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22874 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a097d8c8ee
commit
79844706c2
@ -330,3 +330,12 @@ AHCIController::ResetDevice(uchar targetID, uchar targetLUN)
|
||||
return fPort[targetID]->ScsiResetDevice();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AHCIController::GetRestrictions(uchar targetID, bool *isATAPI, bool *noAutoSense, uint32 *maxBlocks)
|
||||
{
|
||||
if (!fPort[targetID])
|
||||
return;
|
||||
|
||||
return fPort[targetID]->ScsiGetRestrictions(isATAPI, noAutoSense, maxBlocks);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
uchar AbortRequest(scsi_ccb *request);
|
||||
uchar TerminateRequest(scsi_ccb *request);
|
||||
uchar ResetDevice(uchar targetID, uchar targetLUN);
|
||||
void GetRestrictions(uchar targetID, bool *isATAPI, bool *noAutoSense, uint32 *maxBlocks);
|
||||
|
||||
device_node_handle DeviceNode() { return fNode; }
|
||||
|
||||
|
@ -772,3 +772,14 @@ AHCIPort::ScsiResetDevice()
|
||||
{
|
||||
return SCSI_REQ_CMP;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AHCIPort::ScsiGetRestrictions(bool *isATAPI, bool *noAutoSense, uint32 *maxBlocks)
|
||||
{
|
||||
*isATAPI = !!(fRegs->cmd & PORT_CMD_ATAPI);
|
||||
*noAutoSense = false;
|
||||
*maxBlocks = fUse48BitCommands ? 65536 : 256;
|
||||
TRACE("AHCIPort::ScsiGetRestrictions port %d: isATAPI %d, noAutoSense %d, maxBlocks %lu\n",
|
||||
fIndex, *isATAPI, *noAutoSense, *maxBlocks);
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
uchar ScsiAbortRequest(scsi_ccb *request);
|
||||
uchar ScsiTerminateRequest(scsi_ccb *request);
|
||||
uchar ScsiResetDevice();
|
||||
void ScsiGetRestrictions(bool *isATAPI, bool *noAutoSense, uint32 *maxBlocks);
|
||||
|
||||
private:
|
||||
void ScsiTestUnitReady(scsi_ccb *request);
|
||||
|
@ -104,9 +104,7 @@ ahci_get_restrictions(scsi_sim_cookie cookie, uchar targetID, bool *isATAPI,
|
||||
{
|
||||
TRACE("ahci_get_restrictions, cookie %p\n", cookie);
|
||||
|
||||
*isATAPI = false;
|
||||
*noAutoSense = false;
|
||||
*maxBlocks = 256;
|
||||
static_cast<AHCIController *>(cookie)->GetRestrictions(targetID, isATAPI, noAutoSense, maxBlocks);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user