- 27 8月, 2015 12 次提交
-
-
由 Don Brace 提交于
Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NScott Teel <scott.teel@pmcs.com> Reviewed-by: NKevin Barnett <kevin.barnett@pmcs.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Signed-off-by: NDon Brace <don.brace@pmcs.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Sreekanth Reddy 提交于
Driver crashes if the BIOS do not set up at least one memory I/O resource. This failure can happen if the device is too slow to respond during POST and is missed by the BIOS, but Linux then detects the device later in the boot process. Based on a patch from Timothy Pearson <tpearson@raptorengineeringinc.com> Signed-off-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Surround conditional locking statements with "#ifndef __CHECKER__" / "#endif" to hide these for the sparse static source code analysis tool. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
The "return QLA_SUCCESS" statement just above the "fw_load_failed" label cannot be reached, hence remove it. Additionally remove the "else" keyword since the code block below the if-statement ends with a return statement. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Avoid that smatch reports the following warning: drivers/scsi/qla2xxx/qla_attr.c:1081: qla2x00_model_desc_show() warn: this array is probably non-NULL. 'vha->hw->model_desc' Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
This patch removes 21 casts between an __iomem pointer type and another data type but also introduces five new casts (see also the casts with "__force"). Although this patch does not change any functionality, IMHO the code with __force casts needs further review. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Whether htonl() or __constant_htonl() is used, if the argument is a constant the conversion happens at compile time. Hence leave out the __constant_ prefix for this and other endianness conversion functions. This improves source code readability. [jejb: checkpatch fixes] Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Replace the QLA82XX_ADDR_IN_RANGE() and QLA8044_ADDR_IN_RANGE() macros with the inline function addr_in_range(). This avoids that the compiler reports the following warning when building with W=1: comparison of unsigned expression >= 0 is always true. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Detected these variables by building with W=1. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Let the debug statement in qlafx00_tm_iocb_entry() report both rsp_info and rsp_info_len instead of reporting rsp_info_len twice. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 26 8月, 2015 6 次提交
-
-
由 Johannes Thumshirn 提交于
Destroy st_index_idr on module exit, reclaiming the allocated memory. This was detected by the following semantic patch (written by Luis Rodriguez <mcgrof@suse.com>) <SmPL> @ defines_module_init @ declarer name module_init, module_exit; declarer name DEFINE_IDR; identifier init; @@ module_init(init); @ defines_module_exit @ identifier exit; @@ module_exit(exit); @ declares_idr depends on defines_module_init && defines_module_exit @ identifier idr; @@ DEFINE_IDR(idr); @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @ identifier declares_idr.idr, defines_module_exit.exit; @@ exit(void) { ... idr_destroy(&idr); ... } @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @ identifier declares_idr.idr, defines_module_exit.exit; @@ exit(void) { ... +idr_destroy(&idr); } </SmPL> Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NHannes Reinecke <hare@suse.de> Acked-by: NKai Mäkisara <kai.makisara@kolumbus.fi> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bjorn Helgaas 提交于
Fix whitespace and indentation errors. No code change. [jejb: checkpatch fixes] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Acked-by: NSumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bjorn Helgaas 提交于
Use dev_printk() when possible to make messages more useful. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Acked-by: NSumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bjorn Helgaas 提交于
Use dev_printk() when possible to make messages more useful. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Acked-by: NSumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Hannes Reinecke 提交于
Log the ALUA state change unit attention correctly with the message log and emit an event to allow user-space tools to react to it. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NEwan D. Milne <emilne@redhat.com> Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Dan Carpenter 提交于
These are signed values the come from the user, we put a cap on the upper bounds but not on the lower bounds. We use "karg.dataSgeOffset" to calculate "sz". We verify "sz" and proceed as if that means that "karg.dataSgeOffset" is correct but this fails to consider that the "sz" calculations can have integer overflows. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 13 8月, 2015 10 次提交
-
-
由 Vitaly Kuznetsov 提交于
Comment in struct Scsi_Host says that drivers are not supposed to access __devices directly. storvsc_host_scan() doesn't happen in irq context so we can just use shost_for_each_device(). Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NLong Li <longli@microsoft.com> Acked-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Vitaly Kuznetsov 提交于
Under the 'default' case in scmnd->sc_data_direction we have 3 options: - DMA_NONE which we handle correctly. - DMA_BIDIRECTIONAL which is never supposed to be set by SCSI stack. - Garbage value. Do WARN() and return -EINVAL in the last two cases. virtio_scsi does BUG_ON() here but it looks like an overkill. Reported-by: NRadim Krčmář <rkrcmar@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Acked-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Seymour, Shane M 提交于
Convert DRIVER_ATTR macros to DRIVER_ATTR_RO requested by Greg KH. Also switched to using scnprintf instead of snprintf per Documentation/filesystems/sysfs.txt. Suggested-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NShane Seymour <shane.seymour@hp.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NKai Mäkisara <kai.makisara@kolumbus.fi> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 linux 提交于
Support HighPoint RR36xx HBAs which are based on Marvell Frey. Support SAS tape and SAS media changer. [jejb: remove now unused label] Signed-off-by: NHighPoint Linux Team <linux@highpoint-tech.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Seymour, Shane M 提交于
This patch changes the st driver to use attribute groups so driver sysfs files are created automatically. See the following for reference: http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/Signed-off-by: NShane Seymour <shane.seymour@hp.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NKai Mäkisara <kai.makisara@kolumbus.fi> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Alexey Khoroshilov 提交于
Resources allocated within bfad_im_port_index idr are not deallocated on module unload. The patch adds idr_destroy() in exit function. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Bart Van Assche 提交于
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: NVasu Dev <vasu.dev@intel.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Johannes Thumshirn 提交于
In case pci_resource_start() or pci_resource_len() reutrn 0, mvsas_ioremap returns without doing an iounmap() of mvi->regs_ex. Found by the cocinelle tool. Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
Commit f3ddac19 ("[SCSI] qla2xxx: Disable adapter when we encounter a PCI disconnect.") has introduced a code that disables the board, releasing some resources, when reading 0xffffffff. In case this happens when there is an EEH, this read will trigger EEH detection and set PCI channel offline. EEH will be able to recover the card from this state by doing a reset, so it's a better option than simply disabling the card. Since eeh_check_failure will mark the channel as offline before returning the read value, in case there really was an EEH, we can simply check for pci_channel_offline, preventing the board_disable code from running if it's true. Without this patch, EEH code will try to access those same resources that board_disable will try to free. This race can cause EEH recovery to fail. [ 504.370577] EEH: Notify device driver to resume [ 504.370580] qla2xxx [0001:07:00.0]-9002:2: The device failed to resume I/O from slot/link_reset. Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Suresh Thiagarajan 提交于
Signed-off-by: NSuresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Signed-off-by: NViswas G <Viswas.G@pmcs.com> Acked-by: NJack Wang <xjtuwjp@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 31 7月, 2015 11 次提交
-
-
由 Matthew R. Ochs 提交于
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Supported-by: NStephen Bates <stephen.bates@pmcs.com> Reviewed-by: NMichael Neuling <mikey@neuling.org> Signed-off-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: NManoj N. Kumar <manoj@linux.vnet.ibm.com> Reviewed-by: NBrian King <brking@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Dan Carpenter 提交于
The string "cmd %d RESET FAILED, new lockup detected" is not quite large enough so the sprintf() will overflow. I have increased the size of the buffer and also changed the sprintf calls to snprintf. Fixes: 73153fe5 ('hpsa: use block layer tag for command allocation') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NDon Brace <don.brace@pmcs.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Chris Leech 提交于
The iSCSI session recovery_tmo setting is writeable in sysfs, but it's also set every time a connection is established when parameters are set from iscsid over netlink. That results in the timeout being reset to the default value after every recovery. The DM multipath tools want to use the sysfs interface to lower the default timeout when there are multiple paths to fail over. It has caused confusion that we have a writeable sysfs value that seem to keep resetting itself. This patch adds an in-kernel flag that gets set once a sysfs write occurs, and then ignores netlink parameter setting once it's been modified via the sysfs interface. My thinking here is that the sysfs interface is much simpler for external tools to influence the session timeout, but if we're going to allow it to be modified directly we should ensure that setting is maintained. Signed-off-by: NChris Leech <cleech@redhat.com> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Brian King 提交于
Signed-off-by: NBrian King <brking@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Brian King 提交于
Some misc fixes for endianness checking with sparse so sparse with endian checking now runs clean. Fixes a minor bug in the process which was uncovered by sparse which would result in unnecessary error recovery for check conditions. Signed-off-by: NBrian King <brking@linux.vnet.ibm.com> Reviewed-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Wen Xiong 提交于
On LE system, users see the wrong device_id attribute. This patch does necessary byte swapping for device_id attribute and works on both of LE and BE systems. Signed-off-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: NBrian King <brking@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Hannes Reinecke 提交于
The 'sd' driver is calling scsi_mode_sense() to figure out internal details. But scsi_mode_sense() never checks for any pending unit attentions, so we're getting annoying error messages like: MODE SENSE: unimplemented page/subpage: 0x00/0x00 and a possible wrong decision for device cache handling. Reviewed-by: NEwan Milne <emilne@redhat.com> Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Tony Battersby 提交于
Fix a memory leak with scsi-mq triggered by commands with large data transfer length. __sg_alloc_table() sets both table->nents and table->orig_nents to the same value. When the scatterlist is DMA-mapped, table->nents is overwritten with the (possibly smaller) size of the DMA-mapped scatterlist, while table->orig_nents retains the original size of the allocated scatterlist. scsi_free_sgtable() should therefore check orig_nents instead of nents, and all code that initializes sdb->table without calling __sg_alloc_table() should set both nents and orig_nents. Fixes: d285203c ("scsi: add support for a blk-mq based I/O path.") Cc: <stable@vger.kernel.org> # 3.17+ Signed-off-by: NTony Battersby <tonyb@cybernetics.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NEwan D. Milne <emilne@redhat.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Brian King 提交于
Fixes another signed / unsigned array indexing bug in the ipr driver. Currently, when hrrq_index wraps, it becomes a negative number. We do the modulo, but still have a negative number, so we end up indexing backwards in the array. Given where the hrrq array is located in memory, we probably won't actually reference memory we don't own, but nonetheless ipr is still looking at data within struct ipr_ioa_cfg and interpreting it as struct ipr_hrr_queue data, so bad things could certainly happen. Each ipr adapter has anywhere from 1 to 16 HRRQs. By default, we use 2 on new adapters. Let's take an example: Assume ioa_cfg->hrrq_index=0x7fffffffe and ioa_cfg->hrrq_num=4: The atomic_add_return will then return -1. We mod this with 3 and get -2, add one and get -1 for an array index. On adapters which support more than a single HRRQ, we dedicate HRRQ to adapter initialization and error interrupts so that we can optimize the other queues for fast path I/O. So all normal I/O uses HRRQ 1-15. So we want to spread the I/O requests across those HRRQs. With the default module parameter settings, this bug won't hit, only when someone sets the ipr.number_of_msix parameter to a value larger than 3 is when bad things start to happen. Cc: <stable@vger.kernel.org> Tested-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: NBrian King <brking@linux.vnet.ibm.com> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Brian King 提交于
When ipr's internal driver trace was changed to an atomic, a signed/unsigned bug slipped in which results in us indexing backwards in our memory buffer writing on memory that does not belong to us. This patch fixes this by removing the modulo and instead just mask off the low bits. Cc: <stable@vger.kernel.org> Tested-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: NBrian King <brking@linux.vnet.ibm.com> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Brian King 提交于
Make sure we have the host lock held when calling scsi_report_bus_reset. Fixes a crash seen as the __devices list in the scsi host was changing as we were iterating through it. Cc: <stable@vger.kernel.org> Reviewed-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: NGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: NBrian King <brking@linux.vnet.ibm.com> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 16 7月, 2015 1 次提交
-
-
由 Jens Axboe 提交于
Commit 1e6f2416 changed the scsi sysfs 'queue_depth' code to rejects depths higher than the scsi host template setting. But lots of hosts set this to 1, and update the settings in the scsi host when the controller/devices probing happens. This breaks (at least) mpt2sas and mpt3sas runtime setting of queue depth, returning EINVAL for all settings but '1'. And once it's set to 1, there's no way to go back up. Cc: stable@vger.kernel.org Fixes: 1e6f2416 "scsi: don't allow setting of queue_depth bigger than can_queue" Signed-off-by: NJens Axboe <axboe@fb.com> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-