Skip to content

Commit 3b6e820

Browse files
committed
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
2 parents 2e277fa + bb61b84 commit 3b6e820

File tree

5 files changed

+21
-10
lines changed

5 files changed

+21
-10
lines changed

drivers/scsi/aic94xx/aic94xx_init.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static ssize_t asd_show_dev_rev(struct device *dev,
280280
return snprintf(buf, PAGE_SIZE, "%s\n",
281281
asd_dev_rev[asd_ha->revision_id]);
282282
}
283-
static DEVICE_ATTR(revision, S_IRUGO, asd_show_dev_rev, NULL);
283+
static DEVICE_ATTR(aic_revision, S_IRUGO, asd_show_dev_rev, NULL);
284284

285285
static ssize_t asd_show_dev_bios_build(struct device *dev,
286286
struct device_attribute *attr,char *buf)
@@ -477,7 +477,7 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
477477
{
478478
int err;
479479

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);
481481
if (err)
482482
return err;
483483

@@ -499,13 +499,13 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
499499
err_biosb:
500500
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
501501
err_rev:
502-
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
502+
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
503503
return err;
504504
}
505505

506506
static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
507507
{
508-
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
508+
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
509509
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
510510
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn);
511511
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios);

drivers/scsi/cxlflash/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,6 +3687,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
36873687
host->max_cmd_len = CXLFLASH_MAX_CDB_LEN;
36883688

36893689
cfg = shost_priv(host);
3690+
cfg->state = STATE_PROBING;
36903691
cfg->host = host;
36913692
rc = alloc_mem(cfg);
36923693
if (rc) {
@@ -3775,6 +3776,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
37753776
return rc;
37763777

37773778
out_remove:
3779+
cfg->state = STATE_PROBED;
37783780
cxlflash_remove(pdev);
37793781
goto out;
37803782
}

drivers/scsi/libfc/fc_rport.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ void fc_rport_destroy(struct kref *kref)
184184
struct fc_rport_priv *rdata;
185185

186186
rdata = container_of(kref, struct fc_rport_priv, kref);
187-
WARN_ON(!list_empty(&rdata->peers));
188187
kfree_rcu(rdata, rcu);
189188
}
190189
EXPORT_SYMBOL(fc_rport_destroy);

drivers/scsi/sd_zbc.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,16 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned char *buf)
462462
sdkp->device->use_10_for_rw = 0;
463463

464464
/*
465-
* If something changed, revalidate the disk zone bitmaps once we have
466-
* the capacity, that is on the second revalidate execution during disk
467-
* scan and always during normal revalidate.
465+
* Revalidate the disk zone bitmaps once the block device capacity is
466+
* set on the second revalidate execution during disk scan and if
467+
* something changed when executing a normal revalidate.
468468
*/
469-
if (sdkp->first_scan)
469+
if (sdkp->first_scan) {
470+
sdkp->zone_blocks = zone_blocks;
471+
sdkp->nr_zones = nr_zones;
470472
return 0;
473+
}
474+
471475
if (sdkp->zone_blocks != zone_blocks ||
472476
sdkp->nr_zones != nr_zones ||
473477
disk->queue->nr_zones != nr_zones) {

drivers/target/target_core_configfs.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,12 @@ static ssize_t pi_prot_type_store(struct config_item *item,
852852
return count;
853853
}
854854

855+
/* always zero, but attr needs to remain RW to avoid userspace breakage */
856+
static ssize_t pi_prot_format_show(struct config_item *item, char *page)
857+
{
858+
return snprintf(page, PAGE_SIZE, "0\n");
859+
}
860+
855861
static ssize_t pi_prot_format_store(struct config_item *item,
856862
const char *page, size_t count)
857863
{
@@ -1132,7 +1138,7 @@ CONFIGFS_ATTR(, emulate_3pc);
11321138
CONFIGFS_ATTR(, emulate_pr);
11331139
CONFIGFS_ATTR(, pi_prot_type);
11341140
CONFIGFS_ATTR_RO(, hw_pi_prot_type);
1135-
CONFIGFS_ATTR_WO(, pi_prot_format);
1141+
CONFIGFS_ATTR(, pi_prot_format);
11361142
CONFIGFS_ATTR(, pi_prot_verify);
11371143
CONFIGFS_ATTR(, enforce_pr_isids);
11381144
CONFIGFS_ATTR(, is_nonrot);

0 commit comments

Comments
 (0)