aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2006-12-07ieee1394: sbp2: proper unit in module parameter descriptionStefan Richter1-1/+2
It's 2^20 bit/s, not 0.001 bit. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: clean up sbp2_ namespaceStefan Richter2-133/+132
Prepend sbp2*_ to anything globally defined in sbp2.c except for some macros. Strip sbp2_ from names of struct members. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: some conditions in queue_command are unlikelyStefan Richter1-5/+5
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07[IA64] replace kmalloc+memset with kzallocYan Burman4-13/+6
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] resolve name clash by renaming is_available_memory()Christoph Lameter1-3/+3
There is a name clash with ia64 arch code in Andrew's tree. Rename is_avialable_memory() to is_memory_available() to avoid the clash. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07ieee1394: sbp2: remove superfluous commentsStefan Richter2-355/+109
And update and reformat remaining comments. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: delayed_work -> work_structStefan Richter2-16/+12
This work is not delayed. Also bring the code format in a state which reduces my work to merge pending sbp2 patchs. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07[IA64] Need export for csum_ipv6_magicTony Luck1-0/+1
Now we have our own highly optimized assembly code version of this routine (Thanks Ken!) we should export it so that it can be used. Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07ieee1394: sbp2: coding style of some macrosStefan Richter1-77/+78
Adjust parentheses, indentation, line lengths. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: remove debug macrosStefan Richter1-280/+20
No need to keep them in released sources. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: consolidate log levelsStefan Richter1-19/+12
Replace some calls to SBP2_ERR and SBP2_WARN by SBP2_INFO. Remove logging macros SBP2_NOTICE and SBP2_WARN. Remove direct usage of HPSB_ logging macros. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: remove duplicate codeStefan Richter1-11/+0
The same case is handled further below in sbp2scsi_complete_command. Note, the second version behaves slightly different but looks preferable. It's an extremely unlikely case by the way. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: remove dead codeStefan Richter1-15/+0
This has been within #if 0 for a long time and is wrong anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: clean up function declarationsStefan Richter2-104/+86
Remove unnecessary function prototypes. Remove variable names from function prototypes. Move declarations from sbp2.h to sbp2.c. Move definitions of driver templates together near the top of sbp2.c. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: remove irritating log messageStefan Richter1-2/+0
The queue depth can be read from /sys/bus/scsi/devices/*/queue_depth, so don't log it. And the hint about speed improvements is misleading, at least under current kernels. If serialization is switched off, read performance is typically increased by less than 10%. (I did not test write performance recently.) On the other hand, serialize_io=0 is not yet safe due to some implementation issues that are not trivial to fix. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ohci1394: shortcut irq printingAlexey Dobriyan1-4/+2
To print irq number no need to transform to string using %d, then print using %s. Just use %d. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2006-12-07ieee1394: nodemgr: take it easy if bus_rescan_devices failsStefan Richter1-3/+2
This happens. No need to log a BUG trace. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07drivers/ieee1394/*: use kmemdup()Eric Sesterhenn2-4/+2
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: ohci1394: proper log messages in suspend and resumeStefan Richter1-11/+15
- correct thinko in one of my last commits: cannot use PRINT macro with ohci == NULL - add log messages on ohci == NULL and on pci_enable_device != 0 - update log macros from patch "revert fail on error in suspend" to use PRINT and DBGMSG where possible Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: ohci1394: revert fail on error in suspendStefan Richter1-2/+11
Some errors during preparation for suspended state can be skipped with a warning instead of a failure of the whole suspend transition, notably an error in pci_set_power_state. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: only build OUI database files if config enabledRandy Dunlap1-1/+4
Only build IEEE1394 OUI database files if the config option is enabled. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: fix printk format warningRandy Dunlap1-1/+1
Fix printk format warning: drivers/ieee1394/nodemgr.c:364: warning: long long unsigned int format, u64 arg (arg 3) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: nodemgr: revise semaphore protection of driver core dataStefan Richter1-50/+92
- The list "struct class.children" is supposed to be protected by class.sem, not by class.subsys.rwsem. - nodemgr_remove_uds() iterated over nodemgr_ud_class.children without proper protection. This was never observed as a bug since the code is usually only accessed by knodemgrd. All knodemgrds are currently globally serialized. But userspace can trigger this code too by writing to /sys/bus/ieee1394/destroy_node. - Clean up access to the FireWire bus type's subsys.rwsem: Access it uniformly via ieee1394_bus_type. Shrink rwsem protected regions where possible. Expand them where necessary. The latter wasn't a problem so far because knodemgr is globally serialized. This should harden the interaction of ieee1394 with sysfs and lay ground for deserialized operation of multiple knodemgrds and for implementation of subthreads for parallelized scanning and probing. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: nodemgr: reflect which return values are errorsStefan Richter1-34/+30
Give better names to local variables. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: nodemgr: small fix after sysfs errors patchStefan Richter1-1/+1
One hunk in "ieee1394: handle sysfs errors" was wrong. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07dv1394: remove BKL contentionStefan Richter1-11/+3
Purges the one remaining call to lock_kernel() from the 1394 subsystem. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07video1394: remove BKL contentionDaniel Drake1-24/+6
video1394 does not need to take the BKL. The data structures shared between file_operations and interrupts are already protected through context-specific spinlocks. The only other danger is video1394_release() being called during another operation, however this cannot happen because release is only ever invoked when the last thread has closed the fd. Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07video1394: small optimizations to frame retrieval codepathDaniel Drake1-8/+10
Add some GCC branch prediction optimizations to unlikely error/safety conditions in the ioctl handling code commonly called during an application's capture loop. Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: handle sysfs errorsStefan Richter2-49/+118
Handle driver core errors with as much care as appropriate. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: coding style in hosts.cStefan Richter1-7/+11
Some 80-columns pedantry, and touch up of a // comment. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: lock smaller region by host_num_alloc mutexStefan Richter1-4/+1
We need the mutex only around the iteration over existing hosts. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: usecs_to_jiffies takes unsigned int argumentStefan Richter1-5/+3
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: ohci1394: suspend/resume cosmeticsStefan Richter1-78/+48
Reorder the definitions of ohci1394_pci_suspend and _resume. Remove redundant comments. Beautify return statements. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ohci1394: steps to implement suspend/resumeBernhard Kaindl1-14/+78
I did a quick shot on what I described and the appended patch does the first thing needed for working suspend/resume in ohci1394 which is HW de- and re-initialisation. It works with suspend2disk on my Ricoh R5C552 IEEE 1394 Controller with the 2.6.17 kernel to the extent that if I call dvgrab --interactive after suspend2disk without unloading ohci1394, it does not lock up dvgrab with 100% CPU but properly connects to the camera, given that I first unplug and plug the camera after coming back from suspend. I guess that could be fixed by forcing a bus reset in the resume function. I cannot test suspend to RAM here at the moment and should follow the guidelines in Documentation/power/pci.txt also, so this is rather a quick report than a finished patch and there are some rough edges: However, with this patch, I have to unload at least some in-kernel users of ohci1394 like dv1394 or video1394 before suspending. Not doing that caused an Oops and a bad tasklet error, probably from not handling ISO tasklets during suspend/resume properly. Maybe these can be temporarily cleared or unregistered and re-registered for suspend/resume with help from the other layers or from the highlevel 1394 core, but I do not really know what these do. But this patch provides a useful base to start from and is already of much help for people which do not need dv1394 and video1394 or can unload them at least during suspend. I cannot test function with sbp2 at the moment, but raw1394 seems to work fine. Signed-off-by: Bernhard Kaindl <bk@fsfe.org> Update 1: merge with previous two ohci1394 suspend/resume patches Update 2: version for application on top of Linux 2.6.19-rc4 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: raw1394: add comments on lock usageStefan Richter1-5/+5
Add a who-is-who about some locks and list heads in raw1394's struct definitions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: sbp2: slightly reorder sbp2scsi_abortStefan Richter1-8/+2
Put the target's fetch agent into reset state before the underlying ORB DMA is unmapped and the ->done handler is called. It is highly unlikely but the target could access that ORB right before sbp2 sends the reset request. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07ieee1394: remove unused struct member from highlevel APIStefan Richter1-1/+0
struct hpsb_highlevel's struct module *owner is neither used by the IEEE 1394 core nor set by any of the in-tree drivers or the two out-of-tree highlevel drivers I know about (dfg1394, mem1394) --- nor is this member documented. An unscheduled removal seems acceptable. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07[IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAPMatthew Wilcox1-6/+5
make allnoconfig currently fails to build because it selects DISCONTIGMEM without VIRTUAL_MEM_MAP. I see no particular reason this combination ought to fail, so I fixed it by: - Including memory_model.h in all circumstances, except when both DISCONTIGMEM and VIRTUAL_MEM_MAP are enabled. - Defining ia64_pfn_valid() to 1 unless VIRTUAL_MEM_MAP is enabled Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[PATCH] Add support for type argument in PAL_GET_PSTATEVenkatesh Pallipadi2-9/+11
PAL_GET_PSTATE accepts a type argument to return different kinds of frequency information. Refer: Intel Itanium®Architecture Software Developer's Manual - Volume 2: System Architecture, Revision 2.2 (http://developer.intel.com/design/itanium/manuals/245318.htm) Add the support for type argument and use Instantaneous frequency in the acpi driver. Also fix a bug, where in return value of PAL_GET_PSTATE was getting compared with 'control' bits instead of 'status' bits. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] tidy up return value of ip_fast_csumChen, Kenneth W1-1/+2
While working on implementing csum_ipv6_magic, I noticed that current version of ip_fast_csum will potentially return bits above "unsigned short" as 1. While no harm is done right now because all call sites will chop off the upper bits when it uses the return value. However, this is still dangerous and buggy. Here is a patch to enforce that the function really returns unsigned short in the native register format. The fix is free as there are plenty open slot to add one more asm instruction. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] implement csum_ipv6_magic for ia64.Chen, Kenneth W2-2/+59
The asm version is 4.4 times faster than the generic C version and 10X smaller in code size. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] More Itanium PAL spec updatesRuss Anderson2-3/+49
Additional updates to conform with Rev 2.2 of Volume 2 of "Intel Itanium Architecture Software Developer's Manual" (January 2006). Add pal_bus_features_s bits 52 & 53 (page 2:347) Add pal_vm_info_2_s field max_purges (page 2:2:451) Add PAL_GET_HW_POLICY call (page 2:381) Add PAL_SET_HW_POLICY call (page 2:439) Sample output before: --------------------------------------------------------------------- cobra:~ # cat /proc/pal/cpu0/vm_info Physical Address Space : 50 bits Virtual Address Space : 61 bits Protection Key Registers(PKR) : 16 Implemented bits in PKR.key : 24 Hash Tag ID : 0x2 Size of RR.rid : 24 Supported memory attributes : WB, UC, UCE, WC, NaTPage --------------------------------------------------------------------- Sample output after: --------------------------------------------------------------------- cobra:~ # cat /proc/pal/cpu0/vm_info Physical Address Space : 50 bits Virtual Address Space : 61 bits Protection Key Registers(PKR) : 16 Implemented bits in PKR.key : 24 Hash Tag ID : 0x2 Max Purges : 1 Size of RR.rid : 24 Supported memory attributes : WB, UC, UCE, WC, NaTPage --------------------------------------------------------------------- Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] Update processor_info featuresRuss Anderson1-2/+11
Add the printing of additional processor features to proc_features. Based on Rev 2.2 of Volume 2 of "Intel Itanium Architecture Software Developer's Manual" (January 2006) fields (pages 2:430-2:432). This patch gets the features back in sync with the spec. Sample output before: -------------------------------------------------------------- cobra:~ # cat /proc/pal/cpu0/processor_info XIP,XPSR,XFS implemented : On NoCtrl XR1-XR3 implemented : On NoCtrl Disable dynamic predicate prediction : NotImpl Disable processor physical number : NotImpl Disable dynamic data cache prefetch : NotImpl Disable dynamic inst cache prefetch : NotImpl Disable dynamic branch prediction : NotImpl Disable BINIT on processor time-out : On Ctrl Disable dynamic power management (DPM) : NotImpl Disable coherency : NotImpl Disable cache : NotImpl Enable CMCI promotion : Off Ctrl Enable MCA to BINIT promotion : Off Ctrl Enable MCA promotion : NotImpl Enable BERR promotion : NotImpl cobra:~ # -------------------------------------------------------------- Sample output after: -------------------------------------------------------------- cobra:~ # cat /proc/pal/cpu0/processor_info Unimplemented instruction address fault : NotImpl INIT, PMI, and LINT pins : NotImpl Simple unimplimented instr addresses : On NoCtrl Variable P-state performance : NotImpl Virtual machine features implemeted : On NoCtrl XIP,XPSR,XFS implemented : On NoCtrl XR1-XR3 implemented : On NoCtrl Disable dynamic predicate prediction : NotImpl Disable processor physical number : NotImpl Disable dynamic data cache prefetch : NotImpl Disable dynamic inst cache prefetch : NotImpl Disable dynamic branch prediction : NotImpl Disable P-states : Off Ctrl Enable MCA on Data Poisoning : Off Ctrl Enable vmsw instruction : On Ctrl Enable extern environmental notification : NotImpl Disable BINIT on processor time-out : On Ctrl Disable dynamic power management (DPM) : NotImpl Disable coherency : NotImpl Disable cache : NotImpl Enable CMCI promotion : Off Ctrl Enable MCA to BINIT promotion : Off Ctrl Enable MCA promotion : NotImpl Enable BERR promotion : NotImpl cobra:~ # -------------------------------------------------------------- Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] Add se bit to Processor State Parameter structureRuss Anderson1-1/+3
Rev 2.2 of Volume 2 of "Intel Itanium Architecture Software Developer's Manual" (January 2006) adds a se bit to the Processor State Parameter fields (pages 2:299). This patch gets the structs back in sync with the spec. Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] Add dp bit to cache and bus check structsRuss Anderson1-3/+5
Rev 2.2 of Volume 2 of "Intel Itanium Architecture Software Developer's Manual" (January 2006) adds a dp bit to the cache_check and bus_check fields (pages 2:401-2:404). This patch gets the structs back in sync with the spec. Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] SN: Correctly update smp_affinty maskJohn Keller2-7/+15
On Altix systems, the /proc/irq/nn/smp_affinity mask is not being setup at device iniitalization, or updated after an interrupt redirection. This patch resolves those issues. Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] sparse cleanupsMatthew Wilcox2-7/+7
0/NULL confusion and some missing UL on constants. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07[IA64] IA64 Kexec/kdumpZou Nan hai19-6/+969
Changes and updates. 1. Remove fake rendz path and related code according to discuss with Khalid Aziz. 2. fc.i offset fix in relocate_kernel.S. 3. iospic shutdown code eoi and mask race fix from Fujitsu. 4. Warm boot hook in machine_kexec to SN SAL code from Jack Steiner. 5. Send slave to SAL slave loop patch from Jay Lan. 6. Kdump on non-recoverable MCA event patch from Jay Lan 7. Use CTL_UNNUMBERED in kdump_on_init sysctl. Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-12-07Add "run_scheduled_work()" workqueue functionLinus Torvalds3-2/+75
This allows workqueue users to run just their own pending work, rather than wait for the whole workqueue to finish running. This solves the deadlock with networking libphy that was due to other workqueue entries possibly needing a lock that was held by the routine that wanted to flush its own work. It's not wonderful: if you absolutely need to synchronize with the work function having been executed, any user strictly speaking should have its own completion tracking logic, since when we run things explicitly by hand, the generic workqueue layer can no longer help us synchronize. Also, this is strictly only usable for work that has been scheduled without any delayed timers. You can not mix the new interface with schedule_delayed_work(). But it's better than what we had currently. Acked-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[ARM] 3995/1: iop13xx: add iop13xx supportDan Williams28-4/+3324
The iop348 processor integrates an Xscale (XSC3 512KB L2 Cache) core with a Serial Attached SCSI (SAS) controller, multi-ported DDR2 memory controller, 3 Application Direct Memory Access (DMA) controllers, a 133Mhz PCI-X interface, a x8 PCI-Express interface, and other peripherals to form a system-on-a-chip RAID subsystem engine. The iop342 processor replaces the SAS controller with a second Xscale core for dual core embedded applications. The iop341 processor is the single core version of iop342. This patch supports the two Intel customer reference platforms iq81340mc for external storage and iq81340sc for direct attach (HBA) development. The developer's manual is available here: ftp://download.intel.com/design/iio/docs/31503701.pdf Changelog: * removed virtual addresses from resource definitions * cleaned up some unnecessary #include's Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>