Commit 3b5d535c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "Two core changes and the rest in drivers, one core change to quirk the
  behaviour of the Iomega Zip drive and one to fix a hang caused by tag
  reallocation problems, which has mostly been seen by the iscsi client.

  Note the latter fixes the problem but still has a slight sysfs memory
  leak, so will be amended in the next pull request (once we've run the
  fix for the fix through our testing)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: target: Fix recursive locking in __configfs_open_file()
  scsi: devinfo: Add BLIST_SKIP_IO_HINTS for Iomega ZIP
  scsi: mpi3mr: Clear reset history on ready and recheck state after timeout
  scsi: core: Fix refcount leak for tagset_refcnt
parents fb07430e 14d4ac19
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1618,6 +1618,7 @@ static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc)
			ioc_info(mrioc,
			    "successfully transitioned to %s state\n",
			    mpi3mr_iocstate_name(ioc_state));
			mpi3mr_clear_reset_history(mrioc);
			return 0;
		}
		ioc_status = readl(&mrioc->sysif_regs->ioc_status);
@@ -1637,6 +1638,15 @@ static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc)
		elapsed_time_sec = jiffies_to_msecs(jiffies - start_time)/1000;
	} while (elapsed_time_sec < mrioc->ready_timeout);

	ioc_state = mpi3mr_get_iocstate(mrioc);
	if (ioc_state == MRIOC_STATE_READY) {
		ioc_info(mrioc,
		    "successfully transitioned to %s state after %llu seconds\n",
		    mpi3mr_iocstate_name(ioc_state), elapsed_time_sec);
		mpi3mr_clear_reset_history(mrioc);
		return 0;
	}

out_failed:
	elapsed_time_sec = jiffies_to_msecs(jiffies - start_time)/1000;
	if ((retry < 2) && (elapsed_time_sec < (mrioc->ready_timeout - 60))) {
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ static struct {
	{"IBM", "2076", NULL, BLIST_NO_VPD_SIZE},
	{"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
	{"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN},
	{"IOMEGA", "ZIP", NULL, BLIST_NOTQ | BLIST_NOLUN},
	{"IOMEGA", "ZIP", NULL, BLIST_NOTQ | BLIST_NOLUN | BLIST_SKIP_IO_HINTS},
	{"IOMEGA", "Io20S         *F", NULL, BLIST_KEY},
	{"INSITE", "Floptical   F*8I", NULL, BLIST_KEY},
	{"INSITE", "I325VM", NULL, BLIST_KEY},
+1 −0
Original line number Diff line number Diff line
@@ -361,6 +361,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
	 * since we use this queue depth most of times.
	 */
	if (scsi_realloc_sdev_budget_map(sdev, depth)) {
		kref_put(&sdev->host->tagset_refcnt, scsi_mq_free_tags);
		put_device(&starget->dev);
		kfree(sdev);
		goto out;
+6 −9
Original line number Diff line number Diff line
@@ -108,8 +108,8 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
					const char *page, size_t count)
{
	ssize_t read_bytes;
	struct file *fp;
	ssize_t r = -EINVAL;
	struct path path = {};

	mutex_lock(&target_devices_lock);
	if (target_devices) {
@@ -131,17 +131,14 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
		db_root_stage[read_bytes - 1] = '\0';

	/* validate new db root before accepting it */
	fp = filp_open(db_root_stage, O_RDONLY, 0);
	if (IS_ERR(fp)) {
	r = kern_path(db_root_stage, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path);
	if (r) {
		pr_err("db_root: cannot open: %s\n", db_root_stage);
		goto unlock;
	}
	if (!S_ISDIR(file_inode(fp)->i_mode)) {
		filp_close(fp, NULL);
		if (r == -ENOTDIR)
			pr_err("db_root: not a directory: %s\n", db_root_stage);
		goto unlock;
	}
	filp_close(fp, NULL);
	path_put(&path);

	strscpy(db_root, db_root_stage);
	pr_debug("Target_Core_ConfigFS: db_root set to %s\n", db_root);