From: Fiodor Suietov Date: Tue, 19 Dec 2006 20:33:20 +0000 (-0800) Subject: [PATCH] libata: wrong sizeof for BUFFER X-Git-Tag: v2.6.21-rc1~73^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9de1cc9c446d39546a3d9dd6f7d99a980a7ecc22;p=linux-2.6-omap-h63xx.git [PATCH] libata: wrong sizeof for BUFFER I have reproduced the AE_AML_BUFFER_LIMIT exception mentioned in 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 Cc: Jeff Garzik Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index f2fd0dda70f..b4e8be5d292 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -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 */