As we are wanting to be in the main kernel tree, remove the #ifdef
stuff for different kernel versions.
Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
No need for external .h files for a simple usb-serial driver, move them
into the .c file to make things easier to cleanup.
Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Many thanks to Russell Lang <gsview@ghostgum.com.au> for his
help in getting this working on newer kernel versions and
for pointing out this driver in the first place.
Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix staging/stlc45xx printk format warnings:
drivers/staging/stlc45xx/stlc45xx.c:453: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/stlc45xx/stlc45xx.c:509: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/stlc45xx/stlc45xx.c:718: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/stlc45xx/stlc45xx.c:851: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/stlc45xx/stlc45xx.c:857: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/stlc45xx/stlc45xx.c:1508: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a new driver called stlc45xx, which supports wi-fi chipsets
stlc4550 and stlc4560 from ST-NXP Wireless. The chipset can be found, for
example, from Nokia N800 and N810 products.
The driver is implemented based on the firmware interface information
published by ST-NXP Wireless here:
http://wireless.kernel.org/en/developers/Documentation/specs#STMicroelectronicshardware
Currently only SPI interface is supported.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/pohmelfs/path_entry.c: In function
'pohmelfs_construct_path_string':
drivers/staging/pohmelfs/path_entry.c:48: error: dereferencing pointer to incomplete type
drivers/staging/pohmelfs/path_entry.c:49: error: dereferencing pointer to incomplete type
drivers/staging/pohmelfs/path_entry.c:50: error: dereferencing pointer to incomplete type
drivers/staging/pohmelfs/path_entry.c: In function 'pohmelfs_path_length':
drivers/staging/pohmelfs/path_entry.c:95: error: dereferencing pointer to incomplete type
drivers/staging/pohmelfs/path_entry.c:96: error: dereferencing pointer to incomplete type
drivers/staging/pohmelfs/path_entry.c:97: error: dereferencing pointer to incomplete type
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
pohmelfs wants to use CONNECTOR, so it selects CONNECTOR,
but when CONFIG_NET is not enabled, connector.c will not build,
since select does not follow the dependency chain.
Selecting NET is not a good idea, since that would build lots
of code that someone seemingly didn't want to build/store
and kconfig shouldn't do that behind someone's back.
pohmelfs should depend on NET since it uses network interfaces.
pohmelfs also uses CRYTPO and selects 2 cipher symbols, but
it should also select the top-level CRYPTO symbol since
kconfig dependency chains are not followed.
(found by inspection)
This allows the POHMELFS_CRYPTO option to depend only on
POHMELFS and makes the kconfig menu align properly.
Also fix minor typos & line lengths in kconfig help text.
Drop CONFIG_* in kconfig symbols in Kconfig file.
connector.c:(.text+0x46003): undefined reference to `kfree_skb'
connector.c:(.text+0x460a6): undefined reference to `kfree_skb'
connector.c:(.text+0x4612b): undefined reference to `kfree_skb'
(.text+0x4624f): undefined reference to `netlink_has_listeners'
(.text+0x4629b): undefined reference to `__alloc_skb'
(.text+0x462ea): undefined reference to `kfree_skb'
(.text+0x46308): undefined reference to `skb_put'
(.text+0x46385): undefined reference to `netlink_broadcast'
(.text+0x7b574): undefined reference to `sock_release'
(.text+0x7b8dd): undefined reference to `sock_create'
(.text+0x7b984): undefined reference to `kernel_connect'
(.text+0x7ba4c): undefined reference to `sock_release'
net.c:(.text+0x7bda4): undefined reference to `kernel_recvmsg'
(.text+0x7ef42): undefined reference to `kernel_sendmsg'
(.text+0x7f057): undefined reference to `kernel_sendpage'
(.text+0x7f1e8): undefined reference to `kernel_sendmsg'
connector.c:(.devinit.text+0x5b): undefined reference to `init_net'
connector.c:(.devinit.text+0x60): undefined reference to `netlink_kernel_create'
connector.c:(.devinit.text+0xc9): undefined reference to `netlink_kernel_release'
connector.c:(.devexit.text+0x2c): undefined reference to `netlink_kernel_release'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/pohmelfs/inode.c:917: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
drivers/staging/pohmelfs/inode.c:1036: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
drivers/staging/pohmelfs/trans.c:164: warning: format '%u' expects type 'unsigned int', but argument 5 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:170: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:517: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:600: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:610: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
on Sparc64:
drivers/staging/pohmelfs/net.c:33: error: implicit declaration of function 'vmalloc'
drivers/staging/pohmelfs/net.c:42: error: implicit declaration of function 'vfree'
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds Kconfig and Makefile entries and exports to
VFS functions to be used by POHMELFS.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch implements transaction processing helpers
used to allocate/free/insert/remove and other operations
with the transctions.
Each transction is an object, which may embed multiple commands
completed atomically. When server fails the whole transaction will be
replied against it (or different server) later. This approach allows to
maintain high data integrity and do not desynchronize filesystem state
in case of network or server failures.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a main network processing patch. It includes
both low-level socket machinery, zero-copy sending helpers,
receiving and parsing callbacks and mainly logical
commands handlers.
POHMELFS uses async network approach, when every command
can be separated from its answer and received after some
time after the request during which another lots of commands
can be injected into the network and replies to them received.
With read operation balancing between multiple hosts it is possible
that operations will arrive out of order and this is handled
by the transaction mechanism described partially here.
Having a transaction to guard the set of logically compound operations
allows to send data without thinking about its status and using
zero-copy sending mechanism, since transaction will receive explicit
acks from the servers when they are completed.
This patch also contains header with network srtuctures, commands
and short comments on how they are used.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
POHMELFS utilizes writeback cache, which is built on top of MO(E)SI-like
coherency protocol. This patch includes its implementation and cache
object processing helpers (like allocation and completion callbacks).
POHMELFS uses scalable cached read/write locking. No additional requests
are performed if lock is granted to the filesystem. The same protocol
is used by the server to on-demand flushing of the client's cache (for
example when server wants to update local data).
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is the main patch which implements inode operations
(like reading and writing) and superblock processing
(filesystem registration, initial autoconfiguration
with the server like permissions, size of the exported
dir, amount of the objects created and so on).
POHMELFS relies on system's writeback cache mechanism
shown here, as long as cache coherency protocol described
later.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch implementes all supported directory operations
like directory reading, object lookup, creation, removal
and so on.
Currently object removal is not optimized at all.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
POHMELFS is able to encrypt the whole network channel or
attach the strong checksum to own packets to catch faulty media.
This patch implements crypto initialization, its autoconfiguration
and sync with the server.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch includes POHMELFS configuration interface based
on the netlink kernel connector. This interface allows to create
configuration groups in the kerenel indexed by mount ID option.
Each configuration group can include multiple servers to work
with and various operation parameters.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch includes POHMELFS design and implementation description.
Separate file includes mount options, default parameters and usage examples.
Signed-off-by: Eveniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
On Mon, Jan 19, 2009 at 10:12:24AM -0800, Randy Dunlap (randy.dunlap@oracle.com) wrote:
>
> DST build fails when CONFIG_BLOCK=n:
DST should depend on block and block device, in the original patch its
kconfig entry was in the BLK_DEV menu, so this dependency was satisfied
automatically. Should attached patch be pushed into drivers/staging?
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Do not allow empty barriers or generic_make_request() -> scsi_setup_fs_cmnd()
will explode
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added thread pool exit condition into the thread_pool_del_worker(). If
called in parallel another thread can steal
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use bio prepend feature as suggested by Jens Axboe.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bus_id is going away, use the dev_set_name() function instead.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
DST may fully encrypt the data channel in case of untrusted channel and implement
strong checksum of the transferred data. It is possible to configure algorithms
and crypto keys, they should match on both sides of the network channel.
Crypto processing does not introduce noticeble performance overhead, since DST
uses configurable pool of threads to perform crypto processing.
This patch introduces crypto processing helpers and crypto engine initialization:
glueing with the crypto layer, allocation and initialization of the crypto
processing thread pool, allocation of the cached pages, which are used to temporary
encrypt data into, since it is forbidden to encrypt data in-place, since pages
are used by the higher layers.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
DST uses transaction model, when each store has to be explicitly acked
from the remote node to be considered as successfully written. There
may be lots of in-flight transactions. When remote host does not ack
the transaction it will be resent predefined number of times with specified
timeouts between them. All those parameters are configurable. Transactions
are marked as failed after all resends completed unsuccessfully, having
long enough resend timeout and/or large number of resends allows not to
return error to the higher (FS usually) layer in case of short network
problems or remote node outages. In case of network RAID setup this means
that storage will not degrade until transactions are marked as failed, and
thus will not force checksum recalculation and data rebuild. In case of
connection failure DST will try to reconnect to the remote node automatically.
DST sends ping commands at idle time to detect if remote node is alive.
Because of transactional model it is possible to use zero-copy sending
without worry of data corruption (which in turn could be detected by the
strong checksums though).
Transactions are handled in this patch: allocation/freeing/completion,
scanning for stall and to-be-resent transactions and overall management
of the storing tree.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kernel currently does not allow to queue work into some entity which
will perform it in the process context and have simple way to extend
number of worker and work with them not as separate objects, but with
pool as a whole. So thread pool model was implemented in the DST.
Thread pool abstraction allows to schedule a work to be performed
on behalf of kernel thread. One does not operate with threads itself,
instead user provides setup and cleanup callbacks for thread pool itself,
and action and cleanup callbacks for each submitted work.
Each worker has private data initialized at creation time and data,
provided by user at scheduling time.
When action is being performed, thread can not be used by other users,
instead they will sleep until there is free thread to pick their work.
Thread pool is used for crypto processing of incoming and outgoing IO
requests to reduce the overall overhead.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch introduces remote (export) node machinery: initialization
address/port (and other socket parameters), export block device (can be
another DST storage for example or local device like /dev/sda1), local
IO processing engine (BIO state machines, receiving/submitting logic).
Network management for the export node like accepting new client, scheduling
its command processing thread, receiving/sending IO requests, all are placed
here.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Each DST device contains of two nodes: local and remote (called also as export node).
This patch contains local node processing engine: network state storage,
socket processing loops and state machine, socket polling machinery, reconnection
logic, send/receive basic helpers, related IO commands and so on.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch contains DST core files, which introduce
block layer, connector and sysfs registration glue and main headers.
Connector is used for the configuration of the node (its type, address,
device name and so on). Sysfs provides bits of information about running
devices in the following format:
+/*
+ * DST sysfs tree for device called 'storage':
+ *
+ * /sys/bus/dst/devices/storage/
+ * /sys/bus/dst/devices/storage/type : 192.168.4.80:1025
+ * /sys/bus/dst/devices/storage/size : 800
+ * /sys/bus/dst/devices/storage/name : storage
+ */
DST header contains structure definitions and protocol command description.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Replacing the use of kernel_thread() with kthread_run(). But as
kthread_run() returned a task structure, as compared with
kernel_thread() returning a PID, it was found to be more efficient to
store the task structure pointer as a field data instead of PID
pointer. On top of modifying the field to store task structure
pointer, the initialization of the field (assigned to
THREAD_PID_INIT_VALUE) was also found unnecessary - as no where it is
found to be used.
Signed-off-by: Peter Teoh <htmldeveloper@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Removed the CFLAG RT2860 from Makefile and dependency on it in the driver code.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed remaining four build warnings in drivers/staging/rt2860/:
drivers/staging/rt2860/common/mlme.c:900: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘ULONG’
drivers/staging/rt2860/common/rtmp_init.c:2049: warning: ‘Value’ may be used uninitialized in this function
drivers/staging/rt2860/sta_ioctl.c:361: warning: ‘return’ with a value, in function returning void
drivers/staging/rt2860/sta_ioctl.c:2468: warning: ‘return’ with a value, in function returning void
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: rt2860: Ported v1.7.1.1 changes into v1.8.0.0, becoming v1.8.1.1
When RaLink released rt2860 v1.7.0.0, it lacked proper support for both WEP
and WPA/WPA2 encryption. Either was possible, but the module had to be
compiled to support only one or the other, never both.
Since the EeePC was the most common device with this hardware (and these
users were complaining to RaLink that WPA/WPA2 encryption didn't work)
RaLink released a fix as an "eeepc-specific" version of this driver, v1.7.1.1
Unfortunately, when v1.8.0.0 was released, this WPA/WPA2 fix was never
included.
What complicates things further is that RaLink has no interest in
continuing work on this Linux driver for their hardware.
This commit ports the changes introduced in v1.7.1.1 into the v1.8.0.0
release, upgrading the kernel's module to v1.8.1.1
Signed-off-by: Adam McDaniel <adam@array.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix staging/rt28x0 printk format warnings:
linux-next-20090209/drivers/staging/rt2860/common/spectrum.c:1599: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
linux-next-20090209/drivers/staging/rt2860/rt_linux.c:857: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
linux-next-20090209/drivers/staging/rt2870/common/spectrum.c:1598: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
linux-next-20090209/drivers/staging/rt2870/rt_linux.c:898: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The driver is in mainline now so there's no point in keeping the
kernel version compatibility wrappers around.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
IW_ENCODE_MODE is 0xF000 and thus !erq->flags & IW_ENCODE_MODE is always 0.
I assume that !(erq->flags & IW_ENCODE_MODE) was intended.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ expression E; constant C; @@
(
!E & !C
|
- !E & C
+ !(E & C)
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>