aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-02-08 18:37:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-02-08 18:37:17 -0500
commit3b6e8204a997510718949fd177f01da1860c738a (patch)
treebb086a7bb6fbc3825e85056e2bd59584c9569bea
parent2e277fa0893936bb4ab8432828f5d422a9ed0a7f (diff)
parentbb61b843ffd46978d7ca5095453e572714934eeb (diff)
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "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)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: cxlflash: Prevent deadlock when adapter probe fails Revert "scsi: libfc: Add WARN_ON() when deleting rports" scsi: sd_zbc: Fix zone information messages scsi: target: make the pi_prot_format ConfigFS path readable scsi: aic94xx: fix module loading
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c8
-rw-r--r--drivers/scsi/cxlflash/main.c2
-rw-r--r--drivers/scsi/libfc/fc_rport.c1
-rw-r--r--drivers/scsi/sd_zbc.c12
-rw-r--r--drivers/target/target_core_configfs.c8
5 files changed, 21 insertions, 10 deletions
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,
280 return snprintf(buf, PAGE_SIZE, "%s\n", 280 return snprintf(buf, PAGE_SIZE, "%s\n",
281 asd_dev_rev[asd_ha->revision_id]); 281 asd_dev_rev[asd_ha->revision_id]);
282} 282}
283static DEVICE_ATTR(revision, S_IRUGO, asd_show_dev_rev, NULL); 283static DEVICE_ATTR(aic_revision, S_IRUGO, asd_show_dev_rev, NULL);
284 284
285static ssize_t asd_show_dev_bios_build(struct device *dev, 285static ssize_t asd_show_dev_bios_build(struct device *dev,
286 struct device_attribute *attr,char *buf) 286 struct device_attribute *attr,char *buf)
@@ -477,7 +477,7 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
477{ 477{
478 int err; 478 int err;
479 479
480 err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_revision); 480 err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
481 if (err) 481 if (err)
482 return err; 482 return err;
483 483
@@ -499,13 +499,13 @@ err_update_bios:
499err_biosb: 499err_biosb:
500 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); 500 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
501err_rev: 501err_rev:
502 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); 502 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
503 return err; 503 return err;
504} 504}
505 505
506static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha) 506static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
507{ 507{
508 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); 508 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
509 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); 509 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
510 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn); 510 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn);
511 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios); 511 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,
3687 host->max_cmd_len = CXLFLASH_MAX_CDB_LEN; 3687 host->max_cmd_len = CXLFLASH_MAX_CDB_LEN;
3688 3688
3689 cfg = shost_priv(host); 3689 cfg = shost_priv(host);
3690 cfg->state = STATE_PROBING;
3690 cfg->host = host; 3691 cfg->host = host;
3691 rc = alloc_mem(cfg); 3692 rc = alloc_mem(cfg);
3692 if (rc) { 3693 if (rc) {
@@ -3775,6 +3776,7 @@ out:
3775 return rc; 3776 return rc;
3776 3777
3777out_remove: 3778out_remove:
3779 cfg->state = STATE_PROBED;
3778 cxlflash_remove(pdev); 3780 cxlflash_remove(pdev);
3779 goto out; 3781 goto out;
3780} 3782}
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)
184 struct fc_rport_priv *rdata; 184 struct fc_rport_priv *rdata;
185 185
186 rdata = container_of(kref, struct fc_rport_priv, kref); 186 rdata = container_of(kref, struct fc_rport_priv, kref);
187 WARN_ON(!list_empty(&rdata->peers));
188 kfree_rcu(rdata, rcu); 187 kfree_rcu(rdata, rcu);
189} 188}
190EXPORT_SYMBOL(fc_rport_destroy); 189EXPORT_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)
462 sdkp->device->use_10_for_rw = 0; 462 sdkp->device->use_10_for_rw = 0;
463 463
464 /* 464 /*
465 * If something changed, revalidate the disk zone bitmaps once we have 465 * Revalidate the disk zone bitmaps once the block device capacity is
466 * the capacity, that is on the second revalidate execution during disk 466 * set on the second revalidate execution during disk scan and if
467 * scan and always during normal revalidate. 467 * something changed when executing a normal revalidate.
468 */ 468 */
469 if (sdkp->first_scan) 469 if (sdkp->first_scan) {
470 sdkp->zone_blocks = zone_blocks;
471 sdkp->nr_zones = nr_zones;
470 return 0; 472 return 0;
473 }
474
471 if (sdkp->zone_blocks != zone_blocks || 475 if (sdkp->zone_blocks != zone_blocks ||
472 sdkp->nr_zones != nr_zones || 476 sdkp->nr_zones != nr_zones ||
473 disk->queue->nr_zones != nr_zones) { 477 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,
852 return count; 852 return count;
853} 853}
854 854
855/* always zero, but attr needs to remain RW to avoid userspace breakage */
856static ssize_t pi_prot_format_show(struct config_item *item, char *page)
857{
858 return snprintf(page, PAGE_SIZE, "0\n");
859}
860
855static ssize_t pi_prot_format_store(struct config_item *item, 861static ssize_t pi_prot_format_store(struct config_item *item,
856 const char *page, size_t count) 862 const char *page, size_t count)
857{ 863{
@@ -1132,7 +1138,7 @@ CONFIGFS_ATTR(, emulate_3pc);
1132CONFIGFS_ATTR(, emulate_pr); 1138CONFIGFS_ATTR(, emulate_pr);
1133CONFIGFS_ATTR(, pi_prot_type); 1139CONFIGFS_ATTR(, pi_prot_type);
1134CONFIGFS_ATTR_RO(, hw_pi_prot_type); 1140CONFIGFS_ATTR_RO(, hw_pi_prot_type);
1135CONFIGFS_ATTR_WO(, pi_prot_format); 1141CONFIGFS_ATTR(, pi_prot_format);
1136CONFIGFS_ATTR(, pi_prot_verify); 1142CONFIGFS_ATTR(, pi_prot_verify);
1137CONFIGFS_ATTR(, enforce_pr_isids); 1143CONFIGFS_ATTR(, enforce_pr_isids);
1138CONFIGFS_ATTR(, is_nonrot); 1144CONFIGFS_ATTR(, is_nonrot);