All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Seokmann Ju" <seokmann.ju@qlogic.com>
To: malahal@us.ibm.com
Cc: linux-scsi@vger.kernel.org, Linux Driver <Linux-Driver@qlogic.com>
Subject: RE: [PATCH] qla2xxx: fix RSCN handling on big-endian systems
Date: Wed, 21 Feb 2007 15:11:44 -0800	[thread overview]
Message-ID: <A6970E9A290F3F4682E1EAD0EA14F32BAE5E07@AVEXCH2.qlogic.org> (raw)
In-Reply-To: <20070219181832.GA18043@us.ibm.com>

On Monday, February 19, 2007 10:19 AM, Malahal Naineni wrote:
> qla2xxx driver fails to handle RSCN events affecting area or 
> domain due to an endian issue on big endian systems.  This 
> fixes the port_id_t structure on big endian systems.
<NEED MORE INFORMATION>
Can you provide more details on the fails you are getting?
In my opinion, those fields in the structure should not get affected by
byte ordering.

Thank you,

Seokmann

> -----Original Message-----
> From: malahal@us.ibm.com [mailto:malahal@us.ibm.com] 
> Sent: Monday, February 19, 2007 10:19 AM
> To: linux-scsi@vger.kernel.org; Linux Driver
> Subject: [PATCH] qla2xxx: fix RSCN handling on big-endian systems
> 
> qla2xxx driver fails to handle RSCN events affecting area or 
> domain due to an endian issue on big endian systems.  This 
> fixes the port_id_t structure on big endian systems.
> 
> Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> 
> diff -r c860739bb0f4 drivers/scsi/qla2xxx/qla_def.h
> --- a/drivers/scsi/qla2xxx/qla_def.h	Fri Feb 16 14:19:34 2007 -0800
> +++ b/drivers/scsi/qla2xxx/qla_def.h	Fri Feb 16 14:21:29 2007 -0800
> @@ -1478,14 +1478,17 @@ typedef union {
>  	uint32_t b24 : 24;
>  
>  	struct {
> -		uint8_t d_id[3];
> -		uint8_t rsvd_1;
> -	} r;
> -
> -	struct {
> +#ifdef __BIG_ENDIAN
> +		uint8_t domain;
> +		uint8_t area;
> +		uint8_t al_pa;
> +#elif __LITTLE_ENDIAN
>  		uint8_t al_pa;
>  		uint8_t area;
>  		uint8_t domain;
> +#else
> +#error "__BIG_ENDIAN or __LITTLE_ENDIAN must be defined!"
> +#endif
>  		uint8_t rsvd_1;
>  	} b;
>  } port_id_t;
> 

  reply	other threads:[~2007-02-21 23:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-19 18:18 [PATCH] qla2xxx: fix RSCN handling on big-endian systems malahal
2007-02-21 23:11 ` Seokmann Ju [this message]
2007-02-22  2:53   ` malahal
2007-02-22 14:04     ` Seokmann Ju
2007-02-22 19:08       ` malahal
2007-02-22 19:43         ` Seokmann Ju
2007-02-23 22:51 ` Seokmann Ju

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=A6970E9A290F3F4682E1EAD0EA14F32BAE5E07@AVEXCH2.qlogic.org \
    --to=seokmann.ju@qlogic.com \
    --cc=Linux-Driver@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=malahal@us.ibm.com \
    /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.