diff options
author | Arun Easi <arun.easi@qlogic.com> | 2013-01-30 12:34:41 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-02-22 16:05:51 +0400 |
commit | 33c36c0a556c307a2430e92148d5e8d5a84d29df (patch) | |
tree | c089b16a8715aebc677eeedcf55cf22bffde05d0 /drivers/scsi/qla2xxx/qla_target.c | |
parent | b8aa4bdfe13ac3ff51af5d8f79ae0adc20405215 (diff) | |
download | linux-33c36c0a556c307a2430e92148d5e8d5a84d29df.tar.xz |
[SCSI] qla2xxx: Prevent enabling target mode for unsupported HBAs.
Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index cb8ea4463886..61b5d8c2b5da 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -4306,6 +4306,12 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha) if (!QLA_TGT_MODE_ENABLED()) return 0; + if (!IS_TGT_MODE_CAPABLE(ha)) { + ql_log(ql_log_warn, base_vha, 0xe070, + "This adapter does not support target mode.\n"); + return 0; + } + ql_dbg(ql_dbg_tgt, base_vha, 0xe03b, "Registering target for host %ld(%p)", base_vha->host_no, ha); |