diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 953156faafdb..13e1c9047079 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -2427,3 +2427,32 @@ qla2x00_set_serdes_params(scsi_qla_host_t *ha, uint16_t sw_em_1g, | |||
2427 | 2427 | ||
2428 | return rval; | 2428 | return rval; |
2429 | } | 2429 | } |
2430 | |||
2431 | int | ||
2432 | qla2x00_stop_firmware(scsi_qla_host_t *ha) | ||
2433 | { | ||
2434 | int rval; | ||
2435 | mbx_cmd_t mc; | ||
2436 | mbx_cmd_t *mcp = &mc; | ||
2437 | |||
2438 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) | ||
2439 | return QLA_FUNCTION_FAILED; | ||
2440 | |||
2441 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); | ||
2442 | |||
2443 | mcp->mb[0] = MBC_STOP_FIRMWARE; | ||
2444 | mcp->out_mb = MBX_0; | ||
2445 | mcp->in_mb = MBX_0; | ||
2446 | mcp->tov = 5; | ||
2447 | mcp->flags = 0; | ||
2448 | rval = qla2x00_mailbox_command(ha, mcp); | ||
2449 | |||
2450 | if (rval != QLA_SUCCESS) { | ||
2451 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | ||
2452 | ha->host_no, rval)); | ||
2453 | } else { | ||
2454 | DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); | ||
2455 | } | ||
2456 | |||
2457 | return rval; | ||
2458 | } | ||