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

Commit 90311148 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI updates from James Bottomley:
 "This is mostly updates of the usual suspects: lpfc, qla2xxx, bnx2fc,
  qedf, hpsa, hisi_sas, smartpqi, cxlflash, aacraid, csiostor along with
  a host of minor and miscellaneous changes"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (276 commits)
  qla2xxx: Fix NVMe entry_type for iocb packet on BE system
  scsi: qla2xxx: avoid unused-function warning
  scsi: snic: fix a couple of spelling mistakes/typos
  scsi: qla2xxx: fix a bunch of typos and spelling mistakes
  scsi: lpfc: don't double count abort errors
  scsi: lpfc: spin_lock_irq() is not nestable
  scsi: hisi_sas: optimise DMA slot memory
  scsi: ibmvfc: constify dev_pm_ops structures.
  scsi: ibmvscsi: constify dev_pm_ops structures.
  scsi: cxlflash: Update debug prints in reset handlers
  scsi: cxlflash: Update send_tmf() parameters
  scsi: cxlflash: Avoid double free of character device
  scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state
  scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.
  scsi: ufs: flush eh_work when eh_work scheduled.
  scsi: qla2xxx: Protect access to qpair members with qpair->qp_lock
  scsi: sun_esp: fix device reference leaks
  scsi: fnic: changing queue command to return result DID_IMM_RETRY when rport is init
  scsi: fnic: correct speed display and add support for 25,40 and 100G
  scsi: fnic: added timestamp reporting in fnic debug stats
  ...
parents 3a564bb3 c345c6ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ Code Seq#(hex) Include File Comments
0xB5	00-0F	uapi/linux/rpmsg.h	<mailto:linux-remoteproc@vger.kernel.org>
0xC0	00-0F	linux/usb/iowarrior.h
0xCA	00-0F	uapi/misc/cxl.h
0xCA	80-8F	uapi/scsi/cxlflash_ioctl.h
0xCA	80-BF	uapi/scsi/cxlflash_ioctl.h
0xCB	00-1F	CBM serial IEC bus	in development:
					<mailto:michael.klein@puffin.lb.shuttle.de>
0xCD	01	linux/reiserfs_fs.h
+74 −2
Original line number Diff line number Diff line
@@ -124,8 +124,8 @@ Block library API
    http://github.com/open-power/capiflash


CXL Flash Driver IOCTLs
=======================
CXL Flash Driver LUN IOCTLs
===========================

    Users, such as the block library, that wish to interface with a flash
    device (LUN) via user space access need to use the services provided
@@ -257,6 +257,12 @@ DK_CXLFLASH_VLUN_RESIZE
    operating in the virtual mode and used to program a LUN translation
    table that the AFU references when provided with a resource handle.

    This ioctl can return -EAGAIN if an AFU sync operation takes too long.
    In addition to returning a failure to user, cxlflash will also schedule
    an asynchronous AFU reset. Should the user choose to retry the operation,
    it is expected to succeed. If this ioctl fails with -EAGAIN, the user
    can either retry the operation or treat it as a failure.

DK_CXLFLASH_RELEASE
-------------------
    This ioctl is responsible for releasing a previously obtained
@@ -309,6 +315,12 @@ DK_CXLFLASH_VLUN_CLONE
    clone. This is to avoid a stale entry in the file descriptor table of the
    child process.

    This ioctl can return -EAGAIN if an AFU sync operation takes too long.
    In addition to returning a failure to user, cxlflash will also schedule
    an asynchronous AFU reset. Should the user choose to retry the operation,
    it is expected to succeed. If this ioctl fails with -EAGAIN, the user
    can either retry the operation or treat it as a failure.

DK_CXLFLASH_VERIFY
------------------
    This ioctl is used to detect various changes such as the capacity of
@@ -355,3 +367,63 @@ DK_CXLFLASH_MANAGE_LUN
    exclusive user space access (superpipe). In case a LUN is visible
    across multiple ports and adapters, this ioctl is used to uniquely
    identify each LUN by its World Wide Node Name (WWNN).


CXL Flash Driver Host IOCTLs
============================

    Each host adapter instance that is supported by the cxlflash driver
    has a special character device associated with it to enable a set of
    host management function. These character devices are hosted in a
    class dedicated for cxlflash and can be accessed via /dev/cxlflash/*.

    Applications can be written to perform various functions using the
    host ioctl APIs below.

    The structure definitions for these IOCTLs are available in:
    uapi/scsi/cxlflash_ioctl.h

HT_CXLFLASH_LUN_PROVISION
-------------------------
    This ioctl is used to create and delete persistent LUNs on cxlflash
    devices that lack an external LUN management interface. It is only
    valid when used with AFUs that support the LUN provision capability.

    When sufficient space is available, LUNs can be created by specifying
    the target port to host the LUN and a desired size in 4K blocks. Upon
    success, the LUN ID and WWID of the created LUN will be returned and
    the SCSI bus can be scanned to detect the change in LUN topology. Note
    that partial allocations are not supported. Should a creation fail due
    to a space issue, the target port can be queried for its current LUN
    geometry.

    To remove a LUN, the device must first be disassociated from the Linux
    SCSI subsystem. The LUN deletion can then be initiated by specifying a
    target port and LUN ID. Upon success, the LUN geometry associated with
    the port will be updated to reflect new number of provisioned LUNs and
    available capacity.

    To query the LUN geometry of a port, the target port is specified and
    upon success, the following information is presented:

        - Maximum number of provisioned LUNs allowed for the port
        - Current number of provisioned LUNs for the port
        - Maximum total capacity of provisioned LUNs for the port (4K blocks)
        - Current total capacity of provisioned LUNs for the port (4K blocks)

    With this information, the number of available LUNs and capacity can be
    can be calculated.

HT_CXLFLASH_AFU_DEBUG
---------------------
    This ioctl is used to debug AFUs by supporting a command pass-through
    interface. It is only valid when used with AFUs that support the AFU
    debug capability.

    With exception of buffer management, AFU debug commands are opaque to
    cxlflash and treated as pass-through. For debug commands that do require
    data transfer, the user supplies an adequately sized data buffer and must
    specify the data transfer direction with respect to the host. There is a
    maximum transfer size of 256K imposed. Note that partial read completions
    are not supported - when errors are experienced with a host read data
    transfer, the data buffer is not copied back to the user.
+0 −1
Original line number Diff line number Diff line
@@ -332,7 +332,6 @@ static struct vmbus_channel *alloc_channel(void)
	if (!channel)
		return NULL;

	spin_lock_init(&channel->inbound_lock);
	spin_lock_init(&channel->lock);

	INIT_LIST_HEAD(&channel->sc_list);
+10 −4
Original line number Diff line number Diff line
@@ -375,6 +375,7 @@ int enclosure_add_device(struct enclosure_device *edev, int component,
			 struct device *dev)
{
	struct enclosure_component *cdev;
	int err;

	if (!edev || component >= edev->components)
		return -EINVAL;
@@ -384,12 +385,17 @@ int enclosure_add_device(struct enclosure_device *edev, int component,
	if (cdev->dev == dev)
		return -EEXIST;

	if (cdev->dev)
	if (cdev->dev) {
		enclosure_remove_links(cdev);

		put_device(cdev->dev);
	}
	cdev->dev = get_device(dev);
	return enclosure_add_links(cdev);
	err = enclosure_add_links(cdev);
	if (err) {
		put_device(cdev->dev);
		cdev->dev = NULL;
	}
	return err;
}
EXPORT_SYMBOL_GPL(enclosure_add_device);

+4 −4
Original line number Diff line number Diff line
@@ -296,8 +296,8 @@ NCR_700_detect(struct scsi_host_template *tpnt,
	if(tpnt->sdev_attrs == NULL)
		tpnt->sdev_attrs = NCR_700_dev_attrs;

	memory = dma_alloc_noncoherent(hostdata->dev, TOTAL_MEM_SIZE,
				       &pScript, GFP_KERNEL);
	memory = dma_alloc_attrs(hostdata->dev, TOTAL_MEM_SIZE, &pScript,
				 GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
	if(memory == NULL) {
		printk(KERN_ERR "53c700: Failed to allocate memory for driver, detaching\n");
		return NULL;
@@ -410,8 +410,8 @@ NCR_700_release(struct Scsi_Host *host)
	struct NCR_700_Host_Parameters *hostdata = 
		(struct NCR_700_Host_Parameters *)host->hostdata[0];

	dma_free_noncoherent(hostdata->dev, TOTAL_MEM_SIZE,
			       hostdata->script, hostdata->pScript);
	dma_free_attrs(hostdata->dev, TOTAL_MEM_SIZE, hostdata->script,
		       hostdata->pScript, DMA_ATTR_NON_CONSISTENT);
	return 1;
}

Loading