From patchwork Mon Feb 22 12:02:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Chiou X-Patchwork-Id: 8376001 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 53DFDC0553 for ; Mon, 22 Feb 2016 12:02:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67FFE2041F for ; Mon, 22 Feb 2016 12:02:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7397E2041A for ; Mon, 22 Feb 2016 12:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754614AbcBVMCM (ORCPT ); Mon, 22 Feb 2016 07:02:12 -0500 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36454 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754548AbcBVMCK (ORCPT ); Mon, 22 Feb 2016 07:02:10 -0500 Received: by mail-pa0-f65.google.com with SMTP id a7so264092pax.3; Mon, 22 Feb 2016 04:02:10 -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; bh=KclOcAgcUlcRJGxb845UUz+6nfm+H8CEmUeYurpAhIs=; b=fkh43Q6GjCx2/yjJjy4B7Js16te6h9yX0uyRp8xcHnMea3Z6uLUHkQGokGItPib35U dySGmzHE4hfajs8CvT9GvAreAg8CHF5WLHlijxqCctcpYNczUK/Zw9D+USjqjfTAxhkj wjPxG9A6DcLN2uNLkjxDjbt59OlT+fiYmfya8ZwPxTODMS9oNTh2BVOX/5Zvm6VWm6CY xf2Dt0UI8H1GfYl1CcOXL3kUHYgCVW/O78UIF3GDJ2K73BA3z7WUvXoz90/DpFBpdjn4 Sqi6eCOkQreeBVEl6E4HpE7X4rNSVo77vaeioaEgJM5V/dm7aN0LBZ7UGOyUuWbyQL2a umIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KclOcAgcUlcRJGxb845UUz+6nfm+H8CEmUeYurpAhIs=; b=QFlpR3mVPjzUy4H+/4BDGwUEYwo2dyEoDoYTRPp4YZKifWfX1qYn33JoalOrPN5SJ6 kFcwAiBdUCfIsLwQ23tQDUpekdVyBJg7EnMXms6k5GjImx/M3E0crw420bDxr9AwoJea 9eZk4Y9kEjIx0/ircNBbl9/vBO8mv0jdjPTlnZyYxxyGm/Kt/pTJ9U3c2DbNpVqVM+X/ s5srPVJMhcepFvCZbFxdc9HE1EBxYhK8DvBsM0hukmqp7Y9CDtUKRXHW3yallrHxCVv9 znbOFiBWf3pIj9U+RjGAYHOgGTaRqlY7MBkH9Yl/5gJgqw7nR74jmaobh5nTQrXiZtpJ zIpQ== X-Gm-Message-State: AG10YOSfzOKHugmTwo5pFc3QTcfQXDSn5LKDM5Mp4B8O35NniIoIhILLn8+qEdvPDZLGvA== X-Received: by 10.66.118.7 with SMTP id ki7mr37567547pab.153.1456142530044; Mon, 22 Feb 2016 04:02:10 -0800 (PST) Received: from charles-desktop.promise.com.tw (vpn.promise.com.tw. [61.222.81.253]) by smtp.gmail.com with ESMTPSA id ml5sm35822399pab.2.2016.02.22.04.02.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 04:02:09 -0800 (PST) From: Charles Chiou To: JBottomley@parallels.com, martin.petersen@oracle.com, jthumshirn@suse.de, hch@infradead.org, oneukum@suse.de, linus.chen@tw.promise.com, grace.chang@tw.promise.com, victor.p@promise.com, eva.cheng@tw.promise.com, charles.chiou@tw.promise.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [v2 PATCH 1/3] scsi:stex.c Support to Pegasus series. Date: Mon, 22 Feb 2016 20:02:02 +0800 Message-Id: <1456142522-25277-1-git-send-email-ch1102chiou@gmail.com> X-Mailer: git-send-email 1.9.1 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, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Charles Pegasus is a high performace hardware RAID solution designed to unleash the raw power of Thunderbolt technology. 1. Add code to distinct SuperTrack and Pegasus series by sub device ID. It should support backward compatibility. 2. Change the driver version. Signed-off-by: Charles Chiou Reviewed-by: Johannes Thumshirn --- drivers/scsi/stex.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 2de28d7..495d632 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1,7 +1,7 @@ /* * SuperTrak EX Series Storage Controller driver for Linux * - * Copyright (C) 2005-2009 Promise Technology Inc. + * Copyright (C) 2005-2015 Promise Technology Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -38,11 +38,11 @@ #include #define DRV_NAME "stex" -#define ST_DRIVER_VERSION "4.6.0000.4" -#define ST_VER_MAJOR 4 -#define ST_VER_MINOR 6 -#define ST_OEM 0 -#define ST_BUILD_VER 4 +#define ST_DRIVER_VERSION "5.00.0000.01" +#define ST_VER_MAJOR 5 +#define ST_VER_MINOR 00 +#define ST_OEM 0000 +#define ST_BUILD_VER 01 enum { /* MU register offset */ @@ -328,6 +328,7 @@ struct st_hba { u16 rq_count; u16 rq_size; u16 sts_count; + u8 supports_pm; }; struct st_card_info { @@ -1560,6 +1561,25 @@ static int stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) hba->cardtype = (unsigned int) id->driver_data; ci = &stex_card_info[hba->cardtype]; + switch (id->subdevice) { + case 0x4221: + case 0x4222: + case 0x4223: + case 0x4224: + case 0x4225: + case 0x4226: + case 0x4227: + case 0x4261: + case 0x4262: + case 0x4263: + case 0x4264: + case 0x4265: + break; + default: + if (hba->cardtype == st_yel) + hba->supports_pm = 1; + } + sts_offset = scratch_offset = (ci->rq_count+1) * ci->rq_size; if (hba->cardtype == st_yel) sts_offset += (ci->sts_count+1) * sizeof(u32);