Removes check blocking lun value higher than 1023 as fcoeadm needs to display them as well.
Currently lun value is retrieved from their scsi int value representation in /sysfs and stored in double long after 48 bit left shift, and later stored value used in comparing against same /sysfs int value after 48 bit right shift to stored value, this is issue for higher luns value as second 48 bits right shift won't give same value as it was originally from /sysfs and in turn compare always fails for such cases and in turn their lun info is never displayed with fcoeadm -l or -t options. So instead of doing these bits shifts for their only use to compare /sysfs int value, just store int value as is to keep their value intact for higher luns value also. Signed-off-by: Vasu Dev <[email protected]> --- bind.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bind.c b/bind.c index b6cc103..5590636 100644 --- a/bind.c +++ b/bind.c @@ -251,7 +251,7 @@ get_binding_target_mapping(struct dirent *dp, void *ctxt_arg) fcp->FcId = pp->ap_attr.PortFcId; fcp->NodeWWN = pp->ap_attr.NodeWWN; fcp->PortWWN = pp->ap_attr.PortWWN; - fcp->FcpLun = (HBA_UINT64) lun << 48; + fcp->FcpLun = (HBA_UINT64) lun; } /* @@ -364,11 +364,6 @@ get_binding_sg_name(struct port_info *lp, HBA_WWN disc_wwpn, if (rp == NULL) return HBA_STATUS_ERROR_ILLEGAL_WWN; - /* - * Check for LUN more than 1023 or multi-level. - */ - if (fc_lun & ((0xfc01ULL << 48) - 1)) - return HBA_STATUS_ERROR; memset(&ctxt, 0, sizeof(ctxt)); memset(&entry, 0, sizeof(entry)); ctxt.oc_rport = rp; @@ -377,7 +372,7 @@ get_binding_sg_name(struct port_info *lp, HBA_WWN disc_wwpn, ctxt.oc_target = rp->ap_scsi_target; if (ctxt.oc_target == -1) return ENOENT; - ctxt.oc_lun = fc_lun >> 48; + ctxt.oc_lun = (int) fc_lun; ctxt.oc_limit = 1; ctxt.oc_ver = 1; ctxt.oc_entries = &entry; _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
