From patchwork Thu Sep 3 16:49:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 7117851 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D65829F1D5 for ; Thu, 3 Sep 2015 16:50:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B30FC20726 for ; Thu, 3 Sep 2015 16:50:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77D5E2071A for ; Thu, 3 Sep 2015 16:50:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752355AbbICQuO (ORCPT ); Thu, 3 Sep 2015 12:50:14 -0400 Received: from [193.47.165.129] ([193.47.165.129]:60943 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750749AbbICQuN (ORCPT ); Thu, 3 Sep 2015 12:50:13 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from sagig@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Sep 2015 19:49:42 +0300 Received: from r-vnc05.mtr.labs.mlnx (r-vnc05.mtr.labs.mlnx [10.208.0.115]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id t83GnawA008903; Thu, 3 Sep 2015 19:49:36 +0300 Received: from r-vnc05.mtr.labs.mlnx (localhost [127.0.0.1]) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4) with ESMTP id t83GnajZ027779; Thu, 3 Sep 2015 19:49:36 +0300 Received: (from sagig@localhost) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id t83GnXiD027772; Thu, 3 Sep 2015 19:49:33 +0300 From: Sagi Grimberg To: James Bottomley Cc: linux-scsi@vger.kernel.org Subject: [PATCH RESEND] scsi: Fix sense information setting in fixed sized format Date: Thu, 3 Sep 2015 19:49:33 +0300 Message-Id: <1441298973-27735-1-git-send-email-sagig@mellanox.com> X-Mailer: git-send-email 1.8.4.3 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 In fixed size sense format the information field is a four byte field. Signed-off-by: Sagi Grimberg Reviewed-by: Martin K. Petersen Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ewan D. Milne --- drivers/scsi/scsi_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c index 41432c10dda2..8cfb7eeb5bbc 100644 --- a/drivers/scsi/scsi_common.c +++ b/drivers/scsi/scsi_common.c @@ -270,7 +270,7 @@ void scsi_set_sense_information(u8 *buf, u64 info) put_unaligned_be64(info, &ucp[4]); } else if ((buf[0] & 0x7f) == 0x70) { buf[0] |= 0x80; - put_unaligned_be64(info, &buf[3]); + put_unaligned_be32(info, &buf[3]); } } EXPORT_SYMBOL(scsi_set_sense_information);