Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659876 > unrolled thread

[PATCH v4 00/23] hisi_sas: hip08 support

Started byJohn Garry <john.garry@huawei.com>
First post2017-06-07 17:00 +0200
Last post2017-06-07 17:00 +0200
Articles 1 on this page of 21 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 00/23] hisi_sas: hip08 support John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 11/23] scsi: hisi_sas: add v3 hw init John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 15/23] scsi: hisi_sas: add v3 code to send SSP frame John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 07/23] scsi: hisi_sas: add pci_dev in hisi_hba struct John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 20/23] scsi: hisi_sas: add get_wideport_bitmap_v3_hw() John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 23/23] scsi: hisi_sas: modify internal abort dev flow for v3 hw John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 21/23] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 10/23] scsi: hisi_sas: add initialisation for v3 pci-based controller John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 19/23] scsi: hisi_sas: add v3 code to send internal abort command John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 04/23] scsi: hisi_sas: relocate get_ata_protocol() John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 02/23] scsi: hisi_sas: define hisi_sas_device.device_id as int John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 12/23] scsi: hisi_sas: add v3 hw PHY init John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 17/23] scsi: hisi_sas: add v3 code to send ATA frame John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 16/23] scsi: hisi_sas: add v3 code to send SMP frame John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 01/23] scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort() John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 06/23] scsi: hisi_sas: relocate get_ncq_tag_v2_hw() John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 18/23] scsi: hisi_sas: add v3 code for itct setup and free John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 22/23] scsi: hisi_sas: add v3 code to fill some more hw function pointers John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200
    [PATCH v4 09/23] scsi: hisi_sas: add skeleton v3 hw driver John Garry <john.garry@huawei.com> - 2017-06-07 17:00 +0200

Page 2 of 2 — ← Prev page 1 [2]


#1659906 — [PATCH v4 09/23] scsi: hisi_sas: add skeleton v3 hw driver

FromJohn Garry <john.garry@huawei.com>
Date2017-06-07 17:00 +0200
Subject[PATCH v4 09/23] scsi: hisi_sas: add skeleton v3 hw driver
Message-ID<tPKBf-7Z0-81@gated-at.bofh.it>
In reply to#1659876
Add skeleton driver for v3 hw in hisi_sas_v3_hw.c

File hisi_sas_v3_hw.c will serve 2 purposes:
- probing and initialisation of the controller based on pci device
- hw layer for v3-based controllers

The controller design is quite similar to v2 hw in hip07.

However key differences include:
-All v2 hw bugs are fixed (hopefully), so workarounds are not
required
-support for device deregistration
-some interrupt modifications
-configurable max device support

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 drivers/scsi/hisi_sas/Kconfig          | 10 +++++++-
 drivers/scsi/hisi_sas/Makefile         |  1 +
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 47 ++++++++++++++++++++++++++++++++++
 3 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
index 374a329..d42f29a 100644
--- a/drivers/scsi/hisi_sas/Kconfig
+++ b/drivers/scsi/hisi_sas/Kconfig
@@ -6,4 +6,12 @@ config SCSI_HISI_SAS
 	select BLK_DEV_INTEGRITY
 	depends on ATA
 	help
-		This driver supports HiSilicon's SAS HBA
+		This driver supports HiSilicon's SAS HBA, including support based
+		on platform device
+
+config SCSI_HISI_SAS_PCI
+	tristate "HiSilicon SAS on PCI bus"
+	depends on SCSI_HISI_SAS
+	depends on PCI
+	help
+		This driver supports HiSilicon's SAS HBA based on PCI device
diff --git a/drivers/scsi/hisi_sas/Makefile b/drivers/scsi/hisi_sas/Makefile
index c6d3a1b..24623f2 100644
--- a/drivers/scsi/hisi_sas/Makefile
+++ b/drivers/scsi/hisi_sas/Makefile
@@ -1,2 +1,3 @@
 obj-$(CONFIG_SCSI_HISI_SAS)		+= hisi_sas_main.o
 obj-$(CONFIG_SCSI_HISI_SAS)		+= hisi_sas_v1_hw.o hisi_sas_v2_hw.o
+obj-$(CONFIG_SCSI_HISI_SAS_PCI)		+= hisi_sas_v3_hw.o
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
new file mode 100644
index 0000000..cf72577
--- /dev/null
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017 Hisilicon Limited.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#include "hisi_sas.h"
+#define DRV_NAME "hisi_sas_v3_hw"
+
+static int
+hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+	return 0;
+}
+
+static void hisi_sas_v3_remove(struct pci_dev *pdev)
+{
+}
+
+enum {
+	/* instances of the controller */
+	hip08,
+};
+
+static const struct pci_device_id sas_v3_pci_table[] = {
+	{ PCI_VDEVICE(HUAWEI, 0xa230), hip08 },
+	{}
+};
+
+static struct pci_driver sas_v3_pci_driver = {
+	.name		= DRV_NAME,
+	.id_table	= sas_v3_pci_table,
+	.probe		= hisi_sas_v3_probe,
+	.remove		= hisi_sas_v3_remove,
+};
+
+module_pci_driver(sas_v3_pci_driver);
+
+MODULE_VERSION(DRV_VERSION);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("John Garry <john.garry@huawei.com>");
+MODULE_DESCRIPTION("HISILICON SAS controller v3 hw driver based on pci device");
+MODULE_ALIAS("platform:" DRV_NAME);
-- 
1.9.1

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web