Skip to content

Commit dd8fc10

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: "Two simple fixes. One prevents a soft lockup on some target removal scenarios and the other prevents us trying to probe the marvell console device, which causes it to time out and need the bus resetting" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fix soft lockup in scsi_remove_target() on module removal SCSI: Add Marvell configuration device to VPD blacklist
2 parents 2850713 + 2a8d9cd commit dd8fc10

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/scsi/scsi_devinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ static struct {
206206
{"iRiver", "iFP Mass Driver", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
207207
{"LASOUND", "CDX7405", "3.10", BLIST_MAX5LUN | BLIST_SINGLELUN},
208208
{"Marvell", "Console", NULL, BLIST_SKIP_VPD_PAGES},
209+
{"Marvell", "91xx Config", "1.01", BLIST_SKIP_VPD_PAGES},
209210
{"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
210211
{"MATSHITA", "DMC-LC5", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
211212
{"MATSHITA", "DMC-LC40", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},

drivers/scsi/scsi_sysfs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,16 +1272,18 @@ static void __scsi_remove_target(struct scsi_target *starget)
12721272
void scsi_remove_target(struct device *dev)
12731273
{
12741274
struct Scsi_Host *shost = dev_to_shost(dev->parent);
1275-
struct scsi_target *starget;
1275+
struct scsi_target *starget, *last_target = NULL;
12761276
unsigned long flags;
12771277

12781278
restart:
12791279
spin_lock_irqsave(shost->host_lock, flags);
12801280
list_for_each_entry(starget, &shost->__targets, siblings) {
1281-
if (starget->state == STARGET_DEL)
1281+
if (starget->state == STARGET_DEL ||
1282+
starget == last_target)
12821283
continue;
12831284
if (starget->dev.parent == dev || &starget->dev == dev) {
12841285
kref_get(&starget->reap_ref);
1286+
last_target = starget;
12851287
spin_unlock_irqrestore(shost->host_lock, flags);
12861288
__scsi_remove_target(starget);
12871289
scsi_target_reap(starget);

0 commit comments

Comments
 (0)