From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbcDONVp (ORCPT ); Fri, 15 Apr 2016 09:21:45 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:23876 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbcDONVm (ORCPT ); Fri, 15 Apr 2016 09:21:42 -0400 From: John Garry To: , CC: , , , , , John Garry Subject: [PATCH 0/3] hisi_sas: device id/IPTT collision workaround Date: Fri, 15 Apr 2016 21:36:35 +0800 Message-ID: <1460727398-102091-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.5710EA1F.0162,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0752a6fd3fca84fdb03c249b7ba2e836 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces a workaround to a hw quirk in the HiSilicon SAS controller v2 hw. The quirk is as follows: When a SATA and SAS frame arrives at the host at the same time the frames may be swapped under this condition: SATA device id bit [10:0] == SAS frame IPTT bit [10:0] The workaround is to ensure these 2 values never match. The workaround algorithm is as follows: - SATA device id bit0 always 0 - SATA IPTT has no restriction - SAS IPTT bit0 always 1 - SAS device id has no restriction The major restriction of this workaround is the SAS IPTT range is halved, but this should be ok as testing has shown that even using half the IPTT range does not affect performance. John Garry (3): hisi_sas: add device and slot alloc hw methods hisi_sas: add slot_index_alloc_quirk_v2_hw() hisi_sas: add alloc_dev_quirk_v2_hw() drivers/scsi/hisi_sas/hisi_sas.h | 3 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 11 +++++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 58 ++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) -- 1.9.1