Commit 493f3f38 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "A number of fairly small fixes, mostly in drivers but two in the core
  to change a retry for depopulation (a trendy new hdd thing that
  reorganizes blocks away from failing elements) and one to fix a GFP_
  annotation to avoid a lock dependency (the third core patch is all in
  testing)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: qla1280: Fix kernel oops when debug level > 2
  scsi: ufs: core: Fix error return with query response
  scsi: storvsc: Set correct data length for sending SCSI command without payload
  scsi: ufs: core: Fix use-after free in init error and remove paths
  scsi: core: Do not retry I/Os during depopulation
  scsi: core: Use GFP_NOIO to avoid circular locking dependency
  scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed
  scsi: ufs: core: Ensure clk_gating.lock is used only after initialization
  scsi: ufs: core: Simplify temperature exception event handling
  scsi: target: core: Add line break to status show
  scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions
  scsi: core: Add passthrough tests for success and no failure definitions
parents 74b5161d 5233e323
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2867,7 +2867,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
			dprintk(3, "S/G Segment phys_addr=%x %x, len=0x%x\n",
				cpu_to_le32(upper_32_bits(dma_handle)),
				cpu_to_le32(lower_32_bits(dma_handle)),
				cpu_to_le32(sg_dma_len(sg_next(s))));
				cpu_to_le32(sg_dma_len(s)));
			remseg--;
		}
		dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather "
+7 −2
Original line number Diff line number Diff line
@@ -872,13 +872,18 @@ static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result)
				case 0x1a: /* start stop unit in progress */
				case 0x1b: /* sanitize in progress */
				case 0x1d: /* configuration in progress */
				case 0x24: /* depopulation in progress */
				case 0x25: /* depopulation restore in progress */
					action = ACTION_DELAYED_RETRY;
					break;
				case 0x0a: /* ALUA state transition */
					action = ACTION_DELAYED_REPREP;
					break;
				/*
				 * Depopulation might take many hours,
				 * thus it is not worthwhile to retry.
				 */
				case 0x24: /* depopulation in progress */
				case 0x25: /* depopulation restore in progress */
					fallthrough;
				default:
					action = ACTION_FAIL;
					break;
+7 −0
Original line number Diff line number Diff line
@@ -67,6 +67,13 @@ static void scsi_lib_test_multiple_sense(struct kunit *test)
	};
	int i;

	/* Success */
	sc.result = 0;
	KUNIT_EXPECT_EQ(test, 0, scsi_check_passthrough(&sc, &failures));
	KUNIT_EXPECT_EQ(test, 0, scsi_check_passthrough(&sc, NULL));
	/* Command failed but caller did not pass in a failures array */
	scsi_build_sense(&sc, 0, ILLEGAL_REQUEST, 0x91, 0x36);
	KUNIT_EXPECT_EQ(test, 0, scsi_check_passthrough(&sc, NULL));
	/* Match end of array */
	scsi_build_sense(&sc, 0, ILLEGAL_REQUEST, 0x91, 0x36);
	KUNIT_EXPECT_EQ(test, -EAGAIN, scsi_check_passthrough(&sc, &failures));
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev,
	}
	ret = sbitmap_init_node(&sdev->budget_map,
				scsi_device_max_queue_depth(sdev),
				new_shift, GFP_KERNEL,
				new_shift, GFP_NOIO,
				sdev->request_queue->node, false, true);
	if (!ret)
		sbitmap_resize(&sdev->budget_map, depth);
+1 −0
Original line number Diff line number Diff line
@@ -1800,6 +1800,7 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)

	length = scsi_bufflen(scmnd);
	payload = (struct vmbus_packet_mpb_array *)&cmd_request->mpb;
	payload->range.len = 0;
	payload_sz = 0;

	if (scsi_sg_count(scmnd)) {
Loading