aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/init.c')
-rw-r--r--drivers/scsi/isci/init.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 17c4c2c89c2e..5137db5a5d85 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -60,6 +60,7 @@
60#include <linux/efi.h> 60#include <linux/efi.h>
61#include <asm/string.h> 61#include <asm/string.h>
62#include <scsi/scsi_host.h> 62#include <scsi/scsi_host.h>
63#include "host.h"
63#include "isci.h" 64#include "isci.h"
64#include "task.h" 65#include "task.h"
65#include "probe_roms.h" 66#include "probe_roms.h"
@@ -154,7 +155,6 @@ static struct scsi_host_template isci_sht = {
154 .queuecommand = sas_queuecommand, 155 .queuecommand = sas_queuecommand,
155 .target_alloc = sas_target_alloc, 156 .target_alloc = sas_target_alloc,
156 .slave_configure = sas_slave_configure, 157 .slave_configure = sas_slave_configure,
157 .slave_destroy = sas_slave_destroy,
158 .scan_finished = isci_host_scan_finished, 158 .scan_finished = isci_host_scan_finished,
159 .scan_start = isci_host_scan_start, 159 .scan_start = isci_host_scan_start,
160 .change_queue_depth = sas_change_queue_depth, 160 .change_queue_depth = sas_change_queue_depth,
@@ -166,9 +166,6 @@ static struct scsi_host_template isci_sht = {
166 .sg_tablesize = SG_ALL, 166 .sg_tablesize = SG_ALL,
167 .max_sectors = SCSI_DEFAULT_MAX_SECTORS, 167 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
168 .use_clustering = ENABLE_CLUSTERING, 168 .use_clustering = ENABLE_CLUSTERING,
169 .eh_device_reset_handler = sas_eh_device_reset_handler,
170 .eh_bus_reset_handler = isci_bus_reset_handler,
171 .slave_alloc = sas_slave_alloc,
172 .target_destroy = sas_target_destroy, 169 .target_destroy = sas_target_destroy,
173 .ioctl = sas_ioctl, 170 .ioctl = sas_ioctl,
174 .shost_attrs = isci_host_attrs, 171 .shost_attrs = isci_host_attrs,
@@ -194,6 +191,9 @@ static struct sas_domain_function_template isci_transport_ops = {
194 .lldd_lu_reset = isci_task_lu_reset, 191 .lldd_lu_reset = isci_task_lu_reset,
195 .lldd_query_task = isci_task_query_task, 192 .lldd_query_task = isci_task_query_task,
196 193
194 /* ata recovery called from ata-eh */
195 .lldd_ata_check_ready = isci_ata_check_ready,
196
197 /* Port and Adapter management */ 197 /* Port and Adapter management */
198 .lldd_clear_nexus_port = isci_task_clear_nexus_port, 198 .lldd_clear_nexus_port = isci_task_clear_nexus_port,
199 .lldd_clear_nexus_ha = isci_task_clear_nexus_ha, 199 .lldd_clear_nexus_ha = isci_task_clear_nexus_ha,
@@ -242,18 +242,13 @@ static int isci_register_sas_ha(struct isci_host *isci_host)
242 if (!sas_ports) 242 if (!sas_ports)
243 return -ENOMEM; 243 return -ENOMEM;
244 244
245 /*----------------- Libsas Initialization Stuff----------------------
246 * Set various fields in the sas_ha struct:
247 */
248
249 sas_ha->sas_ha_name = DRV_NAME; 245 sas_ha->sas_ha_name = DRV_NAME;
250 sas_ha->lldd_module = THIS_MODULE; 246 sas_ha->lldd_module = THIS_MODULE;
251 sas_ha->sas_addr = &isci_host->phys[0].sas_addr[0]; 247 sas_ha->sas_addr = &isci_host->phys[0].sas_addr[0];
252 248
253 /* set the array of phy and port structs. */
254 for (i = 0; i < SCI_MAX_PHYS; i++) { 249 for (i = 0; i < SCI_MAX_PHYS; i++) {
255 sas_phys[i] = &isci_host->phys[i].sas_phy; 250 sas_phys[i] = &isci_host->phys[i].sas_phy;
256 sas_ports[i] = &isci_host->ports[i].sas_port; 251 sas_ports[i] = &isci_host->sas_ports[i];
257 } 252 }
258 253
259 sas_ha->sas_phy = sas_phys; 254 sas_ha->sas_phy = sas_phys;
@@ -528,6 +523,13 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic
528 goto err_host_alloc; 523 goto err_host_alloc;
529 } 524 }
530 pci_info->hosts[i] = h; 525 pci_info->hosts[i] = h;
526
527 /* turn on DIF support */
528 scsi_host_set_prot(h->shost,
529 SHOST_DIF_TYPE1_PROTECTION |
530 SHOST_DIF_TYPE2_PROTECTION |
531 SHOST_DIF_TYPE3_PROTECTION);
532 scsi_host_set_guard(h->shost, SHOST_DIX_GUARD_CRC);
531 } 533 }
532 534
533 err = isci_setup_interrupts(pdev); 535 err = isci_setup_interrupts(pdev);
@@ -551,9 +553,9 @@ static void __devexit isci_pci_remove(struct pci_dev *pdev)
551 int i; 553 int i;
552 554
553 for_each_isci_host(i, ihost, pdev) { 555 for_each_isci_host(i, ihost, pdev) {
556 wait_for_start(ihost);
554 isci_unregister(ihost); 557 isci_unregister(ihost);
555 isci_host_deinit(ihost); 558 isci_host_deinit(ihost);
556 sci_controller_disable_interrupts(ihost);
557 } 559 }
558} 560}
559 561