aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
Commit message (Collapse)AuthorAge
...
| * cciss: cleanup some debug ifdefsStephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: cleanup some debug ifdefs Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_p600_dma_prefetch_quirk()Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_p600_dma_prefetch_quirk() Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_enable_scsi_prefetch()Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_enable_scsi_prefetch() Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out CISS_signature_present()Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out CISS_signature_present() Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_find_board_paramsStephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_find_board_params Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: fix leak of ioremapped memoryStephen M. Cameron2010-08-07
| | | | | | | | | | | | | | | | cciss: fix leak of ioremapped memory in cciss_pci_init error path. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_find_cfgtablesStephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_find_cfgtables Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_wait_for_board_ready()Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_wait_for_board_ready() Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_find_memory_BAR()Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_find_memory_BAR() Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: remove board_id parameter from cciss_interrupt_mode()Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: remove board_id parameter from cciss_interrupt_mode() Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_board_disabledStephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_board_disabled Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: factor out cciss_lookup_board_idStephen M. Cameron2010-08-07
| | | | | | | | | | | | | | cciss: factor out cciss_lookup_board_id Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: save pdev pointer in per hba structure early to avoid passing it ↵Stephen M. Cameron2010-08-07
| | | | | | | | | | | | | | | | | | around so much. cciss: save pdev pointer in per hba structure early to avoid passing it around so much. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * block: push down BKL into .open and .releaseArnd Bergmann2010-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The open and release block_device_operations are currently called with the BKL held. In order to change that, we must first make sure that all drivers that currently rely on this have no regressions. This blindly pushes the BKL into all .open and .release operations for all block drivers to prepare for the next step. The drivers can subsequently replace the BKL with their own locks or remove it completely when it can be shown that it is not needed. The functions blkdev_get and blkdev_put are the only remaining users of the big kernel lock in the block layer, besides a few uses in the ioctl code, none of which need to serialize with blkdev_{get,put}. Most of these two functions is also under the protection of bdev->bd_mutex, including the actual calls to ->open and ->release, and the common code does not access any global data structures that need the BKL. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * block: push down BKL into .locked_ioctlArnd Bergmann2010-08-07
| | | | | | | | | | | | | | | | | | | | | | As a preparation for the removal of the big kernel lock in the block layer, this removes the BKL from the common ioctl handling code, moving it into every single driver still using it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * block: remove wrappers for request type/flagsChristoph Hellwig2010-08-07
| | | | | | | | | | | | | | | | | | Remove all the trivial wrappers for the cmd_type and cmd_flags fields in struct requests. This allows much easier grepping for different request types instead of unwinding through macros. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: move next_command function from ifdefMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | | | The definition of next_command also ended up in wrong place It ended up inside an "#ifdef CONFIG_PROCFS". Already caught by Randy Dunlap and a couple others. Tried to put it somewhere that made sense. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: fix call to put_controller_in_performant_modeMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | call to put_controller_in_performant_mode was in the wrong place The call inadvertently ended up in an error path. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: make sure we request the performant mode irqMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | | | Make sure we register the performant mode interrupt Another blunder. Seemed to work because the call to put_controller_into_performant_mode was never called. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: new controller support and bump driver versionMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for new controllers due out next year. HP must continue to support new controllers in older distros. All vendors require support be upstream. These controllers support only 16 commands in simple mode but can support up to 1024 in performant mode. See patch 5/6/ We have no marketing names yet. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: add performant mode support for Stars/SiriusMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mode of controller operation called Performant Mode. Even though cciss has been deprecated in favor of hpsa there are new controllers due out next year that HP must support in older vendor distros. Vendors require all fixes/features be upstream. These new controllers support only 16 commands in simple mode but support up to 1024 in performant mode. This requires us to add this support at this late date. The performant mode transport minimizes host PCI accesses by performinf many completions per read. PCI writes are posted so the host can write then immediately get off the bus not waiting for the writwe to complete to the target. In the context of performant mode the host read out to a controller pulls all posted writes into host memory ensuring the reply queue is coherent. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: check for msi in interrupt_not_for_usMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | | | | | Check to see if h->msi[x]_vector is set. We need this for a following patch. Without this check we process one interrupt then stop because in msi[x] mode the interrupt pending bit is not set. Not sure why we didn't encounter this before. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: clean up interrupt handlerMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | Simplify the interrupt handler code to more closely match hpsa and to hopefully make it easier to follow. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
| * cciss: enqueue and submit ioMike Miller2010-08-07
| | | | | | | | | | | | | | | | | | | | Clean up some code where we subit our io. The same 5 lines appeared several times. Also helps for a following patch. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
* | block: cciss: use ARRAY_SIZEKulikov Vasiliy2010-07-20
|/ | | | | | | | Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* cciss: fix shadows sparse warningBill Pemberton2010-05-11
| | | | | | | | | | | Fix sparse warnings: drivers/block/cciss.c:1591:37: warning: symbol 'i' shadows an earlier one drivers/block/cciss.c:2437:21: warning: symbol 'i' shadows an earlier one Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* cciss: unlock on error pathDan Carpenter2010-04-07
| | | | | | | | | | We take the spin_lock again in fail_all_cmds() so we need to unlock here. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Steve Cameron <scameron@beardog.cce.hp.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: factor out scatter gather chain block mapping codeStephen M. Cameron2010-02-28
| | | | | | | | | cciss: factor out scatter gather chain block mapping code Rationale is I want to use this code from the scsi half of the driver. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: fix scatter gather chain block dma direction kludgeStephen M. Cameron2010-02-28
| | | | | | | | | | | | | cciss: fix scatter gather chain block dma direction kludge The data direction for the chained block of scatter gather elements should always be PCI_DMA_TODEVICE, but was mistakenly set to the direction of the data transfer, then a kludge to fix it was added, in which pci_dma_sync_single_for_device or pci_dma_sync_single_for_cpu was called. If the correct direction is used in the first place, the kludge isn't needed. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: simplify scatter gather codeStephen M. Cameron2010-02-28
| | | | | | | | | | cciss: simplify scatter gather code. Instead of allocating an array of pointers to a structure containing an SGDescriptor structure, and two other elements that aren't really used, just allocate SGDescriptor structs. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: factor out scatter gather chain block allocation and freeingStephen M. Cameron2010-02-28
| | | | | | | | | cciss: factor out scatter gather chain block allocation and freeing Rationale is that I want to use this code from the scsi half of the driver. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: detect bad alignment of scsi commands at build timeStephen M. Cameron2010-02-28
| | | | | | | | cciss: detect bad alignment of scsi commands at build time Incidentally fix some nearby c++ style comments. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Consolidate phys_segment and hw_segment limitsMartin K. Petersen2010-02-26
| | | | | | | | | Except for SCSI no device drivers distinguish between physical and hardware segment limits. Consolidate the two into a single segment limit. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectorsMartin K. Petersen2010-02-26
| | | | | | | | | | | | | The block layer calling convention is blk_queue_<limit name>. blk_queue_max_sectors predates this practice, leading to some confusion. Rename the function to appropriately reflect that its intended use is to set max_hw_sectors. Also introduce a temporary wrapper for backwards compability. This can be removed after the merge window is closed. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Merge branch 'master' into for-2.6.34Jens Axboe2010-02-22
|\
| * cciss: Make cciss_seq_show handle holes in the h->drv[] arrayStephen M. Cameron2010-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible (and expected) for there to be holes in the h->drv[] array, that is, some elements may be NULL pointers. cciss_seq_show needs to be made aware of this possibility to avoid an Oops. To reproduce the Oops which this fixes: 1) Create two "arrays" in the Array Configuratino Utility and several logical drives on each array. 2) cat /proc/driver/cciss/cciss* in an infinite loop 3) delete some of the logical drives in the first "array." Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: stable@kernel.org Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | cciss: remove C99-style commentsdann frazier2010-02-22
|/ | | | | | | | | Some cleanup before the header file split-out so we don't propagate this style into new files. Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: dann frazier <dannf@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: fix scatter gather cleanup problemsStephen M. Cameron2009-11-23
| | | | | | | | | | On driver unload, only free up the extra scatter gather data if they were allocated in the first place (the controller supports it) and don't forget to free up the sg_cmd_list array of pointers. Signed-off-by: Don Brace <brace@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Fix weird usage of ENXIO in cciss_scsi.cStephen M. Cameron2009-11-13
| | | | | | | cciss: Fix weird usage of ENXIO in cciss_scsi.c Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Add enhanced scatter-gather support.Don Brace2009-11-13
| | | | | | | | | | cciss: Add enhanced scatter-gather support. For controllers which supported, more than 512 scatter-gather elements per command may be used, and the max transfer size can be increased to 8192 blocks. Signed-off-by: Don Brace <brace@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Do not automatically rescan on UNIT ATTENTION/LUN DATA CHANGEDStephen M. Cameron2009-11-13
| | | | | | | | | | | | | | | | cciss: Do not automatically rescan on UNIT ATTENTION/LUN DATA CHANGED There are problems with doing this. If, say, several logical drives are deleted at once, several such UNIT ATTENTIONS will be encountered, often during the rescan triggered by the first such UNIT ATTENTION. The block layer may be in the midst of trying to add logical drives which were just deleted (resulting in the subsequent UNIT ATTENTION(s).) Making the rescan code robust enough to tolerate this kind of thing is too complicated for the moment. So, for now, we just don't do it. Note: This UNIT ATTENTION/LUN DATA CHANGED situation only occurs on the MSA2012. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Remove unnecessary check in scan_threadStephen M. Cameron2009-11-13
| | | | | | | cciss: Remove unnecessary check in scan_thread Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: remove sendcmd() as it is no longer used.Stephen M. Cameron2009-11-13
| | | | | | | cciss: remove sendcmd() as it is no longer used. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: clean up code in cciss_shutdownStephen M. Cameron2009-11-13
| | | | | | | | | cciss: clean up code in cciss_shutdown. Send the flush cache command down with interrupts still enabled, and do not do DMA from the stack. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Remove the "withirq" parameter from various functions where possibleStephen M. Cameron2009-11-13
| | | | | | | cciss: Remove the "withirq" parameter from various functions where possible Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Retry driver initiated cmds with unit attention conditionStephen M. Cameron2009-11-13
| | | | | | | cciss: Retry driver initiated cmds with unit attention condition Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Fix problem with remove_from_scan_list on driver unloadStephen M. Cameron2009-11-13
| | | | | | | | | cciss: Fix problem with remove_from_scan_list that on driver unload it doesn't remove the controller from the scan list correctly if the controller is currently being scanned for new devices. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Make device attributes staticAlex Chiang2009-11-13
| | | | | | | | | cciss: Make device attributes static Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Alex Chiang <achiang@hp.com> Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Add cciss_allow_hpsa module parameterStephen M. Cameron2009-10-13
| | | | | | | | | Add cciss_allow_hpsa module parameter. This parameter causes the cciss driver to ignore any Smart Array devices known to be supported by the hpsa driver. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* cciss: Fix multiple calls to pci_release_regionsStephen M. Cameron2009-10-13
| | | | | | | | | | Fix multiple calls to pci_release_regions. If cciss_pci_init fails, it already does any necessary call to pci_release_regions, so this does not need to be done again in cciss_init_one in that case. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>