summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arcmsr
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] arcmsr: upper 32 of dma address lostDan Carpenter2014-03-151-4/+3
| | | | | | | | | The original code always set the upper 32 bits to zero because it was doing a shift of the wrong variable. Fixes: 1a4f550a09f8 ('[SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixes') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] Disable WRITE SAME for RAID and virtual host adapter driversMartin K. Petersen2013-11-291-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>
* SCSI: remove unnecessary pci_set_drvdata()Jingoo Han2013-10-141-1/+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>
* workqueue: deprecate flush[_delayed]_work_sync()Tejun Heo2012-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flush[_delayed]_work_sync() are now spurious. Mark them deprecated and convert all users to flush[_delayed]_work(). If you're cc'd and wondering what's going on: Now all workqueues are non-reentrant and the regular flushes guarantee that the work item is not pending or running on any CPU on return, so there's no reason to use the sync flushes at all and they're going away. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Mattia Dongili <malattia@linux.it> Cc: Kent Yoder <key@linux.vnet.ibm.com> Cc: David Airlie <airlied@linux.ie> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Bryan Wu <bryan.wu@canonical.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-wireless@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Eric Van Hensbergen <ericvh@gmail.com> Cc: Takashi Iwai <tiwai@suse.de> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Petr Vandrovec <petr@vandrovec.name> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Avi Kivity <avi@redhat.com>
* [SCSI] arcmsr: fix misuse of | instead of &Dan Carpenter2012-07-201-2/+2
| | | | | | | | | | | | | | ARCMSR_ARC1880_DiagWrite_ENABLE is 0x00000080 so (x | 0x00000080) is never zero. The intent here was to test that loop until ARCMSR_ARC1880_DiagWrite_ENABLE was turned on, but because the test was wrong, we would do five loops regardless of whether it succeed or not. Also I simplified the condition a little by removing the unused assignement. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* Remove all #inclusions of asm/system.hDavid Howells2012-03-281-1/+0
| | | | | | | | | Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
* scsi: remove the second argument of k[un]map_atomic()Cong Wang2012-03-201-4/+4
| | | | Signed-off-by: Cong Wang <amwang@redhat.com>
* [SCSI] arcmsr: simplify assumptions in dma_alloc_coherent()Tomas Henzl2011-05-011-7/+5
| | | | | | | | | | | | The code currently computes an offset into a dma_alloc_coherent() area on the assumption that the alignment is imprecise. In fact, the API guarantees PAGE_SIZE alignment, so the offset calculation is always zero: remove it. [jejb: make description actually descriptive] Signed-off-by: Tomas henzl <thenzl@redhat.com> Acked-by: Nick Cheng<nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] arcmsr: simplify some double loops in sleeping functionsTomas Henzl2011-05-011-74/+52
| | | | | | | | | | | | | | | I removed outer loops in ...wait_msgint_ready the sleeptime and retrycount are in fact never changed so I changed them into defines. In arcmsr_flush_hba_cache is a loop removed, which printed the same printk 100 times, one line in log is enough I think. The arcmsr_sleep_for_bus_reset has lost a functionality with the latest patches, The only thing the function does is a long sleep, so it's replaced with a ssleep. [jejb: checkpatch fixes] Signed-off-by: Tomas henzl <thenzl@redhat.com> Acked-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2011-03-171-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (170 commits) [SCSI] scsi_dh_rdac: Add MD36xxf into device list [SCSI] scsi_debug: add consecutive medium errors [SCSI] libsas: fix ata list corruption issue [SCSI] hpsa: export resettable host attribute [SCSI] hpsa: move device attributes to avoid forward declarations [SCSI] scsi_debug: Logical Block Provisioning (SBC3r26) [SCSI] sd: Logical Block Provisioning update [SCSI] Include protection operation in SCSI command trace [SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try) [SCSI] target: Fix volume size misreporting for volumes > 2TB [SCSI] bnx2fc: Broadcom FCoE offload driver [SCSI] fcoe: fix broken fcoe interface reset [SCSI] fcoe: precedence bug in fcoe_filter_frames() [SCSI] libfcoe: Remove stale fcoe-netdev entries [SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h [SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument [SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs [SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out" [SCSI] libfc: Fixing a memory leak when destroying an interface [SCSI] megaraid_sas: Version and Changelog update ... Fix up trivial conflicts due to whitespace differences in drivers/scsi/libsas/{sas_ata.c,sas_scsi_host.c}
| * [SCSI] remove flush_scheduled_work() usagesTejun Heo2011-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simple conversions to drop flush_scheduled_work() usages in drivers/scsi. More involved ones will be done in separate patches. * NCR5380, megaraid_sas: cancel_delayed_work() + flush_scheduled_work() -> cancel_delayed_work_sync(). * mpt2sas_scsih: drop unnecessary flush_scheduled_work(). * arcmsr_hba, ipr, pmcraid: flush the used work explicitly instead of using flush_scheduled_work(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] arcmsr: Fix the issue of system hangup after commands timeout on ARC-1200NickCheng2011-01-243-78/+49
|/ | | | | | [jejb: fix up patch problems and checkpatch.pl issues] Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] arcmsr: fix write to device checkroel kluin2011-01-031-2/+1
| | | | | | | | | | Use command->sc_data_direction instead of trying (incorrectly) to figure it out from the command itself [jejb: fix up compile failure] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: NickCheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* SCSI host lock push-downJeff Garzik2010-11-161-3/+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>
* [SCSI] drivers/scsi: Adjust confusing if indentationJulia Lawall2010-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outdent the code following the if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* arcmsr_hba: Missing slab.h includeDavid Miller2010-08-171-0/+1
| | | | | Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* scsi: Remove owner field from attribute initialization in ARCMSR driverGuenter Roeck2010-08-051-3/+0
| | | | | | | Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [SCSI] arcmsr: fix up bin_attr functionsJames Bottomley2010-07-281-3/+6
| | | | | | | | | | | | | | | | | Commit commit 2c3c8bea608866d8bd9dcf92657d57fdcac011c5 Author: Chris Wright <chrisw@sous-sol.org> Date: Wed May 12 18:28:57 2010 -0700 sysfs: add struct file* to bin_attr callbacks Added an extra struct file * parameter at the beginning, which the arcmsr binary attribute additions didn't have. Fix this to prevent nasty crashes. Cc: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] SCSI: Support Type C RAID controllerNick Cheng2010-07-273-573/+1182
| | | | | | | 1. To support Type C RAID controller, ACB_ADAPTER_TYPE_C, i.e. PCI device ID: 0x1880. Signed-off-by: Nick Cheng< nick.cheng@areca.com.tw > Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] arcmsr: Support 1024 scatter-gather list entries and improve AP while ↵Nick Cheng2010-07-272-683/+677
| | | | | | | | | | | | | | | | | FW trapped and behaviors of EHs 1. To support 4M/1024 scatter-gather list entry, reorganize struct ARCMSR_CDB and struct CommandControlBlock 2. To modify arcmsr_probe 3. In order to help fix F/W issue, add the driver mode for type B card 4. To improve AP's behavior while F/W resets 5. To unify struct MessageUnit_B's members' naming in all OS drivers' 6. To improve error handlers, arcmsr_bus_reset(), arcmsr_abort() 7. To fix the arcmsr_queue_command() in bus reset stage, just let the commands pass down to FW, don't block Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] arcmsr: Support HW reset for EH and polling scheme for scsi deviceNick Cheng2010-05-253-191/+525
| | | | | | | | | | | | 1. To support instantaneous report for SCSI device existing by periodic polling 2. In arcmsr_iop_xfer(), inform AP of F/W's deadlock state to prevent endless waiting 3. To block the coming SCSI command while the driver is handling bus reset 4. To support HW reset in bus reset error handler Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* sysfs: add struct file* to bin_attr callbacksChris Wright2010-05-211-3/+6
| | | | | | | | | This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* 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] modify change_queue_depth to take in reason why it is being calledMike Christie2009-12-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This patch modifies scsi_host_template->change_queue_depth so that it takes an argument indicating why it is being called. This will be used so that if a LLD needs to do some extra processing when handling queue fulls or later ramp ups, it can do so. This is a simple port of the drivers setting a change_queue_depth callback. In the patch I just have these LLDs adjust the queue depth if the user was requesting it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> [Vasu.Dev: v2 Also converted pmcraid_change_queue_depth and then verified all modules compile using "make allmodconfig" for any new build warnings on X86_64. Updated original description after combing two original patches from Mike to make this patch git bisectable.] Signed-off-by: Vasu Dev <vasu.dev@intel.com> [jejb: fixed up 53c700] 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-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>
* dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang2009-04-071-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>
* [SCSI] advansys, arcmsr, ipr, nsp32, qla1280, stex: use pci_ioremap_bar()Arjan van de Ven2008-12-291-5/+3
| | | | | | | | | | | | | | 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>
* x86: sysfs: kill owner field from attributeParag Warudkar2008-10-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs attribute->owner unnecessary. But the field was left in the structure to ease the merge. It's been over a year since that change and it is now time to start killing attribute->owner along with its users - one arch at a time! This patch is attempt #1 to get rid of attribute->owner only for CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on as and when possible - avr32 will be the next since that is something I can test. Compile (make allyesconfig / make allmodconfig / custom config) and boot tested. akpm: the idea is that we put the declaration of sttribute.owner inside `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because new usages kept on turning up in subsystem trees. [akpm: remove the ifdef for now] Signed-off-by: Parag Warudkar <parag.lkml@gmail.com> Cc: Greg KH <greg@kroah.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Tejun Heo <htejun@gmail.com> Cc: Len Brown <lenb@kernel.org> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: David Brownell <david-b@pacbell.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* SCSI: convert struct class_device to struct deviceTony Jones2008-04-192-69/+98
| | | | | | | | | | | | | It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [SCSI] arcmsr: fix iounmap error for Type B adapternickcheng2008-03-141-7/+7
| | | | | | | | | | The Type B Adapter teardown does iounmap on pointers subtracted by a constant offset. Since the offset is in bytes, we need the pointers to be of type void * not uint32_t * so the subtraction is done in the correct units and we iounmap the correct area. Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] arcmsr: update version and changelogNick Cheng2008-03-031-1/+1
| | | | | | | | | | | | | | | | The fix up from Daniel Drake for replacing GFP_DMA with something more sensible has gone in here: commit 69e562c234440fb7410877b5b24f4b29ef8521d1 Author: Daniel Drake <dsd@gentoo.org> Date: Wed Feb 20 13:29:05 2008 +0000 [SCSI] arcmsr: fix message allocation add a change log and update the version for this. Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] arcmsr: fix message allocationDaniel Drake2008-02-221-15/+11
| | | | | | | | | | | | arcmsr_iop_message_xfer() is called from atomic context under the queuecommand scsi_host_template handler. James Bottomley pointed out that the current GFP_KERNEL|GFP_DMA flags are wrong: firstly we are in atomic context, secondly this memory is not used for DMA. Also removed some unneeded casts. Signed-off-by: Daniel Drake <dsd@gentoo.org> Cc: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] arcmsr: updates (1.20.00.15)Nick Cheng2008-02-072-27/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add arcmsr_enable_eoi_mode()and readl(reg->iop2drv_doorbell_reg) in arcmsr_handle_hbb_isr() on adapter Type B in case of the doorbell interrupt clearance is cached - add conditional declaration for arcmsr_pci_error_detected() and arcmsr_pci_slot_reset - check if the sg list member number exceeds arcmsr default limit in arcmsr_build_ccb() - change the returned value type of arcmsr_build_ccb()from "void" to "int" returns FAILED in arcmsr_queue_command() - modify arcmsr_drain_donequeue() to ignore unknown command and let kernel process command timeout. This could handle IO request violating maximum segments, i.e. Linux XFS over DM-CRYPT. Thanks to Milan Broz's comments <mbroz@redhat.com> - fix the release of dma memory for type B in arcmsr_free_ccb_pool() - fix the arcmsr_polling_hbb_ccbdone() Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Cc: Milan Broz <mbroz@redhat.com> Cc: <thenzl@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> 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] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZEFUJITA Tomonori2008-01-231-3/+3
| | | | | | | | | 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>
* deal with resource allocation bugs in arcmsrAl Viro2007-10-292-12/+30
| | | | | | | | | a) for type B we should _not_ iounmap() acb->pmu; it's not ioremapped. b) for type B we should iounmap() two regions we _do_ ioremap. c) if ioremap() fails, we need to bail out (and clean up). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fix reentrancy bug in arcmsr_get_iop_{r,w}qbuffer()Al Viro2007-10-291-2/+2
| | | | | | | doh... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* arcmsr: endianness bugAl Viro2007-10-291-1/+1
| | | | | | | | | initializing a field in data shared with the card with cpu_to_le32(something) | 0x100000 is broken - the field is, indeed, little-endian and we need cpu_to_le32() on both parts. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* trivial annotations in arcmsrAl Viro2007-10-293-105/+103
| | | | | | | driver still has serious portability problems Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SG] Update drivers to use sg helpersJens Axboe2007-10-221-2/+2
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.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] arcmsr: build fixAndrew Morton2007-10-121-0/+4
| | | | | | | | drivers/scsi/arcmsr/arcmsr_hba.c:129: error: 'arcmsr_pci_error_detected' undeclared here (not in a function) drivers/scsi/arcmsr/arcmsr_hba.c:130: error: 'arcmsr_pci_slot_reset' undeclared here (not in a function) Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] arcmsr: irq handler fixes, cleanups, micro-optsJeff Garzik2007-10-121-1/+1
| | | | | | | | | | | | | | | | | | * Remove IRQF_DISABLED, it is clearly wrong for this driver. * Remove wasteful spin_lock_irqsave() in interrupt handler. The lighter-weight spin_lock() is all that's needed. * Annotate with FIXME where arcmsr_interrupt() is called without any spinlock being acquired. * Eliminate pointless cast from void pointer in arcmsr_do_interrupt() [jejb: conflict resolution] Signed-off-by: Jeff Garzik <jeff@garzik.org> Acked-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] arcmsr: Fix hardware wait loopsJeff Garzik2007-10-121-0/+2
| | | | | | | | | | | | | | | | Remove _interruptible, since receiving a signal while waiting on a hardware condition will simply cause the driver to busy-wait. Using msleep_interruptible() is rarely the right thing to do, when waiting on a hardware condition to change. Also, replace msleep with ssleep while doing this, where appropriate. [jejb: fix up merge conflict] Signed-off-by: Jeff Garzik <jeff@garzik.org> Acked-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] arcmsr: fix compile problemsJames Bottomley2007-10-122-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | CC [M] drivers/scsi/arcmsr/arcmsr_hba.o drivers/scsi/arcmsr/arcmsr_attr.c:186: warning: initialization from incompatible pointer type drivers/scsi/arcmsr/arcmsr_attr.c:196: warning: initialization from incompatible pointer type drivers/scsi/arcmsr/arcmsr_attr.c:206: warning: initialization from incompatible pointer type drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_alloc_ccb_pool': drivers/scsi/arcmsr/arcmsr_hba.c:329: warning: assignment from incompatible pointer type drivers/scsi/arcmsr/arcmsr_hba.c: At top level: drivers/scsi/arcmsr/arcmsr_hba.c:101: warning: 'arcmsr_pci_error_detected' declared 'static' but never defined drivers/scsi/arcmsr/arcmsr_hba.c:102: warning: 'arcmsr_pci_slot_reset' declared 'static' but never defined The majority being incorrect casting or the fact that binary attributes now take an additional argument. Cc: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixesNick Cheng2007-10-123-978/+1527
| | | | | | | | | | | | Description: ** support ARC1200/1201/1202 SATA RAID adapter, which is named ACB_ADAPTER_TYPE_B ** modify the arcmsr_pci_slot_reset function ** modify the arcmsr_pci_ers_disconnect_forepart function ** modify the arcmsr_pci_ers_need_reset_forepart function  Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2007-07-152-107/+456
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits) [SCSI] ibmvscsi: convert to use the data buffer accessors [SCSI] dc395x: convert to use the data buffer accessors [SCSI] ncr53c8xx: convert to use the data buffer accessors [SCSI] sym53c8xx: convert to use the data buffer accessors [SCSI] ppa: coding police and printk levels [SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc [SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c [SCSI] remove the dead CYBERSTORMIII_SCSI option [SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA [SCSI] Clean up scsi_add_lun a bit [SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs [SCSI] sni_53c710: Cleanup [SCSI] qla4xxx: Fix underrun/overrun conditions [SCSI] megaraid_mbox: use mutex instead of semaphore [SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation. [SCSI] qla2xxx: update version to 8.02.00-k1. [SCSI] qla2xxx: add support for NPIV [SCSI] stex: use resid for xfer len information [SCSI] Add Brownie 1200U3P to blacklist [SCSI] scsi.c: convert to use the data buffer accessors ...
| * [SCSI] areca: improve driver stability and compatibilitynickcheng(鄭守謙2007-06-172-35/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: 1. Implement PCI-Express error recovery function and AER capability, especially thanks to Yanmin Zhang's openhanded help about AER 2. Implement the selection of ARCMSR_MAX_XFER_SECTORS_B=4096 if firmware version is latter than 1.42 3. Add arcmsr_done4_abort_postqueue in arcmsr_iop_reset function to improve the stability as hot-unplug/plug 4. Modify the ISR, arcmsr_interrupt routine, to prevent the inconsistency with sg_mod driver if application directly calls the arcmsr driver w/o passing through scsi midlayer Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw> [jejb: unused variable removal] Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * [SCSI] arcmsr: convert to use the data buffer accessorsFUJITA Tomonori2007-05-271-72/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | - remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Nick Cheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* | sysfs: add parameter "struct bin_attribute *" in .read/.write methods for ↵Zhang Rui2007-07-111-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sysfs binary attributes Well, first of all, I don't want to change so many files either. What I do: Adding a new parameter "struct bin_attribute *" in the .read/.write methods for the sysfs binary attributes. In fact, only the four lines change in fs/sysfs/bin.c and include/linux/sysfs.h do the real work. But I have to update all the files that use binary attributes to make them compatible with the new .read and .write methods. I'm not sure if I missed any. :( Why I do this: For a sysfs attribute, we can get a pointer pointing to the struct attribute in the .show/.store method, while we can't do this for the binary attributes. I don't know why this is different, but this does make it not so handy to use the binary attributes as the regular ones. So I think this patch is reasonable. :) Who benefits from it: The patch that exposes ACPI tables in sysfs requires such an improvement. All the table binary attributes share the same .read method. Parameter "struct bin_attribute *" is used to get the table signature and instance number which are used to distinguish different ACPI table binary attributes. Without this parameter, we need to offer different .read methods for different ACPI table binary attributes. This is impossible as there are various ACPI tables on different platforms, and we don't know what they are until they are loaded. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud