Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204291
b: refs/heads/master
c: 08f71e0
h: refs/heads/master
i:
  204289: ece04f9
  204287: 90ad073
v: v3
  • Loading branch information
Harish Zunjarrao authored and James Bottomley committed Jul 28, 2010
1 parent db66199 commit 627c5b3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bc4f4fb44d22e5edc9369c87585a3b492073b8b
refs/heads/master: 08f71e090d3f0d8136c3f350e5082f9217fb7d5b
37 changes: 24 additions & 13 deletions trunk/drivers/scsi/qla2xxx/qla_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static int
qla2x00_process_els(struct fc_bsg_job *bsg_job)
{
struct fc_rport *rport;
fc_port_t *fcport;
fc_port_t *fcport = NULL;
struct Scsi_Host *host;
scsi_qla_host_t *vha;
struct qla_hw_data *ha;
Expand All @@ -240,6 +240,29 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job)
uint16_t nextlid = 0;
struct srb_ctx *els;

if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) {
rport = bsg_job->rport;
fcport = *(fc_port_t **) rport->dd_data;
host = rport_to_shost(rport);
vha = shost_priv(host);
ha = vha->hw;
type = "FC_BSG_RPT_ELS";
} else {
host = bsg_job->shost;
vha = shost_priv(host);
ha = vha->hw;
type = "FC_BSG_HST_ELS_NOLOGIN";
}

/* pass through is supported only for ISP 4Gb or higher */
if (!IS_FWI2_CAPABLE(ha)) {
DEBUG2(qla_printk(KERN_INFO, ha,
"scsi(%ld):ELS passthru not supported for ISP23xx based "
"adapters\n", vha->host_no));
rval = -EPERM;
goto done;
}

/* Multiple SG's are not supported for ELS requests */
if (bsg_job->request_payload.sg_cnt > 1 ||
bsg_job->reply_payload.sg_cnt > 1) {
Expand All @@ -254,13 +277,6 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job)

/* ELS request for rport */
if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) {
rport = bsg_job->rport;
fcport = *(fc_port_t **) rport->dd_data;
host = rport_to_shost(rport);
vha = shost_priv(host);
ha = vha->hw;
type = "FC_BSG_RPT_ELS";

/* make sure the rport is logged in,
* if not perform fabric login
*/
Expand All @@ -272,11 +288,6 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job)
goto done;
}
} else {
host = bsg_job->shost;
vha = shost_priv(host);
ha = vha->hw;
type = "FC_BSG_HST_ELS_NOLOGIN";

/* Allocate a dummy fcport structure, since functions
* preparing the IOCB and mailbox command retrieves port
* specific information from fcport structure. For Host based
Expand Down

0 comments on commit 627c5b3

Please sign in to comment.