Hi,
I tried to use the reference of below file but till not succeeded.
Meanwhile I did some research and found that there is no scsi controller is
present on system.
But there sd driver , scsi_vhci driver and ssd driver are available.
With this data I have some queries.
1. If there is no scsi HBA controller, what will be outout of uscsi command
after communicating with scsi driver. will it be ERROR: Bad Address
2. Besides below directories is there any directory to look for scsi
devices?
# ls /devices/scsi_vhci/ ......No device
#ls /dev/cfg/ ... No device
# ls /dev/rmt/ ... No device
# ls /dev/rdsk/
c0t7d0p0 c0t7d0p4 c0t7d0s11 c0t7d0s15 c0t7d0s5 c0t7d0s9 c1t0d0p3
c1t0d0s10 c1t0d0s14 c1t0d0s4 c1t0d0s8 c0t7d0p1 c0t7d0s0 c0t7d0s12
c0t7d0s2 c0t7d0s6 c1t0d0p0 c1t0d0p4 c1t0d0s11 c1t0d0s15 c1t0d0s5
c1t0d0s9 c0t7d0p2 c0t7d0s1 c0t7d0s13 c0t7d0s3 c0t7d0s7 c1t0d0p1
c1t0d0s0 c1t0d0s12 c1t0d0s2 c1t0d0s6
c0t7d0p3 c0t7d0s10 c0t7d0s14 c0t7d0s4 c0t7d0s8 c1t0d0p2 c1t0d0s1
c1t0d0s13 c1t0d0s3 c1t0d0s7
when I give uscsi /dev/rdsk/c0t7d0s0 I get details of SATA hard
disk.Thatmeans any one scsi driver (sd/sgen/scsi_vhci) is working. Is
it right?
3. What is my thinking is that, if there is no scsi target in the above
directores then uscsi command will fail and give message ERROR: Bad Message.
Is it true?
4. I also tried in different way to check for scsi devices but not
succeeded. I am here give code lines which I tried to search scsi devices.
//#define DIR "/devices/scsi_vhci:devctl"
//#define DIR "/dev"
#define DIR "/dev/cfg/"
//#define DIR "/etc/path_to_inst"
int dirSelect(const struct dirent * s)
{
int i;
int j = 0;
if (sscanf(s->d_name, "%d", &i) == 1)
{
if ((i >= 0) && (i < 1000))
{
array[i] = 1;
j = 1;
}
}
return j;
}
int scsiscan(const char * dirName)
{
struct dirent ** array2;
int num;
int i;
int j;
num = scandir(dirName, &array2, dirSelect, NULL);
if (num < 0)
{
j = -errno;
}
else
{
for (i = 0; i < num; ++i)
{
free(array2[i]);
}
j = num;
}
free(array2);
return j;
}
I am always getting value of j as 0. what is wrong with above code. Or as
there is no scsi target devices are present, I am getting this value as 0 ?
As I am very new to solaris and I have only this forum as a discussion
platform, I am putting my queries here.
Expect solution from helpful hands.
Regards,
Aakash
On Sat, Mar 1, 2008 at 10:46 AM, James C. McPherson <[EMAIL PROTECTED]>
wrote:
> On Sat, 01 Mar 2008 08:01:59 +0530
> aakash berde <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I am trying to communicate with scsi_vhci driver using uscsi(USCSICMD
> > ioctl). but not getting success till now.
> >
> > I would really appreciate if any one sends an example demo which
> > communicates with scsi_vhci driver or sd driver using uscsi.
> > It will really help me to crosscheck my work.
>
> If you have a look in the source for "stmsboot" starting with
>
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/stmsboot/stmsboot_util.c
>
> then I believe you'll be getting a good start. The other documentation,
> such as it is, can be found in the sunmdi.c and scsi_vhci files
>
>
>
> James C. McPherson
> --
> Senior Kernel Software Engineer, Solaris
> Sun Microsystems
> http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
>
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code