Re: Problem in accessing SCSI block devices from user space application
Re: Problem in accessing SCSI block devices from user space application
- Subject: Re: Problem in accessing SCSI block devices from user space application
- From: Michael Smith <email@hidden>
- Date: Wed, 20 Sep 2006 09:33:52 -0700
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.
= 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.
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden