summaryrefslogtreecommitdiff
path: root/drivers/scsi/ips.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-23scsi: Remove drivers/scsi/scsi.hBart Van Assche1-2/+6
The following two header files have the same file name: include/scsi/scsi.h and drivers/scsi/scsi.h. This is confusing. Remove the latter since the following note was added in drivers/scsi/scsi.h in 2004: "NOTE: this file only contains compatibility glue for old drivers. All these wrappers will be removed sooner or later. For new code please use the interfaces declared in the headers in include/scsi/" Link: https://lore.kernel.org/r/20220218195117.25689-7-bvanassche@acm.org Cc: Christoph Hellwig <hch@lst.de> Cc: Ming Lei <ming.lei@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-02-23scsi: ips: Use true and false instead of TRUE and FALSEBart Van Assche1-19/+17
This patch prepares for removal of the drivers/scsi/scsi.h header file. That header file defines the 'TRUE' and 'FALSE' constants. Link: https://lore.kernel.org/r/20220218195117.25689-4-bvanassche@acm.org Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-02-23scsi: ips: Change the return type of ips_release() into 'void'Bart Van Assche1-5/+2
ips_release() has one caller and that caller ignores the value returned by ips_release(). Hence change the return type of that function into 'void'. Link: https://lore.kernel.org/r/20220218195117.25689-3-bvanassche@acm.org Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-02-23scsi: ips: Remove an unreachable statementBart Van Assche1-1/+0
Whether or not CONFIG_BUG is enabled, BUG() never returns. Hence, code past a BUG() statement is unreachable. Remove one such unreachable statement. Link: https://lore.kernel.org/r/20220218195117.25689-2-bvanassche@acm.org Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-17scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functionsBart Van Assche1-1/+2
The DEF_SCSI_QCMD() macro passes the addresses of the SCSI host lock and also that of the scsi_done function to the queuecommand_lck() function implementations. Remove the 'scsi_done' argument since its address is now a constant and instead call 'scsi_done' directly from inside the queuecommand_lck() functions. Link: https://lore.kernel.org/r/20211007204618.2196847-14-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-17scsi: ips: Call scsi_done() directlyBart Van Assche1-15/+13
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-43-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-08-12scsi: ips: Use scsi_cmd_to_rq() instead of scsi_cmnd.requestBart Van Assche1-1/+1
Prepare for removal of the request pointer by using scsi_cmd_to_rq() instead. This patch does not change any functionality. Link: https://lore.kernel.org/r/20210809230355.8186-26-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-06-19scsi: ips: Avoid over-read of sense bufferKees Cook1-4/+6
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy() avoid intentionally reading across neighboring array fields. scb->scsi_cmd->sense_buffer is 96 bytes: #define SCSI_SENSE_BUFFERSIZE 96 tapeDCDB->sense_info is 56 bytes: typedef struct { ... uint8_t sense_info[56]; } IPS_DCDB_TABLE_TAPE, ... scb->dcdb.sense_info is 64 bytes: typedef struct { ... uint8_t sense_info[64]; ... } IPS_DCDB_TABLE, ... Copying 96 bytes from either was copying beyond the end of the respective buffers, leading to potential memory content exposures. Correctly copy the actual buffer contents and zero pad the remaining bytes. Link: https://lore.kernel.org/r/20210616212408.1726812-1-keescook@chromium.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-07treewide: remove editor modelines and cruftMasahiro Yamada1-20/+0
The section "19) Editor modelines and other cruft" in Documentation/process/coding-style.rst clearly says, "Do not include any of these in source files." I recently receive a patch to explicitly add a new one. Let's do treewide cleanups, otherwise some people follow the existing code and attempt to upstream their favoriate editor setups. It is even nicer if scripts/checkpatch.pl can check it. If we like to impose coding style in an editor-independent manner, I think editorconfig (patch [1]) is a saner solution. [1] https://lore.kernel.org/lkml/20200703073143.423557-1-danny@kdrag0n.dev/ Link: https://lkml.kernel.org/r/20210324054457.1477489-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> [auxdisplay] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-01-23scsi: ips: Use correct command completion on errorHannes Reinecke1-2/+7
A non-zero queuecommand() return code means 'busy', i.e. the command hasn't been submitted. So any command which should be failed need to be completed via the ->scsi_done() callback with the appropriate result code set. Link: https://lore.kernel.org/r/20210113090500.129644-32-hare@suse.de Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-25scsi: ips: Convert strnlen() to memcpy() since result should not be NUL ↵Lee Jones1-11/+11
terminated Fixes the following W=1 kernel build warning(s): In file included from arch/arm/include/asm/io.h:23, from drivers/scsi/ips.c:164: In function ‘strncpy’, inlined from ‘ips_send_cmd’ at drivers/scsi/ips.c:3522:6: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul cop ying 4 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ NB: Lots of these - snipping for brevity Link: https://lore.kernel.org/r/20200723122446.1329773-14-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com> Cc: ipslinux@adaptec.com Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-25scsi: ips: Remove some set but unused variablesLee Jones1-10/+2
Intentionally keeping all register reads/writes. Fixes the following W=1 kernel build warning(s): drivers/scsi/ips.c: In function ‘ips_init_copperhead’: drivers/scsi/ips.c:4700:10: warning: variable ‘ConfigByte’ set but not used [-Wunused-but-set-variable] 4700 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; | ^~~~~~~~~~ drivers/scsi/ips.c: In function ‘ips_init_copperhead_memio’: drivers/scsi/ips.c:4794:10: warning: variable ‘ConfigByte’ set but not used [-Wunused-but-set-variable] 4794 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; | ^~~~~~~~~~ drivers/scsi/ips.c: In function ‘ips_init_phase1’: drivers/scsi/ips.c:6839:10: warning: variable ‘func’ set but not used [-Wunused-but-set-variable] 6839 | uint8_t func; | ^~~~ drivers/scsi/ips.c:6838:10: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable] 6838 | uint8_t bus; | ^~~ Link: https://lore.kernel.org/r/20200723122446.1329773-13-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com> Cc: ipslinux@adaptec.com Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-10-01scsi: ips: make array 'options' static const, makes object smallerColin Ian King1-1/+1
Don't populate the array 'options' on the stack but instead make it static const. Makes the object code smaller by 143 bytes. Before: text data bss dec hex filename 94483 11272 1184 106939 1a1bb drivers/scsi/ips.o After: text data bss dec hex filename 94244 11368 1184 106796 1a12c drivers/scsi/ips.o (gcc version 9.2.1, amd64) Link: https://lore.kernel.org/r/20190906164522.5644-1-colin.king@canonical.com Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19scsi: remove the use_clustering flagChristoph Hellwig1-1/+0
The same effects can be achieved by setting the dma_boundary to PAGE_SIZE - 1 and the max_segment_size to PAGE_SIZE, so shift those settings into the drivers. Note that in many cases the setting might be bogus, but this keeps the status quo. [mkp: fix myrs and myrb] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19scsi: flip the default on use_clusteringChristoph Hellwig1-1/+0
Most SCSI drivers want to enable "clustering", that is merging of segments so that they might span more than a single page. Remove the ENABLE_CLUSTERING define, and require drivers to explicitly set DISABLE_CLUSTERING to disable this feature. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-07scsi: ips: properly handle 64-bit DMAChristoph Hellwig1-1/+1
CONFIG_HIGHMEM64 is only one (and these days unusual) way to indicate that > 32-bit dma address are possible. Replace it with a check of the dma_addr_t size. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-07scsi: ips: use lower_32_bits and upper_32_bits instead of reinventing themChristoph Hellwig1-3/+3
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-18scsi: ips: switch to generic DMA APIChristoph Hellwig1-39/+41
Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-17scsi: ips: fix missing break in switchGustavo A. R. Silva1-0/+1
Add missing break statement in order to prevent the code from falling through to case TEST_UNIT_READY. Addresses-Coverity-ID: 1357338 ("Missing break in switch") Suggested-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-04-21scsi: ips: fix firmware timestamps for 32-bitArnd Bergmann1-62/+16
do_gettimeofday() is deprecated since it will stop working in 2038 on 32-bit platforms, leading to incorrect times passed to the firmware. On 64-bit platforms the current code appears to be fine, as the calculation passes an 8-bit century number into the firmware that can represent times long in the future (possibly until 25599). Using ktime_get_real_seconds() to get a 64-bit seconds value and time64_to_tm() to convert it into the firmware format greatly simplifies the ips timekeeping code, makes 32-bit and 64-bit behave the same way here, and gets us closer to removing the deprecated interfaces. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-15scsi: ips: don't set .detect and .release in the host templateChristoph Hellwig1-4/+0
Since moving away from using scsi_module.c these were never called. The implementations are called directly, though so they remain. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-20sched/wait: Rename wait_queue_t => wait_queue_entry_tIngo Molnar1-6/+6
Rename: wait_queue_t => wait_queue_entry_t 'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue", but in reality it's a queue *entry*. The 'real' queue is the wait queue head, which had to carry the name. Start sorting this out by renaming it to 'wait_queue_entry_t'. This also allows the real structure name 'struct __wait_queue' to lose its double underscore and become 'struct wait_queue_entry', which is the more canonical nomenclature for such data types. Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-11-09scsi: ips: don't use custom hex_asc_upper[] tableAndy Shevchenko1-8/+5
We have table of the HEX characters in the kernel. Replace custom by a generic one. Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-06-03ips: remove pointless #warningJames Bottomley1-4/+5
non-x86 builds want the #warning in the IPS code about compiling on the wrong architecture removed because it keeps triggering on their platforms build farms. Transform from a compile time warning into a runtime one with taint to preserve the original intent of the authors. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-02-02scsi: print single-character strings with seq_putcRasmus Villemoes1-1/+1
Using seq_putc to print a single character saves at least a strlen() call and a memory access, and may also give a small .text reduction. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02scsi: replace seq_printf with seq_putsRasmus Villemoes1-4/+3
Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24scsi: drop reason argument from ->change_queue_depthChristoph Hellwig1-1/+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 Hellwig1-1/+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-10-14scsi: replace strnicmp with strncasecmpRasmus Villemoes1-1/+1
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-29[SCSI] Disable WRITE SAME for RAID and virtual host adapter driversMartin K. Petersen1-0/+1
Some host adapters do not pass commands through to the target disk directly. Instead they provide an emulated target which may or may not accurately report its capabilities. In some cases the physical device characteristics are reported even when the host adapter is processing commands on the device's behalf. This can lead to adapter firmware hangs or excessive I/O errors. This patch disables WRITE SAME for devices connected to host adapters that provide an emulated target. Driver writers can disable WRITE SAME by setting the no_write_same flag in the host adapter template. [jejb: fix up rejections due to eh_deadline patch] Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-04-09ips: fix format bugs exposed by previous commitAl Viro1-3/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09ips: switch to ->show_info()Al Viro1-152/+80
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-01-04Drivers: scsi: remove __dev* attributes.Greg Kroah-Hartman1-5/+5
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Adam Radford <linuxraid@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-20scsi: remove the second argument of k[un]map_atomic()Cong Wang1-3/+3
Signed-off-by: Cong Wang <amwang@redhat.com>
2011-12-02treewide: Fix typos in various parts of the kernel, and fix some comments.Justin P. Mattock1-1/+1
The below patch fixes some typos in various parts of the kernel, as well as fixes some comments. Please let me know if I missed anything, and I will try to get it changed and resent. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-31Fix common misspellingsLucas De Marchi1-2/+2
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-11-17SCSI host lock push-downJeff Garzik1-2/+4
Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang1-1/+1
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang1-1/+1
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-12[SCSI] Remove SUGGEST flagsMartin K. Petersen1-2/+1
The SUGGEST_* flags in the SCSI command result have been out of fashion for a while and we don't actually use them in the error handling. Remove the remaining occurrences. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-09block: unify request timeout handlingJens Axboe1-1/+1
Right now SCSI and others do their own command timeout handling. Move those bits to the block layer. Instead of having a timer per command, we try to be a bit more clever and simply have one per-queue. This avoids the overhead of having to tear down and setup a timer for each command, so it will result in a lot less timer fiddling. Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk1-1/+0
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-07[SCSI] ips: remove spurious cpu_to_leX on outX statementsJames Bottomley1-16/+16
These are completely wrong because both outX and writeX do an automatic reverse of their arguments if necessary, so having an extra cpu_to_leX gives us the wrong ordering on BE platforms again. Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] aacraid, ips: leX_add_cpu conversionMarcin Slusarz1-6/+2
replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder); generated with semantic patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: "Salyzyn, Mark" <Mark_Salyzyn@adaptec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] ips: use sg buffer copy helper funcitonsFUJITA Tomonori1-42/+8
This rewrites ips_scmd_buf_write/read with scsi_sg_copy_from/to_buffer respectively. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Salyzyn, Mark <Mark_Salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] Remove random noop unchecked_isa_dma usersAndi Kleen1-1/+0
Lots of drivers set it to 0. Remove that. Patch should be a nop. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-07[SCSI] ips: sg chaining support to the path to non I/O commandsFUJITA Tomonori1-8/+10
I overlooked ips_scmd_buf_write and ips_scmd_buf_read when I converted ips to use the data buffer accessors. ips is unlikely to use sg chaining (especially in this path) since a) this path is used only for non I/O commands (with little data transfer), b) ips's sg_tablesize is set to just 17. Thanks to Tim Pepper for testing this patch. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-19[SCSI] ips: fix data buffer accessors conversion bugFUJITA Tomonori1-1/+1
This fixes a bug that can't handle a passthru command with more than two sg entries. Big thanks to Tim Pepper for debugging the problem. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-03drivers/scsi/: Spelling fixesJoe Perches1-1/+1
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Acked-by: James Smart <james.smart@emulex.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: David Somayajulu <david.somayajulu@qlogic.com> Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-23[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZEFUJITA Tomonori1-4/+2
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>