aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
AgeCommit message (Collapse)AuthorFilesLines
2016-11-08scsi: libfc: use error code for fc_rport_error()Hannes Reinecke1-0/+5
We only ever use the 'fp' argument for fc_rport_error() to encapsulate the error code, so we can as well do away with that and pass the error directly. Signed-off-by: Hannes Reinecke <[email protected]> Acked-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-10-28block: split out request-only flags into a new namespaceChristoph Hellwig1-2/+2
A lot of the REQ_* flags are only used on struct requests, and only of use to the block layer and a few drivers that dig into struct request internals. This patch adds a new req_flags_t rq_flags field to struct request for them, and thus dramatically shrinks the number of common requests. It also removes the unfortunate situation where we have to fit the fields from the same enum into 32 bits for struct bio and 64 bits for struct request. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Shaun Tancheff <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2016-10-18sd: Implement support for ZBC devicesHannes Reinecke1-0/+17
Implement ZBC support functions to setup zoned disks, both host-managed and host-aware models. Only zoned disks that satisfy the following conditions are supported: 1) All zones are the same size, with the exception of an eventual last smaller runt zone. 2) For host-managed disks, reads are unrestricted (reads are not failed due to zone or write pointer alignement constraints). Zoned disks that do not satisfy these 2 conditions are setup with a capacity of 0 to prevent their use. The function sd_zbc_read_zones, called from sd_revalidate_disk, checks that the device satisfies the above two constraints. This function may also change the disk capacity previously set by sd_read_capacity for devices reporting only the capacity of conventional zones at the beginning of the LBA range (i.e. devices reporting rc_basis set to 0). The capacity message output was moved out of sd_read_capacity into a new function sd_print_capacity to include this eventual capacity change by sd_zbc_read_zones. This new function also includes a call to sd_zbc_print_zones to display the number of zones and zone size of the device. Signed-off-by: Hannes Reinecke <[email protected]> [Damien: * Removed zone cache support * Removed mapping of discard to reset write pointer command * Modified sd_zbc_read_zones to include checks that the device satisfies the kernel constraints * Implemeted REPORT ZONES setup and post-processing based on code from Shaun Tancheff <[email protected]> * Removed confusing use of 512B sector units in functions interface] Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Shaun Tancheff <[email protected]> Tested-by: Shaun Tancheff <[email protected]> Acked-by: Martin K. Petersen <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2016-09-27Merge remote-tracking branch 'mkp-scsi/4.8/scsi-fixes' into fixesJames Bottomley1-4/+1
2016-09-26scsi: Avoid that toggling use_blk_mq triggers a memory leakBart Van Assche1-4/+1
This patch avoids that the following memory leak is triggered if use_blk_mq is disabled after a SCSI host has been allocated by the ib_srp driver and before the same SCSI host is freed: unreferenced object 0xffff8803a168c568 (size 256): backtrace: [<ffffffff81620c95>] kmemleak_alloc+0x45/0xa0 [<ffffffff811bb104>] __kmalloc_node+0x1e4/0x400 [<ffffffff81309fe4>] blk_mq_alloc_tag_set+0xb4/0x230 [<ffffffff814731b7>] scsi_mq_setup_tags+0xc7/0xd0 [<ffffffff81469c26>] scsi_add_host_with_dma+0x216/0x2d0 [<ffffffffa064bef5>] srp_create_target+0xe55/0x13d0 [ib_srp] [<ffffffff8143ce23>] dev_attr_store+0x13/0x20 [<ffffffff8125f030>] sysfs_kf_write+0x40/0x50 [<ffffffff8125e397>] kernfs_fop_write+0x137/0x1c0 [<ffffffff811d8c13>] __vfs_write+0x23/0x140 [<ffffffff811d92e0>] vfs_write+0xb0/0x190 [<ffffffff811da5b4>] SyS_write+0x44/0xa0 [<ffffffff8162c8a5>] entry_SYSCALL_64_fastpath+0x18/0xa8 Fixes: 9aa9cc4221f5 ("scsi: remove the disable_blk_mq host flag") Signed-off-by: Bart Van Assche <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-08-19Merge remote-tracking branch 'mkp-scsi/4.8/scsi-fixes' into fixesJames Bottomley1-3/+2
2016-08-18scsi: sas: remove is_sas_attached()Johannes Thumshirn1-6/+0
As there are no more users of is_sas_attached() left, remove it. Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: James E.J. Bottomley <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-08-18scsi: sas: provide stub implementation for scsi_is_sas_rphyJohannes Thumshirn1-1/+6
Provide a stub implementation for scsi_is_sas_rphy for kernel configurations which do not have CONFIG_SCSI_SAS_ATTRS defined. Reported-by: kbuild test robot <[email protected]> Suggested-by: James Bottomley <[email protected]> Reviewed-by: James E.J. Bottomley <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-08-04Merge branch 'for-next' of ↵Linus Torvalds1-0/+220
git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target updates from Nicholas Bellinger: "The most notable item is IBM virtual SCSI target driver, that was originally ported to target-core back in 2010 by Tomo-san, and has been brought forward to v4.x code by Bryant Ly, Michael Cyr and co over the last months. Also included are two ORDERED task related bug-fixes Bryant + Michael found along the way using ibmvscsis with AIX guests, plus a few miscellaneous target-core + iscsi-target bug-fixes with associated stable tags" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: fix spelling mistake: "limitiation" -> "limitation" target: Fix residual overflow handling in target_complete_cmd_with_length tcm_fc: set and unset FCP_SPPF_TARG_FCN iscsi-target: Fix panic when adding second TCP connection to iSCSI session ibmvscsis: Initial commit of IBM VSCSI Tgt Driver target: Fix ordered task CHECK_CONDITION early exception handling target: Fix ordered task target_setup_cmd_from_cdb exception hang target: Fix max_unmap_lba_count calc overflow target: Fix race between iscsi-target connection shutdown + ABORT_TASK target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP
2016-07-20fcoe: implement FIP VLAN responderHannes Reinecke2-1/+5
When running in VN2VN mode there is no central instance which would send out any FIP VLAN discovery notifications. So this patch adds a new sysfs attribute 'fip_vlan_responder' which will activate a FIP VLAN discovery responder. Signed-off-by: Hannes Reinecke <[email protected]> Acked-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-07-20ibmvscsis: Initial commit of IBM VSCSI Tgt DriverBryant G. Ly1-0/+220
This driver is a pick up of the old IBM VIO scsi Target Driver that was started by Nick and Fujita 2-4 years ago. http://comments.gmane.org/gmane.linux.scsi/90119 The driver provides a virtual SCSI device on IBM Power Servers. This patch contains the fifth version for an initial merge of the tcm ibmvscsis driver. More information on this driver and config can be found: https://github.com/powervm/ibmvscsis/wiki/Configuration http://www.linux-iscsi.org/wiki/IBM_vSCSI (Drop extra libsrp review breakage + Fix kconfig typo - nab) Signed-off-by: Steven Royer <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Michael Cyr <[email protected]> Signed-off-by: Bryant G. Ly <[email protected]> Cc: FUJITA Tomonori <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2016-07-15scsi: remove the disable_blk_mq host flagChristoph Hellwig1-4/+2
We've had scsi-mq for 2.5 years now, so we can remove the unused flag to disable the code on a per-host basis that was put in for unexpected emergencies during bringup. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-07-13scsi: remove current_cmnd field from struct scsi_deviceChristoph Hellwig1-1/+0
The field is only used by the 53c700 driver, so move it into the driver-private device data instead of having it in the common structure. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-07-13fcoe: use enum for fip_modeHannes Reinecke1-6/+8
The FIP mode is independent on the FIP state machine, so use a separate enum for that instead of overloading it with state machine values. Signed-off-by: Hannes Reinecke <[email protected]> Acked-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-07-13fc_fip: Update to latest FC-BB-6 draftHannes Reinecke1-4/+17
Update to latest FC-BB-6 draft to include FIP VN2VN VLAN notifications and additional flags. Signed-off-by: Hannes Reinecke <[email protected]> Acked-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-07-12fcoe: convert to kworkerSebastian Andrzej Siewior1-2/+4
The driver creates its own per-CPU threads which are updated based on CPU hotplug events. It is also possible to use kworkers and remove some of the kthread infrastrucure. The code checked ->thread to decide if there is an active per-CPU thread. By using the kworker infrastructure this is no longer possible (or required). The thread pointer is saved in `kthread' instead of `thread' so anything trying to use thread is caught by the compiler. Currently only the bnx2fc driver is using struct fcoe_percpu_s and the kthread member. After a CPU went offline, we may still enqueue items on the "offline" CPU. This isn't much of a problem. The work will be done on a random CPU. The allocated crc_eof_page page won't be cleaned up. It is probably expected that the CPU comes up at some point so it should not be a problem. The crc_eof_page memory is released of course once the module is removed. This patch was only compile-tested due to -ENODEV. Cc: Vasu Dev <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Tested-by: Johannes Thumshirn <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-05-09Merge branch '4.7/scsi-queue' of ↵Tejun Heo4-21/+44
git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi into for-4.7-zac Pulling in the dependencies for further ZAC changes. Signed-off-by: Tejun Heo <[email protected]>
2016-04-15lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.cMing Lin1-19/+0
Now it's ready to move the mempool based SG chained allocator code from SCSI driver to lib/sg_pool.c, which will be compiled only based on a Kconfig symbol CONFIG_SG_POOL. SCSI selects CONFIG_SG_POOL. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ming Lin <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-15scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTSMing Lin2-5/+5
Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount we fit into a single scatterlist chunk. Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS. Will move these 2 generic definitions to scatterlist.h later. Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Bart Van Assche <[email protected]> (for ib_srp changes) Signed-off-by: Ming Lin <[email protected]> Acked-by: Tejun Heo <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-15scsi: vpd pages are mandatory for SPC-2Hannes Reinecke1-2/+2
VPD pages 0x0 and 0x83 are mandatory even for SPC-2, so we should be lowering the restriction to avoid having to whitelist every SPC-2 compliant device. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-15scsi: Add intermediate STARGET_REMOVE state to scsi_target_stateJohannes Thumshirn1-0/+1
Add intermediate STARGET_REMOVE state to scsi_target_state to avoid running into the BUG_ON() in scsi_target_reap(). The STARGET_REMOVE state is only valid in the path from scsi_remove_target() to scsi_target_destroy() indicating this target is going to be removed. This re-fixes the problem introduced in commits bc3f02a795d3 ("[SCSI] scsi_remove_target: fix softlockup regression on hot remove") and 40998193560d ("scsi: restart list search after unlock in scsi_remove_target") in a more comprehensive way. [mkp: Included James' fix for scsi_target_destroy()] Signed-off-by: Johannes Thumshirn <[email protected]> Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38 Cc: [email protected] Reported-by: Sergey Senozhatsky <[email protected]> Tested-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: James Bottomley <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-11scsi-trace: define ZBC_IN and ZBC_OUTHannes Reinecke1-0/+9
Add new trace functions for ZBC_IN and ZBC_OUT. Reviewed-by: Doug Gilbert <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-11scsi: disable automatic target scanHannes Reinecke1-1/+8
On larger installations it is useful to disable automatic LUN scanning, and only add the required LUNs via udev rules. This can speed up bootup dramatically. This patch introduces a new scan module parameter value 'manual', which works like 'none', but can be overridden by setting the 'rescan' value from scsi_scan_target to 'SCSI_SCAN_MANUAL'. And it updates all relevant callers to set the 'rescan' value to 'SCSI_SCAN_MANUAL' if invoked via the 'scan' option in sysfs. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Tested-by: Laurence Oberman <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-05Merge branch 'fixes-base' into fixesJames Bottomley1-6/+7
2016-04-05scsi: Do not attach VPD to devices that don't support itHannes Reinecke1-0/+25
The patch "scsi: rescan VPD attributes" introduced a regression in which devices that don't support VPD were being scanned for VPD attributes anyway. This could cause issues for some devices and should be avoided so the check for scsi_level has been moved out of scsi_add_lun and into scsi_attach_vpd so that all callers will not scan VPD for devices that don't support it. [mkp: Merge fix] Fixes: 09e2b0b14690 ("scsi: rescan VPD attributes") Cc: <[email protected]> #v4.5+ Suggested-by: Alexander Duyck <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-04-04scsi: add scsi_set_sense_field_pointer()Hannes Reinecke1-0/+1
Add a function to set the field pointer for SCSI sense codes. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2016-04-04libata: evaluate SCSI sense codeHannes Reinecke1-0/+1
Whenever a sense code is set it would need to be evaluated to update the error mask. tj: Cosmetic formatting updates. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2016-03-26Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-12/+3
Pull more SCSI updates from James Bottomley: "The only new stuff which missed the first pull request is an update to the UFS driver. The rest is an assortment of bug fixes and minor tweaks which appeared recently (some are fixes for recent code and some are stuff spotted recently by the checkers or the new gcc-6 compiler [most of Arnd's stuff])" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits) scsi_common: do not clobber fixed sense information scsi: ufs: select CONFIG_NLS scsi: fc: use get/put_unaligned64 for wwn access fnic: move printk()s outside of the critical code section. qla2xxx: avoid maybe_uninitialized warning megaraid_sas: add missing curly braces in ioctl handler lpfc: fix misleading indentation scsi_transport_sas: add 'scsi_target_id' sysfs attribute scsi_dh_alua: uninitialized variable in alua_check_vpd() scsi: ufs-qcom: add printouts of testbus debug registers scsi: ufs-qcom: enable/disable the device ref clock scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup scsi: ufs: add device quirk delay before putting UFS rails in LPM scsi: ufs: fix leakage during link off state scsi: ufs: tune UniPro parameters to optimize hibern8 exit time scsi: ufs: handle non spec compliant bkops behaviour by device scsi: ufs: add retry for query descriptors scsi: ufs: add error recovery after DL NAC error scsi: ufs: make error handling bit faster scsi: ufs: disable vccq if it's not needed by UFS device ...
2016-03-18scsi: fc: use get/put_unaligned64 for wwn accessArnd Bergmann1-12/+3
A bug in the gcc-6.0 prerelease version caused at least one driver (lpfc) to have excessive stack usage when dealing with wwn data, on the ARM architecture. lpfc_scsi.c: In function 'lpfc_find_next_oas_lun': lpfc_scsi.c:117:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] I have reported this as a gcc regression in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70232 However, using a better implementation of wwn_to_u64() not only helps with the particular gcc problem but also leads to better object code for any version or architecture. The kernel already provides get_unaligned_be64() and put_unaligned_be64() helper functions that provide an optimized implementation with the desired semantics. The lpfc_find_next_oas_lun() function in the example that grew from 1146 bytes to 5144 bytes when moving from gcc-5.3 to gcc-6.0 is now 804 bytes, as the optimized get_unaligned_be64() load can be done in three instructions. The stack usage is now down to 28 bytes from 128 bytes with gcc-5.3 before. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Reviewed-by: Ewan Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-03-17Merge branch 'linus' of ↵Linus Torvalds1-6/+7
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto update from Herbert Xu: "Here is the crypto update for 4.6: API: - Convert remaining crypto_hash users to shash or ahash, also convert blkcipher/ablkcipher users to skcipher. - Remove crypto_hash interface. - Remove crypto_pcomp interface. - Add crypto engine for async cipher drivers. - Add akcipher documentation. - Add skcipher documentation. Algorithms: - Rename crypto/crc32 to avoid name clash with lib/crc32. - Fix bug in keywrap where we zero the wrong pointer. Drivers: - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver. - Add PIC32 hwrng driver. - Support BCM6368 in bcm63xx hwrng driver. - Pack structs for 32-bit compat users in qat. - Use crypto engine in omap-aes. - Add support for sama5d2x SoCs in atmel-sha. - Make atmel-sha available again. - Make sahara hashing available again. - Make ccp hashing available again. - Make sha1-mb available again. - Add support for multiple devices in ccp. - Improve DMA performance in caam. - Add hashing support to rockchip" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits) crypto: qat - remove redundant arbiter configuration crypto: ux500 - fix checks of error code returned by devm_ioremap_resource() crypto: atmel - fix checks of error code returned by devm_ioremap_resource() crypto: qat - Change the definition of icp_qat_uof_regtype hwrng: exynos - use __maybe_unused to hide pm functions crypto: ccp - Add abstraction for device-specific calls crypto: ccp - CCP versioning support crypto: ccp - Support for multiple CCPs crypto: ccp - Remove check for x86 family and model crypto: ccp - memset request context to zero during import lib/mpi: use "static inline" instead of "extern inline" lib/mpi: avoid assembler warning hwrng: bcm63xx - fix non device tree compatibility crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode. crypto: qat - The AE id should be less than the maximal AE number lib/mpi: Endianness fix crypto: rockchip - add hash support for crypto engine in rk3288 crypto: xts - fix compile errors crypto: doc - add skcipher API documentation crypto: doc - update AEAD AD handling ...
2016-03-05scsi: Add 'access_state' and 'preferred_path' attributeHannes Reinecke2-0/+13
Add an 'access_state' field to struct scsi_device and display them in sysfs as 'access_state' and 'preferred_path' attribute. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Bart van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-02-23scsi_dh: add 'rescan' callbackHannes Reinecke1-0/+1
If a device needs to be rescanned the device_handler might need to be rechecked, too. So add a 'rescan' callback to the device handler and call it upon scsi_rescan_device(). The rescan callback will be invoked from the Unit Attention handling of ASC/ASCQ 3F 03 (INQUIRY DATA HAS CHANGED). Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-02-23scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'Hannes Reinecke2-0/+2
Add a new blacklist flag BLIST_SYNC_ALUA to instruct the alua device handler to use synchronous command submission for ALUA commands. Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-02-23scsi_dh_alua: Use separate alua_port_group structureHannes Reinecke1-0/+1
The port group needs to be a separate structure as several LUNs might belong to the same group. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Ewan Milne <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-02-23scsi: Export function scsi_scan.c:sanitize_inquiry_stringDon Brace1-0/+1
The hpsa driver uses this function to cleanup inquiry data. Our new pqi driver will also use this function. This function was copied into both drivers. This patch exports sanitize_inquiry_string so the hpsa and the pqi drivers can use this function directly. Suggested-by: Hannes Reinecke <[email protected]> Suggested-by: Matthew R. Ochs [email protected] Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-02-23scsi_transport_iscsi: Add 25G and 40G speed definitionJitendra Bhivare1-0/+2
iscsi_port_speed and iscsi_port_speed_names have new entries for 25Gbps and 40Gbps link speeds. Signed-off-by: Jitendra Bhivare <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-01-27iscsi_tcp: Use ahashHerbert Xu1-6/+7
This patch replaces uses of the long obsolete hash interface with ahash. Signed-off-by: Herbert Xu <[email protected]> Reviewed-by: Mike Christie <[email protected]>
2016-01-23Merge tag 'for-linus' of ↵Linus Torvalds1-0/+78
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "Initial roundup of 4.5 merge window patches - Remove usage of ib_query_device and instead store attributes in ib_device struct - Move iopoll out of block and into lib, rename to irqpoll, and use in several places in the rdma stack as our new completion queue polling library mechanism. Update the other block drivers that already used iopoll to use the new mechanism too. - Replace the per-entry GID table locks with a single GID table lock - IPoIB multicast cleanup - Cleanups to the IB MR facility - Add support for 64bit extended IB counters - Fix for netlink oops while parsing RDMA nl messages - RoCEv2 support for the core IB code - mlx4 RoCEv2 support - mlx5 RoCEv2 support - Cross Channel support for mlx5 - Timestamp support for mlx5 - Atomic support for mlx5 - Raw QP support for mlx5 - MAINTAINERS update for mlx4/mlx5 - Misc ocrdma, qib, nes, usNIC, cxgb3, cxgb4, mlx4, mlx5 updates - Add support for remote invalidate to the iSER driver (pushed through the RDMA tree due to dependencies, acknowledged by nab) - Update to NFSoRDMA (pushed through the RDMA tree due to dependencies, acknowledged by Bruce)" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (169 commits) IB/mlx5: Unify CQ create flags check IB/mlx5: Expose Raw Packet QP to user space consumers {IB, net}/mlx5: Move the modify QP operation table to mlx5_ib IB/mlx5: Support setting Ethernet priority for Raw Packet QPs IB/mlx5: Add Raw Packet QP query functionality IB/mlx5: Add create and destroy functionality for Raw Packet QP IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types IB/mlx5: Allocate a Transport Domain for each ucontext net/mlx5_core: Warn on unsupported events of QP/RQ/SQ net/mlx5_core: Add RQ and SQ event handling net/mlx5_core: Export transport objects IB/mlx5: Expose CQE version to user-space IB/mlx5: Add CQE version 1 support to user QPs and SRQs IB/mlx5: Fix data validation in mlx5_ib_alloc_ucontext IB/sa: Fix netlink local service GFP crash IB/srpt: Remove redundant wc array IB/qib: Improve ipoib UD performance IB/mlx4: Advertise RoCE v2 support IB/mlx4: Create and use another QP1 for RoCEv2 IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers ...
2016-01-07Merge branch 'jejb-scsi' into miscJames Bottomley2-0/+13
2015-12-24IB/iser,isert: Create and use new shared headerSagi Grimberg1-0/+78
The iser RDMA_CM negotiation protocol is shared by the initiator and the target, so have a shared header for the defines and structure. Move relevant items from the initiator and target headers. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Jenny Derzhavetz <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-18scsi_transport_sas: add function to get SAS endpoint addressJames Bottomley1-0/+1
For a device known to be SAS connected, this will return the endpoint address. This is useful for getting the SAS address of SATA devices. Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2015-12-18scsi_transport_sas: add is_sas_attached() functionJames Bottomley1-0/+9
Adds a function designed to be callable any time (regardless of whether the transport attributes are configured or not) which returns true if the device is attached over a SAS transport. The design of this function is that transport specific functions can be embedded within a if (is_sas_attached(sdev)) { ... } which would be compiled out (and thus eliminate the symbols) if SAS is not configured. Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2015-12-03Merge branch 'mkp-fixes' into fixesJames Bottomley1-0/+3
2015-12-02scsi: Add scsi_vpd_tpg_id()Hannes Reinecke1-0/+1
Implement scsi_vpd_tpg_id() to extract the target port group id and the relative port id from SCSI VPD page 0x83. Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-12-02scsi: Add scsi_vpd_lun_id()Hannes Reinecke1-0/+1
Add a function scsi_vpd_lun_id() to return a unique device identifcation based on the designation descriptors of VPD page 0x83. As devices might implement several descriptors the order of preference is: - NAA IEE Registered Extended - EUI-64 based 16-byte - EUI-64 based 12-byte - NAA IEEE Registered - NAA IEEE Extended A SCSI name string descriptor is preferred to all of them if the identification is longer than 16 bytes. The returned unique device identification will be formatted as a SCSI Name string to avoid clashes between different designator types. [mkp: Fixed up kernel doc comment from Johannes] Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Ewan Milne <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-12-02scsi: remove scsi_show_sense_hdr()Hannes Reinecke1-2/+0
Last caller is gone, so remove it. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30scsi: rescan VPD attributesHannes Reinecke1-2/+3
The VPD page information might change, so we need to be able to update it. This patch implements a VPD page rescan whenever the 'rescan' sysfs attribute is triggered. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Shane Seymour <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25scsi: Centralise ssp frame information unitsJohn Garry1-0/+74
The xfer_rdy, command, and task frame's iu structures are not available in <scsi/sas.h>, but only aic94xx driver folder. Add them to include/scsi/sas.h Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-19scsi: report 'INQUIRY result too short' once per hostVitaly Kuznetsov1-0/+3
Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan: INQUIRY result too short (5), using 36' messages on console. This can be problematic for slow consoles. Introduce short_inquiry flag in struct Scsi_Host to print the message once per host. Signed-off-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-09scsi: use host wide tags by defaultChristoph Hellwig2-80/+20
This patch changes the !blk-mq path to the same defaults as the blk-mq I/O path by always enabling block tagging, and always using host wide tags. We've had blk-mq available for a few releases so bugs with this mode should have been ironed out, and this ensures we get better coverage of over tagging setup over different configs. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Jens Axboe <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>