lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Sep 2016 14:49:21 +0200
From:   Hannes Reinecke <hare@...e.de>
To:     John Garry <john.garry@...wei.com>, jejb@...ux.vnet.ibm.com,
        martin.petersen@...cle.com
Cc:     linuxarm@...wei.com, zhangfei.gao@...aro.org, xuwei5@...ilicon.com,
        john.garry2@...l.dcu.ie, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Xiang Chen <chenxiang66@...ilicon.com>
Subject: Re: [PATCH 10/15] hisi_sas: fix HBA SAS addr endianness for v2 hw

On 09/06/2016 05:36 PM, John Garry wrote:
> The endianness for the SAS address in the TX_ID_DWORD
> registers is set incorrectly.
> We see errors like this in the boot log:
> [    7.583284] sas: target proto 0x0 at 50000d1108e7923f:0x1f not handled
> 
> This is due to the host SAS addr not matching the PHY SAS
> addr in the expander host-attached phy discovery responses.
> 
> To fix, we byte swap the SAS addr from BE to LE (which is
> the endianness of the SAS controller).
> 
> Signed-off-by: John Garry <john.garry@...wei.com>
> Signed-off-by: Xiang Chen <chenxiang66@...ilicon.com>
> ---
>  drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
> index ae44443..ce84211 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
> @@ -562,13 +562,13 @@ static void config_id_frame_v2_hw(struct hisi_hba *hisi_hba, int phy_no)
>  	hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD0,
>  			__swab32(identify_buffer[0]));
>  	hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD1,
> -			identify_buffer[2]);
> +			__swab32(identify_buffer[1]));
>  	hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD2,
> -			identify_buffer[1]);
> +			__swab32(identify_buffer[2]));
>  	hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD3,
> -			identify_buffer[4]);
> +			__swab32(identify_buffer[3]));
>  	hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD4,
> -			identify_buffer[3]);
> +			__swab32(identify_buffer[4]));
>  	hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD5,
>  			__swab32(identify_buffer[5]));
>  }
> 
Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@...e.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ