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>
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>
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>
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>
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>
- 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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
PAL_GET_PSTATE accepts a type argument to return different kinds of
frequency information.
Refer: Intel ItaniumArchitecture 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>
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>
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>
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>
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>
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>
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>
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>
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>
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[PATCH] libata: Incorrect timing computation for PIO5/6
[PATCH] sata_promise: new EH conversion, take 2
[PATCH] libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATA
[PATCH] sata_promise: cleanups, take 2
* master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (73 commits)
[DLM] Clean up lowcomms
[GFS2] Change gfs2_fsync() to use write_inode_now()
[GFS2] Fix indent in recovery.c
[GFS2] Don't flush everything on fdatasync
[GFS2] Add a comment about reading the super block
[GFS2] Mount problem with the GFS2 code
[GFS2] Remove gfs2_check_acl()
[DLM] fix format warnings in rcom.c and recoverd.c
[GFS2] lock function parameter
[DLM] don't accept replies to old recovery messages
[DLM] fix size of STATUS_REPLY message
[GFS2] fs/gfs2/log.c:log_bmap() fix printk format warning
[DLM] fix add_requestqueue checking nodes list
[GFS2] Fix recursive locking in gfs2_getattr
[GFS2] Fix recursive locking in gfs2_permission
[GFS2] Reduce number of arguments to meta_io.c:getbuf()
[GFS2] Move gfs2_meta_syncfs() into log.c
[GFS2] Fix journal flush problem
[GFS2] mark_inode_dirty after write to stuffed file
[GFS2] Fix glock ordering on inode creation
...