X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..fa4905b191e0d16b0fffd53bd565eca71d01fae0:/iokit/Families/IOSCSIParallel/IOSCSIParallelDevice.cpp?ds=sidebyside diff --git a/iokit/Families/IOSCSIParallel/IOSCSIParallelDevice.cpp b/iokit/Families/IOSCSIParallel/IOSCSIParallelDevice.cpp index bdd9d626f..0f691f745 100644 --- a/iokit/Families/IOSCSIParallel/IOSCSIParallelDevice.cpp +++ b/iokit/Families/IOSCSIParallel/IOSCSIParallelDevice.cpp @@ -28,6 +28,7 @@ #include #include +#include #undef super #define super IOSCSIDevice @@ -161,7 +162,7 @@ IOReturn IOSCSIParallelDevice::probeTargetLun() goto probeError; } - size = kDefaultInquirySize; + size = sizeof(SCSIInquiry); if ( !(inqData = (SCSIInquiry *)IOMalloc(size)) ) { @@ -1315,17 +1316,20 @@ bool IOSCSIParallelDevice::checkTag( IOSCSIParallelCommand *scsiCmd ) { break; } + + /* If the command is untagged, then don't allocate a tag nor + * send the untagged command as a simple-tagged command. + */ + if ( scsiCDB.cdbTagMsg == 0 ) + { + break; + } if ( allocTag( &scsiCDB.cdbTag ) == false ) { rc = false; break; } - - if ( scsiCDB.cdbTagMsg == 0 ) - { - scsiCDB.cdbTagMsg = kSCSIMsgSimpleQueueTag; - } } while ( 0 ); @@ -1848,6 +1852,7 @@ OSDictionary *IOSCSIParallelDevice::createProperties() OSObject *regObj; char tmpbuf[81]; char *d; + char unit[10]; propTable = OSDictionary::withCapacity(kSCSIMaxProperties); if ( propTable == NULL ) @@ -1867,6 +1872,9 @@ OSDictionary *IOSCSIParallelDevice::createProperties() goto createprop_error; } + sprintf(unit,"%x",targetLun.target); + setLocation(unit); + regObj = (OSObject *)OSNumber::withNumber(targetLun.lun,32); if ( addToRegistry( propTable, regObj, kSCSIPropertyLun ) != true ) {