2005-10-18 04:14:04

by Deven Balani

[permalink] [raw]
Subject: Why do we need libata to access SATA host controller low level device drivers?

Hi Everybody

I'm sorry if my question sounds absurd to some. I've found out through
web sources, for the following reasons/features we need libata,

[1] libata is a library used inside the linux kernel to support ATA
host controllers and devices.
[2] libata provides an ATA driver API, class transport for ATA and
ATAPI devices and SCSI<->ATA translation for ATA devices according to
the T10 SAT spec.
[3] libata causes each SATA to appear as a SCSI bus.
[4] It controls how the low-level driver interfaces with the ATA and
SCSI layers.
[5] libata supports the necessary "lba48" ATA addressing extension
starting with kernel version 2.6.5-rc2.
[6] libata has hotplug & random task file submission(thus enabling
SMART support).
SOURCE KEY:[1][2][4]libata.pdf
[3][5][6]http://linuxmafia.com/faq/Hardware/sata.html

But still at the back of my curious mind I'm looking for the most
appropriate answer to this question that can come only come from the
experienced linux kernel experts of this group.

Now some info about myself, i'm a software engineer in india and
developing GPL'ed (open source and Linux Kernel 2.4 based) SATA
low-level driver for a SATA/ATAPI-6 Host Controller on a ARM 920TDMI
based chipset.

Looking forward for your replies and guidance. Thanks.


2005-10-18 13:48:17

by Erik Mouw

[permalink] [raw]
Subject: Re: Why do we need libata to access SATA host controller low level device drivers?

On Tue, Oct 18, 2005 at 09:44:02AM +0530, Deven Balani wrote:
> I'm sorry if my question sounds absurd to some. I've found out through
> web sources, for the following reasons/features we need libata,

[...]

> But still at the back of my curious mind I'm looking for the most
> appropriate answer to this question that can come only come from the
> experienced linux kernel experts of this group.

The most appropriate answer is: "cause you don't want to reinvent the
wheel". In order to get full SATA support, you only need to write a
host driver, libata takes care of the gory details.

> Now some info about myself, i'm a software engineer in india and
> developing GPL'ed (open source and Linux Kernel 2.4 based) SATA
> low-level driver for a SATA/ATAPI-6 Host Controller on a ARM 920TDMI
> based chipset.

You don't want to use a 2.4 kernel on ARM, especially not when you're
using new hardware. 2.4 is development is dead, everybody has moved to
2.6.


Erik

--
+-- Erik Mouw -- http://www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands

2005-10-18 14:14:22

by Deven Balani

[permalink] [raw]
Subject: Re: Why do we need libata to access SATA host controller low level device drivers?

> The most appropriate answer is: "cause you don't want to reinvent the
> wheel". In order to get full SATA support, you only need to write a
> host driver, libata takes care of the gory details.
Thanks Erik for that useful suggestion.

> You don't want to use a 2.4 kernel on ARM, especially not when you're
> using new hardware. 2.4 is development is dead, everybody has moved to
> 2.6.
Since we already have Linux Kernel 2.4 based drivers for all the other
devices present on our ARM 920TDMI based chipset which we cannot
change. The SATA driver which I'm going to write has to be based on
Kernel 2.4.25. Through backported patches I have to make Kernel 2.4.25
to support our new SATA driver and as well our existing device
drivers.

Please do let me now if you have any suggestions in this regard.

Thanks:-),
Deven