summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/stex.c
Commit message (Collapse)AuthorAgeFilesLines
* stex: Add S3/S4 supportCharles2016-02-231-3/+65
| | | | | | | | | Add S3/S4 support, add .suspend and .resume function in pci_driver. In .suspend handler, driver send S3/S4 signal to the device. Signed-off-by: Charles Chiou <charles.chiou@tw.promise.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* stex: Add hotplug supportCharles2016-02-231-19/+34
| | | | | | | | | | | | | | | | | | | | | 1. Add hotplug support. Pegasus support surprise removal. To this end, I use return_abnormal_state function to return DID_NO_CONNECT for all commands which sent to driver. 2. Remove stex_hba_stop in stex_remove because we cannot send command to device after hotplug. 3. Add new device status: MU_STATE_STOP, MU_STATE_NOCONNECT, MU_STATE_STOP. MU_STATE_STOP is currently not referenced. MU_STATE_NOCONNECT represent that device is plugged out from the host. 4. Use return_abnormal_function() to substitute part of code in stex_do_reset. Signed-off-by: Charles Chiou <charles.chiou@tw.promise.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* stex: Support to Pegasus series.Charles2016-02-231-6/+26
| | | | | | | | | | | | | | Pegasus is a high performace hardware RAID solution designed to unleash the raw power of Thunderbolt technology. 1. Add code to distinct SuperTrack and Pegasus series by sub device ID. It should support backward compatibility. 2. Change the driver version. Signed-off-by: Charles Chiou <charles.chiou@tw.promise.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* stex: Remove use of struct timevalTina Ruchandani2015-11-091-10/+3
| | | | | | | | | | | | Function stex_gettime uses 'struct timeval' whose tv_sec value will overflow on 32-bit systems in year 2038 and beyond. This patch replaces the use of struct timeval and do_gettimeofday with ktime_get_real_seconds, which returns a 64-bit seconds value. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: use host wide tags by defaultChristoph Hellwig2015-11-091-8/+0
| | | | | | | | | | | | | 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 <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: don't force tagged_supported in driversChristoph Hellwig2014-11-121-11/+0
| | | | | | | | | | Now that we also get proper values in cmd->request->tag for untagged commands, there is no need to force tagged_supported to on in drivers that need host-wide tags. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
* scsi: don't set tagging state from scsi_adjust_queue_depthChristoph Hellwig2014-11-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* scsi: always assign block layer tags if enabledChristoph Hellwig2014-11-121-8/+2
| | | | | | | | | | | | | 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>
* scsi: Remove scsi_print_command when calling abortHannes Reinecke2014-11-121-6/+3
| | | | | | | | | Calling scsi_print_command should not be necessary during abort; if the information is required one should enable scsi logging. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* SCSI: remove unnecessary pci_set_drvdata()Jingoo Han2013-10-141-2/+0
| | | | | | | | | | | | Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound), the driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Drivers: scsi: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-3/+2
| | | | | | | | | | | | | | | | 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>
* SCSI host lock push-downJeff Garzik2010-11-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* [SCSI] stex: fix scan of nonexistent lunEd Lin2010-01-041-0/+5
| | | | | | | | | | | | | | During a manual scan, a user can send command to a nonexistent lun, precisely at the point of max_lun. Normally it's possible (but not required) that the firmware has the knowledge that it is an invalid lun. In the particular case when max_lun is 256, however, the nonexistent lun 256 will be confused with lun 0, because the lun member in a request message is only u8, and 256 will become 0. So we need to fix the problem, at least, at the driver level. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] stex: update version to 4.6.0000.4Ed Lin2009-10-291-4/+4
| | | | | | | Update version to 4.6.0000.4. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] stex: add support for reset request from firmwareEd Lin2009-10-291-83/+166
| | | | | | | | | Add support for reset request from firmware for controllers of st_shasta and st_yel type. Code adjustments necessary for this change are also included. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] stex: add small dma buffer supportEd Lin2009-10-291-5/+20
| | | | | | | | | The controllers of st_seq and st_vsc type can work if only small dma buffer is available, with a reduced firmware feature set. Add support for this case. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] stex: Add reset code for st_yel (v2)Ed Lin2009-09-051-4/+29
| | | | | | | | | | | Add reset related code for st_yel. 1. Set the SS_H2I_INT_RESET bit. 2. Wait for the SS_MU_OPERATIONAL flag. This is also part of normal handshake process so move it to handshake routine. 3. Continue handshake with the firmware. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang2009-04-071-2/+2
| | | | | | | | 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>
* dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang2009-04-071-2/+2
| | | | | | | | 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>
* [SCSI] stex: update version to 4.6.0000.3Ed Lin2009-04-031-5/+5
| | | | | Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: add new 6G controller supportEd Lin2009-04-031-31/+351
| | | | | | | This adds the support of a new SAS 6G controller (st_yel) Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: use config struct for parameters of different controllersEd Lin2009-04-031-76/+125
| | | | | | | Use config struct (st_card_info) for parameters of different controllers Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: add MSI supportEd Lin2009-04-031-5/+43
| | | | | | | This adds the MSI support (default 0=off) Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: small code fixes and changesEd Lin2009-04-031-65/+60
| | | | | | | | | | These are some small code fixes and changes, including: - use 64 bit when possible - remove some unnecessary code (in interrupt, queuecommand routine etc.) - code change for reset handler Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: Version updateEd Lin - PTU2009-03-121-3/+3
| | | | | | | Update version to 4.6.0000.1 Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: Small fixesEd Lin - PTU2009-03-121-6/+22
| | | | | | | | | | | | Some small fixes, including: - add data direction in req_msg because new firmware version may require this (backward compatible) - change internal timeout value - change judgment of type st_vsc1 - blank line handling, etc. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: Fix for controller type st_yosemiteEd Lin - PTU2009-03-121-61/+3
| | | | | | | | | | This is the fix for controller type st_yosemite, including - max_lun is 256 (backward compatible) - remove unneeded special handling of INQUIRY - remove unnecessary listing of sub device ids Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: Add new device idEd Lin - PTU2009-03-121-2/+6
| | | | | | | Add new device id for controller type st_seq. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: Fix for potential invalid responseEd Lin - PTU2009-03-121-0/+1
| | | | | | | | | | | The interrupt routine is good for normal cases. However, if the firmware is abnormal and returns an invalid response, the driver may reuse a ccb structure that has already been handled. This may cause problem. Fix this by setting the req member to NULL. Next time we know the response is invalid and handle accordingly if req is NULL. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] advansys, arcmsr, ipr, nsp32, qla1280, stex: use pci_ioremap_bar()Arjan van de Ven2008-12-291-2/+1
| | | | | | | | | | | | | | Use the newly introduced pci_ioremap_bar() function in drivers/scsi. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Matthew Wilcox <willy@linux.intel.com> Cc: Brian King <brking@us.ibm.com> Cc: Ed Lin <ed.lin@promise.com> Cc: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: switch to block timeoutJames Bottomley2008-12-011-1/+1
| | | | | | | | stex sets the timeout in its slave configure routine for all devices. This now needs to update the request queue timeout in block. Cc: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: fix queue depth settingMike Christie2008-07-261-1/+1
| | | | | | | | | We want to set the queue depth to something reasonable - not the can_queue. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: use scsi_build_sense_bufferFUJITA Tomonori2008-04-071-12/+5
| | | | | | Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: use sg buffer copy helper functionsFUJITA Tomonori2008-04-071-56/+10
| | | | | | | | | | This replaces stex_internal_copy with scsi_sg_copy_to/from_buffer. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: stex_internal_copy should be called with sg_count in struct st_ccbFUJITA Tomonori2008-02-221-4/+6
| | | | | | | | | | | | | | | | | | stex_internal_copy copies an in-kernel buffer to a sg list by using scsi_kmap_atomic_sg. Some functions calls stex_internal_copy with sg_count in struct st_ccb, which is the value that dma_map_sg returned. However it might be shorter than the actual number of sg entries (if the IOMMU merged the sg entries). scsi_kmap_atomic_sg doesn't see sg->dma_length so stex_internal_copy should be called with the actual number of sg entries (i.e. scsi_sg_count), because if the sg entries were merged, stex_direct_copy wrongly think that the data length in the sg list is shorter than the actual length. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] stex: stex_direct_copy shouldn't call dma_map_sgFUJITA Tomonori2008-02-221-22/+12
| | | | | | | | | | | | | | | | | | | | | stex_direct_copy copies an in-kernel buffer to a sg list in order to spoof some SCSI commands. stex_direct_copy calls dma_map_sg and then stex_internal_copy with the value that dma_map_sg returned. It calls scsi_kmap_atomic_sg to copy data. scsi_kmap_atomic_sg doesn't see sg->dma_length so if dma_map_sg merges sg entries, stex_internal_copy gets the smaller number of sg entries than the acutual number, which means it wrongly think that the data length in the sg list is shorter than the actual length. stex_direct_copy shouldn't call dma_map_sg and it doesn't need since this code path doesn't involve dma transfers. This patch removes stex_direct_copy and simply calls stex_internal_copy with the actual number of sg entries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] remove use_sg_chainingJames Bottomley2008-01-301-1/+0
| | | | | | | | | | | With the sg table code, every SCSI driver is now either chain capable or broken (or has sg_tablesize set so chaining is never activated), so there's no need to have a check in the host template. Also tidy up the code by moving the scatterlist size defines into the SCSI includes and permit the last entry of the scatterlist pools not to be a power of two. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] add use_sg_chaining option to scsi_host_templateFUJITA Tomonori2007-10-161-0/+1
| | | | | | | | | | This option is true if a low-level driver can support sg chaining. This will be removed eventually when all the drivers are converted to support sg chaining. q->max_phys_segments is set to SCSI_MAX_SG_SEGMENTS if false. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [SCSI] stex: use resid for xfer len informationEd Lin2007-07-141-2/+2
| | | | | | | | The original implementation in stex_ys_commands() is inappropriate. For xfer len information, we should use resid instead. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] Merge up to linux-2.6 headJames Bottomley2007-05-301-36/+54
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/scsi/jazz_esp.c Same changes made by both SCSI and SPARC trees: problem with UTF-8 conversion in the copyright. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] stex: minor cleanup and version updateEd Lin2007-05-161-3/+13
| | | | | | | | | | | | | | | | | | Add debug information into abort and host_reset routine. Change ioremap to ioremap_nocache. Version updated to 3.6.0000.1. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] stex: fix reset recovery for console deviceEd Lin2007-05-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | After reset completed, the scsi error handler sends out TEST_UNIT_READY to the device. For 'normal' devices the command will be handled by firmware. However, because the RAID console only interfaces to scsi mid layer, the firmware will not process the command for it. This will make the console to be offlined right after reset. Add the handling in driver to fix this problem. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] stex: extend hard reset wait timeEd Lin2007-05-161-1/+6
| | | | | | | | | | | | | | | | | | During hard bus reset of st_shasta controllers, 1 ms is not enough for 16-port controllers, although it's good for 8-port controllers. Extend the wait time to 100 ms to allow bus resets finish successfully. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] stex: fix id mapping issueEd Lin2007-05-161-32/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct internal mapping of stex controllers should be: id:0~15, lun:0~7 (st_shasta) id:0, lun:0~127 (st_yosemite) id:0~127, lun:0 (st_vsc and st_vsc1) This patch reports the internal mapping to scsi mid layer, eliminating the translation between scsi mid layer and firmware. To achieve this goal, we also need to: -- fail the REPORT_LUNS command for st_shasta because the firmware is known to not report all actual luns -- add an entry in scsi_devindo.c to force sequential lun scan (for st_shasta controllers) -- fail the REPORT_LUNS command for console device -- remove special handling of REPORT_LUNS command for st_yosemite, as there is no translation mapping now Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* | [SCSI] stex: convert to use the data buffer accessorsFUJITA Tomonori2007-05-291-73/+36
|/ | | | | | | | | | | - remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [PATCH] remove many unneeded #includes of sched.hTim Schmielau2007-02-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SCSI] stex: version updateEd Lin2006-12-051-4/+2
| | | | | | | Update version to 3.1.0.1 Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] stex: change wait loop codeEd Lin2006-12-051-21/+20
| | | | | | | | | The original wait loop may be much longer than intended time. Use more accurate timer_after for it. Also adjust wait value to avoid unnecessary long waiting. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] stex: add new device type supportEd Lin2006-12-051-7/+21
| | | | | | | | Add support for st_vsc1 type device (st_vsc is ok because it does not require extra buffer). Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
OpenPOWER on IntegriCloud