Switch to full style
In-depth technology research: finding new ways to recover data, accessing firmware, writing programs, reading bits off the platter, recovering data from dust.

Forum rules

Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...
Post a reply

SCSI-ATA Translation Programming

April 25th, 2012, 4:37

Hi,

I have code something for SATA drive run on SCSI standard.
I used ATA PASS-TROUGH(16) command for CDB format. The drive is 3TB.
I was used ATA command 'READ DMA EXT - 25h, with protocol DMA' and passing the ATA command into pass through CDB command.
When I run the test, it prompt the error.

Anybody have this experience before or anybody have other solution to read/write for HDD is greater than 3TB?
Anybody using the command READ DMA EXT (25h), WRITE DMA EXT (35h) in SCSI CDB command by using ATA Pass Through (16)?

Thanks for help.

Re: SCSI-ATA Translation Programming

April 25th, 2012, 9:15

Not every controller supports ATA PASS-TROUGH in general and not every controller support ATA PASS-TROUGH(16)
If you want an answer - post the code where you filling the ATA PASS TROUGH structure

Also have you consider using ReadFile and WriteFile Windows API functions?

Re: SCSI-ATA Translation Programming

April 25th, 2012, 22:08

Hi Doomer,

Thanks for reply.

We not using Window API, I running on Linux environment. We used sg3_utils-1.32 version as a communication between the HDD.
The PassThrough command can worked for other command which is low LBA like below 2TB. Those drive with > 3TB we wish to use Read DMA EXT, Write DMA EXT... for the read16/write16 cannot support on SATL(SCSI to ATA Translation Layer).
The code we already checked and correct, is follow T10 & T13 standard.

Now we suspect is the driver or the sg3_utils cannot support the command which > 3TB HDD. The new version for sg3_utils-1.33, I'm not yet try. See can get something different.

The error message we get from the log is 'Host keep resetting' if passsing the command READ DMA EXT thru ATA PASS Thru command.

Re: SCSI-ATA Translation Programming

April 25th, 2012, 22:36

READ DMA EXT supposed to be used for drives bigger than 128GB, not 2TB
If you can read 2TB drives that means you already using READ DMA EXT and the problem is elsewhere

Re: SCSI-ATA Translation Programming

April 25th, 2012, 23:55

We had tried, the command failed to read the capacity which lower LBA < 2TB
We stuck at here...
Our tester is using SAS card, in order to read/write SATA drive, we need to using ATA Pass-Through. There is no other method right?
mmm..... :(

Re: SCSI-ATA Translation Programming

April 26th, 2012, 10:10

Are you positive that you can use SAT ATA PASS TROUGH(16) call with other commands to your controller?
Because not all of the controllers support it, some only support SAT ATA PASS TROUGH(12)
Also there are 3 different ways to prepare SAT call I don't know which one you using

Re: SCSI-ATA Translation Programming

April 26th, 2012, 10:15

ihddCloud wrote:Our tester is using SAS card, in order to read/write SATA drive, we need to using ATA Pass-Through. There is no other method right?

If you need to read and write only, you can use SCSI Read and SCSI Write, these calls will be mapped by a controller automatically

Re: SCSI-ATA Translation Programming

April 26th, 2012, 23:54

Yes, you are right. We can use the read16/write16 SCSI command to accesss ATA HDD, the SATL will auto map it.
We have tested out with the 3TB WD drive. I think maybe the drive itself cannot support. Need to find out other drive.
According to T10 document, the Read/Write can support on ATA thru SATL.
Will try to get some others OEM drive to test...

Thanks Doomer
Post a reply