summaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)Author
2012-11-14[SCSI] sd: Implement support for WRITE SAMEMartin K. Petersen
Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk driver. - We set the default maximum to 0xFFFF because there are several devices out there that only support two-byte block counts even with WRITE SAME(16). We only enable transfers bigger than 0xFFFF if the device explicitly reports MAXIMUM WRITE SAME LENGTH in the BLOCK LIMITS VPD. - max_write_same_blocks can be overriden per-device basis in sysfs. - The UNMAP discovery heuristics remain unchanged but the discard limits are tweaked to match the "real" WRITE SAME commands. - In the error handling logic we now distinguish between WRITE SAME with and without UNMAP set. The discovery process heuristics are: - If the device reports a SCSI level of SPC-3 or greater we'll issue READ SUPPORTED OPERATION CODES to find out whether WRITE SAME(16) is supported. If that's the case we will use it. - If the device supports the block limits VPD and reports a MAXIMUM WRITE SAME LENGTH bigger than 0xFFFF we will use WRITE SAME(16). - Otherwise we will use WRITE SAME(10) unless the target LBA is beyond 0xFFFFFFFF or the block count exceeds 0xFFFF. - no_write_same is set for ATA, FireWire and USB. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-14[SCSI] sd: Permit merged discard requestsMartin K. Petersen
Support requests with more than one bio payload for discards. The total number of bytes to be discarded is stored in req->__data_len and used in sd_done() to complete the I/O. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-14[SCSI] Add a report opcode helperMartin K. Petersen
The REPORT SUPPORTED OPERATION CODES command can be used to query whether a given opcode is supported by a device. Add a helper function that allows us to look up commands. We only issue RSOC if the device reports compliance with SPC-3 or later. But to err on the side of caution we disable the command for ATA, FireWire and USB. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-13[SCSI] isci: copy fis 0x34 response into proper bufferMaciej Patelczyk
SATA MICROCODE DOWNALOAD fails on isci driver. After receiving Register Device to Host (FIS 0x34) frame Initiator resets phy. In the frame handler routine response (FIS 0x34) was copied into wrong buffer and upper layer did not receive any answer which resulted in timeout and reset. This patch corrects this bug. Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com> Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcLinus Torvalds
Pull sparc fixes from David Miller: "Several build/bug fixes for sparc, including: 1) Configuring a mix of static vs. modular sparc64 crypto modules didn't work, remove an ill-conceived attempt to only have to build the device match table for these drivers once to fix the problem. Reported by Meelis Roos. 2) Make the montgomery multiple/square and mpmul instructions actually usable in 32-bit tasks. Essentially this involves providing 32-bit userspace with a way to use a 64-bit stack when it needs to. 3) Our sparc64 atomic backoffs don't yield cpu strands properly on Niagara chips. Use pause instruction when available to achieve this, otherwise use a benign instruction we know blocks the strand for some time. 4) Wire up kcmp 5) Fix the build of various drivers by removing the unnecessary blocking of OF_GPIO when SPARC. 6) Fix unintended regression wherein of_address_to_resource stopped being provided. Fix from Andreas Larsson. 7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas Larsson." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix build with mix of modular vs. non-modular crypto drivers. sparc: Support atomic64_dec_if_positive properly. of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq sparc: Add sparc support for platform_get_irq() sparc: Allow OF_GPIO on sparc. qlogicpti: Fix build warning. sparc: Wire up sys_kcmp. sparc64: Improvde documentation and readability of atomic backoff code. sparc64: Use pause instruction when available. sparc64: Fix cpu strand yielding. sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.
2012-10-28qlogicpti: Fix build warning.David S. Miller
The build warns: drivers/scsi/qlogicpti.c: In function 'qpti_sbus_probe': drivers/scsi/qlogicpti.c:1316:45: warning: passing argument 1 of 'scsi_host_alloc' discards 'const' qualifier from pointer target type [enabled by default] include/scsi/scsi_host.h:778:26: note: expected 'struct scsi_host_template *' but argument is of type 'const struct scsi_host_template *' The problem is that of_device_id->data is a const void pointer. This is pretty silly in this specific instance, because for all matched device IDs we set match->data to the same value, &qpti_template. So just use that directly instead of the unnecessary and improperly typed abstraction. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-26qla2xxx: Update target lookup session tables when a target session changesRoland Dreier
It is possible for the target code to change the loop_id or s_id of a target session in reaction to an FC fabric change. However, the session structures are stored in tables that are indexed by these two keys, and if we just change the session structure but leave the pointers to it in the old places in the table, havoc can ensue. For example, a new session might come along that should go in the old slot in the table and overwrite the old session pointer. To handle this, add a new tgt_ops->update_sess() method that also updates the "by loop_id" and "by s_id" lookup tables when a session changes, so that the keys where a session pointer is stored in these tables always matches the keys in the session structure itself. (nab: Drop unnecessary double inversion with FCF_CONF_COMP_SUPPORTED usage) Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: Chad Dupuis <chad.dupuis@qlogic.com> Cc: Arun Easi <arun.easi@qlogic.com> Cc: Saurav Kashyap <saurav.kashyap@qlogic.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-10-26tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPCRoland Dreier
My draft of SPC-4 says the following about the SCSI name string in inquiry VPD page 83h: The SCSI NAME STRING field starts with either: a) the four UTF-8 characters 'eui.' concatenated with 16, 24, or 32 hexadecimal digits (i.e., the UTF-8 characters 0 through 9 and A through F) for an EUI-64 based identifier (see 7.8.6.5). The first hexadecimal digit shall be the most significant four bits of the first byte (i.e., most significant byte) of the EUI-64 based identifier; b) the four UTF-8 characters 'naa.' concatenated with 16 or 32 hexadecimal digits for an NAA identifier (see 7.8.6.6). The first hexadecimal digit shall be the most significant four bits of the first byte (i.e., most significant byte) of the NAA identifier; or c) the four UTF-8 characters 'iqn.' concatenated with an iSCSI Name for an iSCSI-name based identifier (see iSCSI). However, the .tpg_get_wwn method for tcm_qla2xxx formats the WWN so the SCSI name string looks like "52:4a:93:7d:24:5f:b2:12,t,0x0001". This patch corrects the code so that VPD 83h gives a SPC-compliant SCSI name string like "naa.524a937d245fb212,t,0x0001" while leavig other uses alone (so configfs will still work with ':' separated WWNs). Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: Chad Dupuis <chad.dupuis@qlogic.com> Cc: Arun Easi <arun.easi@qlogic.com> Cc: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-10-26qla2xxx: Add missing ->vport_slock while calling qlt_update_vp_mapNicholas Bellinger
All other callers of qlt_update_vp_map() already hold ->vport_slock while updating the vp target map, so go ahead and add the missing ->vport_slock within qla24xx_disable_vp() code. Cc: Saurav Kashyap <saurav.kashyap@qlogic.com> Cc: Chad Dupuis <chad.dupuis@qlogic.com> Cc: Arun Easi <arun.easi@qlogic.com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Roland Dreier <roland@purestorage.com> Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-10-19Merge branch 'testing/driver-warnings' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into fixes A collection of warning fixes on non-ARM code from Arnd Bergmann: * 'testing/driver-warnings' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: s3c: mark s3c2440_clk_add as __init_refok spi/s3c64xx: use correct dma_transfer_direction type pcmcia: sharpsl: don't discard sharpsl_pcmcia_ops USB: EHCI: mark ehci_orion_conf_mbus_windows __devinit mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN SCSI: ARM: make fas216_dumpinfo function conditional SCSI: ARM: ncr5380/oak uses no interrupts
2012-10-13Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds
Pull misc SCSI updates from James Bottomley: "This is an assorted set of stragglers into the merge window with driver updates for megaraid_sas, lpfc, bfi and mvumi. It also includes some fairly major fixes for virtio-scsi (scatterlist init), scsi_debug (off by one error), storvsc (use after free) and qla2xxx (potential deadlock). Signed-off-by: James Bottomley <JBottomley@Parallels.com>" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (49 commits) [SCSI] storvsc: Account for in-transit packets in the RESET path [SCSI] qla2xxx: fix potential deadlock on ha->hardware_lock [SCSI] scsi_debug: Fix off-by-one bug when unmapping region [SCSI] Shorten the path length of scsi_cmd_to_driver() [SCSI] virtio-scsi: support online resizing of disks [SCSI] virtio-scsi: fix LUNs greater than 255 [SCSI] virtio-scsi: initialize scatterlist structure [SCSI] megaraid_sas: Version, Changelog, Copyright update [SCSI] megaraid_sas: Remove duplicate code [SCSI] megaraid_sas: Add SystemPD FastPath support [SCSI] megaraid_sas: Add array boundary check for SystemPD [SCSI] megaraid_sas: Load io_request DataLength in bytes [SCSI] megaraid_sas: Add module param for configurable MSI-X vector count [SCSI] megaraid_sas: Remove un-needed completion_lock spinlock calls [SCSI] lpfc 8.3.35: Update lpfc version for 8.3.35 driver release [SCSI] lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer when QoS not on [SCSI] lpfc 8.3.35: Fix error with fabric service parameters causing performance issues [SCSI] lpfc 8.3.35: Fixed SCSI host create showing wrong link speed on SLI3 HBA ports [SCSI] lpfc 8.3.35: Fixed not checking solicition in progress bit when verifying FCF record for use [SCSI] lpfc 8.3.35: Fixed messages for misconfigured port errors ...
2012-10-10Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull scsi target updates from Nicholas Bellinger: "Things have been calm for the most part with no new fabric drivers in flight for v3.7 (we're up to eight now !), so this update is primarily focused on addressing a few long-standing items within target-core and iscsi-target fabric code. The highlights include: - target: Simplify fabric sense data length handling (roland) - qla2xxx: Fix endianness of task management response code (roland) - target: fix truncation of mode data, support zero allocation length (paolo) - target: Properly support zero-length commands in normal processing path (paolo) - iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU (ronnie + nab) - iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode (ronnie + nab) - target/file: Re-enable optional fd_buffered_io=1 operation (nab + hch) - iscsi-target: Add MaxXmitDataSegmenthLength forr target -> initiator MDRSL declaration (nab) - target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough (nab + hch) - tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls (hch + nab) - tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls (nab + hch) The last series for adding a new target_submit_cmd_map_sgls() fabric caller (as requested by hch) that accepts pre-allocated SGL memory (using existing logic), along with converting tcm_loop + tcm_vhost has only been in -next for the last days, but has gotten enough review +testing and is clear enough a mechanical change that I think it's reasonable to merge for -rc1 code. Thanks again to everyone who contributed this round! Extra special thanks to Roland (PureStorage) for tracking down the qla2xxx target TMR response code endian issue, and to Paolo (Redhat) for resolving the long standing zero-length CDB issues within target-core between virtual and pSCSI backends." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (44 commits) iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values iscsit: proper endianess conversions iscsit: use the itt_t abstract type iscsit: add missing endianess conversion in iscsit_check_inaddr_any iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp iscsit: mark various functions static target/iscsi: precedence bug in iscsit_set_dataout_sequence_values() target/usb-gadget: strlen() doesn't count the terminator target/usb-gadget: remove duplicate initialization tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls target: Add control CDB READ payload zero work-around tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength iscsi-target: Add MaxXmitDataSegmentLength connection recovery check iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength iscsi-target: Enable MaxXmitDataSegmentLength operation in login path iscsi-target: Add base MaxXmitDataSegmentLength code target/file: Re-enable optional fd_buffered_io=1 operation ...
2012-10-09SCSI: ARM: make fas216_dumpinfo function conditionalArnd Bergmann
The fas216_dumpinfo function is only used by __fas216_checkmagic, which is conditionally compiled, so we should put both functions inside of the same #ifdef. Without this patch, building rpc_defconfig results in: drivers/scsi/arm/fas216.c:182:13: warning: 'fas216_dumpinfo' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-scsi@vger.kernel.org
2012-10-09SCSI: ARM: ncr5380/oak uses no interruptsArnd Bergmann
The ncr5380 driver is included by multiple board specific drivers, which may or may not use the interrupt handler. The oak variant doesn't, and should set the DONT_USE_INTR macro. Without this patch, building rpc_defconfig results in: drivers/scsi/arm/../NCR5380.c:1160:20: warning: 'oakscsi_intr' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-scsi@vger.kernel.org
2012-10-09[SCSI] storvsc: Account for in-transit packets in the RESET pathK. Y. Srinivasan
Properly account for I/O in transit before returning from the RESET call. In the absense of this patch, we could have a situation where the host may respond to a command that was issued prior to the issuance of the RESET command at some arbitrary time after responding to the RESET command. Currently, the host does not do anything with the RESET command. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] qla2xxx: fix potential deadlock on ha->hardware_lockJiri Kosina
Lockdep reports: === [ cut here ] === ========================================================= [ INFO: possible irq lock inversion dependency detected ] 3.6.0-0.0.0.28.36b5ec9-default #1 Not tainted --------------------------------------------------------- qla2xxx_1_dpc/368 just changed the state of lock: (&(&ha->vport_slock)->rlock){+.....}, at: [<ffffffffa009b377>] qla2x00_configure_hba+0x197/0x3c0 [qla2xxx] but this lock was taken by another, HARDIRQ-safe lock in the past: (&(&ha->hardware_lock)->rlock){-.....} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&ha->vport_slock)->rlock); local_irq_disable(); lock(&(&ha->hardware_lock)->rlock); lock(&(&ha->vport_slock)->rlock); <Interrupt> lock(&(&ha->hardware_lock)->rlock); === [ cut here ] === Fix the potential deadlock by disabling IRQs while holding ha->vport_slock. Reported-and-tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] scsi_debug: Fix off-by-one bug when unmapping regionLukas Czerner
Currently it is possible to unmap one more block than user requested to due to the off-by-one error in unmap_region(). This is probably due to the fact that the end variable despite its name actually points to the last block to unmap + 1. However in the condition it is handled as the last block of the region to unmap. The bug was not previously spotted probably due to the fact that the region was not zeroed, which has changed with commit be1dd78de5686c062bb3103f9e86d444a10ed783. With that commit we were able to corrupt the ext4 file system on 256M scsi_debug device with LBPRZ enabled using fstrim. Since the 'end' semantic is the same in several functions there this commit just fixes the condition to use the 'end' variable correctly in that context. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Cc: <stable@vger.kernel.org> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] Shorten the path length of scsi_cmd_to_driver()Li Zhong
This patch tries to shorten the path length of scsi_cmd_to_driver(). As only REQ_TYPE_BLOCK_PC commands can be submitted without a driver, so we could avoid the related NULL checking, as long as we make sure we don't use it for REQ_TYPE_BLOCK_PC type commands. Plus, this fixes a bug where you get different behaviors from REQ_TYPE_BLOCK_PC commands when a driver is and isn't attached. Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] virtio-scsi: support online resizing of disksPaolo Bonzini
Support the LUN parameter change event. Currently, the host fires this event when the capacity of a disk is changed from the virtual machine monitor. The resize then appears in the kernel log like this: sd 0:0:0:0: [sda] 46137344 512-byte logical blocks: (23.6 GB/22.0 GIb) sda: detected capacity change from 22548578304 to 23622320128 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] virtio-scsi: fix LUNs greater than 255Paolo Bonzini
virtio-scsi needs to report LUNs greater than 256 using the "flat" format. Because the Linux SCSI layer just maps the SCSI LUN to an u32, without any parsing, these end up in the range from 16640 to 32767. Fix max_lun to account for the possibility that logical unit numbers are encoded with the "flat" format. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] virtio-scsi: initialize scatterlist structureRichard W.M. Jones
The sg struct is used without being initialized, which breaks when CONFIG_DEBUG_SG is enabled. Cc: stable@vger.kernel.org Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Version, Changelog, Copyright updateadam radford
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Remove duplicate codeadam radford
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Add SystemPD FastPath supportadam radford
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Add array boundary check for SystemPDadam radford
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Load io_request DataLength in bytesadam radford
Load io_request->DataLength in bytes for newer firmware that supports high availability. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Add module param for configurable MSI-X vector countadam radford
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09[SCSI] megaraid_sas: Remove un-needed completion_lock spinlock callsadam radford
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-09mm: kill vma flag VM_RESERVED and mm->reserved_vm counterKonstantin Khlebnikov
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA, currently it lost original meaning but still has some effects: | effect | alternative flags -+------------------------+--------------------------------------------- 1| account as reserved_vm | VM_IO 2| skip in core dump | VM_IO, VM_DONTDUMP 3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP 4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP This patch removes reserved_vm counter from mm_struct. Seems like nobody cares about it, it does not exported into userspace directly, it only reduces total_vm showed in proc. Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP. remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP. remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP. [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup] Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Carsten Otte <cotte@de.ibm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Eric Paris <eparis@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Morris <james.l.morris@oracle.com> Cc: Jason Baron <jbaron@redhat.com> Cc: Kentaro Takeda <takedakn@nttdata.co.jp> Cc: Matt Helsley <matthltc@us.ibm.com> Cc: Nick Piggin <npiggin@kernel.dk> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Venkatesh Pallipadi <venki@google.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-08[SCSI] lpfc 8.3.35: Update lpfc version for 8.3.35 driver releaseJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer ↵James Smart
when QoS not on Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fix error with fabric service parameters causing ↵James Smart
performance issues Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed SCSI host create showing wrong link speed on SLI3 ↵James Smart
HBA ports Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed not checking solicition in progress bit when ↵James Smart
verifying FCF record for use Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed messages for misconfigured port errorsJames Smart
Fixed messages for misconfigured port errors to be consistent for all OS platforms. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed kernel warning on spinlock usage on some distributionsJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed PRLI not being retried if a LS_RJT with a reasonJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Correct request_firmware use that was increasing boot timesJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fix FCP2 Retries for non-r/w commands.James Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fixed Linux generic firmware download on SLI4 devices ↵James Smart
with longer module names Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Expand I/O channel support for large systemsJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Correct missing queue destroy on function resetJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fix incorrect comment in T10 DIF attributesJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Added checking BMBX register for RDY bit before writing ↵James Smart
the first address in Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fix interrupt delay multipler conversion for eq_createJames Smart
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] libfc: fix lun reset failure bugs in fc_fcp_resp handling of FCP_RSP_INFOYi Zou
In LUN RESET testing involving NetApp targets, it is observed that LUN RESET is failing. The fc_fcp_resp() is not completing the completion for the LUN RESET task since fc_fcp_resp assumes that the FCP_RSP_INFO is 8 bytes with the 4 byte reserved field, where in case of NetApp targets the FCP_RSP to LUN RESET only has 4 bytes of FCP_RSP_INFO. This leads fc_fcp_resp to error out w/o completing the task completion, eventually causing LUN RESET to be escalated to host reset, which is not very nice. Per FCP-3 r04, clause 9.5.15 and Table 23, the FCP_RSP_INFO field can be either 4 bytes or 8 bytes, with the last 4 bytes as "Reserved (if any)". Therefore it is valid to have 4 bytes FCP_RSP_INFO like some of the NetApp targets behave. Fixing this by validating the FCP_RSP_INFO against both the two spec allowed length. Reported-by: Frank Zhang <frank_1.zhang@intel.com> Signed-off-by: Yi Zou <yi.zou@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] fcoe: Fix write errors on NPIV portsNeerav Parikh
SCSI errors were generated while writing to LUNs connected via NPIV ports. Debugging this it was found that the FCoE packets transmitted via the NPIV ports were not tagged with correct user priority as negotiated with peer by DCB agent. This resulted in FCoE traffic going with priority zero(0) that did not have priority flow control (PFC) enabled for it. The initiator after transferring data to the target never saw any reply indicating the transfer was complete. This resulted in error recovery (ABTS) and SCSI command retries by the scsi-mid layer; eventually resulting in I/O errors. This patch fixes this issue by keeping the FCoE user priority information in the fcoe_interface instance that is common for both the physical port as well as NPIV ports connected to that physical port; instead of storing it in fcoe_port structure that has a per port instance. Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Acked-by: Yi Zou <yi.zou@intel.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] mvumi: Add support for Marvell SAS/SATA RAID-on-Chip(ROC) 88RC9580Shun Fu
[jejb: fix up for spelling correction patch] Signed-off-by: Shun Fu <fushun@marvell.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] bfa: Update the driver version to 3.1.2.1Krishna Gudipati
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] bfa: Firmware image naming convention updateKrishna Gudipati
- Modified the firmware naming convention to contain the firmware image version (3.1.0.0). - The new convention is <firmware-image>-<firmware-version>.bin - The change will enforce loading only compatible firmware with this driver and also avoid over-writing the old firmware image in-order to load new version driver as the firmware names used to be the same. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>