From patchwork Fri Jan 4 16:01:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 154787 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp762591ljp; Fri, 4 Jan 2019 08:01:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN4WqSP1gO32DDyF6Uca8VrDUHc3Z/9zUxSg212R82fnuvX1PJNwCI/eI1pFKmj+gP3JMu1n X-Received: by 2002:a17:902:be0e:: with SMTP id r14mr48303467pls.124.1546617708653; Fri, 04 Jan 2019 08:01:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546617708; cv=none; d=google.com; s=arc-20160816; b=ekmmJ0o3ByViDHMpaqJtqiq+B+RHOgJ8uIHVgLcBC+/yNKU+hhmVk/i4lbaRCGVIXO GWRd3Vq2XqxvU78QJvvTihU2qwXkorb0F9c7yjlfI84qM9iDbPvL3BJ7GB161/8WTWPA 0BqB0AQuxDbR4ouQ5O5ahYDtdCUcUgypcPr9BJfA35KoBwg2gO57hPxtIcw02C6VejF3 qCDR1nhVgqYpxq1CgkXSkN30rUEKd8YSYDOVhWBtbd9SwgsJqF9RvSuE+ccGBloP77GY 4Wpbg1D/XZlZ5W/M4rc1pV/Ra7VKLpaSoSvsUB3ZYOwzjFdDeV1UNzrYTO1TvvRW22fa m4dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Hb+FaVUA8a26dyKFhhkfavfHSqC0MbsHsJRfTbF3BGM=; b=Z1bR7Jwq4WJQrFr6+tWccSj0qZEVe+faF4Omo1jGphl+n28uKOJA3IMr5GkrUH9C+l /R90pPBZbDS+1s3u6n/KnAz8zgJGf8FvCewEVcTVUyFvIC1+evwWSlcGlHS8EDcjuEnF /5zTSny/QBh1asoAr4prouwYxrlIx2h1Uri2/BtSggGOdSQF6+3+zKsvZv6fNoThdjfP Elv+3J+C+7jpL/9Y4tmEw8lypCXW3qQeXCdvmGP22ruGZ3BKX7Bj4fkpMrI318geCWhs ziKSZrFCNwujzMnVCxGFa9+Z+Rs/Z05i9tjQz6rutSNVHZqJf8yPvxaMKcpKrka8Bdyx 83Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si12125242pgq.545.2019.01.04.08.01.48; Fri, 04 Jan 2019 08:01:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728510AbfADQBq (ORCPT + 31 others); Fri, 4 Jan 2019 11:01:46 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:35487 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727022AbfADQBd (ORCPT ); Fri, 4 Jan 2019 11:01:33 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5A26F861F7BB6; Sat, 5 Jan 2019 00:01:28 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Sat, 5 Jan 2019 00:00:25 +0800 From: John Garry To: , CC: , , , , John Garry Subject: [PATCH 0/3] libsas: SATA PHY connection rate matching during disovery Date: Sat, 5 Jan 2019 00:01:25 +0800 Message-ID: <1546617688-240623-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset looks to resolve an issue we see whereby a SATA end device negotiated linkrate may exceed the min linkrate to the initiator, and not be able to establish a connection. According to the SAS spec, we should lower the SATA PHY linkrate when this condition occurs. It appears that some SAS HBAs (whose driver do not use libsas) already do this automatically (via firmware, I assume). This patchset solves this issue during device discovery phase when detecting a new device, but not during revalidation after the user has reprogrammed some PHY linkrates in the topology. Solving for the latter is much more complicated, and will be done as follow-up to this series. A minor tidy-up to libsas.h is also included. John Garry (3): scsi: libsas: Fix some indentation in libsas.h scsi: libsas: Check SMP PHY control function result scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery drivers/scsi/libsas/sas_expander.c | 29 +++++++++++++++++++- include/scsi/libsas.h | 56 ++++++++++++++++++-------------------- 2 files changed, 55 insertions(+), 30 deletions(-) -- 1.9.1