mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Stas Sergeev <stsp@aknet.ru>,
	ambx1@neo.rr.com, david-b@pacbell.net, mingo@elte.hu,
	tglx@linutronix.de, dbrownell@users.sourceforge.net,
	rmk+lkml@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [patch][resend] provide rtc_cmos platform device, take 2
Date: Thu, 29 May 2008 08:54:53 -0600	[thread overview]
Message-ID: <200805290854.54577.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <20080528163600.b4c3c12c.akpm@linux-foundation.org>

On Wednesday 28 May 2008 05:36:00 pm Andrew Morton wrote:
> On Tue, 27 May 2008 15:23:06 +0400
> Stas Sergeev <stsp@aknet.ru> wrote:
> 
> > RTC doesn't work with pnpacpi=off.
> > The attached patch fixes the problem by creating the platform device for
> > the RTC when PNP is disabled. This may also help running the PNP-enabled
> > kernel on an older PCs.
> > 
> > Signed-off-by: Stas Sergeev <stsp@aknet.ru>
> > Cc: David Brownell <david-b@pacbell.net>
> > Cc: Ingo Molnar <mingo@elte.hu>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
> > Cc: Adam Belay <ambx1@neo.rr.com>
> > CC: Russell King <rmk+lkml@arm.linux.org.uk>
> 
> So is everyone happy with this now?
> 
> It got lost from the changelog but IIRC this fixes a small sort-of regression
> which was added in 2.6.25(?) because Stas switched drivers.  I assume
> that the incompatibility was unintentional.
> 
> So it might be 2.6.26 material, and possibly even 2.6.25.x?

I don't really have an opinion on the RTC patch itself, but I would
like to understand why you're using "pnpacpi=off".

As far as I'm concerned, "pnpacpi=off" should only be used to work
around defects, so I'd like to fix the defect you're seeing with
parport_pc.  Is there a bug report for it?

We recently fixed some PNPACPI problems that caused parport_pc
problems, i.e.,
    http://bugzilla.kernel.org/show_bug.cgi?id=5832
    http://bugzilla.kernel.org/show_bug.cgi?id=9487

Andrew added these patches to his -mm tree, but I don't think he's
released a patchset that contains them yet.  I'll attach the patch
in case you want to try it.  Let me know what happens.

Bjorn



PNPACPI: use _CRS IRQ descriptor length for _SRS

When configuring the resources of an ACPI device, we first
evaluate _CRS to get a template of resource descriptors, then
fill in the specific resource values we want, and finally
evaluate _SRS to actually configure the device.

Some resources have optional fields, so the size of encoded
descriptors varies depending on the specific values.  For
example, IRQ descriptors can be either two or three bytes long.
The third byte contains triggering information and can be
omitted if the IRQ is edge-triggered and active high.

The BIOS often assumes that IRQ descriptors in the _SRS
buffer use the same format as those in the _CRS buffer, so
this patch enforces that constraint.

The "Start Dependent Function" descriptor also has an optional
byte, but we don't currently encode those descriptors, so I
didn't do anything for those.

I have tested this patch on a Toshiba Portege 4000.  Without
the patch, parport_pc claims the parallel port only if I use
"pnpacpi=off".  This patch makes it work with PNPACPI.

This is an extension of a patch by Tom Jaeger:
    http://bugzilla.kernel.org/show_bug.cgi?id=9487#c42

References:
    http://bugzilla.kernel.org/show_bug.cgi?id=5832 Enabling ACPI Plug and Play in kernels >2.6.9 kills Parallel support
    http://bugzilla.kernel.org/show_bug.cgi?id=9487 buggy firmware expects four-byte IRQ resource descriptor (was: Serial port disappears after Suspend on Toshiba R25)
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1d5b285da1893b90507b081664ac27f1a8a3dc5b related ACPICA fix

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work11/drivers/pnp/pnpacpi/rsparser.c
===================================================================
--- work11.orig/drivers/pnp/pnpacpi/rsparser.c	2008-05-22 13:41:52.000000000 -0600
+++ work11/drivers/pnp/pnpacpi/rsparser.c	2008-05-27 10:34:32.000000000 -0600
@@ -742,6 +742,9 @@ static acpi_status pnpacpi_type_resource
 	if (pnpacpi_supported_resource(res)) {
 		(*resource)->type = res->type;
 		(*resource)->length = sizeof(struct acpi_resource);
+		if (res->type == ACPI_RESOURCE_TYPE_IRQ)
+			(*resource)->data.irq.descriptor_length =
+					res->data.irq.descriptor_length;
 		(*resource)++;
 	}
 
@@ -800,10 +803,12 @@ static void pnpacpi_encode_irq(struct pn
 	irq->interrupt_count = 1;
 	irq->interrupts[0] = p->start;
 
-	dev_dbg(&dev->dev, "  encode irq %d %s %s %s\n", (int) p->start,
+	dev_dbg(&dev->dev, "  encode irq %d %s %s %s (%d-byte descriptor)\n",
+		(int) p->start,
 		triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge",
 		polarity == ACPI_ACTIVE_LOW ? "low" : "high",
-		irq->sharable == ACPI_SHARED ? "shared" : "exclusive");
+		irq->sharable == ACPI_SHARED ? "shared" : "exclusive",
+		irq->descriptor_length);
 }
 
 static void pnpacpi_encode_ext_irq(struct pnp_dev *dev,

  parent reply	other threads:[~2008-05-29 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200805212334.m4LNY42M006425@imap1.linux-foundation.org>
2008-05-23  5:02 ` [patch] " Stas Sergeev
2008-05-27 11:23 ` [patch][resend] " Stas Sergeev
2008-05-28 23:36   ` Andrew Morton
2008-05-29  4:52     ` Stas Sergeev
2008-05-29 14:54     ` Bjorn Helgaas [this message]
2008-05-30  4:12       ` Stas Sergeev
2008-05-30 15:52         ` Bjorn Helgaas
2008-06-02  9:46       ` Ingo Molnar
2008-06-02  9:53     ` Russell King
2008-05-29  6:27   ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805290854.54577.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=ambx1@neo.rr.com \
    --cc=david-b@pacbell.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=stsp@aknet.ru \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®