Skip to contentSkip to conversation

pata_acpi: restore driver

PATCH Applied [email protected] 4 participants 5 messages Oct 2, 2007 – Oct 3, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 pata_acpi: restore driver

From: Alan Cox <[email protected]>

This patch assumes the mode filter patches were applied, if not then ping me and I'll send the trivially different patch (extra argument to mode_filter)

Don't assume the BIOS can validate modes or has any sense at all. Instead use the BIOS timings to deduce the modes.

---

 drivers/ata/Kconfig     |    9 
 drivers/ata/Makefile    |    2 
 drivers/ata/pata_acpi.c |  403 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 414 insertions(+)
drivers/ata/Kconfig renamed from drivers/ata/Kconfig~pata_acpi-restore-driver +9 -0
diff -puN drivers/ata/Kconfig~pata_acpi-restore-driver drivers/ata/Kconfig
@@ -173,6 +173,15 @@ config SATA_INIC162X
 	help
 	  This option enables support for Initio 162x Serial ATA.
 
+config PATA_ACPI
+	tristate "ACPI firmware driver for PATA"
+	depends on ACPI && PCI && SATA_ACPI
+	help
+	  This option enables an ACPI method driver which drives
+	  motherboard PATA controller interfaces through the ACPI
+	  firmware in the BIOS. This driver can sometimes handle
+	  otherwise unsupported hardware.
+
 config PATA_ALI
 	tristate "ALi PATA support (Experimental)"
 	depends on PCI && EXPERIMENTAL
drivers/ata/Makefile renamed from drivers/ata/Makefile~pata_acpi-restore-driver +2 -0
diff -puN drivers/ata/Makefile~pata_acpi-restore-driver drivers/ata/Makefile
@@ -66,6 +66,8 @@ obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
+# Should be last but two libata driver
+obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
 # Should be last but one libata driver
 obj-$(CONFIG_ATA_GENERIC)	+= ata_generic.o
 # Should be last libata driver
drivers/ata/pata_acpi.c new file +403 -0

403 lines not on this page · raw message

_

#1 lore raw
Quoted 12 lines · [email protected] wrote:

From: Alan Cox <[email protected]>

This patch assumes the mode filter patches were applied, if not then ping me and I'll send the trivially different patch (extra argument to mode_filter)

Don't assume the BIOS can validate modes or has any sense at all. Instead use the BIOS timings to deduce the modes.

Quoted 6 lines

---

 drivers/ata/Kconfig     |    9 
 drivers/ata/Makefile    |    2 
 drivers/ata/pata_acpi.c |  403 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 414 insertions(+)

Can I get a better email subject and patch description please?

Just reply to this email, and I can hand-edit the patch from there.

"pata_acpi: restore driver" is a bad one-line summary, because nothing was lost (hence nothing to be restored). it's simply a new driver.

The patch description is also wanting -- it describes work-in-progress, but should really be a summary of what the pata_acpi driver is, why we want it, and how it works.

Email some text, and I shall apply straightaway.

Jeff

#2 lore raw
Quoted 24 lines · On Wed, 03 Oct 2007 16:29:58 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 12 lines · [email protected] wrote:

From: Alan Cox <[email protected]>

This patch assumes the mode filter patches were applied, if not then ping me and I'll send the trivially different patch (extra argument to mode_filter)

Don't assume the BIOS can validate modes or has any sense at all. Instead use the BIOS timings to deduce the modes.

Quoted 6 lines

---

 drivers/ata/Kconfig     |    9 
 drivers/ata/Makefile    |    2 
 drivers/ata/pata_acpi.c |  403 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 414 insertions(+)

Can I get a better email subject and patch description please?

Just reply to this email, and I can hand-edit the patch from there.

Quoted 8 lines

"pata_acpi: restore driver" is a bad one-line summary, because nothing was lost (hence nothing to be restored). it's simply a new driver.

The patch description is also wanting -- it describes work-in-progress, but should really be a summary of what the pata_acpi driver is, why we want it, and how it works.

Email some text, and I shall apply straightaway

On a cable there may be
eighty wires or perhaps forty
and we learn about its type
In the world of ACPI

So we call the GTM
And we find the the timing rate
And we look through it to see
If eighty wire it must be

Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines

And the drivers call into see
Which cable type its to be
And the code begins to work

Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines

[Full speed ahead, Mr Hacker, full speed ahead]
Full speed over here sir!
Checking Cable, checking cable
Aye aye, 80 wire,
Heaven heaven]

If we use ACPI (ACPI)
Every box (every box) has all we need (has all we need) Cable type (cable type) and mode timing (mode timing) In our ATA (in our ATA) subroutines (subroutines, ha ha)

Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines
Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines

#3 lore raw
Quoted 72 lines · Alan Cox
Quoted 24 lines · On Wed, 03 Oct 2007 16:29:58 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 12 lines · [email protected] wrote:

From: Alan Cox <[email protected]>

This patch assumes the mode filter patches were applied, if not then ping me and I'll send the trivially different patch (extra argument to mode_filter)

Don't assume the BIOS can validate modes or has any sense at all. Instead use the BIOS timings to deduce the modes.

Quoted 6 lines

---

 drivers/ata/Kconfig     |    9 
 drivers/ata/Makefile    |    2 
 drivers/ata/pata_acpi.c |  403 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 414 insertions(+)

Can I get a better email subject and patch description please?

Just reply to this email, and I can hand-edit the patch from there.

Quoted 8 lines

"pata_acpi: restore driver" is a bad one-line summary, because nothing was lost (hence nothing to be restored). it's simply a new driver.

The patch description is also wanting -- it describes work-in-progress, but should really be a summary of what the pata_acpi driver is, why we want it, and how it works.

Email some text, and I shall apply straightaway

On a cable there may be
eighty wires or perhaps forty
and we learn about its type
In the world of ACPI

So we call the GTM
And we find the the timing rate
And we look through it to see
If eighty wire it must be

Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines

And the drivers call into see
Which cable type its to be
And the code begins to work

Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines

[Full speed ahead, Mr Hacker, full speed ahead]
Full speed over here sir!
Checking Cable, checking cable
Aye aye, 80 wire,
Heaven heaven]

If we use ACPI (ACPI)
Every box (every box) has all we need (has all we need) Cable type (cable type) and mode timing (mode timing) In our ATA (in our ATA) subroutines (subroutines, ha ha)

Quoted 8 lines

Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines
Timing lives in ACPI routines
ACPI routines, ACPI routines
Timing lives in ACPI routines
ACPI routes ACPI routines

If you could do a few SCSI ones, I'd particularly appreciate one to the tune of Lucy in the Sky with Diamonds (although it's not on the same album, unfortunately) ...

James

#4 lore raw
In reply to [email protected]
Quoted 19 lines · [email protected] wrote:
drivers/ata/pata_acpi.c new file +16 -0
@@ -0,0 +1,403 @@
+/*
+ *	ACPI PATA driver
+ *
+ *	(c) 2007 Red Hat  <[email protected]>
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <scsi/scsi_host.h>
+#include <acpi/acpi_bus.h>
+#include <acpi/acnames.h>

drivers/ata/pata_acpi.c line 26

Quoted 10 lines
drivers/ata/pata_acpi.c new file +10 -0
+#include <acpi/acnamesp.h>
+#include <acpi/acparser.h>
+#include <acpi/acexcep.h>
+#include <acpi/acmacros.h>
+#include <acpi/actypes.h>
+
+#include <linux/libata.h>
+#include <linux/ata.h>
+
+#include "libata-acpi.h"

Just to recap the conversion in IRC, this patch contains two fatal problems:

* libata-acpi.h was not included, thus it doesn't build

* it depends on non-existent symbol CONFIG_SATA_ACPI (should be CONFIG_ATA_ACPI), which also means it never gets built

So the ball and lyrics are back in Alan's court ;-) (or should I say submarine back in Alan's coastal waters)

Jeff