X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Finfiniband%2Fcore%2Fuser_mad.c;h=7c2f03057ddb1f6ed411d3509c68ba768e4bf0ad;hb=739cdbf1d8f0739b80035b80d69d871e33749b86;hp=2e38792df533568c4e25d6e5a4dfd0469d3cf0c3;hpb=a2e30e529a48ef4e106e405f91cf4ae525bb01c4;p=linux-2.6 diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 2e38792df5..7c2f03057d 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004 Topspin Communications. All rights reserved. - * Copyright (c) 2005 Voltaire, Inc. All rights reserved. + * Copyright (c) 2005 Voltaire, Inc. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -49,8 +49,8 @@ #include #include -#include -#include +#include +#include MODULE_AUTHOR("Roland Dreier"); MODULE_DESCRIPTION("InfiniBand userspace MAD packet access"); @@ -271,7 +271,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, struct ib_send_wr *bad_wr; struct ib_rmpp_mad *rmpp_mad; u8 method; - u64 *tid; + __be64 *tid; int ret, length, hdr_len, data_len, rmpp_hdr_size; int rmpp_active = 0; @@ -316,7 +316,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, if (packet->mad.hdr.grh_present) { ah_attr.ah_flags = IB_AH_GRH; memcpy(ah_attr.grh.dgid.raw, packet->mad.hdr.gid, 16); - ah_attr.grh.flow_label = packet->mad.hdr.flow_label; + ah_attr.grh.flow_label = be32_to_cpu(packet->mad.hdr.flow_label); ah_attr.grh.hop_limit = packet->mad.hdr.hop_limit; ah_attr.grh.traffic_class = packet->mad.hdr.traffic_class; }