From patchwork Thu May 25 12:04:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 100481 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp717654qge; Thu, 25 May 2017 04:34:33 -0700 (PDT) X-Received: by 10.99.137.194 with SMTP id v185mr44304061pgd.206.1495712073822; Thu, 25 May 2017 04:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495712073; cv=none; d=google.com; s=arc-20160816; b=FHg5MQDCUXX0AF8PGGwaXIFX0ESCXE+Kq8yOrsmBN+0jAs0mp58vXDW3gOaXkE2wuN /zMVuQQCgET/314ROeCQc17Jm93XvzgQ+Kl5iKHz0J2J8+wBkf5jiHARflI94By5QU2R Zy8/Yql7TKUX57a2pBBLpV8jHUj2lwKUYcMvm9ncOzSXEaTHvYBrlqxovt73gJWP32sV XPaQiIOYaf02KqPq3iyDTfs1QJCx4vNdHLsqJPkiqT9Kq+pqGc9ctc6OyYwxIcdbqyIm Wm99bWqKyIVmRcgTlGJrQsPoNpquMfkP5oi4O8Ml1M+Kw4X2iTJ6ZLR8ru02ETSTttNh mc4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=rGZYhtp8+aOvbTJmfgQDt8Zzmd+ygSeaxerLO3JzObo=; b=07FqfMTUEckwbsxrMtfDBjv/iQYpMw4RpBLtez5JkmAekspu5rV3ABAkAZ4rzi2SzU RP5h7mU5iWKGq8NkjcgM+gOYEKu0h5IyyE8Vgs8q2fXVk2YZ15phJ8BIu3oXQPv6xnXQ jD3w6ZVFuBH2X43yHAssKF05LzigzhZPiANeA7MVSkOlCnm53JO89vLokY4O8CvQ07Ax ZYWC7RyVO557vckwcIw2US0/WGEVN3yR4oM1ZVLEveJeE1SA/i1/ipiaE6XvxP4s4Zy1 YvYaZL2WjeyEePhSMucOVQNVKWEyM0bXtKigYLa4i29PFCM0Qsc4KplOr3zQq17v7siX q9yQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v4si28122544pfi.95.2017.05.25.04.34.33; Thu, 25 May 2017 04:34:33 -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; 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 S1763502AbdEYLea (ORCPT + 25 others); Thu, 25 May 2017 07:34:30 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:6380 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbdEYLe1 (ORCPT ); Thu, 25 May 2017 07:34:27 -0400 Received: from 172.30.72.56 (EHLO DGGEML403-HUB.china.huawei.com) ([172.30.72.56]) by dggrg02-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AOF01619; Thu, 25 May 2017 19:34:23 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEML403-HUB.china.huawei.com (10.3.17.33) with Microsoft SMTP Server id 14.3.301.0; Thu, 25 May 2017 19:34:17 +0800 From: John Garry To: , CC: , , , , , John Garry Subject: [PATCH v2 00/22] hisi_sas: hip08 support Date: Thu, 25 May 2017 20:04:49 +0800 Message-ID: <1495713911-80476-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.5926C140.0092, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2881a2a954388c78fb00cb9fb880b8aa Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds support for the HiSilicon SAS controller in the hip08 chipset. The key difference compared to earlier chipsets is that the controller is an integrated PCI endpoint in hip08. As such, the controller is a pci device (not a platform device, like v2 hw in hip07). The driver is refactored so it can support both platform and pci device-based controllers. New hw layer file hisi_sas_v3_hw.c is added for v3 hw support, which also includes pci device proving and initialisation. Common functionality is still in hisi_sas_main.c, along with platform device probing and initialization. As for the patches, (ignoring #1 and #2) the first few reorganise some functions from v2 hw.c into main.c, as they are required for v3 hw. Then support is added for pci device-based controller in subsequent patches. And then hip08 support is added in the final patches. Differences to v1 series: - Addressed Arnd's comments, including: - read sas address from device node DSD under PCI host bridge - add comment in fatal axi error patch commit log regarding controller reset - eliminate hisi_sas_pci_init.c, and move functionality into hisi_sas_v3_hw.c, eliminating one layer of indirection John Garry (4): scsi: hisi_sas: add pci_dev in hisi_hba struct scsi: hisi_sas: create hisi_sas_get_fw_info() scsi: hisi_sas: add skeleton v3 hw driver scsi: hisi_sas: add initialisation for v3 pci-based controller Xiang Chen (18): scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort() scsi: hisi_sas: optimise the usage of hisi_hba.lock scsi: hisi_sas: relocate get_ata_protocol() scsi: hisi_sas: relocate sata_done_v2_hw() scsi: hisi_sas: relocate get_ncq_tag_v2_hw() scsi: hisi_sas: add v3 hw init scsi: hisi_sas: add v3 hw PHY init scsi: hisi_sas: add phy up/down/bcast and channel ISR scsi: hisi_sas: add v3 cq interrupt handler scsi: hisi_sas: add v3 code to send SSP frame scsi: hisi_sas: add v3 code to send SMP frame scsi: hisi_sas: add v3 code to send ATA frame scsi: hisi_sas: add v3 code for itct setup and free scsi: hisi_sas: add v3 code to send internal abort command scsi: hisi_sas: add get_wideport_bitmap_v3_hw() scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error scsi: hisi_sas: add v3 code to fill some more hw function pointers scsi: hisi_sas: modify internal abort dev flow for v3 hw drivers/scsi/hisi_sas/Kconfig | 10 +- drivers/scsi/hisi_sas/Makefile | 1 + drivers/scsi/hisi_sas/hisi_sas.h | 28 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 377 ++++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 51 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 175 +-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2236 ++++++++++++++++++++++++++++++++ 7 files changed, 2622 insertions(+), 256 deletions(-) create mode 100644 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c -- 1.9.1