SCO OpenServer 5 Generic SCSI device Query.

SCO OpenServer 5 Generic SCSI device Query.

Post by John McCan » Tue, 29 Sep 1998 04:00:00



Hi all,

I am trying to access a scsi device that is not a disk/cdrom etc. I need
to access at application level a scanner ,  processor and SES device. Is
there a generice scsi driver I could use ?

I am hoping to use an `ioctl` command to a character device.  ie

    fd = open("/dev/rhd0", O_RDONLY) .
    ret = ioctl(fd, SCSIUSERCMD, &my_scsi);

    where my_scsi is a scsicmd struct.

Is there a device name I could use in the above situation that isn't a
disk.?

If not can I create one and how?

Are there any sites that I can look at for more help ??

Any help appreciated and thanked for in advance,

John McCann

Senior Development Eng.
SCO Novice.

 
 
 

1. How to get SCSI-Host nr from generic SCSI device?

Hi,
can any SCSI-Expert out there help me?
All I want to do is finding to a specific generic device its host,id,lun
and channel.

I found the SCSI_IOCTL_GET_IDLUN very helpful, but this does not output
the host...at least not in a format I understand it.

Here is my simple test-programm:
-------------

#include <stdio.h>
#include <scsi/scsi.h>

struct  sg_id {
                long    l1; /* target | lun << 8 | channel << 16 | low_ino << 24
 */
                long    l2; /* Unique id */

main() {
int fd;

        fd = open ("/dev/sg0",2);
        ioctl(fd, SCSI_IOCTL_GET_IDLUN, &sg_id);
        close(fd);

        printf("l1: 0x%lX l2: 0x%lX\n", sg_id.l1, sg_id.l2);

---------

When I run it I get:

l1: 0x7000000 l2: 0x0

Fine..this means my device /dev/sg0 is ID 0, Lun 0, Channel 0. Very good
so far...but what does the "low_ino" of 0x07 mean?
Is there a way to conclude from the 0x07 to Host 0?

I have run this programm for different devices on linux (all 2.0.x) with
more than one controllers:

-> For different controllers the low_ino changes, with seems to be fine, but
I still dont know which low_ino corresponds to which host!

Thanx for any answer,

Thomas

  ___ ___              
 /   |   \  ___________   | REAL   : Thomas Niederreiter: Munich, Germany  

\    Y    (  <_> )  | \/  | MUD/IRC: Hor/_Hor  
 \___|_  / \____/|__|     |
       \/ All I want is a warm bed and a kind word and unlimited power        
                      -- Ashleigh Brilliant

2. samedit

3. How to recognize SCSI CD-ROM as a "Generic SCSI" device?

4. Crytographic file system?

5. USCSI : generic SCSI query.

6. 2.1.36 chunky?

7. COM Port Device Driver - SCO OpenServer 5

8. How to get recursive sub-shells in csh expression?

9. Writing memory mapped device drivers for sco unix openserver 5.0

10. IDE Generic SCSI devices (emulated)

11. Solaris 8 uscsi does not work with /dev/sg device (SCSI generic)

12. generic SCSI for ATAPI devices

13. Generic SCSI devices