openwrt/staging/blogic.git
15 years agoStaging: comedi: add rti802 driver
Anders Blomdell [Wed, 18 Feb 2009 00:23:41 +0000 (16:23 -0800)]
Staging: comedi: add rti802 driver

Driver for Analog Devices RTI-802 board

From: Anders Blomdell <anders.blomdell@control.lth.se>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add s526 driver
Everett Wang [Wed, 18 Feb 2009 00:22:34 +0000 (16:22 -0800)]
Staging: comedi: add s526 driver

For Sensoray 526 devices

From: Everett Wang <everett.wang@everteq.com>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add pcl818 driver
Michal Dobes [Wed, 18 Feb 2009 00:21:06 +0000 (16:21 -0800)]
Staging: comedi: add pcl818 driver

For Advantech cards:
PCL-818L, PCL-818H, PCL-818HD, PCL-818HG, PCL-818, PCL-718

From: Michal Dobes <dobes@tesnet.cz>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add pcl821 driver
Michal Dobes [Wed, 18 Feb 2009 00:19:16 +0000 (16:19 -0800)]
Staging: comedi: add pcl821 driver

hardware driver for Advantech cards:
PCL-812, PCL-812PG, PCL-813, PCL-813B
and for ADlink cards:
ACL-8112DG, ACL-8112HG, ACL-8112PG, ACL-8113, ACL-8216
and for ICP DAS cards:
ISO-813, A-821PGH, A-821PGL, A-821PGL-NDA, A-822PGH, A-822PGL,
A-823PGH, A-823PGL, A-826PG

From: Michal Dobes <dobes@tesnet.cz>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add pcl724 driver
Michal Dobes [Wed, 18 Feb 2009 00:17:46 +0000 (16:17 -0800)]
Staging: comedi: add pcl724 driver

For Advantech cards:
PCL-724, PCL-722, PCL-731 ADLink ACL-7122, ACL-7124, PET-48DIO

From: Michal Dobes <dobes@tesnet.cz>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adl_pci7296 driver
Jon Grierson [Fri, 13 Feb 2009 00:20:31 +0000 (16:20 -0800)]
Staging: comedi: add adl_pci7296 driver

Driver for the Adlink PCI-7296 96 ch. digital io board

From: Jon Grierson <jd@renko.co.uk>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add serial2002 driver
Anders Blomdell [Fri, 13 Feb 2009 00:27:11 +0000 (16:27 -0800)]
Staging: comedi: add serial2002 driver

Driver for serial connected hardware

From: Anders Blomdell <anders.blomdell@control.lth.se>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add skeleton driver
David Schleef [Fri, 13 Feb 2009 00:26:16 +0000 (16:26 -0800)]
Staging: comedi: add skeleton driver

Example skeleton comedi driver

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add ssv_dnp driver
Robert Schwebel [Fri, 13 Feb 2009 00:25:34 +0000 (16:25 -0800)]
Staging: comedi: add ssv_dnp driver

driver for SSV Embedded Systems' DIL/Net-PCs

From: Robert Schwebel <robert@schwebel.de>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add unioxx5 driver
Kruchinin Daniil [Fri, 13 Feb 2009 00:24:49 +0000 (16:24 -0800)]
Staging: comedi: add unioxx5 driver

Driver for Fastwel UNIOxx-5 (analog and digital i/o) boards

From: Kruchinin Daniil <asgard@etersoft.ru>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adq12b driver
Jeremy Theler [Fri, 13 Feb 2009 00:23:56 +0000 (16:23 -0800)]
Staging: comedi: add adq12b driver

driver for MicroAxial ADQ12-B data acquisition and control card

From: Jeremy Theler <thelerg@ib.cnea.gov.ar>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adl_pci9111 driver
Emmanuel Pacaud [Fri, 13 Feb 2009 00:23:11 +0000 (16:23 -0800)]
Staging: comedi: add adl_pci9111 driver

Hardware driver for PCI9111 ADLink cards

From: Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adl_pci8164 driver
Michel Lachaine [Fri, 13 Feb 2009 00:22:25 +0000 (16:22 -0800)]
Staging: comedi: add adl_pci8164 driver

Driver for the Adlink PCI-8164 4 Axes Motion Control board
board

From: Michel Lachaine <mike@mikelachaine.ca>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adl_pci7432 driver
Michel Lachaine [Fri, 13 Feb 2009 00:21:11 +0000 (16:21 -0800)]
Staging: comedi: add adl_pci7432 driver

Driver for the Adlink PCI-7432 64 ch. isolated digital io board

From: Michel Lachaine <mike@mikelachaine.ca>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add comedi_rt_timer virtual driver
David Schleef [Fri, 13 Feb 2009 00:19:47 +0000 (16:19 -0800)]
Staging: comedi: add comedi_rt_timer virtual driver

virtual driver for using RTL timing sources

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add das08 drivers
David Schleef [Fri, 13 Feb 2009 00:09:00 +0000 (16:09 -0800)]
Staging: comedi: add das08 drivers

Supports [Keithley Metrabyte] DAS08 (isa-das08), [ComputerBoards] DAS08
(isa-das08), DAS08-PGM (das08-pgm), DAS08-PGH (das08-pgh), DAS08-PGL
(das08-pgl), DAS08-AOH (das08-aoh), DAS08-AOL (das08-aol), DAS08-AOM
(das08-aom), DAS08/JR-AO (das08/jr-ao), DAS08/JR-16-AO (das08jr-16-ao),
PCI-DAS08 (das08), PC104-DAS08 (pc104-das08), DAS08/JR/16 (das08jr/16)
[ComputerBoards] PCM-DAS08 (pcm-das08)

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add jr3_pci driver
Anders Blomdell [Fri, 13 Feb 2009 00:07:16 +0000 (16:07 -0800)]
Staging: comedi: add jr3_pci driver

hardware driver for JR3/PCI force sensor board

From: Anders Blomdell <anders.blomdell@control.lth.se>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add nt_pcimio driver
David Schleef [Thu, 12 Feb 2009 23:54:06 +0000 (15:54 -0800)]
Staging: comedi: add nt_pcimio driver

Hardware driver for NI PCI-MIO E series cards

Supports PCI-MIO-16XE-10, PXI-6030E, PCI-MIO-16E-1, PCI-MIO-16E-4,
PCI-6014, PCI-6040E, PXI-6040E, PCI-6030E, PCI-6031E, PCI-6032E,
PCI-6033E, PCI-6071E, PCI-6023E, PCI-6024E, PCI-6025E, PXI-6025E,
PCI-6034E, PCI-6035E, PCI-6052E, PCI-6110, PCI-6111, PCI-6220,
PCI-6221, PCI-6224, PCI-6225, PCI-6229, PCI-6250, PCI-6251, PCIe-6251,
PCI-6254, PCI-6259, PCIe-6259, PCI-6280, PCI-6281, PXI-6281, PCI-6284,
PCI-6289, PCI-6711, PXI-6711, PCI-6713, PXI-6713, PXI-6071E,
PCI-6070E, PXI-6070E, PXI-6052E, PCI-6036E, PCI-6731, PCI-6733,
PXI-6733, PCI-6143, PXI-6143

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add nt_mio_cs driver
David Schleef [Thu, 12 Feb 2009 23:52:59 +0000 (15:52 -0800)]
Staging: comedi: add nt_mio_cs driver

Hardware driver for NI PCMCIA MIO E series cards
Supports DAQCard-AI-16XE-50 (ni_mio_cs), DAQCard-AI-16E-4,
DAQCard-6062E, DAQCard-6024E, DAQCard-6036E

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add nt_atmio driver
David Schleef [Thu, 12 Feb 2009 23:51:45 +0000 (15:51 -0800)]
Staging: comedi: add nt_atmio driver

Hardware driver for NI AT-MIO E series cards
Supports the AT-MIO-16E-2, AT-MIO-16E-10, AT-MIO-16DE-10,
AT-MIO-64E-3, AT-MIO-16XE-50, AT-MIO-16XE-10, AT-AI-16XE-10 cards

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add ni_labpc drivers
Frank Mori Hess [Thu, 12 Feb 2009 23:49:25 +0000 (15:49 -0800)]
Staging: comedi: add ni_labpc drivers

This supports National Instruments Lab-PC and compatibles

From: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add cb_pcidas driver
Ivan Martinez [Thu, 12 Feb 2009 23:47:34 +0000 (15:47 -0800)]
Staging: comedi: add cb_pcidas driver

For MeasurementComputing PCI-DAS series with the AMCC S5933 PCI
controller

From: Ivan Martinez <imr@oersted.dtu.dk>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adv_pci1710 driver
Michal Dobes [Thu, 12 Feb 2009 23:46:45 +0000 (15:46 -0800)]
Staging: comedi: add adv_pci1710 driver

For Advantech cards:
PCI-1710, PCI-1710HG, PCI-1711, PCI-1713, PCI-1720,

From: Michal Dobes <dobes@tesnet.cz>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adl_pci9118 driver
Michal Dobes [Thu, 12 Feb 2009 23:44:54 +0000 (15:44 -0800)]
Staging: comedi: add adl_pci9118 driver

For ADLink cards:
PCI-9118DG, PCI-9118HG, PCI-9118HR

From: Michal Dobes <dobes@tesnet.cz>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add amcc_s5933 header file
Michal Dobes [Thu, 12 Feb 2009 23:44:03 +0000 (15:44 -0800)]
Staging: comedi: add amcc_s5933 header file

This is used for any AMCC S5933 PCI controller code

From: Michal Dobes <dobes@tesnet.cz>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add National Instruments infrastructure
Frank Mori Hess [Thu, 12 Feb 2009 23:39:24 +0000 (15:39 -0800)]
Staging: comedi: add National Instruments infrastructure

These drivers are used to support National Instruments general purpose
counters and commands.

From: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: J.P. Mellor <jpmellor@rose-hulman.edu>
Cc: Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
Cc: Wim Meeussen <Wim.Meeussen@mech.kuleuven.ac.be>
Cc: Klass Gadeyne <Klaas.Gadeyne@mech.kuleuven.ac.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add cb_pcimdas driver
Richard Bytheway [Thu, 12 Feb 2009 23:36:37 +0000 (15:36 -0800)]
Staging: comedi: add cb_pcimdas driver

For Measurement Computing PCI Migration series boards

From: Richard Bytheway <mocelet@sucs.org>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add amplc_pc236 driver
Ian Abbott [Thu, 12 Feb 2009 23:35:39 +0000 (15:35 -0800)]
Staging: comedi: add amplc_pc236 driver

for Amplicon PC36AT and PCI236 devices

From: Ian Abbott <abbotti@mev.co.uk>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add plx9052 header file
David Schleef [Thu, 12 Feb 2009 23:34:40 +0000 (15:34 -0800)]
Staging: comedi: add plx9052 header file

This is used by multiple comedi drivers.

It is the definitions for the PLX-9052 PCI interface chip

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add rti800 driver
David Schleef [Thu, 12 Feb 2009 23:30:25 +0000 (15:30 -0800)]
Staging: comedi: add rti800 driver

for Analog Devices RTI-800/815 devices

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add adl_pci6208 driver
nsyeow [Thu, 12 Feb 2009 23:28:32 +0000 (15:28 -0800)]
Staging: comedi: add adl_pci6208 driver

For ADLink PCI-6208A devices

From: nsyeow <nsyeow@pd.jaring.my>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add acl7225b driver
José Luis Sánchez [Thu, 12 Feb 2009 23:26:54 +0000 (15:26 -0800)]
Staging: comedi: add acl7225b driver

For Adlink NuDAQ ACL-7225b & compatibles

From: José Luis Sánchez <jsanchezv@teleline.es>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add 8255 driver
David Schleef [Thu, 12 Feb 2009 23:25:27 +0000 (15:25 -0800)]
Staging: comedi: add 8255 driver

The classic in digital I/O.

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add 8253.h header
David Schleef [Thu, 12 Feb 2009 23:23:59 +0000 (15:23 -0800)]
Staging: comedi: add 8253.h header

This is needed by a bunch of different comedi drivers.

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: add addi-data drivers
ADDI-DATA GmbH [Thu, 12 Feb 2009 23:14:18 +0000 (15:14 -0800)]
Staging: comedi: add addi-data drivers

This adds the addi-data family of comedi drivers to the staging tree

From: ADDI-DATA GmbH <info@addi-data.com>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: Move a dereference below a NULL test
Julia Lawall [Fri, 26 Dec 2008 07:28:58 +0000 (08:28 +0100)]
Staging: comedi: Move a dereference below a NULL test

If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/).

// <smpl>
@disable is_null@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (E == NULL) S
  f(...,E->fld,...);
- if (E == NULL) S

@@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (!E) S
  f(...,E->fld,...);
- if (!E) S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: introduce missing kfree
Julia Lawall [Thu, 25 Dec 2008 20:10:30 +0000 (21:10 +0100)]
Staging: comedi: introduce missing kfree

Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: Use DEFINE_SPINLOCK
Julia Lawall [Thu, 25 Dec 2008 14:34:44 +0000 (15:34 +0100)]
Staging: comedi: Use DEFINE_SPINLOCK

SPIN_LOCK_UNLOCKED is deprecated.  The following makes the change suggested
in Documentation/spinlocks.txt

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
declarer name DEFINE_SPINLOCK;
identifier xxx_lock;
@@

- spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
+ DEFINE_SPINLOCK(xxx_lock);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: comedi: Correct use of ! and &
Julia Lawall [Wed, 24 Dec 2008 15:23:10 +0000 (16:23 +0100)]
Staging: comedi: Correct use of ! and &

0x20 has 0 as its rightmost bit and thus !inl(info->plx_regbase +
PLX_INTCSR) & 0x20 is always 0.  I assume that !(!inl(info->plx_regbase +
PLX_INTCSR) & 0x20) 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>
15 years agoStaging: phison: depends on PCI
Randy Dunlap [Thu, 19 Feb 2009 17:47:32 +0000 (09:47 -0800)]
Staging: phison: depends on PCI

phison uses PCI interfaces, so it should depend on PCI.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: phison: fix kconfig for clean build
Randy Dunlap [Mon, 16 Feb 2009 16:46:16 +0000 (08:46 -0800)]
Staging: phison: fix kconfig for clean build

phison is an ATA driver, not a classic IDE driver, so fix the Kconfig file
so that it will build.

drivers/staging/phison/phison.c:43: error: implicit declaration of function 'ATA_BMDMA_SHT'
drivers/staging/phison/phison.c:43: error: initializer element is not constant
drivers/staging/phison/phison.c:43: error: (near initialization for 'phison_sht.module')
drivers/staging/phison/phison.c:47: error: 'ata_bmdma_port_ops' undeclared here (not in a function)
drivers/staging/phison/phison.c:65: error: implicit declaration of function 'ata_pci_sff_init_one'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: phison: add driver to the build system
Greg Kroah-Hartman [Mon, 9 Feb 2009 21:02:35 +0000 (13:02 -0800)]
Staging: phison: add driver to the build system

Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: phison: port code to work properly with latest libata
Greg Kroah-Hartman [Thu, 12 Feb 2009 21:37:51 +0000 (13:37 -0800)]
Staging: phison: port code to work properly with latest libata

This brings the driver up to modern times so that it can build and run
properly with the in-tree libata code.

Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: phison: fix up checkpatch and other formatting issues
Greg Kroah-Hartman [Thu, 12 Feb 2009 21:36:54 +0000 (13:36 -0800)]
Staging: phison: fix up checkpatch and other formatting issues

Minor touchups to fix up the coding style issues in the phison driver.

Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: add phison ATA driver to the tree
Evan Ko [Mon, 9 Feb 2009 21:02:35 +0000 (13:02 -0800)]
Staging: add phison ATA driver to the tree

It doesn't build properly yet as it is against an older kernel version.
That will be fixed up in patches following this.

From: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: b3dfg: Prepare b3dfg for submission upstream.
Justin Bronder [Wed, 28 Jan 2009 15:06:42 +0000 (10:06 -0500)]
Staging: b3dfg: Prepare b3dfg for submission upstream.

- Basically, update driver to run with 2.6.28
    - Conversion from struct class_device to struct device.
    - Conversion from .nopfn to .fault in vm_operations_struct.
    - Update use of pci_resource_flags to check for IORESOURCE_SIZEALIGN.
    - Update use of pci_dma_mapping_error.
- Minor code cleanup and integration with kernel build system.

Signed-off-by: Justin Bronder <jsbronder@brontes3d.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: b3dfg: fixups and improvements
Duane Griffin [Wed, 28 Jan 2009 14:50:37 +0000 (09:50 -0500)]
Staging: b3dfg: fixups and improvements

- Added support for cable plug/unplug detection.
 - Improvements to error handling.
 - Switch to the pci_* DMA API.
 - Removed set_num_buffers functionality.
 - Locking review.
 - Unconditionally disable transmission when releasing device.

Signed-off-by: Justin Bronder <jsbronder@brontes3d.com>
Cc: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: add b3dfg driver
Daniel Drake [Wed, 28 Jan 2009 14:38:07 +0000 (09:38 -0500)]
Staging: add b3dfg driver

Initial b3dfg driver development as preformed by Daniel Drake.  All
basic functionality is completed.

Signed-off-by: Justin Bronder <jsbronder@brontes3d.com>
Cc: Daniel Drake <ddrake@brontes3d.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix checkpatch errors and warnings
Greg Kroah-Hartman [Wed, 4 Feb 2009 05:36:46 +0000 (21:36 -0800)]
Staging: aten2011: fix checkpatch errors and warnings

After this, only warnings are line length ones.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: s/__FUNCTION__/__func__
Greg Kroah-Hartman [Wed, 4 Feb 2009 05:35:55 +0000 (21:35 -0800)]
Staging: aten2011: s/__FUNCTION__/__func__

replace __FUNCTION__ with __func__

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove DPRINTK macro
Greg Kroah-Hartman [Wed, 4 Feb 2009 00:06:19 +0000 (16:06 -0800)]
Staging: aten2011: remove DPRINTK macro

Convert to use the dbg() macro we already have in the usb-serial layer.
This also turns off the default for the driver to spit out all of the
debug messages, now it is controlled by the module parameter.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up c++ comments
Greg Kroah-Hartman [Wed, 4 Feb 2009 00:06:19 +0000 (16:06 -0800)]
Staging: aten2011: fix up c++ comments

Convert all C++ comments to /* */

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove wrappers around serial get and put data functions
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:37:00 +0000 (15:37 -0800)]
Staging: aten2011: remove wrappers around serial get and put data functions

Don't wrap things that do not need to be wrapped...

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: delete the Dump_serial_port function
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:36:30 +0000 (15:36 -0800)]
Staging: aten2011: delete the Dump_serial_port function

It's useless, drop it.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up the get_uart_reg function
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:36:09 +0000 (15:36 -0800)]
Staging: aten2011: fix up the get_uart_reg function

Name it something sane, and fix up the code to be cleaner.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up the set_uart_reg function
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:35:50 +0000 (15:35 -0800)]
Staging: aten2011: fix up the set_uart_reg function

Name it something sane, and fix up the code to be cleaner.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up the get_reg_sync function
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:35:31 +0000 (15:35 -0800)]
Staging: aten2011: fix up the get_reg_sync function

Name it something sane, and fix up the code to be cleaner.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up the set_reg_sync function
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:32:18 +0000 (15:32 -0800)]
Staging: aten2011: fix up the set_reg_sync function

Name it something sane, and fix up the code to be cleaner.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove paranoia check functions
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:31:38 +0000 (15:31 -0800)]
Staging: aten2011: remove paranoia check functions

They are useless so lets remove them.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: clean up init and exit functions
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:30:48 +0000 (15:30 -0800)]
Staging: aten2011: clean up init and exit functions

This makes them smaller, and fixes the name of the serial driver
structure.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove unused fields from structures.
Greg Kroah-Hartman [Fri, 30 Jan 2009 23:29:52 +0000 (15:29 -0800)]
Staging: aten2011: remove unused fields from structures.

As the driver was copied from another one, there are lots of fields that
are unused due to the hardware being different.  Remove a bunch of them,
more will be removed later.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up sparse warnings
Greg Kroah-Hartman [Fri, 30 Jan 2009 01:17:48 +0000 (17:17 -0800)]
Staging: aten2011: fix up sparse warnings

This resolves all of the sparse warnings.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove function prototypes.
Greg Kroah-Hartman [Fri, 30 Jan 2009 01:10:43 +0000 (17:10 -0800)]
Staging: aten2011: remove function prototypes.

Reorginize functions to get rid of forward prototypes so they are no
longer needed.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove unneeded defines
Greg Kroah-Hartman [Fri, 30 Jan 2009 00:57:23 +0000 (16:57 -0800)]
Staging: aten2011: remove unneeded defines

Lots of unused and unneeded #defines in this code, so lets remove them.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: fix up comments by removing most of them.
Greg Kroah-Hartman [Fri, 30 Jan 2009 00:41:35 +0000 (16:41 -0800)]
Staging: aten2011: fix up comments by removing most of them.

This driver was copied from the io_edgeport.c driver, so we need to put
the proper copyright information back on it.

Also, almost all of the function comments are directly from the original
io_edgeport driver, and most of them are either totally wrong now due to
changes, or redundant.  So delete them all so no one gets confused by
anything.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: remove kernel version dependencies
Greg Kroah-Hartman [Thu, 29 Jan 2009 21:08:23 +0000 (13:08 -0800)]
Staging: aten2011: remove kernel version dependencies

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>
15 years agoStaging: aten2011: move .h files into the driver
Greg Kroah-Hartman [Thu, 29 Jan 2009 20:57:52 +0000 (12:57 -0800)]
Staging: aten2011: move .h files into the driver

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>
15 years agoStaging: aten2011: run lindent
Greg Kroah-Hartman [Thu, 29 Jan 2009 20:54:01 +0000 (12:54 -0800)]
Staging: aten2011: run lindent

Run scripts/Lindent on the driver

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: add aten2011 usb to serial converter driver.
Greg Kroah-Hartman [Wed, 28 Jan 2009 07:28:27 +0000 (23:28 -0800)]
Staging: add aten2011 usb to serial converter driver.

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>
15 years agoStaging: stlc45xx: fix printk format warnings
Randy Dunlap [Wed, 11 Feb 2009 21:21:46 +0000 (13:21 -0800)]
Staging: stlc45xx: fix printk format warnings

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>
15 years agoStaging: Add stlc45xx, wi-fi driver for stlc4550/4560
Kalle Valo [Wed, 7 Jan 2009 20:01:20 +0000 (22:01 +0200)]
Staging: Add stlc45xx, wi-fi driver for stlc4550/4560

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>
15 years agoStaging: pohmelfs: should include fs_struct.h
Alexander Beregalov [Thu, 2 Apr 2009 11:37:10 +0000 (15:37 +0400)]
Staging: pohmelfs: should include fs_struct.h

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>
15 years agoStaging: pohmelfs: fix kconfig dependencies
Randy Dunlap [Wed, 18 Feb 2009 21:01:34 +0000 (13:01 -0800)]
Staging: pohmelfs: fix kconfig dependencies

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>
15 years agoStaging: pohmelfs should depend on CRYPTO
Alexander Beregalov [Fri, 13 Feb 2009 15:06:54 +0000 (18:06 +0300)]
Staging: pohmelfs should depend on CRYPTO

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: fix printk format warnings v2
Alexander Beregalov [Fri, 13 Feb 2009 14:53:30 +0000 (17:53 +0300)]
Staging: pohmelfs: fix printk format warnings v2

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>
15 years agoStaging: pohmelfs: net.c: include vmalloc.h
Alexander Beregalov [Fri, 13 Feb 2009 14:35:32 +0000 (17:35 +0300)]
Staging: pohmelfs: net.c: include vmalloc.h

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>
15 years agoStaging: pohmelfs: fix build breakage
Alexander Beregalov [Fri, 13 Feb 2009 12:53:57 +0000 (15:53 +0300)]
Staging: pohmelfs: fix build breakage

drivers/staging/pohmelfs/inode.c:982: error: implicit declaration of
function 'DQUOT_TRANSFER'

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>
15 years agoStaging: pohmelfs: select crypto modules from the config.
Evgeniy Polyakov [Mon, 9 Feb 2009 21:30:15 +0000 (00:30 +0300)]
Staging: pohmelfs: select crypto modules from the config.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: kconfig/makefile and vfs changes.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:42 +0000 (17:02 +0300)]
Staging: pohmelfs: kconfig/makefile and vfs changes.

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>
15 years agoStaging: pohmelfs: transaction layer.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:41 +0000 (17:02 +0300)]
Staging: pohmelfs: transaction layer.

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>
15 years agoStaging: pohmelfs: network operations.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:40 +0000 (17:02 +0300)]
Staging: pohmelfs: network operations.

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>
15 years agoStaging: pohmelfs: distributed locking and cache coherency protocol.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:39 +0000 (17:02 +0300)]
Staging: pohmelfs: distributed locking and cache coherency protocol.

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>
15 years agoStaging: pohmelfs: inode operations.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:38 +0000 (17:02 +0300)]
Staging: pohmelfs: inode operations.

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>
15 years agoStaging: pohmelfs: directory operations.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:37 +0000 (17:02 +0300)]
Staging: pohmelfs: directory operations.

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>
15 years agoStaging: pohmelfs: crypto processing.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:36 +0000 (17:02 +0300)]
Staging: pohmelfs: crypto processing.

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>
15 years agoStaging: pohmelfs: configuration interface.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:35 +0000 (17:02 +0300)]
Staging: pohmelfs: configuration interface.

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>
15 years agoStaging: pohmelfs: documentation.
Evgeniy Polyakov [Mon, 9 Feb 2009 14:02:34 +0000 (17:02 +0300)]
Staging: pohmelfs: documentation.

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>
15 years agoStaging: DST: fix build dependancy
Evgeniy Polyakov [Mon, 19 Jan 2009 18:30:47 +0000 (21:30 +0300)]
Staging: DST: fix build dependancy

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>
15 years agoStaging: DST: Kconfig text update.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:38 +0000 (20:20 +0300)]
Staging: DST: Kconfig text update.

Kconfig help text update

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: DST: Do not allow empty barriers.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:37 +0000 (20:20 +0300)]
Staging: DST: Do not allow empty barriers.

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>
15 years agoStaging: DST: extend thread pool exit conditions.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:35 +0000 (20:20 +0300)]
Staging: DST: extend thread pool exit conditions.

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>
15 years agoStaging: DST: optimize bio allocation.
Evgeniy Polyakov [Mon, 19 Jan 2009 17:20:36 +0000 (20:20 +0300)]
Staging: DST: optimize bio allocation.

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>
15 years agoStaging: dst: kconfig update.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:09:43 +0000 (02:09 +0300)]
Staging: dst: kconfig update.

On Wed, Jan 14, 2009 at 02:05:33AM +0300, Evgeniy Polyakov (zbr@ioremap.net) wrote:
> --- /dev/null
> +++ b/drivers/staging/dst/Kconfig
> @@ -0,0 +1,71 @@
> +config DST
> + tristate "Distributed storage"
> + depends on NET && CRYPTO && SYSFS
> + select CONNECTOR
> + select LIBCRC32C

Above is not needed.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: dst: kconfig and makefile changes.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:33 +0000 (02:05 +0300)]
Staging: dst: kconfig and makefile changes.

Signed-off-by: Evgeniy Polaykov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agostaging: dst: replace bus_id with dev_set_name
Greg Kroah-Hartman [Sun, 25 Jan 2009 18:05:08 +0000 (10:05 -0800)]
staging: dst: replace bus_id with dev_set_name

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>
15 years agoStaging: dst: crypto processing.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:32 +0000 (02:05 +0300)]
Staging: dst: crypto processing.

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>
15 years agoStaging: dst: transactions.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:31 +0000 (02:05 +0300)]
Staging: dst: transactions.

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>
15 years agoStaging: dst: thread pool.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:30 +0000 (02:05 +0300)]
Staging: dst: thread pool.

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>
15 years agoStaging: dst: export node.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:29 +0000 (02:05 +0300)]
Staging: dst: export node.

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>
15 years agoStaging: dst: network state machine.
Evgeniy Polyakov [Tue, 13 Jan 2009 23:05:28 +0000 (02:05 +0300)]
Staging: dst: network state machine.

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>