Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7148751ybi; Mon, 8 Jul 2019 15:37:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzI0OtINkbotFU6TCFAQQweqtvFkiru3m+lw7AaSu+sxI6WN3LAB/bcL5S70nPGuGtSAQpw X-Received: by 2002:a17:902:8689:: with SMTP id g9mr26065889plo.252.1562625440779; Mon, 08 Jul 2019 15:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625440; cv=none; d=google.com; s=arc-20160816; b=zqqNJ6Fjyw1GTfP6TbD2auZdPKgQrlNOLZJiVkZ5NPtvQuULfYlTyqpw97wOdAdIMU pYkkr9zA0c8+jZS95T6AoD5ceb4yIbOKdK6JqfXpx4KSetiUXz2MgcaW8eVLkqP5GD8D GhTe+hz3+0L3F4pedMnWBRGmukRn0xnSY0nXu/xda2FhcfeJRLsg2FAfv9cahPTvpoi3 IR/YIL7O7pxN2lzFcE2Dflz1w8L3qUjYZWAxjT4uLnGtJEXY3wocDyRcaK0pciuvQY6D 3MEChwsilsFr1DBtNVzdykqBYaZLzKlPFYfiqBpibuqutYZ8FSntU8HL6ZzuPekhCOoj WMDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=edUU5rVY/3Pss75LeSC6oLjAHkND0zhjt2IeIvt6Wc4=; b=erDzwe0lqpQXMQX9oNX2AC+nuUtBd/56Jkrbx+QK1gby/b+JH5srcPW6yunwtkxYnq HZaspVzE66eehMMEb1p6NcGM0R9iuIjmbQDmdknzGDPkJ+EPFojTRR4Ca1HvgLJVk0Zi yBhgHbq/QTTG9TypsK+Ihms/diRejrspuoe8eZ/5wNsSvPJZYS2IuAezV/yoLSuSJvYg VsrIcfNfD+rKwys2YwW4xph4wtKoMNkb9N2VYA72ZwTlL3M+CX/RBOxS8OK3t8St63ku LrenxiE1iTBt6UVScc0n7iNcttNfklsOWvnI2M7LmKZNg2zQussfX5X0TIBA5tip+vEK gMPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M4IYFhlO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l64si714066pjb.93.2019.07.08.15.37.06; Mon, 08 Jul 2019 15:37:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M4IYFhlO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388732AbfGHP0C (ORCPT + 99 others); Mon, 8 Jul 2019 11:26:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:53628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388722AbfGHP0A (ORCPT ); Mon, 8 Jul 2019 11:26:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F1EB20665; Mon, 8 Jul 2019 15:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599559; bh=849QI4FgZ5IFRTyySZdZyjabtM3ze9NF08JsXOOQ4q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M4IYFhlOc5zt7Y5h17qKmQ+NJQgQDy0E7ssqdePwgzVbBM3gK/JxNE46rfc/PsCGI jrFKJp64hiOsxpE1fh4FdhOw8M09LtCVoN0Jw1wkDBRj/bsDjOpOo/WBZrraFA8vBw 8tSfSyNq8pFXYPD7jT2p4hLxAfFtjwZiX4nl7NnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bader Ali - Saleh , Scott Teel , Matt Perricone , Don Brace , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 14/56] scsi: hpsa: correct ioaccel2 chaining Date: Mon, 8 Jul 2019 17:13:06 +0200 Message-Id: <20190708150519.519975443@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150514.376317156@linuxfoundation.org> References: <20190708150514.376317156@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 625d7d3518875c4d303c652a198feaa13d9f52d9 ] - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_LAST_SG for the last s/g element. - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_CHAIN when chaining. Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott Teel Reviewed-by: Matt Perricone Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/hpsa.c | 7 ++++++- drivers/scsi/hpsa_cmd.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 5b4b7f9be2d7..6d520e8945f7 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -4800,7 +4800,7 @@ static int hpsa_scsi_ioaccel2_queue_command(struct ctlr_info *h, curr_sg->reserved[0] = 0; curr_sg->reserved[1] = 0; curr_sg->reserved[2] = 0; - curr_sg->chain_indicator = 0x80; + curr_sg->chain_indicator = IOACCEL2_CHAIN; curr_sg = h->ioaccel2_cmd_sg_list[c->cmdindex]; } @@ -4817,6 +4817,11 @@ static int hpsa_scsi_ioaccel2_queue_command(struct ctlr_info *h, curr_sg++; } + /* + * Set the last s/g element bit + */ + (curr_sg - 1)->chain_indicator = IOACCEL2_LAST_SG; + switch (cmd->sc_data_direction) { case DMA_TO_DEVICE: cp->direction &= ~IOACCEL2_DIRECTION_MASK; diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index 078afe448115..ecf15344b55d 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h @@ -516,6 +516,7 @@ struct ioaccel2_sg_element { u8 reserved[3]; u8 chain_indicator; #define IOACCEL2_CHAIN 0x80 +#define IOACCEL2_LAST_SG 0x40 }; /* -- 2.20.1