summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/atari_scsi.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'scsi-for-linus' of ↵Linus Torvalds2014-06-091-15/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This patch consists of the usual driver updates (qla2xxx, qla4xxx, lpfc, be2iscsi, fnic, ufs, NCR5380) The NCR5380 is the addition to maintained status of a long neglected driver for older hardware. In addition there are a lot of minor fixes and cleanups and some more updates to make scsi mq ready" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (130 commits) include/scsi/osd_protocol.h: remove unnecessary __constant mvsas: Recognise device/subsystem 9485/9485 as 88SE9485 Revert "be2iscsi: Fix processing cqe for cxn whose endpoint is freed" mptfusion: fix msgContext in mptctl_hp_hostinfo acornscsi: remove linked command support scsi/NCR5380: dprintk macro fusion: Remove use of DEF_SCSI_QCMD fusion: Add free msg frames to the head, not tail of list mpt2sas: Add free smids to the head, not tail of list mpt2sas: Remove use of DEF_SCSI_QCMD mpt2sas: Remove uses of serial_number mpt3sas: Remove use of DEF_SCSI_QCMD mpt3sas: Remove uses of serial_number qla2xxx: Use kmemdup instead of kmalloc + memcpy qla4xxx: Use kmemdup instead of kmalloc + memcpy qla2xxx: fix incorrect debug printk be2iscsi: Bump the driver version be2iscsi: Fix processing cqe for cxn whose endpoint is freed be2iscsi: Fix destroy MCC-CQ before MCC-EQ is destroyed be2iscsi: Fix memory corruption in MBX path ...
| * scsi/NCR5380: fix and standardize NDEBUG macrosFinn Thain2014-05-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All three NCR5380 core driver implementations share the same NCR5380.h header file so they need to agree on certain macro definitions. The flag bit used by the NDEBUG_MERGING macro in atari_NCR5380 and sun3_NCR5380 collides with the bit used by NDEBUG_LISTS. Moreover, NDEBUG_ABORT appears in NCR5380.c so it should be defined in NCR5380.h rather than in each of the many drivers using that core. An undefined NDEBUG_ABORT macro caused compiler errors and led to dodgy workarounds in the core driver that can now be removed. (See commits f566a576bca09de85bf477fc0ab2c8c96405b77b and 185a7a1cd79b9891e3c17abdb103ba1c98d6ca7a.) Move all of the NDEBUG_ABORT, NDEBUG_TAGS and NDEBUG_MERGING macro definitions into NCR5380.h where all the other NDEBUG macros live. Also, incorrect "#ifdef NDEBUG" becomes "#if NDEBUG" to fix the warning: drivers/scsi/mac_scsi.c: At top level: drivers/scsi/NCR5380.c:418: warning: 'NCR5380_print' defined but not used drivers/scsi/NCR5380.c:459: warning: 'NCR5380_print_phase' defined but not used The debugging code is now enabled when NDEBUG != 0. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * scsi/NCR5380: adopt dprintk()Finn Thain2014-05-281-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All NCR5380 drivers already include the NCR5380.h header. Better to adopt those macros rather than have three variations on them. Moreover, the macros in NCR5380.h are preferable because the atari_NCR5380 and sun3_NCR5380 versions are inflexible. For example, they can't accomodate dprintk(NDEBUG_MAIN | NDEBUG_QUEUES, ...) Replace the *_PRINTK macros from atari_NCR5380.h and sun3_NCR5380.h with the equivalent macros from NCR5380.h. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Acked-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * m68k/atari - atari_scsi: change abort/reset return codesMichael Schmitz2014-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Resend of earlier patch - added equivalent changes to sun3 NCR5380 code] The abort/reset lowlevel return codes had changed with the new error SCSI handling - update Atari and Sun3 NCR5380 drivers to reflect this. Change reset handling for Atari to clear queues only, do not attempt to call done() on each command aborted by the reset. The EH code should do that for us. Queues _must_ be cleared, otherwise atari_scsi_bus_reset will not release the ST-DMA lock, deadlocking further error recovery. Update the Sun3 NCR5380 driver as well - the Sun3 driver was derived from the Atari one. Kudos to Finn Thain for the Sun3 part and cleaning up the header files. After the header cleanup, the initio.h include (!) can be dropped from sun3_scsi.h now. Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Christoph Hellwig <hch@lst.de>
* | m68k/atari - atari_scsi: use correct virt/phys translation for DMA bufferMichael Schmitz2014-05-261-1/+1
|/ | | | | | | | | | | With the kernel running from FastRAM instead of ST-RAM, none of ST-RAM is mapped by mem_init, and DMA-addressable buffer must be mapped by ioremap. Use platform specific virt/phys translation helpers for this case. Signed-off-by: Michael Schmitz <schmitz@debian.org> Cc: linux-scsi@vger.kernel.org Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* [SCSI] atari_scsi: Fix sleep_on raceArnd Bergmann2014-03-101-3/+9
| | | | | | | | | | | | | | | | | sleep_on is known broken and going away. The atari_scsi driver is one of two remaining users in the falcon_get_lock() function, which is a rather crazy piece of code. This does not attempt to fix the driver's locking scheme in general, but at least prevents falcon_get_lock from going to sleep when no other thread holds the same lock or tries to get it, and we no longer schedule with irqs disabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [MSch: fixed completion conditions missed in Arnds' original RFC patch] Signed-off-by: Michael Schmitz <schmitz@debian.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* atari_scsi: switch to ->show_info()Al Viro2013-04-091-1/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* scsi/atari: Make more functions staticGeert Uytterhoeven2012-04-221-6/+7
| | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitzmic@googlemail.com> Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org
* scsi/atari: Revive "atascsi=" setup optionGeert Uytterhoeven2012-04-221-2/+11
| | | | | | | | | | | It was documented in Documentation/m68k/kernel-options.txt and Documentation/scsi/scsi-parameters.txt, but the implementation was missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitzmic@googlemail.com> Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org
* [SCSI] atari_NCR5380: Provide a dummy NCR5380_exit()Geert Uytterhoeven2011-06-291-0/+1
| | | | | | | | | | | and call it from atari_scsi_release(), cfr. the other NCR5380 drivers. This fixes: drivers/scsi/NCR5380.h:303: warning: ‘NCR5380_exit’ declared ‘static’ but never defined Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* SCSI host lock push-downJeff Garzik2010-11-161-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* m68k: section mismatch fixes: Atari SCSIMichael Schmitz2009-03-261-1/+1
| | | | | | | add __init annotations to probe routines Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: Remove the broken Hades supportAdrian Bunk2008-10-141-24/+3
| | | | | | | | This patch removes the Hades support that was marked as BROKEN 5 years ago. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SCSI] NCR5380: Fix bugs and canonicalize irq handler usageJeff Garzik2007-11-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | * Always pass the same value to free_irq() that we pass to request_irq(). This fixes several bugs. * Always call NCR5380_intr() with 'irq' and 'dev_id' arguments. Note, scsi_falcon_intr() is the only case now where dev_id is not the scsi_host. * Always pass Scsi_Host to request_irq(). For most cases, the drivers already did so, and I merely neated the source code line. In other cases, either NULL or a non-sensical value was passed, verified to be unused, then changed to be Scsi_Host in anticipation of the future. In addition to the bugs fixes, this change makes the interface usage consistent, which in turn enables the possibility of directly referencing Scsi_Host from all NCR5380_intr() invocations. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* m68k: Atari SCSI driver compile fixesRoman Zippel2007-05-041-3/+3
| | | | | | | | Atari SCSI driver compile fixes Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m68k: Reformat the Atari SCSI driverRoman Zippel2007-05-041-186/+175
| | | | | | | | Reformat the Atari SCSI driver Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m68k: Atari SCSI revivalMichael Schmitz2007-05-041-6/+4
| | | | | | | | | | | | | | SCSI should be working on a TT (but someone should really try!) but causes trouble on a Falcon (as in: it ate a filesystem of mine) at least when used concurrently with IDE. I have the notion it's because locking of the ST-DMA interrupt by IDE is broken in 2.6 (the IDE driver always complains about trying to release an already-released ST-DMA). Needs more work, but that's on the IDE or m68k interrupt side rather than SCSI. Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [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>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] Remove MODULE_PARMRusty Russell2006-03-251-5/+5
| | | | | | | | | | MODULE_PARM was actually breaking: recent gcc version optimize them out as unused. It's time to replace the last users, which are generally in the most unloved drivers anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SCSI] remove Scsi_Host_Template typedefChristoph Hellwig2005-11-091-2/+2
| | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+1163
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud