From patchwork Sat Jul 2 15:23:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 102994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A2F91B6F00 for ; Sun, 3 Jul 2011 01:25:39 +1000 (EST) Received: from localhost ([::1]:55012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd24d-0000OE-IC for incoming@patchwork.ozlabs.org; Sat, 02 Jul 2011 11:25:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd22A-0000NU-4w for qemu-devel@nongnu.org; Sat, 02 Jul 2011 11:23:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qd229-0007L1-76 for qemu-devel@nongnu.org; Sat, 02 Jul 2011 11:23:02 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:48236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd228-0007Ks-N6 for qemu-devel@nongnu.org; Sat, 02 Jul 2011 11:23:01 -0400 Received: from localhost.localdomain (unknown [88.171.126.33]) by smtp5-g21.free.fr (Postfix) with ESMTP id 688C3D48108; Sat, 2 Jul 2011 17:22:54 +0200 (CEST) From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: qemu-devel@nongnu.org Date: Sat, 2 Jul 2011 17:23:00 +0200 Message-Id: <1309620180-12652-1-git-send-email-hpoussin@reactos.org> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.27.42.5 Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PATCH] esp: correctly fill bus id with requested lun X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, and may be seen only on operating systems *not* using DMA to give commands to SCSI adapter. Signed-off-by: Hervé Poussineau --- hw/esp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/esp.c b/hw/esp.c index 6d3f5d2..8e95672 100644 --- a/hw/esp.c +++ b/hw/esp.c @@ -211,7 +211,7 @@ static uint32_t get_cmd(ESPState *s, uint8_t *buf) } else { dmalen = s->ti_size; memcpy(buf, s->ti_buf, dmalen); - buf[0] = 0; + buf[0] = buf[2] >> 5; } DPRINTF("get_cmd: len %d target %d\n", dmalen, target);