Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STIOCMD IOCTL On AIX 5L?

Status
Not open for further replies.

sheck

Programmer
Dec 14, 2005
4
US
I am getting an EFAULT error 14 (Bad Address) on AIX 5L but I don't see this on AIX 4.3.3. Doesn't matter if it is built on 5L. Is STIOCMD supported by 5L?

struct sc_iocmd scmd;

(void) memset((char *)&scmd, 0, sizeof(scmd));

scmd.scsi_cdb[0] = 0x12;
scmd.scsi_cdb[1] = 0x0;
scmd.scsi_cdb[2] = 0x0;
scmd.scsi_cdb[3] = 0x0;
scmd.scsi_cdb[4] = 0x38;
scmd.scsi_cdb[5] = 0x0;

scmd.command_length = 0x06;

scmd.buffer = inq_data;

scmd.data_length = sizeof (inq_data);

scmd.flags = B_READ;

scmd.timeout_value = 60

if ( ioctl(fd, STIOCMD, &scmd) < 0 ) {
printf( "ioctl error on inquiry\n");
printf( "Errno: %d\n", errno);

(The device I am accessing is a tape drive.)

Thanks!

 
Hello Mike,

Thank you for your reply. I saw the same documentation but I am not getting expected results. There doesn't appear to be any changes from 4.3 to 5L regarding STIOCMD support. My src above works fine on 4.3 but causes this EFAULT error on 5L. Do you know of anyone who has implemented STIOCMD on 5L? Also is there a driver developer forum for AIX?

Thanks!
 
I'd open a call with IBM; I've had a look through to see if any fixes exist. I only found the following which don't really match 100%





Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Hello Mike,

Yes I guess I will have to try to make contact with IBM some how.

Thanks!
 
Hello Mike,

I did some more testing and this only happen with FC. I have no problem with direct attached SCSI.

Is there a way to determine what tape driver and version is installed? I am using AIX 5.2 and my tape drives are listed as other SCSI and FC.

I haven't tried installing the Atape driver and not sure if it supports non IBM tape drives. I am using Sony AIT and SAIT tape drives.

I am probably going to have to open a call with IBM but I just want to gather as much info as possible before going to them. I have never had such problems on other UNIX based OSes. They have a straight forward SCSI pass-through interfaces.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top