Problem in accessing SCSI block devices from user space application
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: Acbcz8Owmx7mjhoGSe2w0gCdcuunQQ== Hi Folks, I am trying to write application through which I can access SCSI block devices (SCSI disk) by using SCSI device interface. I have gone through sample codes available on apple site. But this code is not working for the "Peripheral Device Type" = 0x00 which is a Direct Access Block device. This code is working fine with "Peripheral Device Type "= 0x03. When I specify Peripheral Device Type = 0x00, the code is able to recognize the devices but not able to find the appropriate device interface to open the connection with the device for sending the commands. Code is failing in function IOCreatePlugInInterfaceForService (service, kIOSCSITaskDeviceUserClientID, kIOCFPlugInInterfaceID, &score); This function gives me following error: IOCreatePlugInInterfaceForService returned -536870201. When I run this sample code with changes it is showing me the following output: Device appeared. 0 Found device class "IOSCSILogicalUnitNub" using STUC. *********** Requesting Inquiry Data *********** taskStatus = 0, transferCountHi = 0x00000000, transferCountLo = 0x00000024 *********** INQUIRY DATA *********** Peripheral Device Type = 3 Removable Media Bit = 0 Vendor Identification = CNSi Product Identification = R2500:A Product Revision Level = D114 taskStatus = 0 Good Status Device appeared. 1 Found device class "IOSCSILogicalUnitNub" using STUC. IOCreatePlugInInterfaceForService returned -536870201 Device appeared. 2 Found device class "IOSCSILogicalUnitNub" using STUC. IOCreatePlugInInterfaceForService returned -536870201 Device appeared. 3 Found device class "IOSCSILogicalUnitNub" using STUC. IOCreatePlugInInterfaceForService returned -536870201 Device appeared. 4 Please suggest how I should specify the correct device interface; so that I will be able to perform "Inquiry" command onto the underneath SCSI block devices using the device interface mechanism in user space application. Thanks & Regards, Yogesh _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Yogesh Pahilwan