Skip to contentSkip to conversation

Staging: add pata_rdc driver

DISCUSSION Alan Cox 2 participants 5 messages Jun 22, 2009 – Jun 24, 2009 1 message not in the archive

lore
Share & tools
lore

Alan Cox

author
#1 lore raw
In reply to a message not in the archive

Review

Quoted 5 lines
(quoted diff) +5 -0
+static struct pci_bits ATA_Decode_Enable_Bits[] = { // see ATA Host Adapters Standards.
+    { 0x41U, 1U, 0x80UL, 0x80UL },    /* port (Channel) 0 */
+    { 0x43U, 1U, 0x80UL, 0x80UL },    /* port (Channel) 1 */
+};
+

Decode bits 0x80 in 0x41/0x43 - same as ata_piix

Quoted 1 line

+ /* no hotplugging support (FIXME) */ // why???

copied from the piix driver

Quoted 1 line

+ Mask = ATAConfiguration_IDEIOConfiguration_PrimaryDeviceCable80Report;

Cable bits at 0x54: same format as ATA_PIIX

and this continues throughout the driver

So it seems the following occurred

- take ata_piix
- remove all the innards of it
- replace them with identically functional but convoluted vendor code for the same actual hardware interface
- submit as new driver

Would someone please tell me wtf is going on here and why if the hardware is so close to ata_piix it doesn't either use the piix driver or if its very similar just use bits of it as was (as efar, mpiix and oldpiix do) ?

What if anything actually differs between Intel PIIX and the new RDC controllers ? Why can't we just cp ata_piix.c ata_rdc.c and just remove all the intel specific casing ?

Alan

#2 lore raw

I just know all pata follow the ATA ATAPI Host Adapters Standard.pdf.This standard describes all hardware interfaces for pata. (like sata and AHCI standard spec.)
The original draft does not have any Configuration Registers for Host Adapters. Then Intel proposes ATA Controller PCI Configuration Registers for this lack of the original draft, and T13 accept this proposal. But this spec. releases at 2003. So before its release, all vendor had own Configuration Registers. Our new controller follows this spec. so that OS can provide a standard driver for pata controller.
Our new controller have crypto function and crypto configuration registers.So it don’t like Intel controller.Some Intel controller have RAID function, but we have not.
-----Original Message-----From: Alan Cox [mailto:[email protected]] Sent: Monday, June 22, 2009 8:32 PMTo: Linux Kernel Mailing ListCc: [email protected]; [email protected]; Kevin Huang (黃凱文)Subject: Re: Staging: add pata_rdc driver

Quoted 1 line

+static struct pci_bits ATA_Decode_Enable_Bits[] = { // see ATA Host Adapters Standards.> + { 0x41U, 1U, 0x80UL, 0x80UL }, /* port (Channel) 0 */> + { 0x43U, 1U, 0x80UL, 0x80UL }, /* port (Channel) 1 */> +};> +

Decode bits 0x80 in 0x41/0x43 - same as ata_piix

Quoted 1 line

+ /* no hotplugging support (FIXME) */ // why???

copied from the piix driver

Quoted 1 line

+ Mask = ATAConfiguration_IDEIOConfiguration_PrimaryDeviceCable80Report;

Cable bits at 0x54: same format as ATA_PIIX
and this continues throughout the driver
So it seems the following occurred
- take ata_piix- remove all the innards of it- replace them with identically functional but convoluted vendor code forthe same actual hardware interface- submit as new driver
Would someone please tell me wtf is going on here and why if the hardwareis so close to ata_piix it doesn't either use the piix driver or if itsvery similar just use bits of it as was (as efar, mpiix and oldpiix do) ?
What if anything actually differs between Intel PIIX and the new RDCcontrollers ? Why can't we just cp ata_piix.c ata_rdc.c and just removeall the intel specific casing ?
Alan---------------------------------------------------------------------------------- [E-mail Confidentiality Notice]The information in this e-mail is confidential and may be legally privileged otherwise protected from disclosure. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized .If youare not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and maybe unlawful. Please delete the message and any attachments from your computer system; and destroy all hard copies. ALL Intellectual Property Rights of RDC Reserved.---------------------------------------------------------------------------------- �鐓漬.n�+䳍酙酞�+%𢫏�梢搋�w�漬.n�+䳍�{殺G��𢯊ay����,j迫fㄑ搬���𡟯蔰_霈(剝��▏"𠲖�m���拷G��9?膥霅�&�坍𥕥進O閙津�v傂�m��� �塑�9?𦎾�

#5 lore raw
In reply to Alan Cox

I just know all pata follow the ATA ATAPI Host Adapters Standard.pdf.This standard describes all hardware interfaces for pata. (like sata and AHCI standard spec.)
The original draft does not have any Configuration Registers for Host Adapters. Then Intel proposes ATA Controller PCI Configuration Registers for this lack of the original draft, and T13 accept this proposal.
But this spec. releases at 2003. So before its release, all vendor had own Configuration Registers.
[Kevin Huang] -> According to this spec. OS can provide a standard driver for different vendor's pata controller.
Our new controller have crypto function and crypto configuration registers.So it don’t like Intel controller.Some Intel controller have RAID function, but we have not.
---------------------------------------------------------------------------------- [E-mail Confidentiality Notice]The information in this e-mail is confidential and may be legally privileged otherwise protected from disclosure. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized .If youare not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and maybe unlawful. Please delete the message and any attachments from your computer system; and destroy all hard copies. ALL Intellectual Property Rights of RDC Reserved.---------------------------------------------------------------------------------- �鐓漬.n�+䳍酙酞�+%𢫏�梢搋�w�漬.n�+䳍�{殺G��𢯊ay����,j迫fㄑ搬���𡟯蔰_霈(剝��▏"𠲖�m���拷G��9?膥霅�&�坍𥕥進O閙津�v傂�m��� �塑�9?𦎾�

author
#3 lore raw
In reply to Kevin Huang (黃凱文)
Quoted 4 lines · On Tue, 23 Jun 2009 10:16:03 +0800 Kevin Huang (黃凱文) <[email protected]>…

I just know all pata follow the ATA ATAPI Host Adapters Standard.pdf.
This standard describes all hardware interfaces for pata. (like sata and AHCI standard spec.)

The original draft does not have any Configuration Registers for Host Adapters. Then Intel proposes ATA Controller PCI Configuration Registers for this lack of the original draft, and T13 accept this proposal.

If your controller is in fact following the Intel proposal then the interface is basically ata_piix (minus the various intel special cases) and that makes it very much easier to produce a driver rapidly rather than clean up the existing pata_rdc.

Quoted 2 lines

Our new controller have crypto function and crypto configuration registers. So it don’t like Intel controller.

It seems to be very very close in interface, and that does mean that there is a fast way to get it up and running which is to clone ata_piix, remove the irrelevant bits and tweak it. Then of course things like the crypto function can be added on top.

Is the documentation for the ATA part available ?

Alan

#4 lore raw

http://www.t13.org/Documents/MinutesDefault.aspx?DocumentType=4&DocumentStage=2INCITS 370-2004 (1510D): ATA Host Adapter Standards You can download the last draft of ATA Host Adapter Standards.

---------------------------------------------------------------------------------- [E-mail Confidentiality Notice]The information in this e-mail is confidential and may be legally privileged otherwise protected from disclosure. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized .If youare not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and maybe unlawful. Please delete the message and any attachments from your computer system; and destroy all hard copies. ALL Intellectual Property Rights of RDC Reserved.---------------------------------------------------------------------------------- �鐓漬.n�+䳍酙酞�+%𢫏�梢搋�w�漬.n�+䳍�{殺G��𢯊ay����,j迫fㄑ搬���𡟯蔰_霈(剝��▏"𠲖�m���拷G��9?膥霅�&�坍𥕥進O閙津�v傂�m��� �塑�9?𦎾�