RE: [PATCH] qla2xxx: fix RSCN handling on big-endian systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx [mailto:malahal@xxxxxxxxxx] 
> Sent: Monday, February 19, 2007 10:19 AM
> To: linux-scsi@xxxxxxxxxxxxxxx; 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@xxxxxxxxxx>
> 
> 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;
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux