diff options
author | Giridhar Malavali <giridhar.malavali@qlogic.com> | 2010-07-23 06:28:23 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:06:07 -0400 |
commit | d94d10e7277069801b4e31b40770314a8421f996 (patch) | |
tree | d860e246f919a8274761a238f6e6ee0ec00e6dd0 /drivers/scsi/qla2xxx/qla_init.c | |
parent | 17cf2c5d76b468ca03e59c7cf60decfcef6c08c4 (diff) |
[SCSI] qla2xxx: Removed dependency for SRB structure for Marker processing
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index d0b993c8a189..5bc317070371 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -367,58 +367,6 @@ done: | |||
367 | return rval; | 367 | return rval; |
368 | } | 368 | } |
369 | 369 | ||
370 | static void | ||
371 | qla2x00_async_marker_ctx_done(srb_t *sp) | ||
372 | { | ||
373 | struct srb_ctx *ctx = sp->ctx; | ||
374 | struct srb_iocb *iocb = (struct srb_iocb *)ctx->u.iocb_cmd; | ||
375 | |||
376 | qla2x00_async_marker_done(sp->fcport->vha, sp->fcport, iocb); | ||
377 | iocb->free(sp); | ||
378 | } | ||
379 | |||
380 | int | ||
381 | qla2x00_async_marker(fc_port_t *fcport, uint16_t lun, uint8_t modif) | ||
382 | { | ||
383 | struct scsi_qla_host *vha = fcport->vha; | ||
384 | srb_t *sp; | ||
385 | struct srb_ctx *ctx; | ||
386 | struct srb_iocb *mrk; | ||
387 | int rval; | ||
388 | |||
389 | rval = QLA_FUNCTION_FAILED; | ||
390 | sp = qla2x00_get_ctx_sp(vha, fcport, sizeof(struct srb_ctx), 0); | ||
391 | if (!sp) | ||
392 | goto done; | ||
393 | |||
394 | ctx = sp->ctx; | ||
395 | ctx->type = SRB_MARKER_CMD; | ||
396 | ctx->name = "marker"; | ||
397 | mrk = ctx->u.iocb_cmd; | ||
398 | mrk->u.marker.lun = lun; | ||
399 | mrk->u.marker.modif = modif; | ||
400 | mrk->timeout = qla2x00_async_iocb_timeout; | ||
401 | mrk->done = qla2x00_async_marker_ctx_done; | ||
402 | |||
403 | rval = qla2x00_start_sp(sp); | ||
404 | if (rval != QLA_SUCCESS) | ||
405 | goto done_free_sp; | ||
406 | |||
407 | DEBUG2(printk(KERN_DEBUG | ||
408 | "scsi(%ld:%x): Async-marker - loop-id=%x " | ||
409 | "portid=%02x%02x%02x.\n", | ||
410 | fcport->vha->host_no, sp->handle, fcport->loop_id, | ||
411 | fcport->d_id.b.domain, fcport->d_id.b.area, | ||
412 | fcport->d_id.b.al_pa)); | ||
413 | |||
414 | return rval; | ||
415 | |||
416 | done_free_sp: | ||
417 | mrk->free(sp); | ||
418 | done: | ||
419 | return rval; | ||
420 | } | ||
421 | |||
422 | void | 370 | void |
423 | qla2x00_async_login_done(struct scsi_qla_host *vha, fc_port_t *fcport, | 371 | qla2x00_async_login_done(struct scsi_qla_host *vha, fc_port_t *fcport, |
424 | uint16_t *data) | 372 | uint16_t *data) |
@@ -500,7 +448,8 @@ qla2x00_async_tm_cmd_done(struct scsi_qla_host *vha, fc_port_t *fcport, | |||
500 | lun = (uint16_t)iocb->u.tmf.lun; | 448 | lun = (uint16_t)iocb->u.tmf.lun; |
501 | 449 | ||
502 | /* Issue Marker IOCB */ | 450 | /* Issue Marker IOCB */ |
503 | rval = qla2x00_async_marker(fcport, lun, | 451 | rval = qla2x00_marker(vha, vha->hw->req_q_map[0], |
452 | vha->hw->rsp_q_map[0], fcport->loop_id, lun, | ||
504 | flags == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID); | 453 | flags == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID); |
505 | 454 | ||
506 | if ((rval != QLA_SUCCESS) || iocb->u.tmf.data) { | 455 | if ((rval != QLA_SUCCESS) || iocb->u.tmf.data) { |
@@ -512,24 +461,6 @@ qla2x00_async_tm_cmd_done(struct scsi_qla_host *vha, fc_port_t *fcport, | |||
512 | return; | 461 | return; |
513 | } | 462 | } |
514 | 463 | ||
515 | void | ||
516 | qla2x00_async_marker_done(struct scsi_qla_host *vha, fc_port_t *fcport, | ||
517 | struct srb_iocb *iocb) | ||
518 | { | ||
519 | /* | ||
520 | * Currently we dont have any specific post response processing | ||
521 | * for this IOCB. We'll just return success or failed | ||
522 | * depending on whether the IOCB command succeeded or failed. | ||
523 | */ | ||
524 | if (iocb->u.tmf.data) { | ||
525 | DEBUG2_3_11(printk(KERN_WARNING | ||
526 | "%s(%ld): Marker IOCB failed (%x).\n", | ||
527 | __func__, vha->host_no, iocb->u.tmf.data)); | ||
528 | } | ||
529 | |||
530 | return; | ||
531 | } | ||
532 | |||
533 | /****************************************************************************/ | 464 | /****************************************************************************/ |
534 | /* QLogic ISP2x00 Hardware Support Functions. */ | 465 | /* QLogic ISP2x00 Hardware Support Functions. */ |
535 | /****************************************************************************/ | 466 | /****************************************************************************/ |