From: Randy Dunlap <randy_d_dunlap@linux.intel.com>
To: "Mathieu Bérard" <Mathieu.Berard@crans.org>
Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com,
linux-ide@vger.kernel.org, akpm <akpm@osdl.org>
Subject: [PATCH 1/3] libata-acpi:more debugging
Date: Tue, 17 Jan 2006 12:13:48 -0800 [thread overview]
Message-ID: <20060117121348.2f40e672.randy_d_dunlap@linux.intel.com> (raw)
In-Reply-To: <43C948D1.9010007@crans.org>
On Sat, 14 Jan 2006 19:54:09 +0100
Mathieu Bérard <Mathieu.Berard@crans.org> wrote:
> Hi,
> 2.6.15-mm4 crash on boot when loading the ata_piix or the ahci module.
> Reverting the libata ACPI support patches workaround this bug.
>
> (Please CC me)
Hi,
This series of 3 patches to 2.6.15-mm4 fixes it for me.
Thanks,
---
From: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Add more libata-acpi debugging, plus controlled by libata.printk value.
Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
---
drivers/scsi/libata-acpi.c | 53 ++++++++++++++++++++++++++++-----------------
1 files changed, 34 insertions(+), 19 deletions(-)
--- linux-2615-mm4.orig/drivers/scsi/libata-acpi.c
+++ linux-2615-mm4/drivers/scsi/libata-acpi.c
@@ -371,17 +371,20 @@ int do_drive_get_GTF(struct ata_port *ap
status = acpi_evaluate_object(atadev->obj_handle, "_GTF",
NULL, &output);
if (ACPI_FAILURE(status)) {
- printk(KERN_DEBUG
- "%s: Run _GTF error: status = 0x%x\n",
- __FUNCTION__, status);
+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG
+ "%s: Run _GTF error: status = 0x%x\n",
+ __FUNCTION__, status);
goto out;
}
if (!output.length || !output.pointer) {
- printk(KERN_DEBUG
- "%s: Run _GTF: length or ptr is NULL (0x%llx, 0x%p)\n",
- __FUNCTION__,
- (unsigned long long)output.length, output.pointer);
+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG "%s: Run _GTF: "
+ "length or ptr is NULL (0x%llx, 0x%p)\n",
+ __FUNCTION__,
+ (unsigned long long)output.length,
+ output.pointer);
acpi_os_free(output.pointer);
goto out;
}
@@ -389,23 +392,32 @@ int do_drive_get_GTF(struct ata_port *ap
out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER) {
acpi_os_free(output.pointer);
- printk(KERN_DEBUG "%s: Run _GTF: error: "
- "expected object type of ACPI_TYPE_BUFFER, got 0x%x\n",
- __FUNCTION__, out_obj->type);
+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG "%s: Run _GTF: error: "
+ "expected object type of ACPI_TYPE_BUFFER, "
+ "got 0x%x\n",
+ __FUNCTION__, out_obj->type);
err = -ENOENT;
goto out;
}
- if (out_obj->buffer.length % REGS_PER_GTF) {
+ if (!out_obj->buffer.length || !out_obj->buffer.pointer ||
+ out_obj->buffer.length % REGS_PER_GTF) {
if (ata_msg_drv(ap))
- printk(KERN_ERR "%s: unexpected GTF length (%d)\n",
- __FUNCTION__, out_obj->buffer.length);
+ printk(KERN_ERR
+ "%s: unexpected GTF length (%d) or addr (0x%p)\n",
+ __FUNCTION__, out_obj->buffer.length,
+ out_obj->buffer.pointer);
err = -ENOENT;
goto out;
}
*gtf_length = out_obj->buffer.length;
*gtf_address = (unsigned long)out_obj->buffer.pointer;
+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG "%s: returning "
+ "gtf_length=%d, gtf_address=0x%lx\n",
+ __FUNCTION__, *gtf_length, *gtf_address);
err = 0;
out:
return err;
@@ -510,8 +522,9 @@ int do_drive_set_taskfiles(struct ata_po
if (ata_msg_probe(ap))
printk(KERN_DEBUG
- "%s: total GTF bytes = %u (0x%x), gtf_count = %d\n",
- __FUNCTION__, gtf_length, gtf_length, gtf_count);
+ "%s: total GTF bytes=%u (0x%x), gtf_count=%d, addr=0x%lx\n",
+ __FUNCTION__, gtf_length, gtf_length, gtf_count,
+ gtf_address);
if (gtf_length % REGS_PER_GTF) {
if (ata_msg_drv(ap))
printk(KERN_ERR "%s: unexpected GTF length (%d)\n",
@@ -553,8 +566,9 @@ int ata_acpi_exec_tfs(struct ata_port *a
return 0;
for (ix = 0; ix < ATA_MAX_DEVICES; ix++) {
- printk(KERN_DEBUG "%s: call get_GTF, ix=%d\n",
- __FUNCTION__, ix);
+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG "%s: call get_GTF, ix=%d\n",
+ __FUNCTION__, ix);
ret = do_drive_get_GTF(ap, &ap->device[ix],
>f_length, >f_address);
if (ret < 0) {
@@ -564,8 +578,9 @@ int ata_acpi_exec_tfs(struct ata_port *a
break;
}
- printk(KERN_DEBUG "%s: call set_taskfiles, ix=%d\n",
- __FUNCTION__, ix);
+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG "%s: call set_taskfiles, ix=%d\n",
+ __FUNCTION__, ix);
ret = do_drive_set_taskfiles(ap, &ap->device[ix],
gtf_length, gtf_address);
acpi_os_free((void *)gtf_address);
next prev parent reply other threads:[~2006-01-17 20:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-14 18:54 2.6.15-mm4 oops with ata_piix and ahci: libata acpi issue Mathieu Bérard
2006-01-17 20:13 ` Randy Dunlap [this message]
2006-01-18 16:54 ` [PATCH 1/3] libata-acpi:more debugging Mathieu Bérard
2006-01-18 16:58 ` Randy Dunlap
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=20060117121348.2f40e672.randy_d_dunlap@linux.intel.com \
--to=randy_d_dunlap@linux.intel.com \
--cc=Mathieu.Berard@crans.org \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).