aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvsas/mv_init.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
commitcf9b59e9d3e008591d1f54830f570982bb307a0d (patch)
tree113478ce8fd8c832ba726ffdf59b82cb46356476 /drivers/scsi/mvsas/mv_init.c
parent44504b2bebf8b5823c59484e73096a7d6574471d (diff)
parentf4b87dee923342505e1ddba8d34ce9de33e75050 (diff)
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/scsi/mvsas/mv_init.c')
-rw-r--r--drivers/scsi/mvsas/mv_init.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index cae6b2cf492f..19ad34f381a5 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -37,6 +37,7 @@ static const struct mvs_chip_info mvs_chips[] = {
37}; 37};
38 38
39#define SOC_SAS_NUM 2 39#define SOC_SAS_NUM 2
40#define SG_MX 64
40 41
41static struct scsi_host_template mvs_sht = { 42static struct scsi_host_template mvs_sht = {
42 .module = THIS_MODULE, 43 .module = THIS_MODULE,
@@ -53,10 +54,10 @@ static struct scsi_host_template mvs_sht = {
53 .can_queue = 1, 54 .can_queue = 1,
54 .cmd_per_lun = 1, 55 .cmd_per_lun = 1,
55 .this_id = -1, 56 .this_id = -1,
56 .sg_tablesize = SG_ALL, 57 .sg_tablesize = SG_MX,
57 .max_sectors = SCSI_DEFAULT_MAX_SECTORS, 58 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
58 .use_clustering = ENABLE_CLUSTERING, 59 .use_clustering = ENABLE_CLUSTERING,
59 .eh_device_reset_handler = sas_eh_device_reset_handler, 60 .eh_device_reset_handler = sas_eh_device_reset_handler,
60 .eh_bus_reset_handler = sas_eh_bus_reset_handler, 61 .eh_bus_reset_handler = sas_eh_bus_reset_handler,
61 .slave_alloc = mvs_slave_alloc, 62 .slave_alloc = mvs_slave_alloc,
62 .target_destroy = sas_target_destroy, 63 .target_destroy = sas_target_destroy,
@@ -65,19 +66,17 @@ static struct scsi_host_template mvs_sht = {
65 66
66static struct sas_domain_function_template mvs_transport_ops = { 67static struct sas_domain_function_template mvs_transport_ops = {
67 .lldd_dev_found = mvs_dev_found, 68 .lldd_dev_found = mvs_dev_found,
68 .lldd_dev_gone = mvs_dev_gone, 69 .lldd_dev_gone = mvs_dev_gone,
69
70 .lldd_execute_task = mvs_queue_command, 70 .lldd_execute_task = mvs_queue_command,
71 .lldd_control_phy = mvs_phy_control, 71 .lldd_control_phy = mvs_phy_control,
72 72
73 .lldd_abort_task = mvs_abort_task, 73 .lldd_abort_task = mvs_abort_task,
74 .lldd_abort_task_set = mvs_abort_task_set, 74 .lldd_abort_task_set = mvs_abort_task_set,
75 .lldd_clear_aca = mvs_clear_aca, 75 .lldd_clear_aca = mvs_clear_aca,
76 .lldd_clear_task_set = mvs_clear_task_set, 76 .lldd_clear_task_set = mvs_clear_task_set,
77 .lldd_I_T_nexus_reset = mvs_I_T_nexus_reset, 77 .lldd_I_T_nexus_reset = mvs_I_T_nexus_reset,
78 .lldd_lu_reset = mvs_lu_reset, 78 .lldd_lu_reset = mvs_lu_reset,
79 .lldd_query_task = mvs_query_task, 79 .lldd_query_task = mvs_query_task,
80
81 .lldd_port_formed = mvs_port_formed, 80 .lldd_port_formed = mvs_port_formed,
82 .lldd_port_deformed = mvs_port_deformed, 81 .lldd_port_deformed = mvs_port_deformed,
83 82
@@ -213,7 +212,7 @@ static irqreturn_t mvs_interrupt(int irq, void *opaque)
213 212
214static int __devinit mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) 213static int __devinit mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
215{ 214{
216 int i, slot_nr; 215 int i = 0, slot_nr;
217 216
218 if (mvi->flags & MVF_FLAG_SOC) 217 if (mvi->flags & MVF_FLAG_SOC)
219 slot_nr = MVS_SOC_SLOTS; 218 slot_nr = MVS_SOC_SLOTS;
@@ -232,6 +231,7 @@ static int __devinit mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
232 mvi->devices[i].dev_type = NO_DEVICE; 231 mvi->devices[i].dev_type = NO_DEVICE;
233 mvi->devices[i].device_id = i; 232 mvi->devices[i].device_id = i;
234 mvi->devices[i].dev_status = MVS_DEV_NORMAL; 233 mvi->devices[i].dev_status = MVS_DEV_NORMAL;
234 init_timer(&mvi->devices[i].timer);
235 } 235 }
236 236
237 /* 237 /*
@@ -437,6 +437,7 @@ static int __devinit mvs_prep_sas_ha_init(struct Scsi_Host *shost,
437 437
438 sha->sas_phy = arr_phy; 438 sha->sas_phy = arr_phy;
439 sha->sas_port = arr_port; 439 sha->sas_port = arr_port;
440 sha->core.shost = shost;
440 441
441 sha->lldd_ha = kzalloc(sizeof(struct mvs_prv_info), GFP_KERNEL); 442 sha->lldd_ha = kzalloc(sizeof(struct mvs_prv_info), GFP_KERNEL);
442 if (!sha->lldd_ha) 443 if (!sha->lldd_ha)
@@ -574,6 +575,10 @@ static int __devinit mvs_pci_init(struct pci_dev *pdev,
574 } 575 }
575 nhost++; 576 nhost++;
576 } while (nhost < chip->n_host); 577 } while (nhost < chip->n_host);
578#ifdef MVS_USE_TASKLET
579 tasklet_init(&mv_tasklet, mvs_tasklet,
580 (unsigned long)SHOST_TO_SAS_HA(shost));
581#endif
577 582
578 mvs_post_sas_ha_init(shost, chip); 583 mvs_post_sas_ha_init(shost, chip);
579 584