Nitin Gupta [Mon, 17 May 2010 05:32:44 +0000 (11:02 +0530)]
Staging: ramzswap: Handler for swap slot free callback
Install handler for swap_slot_free_notify callback which is called
when a swap slot is no longer used. This handler immediately frees
memory allocated corresponding to the given swap slot.
Nitin Gupta [Mon, 17 May 2010 05:32:43 +0000 (11:02 +0530)]
swap: Add swap slot free callback to block_device_operations
This callback is required when RAM based devices are used as swap disks.
One such device is ramzswap which is used as compressed in-memory swap
disk. For such devices, we need a callback as soon as a swap slot is no
longer used to allow freeing memory allocated for this slot. Without this
callback, stale data can quickly accumulate in memory defeating the whole
purpose of such devices.
Nitin Gupta [Mon, 17 May 2010 05:32:42 +0000 (11:02 +0530)]
swap: Add flag to identify block swap devices
Added SWP_BLKDEV flag to distinguish block and regular file backed
swap devices. We could also check if a swap is entire block device,
rather than a file, by:
S_ISBLK(swap_info_struct->swap_file->f_mapping->host->i_mode)
but, I think, simply checking this flag is more convenient.
This patch removes the private memory allocator
and all conjugated functions. Now the driver uses
videobuf-dma-contig module for allocations.
Added reserving 4MB coherent memory for private
per device allocations at probe time.
Barry Song [Mon, 17 May 2010 10:40:20 +0000 (11:40 +0100)]
staging: iio: adis16350 and similar IMU driver
This version has the right part number in the commit message.
Whilst technically the part I listed last time is also supported
by the driver, the commit message might have caused confusion.
Another driver from Barry at Analog. Again, I've lifted
if from the blackfin tree and done the usual sparse
and checkpatch fixes + the abi changes. I actually
have one of these, so am particularly pleased to see
it supported!
Signed-off-by: Barry Song <Barry.Song@analog.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Sun, 16 May 2010 20:29:25 +0000 (21:29 +0100)]
Staging: iio: max1363 Fix two bugs in single_channel_from_ring
This patch contains fixes for the two bugs Michael pointed
out last week. As the other suggestion Michael made is
not a bug fix (just a much more sensible way of handling
things), I'll do that as a separate patch soon.
The bugs were introduced with the abi changes.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Reported-by: Michael Hennerich <Michael.Hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Kurz [Sat, 15 May 2010 12:09:01 +0000 (16:09 +0400)]
Staging: comedi: Kconfig dependancy fixes
There are three minor changes I would like to do on my last patch:
* Comedi is formally not dependant on any hardware, e.g. it is possible
to use comedi_test without (PCI || PCMCIA || PCCARD || USB || ISA)
* comedi_parport is not dependant on PARPORT_PC.
* indirect ni_mio_cs (16-bit PCMCIA) dependancy on mite PCI-chip may
confuse users, thus changing COMEDI_NI_TIO depends on COMEDI_MITE
to select COMEDI_MITE.
Signed-off-by: Alexander Kurz <linux@kbdbabel.org> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: comedi: fix up build error from last Kconfig changes
We need the 8255 module to be present for some PCI comedi
modules. So for now, just build the thing. We need some better
Kconfig rules to figure this out properly.
Cc: Alexander Kurz <linux@blala.de> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Kurz [Sat, 8 May 2010 08:21:45 +0000 (12:21 +0400)]
Staging: comedi: new Kconfig and Makefiles, drivers grouped by bustype.
PC/104-drivers went into ISA,
PC/104+ went into PCI,
Drivers without a bustype went into "misc".
In doubt drivers supporting both ISA/PCI went into PCI.
Drivers without any detailed hardware info went into ISA, e.g. fl512.c
Some NI drivers are used by other NI drivers from different bustypes
are grouped seperately in NI_COMMON.
[tweaked by gregkh to handle the new driver recently added]
Signed-off-by: Alexander Kurz <linux@kbdbabel.org> Acked-by: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@speakeasy.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Christoph Fritz [Sun, 16 May 2010 21:45:59 +0000 (23:45 +0200)]
Staging: wlan-ng prism2usb: add suspend/resume
There is no need trying to load the (even in most cases) not availible
firmware after suspend. This saves about 30 secounds on reset waiting
for timeout.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexander Kurz [Thu, 13 May 2010 09:56:16 +0000 (13:56 +0400)]
staging: comedi PCMCIA-drivers: adding MODULE_AUTHOR, MODULE_DESCRIPTION and MODULE_LICENSE
this adds and sorts the module labels MODULE_AUTHOR, MODULE_DESCRIPTION
and MODULE_LICENSE for all comedi PCMCIA drivers.
Signed-off-by: Alexander Kurz <linux@kbdbabel.org> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Henk de Groot [Thu, 13 May 2010 14:27:33 +0000 (16:27 +0200)]
Staging: wlags49_hs2: Fix wlags49_hs2 driver after build fixes broke it
Fixes the driver after merge into the 2.6.34 kernel. Driver should
be functional again (a fix to make it compile broke the driver).
Patch against 2.6.34 RC7 with patch-v2.6.34-rc7-next-20100513
already applied.
Removed conditional code based on kernel version, this is pointless
now the driver is part of the kernel. Also removed obsolte code
left over from previous patches. Includes also small fixes to compile
clean again.
Signed-off-by: Henk de Groot <pe1dnn@amsat.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Nitin Gupta [Thu, 13 May 2010 08:54:21 +0000 (14:24 +0530)]
Staging: ramzswap: Remove backing swap support
Currently, each ramzswap device can be assigned
a separate 'backing swap' file/partition. The ramzswap
driver forwards swap I/O requests to this backing swap
whenever an incompressible page is found.
This feature adds nearly 700 lines of code and it
also duplicates much of the swapon() functionality
(for example, finding swap extents and so on). Removing
this code makes the driver much simpler and should
help its transition from staging to stable drivers
area (drivers/block/).
Similar functionality may be implemented if we can
implement migrating pages across swap devices but the
details have not yet been worked out.
Support for _partitions_ as backing swap could be
retained as it requires a few lines of code only.
This part can be re-introduced later if above swap
migration method turns out to be infeasible.
More cleanups and code comments will be added soon.
Paul E. McKenney [Tue, 11 May 2010 23:33:01 +0000 (16:33 -0700)]
staging: batman: remove all rcu head initializations
Remove all rcu head inits. We don't care about the RCU head state before
passing it to call_rcu() anyway. Only leave the "on_stack" variants so
debugobjects can keep track of objects on stack.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Larry Finger [Mon, 10 May 2010 03:10:02 +0000 (22:10 -0500)]
staging: vt6655: Fix kernel BUG on driver wpa initialization
In http://bugzilla.novell.com/show_bug.cgi?id=597299, the vt6655 driver
generates a kernel BUG on a NULL pointer dereference at NULL. This problem
has been traced to a failure in the wpa_set_wpadev() routine. As the vt6656
driver does not call this routine, the vt6655 code is similarly set to skip
the call.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Richard Meek <osl2008@googlemail.com> Cc: Stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marin Mitov [Sun, 9 May 2010 11:50:40 +0000 (14:50 +0300)]
Staging: dt3155v4l: correcting a bug
dt3155v4l driver, as in -rc6-next-20100506 has a BUG.
When it modifies q->int_ops structure in videobuf-dma-contig
module the change is visible for all other modules using it.
Make a local copy of this structure and use its modification
to solve the bug.
staging: rtl8192x: sync the various rtl819x_Qos.h files
The rtl8192e, rtl8192su, and rtl8192u drivers all share what appears
to be a common private ieee80211 stack. Various patches have been
applied to the rtl819x_Qos.h file for some of the drivers but not the
others.
This sync's the files based on all the applied patches.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: rtl8192x: sync the various rtl819x_TSProc.c files
The rtl8192e, rtl8192su, and rtl8192u drivers all share what appears
to be a common private ieee80211 stack. Various patches have been
applied to the rtl819x_TSProc.c file for some of the drivers but not
the others.
This sync's the files based on all the applied patches.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lars Lindley [Sat, 8 May 2010 12:53:54 +0000 (14:53 +0200)]
staging: winbond: localpara.h whitespace and indentation fixes.
I fixed all problems found by checkpatch.pl except a number of long
lines that I didn't find a good way to break up and still keep it
readable. I added the () to #define MAX_IE_APPEND_SIZE (256 + 4).
I also moved som comments around after pointers from Pekka.
Signed-off-by: Lars Lindley <lindley@coyote.org> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: adis16255 - TODO issues resolved and typos removed
This patch adds the adis16255 driver to the build system under the staging directory.
It solves also most issues mentioned in TODO list:
- sample rate exported to sysfs
- spi_adis16255_bringup and spi_adis16255_shutdown encapsulated
- chip selftest in spi_adis16255_bringup
- kernel messages reduced to a reasonable number
I removed the TODO file, because ther was only the reset of the gyroscope left.
This is IMOH not necessary for the actual driver.
There are also some typos in adis.c file. This patch should get rid of them as well.
Marin Mitov [Fri, 7 May 2010 08:00:35 +0000 (11:00 +0300)]
staging: dt3155v4l syncronize with API changes
dt3155v4l driver, as in -rc6-next-20100506 compiles, but will
not run properly due to recent changes in the videobuf APIs.
This patch synchronizes some functions that have been copied
from drivers/media/video/videobuf-dma-contig.c (and modified)
with the recent (-rc6 -> -rc6-next-) changes in videobuf layer
especially drivers/media/video/videobuf-dma-contig.c
Randy Dunlap [Thu, 6 May 2010 23:45:10 +0000 (16:45 -0700)]
staging: ti-st: depends on RFKILL
Fix build errors. st_kim.c uses rfkill*() interfaces, so it
should depend on RFKILL.
st_kim.c:(.text+0x291b21): undefined reference to `rfkill_unregister'
st_kim.c:(.text+0x291b31): undefined reference to `rfkill_destroy'
st_kim.c:(.text+0x291d8a): undefined reference to `rfkill_alloc'
st_kim.c:(.text+0x291db9): undefined reference to `rfkill_init_sw_state'
st_kim.c:(.text+0x291dc9): undefined reference to `rfkill_register'
st_kim.c:(.text+0x291e07): undefined reference to `rfkill_unregister'
(.text+0x291e85): undefined reference to `rfkill_set_hw_state'
(.text+0x292072): undefined reference to `rfkill_set_hw_state'
(.text+0x2920e1): undefined reference to `rfkill_set_hw_state
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Thu, 6 May 2010 23:44:08 +0000 (16:44 -0700)]
staging: cxt1e1: fix semaphore build breakage
Fix build errors by including linux/semaphore.h:
drivers/staging/cxt1e1/pmcc4_private.h:144: error: field 'sr_sem_busy' has incomplete type
drivers/staging/cxt1e1/pmcc4_private.h:146: error: field 'sr_sem_wait' has incomplete type
drivers/staging/cxt1e1/pmcc4_private.h:189: error: field 'sem_wdbusy' has incomplete type
drivers/staging/cxt1e1/musycc.c:617: error: implicit declaration of function 'down'
drivers/staging/cxt1e1/musycc.c:641: error: implicit declaration of function 'up'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Fri, 7 May 2010 19:47:29 +0000 (21:47 +0200)]
Staging: batman-adv: Fix whitespace problems criticized by checkpatch.pl
Trailing spaces at the end of a line or before a tab are against
Documentation/CodingStyle "3.1: Spaces" and should be avoided. It is
also common style to add a single space after commas unless it is
followed either by a newline or a tab.
Reported-by: Mikal Sande <mikal.sande@gmail.com> Reported-by: Luis de Bethencourt <luisbg@ubuntu.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Fri, 7 May 2010 19:47:27 +0000 (21:47 +0200)]
Staging: batman-adv: Update pointer to ethhdr after skb_copy
We must ensure that all pointer to a socket buffer are updated when we
copy a socket buffer and free our reference to the old one.
Another part of the kernel could also free its reference which maybe
removes the buffer completely. In that situation we would would feed
wrong information to the routing algorithm after the memory area is
written again by someone else.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: batman-adv: Limit queue lengths for batman and broadcast packets
This patch limits the queue lengths of batman and broadcast packets. BATMAN
packets are held back for aggregation and jittered to avoid interferences.
Broadcast packets are stored to be sent out multiple times to increase
the probability to be received by other nodes in lossy environments.
Especially in extreme cases like broadcast storms, the queues have been seen
to run full, eating up all the memory and triggering the infamous OOM killer.
With the queue length limits introduced in this patch, this problem is
avoided.
Each queue is limited to 256 entries for now, resulting in 1 MB of maximum
space available in total for typical setups (assuming one packet including
overhead does not require more than 2000 byte). This should also be reasonable
for smaller routers, otherwise the defines can be tweaked later.
This third version of the patch does not increase the local broadcast
sequence number when the queue is already full.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: batman-adv: Reorganize sequence number handling
BATMAN and broadcast packets are tracked with a sequence number window of
currently 64 entries to measure and avoid duplicates. Packets which have a
sequence number smaller than the newest received packet minus 64 are not
within this sequence number window anymore and are called "old packets"
from now on.
When old packets are received, the routing code assumes that the host of the
originator has been restarted. This assumption however might be wrong as
packets can also be delayed by NIC drivers, e.g. because of long queues or
collision detection in dense WiFi? environments. This behaviour can be
reproduced by doing a broadcast ping flood in a dense node environment.
The effect is that the sequence number window is jumping forth and back,
accepting and forwarding any packet (because packets are assumed to be "new")
and causing loops.
To overcome this problem, the sequence number handling has been reorganized.
When an old packet is received, the window is reset back only once. Other old
packets are dropped for (currently) 30 seconds to "protect" the new sequence
number and avoid the hopping as described above.
The reorganization brings some code cleanups (at least i hope you feel the
same) and also fixes a bug in count_real_packets() which falsely updated
the last_real_seqno for slightly older packets within the seqno window
if they are no duplicates.
This second version of the patch also fixes a problem where for seq_diff==64
bit_shift() reads from outside of the seqno window, and removes the loop
for seq_diff == -64 which was present in the first patch.
The third iteration also adds a window for the next expected sequence numbers.
This minimizes sequence number flapping for packets with very big differences
(e.g. 3 packets with seqno 0, 25000 and 50000 might still cause problems
without this window).
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>