From patchwork Mon Jan 26 17:06:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 5711491 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 2F6FEC058D for ; Mon, 26 Jan 2015 17:12:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45C7A20107 for ; Mon, 26 Jan 2015 17:12:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35A9020142 for ; Mon, 26 Jan 2015 17:12:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754224AbbAZRMG (ORCPT ); Mon, 26 Jan 2015 12:12:06 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:61001 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbbAZRMF (ORCPT ); Mon, 26 Jan 2015 12:12:05 -0500 Received: by mail-wi0-f180.google.com with SMTP id h11so11271681wiw.1; Mon, 26 Jan 2015 09:12:03 -0800 (PST) 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 :mime-version:content-type:content-transfer-encoding; bh=ciYF/H/02Ri7sQVip0kOq6khOryQ+MTxStkFg6tznAI=; b=UJnoqmOtz008n6qDKffwoYskI+LdkgaG2ORmRrjeUmhFuS3dXXn742wpD+5kazUgql Hpfsl1dBh3mXEkKRdCPQPSsgpdQ3oeHaH3ofaflAC0dE6Mz7Ehawyk8l7sh06GY/WhkK ZikYPCqJnmM3pn7ETCjBrsfWinE/CzrUk2wuY/HLZ3Pu/76bpL6eh6aBljlP5Nlmtgzd I5ElKZvpDq1wONMf5qk8r6sUQAx+RWTVKqPJU8vCctim6SbGjCcsdjdFXs425g5kzdnS k9ayjdNA+WSDwSonjFV3tMvR+CfUlCDsk9q5SXd86DtzxP1jySdJMmB0zD8UUfkpjXjB aP7g== X-Received: by 10.180.103.40 with SMTP id ft8mr33776598wib.68.1422291988856; Mon, 26 Jan 2015 09:06:28 -0800 (PST) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id 7sm15086878wjq.29.2015.01.26.09.06.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 09:06:28 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Bradley Grove , linux-scsi@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 4/5] [SCSI] esas2r: use PCI define for max read request size Date: Mon, 26 Jan 2015 18:06:24 +0100 Message-Id: <1422291984-12488-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1422291922-12324-1-git-send-email-zajec5@gmail.com> References: <1422291922-12324-1-git-send-email-zajec5@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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=unavailable 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 Signed-off-by: Rafa? Mi?ecki --- drivers/scsi/esas2r/esas2r_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c index 6776931..c0b37a5 100644 --- a/drivers/scsi/esas2r/esas2r_init.c +++ b/drivers/scsi/esas2r/esas2r_init.c @@ -813,12 +813,13 @@ static void esas2r_init_pci_cfg_space(struct esas2r_adapter *a) pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL, &devcontrol); - if ((devcontrol & PCI_EXP_DEVCTL_READRQ) > 0x2000) { + if (devcontrol & PCI_EXP_DEVCTL_READRQ > + PCI_EXP_DEVCTL_READRQ_512B) { esas2r_log(ESAS2R_LOG_INFO, "max read request size > 512B"); devcontrol &= ~PCI_EXP_DEVCTL_READRQ; - devcontrol |= 0x2000; + devcontrol |= PCI_EXP_DEVCTL_READRQ_512B; pci_write_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL, devcontrol);