- 02 May, 2013 40 commits
-
-
Armen Baloyan authored
Found by 0 day test project Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
provisioning map (map_storep) is a bitmap accessed by bitops. So the allocation size should be a multiple of sizeof(unsigned long) and also the bitmap should be cleared by using bitmap_clear() instead of memset(). Otherwise it will cause problem on big-endian architecture if the number of bits is not a multiple of BITS_PER_LONG. I tried testing the logical block provisioning support in scsi_debug, but it didn't work as I expected. For example, load scsi_debug module with UNMAP command supported and fill the storage with random data. # modprobe scsi_debug lbpu=1 # dd if=/dev/urandom of=/dev/sdb Then, try to unmap LBA 0, but Get LBA status reports: # sg_unmap --lba=0 --num=1 /dev/sdb # sg_get_lba_status --lba=0 /dev/sdb descriptor LBA: 0x0000000000000000 blocks: 16384 mapped This is unexpected result. Because UNMAP command to LBA 0 finished without any errors, but Get LBA status shows that LBA 0 is still mapped. This problem is due to the wrong translation between LBA and index of provisioning map. Fix it by using correct translation functions. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
The function unmap_region() clears memory region specified as the logical block address and the number of logical blocks in ramdisk storage (fake_storep) if lbpu and lbprz module parameters are enabled. In the while loop of unmap_region(), it advances optimal unmap granularity in logical blocks. But it only clears one logical block at LBA 'block' per loop iteration. And furthermore, the 'block' is not pointing to a logical block address which should be cleared, it is a index of probisioning map (map_storep). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
scsi_debug prohibits setting scsi_debug_unmap_alignment to be greater than scsi_debug_unmap_granularity. But setting them to be the same value is not prohibited. In this case, the only difference with scsi_debug_unmap_alignment == 0 is the logical blocks from 0 to scsi_debug_unmap_alignment - 1 cannot be unmapped. But the difference is not properly handled in the current code. So this prohibits such unusual setting. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
If the logical block provisioning is not enabled, map_region() and unmap_region() have no effect and they don't need to be called. So this makes map_region() and unmap_region() to be called only when scsi_debug_lbp() returns true, i.e. logical block provisioning is enabled. While I'm at it, this also removes meaningless non-zero check for scsi_debug_unmap_granularity. Because scsi_debug_unmap_granularity cannot be zero with usual setting: scsi_debug_unmap_granularity is 1 by default, and it can be changed to zero with explicit module parameter setting only when the logical block provisioning is disabled. But it is only meaningful module parameter when the logical block provisioning is enabled. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Jeremy Higdon authored
It appears to me that there is a problem with handling of type 1 protection information. It is considering a logical block reference tag of 0xffffffff to be an error, but it is actually valid any time ((lba & 0xffffffff) == 0xffffffff) [for example, 2TiB-1, 4TiB-1, 6TiB-1, etc.]. I'm going by what's written in 4.18.3 of SBC3, where there doesn't appear to be any invalid value for the reference tag. Signed-off-by: Jeremy Higdon <jeremy@sgi.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
wenxiong@linux.vnet.ibm.com authored
Driver passed the wrong IOADL address to IOA adapter. The patch fixes the issue. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Wei Yongjun authored
Fix to return -ENOMEM in the create workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
[SCSI] lpfc 8.3.39: Reduced tmo value set to FLOGI WQE for quick recovery from FLOGI sequence timeout Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
[SCSI] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
James Smart authored
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
wenxiong@linux.vnet.ibm.com authored
Add reset adapter after the 6th EEH errors in ipr driver. This triggers the adapter reset via the PCI config space even when the slot is frozen. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Vikas Chaudhary authored
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Adheer Chandravanshi authored
Assign values using correct datatype in function qla4xxx_copy_to_fwddb_param() Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Adheer Chandravanshi authored
Fix following smatch warnings:- drivers/scsi/qla4xxx/ql4_os.c:6573 qla4xxx_sysfs_ddb_set_param() warn: possible memory leak of 'fw_ddb_entry' drivers/scsi/qla4xxx/ql4_os.c:6596 qla4xxx_sysfs_ddb_delete() warn: variable dereferenced before check 'fnode_sess' (see line 6584) drivers/scsi/qla4xxx/ql4_os.c:6632 qla4xxx_sysfs_ddb_delete() error: potential NULL dereference 'fw_ddb_entry'. Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Vikas Chaudhary authored
Fix following warning: drivers/scsi/qla4xxx/ql4_os.c:5507:5: warning: symbol 'qla4xxx_sysfs_ddb_tgt_create' was not declared. Should it be static? Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Vikas Chaudhary authored
Fix followig gcc warning:- drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_get_param’: drivers/scsi/qla4xxx/ql4_os.c:6279: warning: comparison is always true due to limited range of data type drivers/scsi/qla4xxx/ql4_os.c:6290: warning: comparison is always true due to limited range of data type drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_delete’: drivers/scsi/qla4xxx/ql4_os.c:6593: warning: ‘ddb_size’ may be used uninitialized in this function Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Dan Carpenter authored
__be32 is already a __bitwise type so we don't need the second __bitwise here. It causes a Sparse error: include/scsi/osd_protocol.h:110:26: error: invalid modifier Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Benny Halevy <bhalevy@tonian.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Dan Carpenter authored
We should unlock here before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Brian King authored
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-
Brian King authored
Adds support for a new VIOS feature that allows ibmvfc to optimize terminate_rport_io by telling the VIOS the target is no longer accessible on the fabric and that it should not send an ABTS out on the fabric to the device. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-