RE: [PATCH] qla2xxx: fix for byteswap in fc_host fabric_name

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

 



ACK.

This patch will make driver to display correct port name. 
Thank you for findings.

Seokmann 

> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx 
> [mailto:linux-scsi-owner@xxxxxxxxxxxxxxx] On Behalf Of Richard Lary
> Sent: Thursday, March 22, 2007 8:53 AM
> To: Linux Driver; linux-scsi@xxxxxxxxxxxxxxx
> Subject: [PATCH] qla2xxx: fix for byteswap in fc_host fabric_name
> 
> From: Richard Lary <rlary@xxxxxxxxxx>
> 
> This patch fixes byte swap issue in qla2xxx driver to fix 
> corrupted fabric_name passed to /sys/class/fc_host/host*/fabric_name.
> 
> Signed-off-by: Richard Lary <rlary@xxxxxxxxxx>
> ---
> 
> Example: Switch fabric name: 20:02:00:0d:ec:41:51:01 # cat 
> /sys/class/fc_host/host*/fabric_name
> 0x2200d0041ec0151
> 
> # cat /sys/class/fc_host/host*/fabric_name
> 0x2002000dec415101
> 
> Applies to: 2.6.21-rc4-git5
> 
> Index: b/drivers/scsi/qla2xxx/qla_mbx.c
> ===================================================================
> --- a/drivers/scsi/qla2xxx/qla_mbx.c
> +++ b/drivers/scsi/qla2xxx/qla_mbx.c
> @@ -1280,14 +1280,14 @@ qla2x00_get_port_name(scsi_qla_host_t *h
>  	} else {
>  		if (name != NULL) {
>  			/* This function returns name in big endian. */
> -			name[0] = LSB(mcp->mb[2]);
> -			name[1] = MSB(mcp->mb[2]);
> -			name[2] = LSB(mcp->mb[3]);
> -			name[3] = MSB(mcp->mb[3]);
> -			name[4] = LSB(mcp->mb[6]);
> -			name[5] = MSB(mcp->mb[6]);
> -			name[6] = LSB(mcp->mb[7]);
> -			name[7] = MSB(mcp->mb[7]);
> +			name[0] = MSB(mcp->mb[2]);
> +			name[1] = LSB(mcp->mb[2]);
> +			name[2] = MSB(mcp->mb[3]);
> +			name[3] = LSB(mcp->mb[3]);
> +			name[4] = MSB(mcp->mb[6]);
> +			name[5] = LSB(mcp->mb[6]);
> +			name[6] = MSB(mcp->mb[7]);
> +			name[7] = LSB(mcp->mb[7]);
>  		}
>  
>  		DEBUG11(printk("qla2x00_get_port_name(%ld): done.\n",
> -
> 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
> 
-
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