From patchwork Fri Jun 9 14:16:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 103512 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp218774qgd; Fri, 9 Jun 2017 06:50:12 -0700 (PDT) X-Received: by 10.99.95.134 with SMTP id t128mr43573214pgb.182.1497016211985; Fri, 09 Jun 2017 06:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497016211; cv=none; d=google.com; s=arc-20160816; b=uctJTWrFiRLW9WbO3uE22tmSq+UOwZ5iQns2K8/O3ISDol9K1wEWC1sDaEB2RC6jEe Jo8WBGAmna5Uuo+t+xMTEDp6Wrkj0tVciOL+mmy+5IJ16i8gZyULAf8IXjLFYiE3vt+W 4vrbWcnknJIN4T7dnbzPDtOJC/KjTB5cyaemGOdXf7vFfRuFOv7klcp33nCzU3klaQ8q 9UQAcpZNSoPhtvbC0QOipz+aAycy7SV+mBcR7FaMSbDfOKSsLk/9ZYSh+CHCz4wkv+p5 XJbwJ4V+pKHV3hFj/ijTdWHxMyv+sznjj/mWTrsTkys3LifUUwgOuAA5MogFcNGEnS0a edFw== 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=YS6S5GgFU2GxYPgRvsI59hNjt0kaMhchLRZSil0XNrU=; b=pb7PqFqAGRtiTEtsdPHR/CmSrcqj4xtSQIziJAjaYK/J/QP7cl4AKC53S0V1Kx/yJO LlrGyfUXTVou9ykyDc01qfTbDWQK562IbxvWrgZyJU17LEaefWyFIux7E+dceJAQanO1 ++jIDl78tTKYdVcxRXeBVYRnuIgIGoVzI5a7+olTOR7X/BxnznIMqWnRPXaeSc0ZnaQw Sta1cR91AferZccln3WA8l36N4Nf+IdlnG4CNXphzZU4OvGTzl8NIjdfc5ZfTHIyJjJP 5KcjssOxA+3rkP/hOCb1HIZVsiPvrXiCguZc/0jkDI58EiqReN7xRRzZSMuTN8pEQ9AI dw3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-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 1si1035836plz.89.2017.06.09.06.50.11; Fri, 09 Jun 2017 06:50:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872AbdFINtx (ORCPT + 1 other); Fri, 9 Jun 2017 09:49:53 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:7360 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbdFINtu (ORCPT ); Fri, 9 Jun 2017 09:49:50 -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 APA64579; Fri, 09 Jun 2017 21:48:36 +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; Fri, 9 Jun 2017 21:48:26 +0800 From: John Garry To: , CC: , , , , , John Garry Subject: [PATCH v5 00/23] hisi_sas: hip08 support Date: Fri, 9 Jun 2017 22:16:13 +0800 Message-ID: <1497017796-105067-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.0A020202.593AA735.0148, 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: 767904a2779a48fc355b6b1f2ff01a38 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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-3) 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. Difference to v4 series: -report SAS_DATA_UNDERRUN to libsas for underflow Differences to v3 series: - Addressed Christoph's comments, including: - remove msi disable in probe, and improve irq registration and deregistration - remove hisi_sas_is_rw_cmd() to check underflow, and use scsi_cmnd underflow field instead Differences to v2 series: - Add patch to change hisi_sas_device.device_id size - Add device dq pointer - Remove hisi_sas_v3_hw prototype in v3 driver - Add explicit comment in hisi_sas_get_fw_info() 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 (5): scsi: hisi_sas: define hisi_sas_device.device_id as int 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 | 42 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 355 +++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 51 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 179 +-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2240 ++++++++++++++++++++++++++++++++ 7 files changed, 2613 insertions(+), 265 deletions(-) create mode 100644 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c -- 1.9.1