]> Pileus Git - ~andy/linux/commitdiff
[SCSI] qla2xxx: Simplify redundant target/device reset logic.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Sat, 27 Aug 2005 02:08:50 +0000 (19:08 -0700)
committerJames Bottomley <jejb@mulgrave.(none)>
Mon, 5 Sep 2005 00:53:10 +0000 (19:53 -0500)
Remove redundant qla2x00_target_reset() function in favour of
the equivalent qla2x00_device_reset().  Update callers of
old function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c

index 3e1e5fe850a042bd6b6ec1a7b6b1b69fd0bb26b1..5deaa7e6ee6092dc1c91dd75112feafbfa1147c7 100644 (file)
@@ -147,9 +147,6 @@ extern int
 qla2x00_abort_target(fc_port_t *);
 #endif
 
-extern int
-qla2x00_target_reset(scsi_qla_host_t *, struct fc_port *);
-
 extern int
 qla2x00_get_adapter_id(scsi_qla_host_t *, uint16_t *, uint8_t *, uint8_t *,
     uint8_t *, uint16_t *);
index 284eb847e50f1dd0c1e9667eb6f9cb947be7a0ee..953156faafdbf1b187833e9f371e17df63c6b800 100644 (file)
@@ -983,58 +983,6 @@ qla2x00_abort_target(fc_port_t *fcport)
 }
 #endif
 
-/*
- * qla2x00_target_reset
- *     Issue target reset mailbox command.
- *
- * Input:
- *     ha = adapter block pointer.
- *     TARGET_QUEUE_LOCK must be released.
- *     ADAPTER_STATE_LOCK must be released.
- *
- * Returns:
- *     qla2x00 local function return status code.
- *
- * Context:
- *     Kernel context.
- */
-int
-qla2x00_target_reset(scsi_qla_host_t *ha, struct fc_port *fcport)
-{
-       int rval;
-       mbx_cmd_t mc;
-       mbx_cmd_t *mcp = &mc;
-
-       DEBUG11(printk("qla2x00_target_reset(%ld): entered.\n", ha->host_no);)
-
-       if (atomic_read(&fcport->state) != FCS_ONLINE)
-               return 0;
-
-       mcp->mb[0] = MBC_TARGET_RESET;
-       if (HAS_EXTENDED_IDS(ha))
-               mcp->mb[1] = fcport->loop_id;
-       else
-               mcp->mb[1] = fcport->loop_id << 8;
-       mcp->mb[2] = ha->loop_reset_delay;
-       mcp->out_mb = MBX_2|MBX_1|MBX_0;
-       mcp->in_mb = MBX_0;
-       mcp->tov = 30;
-       mcp->flags = 0;
-       rval = qla2x00_mailbox_command(ha, mcp);
-
-       if (rval != QLA_SUCCESS) {
-               /*EMPTY*/
-               DEBUG2_3_11(printk("qla2x00_target_reset(%ld): failed=%x.\n",
-                   ha->host_no, rval);)
-       } else {
-               /*EMPTY*/
-               DEBUG11(printk("qla2x00_target_reset(%ld): done.\n",
-                   ha->host_no);)
-       }
-
-       return rval;
-}
-
 /*
  * qla2x00_get_adapter_id
  *     Get adapter ID and topology.
index 0fc37d810e052d4c9ec2f2055901b1eaf9a0953f..29cf3f510935fcbd95cd613c2929c01e0702746c 100644 (file)
@@ -1022,7 +1022,7 @@ qla2x00_loop_reset(scsi_qla_host_t *ha)
                        if (fcport->port_type != FCT_TARGET)
                                continue;
 
-                       status = qla2x00_target_reset(ha, fcport);
+                       status = qla2x00_device_reset(ha, fcport);
                        if (status != QLA_SUCCESS)
                                break;
                }