aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-07-02 22:56:22 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-02 22:56:22 -0700
commit6f231dda68080759f1aed3769896e94c73099f0f (patch)
tree45b6ce02fa40e0e9c35526ac6c45950138387516
parent59c5f46fbe01a00eedf54a23789634438bb80603 (diff)
isci: Intel(R) C600 Series Chipset Storage Control Unit Driver
Support for the up to 2x4-port 6Gb/s SAS controllers embedded in the chipset. This is a snapshot of the first publicly available version of the driver, commit 4c1db2d0 in the 'historical' branch. git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git historical Signed-off-by: Maciej Trela <maciej.trela@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/Kconfig34
-rw-r--r--drivers/scsi/Makefile1
-rw-r--r--drivers/scsi/isci/Makefile30
-rw-r--r--drivers/scsi/isci/core/intel_ata.h554
-rw-r--r--drivers/scsi/isci/core/intel_sas.h948
-rw-r--r--drivers/scsi/isci/core/intel_sat.h95
-rw-r--r--drivers/scsi/isci/core/intel_sata.h280
-rw-r--r--drivers/scsi/isci/core/intel_scsi.h474
-rw-r--r--drivers/scsi/isci/core/sati_device.h156
-rw-r--r--drivers/scsi/isci/core/sati_translator_sequence.h304
-rw-r--r--drivers/scsi/isci/core/sati_types.h145
-rw-r--r--drivers/scsi/isci/core/sci_base_controller.h306
-rw-r--r--drivers/scsi/isci/core/sci_base_memory_descriptor_list.c159
-rw-r--r--drivers/scsi/isci/core/sci_base_memory_descriptor_list.h155
-rw-r--r--drivers/scsi/isci/core/sci_base_phy.h205
-rw-r--r--drivers/scsi/isci/core/sci_base_port.h203
-rw-r--r--drivers/scsi/isci/core/sci_base_remote_device.h277
-rw-r--r--drivers/scsi/isci/core/sci_base_request.h195
-rw-r--r--drivers/scsi/isci/core/sci_base_state.h90
-rw-r--r--drivers/scsi/isci/core/sci_base_state_machine.c182
-rw-r--r--drivers/scsi/isci/core/sci_base_state_machine.h139
-rw-r--r--drivers/scsi/isci/core/sci_controller.h100
-rw-r--r--drivers/scsi/isci/core/sci_controller_constants.h215
-rw-r--r--drivers/scsi/isci/core/sci_memory_descriptor_list.h169
-rw-r--r--drivers/scsi/isci/core/sci_object.h99
-rw-r--r--drivers/scsi/isci/core/sci_pool.h199
-rw-r--r--drivers/scsi/isci/core/sci_status.h409
-rw-r--r--drivers/scsi/isci/core/sci_types.h88
-rw-r--r--drivers/scsi/isci/core/sci_util.c70
-rw-r--r--drivers/scsi/isci/core/sci_util.h138
-rw-r--r--drivers/scsi/isci/core/scic_config_parameters.h347
-rw-r--r--drivers/scsi/isci/core/scic_controller.h586
-rw-r--r--drivers/scsi/isci/core/scic_io_request.h512
-rw-r--r--drivers/scsi/isci/core/scic_phy.h303
-rw-r--r--drivers/scsi/isci/core/scic_port.h213
-rw-r--r--drivers/scsi/isci/core/scic_remote_device.h295
-rw-r--r--drivers/scsi/isci/core/scic_sds_controller.c4147
-rw-r--r--drivers/scsi/isci/core/scic_sds_controller.h706
-rw-r--r--drivers/scsi/isci/core/scic_sds_controller_registers.h463
-rw-r--r--drivers/scsi/isci/core/scic_sds_pci.h95
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.c2807
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.h491
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy_registers.h187
-rw-r--r--drivers/scsi/isci/core/scic_sds_port.c2757
-rw-r--r--drivers/scsi/isci/core/scic_sds_port.h514
-rw-r--r--drivers/scsi/isci/core/scic_sds_port_configuration_agent.c851
-rw-r--r--drivers/scsi/isci/core/scic_sds_port_configuration_agent.h108
-rw-r--r--drivers/scsi/isci/core/scic_sds_port_registers.h223
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_device.c2252
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_device.h602
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_node_context.c1244
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_node_context.h342
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_node_table.c600
-rw-r--r--drivers/scsi/isci/core/scic_sds_remote_node_table.h196
-rw-r--r--drivers/scsi/isci/core/scic_sds_request.c2179
-rw-r--r--drivers/scsi/isci/core/scic_sds_request.h484
-rw-r--r--drivers/scsi/isci/core/scic_sds_smp_remote_device.c410
-rw-r--r--drivers/scsi/isci/core/scic_sds_smp_request.c669
-rw-r--r--drivers/scsi/isci/core/scic_sds_smp_request.h70
-rw-r--r--drivers/scsi/isci/core/scic_sds_ssp_request.c340
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_packet_request.c838
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_packet_request.h154
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_pio_request.h116
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_remote_device.c975
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_request.c2004
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_request.h221
-rw-r--r--drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.c379
-rw-r--r--drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.h286
-rw-r--r--drivers/scsi/isci/core/scic_task_request.h148
-rw-r--r--drivers/scsi/isci/core/scic_user_callback.h740
-rw-r--r--drivers/scsi/isci/core/scu_completion_codes.h280
-rw-r--r--drivers/scsi/isci/core/scu_constants.h151
-rw-r--r--drivers/scsi/isci/core/scu_event_codes.h336
-rw-r--r--drivers/scsi/isci/core/scu_registers.h1824
-rw-r--r--drivers/scsi/isci/core/scu_remote_node_context.h230
-rw-r--r--drivers/scsi/isci/core/scu_task_context.h943
-rw-r--r--drivers/scsi/isci/core/scu_unsolicited_frame.h117
-rw-r--r--drivers/scsi/isci/core/scu_viit_data.h179
-rw-r--r--drivers/scsi/isci/deprecated.c491
-rw-r--r--drivers/scsi/isci/events.c619
-rw-r--r--drivers/scsi/isci/firmware/Makefile19
-rw-r--r--drivers/scsi/isci/firmware/README36
-rw-r--r--drivers/scsi/isci/firmware/create_fw.c177
-rw-r--r--drivers/scsi/isci/host.c781
-rw-r--r--drivers/scsi/isci/host.h283
-rw-r--r--drivers/scsi/isci/init.c613
-rw-r--r--drivers/scsi/isci/isci.h138
-rw-r--r--drivers/scsi/isci/phy.c179
-rw-r--r--drivers/scsi/isci/phy.h104
-rw-r--r--drivers/scsi/isci/port.c484
-rw-r--r--drivers/scsi/isci/port.h153
-rw-r--r--drivers/scsi/isci/remote_device.c698
-rw-r--r--drivers/scsi/isci/remote_device.h154
-rw-r--r--drivers/scsi/isci/request.c1472
-rw-r--r--drivers/scsi/isci/request.h429
-rw-r--r--drivers/scsi/isci/sata.c356
-rw-r--r--drivers/scsi/isci/sata.h83
-rw-r--r--drivers/scsi/isci/sci_environment.h112
-rw-r--r--drivers/scsi/isci/task.c1691
-rw-r--r--drivers/scsi/isci/task.h368
-rw-r--r--drivers/scsi/isci/timers.c319
-rw-r--r--drivers/scsi/isci/timers.h126
-rw-r--r--firmware/Makefile1
-rw-r--r--firmware/isci/isci_firmware.bin.ihex11
104 files changed, 51230 insertions, 0 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 4a1f029c4fe..3aa664fa892 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -830,6 +830,40 @@ config SCSI_GDTH
To compile this driver as a module, choose M here: the
module will be called gdth.
+config SCSI_ISCI
+ tristate "Intel(R) C600 Series Chipset SAS Controller"
+ depends on PCI && SCSI
+ # little endian host assumptions
+ depends on X86
+ # (temporary): dma api misuse
+ depends on !DMAR
+ # (temporary): known alpha quality driver
+ depends on EXPERIMENTAL
+ select SCSI_SAS_LIBSAS
+ ---help---
+ This driver supports the 6Gb/s SAS capabilities of the storage
+ control unit found in the Intel(R) C600 series chipset.
+
+ The experimental tag will be removed after the driver exits alpha
+
+choice
+ prompt "Default Silicon Revision"
+ depends on SCSI_ISCI
+ default PBG_HBA_A2
+ # temporary A-step silicon is pre-production
+
+config PBG_HBA_BETA
+ bool "B0"
+
+config PBG_HBA_A2
+ bool "A2"
+
+config PBG_HBA_A0
+ bool "A0"
+
+endchoice
+
+
config SCSI_GENERIC_NCR5380
tristate "Generic NCR5380/53c400 SCSI PIO support"
depends on ISA && SCSI
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 7ad0b8a79ae..3c08f5352b2 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -73,6 +73,7 @@ obj-$(CONFIG_SCSI_AACRAID) += aacraid/
obj-$(CONFIG_SCSI_AIC7XXX_OLD) += aic7xxx_old.o
obj-$(CONFIG_SCSI_AIC94XX) += aic94xx/
obj-$(CONFIG_SCSI_PM8001) += pm8001/
+obj-$(CONFIG_SCSI_ISCI) += isci/
obj-$(CONFIG_SCSI_IPS) += ips.o
obj-$(CONFIG_SCSI_FD_MCS) += fd_mcs.o
obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o
diff --git a/drivers/scsi/isci/Makefile b/drivers/scsi/isci/Makefile
new file mode 100644
index 00000000000..34f7af3525f
--- /dev/null
+++ b/drivers/scsi/isci/Makefile
@@ -0,0 +1,30 @@
+#TODO kill SCIC_SDS_4_ENABLED it is always true for this
+#generation of silicon
+EXTRA_CFLAGS += -DSCIC_SDS_4_ENABLED
+
+#temporary until atapi support ready
+EXTRA_CFLAGS += -DDISABLE_ATAPI
+
+EXTRA_CFLAGS += -Idrivers/scsi/isci/core/ -Idrivers/scsi/isci/
+obj-$(CONFIG_SCSI_ISCI) += isci.o
+isci-objs := init.o phy.o request.o sata.o \
+ remote_device.o port.o timers.o deprecated.o \
+ host.o task.o events.o \
+ core/scic_sds_controller.o \
+ core/scic_sds_remote_device.o \
+ core/scic_sds_request.o \
+ core/scic_sds_stp_request.o \
+ core/scic_sds_stp_packet_request.o \
+ core/scic_sds_stp_remote_device.o \
+ core/scic_sds_port.o \
+ core/scic_sds_port_configuration_agent.o \
+ core/scic_sds_phy.o \
+ core/scic_sds_ssp_request.o \
+ core/scic_sds_remote_node_context.o \
+ core/scic_sds_smp_request.o \
+ core/scic_sds_smp_remote_device.o \
+ core/scic_sds_remote_node_table.o \
+ core/scic_sds_unsolicited_frame_control.o \
+ core/sci_base_memory_descriptor_list.o \
+ core/sci_base_state_machine.o \
+ core/sci_util.o
diff --git a/drivers/scsi/isci/core/intel_ata.h b/drivers/scsi/isci/core/intel_ata.h
new file mode 100644
index 00000000000..48b297e50bd
--- /dev/null
+++ b/drivers/scsi/isci/core/intel_ata.h
@@ -0,0 +1,554 @@
+/*
+ * This file is provided under a dual BSD/GPLv2 license. When using or
+ * redistributing this file, you may do so under either license.
+ *
+ * GPL LICENSE SUMMARY
+ *
+ * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ * The full GNU General Public License is included in this distribution
+ * in the file called LICENSE.GPL.
+ *
+ * BSD LICENSE
+ *
+ * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Intel Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * This file defines all of the ATA related constants, enumerations, and types.
+ * Please note that this file does not necessarily contain an exhaustive
+ * list of all constants, commands, sub-commands, etc.
+ *
+ *
+ */
+
+#ifndef _ATA_H_
+#define _ATA_H_
+
+#include <linux/types.h>
+
+/**
+ *
+ *
+ * ATA_COMMAND_CODES These constants depict the various ATA command codes
+ * defined in the ATA/ATAPI specification.
+ */
+#define ATA_IDENTIFY_DEVICE 0xEC
+#define ATA_CHECK_POWER_MODE 0xE5
+#define ATA_STANDBY 0xE2
+#define ATA_STANDBY_IMMED 0xE0
+#define ATA_IDLE_IMMED 0xE1
+#define ATA_IDLE 0xE3
+#define ATA_FLUSH_CACHE 0xE7
+#define ATA_FLUSH_CACHE_EXT 0xEA
+#define ATA_READ_DMA_EXT 0x25
+#define ATA_READ_DMA 0xC8
+#define ATA_READ_SECTORS_EXT 0x24
+#define ATA_READ_SECTORS 0x20
+#define ATA_WRITE_DMA_EXT 0x35
+#define ATA_WRITE_DMA 0xCA
+#define ATA_WRITE_SECTORS_EXT 0x34
+#define ATA_WRITE_SECTORS 0x30
+#define ATA_WRITE_UNCORRECTABLE 0x45
+#define ATA_READ_VERIFY_SECTORS 0x40
+#define ATA_READ_VERIFY_SECTORS_EXT 0x42
+#define ATA_READ_BUFFER 0xE4
+#define ATA_WRITE_BUFFER 0xE8
+#define ATA_EXECUTE_DEVICE_DIAG 0x90
+#define ATA_SET_FEATURES 0xEF
+#define ATA_SMART 0xB0
+#define ATA_PACKET_IDENTIFY 0xA1
+#define ATA_PACKET 0xA0
+#define ATA_READ_FPDMA 0x60
+#define ATA_WRITE_FPDMA 0x61
+#define ATA_READ_LOG_EXT 0x2F
+#define ATA_NOP 0x00
+#define ATA_DEVICE_RESET 0x08
+#define ATA_MEDIA_EJECT 0xED
+
+/**
+ *
+ *
+ * ATA_SMART_SUB_COMMAND_CODES These constants define the ATA SMART command
+ * sub-codes that can be executed.
+ */
+#define ATA_SMART_SUB_CMD_ENABLE 0xD8
+#define ATA_SMART_SUB_CMD_DISABLE 0xD9
+#define ATA_SMART_SUB_