diff options
author | Jing Huang <huangj@brocade.com> | 2011-11-16 20:29:26 (GMT) |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-12-15 06:55:01 (GMT) |
commit | 98cdfb4347f5d38b97de2045d688e44e2a26ea42 (patch) | |
tree | 4d6c9c71e27039183b201422188d00e223f23061 /drivers/scsi/bfa/bfa_ioc.c | |
parent | 275a63acda70dc1fae0ee0cb6032aaec4dc801d2 (diff) | |
download | linux-fsl-qoriq-98cdfb4347f5d38b97de2045d688e44e2a26ea42.tar.xz |
[SCSI] bfa: fix endian and bit field check bug
Fix some endian issue. __BIGENDIAN is not defined and it needs to be
replaced with __BIG_ENDIAN. Also fixed a bug in bit field access.
These two issues were reported by Dan Carpenter.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 1ac5aec..eca7ab7 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c @@ -3727,11 +3727,11 @@ bfa_sfp_media_get(struct bfa_sfp_s *sfp) (xmtr_tech & SFP_XMTR_TECH_SA)) *media = BFA_SFP_MEDIA_SW; /* Check 10G Ethernet Compilance code */ - else if (e10g.b & 0x10) + else if (e10g.r.e10g_sr) *media = BFA_SFP_MEDIA_SW; - else if (e10g.b & 0x60) + else if (e10g.r.e10g_lrm && e10g.r.e10g_lr) *media = BFA_SFP_MEDIA_LW; - else if (e10g.r.e10g_unall & 0x80) + else if (e10g.r.e10g_unall) *media = BFA_SFP_MEDIA_UNKNOWN; else bfa_trc(sfp, 0); |