site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com = Mike On Sep 20, 2006, at 9:13 AM, Yogesh Pahilwan wrote: Hi Folks, I am trying to write application through which I can access SCSI block devices (SCSI disk) by using SCSI device interface. Device appeared. 0 Found device class "IOSCSILogicalUnitNub" using STUC. *********** Requesting Inquiry Data *********** 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 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/drivers%40mu.org _______________________________________________ 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... I dimly recall that SCSI direct access is not permitted to DA devices, as the OS driver claims exclusive ownership. As I believe has been pointed out to you previously, if you want to talk to this device you are going to have to write a stub driver that matches it, and export your own 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: 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 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. This email sent to drivers@mu.org This email sent to site_archiver@lists.apple.com