From patchwork Sat May 16 07:17:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 6419191 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 43F67C0432 for ; Sat, 16 May 2015 07:18:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74835204A7 for ; Sat, 16 May 2015 07:18:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CF2D204E3 for ; Sat, 16 May 2015 07:18:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932867AbbEPHSk (ORCPT ); Sat, 16 May 2015 03:18:40 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35969 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbbEPHSg (ORCPT ); Sat, 16 May 2015 03:18:36 -0400 Received: by pabts4 with SMTP id ts4so53484974pab.3 for ; Sat, 16 May 2015 00:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BRks2x4g7BX3V9IX8kNZ+h6r04k00o/7Bk7cdAPwbdc=; b=W02ZMd06QjgFUNt6wJvqGw8yDZRnnazQtswDCmbLTVJ62nERiA+7R6NXSbOomugk2l Skgyi0MwRLzmYRMa5wdJPNWH6hk1DCfkT0QJ16DJlhYqS2aSo3zTLNV+VN560hUqLMm1 X5F92QCDfqSi8NdcXW1C6yk4iPz8XVUqWHcQtRIFlRfJDcha+Bn+pojqD6Vp/kck/5Kz IFAo+vhZpTkiM1Imo4iBlFTwRrG35hb8bU8/Vq65EVaMZXWLOjU1+k9B1nqT6gtxC9zS 5EETP7fyPxYwlFMPXiY8mzWDXI7g/+/cYjKL5tD9LlKq5amlPnR5cqHykJvacHUOSi+x UN4Q== X-Received: by 10.66.232.134 with SMTP id to6mr24791135pac.96.1431760716200; Sat, 16 May 2015 00:18:36 -0700 (PDT) Received: from localhost.localdomain (KD106168100169.ppp-bb.dion.ne.jp. [106.168.100.169]) by mx.google.com with ESMTPSA id j14sm3804949pbq.29.2015.05.16.00.18.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 16 May 2015 00:18:35 -0700 (PDT) From: Akinobu Mita To: linux-scsi@vger.kernel.org, "James E.J. Bottomley" Cc: Akinobu Mita Subject: [PATCH 4/7] scsi: trace: fix transfer length 0 for 6-byte r/w commands Date: Sat, 16 May 2015 16:17:50 +0900 Message-Id: <1431760673-7180-5-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431760673-7180-1-git-send-email-akinobu.mita@gmail.com> References: <1431760673-7180-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For 6-byte r/w commands, transfer length 0 means 256 blocks of data, not 0 block. Signed-off-by: Akinobu Mita Cc: linux-scsi@vger.kernel.org --- drivers/scsi/scsi_trace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c index 08bb47b..104e817 100644 --- a/drivers/scsi/scsi_trace.c +++ b/drivers/scsi/scsi_trace.c @@ -35,6 +35,8 @@ scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len) lba |= (cdb[2] << 8); lba |= cdb[3]; txlen = cdb[4]; + if (txlen == 0) + txlen = 256; trace_seq_printf(p, "lba=%llu txlen=%llu", (unsigned long long)lba, (unsigned long long)txlen);