C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-01-2008, 03:37 AM   #1
Registered User
 
Join Date: Nov 2008
Posts: 4
Linux SCSI programming

Hi,

I'm trying to port a Windows SCSI API over to Linux. The API has several functions, most of them using ATA_PASS_THROUGH_EX to send a vendor specific command over to the device. I've managed to port 1 of the API function that is a modified INQUIRY command. However, I'm very confused as to how ATA passthrough is done in Linux. I've looked at the sg3_utils source code to get some inspiration but it's too complicated for me to understand what's going on.

Does anyone know how to port this?

In Windows a ATA_PASS_THROUGH_EX pointer is declared and memory allocated for it. It's fields are then initialized(Length, AtaFlags, DataTransferLength, TimeOutValue, DataBufferOffset, CurrentTaskFile[], PreviousTaskFile[], etc) and then a DeviceIoControl() is called.

Now I know Linux's version of DeviceIoControl is ioctl() and I've used it successfully for the INQUIRY command, but what's Linux's version of ATA_PASS_THROUGH_EX?

Any help would be appreciated. Thanks!
galapogos is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless Network Linux & C Testbed james457 Networking/Device Communication 3 06-11-2009 11:03 AM
Linux SCSI read/write galapogos Linux Programming 1 12-09-2008 10:36 AM
Dabbling with Linux. Hunter2 Tech Board 21 04-21-2005 04:17 PM
installing linux for the first time Micko Tech Board 9 12-06-2004 05:15 AM


All times are GMT -6. The time now is 09:21 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22