Received: by 10.192.165.156 with SMTP id m28csp619824imm; Tue, 17 Apr 2018 16:37:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49CYXEUsnjzMPjpoR7Tsn6nei8BKPJTuz7plfhGIXb6ueBQNubYHQAZ4K28Sv+oBnV3qXH/ X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr447178plb.198.1524008240103; Tue, 17 Apr 2018 16:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524008240; cv=none; d=google.com; s=arc-20160816; b=sMZ896bC7lQbZZHOAwfOvQYqCMWBdtuZlNeNyMlyjCyrJWPYP4jzpor/4SxeTqwvBh k+VCp5SwP+vWu3wLDP+HXsWN2jS4fi2BINIV3+9cMd7HjdhXA3jb1tanfUsl7YGzxpTF KStZUBz9r5F0i9JJTKQ3r8L3x8Tc+f6zzKQNokox7o2oMN9rjjEtyxoLWi/HbcLBk7jJ AVPy2MWdAa307bSfB3tJ91tRIoLL554z8RFQAzXRlHAGfUndxbeKihkIlrzQ2WxFeqiz N6SFzNcWOVabFqSaKKqpC1XuhCaUePvDn4eP8Gxk6dVsmj2ZK5qERnaUA28bxZeBCkdu jlmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=pBlI+0GvsJUev1aqLeUXvj43LRXkmYcD1YCt0140LNE=; b=nINsWktyWJ++xPydv+MzjeHFR5GJd0t0EnMg4VPOO23a5UJgIYqCdUH1vqtHoiuaCz 3JRjGYt0gTmEW8usw2XQaSoFDU1ttLzxX7EhlQ9hF5gBalfZP7OFnP+rQfAE70bDWvhe mtud/6PuWHsYo09rlfZdXg2LLJQU5dg1KLwFhp1eRL/rRbtWIvl27x4qp5xUyLuBJUXp IIhu7tSKLKxG31+RKld/Dmfc49FesC/zjeUkGwH6r6JSsYjGe1zPoqBNYZ5mFNSm9QHa WL80EVGoquFkZSS1EaBVnYtjJ6iiYcrgDuBYTyMppK4DH/zmwDArAVnRWG1aEqaODvo9 /9uQ== 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 h4si10608598pgq.363.2018.04.17.16.37.04; Tue, 17 Apr 2018 16:37:20 -0700 (PDT) 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 S1752888AbeDQXfh (ORCPT + 99 others); Tue, 17 Apr 2018 19:35:37 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:41021 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbeDQXfg (ORCPT ); Tue, 17 Apr 2018 19:35:36 -0400 Received: from apollon.suse.de.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Tue, 17 Apr 2018 17:35:26 -0600 From: Martin Wilck To: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Hannes Reinecke , James Bottomley , Xose Vazquez Perez , Bart Van Assche Subject: [PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND Date: Wed, 18 Apr 2018 01:35:05 +0200 Message-Id: <20180417233511.6573-1-mwilck@suse.com> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here is another attempt to handle the special return codes for ABORTED COMMAND for certain SCSI devices. Following MKP's recommendation, I've created two new BLIST flags, simplifying the code in scsi_error.c compared to the previous versions. Rather than using "free" bits, I increased the length of blist_flag_t to 64 bit, and used previously unused bits. I also added checking for obsolete and unused bits. For the blist_flag_t size increase, I used sparse to try and avoid regressions; that necessitated fixing sparse's errors for the current code first. Martin Wilck (6): ilog2: create truly constant version for sparse scsi: use const_ilog2 for array indices scsi: devinfo: change blist_flag_t to 64bit scsi: devinfo: warn on undefined blist flags scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS drivers/scsi/Makefile | 2 +- drivers/scsi/scsi_debugfs.c | 2 +- drivers/scsi/scsi_devinfo.c | 28 +++++++++++++---- drivers/scsi/scsi_error.c | 7 +++++ drivers/scsi/scsi_sysfs.c | 2 +- include/linux/log2.h | 35 ++++++++++++++------- include/scsi/scsi_device.h | 2 +- include/scsi/scsi_devinfo.h | 75 ++++++++++++++++++++++++++++++--------------- 8 files changed, 107 insertions(+), 46 deletions(-) -- 2.16.1