diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 2497fe4ce5aa..e0fee484f79c 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -3500,3 +3500,40 @@ qla2x00_get_xgmac_stats(scsi_qla_host_t *vha, dma_addr_t stats_dma, | |||
3500 | 3500 | ||
3501 | return rval; | 3501 | return rval; |
3502 | } | 3502 | } |
3503 | |||
3504 | int | ||
3505 | qla2x00_get_dcbx_params(scsi_qla_host_t *vha, dma_addr_t tlv_dma, | ||
3506 | uint16_t size) | ||
3507 | { | ||
3508 | int rval; | ||
3509 | mbx_cmd_t mc; | ||
3510 | mbx_cmd_t *mcp = &mc; | ||
3511 | |||
3512 | if (!IS_QLA81XX(vha->hw)) | ||
3513 | return QLA_FUNCTION_FAILED; | ||
3514 | |||
3515 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3516 | |||
3517 | mcp->mb[0] = MBC_GET_DCBX_PARAMS; | ||
3518 | mcp->mb[1] = 0; | ||
3519 | mcp->mb[2] = MSW(tlv_dma); | ||
3520 | mcp->mb[3] = LSW(tlv_dma); | ||
3521 | mcp->mb[6] = MSW(MSD(tlv_dma)); | ||
3522 | mcp->mb[7] = LSW(MSD(tlv_dma)); | ||
3523 | mcp->mb[8] = size; | ||
3524 | mcp->out_mb = MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; | ||
3525 | mcp->in_mb = MBX_2|MBX_1|MBX_0; | ||
3526 | mcp->tov = MBX_TOV_SECONDS; | ||
3527 | mcp->flags = 0; | ||
3528 | rval = qla2x00_mailbox_command(vha, mcp); | ||
3529 | |||
3530 | if (rval != QLA_SUCCESS) { | ||
3531 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=0x%x " | ||
3532 | "mb[1]=0x%x mb[2]=0x%x.\n", __func__, vha->host_no, rval, | ||
3533 | mcp->mb[0], mcp->mb[1], mcp->mb[2])); | ||
3534 | } else { | ||
3535 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | ||
3536 | } | ||
3537 | |||
3538 | return rval; | ||
3539 | } | ||