diff options
author | Xiangliang Yu <yuxiangl@marvell.com> | 2011-05-24 10:36:02 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-26 02:36:11 -0400 |
commit | a4632aae8b662b1f32fe3fc558a813cd5c3daae6 (patch) | |
tree | a88ee045018877314d76b9cb99e3e837b78d5565 /drivers/scsi/mvsas/mv_init.c | |
parent | b89e8f539ff8bcf2a1464578fa91cb96cc433fc3 (diff) |
[SCSI] mvsas: Add new macros and functions
Add new macros: MVS_SOFT_RESET, MVS_HARD_RESET, MVS_PHY_TUNE,
MVS_COMMAND_ACTIVE, EXP_BRCT_CHG, MVS_MAX_SG
Add new member sg_width in struct mvs_chip_info
Use macros rather than magic number
Add new functions: mvs_fill_ssp_resp_iu, mvs_set_sense,
mvs_94xx_clear_srs_irq, mvs_94xx_phy_set_link_rate
Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mvsas/mv_init.c')
-rw-r--r-- | drivers/scsi/mvsas/mv_init.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index a7815f9c63bc..bf7d90cfbcfc 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c | |||
@@ -39,15 +39,15 @@ int interrupt_coalescing = 0x80; | |||
39 | static struct scsi_transport_template *mvs_stt; | 39 | static struct scsi_transport_template *mvs_stt; |
40 | struct kmem_cache *mvs_task_list_cache; | 40 | struct kmem_cache *mvs_task_list_cache; |
41 | static const struct mvs_chip_info mvs_chips[] = { | 41 | static const struct mvs_chip_info mvs_chips[] = { |
42 | [chip_6320] = { 1, 2, 0x400, 17, 16, 9, &mvs_64xx_dispatch, }, | 42 | [chip_6320] = { 1, 2, 0x400, 17, 16, 6, 9, &mvs_64xx_dispatch, }, |
43 | [chip_6440] = { 1, 4, 0x400, 17, 16, 9, &mvs_64xx_dispatch, }, | 43 | [chip_6440] = { 1, 4, 0x400, 17, 16, 6, 9, &mvs_64xx_dispatch, }, |
44 | [chip_6485] = { 1, 8, 0x800, 33, 32, 10, &mvs_64xx_dispatch, }, | 44 | [chip_6485] = { 1, 8, 0x800, 33, 32, 6, 10, &mvs_64xx_dispatch, }, |
45 | [chip_9180] = { 2, 4, 0x800, 17, 64, 9, &mvs_94xx_dispatch, }, | 45 | [chip_9180] = { 2, 4, 0x800, 17, 64, 8, 9, &mvs_94xx_dispatch, }, |
46 | [chip_9480] = { 2, 4, 0x800, 17, 64, 9, &mvs_94xx_dispatch, }, | 46 | [chip_9480] = { 2, 4, 0x800, 17, 64, 8, 9, &mvs_94xx_dispatch, }, |
47 | [chip_9445] = { 1, 4, 0x800, 17, 64, 11, &mvs_94xx_dispatch, }, | 47 | [chip_9445] = { 1, 4, 0x800, 17, 64, 8, 11, &mvs_94xx_dispatch, }, |
48 | [chip_9485] = { 2, 4, 0x800, 17, 64, 11, &mvs_94xx_dispatch, }, | 48 | [chip_9485] = { 2, 4, 0x800, 17, 64, 8, 11, &mvs_94xx_dispatch, }, |
49 | [chip_1300] = { 1, 4, 0x400, 17, 16, 9, &mvs_64xx_dispatch, }, | 49 | [chip_1300] = { 1, 4, 0x400, 17, 16, 6, 9, &mvs_64xx_dispatch, }, |
50 | [chip_1320] = { 2, 4, 0x800, 17, 64, 9, &mvs_94xx_dispatch, }, | 50 | [chip_1320] = { 2, 4, 0x800, 17, 64, 8, 9, &mvs_94xx_dispatch, }, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct device_attribute *mvst_host_attrs[]; | 53 | struct device_attribute *mvst_host_attrs[]; |
@@ -466,7 +466,7 @@ static int __devinit mvs_prep_sas_ha_init(struct Scsi_Host *shost, | |||
466 | ((struct mvs_prv_info *)sha->lldd_ha)->n_host = core_nr; | 466 | ((struct mvs_prv_info *)sha->lldd_ha)->n_host = core_nr; |
467 | 467 | ||
468 | shost->transportt = mvs_stt; | 468 | shost->transportt = mvs_stt; |
469 | shost->max_id = 128; | 469 | shost->max_id = MVS_MAX_DEVICES; |
470 | shost->max_lun = ~0; | 470 | shost->max_lun = ~0; |
471 | shost->max_channel = 1; | 471 | shost->max_channel = 1; |
472 | shost->max_cmd_len = 16; | 472 | shost->max_cmd_len = 16; |
@@ -512,6 +512,7 @@ static void __devinit mvs_post_sas_ha_init(struct Scsi_Host *shost, | |||
512 | can_queue = MVS_CHIP_SLOT_SZ; | 512 | can_queue = MVS_CHIP_SLOT_SZ; |
513 | 513 | ||
514 | sha->lldd_queue_size = can_queue; | 514 | sha->lldd_queue_size = can_queue; |
515 | shost->sg_tablesize = min_t(u16, SG_ALL, MVS_MAX_SG); | ||
515 | shost->can_queue = can_queue; | 516 | shost->can_queue = can_queue; |
516 | mvi->shost->cmd_per_lun = MVS_QUEUE_SIZE; | 517 | mvi->shost->cmd_per_lun = MVS_QUEUE_SIZE; |
517 | sha->core.shost = mvi->shost; | 518 | sha->core.shost = mvi->shost; |