projects/linux·commit 84cbd722

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

84cbd722 · Linus Torvalds <[email protected]> · 2013-07-04 12:30:30 -07:00

Pull first round of SCSI updates from James Bottomley:
 "The patch set is mostly driver updates (usf, zfcp, lpfc, mpt2sas,
  megaraid_sas, bfa, ipr) and a few bug fixes.  Also of note is that the
  Buslogic driver has been rewritten to a better coding style and 64 bit
  support added.  We also removed the libsas limitation on 16 bytes for
  the command size (currently no drivers make use of this)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (101 commits)
  [SCSI] megaraid: minor cut and paste error fixed.
  [SCSI] ufshcd-pltfrm: remove unnecessary dma_set_coherent_mask() call
  [SCSI] ufs: fix register address in UIC error interrupt handling
  [SCSI] ufshcd-pltfrm: add missing empty slot in ufs_of_match[]
  [SCSI] ufs: use devres functions for ufshcd
  [SCSI] ufs: Fix the response UPIU length setting
  [SCSI] ufs: rework link start-up process
  [SCSI] ufs: remove version check before IS reg clear
  [SCSI] ufs: amend interrupt configuration
  [SCSI] ufs: wrap the i/o access operations
  [SCSI] storvsc: Update the storage protocol to win8 level
  [SCSI] storvsc: Increase the value of scsi timeout for storvsc devices
  [SCSI] MAINTAINERS: Add myself as the maintainer for BusLogic SCSI driver
  [SCSI] BusLogic: Port driver to 64-bit.
  [SCSI] BusLogic: Fix style issues
  [SCSI] libiscsi: Added new boot entries in the session sysfs
  [SCSI] aacraid: Fix for arrays are going offline in the system. System hangs
  [SCSI] ipr: IOA Status Code(IOASC) update
  [SCSI] sd: Update WRITE SAME heuristics
  [SCSI] fnic: potential dead lock in fnic_is_abts_pending()
  ...
Commit
84cbd7222b2b00dcddef3103203986b3d59c836a
Parents
80cc38b1 · a3fda7dd

Merge commit. Changes below are compared with the first parent: 80cc38b1.

Changes

112 files changed · +7529 −5155

FileStatusAddDelContent
Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txtadded+16−0View file
Documentation/scsi/ChangeLog.megaraid_sasmodified+22−0View file
MAINTAINERSmodified+7−0View file
drivers/s390/scsi/Makefilemodified+1−1View file
drivers/s390/scsi/zfcp_aux.cmodified+5−31View file
drivers/s390/scsi/zfcp_ccw.cmodified+2−11View file
drivers/s390/scsi/zfcp_cfdc.cdeleted+0−446View before deletion
drivers/s390/scsi/zfcp_dbf.cmodified+9−2View file
drivers/s390/scsi/zfcp_def.hmodified+0−4View file
drivers/s390/scsi/zfcp_erp.cmodified+1−2View file
drivers/s390/scsi/zfcp_ext.hmodified+2−18View file
drivers/s390/scsi/zfcp_fc.cmodified+1−1View file
drivers/s390/scsi/zfcp_fsf.cmodified+33−121View file
drivers/s390/scsi/zfcp_fsf.hmodified+0−26View file
drivers/s390/scsi/zfcp_scsi.cmodified+7−3View file
drivers/s390/scsi/zfcp_sysfs.cmodified+11−16View file
drivers/s390/scsi/zfcp_unit.cmodified+2−7View file
drivers/scsi/3w-xxxx.cmodified+3−1View file
drivers/scsi/BusLogic.cmodified+2362−2090View file
drivers/scsi/BusLogic.hmodified+729−758View file
drivers/scsi/FlashPoint.cmodified+285−341View file
drivers/scsi/Kconfigmodified+1−1View file
drivers/scsi/aacraid/src.cmodified+3−0View file
drivers/scsi/aic94xx/aic94xx_task.cmodified+2−1View file
drivers/scsi/bfa/bfa_core.cmodified+1−2View file
drivers/scsi/bfa/bfa_defs.hmodified+89−14View file
drivers/scsi/bfa/bfa_defs_svc.hmodified+66−11View file
drivers/scsi/bfa/bfa_fc.hmodified+15−0View file
drivers/scsi/bfa/bfa_fcpim.cmodified+1−1View file
drivers/scsi/bfa/bfa_fcs.cmodified+6−56View file
drivers/scsi/bfa/bfa_fcs.hmodified+23−11View file
drivers/scsi/bfa/bfa_fcs_lport.cmodified+207−2View file
drivers/scsi/bfa/bfa_fcs_rport.cmodified+6−5View file
drivers/scsi/bfa/bfa_ioc.cmodified+48−26View file
drivers/scsi/bfa/bfa_ioc.hmodified+8−1View file
drivers/scsi/bfa/bfa_ioc_cb.cmodified+79−7View file
drivers/scsi/bfa/bfa_ioc_ct.cmodified+46−0View file
drivers/scsi/bfa/bfa_svc.cmodified+649−51View file
drivers/scsi/bfa/bfa_svc.hmodified+24−10View file
drivers/scsi/bfa/bfad.cmodified+11−3View file
drivers/scsi/bfa/bfad_attr.cmodified+7−26View file
drivers/scsi/bfa/bfad_bsg.cmodified+100−37View file
drivers/scsi/bfa/bfad_bsg.hmodified+40−12View file
drivers/scsi/bfa/bfad_drv.hmodified+1−1View file
drivers/scsi/bfa/bfad_im.cmodified+6−4View file
drivers/scsi/bfa/bfi.hmodified+72−6View file
drivers/scsi/bfa/bfi_ms.hmodified+2−3View file
drivers/scsi/csiostor/csio_hw.cmodified+0−91View file
drivers/scsi/csiostor/csio_hw.hmodified+0−11View file
drivers/scsi/csiostor/csio_mb.cmodified+0−77View file
drivers/scsi/csiostor/csio_mb.hmodified+0−11View file
drivers/scsi/csiostor/csio_scsi.cmodified+2−2View file
drivers/scsi/cxgbi/cxgb4i/cxgb4i.cmodified+128−31View file
drivers/scsi/fnic/fnic_scsi.cmodified+2−4View file
drivers/scsi/ipr.cmodified+48−9View file
drivers/scsi/isci/request.cmodified+2−2View file
drivers/scsi/libiscsi.cmodified+18−0View file
drivers/scsi/libsas/sas_scsi_host.cmodified+1−1View file
drivers/scsi/lpfc/lpfc.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_attr.cmodified+20−3View file
drivers/scsi/lpfc/lpfc_bsg.cmodified+2−2View file
drivers/scsi/lpfc/lpfc_crtn.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_ct.cmodified+1−1View file
drivers/scsi/lpfc/lpfc_els.cmodified+1−1View file
drivers/scsi/lpfc/lpfc_hbadisc.cmodified+35−3View file
drivers/scsi/lpfc/lpfc_hw.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_hw4.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_init.cmodified+59−70View file
drivers/scsi/lpfc/lpfc_mbox.cmodified+1−1View file
drivers/scsi/lpfc/lpfc_nportdisc.cmodified+1−1View file
drivers/scsi/lpfc/lpfc_scsi.cmodified+71−54View file
drivers/scsi/lpfc/lpfc_scsi.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_sli.cmodified+20−32View file
drivers/scsi/lpfc/lpfc_sli4.hmodified+1−2View file
drivers/scsi/lpfc/lpfc_version.hmodified+3−3View file
drivers/scsi/megaraid/megaraid_sas.hmodified+177−9View file
drivers/scsi/megaraid/megaraid_sas_base.cmodified+166−60View file
drivers/scsi/megaraid/megaraid_sas_fp.cmodified+739−45View file
drivers/scsi/megaraid/megaraid_sas_fusion.cmodified+127−21View file
drivers/scsi/megaraid/megaraid_sas_fusion.hmodified+33−2View file
drivers/scsi/mpt2sas/mpi/mpi2.hmodified+4−2View file
drivers/scsi/mpt2sas/mpi/mpi2_init.hmodified+3−1View file
drivers/scsi/mpt2sas/mpi/mpi2_ioc.hmodified+6−2View file
drivers/scsi/mpt2sas/mpi/mpi2_raid.hmodified+7−2View file
drivers/scsi/mpt2sas/mpi/mpi2_tool.hmodified+6−4View file
drivers/scsi/mpt2sas/mpt2sas_base.cmodified+30−29View file
drivers/scsi/mpt2sas/mpt2sas_base.hmodified+5−2View file
drivers/scsi/mpt2sas/mpt2sas_scsih.cmodified+129−14View file
drivers/scsi/mvsas/mv_sas.cmodified+2−1View file
drivers/scsi/pm8001/pm8001_hwi.cmodified+3−2View file
drivers/scsi/pm8001/pm80xx_hwi.cmodified+11−10View file
drivers/scsi/scsi.cmodified+4−4View file
drivers/scsi/scsi_devinfo.cmodified+1−0View file
drivers/scsi/scsi_error.cmodified+3−4View file
drivers/scsi/scsi_scan.cmodified+5−0View file
drivers/scsi/scsi_sysfs.cmodified+30−0View file
drivers/scsi/scsi_transport_iscsi.cmodified+12−0View file
drivers/scsi/sd.cmodified+58−19View file
drivers/scsi/sd.hmodified+1−0View file
drivers/scsi/storvsc_drv.cmodified+175−35View file
drivers/scsi/ufs/Kconfigmodified+1−1View file
drivers/scsi/ufs/ufshcd-pci.cmodified+0−1View file
drivers/scsi/ufs/ufshcd-pltfrm.cmodified+19−57View file
drivers/scsi/ufs/ufshcd.cmodified+305−232View file
drivers/scsi/ufs/ufshcd.hmodified+15−6View file
drivers/scsi/ufs/ufshci.hmodified+3−2View file
include/scsi/iscsi_if.hmodified+5−0View file
include/scsi/libiscsi.hmodified+4−0View file
include/scsi/libsas.hmodified+1−1View file
include/scsi/scsi.hmodified+5−0View file
include/scsi/scsi_device.hmodified+1−0View file
include/scsi/scsi_devinfo.hmodified+1−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt

View file
diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
new file mode 100644
index 0000000..20468b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
@@ -0,0 +1,16 @@
+* Universal Flash Storage (UFS) Host Controller
+
+UFSHC nodes are defined to describe on-chip UFS host controllers.
+Each UFS controller instance should have its own node.
+
+Required properties:
+- compatible : compatible list, contains "jedec,ufs-1.1"
+- interrupts : <interrupt mapping for UFS host controller IRQ>
+- reg : <registers mapping>
+
+Example:
+ ufshc@0xfc598000 {
+ compatible = "jedec,ufs-1.1";
+ reg = <0xfc598000 0x800>;
+ interrupts = <0 28 0>;
+ };

Documentation/scsi/ChangeLog.megaraid_sas

View file
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 09673c7..cc92ca8 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,25 @@
+Release Date : Wed. May 15, 2013 17:00:00 PST 2013 -
+ (emaild-id:[email protected])
+ Adam Radford
+ Kashyap Desai
+ Sumit Saxena
+Current Version : 06.600.18.00-rc1
+Old Version : 06.506.00.00-rc1
+ 1. Return DID_ERROR for scsi io, when controller is in critical h/w error.
+ 2. Fix the interrupt mask for Gen2 controller.
+ 3. Update balance count in driver to be in sync of firmware.
+ 4. Free event detail memory without device ID check.
+ 5. Set IO request timeout value provided by OS timeout for Tape devices.
+ 6. Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers.
+ 7. Add support to display Customer branding details in syslog.
+ 8. Set IoFlags to enable Fast Path for JBODs for Invader/Fury(12 Gb/s)
+ controllers.
+ 9. Add support for Extended MSI-x vectors for Invader and Fury(12Gb/s
+ HBA).
+ 10.Add support for Uneven Span PRL11.
+ 11.Add support to differentiate between iMR and MR Firmware.
+ 12.Version and Changelog update.
+-------------------------------------------------------------------------------
Release Date : Sat. Feb 9, 2013 17:00:00 PST 2013 -
(emaild-id:[email protected])
Adam Radford

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 6573083..28ffeec 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1876,6 +1876,13 @@ S: Odd fixes
F: Documentation/video4linux/bttv/
F: drivers/media/pci/bt8xx/bttv*
+BUSLOGIC SCSI DRIVER
+M: Khalid Aziz <[email protected]>
+S: Maintained
+F: drivers/scsi/BusLogic.*
+F: drivers/scsi/FlashPoint.*
+
C-MEDIA CMI8788 DRIVER
M: Clemens Ladisch <[email protected]>
L: [email protected] (moderated for non-subscribers)

drivers/s390/scsi/Makefile

View file
diff --git a/drivers/s390/scsi/Makefile b/drivers/s390/scsi/Makefile
index c454ffe..9259039 100644
--- a/drivers/s390/scsi/Makefile
+++ b/drivers/s390/scsi/Makefile
@@ -2,7 +2,7 @@
# Makefile for the S/390 specific device drivers
#
-zfcp-objs := zfcp_aux.o zfcp_ccw.o zfcp_cfdc.o zfcp_dbf.o zfcp_erp.o \
+zfcp-objs := zfcp_aux.o zfcp_ccw.o zfcp_dbf.o zfcp_erp.o \
zfcp_fc.o zfcp_fsf.o zfcp_qdio.o zfcp_scsi.o zfcp_sysfs.o \
zfcp_unit.o

drivers/s390/scsi/zfcp_aux.c

View file
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index f6adde4..1b9e4ae 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -3,7 +3,7 @@
*
* Module interface and handling of zfcp data structures.
*
- * Copyright IBM Corp. 2002, 2010
+ * Copyright IBM Corp. 2002, 2013
*/
/*
@@ -23,6 +23,7 @@
* Christof Schmitt
* Martin Petermann
* Sven Schuetz
+ * Steffen Maier
*/
#define KMSG_COMPONENT "zfcp"
@@ -140,13 +141,6 @@ static int __init zfcp_module_init(void)
scsi_transport_reserve_device(zfcp_scsi_transport_template,
sizeof(struct zfcp_scsi_dev));
-
- retval = misc_register(&zfcp_cfdc_misc);
- if (retval) {
- pr_err("Registering the misc device zfcp_cfdc failed\n");
- goto out_misc;
- }
-
retval = ccw_driver_register(&zfcp_ccw_driver);
if (retval) {
pr_err("The zfcp device driver could not register with "
@@ -159,8 +153,6 @@ static int __init zfcp_module_init(void)
return 0;
out_ccw_register:
- misc_deregister(&zfcp_cfdc_misc);
-out_misc:
fc_release_transport(zfcp_scsi_transport_template);
out_transport:
kmem_cache_destroy(zfcp_fc_req_cache);
@@ -175,7 +167,6 @@ module_init(zfcp_module_init);
static void __exit zfcp_module_exit(void)
{
ccw_driver_unregister(&zfcp_ccw_driver);
- misc_deregister(&zfcp_cfdc_misc);
fc_release_transport(zfcp_scsi_transport_template);
kmem_cache_destroy(zfcp_fc_req_cache);
kmem_cache_destroy(zfcp_fsf_qtcb_cache);
@@ -415,6 +406,8 @@ struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *ccw_device)
adapter->dma_parms.max_segment_size = ZFCP_QDIO_SBALE_LEN;
adapter->ccw_device->dev.dma_parms = &adapter->dma_parms;
+ adapter->stat_read_buf_num = FSF_STATUS_READS_RECOM;
+
if (!zfcp_scsi_adapter_register(adapter))
return adapter;
@@ -464,20 +457,6 @@ void zfcp_adapter_release(struct kref *ref)
put_device(&cdev->dev);
}
-/**
- * zfcp_device_unregister - remove port, unit from system
- * @dev: reference to device which is to be removed
- * @grp: related reference to attribute group
- *
- * Helper function to unregister port, unit from system
- */
-void zfcp_device_unregister(struct device *dev,
- const struct attribute_group *grp)
-{
- sysfs_remove_group(&dev->kobj, grp);
- device_unregister(dev);
-}
-
static void zfcp_port_release(struct device *dev)
{
struct zfcp_port *port = container_of(dev, struct zfcp_port, dev);
@@ -530,6 +509,7 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
port->wwpn = wwpn;
port->rport_task = RPORT_NONE;
port->dev.parent = &adapter->ccw_device->dev;
+ port->dev.groups = zfcp_port_attr_groups;
port->dev.release = zfcp_port_release;
if (dev_set_name(&port->dev, "0x%016llx", (unsigned long long)wwpn)) {
@@ -543,10 +523,6 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
goto err_out;
}
- if (sysfs_create_group(&port->dev.kobj,
- &zfcp_sysfs_port_attrs))
- goto err_out_put;
-
write_lock_irq(&adapter->port_list_lock);
list_add_tail(&port->list, &adapter->port_list);
write_unlock_irq(&adapter->port_list_lock);
@@ -555,8 +531,6 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
return port;
-err_out_put:
- device_unregister(&port->dev);
err_out:
zfcp_ccw_adapter_put(adapter);
return ERR_PTR(retval);

drivers/s390/scsi/zfcp_ccw.c

View file
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index f2dd3a0..f9879d4 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -72,15 +72,6 @@ static struct ccw_device_id zfcp_ccw_device_id[] = {
MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id);
/**
- * zfcp_ccw_priv_sch - check if subchannel is privileged
- * @adapter: Adapter/Subchannel to check
- */
-int zfcp_ccw_priv_sch(struct zfcp_adapter *adapter)
-{
- return adapter->ccw_device->id.dev_model == ZFCP_MODEL_PRIV;
-}
-
-/**
* zfcp_ccw_probe - probe function of zfcp driver
* @cdev: pointer to belonging ccw device
*
@@ -129,10 +120,10 @@ static void zfcp_ccw_remove(struct ccw_device *cdev)
zfcp_ccw_adapter_put(adapter); /* put from zfcp_ccw_adapter_by_cdev */
list_for_each_entry_safe(unit, u, &unit_remove_lh, list)
- zfcp_device_unregister(&unit->dev, &zfcp_sysfs_unit_attrs);
+ device_unregister(&unit->dev);
list_for_each_entry_safe(port, p, &port_remove_lh, list)
- zfcp_device_unregister(&port->dev, &zfcp_sysfs_port_attrs);
+ device_unregister(&port->dev);
zfcp_adapter_unregister(adapter);
}

drivers/s390/scsi/zfcp_cfdc.c

View before deletion
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c
deleted file mode 100644
index 49b82e4..0000000
--- a/drivers/s390/scsi/zfcp_cfdc.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * zfcp device driver
- *
- * Userspace interface for accessing the
- * Access Control Lists / Control File Data Channel;
- * handling of response code and states for ports and LUNs.
- *
- * Copyright IBM Corp. 2008, 2010
- */
-
-#define KMSG_COMPONENT "zfcp"
-#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
-
-#include <linux/compat.h>
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/miscdevice.h>
-#include <asm/compat.h>
-#include <asm/ccwdev.h>
-#include "zfcp_def.h"
-#include "zfcp_ext.h"
-#include "zfcp_fsf.h"
-
-#define ZFCP_CFDC_CMND_DOWNLOAD_NORMAL 0x00010001
-#define ZFCP_CFDC_CMND_DOWNLOAD_FORCE 0x00010101
-#define ZFCP_CFDC_CMND_FULL_ACCESS 0x00000201
-#define ZFCP_CFDC_CMND_RESTRICTED_ACCESS 0x00000401
-#define ZFCP_CFDC_CMND_UPLOAD 0x00010002
-
-#define ZFCP_CFDC_DOWNLOAD 0x00000001
-#define ZFCP_CFDC_UPLOAD 0x00000002
-#define ZFCP_CFDC_WITH_CONTROL_FILE 0x00010000
-
-#define ZFCP_CFDC_IOC_MAGIC 0xDD
-#define ZFCP_CFDC_IOC \
- _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_data)
-
-/**
- * struct zfcp_cfdc_data - data for ioctl cfdc interface
- * @signature: request signature
- * @devno: FCP adapter device number
- * @command: command code
- * @fsf_status: returns status of FSF command to userspace
- * @fsf_status_qual: returned to userspace
- * @payloads: access conflicts list
- * @control_file: access control table
- */
-struct zfcp_cfdc_data {
- u32 signature;
- u32 devno;
- u32 command;
- u32 fsf_status;
- u8 fsf_status_qual[FSF_STATUS_QUALIFIER_SIZE];
- u8 payloads[256];
- u8 control_file[0];
-};
-
-static int zfcp_cfdc_copy_from_user(struct scatterlist *sg,
- void __user *user_buffer)
-{
- unsigned int length;
- unsigned int size = ZFCP_CFDC_MAX_SIZE;
-
- while (size) {
- length = min((unsigned int)size, sg->length);
- if (copy_from_user(sg_virt(sg++), user_buffer, length))
- return -EFAULT;
- user_buffer += length;
- size -= length;
- }
- return 0;
-}
-
-static int zfcp_cfdc_copy_to_user(void __user *user_buffer,
- struct scatterlist *sg)
-{
- unsigned int length;
- unsigned int size = ZFCP_CFDC_MAX_SIZE;
-
- while (size) {
- length = min((unsigned int) size, sg->length);
- if (copy_to_user(user_buffer, sg_virt(sg++), length))
- return -EFAULT;
- user_buffer += length;
- size -= length;
- }
- return 0;
-}
-
-static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno)
-{
- char busid[9];
- struct ccw_device *cdev;
- struct zfcp_adapter *adapter;
-
- snprintf(busid, sizeof(busid), "0.0.%04x", devno);
- cdev = get_ccwdev_by_busid(&zfcp_ccw_driver, busid);
- if (!cdev)
- return NULL;
-
- adapter = zfcp_ccw_adapter_by_cdev(cdev);
-
- put_device(&cdev->dev);
- return adapter;
-}
-
-static int zfcp_cfdc_set_fsf(struct zfcp_fsf_cfdc *fsf_cfdc, int command)
-{
- switch (command) {
- case ZFCP_CFDC_CMND_DOWNLOAD_NORMAL:
- fsf_cfdc->command = FSF_QTCB_DOWNLOAD_CONTROL_FILE;
- fsf_cfdc->option = FSF_CFDC_OPTION_NORMAL_MODE;
- break;
- case ZFCP_CFDC_CMND_DOWNLOAD_FORCE:
- fsf_cfdc->command = FSF_QTCB_DOWNLOAD_CONTROL_FILE;
- fsf_cfdc->option = FSF_CFDC_OPTION_FORCE;
- break;
- case ZFCP_CFDC_CMND_FULL_ACCESS:
- fsf_cfdc->command = FSF_QTCB_DOWNLOAD_CONTROL_FILE;
- fsf_cfdc->option = FSF_CFDC_OPTION_FULL_ACCESS;
- break;
- case ZFCP_CFDC_CMND_RESTRICTED_ACCESS:
- fsf_cfdc->command = FSF_QTCB_DOWNLOAD_CONTROL_FILE;
- fsf_cfdc->option = FSF_CFDC_OPTION_RESTRICTED_ACCESS;
- break;
- case ZFCP_CFDC_CMND_UPLOAD:
- fsf_cfdc->command = FSF_QTCB_UPLOAD_CONTROL_FILE;
- fsf_cfdc->option = 0;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int zfcp_cfdc_sg_setup(int command, struct scatterlist *sg,
- u8 __user *control_file)
-{
- int retval;
- retval = zfcp_sg_setup_table(sg, ZFCP_CFDC_PAGES);
- if (retval)
- return retval;
-
- sg[ZFCP_CFDC_PAGES - 1].length = ZFCP_CFDC_MAX_SIZE % PAGE_SIZE;
-
- if (command & ZFCP_CFDC_WITH_CONTROL_FILE &&
- command & ZFCP_CFDC_DOWNLOAD) {
- retval = zfcp_cfdc_copy_from_user(sg, control_file);
- if (retval) {
- zfcp_sg_free_table(sg, ZFCP_CFDC_PAGES);
- return -EFAULT;
- }
- }
-
- return 0;
-}
-
-static void zfcp_cfdc_req_to_sense(struct zfcp_cfdc_data *data,
- struct zfcp_fsf_req *req)
-{
- data->fsf_status = req->qtcb->header.fsf_status;
- memcpy(&data->fsf_status_qual, &req->qtcb->header.fsf_status_qual,
- sizeof(union fsf_status_qual));
- memcpy(&data->payloads, &req->qtcb->bottom.support.els,
- sizeof(req->qtcb->bottom.support.els));
-}
-
-static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command,
- unsigned long arg)
-{
- struct zfcp_cfdc_data *data;
- struct zfcp_cfdc_data __user *data_user;
- struct zfcp_adapter *adapter;
- struct zfcp_fsf_req *req;
- struct zfcp_fsf_cfdc *fsf_cfdc;
- int retval;
-
- if (command != ZFCP_CFDC_IOC)
- return -ENOTTY;
-
- if (is_compat_task())
- data_user = compat_ptr(arg);
- else
- data_user = (void __user *)arg;
-
- if (!data_user)
- return -EINVAL;
-
- fsf_cfdc = kmalloc(sizeof(struct zfcp_fsf_cfdc), GFP_KERNEL);
- if (!fsf_cfdc)
- return -ENOMEM;
-
- data = memdup_user(data_user, sizeof(*data_user));
- if (IS_ERR(data)) {
- retval = PTR_ERR(data);
- goto no_mem_sense;
- }
-
- if (data->signature != 0xCFDCACDF) {
- retval = -EINVAL;
- goto free_buffer;
- }
-
- retval = zfcp_cfdc_set_fsf(fsf_cfdc, data->command);
-
- adapter = zfcp_cfdc_get_adapter(data->devno);
- if (!adapter) {
- retval = -ENXIO;
- goto free_buffer;
- }
-
- retval = zfcp_cfdc_sg_setup(data->command, fsf_cfdc->sg,
- data_user->control_file);
- if (retval)
- goto adapter_put;
- req = zfcp_fsf_control_file(adapter, fsf_cfdc);
- if (IS_ERR(req)) {
- retval = PTR_ERR(req);
- goto free_sg;
- }
-
- if (req->status & ZFCP_STATUS_FSFREQ_ERROR) {
- retval = -ENXIO;
- goto free_fsf;
- }
-
- zfcp_cfdc_req_to_sense(data, req);
- retval = copy_to_user(data_user, data, sizeof(*data_user));
- if (retval) {
- retval = -EFAULT;
- goto free_fsf;
- }
-
- if (data->command & ZFCP_CFDC_UPLOAD)
- retval = zfcp_cfdc_copy_to_user(&data_user->control_file,
- fsf_cfdc->sg);
-
- free_fsf:
- zfcp_fsf_req_free(req);
- free_sg:
- zfcp_sg_free_table(fsf_cfdc->sg, ZFCP_CFDC_PAGES);
- adapter_put:
- zfcp_ccw_adapter_put(adapter);
- free_buffer:
- kfree(data);
- no_mem_sense:
- kfree(fsf_cfdc);
- return retval;
-}
-
-static const struct file_operations zfcp_cfdc_fops = {
- .open = nonseekable_open,
- .unlocked_ioctl = zfcp_cfdc_dev_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = zfcp_cfdc_dev_ioctl,
-#endif
- .llseek = no_llseek,
-};
-
-struct miscdevice zfcp_cfdc_misc = {
- .minor = MISC_DYNAMIC_MINOR,
- .name = "zfcp_cfdc",
- .fops = &zfcp_cfdc_fops,
-};
-
-/**
- * zfcp_cfdc_adapter_access_changed - Process change in adapter ACT
- * @adapter: Adapter where the Access Control Table (ACT) changed
- *
- * After a change in the adapter ACT, check if access to any
- * previously denied resources is now possible.
- */
-void zfcp_cfdc_adapter_access_changed(struct zfcp_adapter *adapter)
-{
- unsigned long flags;
- struct zfcp_port *port;
- struct scsi_device *sdev;
- struct zfcp_scsi_dev *zfcp_sdev;
- int status;
-
- if (adapter->connection_features & FSF_FEATURE_NPIV_MODE)
- return;
-
- read_lock_irqsave(&adapter->port_list_lock, flags);
- list_for_each_entry(port, &adapter->port_list, list) {
- status = atomic_read(&port->status);
- if ((status & ZFCP_STATUS_COMMON_ACCESS_DENIED) ||
- (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
- zfcp_erp_port_reopen(port,
- ZFCP_STATUS_COMMON_ERP_FAILED,
- "cfaac_1");
- }
- read_unlock_irqrestore(&adapter->port_list_lock, flags);
-
- shost_for_each_device(sdev, adapter->scsi_host) {
- zfcp_sdev = sdev_to_zfcp(sdev);
- status = atomic_read(&zfcp_sdev->status);
- if ((status & ZFCP_STATUS_COMMON_ACCESS_DENIED) ||
- (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
- zfcp_erp_lun_reopen(sdev,
- ZFCP_STATUS_COMMON_ERP_FAILED,
- "cfaac_2");
- }
-}
-
-static void zfcp_act_eval_err(struct zfcp_adapter *adapter, u32 table)
-{
- u16 subtable = table >> 16;
- u16 rule = table & 0xffff;
- const char *act_type[] = { "unknown", "OS", "WWPN", "DID", "LUN" };
-
- if (subtable && subtable < ARRAY_SIZE(act_type))
- dev_warn(&adapter->ccw_device->dev,
- "Access denied according to ACT rule type %s, "
- "rule %d\n", act_type[subtable], rule);
-}
-
-/**
- * zfcp_cfdc_port_denied - Process "access denied" for port
- * @port: The port where the access has been denied
- * @qual: The FSF status qualifier for the access denied FSF status
- */
-void zfcp_cfdc_port_denied(struct zfcp_port *port,
- union fsf_status_qual *qual)
-{
- dev_warn(&port->adapter->ccw_device->dev,
- "Access denied to port 0x%016Lx\n",
- (unsigned long long)port->wwpn);
-
- zfcp_act_eval_err(port->adapter, qual->halfword[0]);
- zfcp_act_eval_err(port->adapter, qual->halfword[1]);
- zfcp_erp_set_port_status(port,
- ZFCP_STATUS_COMMON_ERP_FAILED |
- ZFCP_STATUS_COMMON_ACCESS_DENIED);
-}
-
-/**
- * zfcp_cfdc_lun_denied - Process "access denied" for LUN
- * @sdev: The SCSI device / LUN where the access has been denied
- * @qual: The FSF status qualifier for the access denied FSF status
- */
-void zfcp_cfdc_lun_denied(struct scsi_device *sdev,
- union fsf_status_qual *qual)
-{
- struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
-
- dev_warn(&zfcp_sdev->port->adapter->ccw_device->dev,
- "Access denied to LUN 0x%016Lx on port 0x%016Lx\n",
- zfcp_scsi_dev_lun(sdev),
- (unsigned long long)zfcp_sdev->port->wwpn);
- zfcp_act_eval_err(zfcp_sdev->port->adapter, qual->halfword[0]);
- zfcp_act_eval_err(zfcp_sdev->port->adapter, qual->halfword[1]);
- zfcp_erp_set_lun_status(sdev,
- ZFCP_STATUS_COMMON_ERP_FAILED |
- ZFCP_STATUS_COMMON_ACCESS_DENIED);
-
- atomic_clear_mask(ZFCP_STATUS_LUN_SHARED, &zfcp_sdev->status);
- atomic_clear_mask(ZFCP_STATUS_LUN_READONLY, &zfcp_sdev->status);
-}
-
-/**
- * zfcp_cfdc_lun_shrng_vltn - Evaluate LUN sharing violation status
- * @sdev: The LUN / SCSI device where sharing violation occurred
- * @qual: The FSF status qualifier from the LUN sharing violation
- */
-void zfcp_cfdc_lun_shrng_vltn(struct scsi_device *sdev,
- union fsf_status_qual *qual)

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_dbf.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_def.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_erp.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_ext.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_fc.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_fsf.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_fsf.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_unit.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/3w-xxxx.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/BusLogic.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/BusLogic.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/FlashPoint.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aacraid/src.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_task.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_defs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_defs_svc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcpim.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs_lport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs_rport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc_cb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_ioc_ct.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_svc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_svc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_attr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_bsg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_bsg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_drv.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_im.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfi_ms.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/csiostor/csio_hw.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/csiostor/csio_hw.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/csiostor/csio_mb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/csiostor/csio_mb.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/csiostor/csio_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/cxgbi/cxgb4i/cxgb4i.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fnic/fnic_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ipr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/request.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libiscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libsas/sas_scsi_host.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_attr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_bsg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_crtn.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_ct.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_els.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hbadisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hw.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hw4.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_mbox.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_nportdisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_scsi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_sli.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_sli4.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_version.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_fp.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_fusion.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_fusion.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_init.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_ioc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_raid.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_tool.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_base.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_scsih.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mvsas/mv_sas.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pm8001/pm8001_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pm8001/pm80xx_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_devinfo.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_error.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_scan.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_transport_iscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sd.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sd.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/storvsc_drv.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/ufshcd-pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/ufshcd-pltfrm.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/ufshcd.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/ufshcd.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/ufshci.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/iscsi_if.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/libiscsi.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/libsas.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/scsi.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/scsi_device.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/scsi_devinfo.h

View file

This diff is incomplete. Download the complete patch.