Please refer to USCSI(7I) manpage. The ioctl() is not HBA driver's ioctl().
The ioctl() is for target drivers. NOT for HBA drivers.
You created a minor node(:hptiop) which is node associated to HBA. So 
after you open your node and send ioctl(), actually invoke the ioctl() 
of your HBA driver, does you hba driver implement new ioctl()?

uSCSI ioctl() interfaces is to invoke target driver's ioctl(), for 
examples, sd(7D), st(7D), sgen(7D) etc.

I ask you use "/dev/rdsk/c0t0d0p0" to send ioctl(), because you need 
open a target device rather than HBA device.

/dev/rdsk/c0t0d0p0 actually is a link which points to 
/devices/pciXXXX/.../[EMAIL PROTECTED],x..

Does it help?

Javen

Steve Chang wrote:

>Hi Javen,
>I am still confused. Can you explain a little 
>why not I can't use the character device name I 
>created in driver(shown on device tree "/device/[EMAIL PROTECTED],\
>0/pci8086,[EMAIL PROTECTED]/pci1103,[EMAIL PROTECTED]:hptiop") but rather need
>to use "/dev/rdsk/c0t0d0p0"? 
>
>
>Steve 
> 
>
>-----Original Message-----
>From: Javen Wu [mailto:[EMAIL PROTECTED] 
>Sent: Monday, May 12, 2008 7:39 PM
>To: Steve Chang
>Cc: [email protected]
>Subject: Re: [driver-discuss] SCSI HBA ioctl question?
>
>
>  
>
>>Another question is which slice# should I open and 
>> 
>>
>>    
>>
>It depends on platform and label type.
>If your driver only run on X86, p0(partition 0) is always exist.
>
>  
>
>>why not using character device name? 
>> 
>>
>>    
>>
>/dev/rdsk/c0t0d0p0 is character device. all links under /dev/rdsk are 
>character devices.
>
>Javen
>
>  
>
>>Thanks
>>Steve 
>>
>>
>>-----Original Message-----
>>From: Javen Wu [mailto:[EMAIL PROTECTED] 
>>Sent: Sunday, May 11, 2008 7:42 PM
>>To: Steve Chang
>>Cc: [email protected]
>>Subject: Re: [driver-discuss] SCSI HBA ioctl question?
>>
>>USCSI(7I) is ioctl() of target drivers rather than a ioctl() of 
>>HBA/nexus drivers.
>>If you want to use USCSI(7I), please open your disk/tape/enclosure 
>>device node and send ioctl().
>>for example, open /dev/rdsk/c0t1d0s0, then send ioctl().
>>
>>Don't use HBA node to send USCSI. Detail please refer to manpage of 
>>USCSI(7I).
>>
>>Javen
>>
>>Steve Chang wrote:
>>
>> 
>>
>>    
>>
>>>Here is a ioctl() question,
>>>I use ddi_create_minor_node(fd, "hptiop", instance, DDI_NT_NEXUS,0)
>>>to create a character device for ioctl. And I can find a node listed
>>>in "/device/[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci1103,[EMAIL 
>>>PROTECTED]:hptiop". What is the
>>>real device name that I need to submit in my application, so I can
>>>open a channel to communicate with HBA driver through uscsi structure?
>>>
>>>
>>>Thanks
>>>Steve 
>>>
>>>
>>>_______________________________________________
>>>driver-discuss mailing list
>>>[email protected]
>>>http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>>>
>>>
>>>   
>>>
>>>      
>>>
>>_______________________________________________
>>driver-discuss mailing list
>>[email protected]
>>http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>> 
>>
>>    
>>
>
>_______________________________________________
>driver-discuss mailing list
>[email protected]
>http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>  
>

_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to