All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@web.de>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Pavel Roskin <proski@gnu.org>, wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC/RFT] p54: Fix for big-endian architecture
Date: Fri, 10 Oct 2008 03:29:48 +0200	[thread overview]
Message-ID: <200810100329.48890.chunkeey@web.de> (raw)
In-Reply-To: <48EEA432.7000605@lwfinger.net>

On Friday 10 October 2008 02:39:14 Larry Finger wrote:
> Christian Lamparter wrote:
> 
> As the original code got the data from bootrec, I kept it the same. On
> reflection, the statement above could be
> 
> priv->rx_mtu = le16_to_cpu(desc->rx_mtu);
> 
> I think which structure it is in is purely a matter of taste, but I will make
> that change, test it, and submit a new patch. The big-endian fix above will also
> need to be changed. I considered converting to a single struct using unions, but
> that would get pretty messy.
> 
> Larry

I finally found the definitions by Intersil (again):
> http://gxaafoot.homelinux.org/cgi-bin/archzoom.cgi/jean-baptiste.note@m4x.org--libre/prism54-usb--devo--0.0--patch-182/islsm_bra.h?diff=2
> tinyurl link: http://tinyurl.com/3wo45y
Unfortunately, back in 2002 noone though about big/little endian and 64bit :-D

/*
 * Each boot record is identified by a unique code, followed
 * by the length (in 32 bit words) of the data in the record. 
 */
struct s_bootrec_hdr {
	unsigned long code;
	unsigned long length;	
};

/* Generic bootrecord structure that can be mapped to each bootrecord */
struct s_bootrecord {
	struct s_bootrec_hdr hdr;
	char start_of_data;
};
[...]

so, what about changing bootrec to:
struct bootrec {
        __le32 code;
        __le32 len;
	char data[0];
} __attribute__((packed));
And put this endless discussion to rest

Regards,
	Chr

  reply	other threads:[~2008-10-10  1:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 15:19 [RFC/RFT] p54: Fix for big-endian architecture Larry Finger
2008-10-09 16:58 ` Christian Lamparter
2008-10-10  0:39   ` Larry Finger
2008-10-10  1:29     ` Christian Lamparter [this message]
2008-10-13 21:44 ` Pavel Roskin
2008-10-13 22:24   ` Johannes Berg
2008-10-13 22:36     ` Pavel Roskin
2008-10-13 22:55       ` Christian Lamparter
2008-10-13 22:55         ` Pavel Roskin
2008-10-13 23:05           ` Pavel Roskin
2008-10-13 23:07             ` Johannes Berg
2008-10-13 23:36               ` Pavel Roskin
2008-10-14  0:00                 ` Pavel Roskin
2008-10-14  0:15                   ` Christian Lamparter
2008-10-14  1:20                     ` Pavel Roskin
2008-10-14  2:10                       ` Christian Lamparter
2008-10-14  2:42                         ` [RFC/RFT][PATCH] p54: enable 2.4/5GHz spectrum by eeprom bits Christian Lamparter
2008-10-14  8:15                         ` [RFC/RFT] p54: Fix for big-endian architecture Johannes Berg
2008-10-13 23:31             ` Christian Lamparter
2008-10-13 23:36               ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810100329.48890.chunkeey@web.de \
    --to=chunkeey@web.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=proski@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.