diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c11f872d3e10..3ddfa889e949 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2222,10 +2222,6 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, | |||
2222 | { | 2222 | { |
2223 | char name[16]; | 2223 | char name[16]; |
2224 | 2224 | ||
2225 | ha->init_cb_size = sizeof(init_cb_t); | ||
2226 | if (IS_QLA2XXX_MIDTYPE(ha)) | ||
2227 | ha->init_cb_size = sizeof(struct mid_init_cb_24xx); | ||
2228 | |||
2229 | ha->init_cb = dma_alloc_coherent(&ha->pdev->dev, ha->init_cb_size, | 2225 | ha->init_cb = dma_alloc_coherent(&ha->pdev->dev, ha->init_cb_size, |
2230 | &ha->init_cb_dma, GFP_KERNEL); | 2226 | &ha->init_cb_dma, GFP_KERNEL); |
2231 | if (!ha->init_cb) | 2227 | if (!ha->init_cb) |
@@ -2522,6 +2518,19 @@ qla2x00_post_aen_work(struct scsi_qla_host *vha, enum fc_host_event_code code, | |||
2522 | return qla2x00_post_work(vha, e, 1); | 2518 | return qla2x00_post_work(vha, e, 1); |
2523 | } | 2519 | } |
2524 | 2520 | ||
2521 | int | ||
2522 | qla2x00_post_idc_ack_work(struct scsi_qla_host *vha, uint16_t *mb) | ||
2523 | { | ||
2524 | struct qla_work_evt *e; | ||
2525 | |||
2526 | e = qla2x00_alloc_work(vha, QLA_EVT_IDC_ACK, 1); | ||
2527 | if (!e) | ||
2528 | return QLA_FUNCTION_FAILED; | ||
2529 | |||
2530 | memcpy(e->u.idc_ack.mb, mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); | ||
2531 | return qla2x00_post_work(vha, e, 1); | ||
2532 | } | ||
2533 | |||
2525 | static void | 2534 | static void |
2526 | qla2x00_do_work(struct scsi_qla_host *vha) | 2535 | qla2x00_do_work(struct scsi_qla_host *vha) |
2527 | { | 2536 | { |
@@ -2539,6 +2548,9 @@ qla2x00_do_work(struct scsi_qla_host *vha) | |||
2539 | fc_host_post_event(vha->host, fc_get_event_number(), | 2548 | fc_host_post_event(vha->host, fc_get_event_number(), |
2540 | e->u.aen.code, e->u.aen.data); | 2549 | e->u.aen.code, e->u.aen.data); |
2541 | break; | 2550 | break; |
2551 | case QLA_EVT_IDC_ACK: | ||
2552 | qla81xx_idc_ack(vha, e->u.idc_ack.mb); | ||
2553 | break; | ||
2542 | } | 2554 | } |
2543 | if (e->flags & QLA_EVT_FLAG_FREE) | 2555 | if (e->flags & QLA_EVT_FLAG_FREE) |
2544 | kfree(e); | 2556 | kfree(e); |
@@ -2552,7 +2564,7 @@ qla2x00_do_work(struct scsi_qla_host *vha) | |||
2552 | void qla2x00_relogin(struct scsi_qla_host *vha) | 2564 | void qla2x00_relogin(struct scsi_qla_host *vha) |
2553 | { | 2565 | { |
2554 | fc_port_t *fcport; | 2566 | fc_port_t *fcport; |
2555 | uint8_t status; | 2567 | int status; |
2556 | uint16_t next_loopid = 0; | 2568 | uint16_t next_loopid = 0; |
2557 | struct qla_hw_data *ha = vha->hw; | 2569 | struct qla_hw_data *ha = vha->hw; |
2558 | 2570 | ||