From: Fiodor Suietov Date: Tue, 19 Dec 2006 20:33:20 +0000 (-0800) Subject: [PATCH] libata: wrong sizeof for BUFFER X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9de1cc9c446d39546a3d9dd6f7d99a980a7ecc22;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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 f2fd0dda70f2..b4e8be5d292c 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 */