diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-07-02 22:56:22 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-02 22:56:22 -0700 |
commit | 6f231dda68080759f1aed3769896e94c73099f0f (patch) | |
tree | 45b6ce02fa40e0e9c35526ac6c45950138387516 | |
parent | 59c5f46fbe01a00eedf54a23789634438bb80603 (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>
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_ |