All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: Mark Lord <liml@rtr.ca>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	Allen Martin <AMartin@nvidia.com>, Jeff Garzik <jeff@garzik.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, prakash@punnoor.de
Subject: Re: [PATCH] sata_nv ADMA/NCQ support for nForce4
Date: Mon, 16 Oct 2006 22:24:54 -0600	[thread overview]
Message-ID: <45345B16.4090505@shaw.ca> (raw)
In-Reply-To: <45345015.2010601@rtr.ca>

Mark Lord wrote:
> Robert Hancock wrote:
>>
>> +/* ADMA Physical Region Descriptor - one SG segment */
>> +struct nv_adma_prd {
>> +    __le64            addr;
>> +    __le32            len;
>> +    u8            flags;
>> +    u8            packet_len;
>> +    __le16            reserved;
>> +};
> ..
>> +/* ADMA Command Parameter Block
>> +   The first 5 SG segments are stored inside the Command Parameter 
>> Block itself.
>> +   If there are more than 5 segments the remainder are stored in a 
>> separate
>> +   memory area indicated by next_aprd. */
>> +struct nv_adma_cpb {
>> +    u8            resp_flags;    //0
>> +    u8            reserved1;     //1
>> +    u8            ctl_flags;     //2
>> +    // len is length of taskfile in 64 bit words
>> +     u8            len;           //3 +    u8            
>> tag;           //4
>> +    u8            next_cpb_idx;  //5
>> +    __le16            reserved2;     //6-7
>> +    __le16            tf[12];        //8-31
>> +    struct nv_adma_prd    aprd[5];       //32-111
>> +    __le64            next_aprd;     //112-119
>> +    __le64            reserved3;     //120-127
>> +};
> 
> 
> Are those CPB / PRD structs endian-safe when using a big-endian CPU?
> 
> Cheers

They should be, I believe cpu_to_leXX is used whenever the multi-byte 
elements are being written. Not that anyone would likely install a 
big-endian CPU on an nForce4 chipset ;-)

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/

  reply	other threads:[~2006-10-17  4:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-07  8:08 [RFC PATCH] nForce4 ADMA with NCQ: It's aliiiive Robert Hancock
2006-10-07  9:42 ` Prakash Punnoor
2006-10-07 15:54   ` Robert Hancock
2006-10-10  6:44     ` Allen Martin
2006-10-10  6:44       ` Allen Martin
2006-10-10  7:52       ` Prakash Punnoor
2006-11-30 16:46       ` Prakash Punnoor
2006-12-01  0:07         ` Robert Hancock
2006-10-07 15:28 ` Jeff Garzik
2006-10-07 23:49   ` Robert Hancock
2006-10-10  6:52   ` Allen Martin
2006-10-10  6:52     ` Allen Martin
2006-10-11  5:07     ` Robert Hancock
2006-10-11 10:30       ` Jens Axboe
2006-10-13  3:17         ` Robert Hancock
2006-10-13  8:04           ` Jens Axboe
2006-10-17  3:34             ` [PATCH] sata_nv ADMA/NCQ support for nForce4 Robert Hancock
2006-10-17  3:37               ` Mark Lord
2006-10-17  4:24                 ` Robert Hancock [this message]
2006-10-17 16:22                   ` Mark Lord
2006-10-17 17:58                     ` Roland Dreier
2006-10-17 20:54                       ` Mark Lord
2006-10-16 16:17           ` [RFC PATCH] nForce4 ADMA with NCQ: It's aliiiive Mark Lord
2006-10-16 23:40             ` Robert Hancock
2006-10-17  0:04               ` Mark Lord

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=45345B16.4090505@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=AMartin@nvidia.com \
    --cc=jeff@garzik.org \
    --cc=jens.axboe@oracle.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prakash@punnoor.de \
    /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.