aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-03-28[SCSI] libfcoe: Do not sends FDISCs before FLOGI during CVLBhanu Prakash Gollapudi
When handling CVL with no Vx port descriptors, lports for NPIV ports are reset before issuing the ctlr_reset. This causes FDISCs to be issued before successful FLOGI. Fix it by resetting the controller before resetting the lports. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] fcoe: Ensure fcoe_recv_frame is always called in process contextNeil Horman
commit 859b7b649ab58ee5cbfb761491317d5b315c1b0f introduced the ability to call fcoe_recv_frame in softirq context. While this is beneficial to performance, its not safe to do, as it breaks the serialization of access to the lport structure (i.e. when an fcoe interface is being torn down, theres no way to serialize the teardown effort with the completion of receieve operations occuring in softirq context. As a result, lport (and other) data structures can be read and modified in parallel leading to corruption. Most notable is the vport list, which is protected by a mutex, that will cause a panic if a softirq receive while said mutex is locked. Additionaly, the ema_list, discussed here: http://lists.open-fcoe.org/pipermail/devel/2012-February/011947.html Can be corrupted if a list traversal occurs in softirq context at the same time as a list delete in process context. And generally the lport state variables will not be stable, and may lead to unpredictable results. The most direct fix is to remove the bits from the above commit that allowed fcoe_recv_frame to be called in softirq context. We just force all frames to be handled by the per-cpu rx threads. This will allow the fcoe_if_destroy's use of fcoe_percpu_clean to function properly, ensuring that no frames are being received while the lport is being torn down. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] pm8001: Use spin_lock_irqsave() for task_state.Santosh Nayak
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] vmw_pvscsi: Try setting host->max_id as suggested by the device.Arvind Kumar
Fetch the config page from the device to learn max target id to set host->max_id. Also, fix some indentation issues and update the 'Maintained by' field. Signed-off-by: Arvind Kumar <arvindkumar@vmware.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] scsi_debug: Fix incorrect page length in logical block provisioning VPDMartin K. Petersen
The page length for the 0xb2 VPD page is defined to be 4 bytes when no provisioning descriptors are provided (DP=0). Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] scsi_debug: add LBPRZ supportEric Sandeen
Add LBPRZ support to scsi_debug; i.e. read zeros for unmapped blocks. Rather than checking for unmapped blocks at read time, this just zeroes them on the backing store at unmap time so it behaves the same way. This also adds a module parameter to disable it. lbprz, "unmapped blocks return 0 on read (def=1)" [jejb: fix whitespace errors] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] iscsi class: fix gfp use in ping compl and host eventMike Christie
If a ping or host event were to occur when memory is low we do not want to use GFP_KERNEL, because the paths sending them cannot block for data to be written. These paths might be needed to recover write paths. Use GFP_NOIO instead. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] bfa: Fix endian bug in bfad_iocmd_debug_fw_core().Santosh Nayak
Casting pointer from native data type to other type is endian-sensitive. "iocmd->offset" is 64 bit but we use only first 32 bit. It works in little-endian system but in big-endian system it will break. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] qla4xxx: Update driver version to 5.02.00-k16Vikas Chaudhary
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] iscsi_transport: Added error status code for ping comp eventVikas Chaudhary
Defined error codes for ping completion status. This patch take care of Mike Christie's commets Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] qla4xxx: assign correct address for iscsi_cls_hostVikas Chaudhary
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] st: expand ability to write immediate filemarksLee Duncan
The st tape driver recently added the MTWEOFI ioctl, which writes a tape filemark (EOF), like the MTWEOF ioctl, except that MTWEOFI returns immediately. This makes certain applications, like backup software, run much more quickly on buffered tape drives. Since legacy applications do not know about this new MTWEOFI ioctl, this patch adds a new ioctl option that tells the st driver to return immediately when writing an EOF (i.e. a filemark). This new flag is much like the existing flag that tells the st driver to perform writes (and certain other IOs) immediately, but this new flag only applies to writing EOFs. This new feature is controlled via the MTSETDRVBUFFER ioctl, using the newly-defined MT_ST_NOWAIT_EOF flag. Use of this new feature is displayed via the sysfs tape "options" attribute. The st documentation was updated to mention this new flag, as well as the problems that can occur from using it. Signed-off-by: Lee Duncan <lduncan@suse.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Update lpfc to version 8.3.30James Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Revert fix for Link Pull Causes I/O FailuresJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Added more T10 DIF debugfs error injectionJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Update copyright date for files modified in 2012James Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix handling of REG_VFI and cable pull.James Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Enhancements for T10 DIF debugfs error injectionJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Change default DA_ID support from disabled to enabledJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Flush reset register writeJames Smart
Used PCI configure space read to flush PCI function reset register write Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Update copyright date for files modified in 2012James Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fixed panic with extents and small blocksJames Smart
Fixed system panic when extents enabled with large number of small blocks Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Add -Werror compilation flagJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fixed the system panic during EEH recoveryJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix resource leak when acc fails for received plogiJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix SLI4 driver module load and unloadJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fixed missing CVL event causing FCF failoverJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix deadlock during adapter offline requestJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix RPI registered multiple times after HBA resetJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix driver handling of XRI Aborted CQE responseJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix port and system failure in SLI4 FC function resetJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Fix lack of LOGO with vport delete.James Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] lpfc 8.3.30: Make BA_ACC work on a fully qualified exchangeJames Smart
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] sd: make comment and printk string match codePetr Uzel
Adapt comment and printk string after renaming sd_init_command to sd_prep_fn Adapt comment and printk string after renaming sd_attach to sd_probe Signed-off-by: Petr Uzel <petr.uzel@suse.cz> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] ufshcd: UFS Host controller driverSantosh Yaraganavi
This patch adds support for Universal Flash Storage(UFS) host controllers. The UFS host controller driver includes host controller initialization method. The Initialization process involves following steps: - Initiate UFS Host Controller initialization process by writing to Host controller enable register - Configure UFS Host controller registers with host memory space datastructure offsets. - Unipro link startup procedure - Check for connected device - Configure UFS host controller to process requests - Enable required interrupts - Configure interrupt aggregation [jejb: fix warnings in 32 bit compile] Signed-off-by: Santosh Yaraganavi <santoshsy@gmail.com> Signed-off-by: Vinayak Holikatti <vinholikatti@gmail.com> Reviewed-by: Arnd Bergmann <arnd@linaro.org> Reviewed-by: Vishak G <vishak.g@samsung.com> Reviewed-by: Girish K S <girish.shivananjappa@linaro.org> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-27[SCSI] qla4xxx: Add missing spaces to error messagesPetr Uzel
Signed-off-by: Petr Uzel <petr.uzel@suse.cz> Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-19[SCSI] sd: Add runtime pm in the sd_check_events()Lan Tianyu
The sd_check_event() will be called periodly even when the device is in the suspended status to check media event. The scsi_test_unit_ready() in the sd_check_event() will issue scsi cmd request. Issuing scsi request when the device is in the suspeneded status will cause problem. For example, when a usb flash disk in the suspended status, scsi_test_unit_ready() issues a scsi request. The request will be returned as failed because the usb device is not active. The patch adds scsi_autopm_get_device() and scsi_autopm_put_device() around scsi_test_unit_ready() in the sd_check_event() to resolve such problem. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla4xxx: Update driver version to 5.02.00-k15Vikas Chaudhary
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla4xxx: trivial cleanupVikas Chaudhary
1. Do not initialise globals to 0 2. Fix wrong spelling in debug message 3. Modified debug log messages Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla4xxx: Fix sparse warningVikas Chaudhary
Fix following warning:- drivers/scsi/qla4xxx/ql4_os.c:35:5: warning: symbol 'ql4xdisablesysfsboot' was not declared. Should it be static? drivers/scsi/qla4xxx/ql4_iocb.c:461:5: warning: symbol 'qla4xxx_send_mbox_iocb' was not declared. Should it be static? drivers/scsi/qla4xxx/ql4_os.c:3025:6: warning: symbol 'qla4xxx_do_work' was not declared. Should it be static? Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla4xxx: Add support for multiple session per host.Manish Rangankar
This patch will allow iscsiadm to create multiple session for the same target on per host. Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla4xxx: Export CHAP index as sysfs attributeMike Christie
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] scsi_transport: Export CHAP index as sysfs attributeMike Christie
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla4xxx: Add support to display CHAP list and delete CHAP entryNilesh Javali
For offload iSCSI like qla4xxx CHAP entries are stored in FLASH. This patch adds support to list CHAP entries stored in FLASH and delete specified CHAP entry from FLASH using iscsi tools. Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] iscsi_transport: Add support to display CHAP list and delete CHAP entryNilesh Javali
For offload iSCSI like qla4xxx CHAP entries are stored in FLASH. This patch adds support to list CHAP entries stored in FLASH and delete specified CHAP entry from FLASH using iscsi tools. Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] pm8001: fix endian issue with code optimization.Santosh Nayak
1. Fix endian issue. 2. Fix the following warning : " drivers/scsi/pm8001/pm8001_hwi.c:2932:32: warning: comparison between ‘enum sas_device_type’ and ‘enum sas_dev_type’". 3. Few code optimization. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] pm8001: Fix possible racing condition.Santosh Nayak
There is a possble racing scenario. 'process_oq' is called by two routines, as shown below. pm8001_8001_dispatch = { ....... .isr = pm8001_chip_isr --> process_oq,// A .isr_process_oq = process_oq, // B ..... } process_oq() --> process_one_iomb() --> mpi_sata_completion() In 'mpi_sata_completion', "pm8001_ha->lock" is first released. It means lock is taken before, which is true for the context A, as 'pm8001_ha->lock' is taken in 'pm8001_chip_isr()' But for context B there is no lock taken before and pm8001_ha->lock is unlocked in 'mpi_sata_completion()'. This may unlock the lock taken in context A. Possible racing ?? If 'pm8001_ha->lock' is taken in 'process_oq()' instead of 'pm8001_chip_isr' then the above issue can be avoided. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] pm8001: Fix bogus interrupt state flag issue.Santosh Nayak
Static checker is giving following warning: " error: calling 'spin_unlock_irqrestore()' with bogus flags" The code flow is as shown below: process_oq() --> process_one_iomb --> mpi_sata_completion In 'mpi_sata_completion' the first call for 'spin_unlock_irqrestore()' is with flags=0, which is as good as 'spin_unlock_irq()' ( unconditional interrupt enabling). So for better performance 'spin_unlock_irqrestore()' can be replaced with 'spin_unlock_irq()' and 'spin_lock_irqsave()' can be replaced by 'spin_lock_irq()'. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] ipr: update PCI ID definitions for new adaptersWayne Boyer
This patch updates some PCI ID definitions for new adapters based on the next generation 64 bit IOA PCI interface chip. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] qla2xxx: handle default case in qla2x00_request_firmware()Dan Carpenter
This silences a static checker warning. Also we're always adding new types of firmware, so it might fix a bug in real life some day. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>