From patchwork Wed Jul 8 15:00:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 6748221 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 D72709F2F0 for ; Wed, 8 Jul 2015 15:00:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E31C20698 for ; Wed, 8 Jul 2015 15:00:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3911D2067A for ; Wed, 8 Jul 2015 15:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934847AbbGHPAb (ORCPT ); Wed, 8 Jul 2015 11:00:31 -0400 Received: from [193.47.165.129] ([193.47.165.129]:57099 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933722AbbGHPAa (ORCPT ); Wed, 8 Jul 2015 11:00:30 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from sagig@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Jul 2015 17:59:44 +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 t68F06WG021204; Wed, 8 Jul 2015 18:00:06 +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 t68F04kA016499; Wed, 8 Jul 2015 18:00:04 +0300 Received: (from sagig@localhost) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id t68F04U6016495; Wed, 8 Jul 2015 18:00:04 +0300 From: Sagi Grimberg To: linux-scsi@vger.kernel.org Cc: Christoph Hellwig , Hannes Reinecke , "Martin K. Petersen" , James Bottomley Subject: [PATCH] scsi: Fix sense information setting in fixed sized format Date: Wed, 8 Jul 2015 18:00:03 +0300 Message-Id: <1436367603-16456-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=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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: Bart Van Assche Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig --- 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 41432c1..8cfb7ee 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);