Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f020713 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "Nine small fixes: the biggest is probably finally sorting out Kconfig
  issues with lpfc nvme.  There are some performance fixes for megaraid
  and hpsa and a static checker fix"

[ Johannes Thumshirn points out that there still seems to be more lpfc
  vs nvme config issues.  Oh well.   - Linus ]

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: lpfc: Finalize Kconfig options for nvme
  scsi: ufs: don't check unsigned type for a negative value
  scsi: hpsa: do not timeout reset operations
  scsi: hpsa: limit outstanding rescans
  scsi: hpsa: update check for logical volume status
  scsi: megaraid_sas: Driver version upgrade
  scsi: megaraid_sas: raid6 also require cpuSel check same as raid5
  scsi: megaraid_sas: add correct return type check for ldio hint logic for raid1
  scsi: megaraid_sas: enable intx only if msix request fails
parents 2c867ac3 ca4a213d
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -1253,20 +1253,6 @@ config SCSI_LPFC_DEBUG_FS
	  This makes debugging information from the lpfc driver
	  available via the debugfs filesystem.

config LPFC_NVME_INITIATOR
	bool "Emulex LightPulse Fibre Channel NVME Initiator Support"
	depends on SCSI_LPFC && NVME_FC
	---help---
	  This enables NVME Initiator support in the Emulex lpfc driver.

config LPFC_NVME_TARGET
	bool "Emulex LightPulse Fibre Channel NVME Initiator Support"
	depends on SCSI_LPFC && NVME_TARGET_FC
	---help---
	  This enables NVME Target support in the Emulex lpfc driver.
	  Target enablement must still be enabled on a per adapter
	  basis by module parameters.

config SCSI_SIM710
	tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
	depends on (EISA || MCA) && SCSI
+32 −21
Original line number Diff line number Diff line
@@ -2956,7 +2956,7 @@ static int hpsa_send_reset(struct ctlr_info *h, unsigned char *scsi3addr,
	/* fill_cmd can't fail here, no data buffer to map. */
	(void) fill_cmd(c, reset_type, h, NULL, 0, 0,
			scsi3addr, TYPE_MSG);
	rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, DEFAULT_TIMEOUT);
	rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, NO_TIMEOUT);
	if (rc) {
		dev_warn(&h->pdev->dev, "Failed to send reset command\n");
		goto out;
@@ -3714,7 +3714,7 @@ static int hpsa_get_volume_status(struct ctlr_info *h,
 *  # (integer code indicating one of several NOT READY states
 *     describing why a volume is to be kept offline)
 */
static int hpsa_volume_offline(struct ctlr_info *h,
static unsigned char hpsa_volume_offline(struct ctlr_info *h,
					unsigned char scsi3addr[])
{
	struct CommandList *c;
@@ -3735,7 +3735,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
					DEFAULT_TIMEOUT);
	if (rc) {
		cmd_free(h, c);
		return 0;
		return HPSA_VPD_LV_STATUS_UNSUPPORTED;
	}
	sense = c->err_info->SenseInfo;
	if (c->err_info->SenseLen > sizeof(c->err_info->SenseInfo))
@@ -3746,19 +3746,13 @@ static int hpsa_volume_offline(struct ctlr_info *h,
	cmd_status = c->err_info->CommandStatus;
	scsi_status = c->err_info->ScsiStatus;
	cmd_free(h, c);
	/* Is the volume 'not ready'? */
	if (cmd_status != CMD_TARGET_STATUS ||
		scsi_status != SAM_STAT_CHECK_CONDITION ||
		sense_key != NOT_READY ||
		asc != ASC_LUN_NOT_READY)  {
		return 0;
	}

	/* Determine the reason for not ready state */
	ldstat = hpsa_get_volume_status(h, scsi3addr);

	/* Keep volume offline in certain cases: */
	switch (ldstat) {
	case HPSA_LV_FAILED:
	case HPSA_LV_UNDERGOING_ERASE:
	case HPSA_LV_NOT_AVAILABLE:
	case HPSA_LV_UNDERGOING_RPI:
@@ -3780,7 +3774,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
	default:
		break;
	}
	return 0;
	return HPSA_LV_OK;
}

/*
@@ -3853,10 +3847,10 @@ static int hpsa_update_device_info(struct ctlr_info *h,
	/* Do an inquiry to the device to see what it is. */
	if (hpsa_scsi_do_inquiry(h, scsi3addr, 0, inq_buff,
		(unsigned char) OBDR_TAPE_INQ_SIZE) != 0) {
		/* Inquiry failed (msg printed already) */
		dev_err(&h->pdev->dev,
			"hpsa_update_device_info: inquiry failed\n");
		rc = -EIO;
			"%s: inquiry failed, device will be skipped.\n",
			__func__);
		rc = HPSA_INQUIRY_FAILED;
		goto bail_out;
	}

@@ -3885,15 +3879,19 @@ static int hpsa_update_device_info(struct ctlr_info *h,
	if ((this_device->devtype == TYPE_DISK ||
		this_device->devtype == TYPE_ZBC) &&
		is_logical_dev_addr_mode(scsi3addr)) {
		int volume_offline;
		unsigned char volume_offline;

		hpsa_get_raid_level(h, scsi3addr, &this_device->raid_level);
		if (h->fw_support & MISC_FW_RAID_OFFLOAD_BASIC)
			hpsa_get_ioaccel_status(h, scsi3addr, this_device);
		volume_offline = hpsa_volume_offline(h, scsi3addr);
		if (volume_offline < 0 || volume_offline > 0xff)
			volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
		this_device->volume_offline = volume_offline & 0xff;
		if (volume_offline == HPSA_LV_FAILED) {
			rc = HPSA_LV_FAILED;
			dev_err(&h->pdev->dev,
				"%s: LV failed, device will be skipped.\n",
				__func__);
			goto bail_out;
		}
	} else {
		this_device->raid_level = RAID_UNKNOWN;
		this_device->offload_config = 0;
@@ -4379,8 +4377,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
			goto out;
		}
		if (rc) {
			dev_warn(&h->pdev->dev,
				"Inquiry failed, skipping device.\n");
			h->drv_req_rescan = 1;
			continue;
		}

@@ -5558,7 +5555,7 @@ static void hpsa_scan_complete(struct ctlr_info *h)

	spin_lock_irqsave(&h->scan_lock, flags);
	h->scan_finished = 1;
	wake_up_all(&h->scan_wait_queue);
	wake_up(&h->scan_wait_queue);
	spin_unlock_irqrestore(&h->scan_lock, flags);
}

@@ -5576,11 +5573,23 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
	if (unlikely(lockup_detected(h)))
		return hpsa_scan_complete(h);

	/*
	 * If a scan is already waiting to run, no need to add another
	 */
	spin_lock_irqsave(&h->scan_lock, flags);
	if (h->scan_waiting) {
		spin_unlock_irqrestore(&h->scan_lock, flags);
		return;
	}

	spin_unlock_irqrestore(&h->scan_lock, flags);

	/* wait until any scan already in progress is finished. */
	while (1) {
		spin_lock_irqsave(&h->scan_lock, flags);
		if (h->scan_finished)
			break;
		h->scan_waiting = 1;
		spin_unlock_irqrestore(&h->scan_lock, flags);
		wait_event(h->scan_wait_queue, h->scan_finished);
		/* Note: We don't need to worry about a race between this
@@ -5590,6 +5599,7 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
		 */
	}
	h->scan_finished = 0; /* mark scan as in progress */
	h->scan_waiting = 0;
	spin_unlock_irqrestore(&h->scan_lock, flags);

	if (unlikely(lockup_detected(h)))
@@ -8792,6 +8802,7 @@ static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
	init_waitqueue_head(&h->event_sync_wait_queue);
	mutex_init(&h->reset_mutex);
	h->scan_finished = 1; /* no scan currently in progress */
	h->scan_waiting = 0;

	pci_set_drvdata(pdev, h);
	h->ndevices = 0;
+1 −0
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ struct ctlr_info {
	dma_addr_t		errinfo_pool_dhandle;
	unsigned long  		*cmd_pool_bits;
	int			scan_finished;
	u8			scan_waiting : 1;
	spinlock_t		scan_lock;
	wait_queue_head_t	scan_wait_queue;

+2 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@
#define CFGTBL_BusType_Fibre2G  0x00000200l

/* VPD Inquiry types */
#define HPSA_INQUIRY_FAILED		0x02
#define HPSA_VPD_SUPPORTED_PAGES        0x00
#define HPSA_VPD_LV_DEVICE_ID           0x83
#define HPSA_VPD_LV_DEVICE_GEOMETRY     0xC1
@@ -166,6 +167,7 @@
/* Logical volume states */
#define HPSA_VPD_LV_STATUS_UNSUPPORTED			0xff
#define HPSA_LV_OK                                      0x0
#define HPSA_LV_FAILED					0x01
#define HPSA_LV_NOT_AVAILABLE				0x0b
#define HPSA_LV_UNDERGOING_ERASE			0x0F
#define HPSA_LV_UNDERGOING_RPI				0x12
+2 −2
Original line number Diff line number Diff line
@@ -3315,9 +3315,9 @@ LPFC_ATTR_R(nvmet_mrq_post, LPFC_DEF_MRQ_POST,
 * lpfc_enable_fc4_type: Defines what FC4 types are supported.
 * Supported Values:  1 - register just FCP
 *                    3 - register both FCP and NVME
 * Supported values are [1,3]. Default value is 3
 * Supported values are [1,3]. Default value is 1
 */
LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_BOTH,
LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_FCP,
	    LPFC_ENABLE_FCP, LPFC_ENABLE_BOTH,
	    "Define fc4 type to register with fabric.");

Loading