Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2051011imj; Fri, 8 Feb 2019 11:42:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IaXdtXUvyY0EKPSrzw2uIogQGpb5/RbCbE8i58Y722/W9YVNh+PF3jP9WaPlvrB7LzXSTeR X-Received: by 2002:a17:902:3f81:: with SMTP id a1mr24229332pld.258.1549654935697; Fri, 08 Feb 2019 11:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549654935; cv=none; d=google.com; s=arc-20160816; b=LKxjroAqPz5ka4yOzkRORUNL6KtcZnpSoNWphry0WGmpeVqJpbnJ3jZfTzKD34197K ZSKWtYO5OKLDbRdN3g9TPckSWmBgopro1SteKpqYj18HYOj6AOYwp1I7HK03y01PfrvR MgGbbijis5ZUjb5vQvO85WYgC7OTnIXCfiVBYxf5/P56aB3QZ6HkxEHPzFD7Wd9ssy9h RHxXf0Tf0kcT7cKlryvP7tA59LHI7zlDGNfabEYf5k07cE37PM3b5jvtVYGpNwqis/2k LbtGP65XfLkSC9pfH5rUokbdbBMHRd1MpixQ7D22E05rcr7FJuqs34gepFWi7wO+cSqN sRXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:cc:to:from:subject:message-id:dkim-signature; bh=7azHroLDrm+O6A3SP9SNozAkDEpk22xK5CRZGp4oKXQ=; b=Xz3kl05C9T6+Y719eIdWyIkvs3fHKFq6Smg1NhhX/dPghd1fmtnP3ppuflxnNw2ZbK A7XqiQCrWPRdcwA2tzskg20s8YInYiIOB7AWc3Jve0MEMXeQJJWWgDBSq0HoxjafRRx9 n3tOIq2EG9q3Iu1J/LfpJ9bNPiEVvNrbSjpS1RYtaNAavpfU6J7QxA8jF5XgAnSx63Qa r5vi34NfQUA+HCzgyMF8tmB3Pcm5JDiN7UmE3cbaN3FEA0pVAph/iNZMr9y4lRBW+vrB N/MP+ZFF4EeG0mgqrgxz0qJym/bnRWCsTOVkHLswBoWa1SxxhGlhYgWg1V5QizBC5r6J zyWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=NDvX+37b; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si3109572plo.217.2019.02.08.11.42.00; Fri, 08 Feb 2019 11:42:15 -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; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=NDvX+37b; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727397AbfBHTSB (ORCPT + 99 others); Fri, 8 Feb 2019 14:18:01 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:40098 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727125AbfBHTSB (ORCPT ); Fri, 8 Feb 2019 14:18:01 -0500 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 43FEB8EE2FF; Fri, 8 Feb 2019 11:18:01 -0800 (PST) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NQA0BeCezmWC; Fri, 8 Feb 2019 11:18:01 -0800 (PST) Received: from host186.65.213.217 (unknown [65.213.217.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 9EDFF8EE0BF; Fri, 8 Feb 2019 11:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1549653481; bh=w/8GcRYpIeKuC6iRiY8gS+tIXb9B2qsaFxFOW/7BrtM=; h=Subject:From:To:Cc:Date:From; b=NDvX+37bJ4QdTaJDN9KIW4c95nTl/zNwGhrsXhGrB6VUayXMjQ/YZHZS5fZzy9965 sQsoOTy9ejKoNBOfwi1AtTESinZ5APTgac4vvmxffw4nJQY90mSrZCWMeSj5kuPNrG ihi1z803+k2nc/BoTtMN8xfFVNwaEi5oiiFUn6fw= Message-ID: <1549653479.3647.13.camel@HansenPartnership.com> Subject: [GIT PULL] SCSI fixes for 5.0-rc5 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Date: Fri, 08 Feb 2019 14:17:59 -0500 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a set of five minor fixes (although, tecnhincally, the aicxxx fix is for a major problem in that the driver won't load without it, but I think the fact it's taken us since 4.10 to discover this indicates that the user base for these things has declined). The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Damien Le Moal (1): scsi: sd_zbc: Fix zone information messages David Disseldorp (1): scsi: target: make the pi_prot_format ConfigFS path readable James Bottomley (1): scsi: aic94xx: fix module loading Ross Lagerwall (1): Revert "scsi: libfc: Add WARN_ON() when deleting rports" Vaibhav Jain (1): scsi: cxlflash: Prevent deadlock when adapter probe fails And the diffstat: drivers/scsi/aic94xx/aic94xx_init.c | 8 ++++---- drivers/scsi/cxlflash/main.c | 2 ++ drivers/scsi/libfc/fc_rport.c | 1 - drivers/scsi/sd_zbc.c | 12 ++++++++---- drivers/target/target_core_configfs.c | 8 +++++++- 5 files changed, 21 insertions(+), 10 deletions(-) With full diff below. James --- diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index f83f79b07b50..07efcb9b5b94 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -280,7 +280,7 @@ static ssize_t asd_show_dev_rev(struct device *dev, return snprintf(buf, PAGE_SIZE, "%s\n", asd_dev_rev[asd_ha->revision_id]); } -static DEVICE_ATTR(revision, S_IRUGO, asd_show_dev_rev, NULL); +static DEVICE_ATTR(aic_revision, S_IRUGO, asd_show_dev_rev, NULL); static ssize_t asd_show_dev_bios_build(struct device *dev, struct device_attribute *attr,char *buf) @@ -477,7 +477,7 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha) { int err; - err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_revision); + err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision); if (err) return err; @@ -499,13 +499,13 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha) err_biosb: device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); err_rev: - device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); + device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision); return err; } static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha) { - device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); + device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision); device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn); device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios); diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index bfa13e3b191c..c8bad2c093b8 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -3687,6 +3687,7 @@ static int cxlflash_probe(struct pci_dev *pdev, host->max_cmd_len = CXLFLASH_MAX_CDB_LEN; cfg = shost_priv(host); + cfg->state = STATE_PROBING; cfg->host = host; rc = alloc_mem(cfg); if (rc) { @@ -3775,6 +3776,7 @@ static int cxlflash_probe(struct pci_dev *pdev, return rc; out_remove: + cfg->state = STATE_PROBED; cxlflash_remove(pdev); goto out; } diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 9192a1d9dec6..dfba4921b265 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -184,7 +184,6 @@ void fc_rport_destroy(struct kref *kref) struct fc_rport_priv *rdata; rdata = container_of(kref, struct fc_rport_priv, kref); - WARN_ON(!list_empty(&rdata->peers)); kfree_rcu(rdata, rcu); } EXPORT_SYMBOL(fc_rport_destroy); diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 83365b29a4d8..fff86940388b 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -462,12 +462,16 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned char *buf) sdkp->device->use_10_for_rw = 0; /* - * If something changed, revalidate the disk zone bitmaps once we have - * the capacity, that is on the second revalidate execution during disk - * scan and always during normal revalidate. + * Revalidate the disk zone bitmaps once the block device capacity is + * set on the second revalidate execution during disk scan and if + * something changed when executing a normal revalidate. */ - if (sdkp->first_scan) + if (sdkp->first_scan) { + sdkp->zone_blocks = zone_blocks; + sdkp->nr_zones = nr_zones; return 0; + } + if (sdkp->zone_blocks != zone_blocks || sdkp->nr_zones != nr_zones || disk->queue->nr_zones != nr_zones) { diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 72016d0dfca5..8e7fffbb8802 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -852,6 +852,12 @@ static ssize_t pi_prot_type_store(struct config_item *item, return count; } +/* always zero, but attr needs to remain RW to avoid userspace breakage */ +static ssize_t pi_prot_format_show(struct config_item *item, char *page) +{ + return snprintf(page, PAGE_SIZE, "0\n"); +} + static ssize_t pi_prot_format_store(struct config_item *item, const char *page, size_t count) { @@ -1132,7 +1138,7 @@ CONFIGFS_ATTR(, emulate_3pc); CONFIGFS_ATTR(, emulate_pr); CONFIGFS_ATTR(, pi_prot_type); CONFIGFS_ATTR_RO(, hw_pi_prot_type); -CONFIGFS_ATTR_WO(, pi_prot_format); +CONFIGFS_ATTR(, pi_prot_format); CONFIGFS_ATTR(, pi_prot_verify); CONFIGFS_ATTR(, enforce_pr_isids); CONFIGFS_ATTR(, is_nonrot);