aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-11-25esas2r: fix an oversight in setting return valueTomas Henzl1-1/+4
The patch moves an error code assigment to a 'default' case in the previous switch statement. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-25esas2r: fix an error path in esas2r_ioctl_handlerTomas Henzl1-3/+4
Is seems strange to manipulate nvram_semaphore when in this place, this patch fixes it. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-25esas2r: fir error handling in do_fm_apiTomas Henzl1-5/+5
This patch fixes an error path and rearranges error handling. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24scsi: drop reason argument from ->change_queue_depthChristoph Hellwig2-11/+1
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-12scsi: don't set tagging state from scsi_adjust_queue_depthChristoph Hellwig2-31/+1
Remove the tagged argument from scsi_adjust_queue_depth, and just let it handle the queue depth. For most drivers those two are fairly separate, given that most modern drivers don't care about the SCSI "tagged" status of a command at all, and many old drivers allow queuing of multiple untagged commands in the driver. Instead we start out with the ->simple_tags flag set before calling ->slave_configure, which is how all drivers actually looking at ->simple_tags except for one worke anyway. The one other case looks broken, but I've kept the behavior as-is for now. Except for that we only change ->simple_tags from the ->change_queue_type, and when rejecting a tag message in a single driver, so keeping this churn out of scsi_adjust_queue_depth is a clear win. Now that the usage of scsi_adjust_queue_depth is more obvious we can also remove all the trivial instances in ->slave_alloc or ->slave_configure that just set it to the cmd_per_lun default. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
2014-11-12scsi: always assign block layer tags if enabledChristoph Hellwig1-7/+5
Allow a driver to ask for block layer tags by setting .use_blk_tags in the host template, in which case it will always see a valid value in request->tag, similar to the behavior when using blk-mq. This means even SCSI "untagged" commands will now have a tag, which is especially useful when using a host-wide tag map. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-12scsi: provide a generic change_queue_type methodChristoph Hellwig2-20/+1
Most drivers use exactly the same implementation, so provide it as a library function. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-12scsi: correct return values for .eh_abort_handler implementationsHannes Reinecke1-1/+1
The .eh_abort_handler needs to return SUCCESS, FAILED, or FAST_IO_FAIL. So fixup all callers to adhere to this requirement. Reviewed-by: Robert Elliott <elliott@hp.com> Cc: <stable@vger.kernel.org> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-05-19esas2r: Fix commentMarek Vasut1-1/+1
Minor fix for a message in the driver so that it matches the function name. Signed-off-by: Marek Vasut <marex@denx.de> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-03-19[SCSI] remove deprecated IRQF_DISABLED from SCSIMichael Opdenacker1-1/+1
It's a NOOP since 2.6.35 and it will be removed one day. [jejb: remove from missed arm scsi drivers] Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] esas2r: fix potential format string flawKees Cook1-6/+2
This makes sure format strings cannot leak into the printk call via the constructed buffer. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] esas2r: Cleanup snprinf formatting of firmware versionBradley Grove1-3/+3
Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] esas2r: Remove superfluous mask of pcie_cap_regBradley Grove1-1/+1
Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] esas2r: Fixes for big-endian platformsBradley Grove2-9/+9
In esas2r_format_init_msg(), sgl_page_size and epoch_time params are converted to little endian and the firmware version read from the hba is converted to cpu endianess. In esas2r_rq_init_request, correct and simplify the construction of the SCSI handle. These fixes are the result of testing on a PPC64 machine. Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] esas2r: Directly call kernel functions for atomic bit operationsBradley Grove10-306/+291
Previously the code embedded the kernel's test_bit/clear_bit functions in wrappers that accepted u32 parameters. The wrapper cast these parameters to longs before passing them to the kernel's bit functions. This did not work properly on platforms with 64-bit longs. Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-06[SCSI] esas2r: Remove null test for stack allocated fw_coredump_bufferBradley Grove1-2/+1
Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-06[SCSI] esas2r: coccinelle - Replace memcpy with struct assignmentBradley Grove1-2/+2
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-06[SCSI] esas2r: smatch - Remove test for impossible condition (uint8 > 255)Bradley Grove1-1/+1
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-06[SCSI] esas2r: smatch - Fix overrun due to sprintf appending NULLBradley Grove1-2/+5
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-06[SCSI] esas2r: smatch - Fix dereference that occurs prior to checkBradley Grove2-2/+8
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-06[SCSI] esas2r: smatch - Use biwise rather than logical AND for checking if any bit setBradley Grove1-1/+1
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-03[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter DriverBradley Grove16-0/+15660
This is a new driver for ATTO Technology's ExpressSAS series of hardware RAID adapters. It supports the following adapters: - ExpressSAS R60F - ExpressSAS R680 - ExpressSAS R608 - ExpressSAS R644 Signed-off-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>