[PATCH] libata: wrong sizeof for BUFFER
authorFiodor Suietov <fiodor.f.suietov@intel.com>
Tue, 19 Dec 2006 20:33:20 +0000 (12:33 -0800)
committerJeff Garzik <jeff@garzik.org>
Fri, 16 Feb 2007 18:32:41 +0000 (13:32 -0500)
I have reproduced the AE_AML_BUFFER_LIMIT exception mentioned in
<http://bugzilla.kernel.org/show_bug.cgi?id=7689> basing on the SSDT ASL
code and libata ata_acpi_push_id() code.  There is an oversight in
ata_acpi_push_id() causing the exception.  The following update fixes it:

Signed-off-by: Fiodor Suietov <fiodor.f.suietov@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-acpi.c

index f2fd0dda70f2330dda76646721aa000cdbfc25fd..b4e8be5d292c9293310e8a7b6fe9ead8ce2baeea 100644 (file)
@@ -672,7 +672,7 @@ int ata_acpi_push_id(struct ata_port *ap, unsigned int ix)
        input.count = 1;
        input.pointer = in_params;
        in_params[0].type = ACPI_TYPE_BUFFER;
-       in_params[0].buffer.length = sizeof(atadev->id[0] * ATA_ID_WORDS);
+       in_params[0].buffer.length = sizeof(atadev->id[0]) * ATA_ID_WORDS;
        in_params[0].buffer.pointer = (u8 *)atadev->id;
        /* Output buffer: _SDD has no output */