aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mbx.c
diff options
context:
space:
mode:
author <andrew.vasquez@qlogic.com>2005-04-17 16:06:53 -0400
committerJames Bottomley <jejb@titanic>2005-04-18 14:47:46 -0400
commitbdf796210e01145fd77bbb3ae644d04f982b6c3b (patch)
tree92253748a63c51e76a70384d35119e107077b050 /drivers/scsi/qla2xxx/qla_mbx.c
parent8482e118afa0cb4321ab3d30b1100d27d63130c0 (diff)
[PATCH] qla2xxx: remove lun discovery codes...
Remove internal lun discovery routines and support structures. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index c04fbcd75235..15f6acaca305 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -858,8 +858,7 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp)
858 858
859 DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);) 859 DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);)
860 860
861 fcport = sp->fclun->fcport; 861 fcport = sp->fcport;
862
863 if (atomic_read(&ha->loop_state) == LOOP_DOWN || 862 if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
864 atomic_read(&fcport->state) == FCS_DEVICE_LOST) { 863 atomic_read(&fcport->state) == FCS_DEVICE_LOST) {
865 return 1; 864 return 1;
@@ -884,7 +883,7 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp)
884 mcp->mb[1] = fcport->loop_id << 8; 883 mcp->mb[1] = fcport->loop_id << 8;
885 mcp->mb[2] = (uint16_t)handle; 884 mcp->mb[2] = (uint16_t)handle;
886 mcp->mb[3] = (uint16_t)(handle >> 16); 885 mcp->mb[3] = (uint16_t)(handle >> 16);
887 mcp->mb[6] = (uint16_t)sp->fclun->lun; 886 mcp->mb[6] = (uint16_t)sp->cmd->device->lun;
888 mcp->out_mb = MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; 887 mcp->out_mb = MBX_6|MBX_3|MBX_2|MBX_1|MBX_0;
889 mcp->in_mb = MBX_0; 888 mcp->in_mb = MBX_0;
890 mcp->tov = 30; 889 mcp->tov = 30;
@@ -980,30 +979,22 @@ qla2x00_abort_target(fc_port_t *fcport)
980 * Kernel context. 979 * Kernel context.
981 */ 980 */
982int 981int
983qla2x00_target_reset(scsi_qla_host_t *ha, uint16_t b, uint16_t t) 982qla2x00_target_reset(scsi_qla_host_t *ha, struct fc_port *fcport)
984{ 983{
985 int rval; 984 int rval;
986 mbx_cmd_t mc; 985 mbx_cmd_t mc;
987 mbx_cmd_t *mcp = &mc; 986 mbx_cmd_t *mcp = &mc;
988 os_tgt_t *tgt;
989 987
990 DEBUG11(printk("qla2x00_target_reset(%ld): entered.\n", ha->host_no);) 988 DEBUG11(printk("qla2x00_target_reset(%ld): entered.\n", ha->host_no);)
991 989
992 tgt = TGT_Q(ha, t); 990 if (atomic_read(&fcport->state) != FCS_ONLINE)
993 if (tgt->fcport == NULL) {
994 /* no target to abort */
995 return 0;
996 }
997 if (atomic_read(&tgt->fcport->state) != FCS_ONLINE) {
998 /* target not online */
999 return 0; 991 return 0;
1000 }
1001 992
1002 mcp->mb[0] = MBC_TARGET_RESET; 993 mcp->mb[0] = MBC_TARGET_RESET;
1003 if (HAS_EXTENDED_IDS(ha)) 994 if (HAS_EXTENDED_IDS(ha))
1004 mcp->mb[1] = tgt->fcport->loop_id; 995 mcp->mb[1] = fcport->loop_id;
1005 else 996 else
1006 mcp->mb[1] = tgt->fcport->loop_id << 8; 997 mcp->mb[1] = fcport->loop_id << 8;
1007 mcp->mb[2] = ha->loop_reset_delay; 998 mcp->mb[2] = ha->loop_reset_delay;
1008 mcp->out_mb = MBX_2|MBX_1|MBX_0; 999 mcp->out_mb = MBX_2|MBX_1|MBX_0;
1009 mcp->in_mb = MBX_0; 1000 mcp->in_mb = MBX_0;