From patchwork Fri Jun 3 12:11:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Chiou X-Patchwork-Id: 9152963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5ECD60221 for ; Fri, 3 Jun 2016 12:12:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5AF62804C for ; Fri, 3 Jun 2016 12:12:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9E0328309; Fri, 3 Jun 2016 12:12:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 607AF2804C for ; Fri, 3 Jun 2016 12:12:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932645AbcFCMLv (ORCPT ); Fri, 3 Jun 2016 08:11:51 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34023 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932489AbcFCMLu (ORCPT ); Fri, 3 Jun 2016 08:11:50 -0400 Received: by mail-pf0-f193.google.com with SMTP id c84so11388034pfc.1; Fri, 03 Jun 2016 05:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=DtB4JUgDPTcCgiu9TaIxOtITXtB0k6acL8XIec8b0lY=; b=sh7FIHWhKNSSDWTFjbyizd+bG/2/8qOAG9wnd4yWvaffaAQs+pd3mY0iaOrTMrCN1X fQIEdhkZA52jVH/nkSS0kPehFqtkm2CzHrlGgbFNZiSaH3r9Kim6Ms4nsaz/YWcX91g8 pGJ/IzBahaLAELFa1Ze6JPT3+K9XX4KTGqjnZvhNnKcnbzQHe214V4sbOUzBzin06rSc SvU6nVnzdyoBjQ30xY98y08MLM5+eHrA78ERwqLe1dOGlaBF6+bGNjEf55AvXcPABlBs 52l1CU5otAE11+MqGD+Bw5b4dOqbLyVTWI/tMGUmSLF30wqhXlDie6T6IRfl7qYtBfFd 8YKA== 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=DtB4JUgDPTcCgiu9TaIxOtITXtB0k6acL8XIec8b0lY=; b=b4eZWYkrQQLRdjD9JpTCgp8CALjOUm/tf2x1X+he8Y+GN3PaUQTqX1oKcZT0Vd/qMD kvWENTmyVOZ7dAf6dDkYzwQoecFSN3Feui0o/QXiKINjy9dWEQbXJ1AkbqEE4rlLOd39 3vKJJQeeuj3xSZCgxKAhzlh1einxOtk4XmjwraiFnDcP9jzOpNq5YAyIg2E/xne1G6YF 3x55srGnmZ6BGFJFOS5y0okkUJU0SCCnFbLBsT012XW5zpNmtx3/021PAmJhFlhwy66y cOZpS/wsQM/nyXtRyde1aBhxHQpR1q2QsIQZCeWeGxTVzWjqKiYiNqfzWlMDuvZqkxM8 euTA== X-Gm-Message-State: ALyK8tIULpF5Cp4eXsTIWDJgFcJ7i74Ckp/m4twV9gdS6LARCYuBt1D9vm5Wdqr7h5P7AA== X-Received: by 10.98.71.81 with SMTP id u78mr5729676pfa.29.1464955909141; Fri, 03 Jun 2016 05:11:49 -0700 (PDT) Received: from charles-desktop.promise.com.tw (vpn.promise.com.tw. [61.222.81.253]) by smtp.gmail.com with ESMTPSA id x71sm8105912pfj.43.2016.06.03.05.11.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jun 2016 05:11:48 -0700 (PDT) From: Charles Chiou To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, 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: Paul Subject: [PATCH 1/5] Add P3 support, define reg & struct Date: Fri, 3 Jun 2016 20:11:44 +0800 Message-Id: <1464955904-16738-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-Virus-Scanned: ClamAV using ClamSMTP From: Paul 1.Change ver 2.Add P3 VID & DID 2.Define device reg 3.Add P3 struct and callback Signed-off-by: Paul --- drivers/scsi/stex.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 5b23175..f8195c0 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -38,8 +38,8 @@ #include #define DRV_NAME "stex" -#define ST_DRIVER_VERSION "5.00.0000.01" -#define ST_VER_MAJOR 5 +#define ST_DRIVER_VERSION "6.00.0000.01" +#define ST_VER_MAJOR 6 #define ST_VER_MINOR 00 #define ST_OEM 0000 #define ST_BUILD_VER 01 @@ -64,6 +64,13 @@ enum { YI2H_INT_C = 0xa0, YH2I_REQ = 0xc0, YH2I_REQ_HI = 0xc4, + PSCRATCH0 = 0xb0, + PSCRATCH1 = 0xb4, + PSCRATCH2 = 0xb8, + PSCRATCH3 = 0xbc, + PSCRATCH4 = 0xc8, + MAILBOX_BASE = 0x1000, + MAILBOX_HNDSHK_STS = 0x0, /* MU register value */ MU_INBOUND_DOORBELL_HANDSHAKE = (1 << 0), @@ -135,6 +142,7 @@ enum { st_yosemite = 2, st_seq = 3, st_yel = 4, + st_P3 = 5, PASSTHRU_REQ_TYPE = 0x00000001, PASSTHRU_REQ_NO_WAKEUP = 0x00000100, @@ -1414,6 +1422,13 @@ static struct pci_device_id stex_pci_tbl[] = { /* st_yel */ { 0x105a, 0x8650, 0x1033, PCI_ANY_ID, 0, 0, st_yel }, { 0x105a, 0x8760, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_yel }, + + /* st_P3, pluto */ + { PCI_VENDOR_ID_PROMISE, 0x8870, PCI_VENDOR_ID_PROMISE, + 0x8870, 0, 0, st_P3 }, + /* st_P3, p3 */ + { PCI_VENDOR_ID_PROMISE, 0x8870, PCI_VENDOR_ID_PROMISE, + 0x4300, 0, 0, st_P3 }, { } /* terminate list */ }; @@ -1482,6 +1497,19 @@ static struct st_card_info stex_card_info[] = { .map_sg = stex_ss_map_sg, .send = stex_ss_send_cmd, }, + + /* st_P3 */ + { + .max_id = 129, + .max_lun = 256, + .max_channel = 0, + .rq_count = 801, + .rq_size = 512, + .sts_count = 801, + .alloc_rq = stex_ss_alloc_req, + .map_sg = stex_ss_map_sg, + .send = stex_ss_send_cmd, + }, }; static int stex_set_dma_mask(struct pci_dev * pdev)