drivers/built-in.o: In function `wlan_free_wiphy':
(.text+0x3f5eb5): undefined reference to `wiphy_unregister'
drivers/built-in.o: In function `wlan_free_wiphy':
(.text+0x3f5ec4): undefined reference to `wiphy_free'
drivers/built-in.o: In function `wlan_create_wiphy':
(.text+0x3f5f76): undefined reference to `wiphy_new'
drivers/built-in.o: In function `wlan_create_wiphy':
(.text+0x3f6024): undefined reference to `wiphy_register'
drivers/built-in.o: In function `prism2_roamed':
(.text+0x3f61f7): undefined reference to `cfg80211_roamed'
drivers/built-in.o: In function `prism2_disconnected':
(.text+0x3f6223): undefined reference to `cfg80211_disconnected'
drivers/built-in.o: In function `prism2_connect_result':
(.text+0x3f626d): undefined reference to `cfg80211_connect_result'
drivers/built-in.o: In function `prism2_connect':
(.text+0x3f62b6): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f6679): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f6873): undefined reference to `__ieee80211_get_channel'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f68cc): undefined reference to `cfg80211_inform_bss'
drivers/built-in.o: In function `prism2_scan':
(.text+0x3f6942): undefined reference to `cfg80211_scan_done'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix 49 zram build errors in one swoop. Examples:
drivers/staging/zram/zram_drv.c:225: error: dereferencing pointer to incomplete type
drivers/staging/zram/zram_drv.c:226: error: implicit declaration of function 'bio_for_each_segment'
drivers/staging/zram/zram_drv.c:226: error: expected ';' before '{' token
drivers/staging/zram/zram_drv.c:281: error: implicit declaration of function 'bio_endio'
drivers/staging/zram/zram_drv.c:285: error: implicit declaration of function 'bio_io_error'
drivers/staging/zram/zram_drv.c:545: error: implicit declaration of function 'set_capacity'
drivers/staging/zram/zram_drv.c:548: error: implicit declaration of function 'queue_flag_set_unlocked'
drivers/staging/zram/zram_drv.c:548: error: 'QUEUE_FLAG_NONROT' undeclared (first use in this function)
drivers/staging/zram/zram_drv.c:548: error: dereferencing pointer to incomplete type
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Code cleanup, removed custom macro to compare Ethernet addresses.
Some checkpatch warnings on indentation were not resolved.
The return value of compare_ether_addr was reversed, something to consider.
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add Kconfig + Makefile for TI's DSP Bridge driver
and expose it to the staging menu.
For now, have tidspbridge depend on ARCH_OMAP3.
That dependency should be relaxed as soon as required cleanups are applied.
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Kanigeri, Hari <h-kanigeri2@ti.com>
Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
Signed-off-by: Guzman Lugo, Fernando <fernando.lugo@ti.com>
Signed-off-by: Hebbar, Shivananda <x0hebbar@ti.com>
Signed-off-by: Ramos Falcon, Ernesto <ernesto@ti.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Anna, Suman <s-anna@ti.com>
Signed-off-by: Gupta, Ramesh <grgupta@ti.com>
Signed-off-by: Gomez Castellanos, Ivan <ivan.gomez@ti.com>
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Armando Uribe De Leon <x0095078@ti.com>
Signed-off-by: Deepak Chitriki <deepak.chitriki@ti.com>
Signed-off-by: Menon, Nishanth <nm@ti.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a README with a general overview of TI's DSP Bridge driver,
a short explanations of how error codes are currently used,
and a CONTRIBUTORS file with all past & present contributors.
For additional information about TI's DSP Bridge,
check out http://omapzoom.org/gf/project/omapbridge/docman/?subdir=3
Note: if by any chance we forgot to mention any contributor,
please let us know and we will fix that.
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Kanigeri, Hari <h-kanigeri2@ti.com>
Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
Signed-off-by: Guzman Lugo, Fernando <fernando.lugo@ti.com>
Signed-off-by: Hebbar, Shivananda <x0hebbar@ti.com>
Signed-off-by: Ramos Falcon, Ernesto <ernesto@ti.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Anna, Suman <s-anna@ti.com>
Signed-off-by: Gupta, Ramesh <grgupta@ti.com>
Signed-off-by: Gomez Castellanos, Ivan <ivan.gomez@ti.com>
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Armando Uribe De Leon <x0095078@ti.com>
Signed-off-by: Deepak Chitriki <deepak.chitriki@ti.com>
Signed-off-by: Menon, Nishanth <nm@ti.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the wl_cs.c file that fixes braces, spaces
parentheses, etc style issues found by the checkpatch.pl tool.
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the wl_cs.c file that corrects the invalid
UTF-8 encoding style issues found by the checkpatch.pl tool.
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the wl_cs.c file that converts spaces to
tabs style issues found by the checkpatch.pl tool.
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The macros ReadMReg and WriteMReg are really just private versions of
the kernel's readl and writel functions. Use the kernel's functions
instead. And since ioremap returns a (void __iomem *) not a (u8 *),
change all the uses of dt3155_lbase to reflect this.
While here, make dt3155_lbase static since it is only used in the
dt3155_drv.c file. Also, remove the global variable dt3155_bbase
since it is not used anywhere in the code.
Where is makes sense, create a local 'mmio' variable instead of using
dt3155_lbase[minor] to make the code more readable.
This change also affects the {Read|Write}I2C functions so they are
also modified as needed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Replaced and removed the custom definition.
Minor checkpatch warnings on long lines and indentation were not cleared.
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed style and debugging printks.
Not replaced PSDevice here, nor removed wireless_send_event() yet.
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Finally got ahold of a card with a tw2865 video/audio multiplexer and
the spec sheet to go along with it.
Signed-off-by: Ben Collins <bcollins@bluecherry.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Not changed PSDevice priv struct, just fixed style and removed printks.
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move functions managing the channel mapping to a new channel.c file, as done in
the staging VT6656 driver. The function names contained in card.c were prefixed
with CARD followed by the first letter of the return code, remove this and use
more coherent function names.
The following functions moved and were renamed:
ChannelValid -> is_channel_valid
CARDbSetChannel -> set_channel
CARDvInitChannelTable -> init_channel_table
CARDbyGetChannelMapping -> get_channel_mapping
CARDvSetCountryInfo -> set_country_info
CARDbySetSupportChannels -> set_support_channels
CARDbChannelGetList -> channel_get_list
CARDvSetCountryIE -> set_country_IE
CARDbGetChannelMapInfo -> get_channel_map_info
CARDvSetChannelMapInfo -> set_channel_map_info
CARDvClearChannelMapInfo -> clear_channel_map_info
CARDbyAutoChannelSelect -> auto_channel_select
CARDbyGetChannelNumber -> get_channel_number
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Removed code in .c files that was being skipped by the preprocessor
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A patch for s626.c to fix some of the warnings
reported by the checkpatch.pl tool, namely,
-suspect code indent for conditional statements
-please, no space before tabs
Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A patch for s626.c to fix errors reported by
checkpatch.pl tool, namely,
-code indent should use tabs where possible
-"foo * bar" should be "foo *bar"
-trailing statements should be on next line
Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.
While at it, also remove surrounding code which is commented out,
or '#if 1' nops.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed several witespace and tab related warnings and errors reported by the
chechpatch.pl tool.
Signed-off-by: Matti Lammi <mattij.lammi@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed coding convention issues as reported by checkpatch.pl tool
on the file `panel.c'. Moved LCD special code handling from the
function `lcd_write' into function `handle_lcd_special_code'. Also
moved the handling of INPUT_ST_HIGH and INPUT_ST_FALLING states from
the function `panel_process_input' into functions `input_state_high'
and `input_state_falling'.
Signed-off-by: Henri Häkkinen <henuxd@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the wl_cs.c file that fixes the space
style issues found by the checkpatch.pl tool.
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Getting a probe response after sending a probe request to a specific SSID
doesnt mean we're trying to associate with this SSID.
wpa_supplicant should be the only one deciding when to join an SSID, not the
kernel.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If we're not associated, we should not send wireless events to let userspace
know that we just left an ESSID, simply because we havent yet joined it.
If we keep on doing that, wpa_supplicant could receive such events while
actually trying to join an ESSID, and thus decide to stop trying. This leads
to a lot of connection failures as this driver seems to be sending GIWAP
events quite a lot.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Toggling the link carrier is a non sense and is the grossest locking I can
think of. Moreover, it's giving a completely inaccurate status to userspace
who could for example decide to turn the interface down on carrier off
detection.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
While merging rt30[79]0 support into rt28[67]0, drivers/staging/rt3070/md4.h
has been forgotten, while it isn't referenced from the remaining drivers
anymore; remove it.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Matti Lammi <mattij.lammi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I have fixed all errors in mlme.h and fixed all bar one in rtmp.h.
I think I can fix rtmp.h too by moving a brace up two lines, I just dont know if it will work.
If someone can confirm it will work I will change it.
Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
VBIOS_VER_MAX_LENGTH was set to 4, but the value "0.84" is strcpy'd
into it. That value is 5 long including the trailing NULL.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove 2 extern variables definations from XGI_accel.c that were
defined in other .h files.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The code inside this #ifdef declared a couple extern functions that
weren't used anywhere, so remove the whole #ifdef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This was not included anywhere and just defined a debugging macro.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This removes all the remaining typedefs in vb_struct.h
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There is no need for these to be typedefs as a simple enum will do.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove code that was removed using #if 0
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
PUCHAR was unsigned char *, use that instead
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The port related macros in osdef.h are replaced with calls to out?()
and in?(). This removes the last macros defined in osdef.h, so this
file is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These were just macros for memset and memcpy, so use those instead.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove ifdefs that check LINUX_VERSION_CODE as this is
not needed in the staging tree.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes compiler warning format '%x' expects type 'unsigned int',
but argument 2 has type 'long unsigned int'
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The standard layer 3 ping utility can use the record route (RR) option
of IP to collect route data for sent ping messages (ping -R). This
patch introduces comparable functionality for batman-adv ICMP messages.
The patch adds a second batman ICMP packet format (icmp_packet_rr) such
that up to 17 MAC addresses can be recorded (sufficient for up to 8
hops per direction). When no RR is wanted, the old icmp_packet without
the RR overhead can be sent.
Signed-off-by: Daniel Seither <post@tiwoc.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds interface alternating to the new bonding feature. By
default, we now try to avoid forwarding packets on the receiving
interface, instead choosing alternative interfaces. This feature
works only on nodes which have multiple interfaces connected to the
mesh. This approach should reduce problems of the half-duplex nature
of WiFi Hardware and thus increase performance.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch introduces bonding functionality to batman-advanced, targeted
for the 0.3 release. As we are able to route the payload traffic as we
want, we may use multiple interfaces on multihomed hosts to transfer data
to achieve higher bandwidth. This can be considered as "light Multi Path
Routing" for single hop connections.
To detect which interfaces of a peer node belong to the same host, a
new flag PRIMARIES_FIRST_HOP is introduced. This flag is set on the first hop
of OGMs of the primary (first) interface, which is broadcasted on all
interfaces. When receiving such an OGM, we can learn which interfaces
belong to the same host (by assigning them to the primary originator).
Bonding works by sending packets in a round-robin fashion to the available
interfaces of a neighbor host, if multiple interfaces are available. The
neighbor interfaces should be almost equally good to reach.
To avoid interferences (i.e. sending on the same channel), only neighbor
interfaces with different mac addresses and different outgoing interfaces
are considered as candidates.
Bonding is deactivated by default, and can be activated by
echo 1 > /sys/class/net/bat0/mesh/bonding
for each individual node.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch changes the sequence number range from 8 or 16 bit to 32 bit.
This should avoid problems with the sequence number sliding window algorithm
which we had seen in the past for broadcast floods or malicious packet
injections. We can not assure 100% security with this patch, but it is quite
an improvement over the old 16 bit sequence numbers:
* expected window size can be increased (4096 -> 65536)
* 64k packets in the right order would now be needed to cause a loop,
which seems practically impossible.
Furthermore, a TTL field has been added to the broadcast packet type, just to
make sure.
These changes required to increase the compatibility level once again.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Change atomic64_* back to atomic_*, Rework on
top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When trying to set the originator interval to 40ms, we are asked to set
it to a minimum value of 40ms. This patch permits setting an
originator interval of JITTER*2 (40ms by default) now.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
All code for debugfs is ignored when the creation of the batman-adv root
directory in debugfs fails. It must also be ignored when the
debugfs_create_dir tells us that debugfs is not implemented to prevent
possible crashes in the future.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Functions and variables which are used only inside one object file can
be declared as static. This helped to find unused functions/variables
* mainIfAddr_default
* main_if_was_up
and functions with declarations but missing definitions
* hash_debug
* orig_find
* send_own_packet_work
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove the last uses of MAC_FMT
Signed-off-by: Joe Perches <joe@perches.com>
[sven.eckelmann@gmx.de: Adapted for current batman-adv version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch removes the extra usage output which came when
the sysfs files were read.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Files which represent more than a single attribute aren't allowed in
sysfs. As we have some files which aren't essential and are lists or
tables aggregated from data from different places inside batman-adv, we
must place them in a filesystem without such a restriction.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
batctl uses /dev/batman-adv to send special batman-adv icmp packets to
other nodes in the mesh. To get it working with multiple batX devices we
must ensure that every mesh device can have their own socket which is
used to inject those packets in exactly one mesh.
The current implementation still doesn't allow to use complete separated
meshes as we rely on structures which are not part of the private data
of a batman device.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In today linux-next I got a compile warning in staging/batman-adv.
This is due a struct bin_attribute read function prototype change and the driver was not updated.
This patch solves the issue
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
copy_to_user() returns the number of bites remaining but we want to
return a negative error code here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
vis_interval does not neccesarily needs to be a variable, as there is
no way to change it anyway (and probably no need to). We can therefore
remove yet another global variable.
Thanks Marek for pointing this out.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add documents about new sysfs entries in
* /sys/class/net/<iface>/batman-adv/mesh_iface
* /sys/class/net/<mesh_iface>/mesh/vis_mode
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
batman-adv is receiving and sending the packets of its own ether type
on a very early/low level. Therefore we need to add explicit hooks to
give netfilter/ebtables a chance to filter them.
Reported-by: Antonio Quartulli <ordex@ritirata.org>
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The hardif_attr and the bat_attr struct share the same attributes,
hence it is not necessary to specify 2 different structs.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A really trivial patch to solve a warning when compiling staging/pohmelfs
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove the DT_3155_{SUCCESS/FAILURE} errno defines and use the
kernel provided ones.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes the different address spaces noise when copying data to/from
user space to kernel space.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The third argument of dma_alloc_coherent() is of type dma_addr_t and is defined
as u64 for x86_64, while the member 'device_base' of struct dma_coherent_mem is
defined as u32.
While at it, clean up the code. Now if dev->dma_mem != NULL all the fields/members
are already properly initialized.
Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed most problems pointed out by checkpatch.pl in file r8192U_core.c
up to line 500
Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Removed kfree(NULL checks) that were not necessary
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed issues found by checkpatch.pl including adding KERN_
facility levels to printk() calls and C99 comments.
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
wrq->name is only 16 characters long but "IEEE 802.11-MIMO" is 16
characters + a NULL character, so it's too long. This patch changes it
to "IEEE 802.11abgn".
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
On Mon, 2010-06-07 at 12:02 -0700, Luis R. Rodriguez wrote:
> this driver is unmaintained and its only purpose is as a
> source of documentation for developers working on ar9170 and carl9170.
> Once carl9170 gets 11n support and merged upstream then this driver
> can be removed.
Then the TODO file should be updated.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to zdusb.c that fixes whitespace,
C99 comment, and other style issues found by the
checkpatch.pl tool
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This doesn't change the behavior. It just silences a sparse warning.
drivers/staging/wlan-ng/hfa384x_usb.c:2810:62: warning: dubious: !x | !y
The point of the bitwise OR is so that a logical OR could short circuit
the second call to test_and_set_bit().
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some errors crept in due to a previous patch that I missed.
This fixes them up so the driver continues to build, sorry about that.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Switch driver over from wext to cfg80211 interface.
Some Notes:
- This patch moves the driver wholesale from wext to cfg80211. Wext
support is still provided through the cfg80211 provided wext
compatability layer.
- Currently only infrastructure mode is implemented. Ad hoc mode is not
yet implemented, but can be added.
- It does not support connecting to a specified bssid, instead roaming
is handled by the card itself. This matches the behaviour of the
existing driver.
- It has been tested using NetworkManager (via wpa_supplicant)
configured to use the wext compatability layer, and then again with the
native nl80211 layer.
Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Current linux kernel has GENERIC_HDLC_VERSION equal to 4, no need to
have dead code in-kernel which was there for ancient kernel versions.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.
While at it, also remove surrounding code which is commented out,
or '#if 1' nops.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.
While at it, also remove surrounding code which is commented out,
or '#if 1' nops.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The current code creates directories in procfs named after interfaces,
but doesn't handle renaming. This can result in name collisions and
consequent WARNINGs. It also means that the interface name cannot
reliably be used to remove the directory - in fact the current code
doesn't even try, and always uses "wlan0"!
Since the name of a proc_dir_entry is embedded in it, use that when
removing it.
Add a netdev notifier to catch interface renaming, and remove and
re-add the directory at this point.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Currently various resources may be leaked in case of an error.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use memdup_user when user data is immediately copied into the
allocated region.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@
- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
<+... when != goto l1;
- -ENOMEM
+ PTR_ERR(to)
...+>
}
- if (copy_from_user(to, from, size) != 0) {
- <+... when != goto l2;
- -EFAULT
- ...+>
- }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a spin_unlock and mutex_unlock missing on the error path.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E1;
@@
* spin_lock(E1,...);
<+... when != E1
if (...) {
... when != E1
* return ...;
}
...+>
* spin_unlock(E1,...);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1. move adis16400_spi_read_burst() to adis16400_ring.c since it is only
called there
2. add the lost calling to adis16400_self_test()
3. codes cleanup
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1. add delay between spi transfers
2. move burst read to ring function
3. clean-up
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The sysfs attribute call backs take a file pointer these days. This was
added in 2c3c8bea60 "sysfs: add struct file* to bin_attr callbacks"
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These drivers use kzalloc() but don't include slab.h. They currently
build though because the spi.h header will pull in slab.h for us. But
rather than rely on that behavior forever, include slab.h explicitly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A bunch of IIO files contain spurious semicolons after function
definitions and case statements and if statements. Guess people
really like this thing, but kill them anyways so they'll stop
spreading via copy & paste with new drivers.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Standardize the spacing/style across the IIO build files:
- comment block in Kconfigs
- newlines at ends of files
- trailing lines at ends of files
- indent with one tab, not spaces or mixed
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Related changes:
- Included example to show usage as generic
(non-swap) disk with ext4 filesystem.
- Renamed rzscontrol to zramconfig to match
with new device naming.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Related changes:
- Modify revelant Kconfig and Makefile accordingly.
- Change include filenames in code.
- Remove dependency on CONFIG_SWAP in Kconfig as zram usage
is no longer limited to swap disks.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently, ramzwap devices (/dev/ramzswapX) can only
be used as swap disks since it was hard-coded to consider
only the first request in bio vector.
Now, we iterate over all the segments in an incoming
bio which allows us to handle all kinds of I/O requests.
ramzswap devices can still handle PAGE_SIZE aligned and
multiple of PAGE_SIZE sized I/O requests only. To ensure
that we get always get such requests only, we set following
request_queue attributes to PAGE_SIZE:
- physical_block_size
- logical_block_size
- io_min
- io_opt
Note: physical and logical block sizes were already set
equal to PAGE_SIZE and that seems to be sufficient to get
PAGE_SIZE aligned I/O.
Since we are no longer limited to handling swap requests
only, the next few patches rename ramzswap to zram. So,
the devices will then be called /dev/zram{0, 1, 2, ...}
Usage/Examples:
1) Use as /tmp storage
- mkfs.ext4 /dev/zram0
- mount /dev/zram0 /tmp
2) Use as swap:
- mkswap /dev/zram0
- swapon /dev/zram0 -p 10 # give highest priority to zram0
Performance:
- I/O benchamark done with 'dd' command. Details can be
found here:
http://code.google.com/p/compcache/wiki/zramperf
Summary:
- Maximum read speed (approx):
- ram disk: 1200 MB/sec
- zram disk: 600 MB/sec
- Maximum write speed (approx):
- ram disk: 500 MB/sec
- zram disk: 160 MB/sec
Issues:
- Double caching: We can potentially waste memory by having
two copies of a page -- one in page cache (uncompress) and
second in the device memory (compressed). However, during
reclaim, clean page cache pages are quickly freed, so this
does not seem to be a big problem.
- Stale data: Not all filesystems support issuing 'discard'
requests to underlying block devices. So, if such filesystems
are used over zram devices, we can accumulate lot of stale
data in memory. Even for filesystems to do support discard
(example, ext4), we need to see how effective it is.
- Scalability: There is only one (per-device) de/compression
buffer stats. This can lead to significant contention, especially
when used for generic (non-swap) purposes.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Older mechanism of counting the number of protocols
registered with ST was slow, in-efficient.
It used to check the protocol data for NULL for each
registration/unregistration.
With this change, counting protocols in maintained by
a single counter protos_registered.
Counting protocols is not just for debug purposes
Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add version information to be available under the sysfs group
for kim.
Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove the older way of communicating with user-space
daemon UIM.
The older way involved creating of a new kobj and pid
sysfs file under it, and sending signal using that pid.
Now we communicate via rfkill to user-space UIM.
Background: UIM is the user-space daemon which upon
notification from ldisc driver, opens the tty, sets
default baud and then installs (tiocsetd) the ldisc.
Signed-off-by: Naveen Jain <naveen_jain@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Update the TODO of TI-ST to make sure it reflects current list
of activities that need to be done.
Also point it out to the user-space app code relevant to it.
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Rename driver struct and callbacks to vt6655_* instead of device_* and add
__devinit/__devexit directives.
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the 80211mgr.c file that fixes up warnings
found by the checkpatch.pl tool
Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix this build error:
drivers/staging/vt6656/built-in.o: In function `rotr1':
(.text+0x1a878): multiple definition of `rotr1'
drivers/staging/rt2870/built-in.o:(.text+0x106c2): first defined here
drivers/staging/vt6656/built-in.o: In function `tkip_sbox':
(.text+0x1a848): multiple definition of `tkip_sbox'
drivers/staging/rt2870/built-in.o:(.text+0x10697): first defined here
drivers/staging/vt6656/built-in.o: In function `xor_32':
(.text+0x1ec24): multiple definition of `xor_32'
drivers/staging/rt2870/built-in.o:(.text+0x111c4): first defined here
drivers/staging/vt6656/built-in.o: In function `xor_128':
(.text+0x1ec00): multiple definition of `xor_128'
drivers/staging/rt2870/built-in.o:(.text+0x111dd): first defined here
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Resolved whitespace-related checkpatch findings in .h files
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Resolved checkpatch findings, but some long lines warnings.
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit 902d241129 converted U32 to u32
which you would think would be just fine. Unfortunatly, it seems that
VIA only builds their code on a 32bit processor (which makes sense if
you think about it), but this doesn't work on x86-64. So fix up the few
places where this really wanted to be an unsigned long width.
Cc: Charles Clément <caratorn@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
Cc: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Calcu_LinkQual is already defined a couple lines earlier.
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Replace custom macro IS_MULTICAST_ADDRESS by is_multicast_ether_addr
from <linux/etherdevice.h>.
Remove linux/if_ether.h include as it is included in
linux/etherdevice.h already.
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the phy_calibration.c that fixes up almost all
warnings and errors (except 80 characters limit and lack of tabs errors)
found by the checkpatch.pl tool
Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes line length, brace style and whitespace issues in the
mac_structures.h file found by the checkpatch.pl tool
Signed-off-by: Adam Latham <adam.latham@unisontorbay.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes the use of //C99 comments in the mac_structures.h found by
the checkpatch.pl tool
Signed-off-by: Adam Latham <adam.latham@unisontorbay.org.uk>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcl812.c file that fixes up the following
issues:
ERROR: code indent should use tabs where possible x 27
WARNING: line over 80 characters x 37
WARNING: please, no space before tabs x 13
WARNING: braces {} are not necessary for single statement blocks x 2
WARNING: printk() should include KERN_ facility level x 22
WARNING: braces {} are not necessary for any arm of this statement x 5
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I fixed indentation in one place and two long lines, a space and a brace
found by checkpatch.pl and fixed some long lines and whitespace around an =.
Signed-off-by: Lars Lindley <lindley@coyote.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The dmm32at.c and comedi_bond.c comedi driver files contain an
instructional comment block copied over from skel.c about how to format
a driver comment block. This comment was modified in skel.c by a
previous patch in this series to stop Comedi's 'dump_doc' script
treating it as an actual driver comment block. There isn't any need to
repeat this comment block in the other source files, so rather than
modify it, this patch just removes it from those files.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The Comedi team have a script 'dump_doc' to extract text from the driver
comment block (starting with line 'Driver:') in (most of) the comedi
driver source files. This was recently updated to allow and strip off a
" * " prefix at the start of each line (well actually, it uses the perl
substitution 's/^ ?\* ?//').
The skel.c file contains an instructional comment block about how to
format this driver comment block, but the updated 'dump_doc' script
mistakenly treats this as a valid driver comment block. This patch adds
some extra whitespace to stop the instructional comment block being
treated as a valid driver comment block by Comedi's 'dump_doc' script.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Previous whitespace changes to das08.c removed some whitespace from a
"driver comment block" that the Comedi team would like to keep. "Header
continuation lines" in this comment block should be indented with
whitespace. (This is after the " * " at the start of each line.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the quatech_daqp_cs.c file that fixes up the following
issues:
ERROR: code indent should use tabs where possible x 1
WARNING: line over 80 characters x 1
WARNING: braces {} are not necessary for single statement blocks x 10
WARNING: printk() should include KERN_ facility level x 6
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcmda12.c file that fixes up five printk() warning issues
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcl816.c file that fixes up the following
issues:
ERROR: code indent should use tabs where possible x 2
WARNING: line over 80 characters x 34
WARNING: please, no space before tabs x 1
WARNING: braces {} are not necessary for single statement blocks x 6
WARNING: printk() should include KERN_ facility level x 15
WARNING: braces {} are not necessary for any arm of this statement x 1
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the pcl711.c file that fixes up printk()
warning issues.
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the me4000.c file that fixes up the following
issues:
ERROR: space required after that close brace '}' x 13
ERROR: spaces required around that ':' (ctx:VxV) x 3
WARNING: line over 80 characters x 96
WARNING: braces {} are not necessary for any arm of this statement x 2
Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove all remaining typedefs from comedi drivers
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move the PCI devinit/devexit routines to the respective C source files
instead of calling COMEDI_PCI_INITCLEANUP
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move the init/exit routines to the respective C source files
instead of calling COMEDI_INITCLEANUP
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add MODULE_AUTHOR, MODULE_LICENSE, and MODULE_DESCRIPTION calls
to the respective C source files instead of calling COMEDI_MODULES_MACRO
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes all, printk() should
include KERN-facility level, warnings found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the file am9513.h that fixes missing space warnings
found by the checkpatch.pl tool.
Signed-off-by: Bob Beattie <bob.beattie@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A patch for s626.c to fix some of the warnings
reported by the checkpatch.pl tool, namely,
printk() should include KERN_ facility level
unnecessary whitespace before a quoted newline
Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A patch for unioxx5.c which fixes "trailing statements
should be on next line" errors raised by the
chechpatch.pl tool
Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes some long line lengths in gsc_hpdi.c as found by the
checkpatch.pl tool
Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch cleans up some various warnings generated from checkpatch.pl
Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
These checks are obviously pointless because kfree() can handle null
dereferences.
But really the main problem is that if the pointers were null that would
cause problems on the ealier lines. The dereferences would cause an
oops and the _release() functions use ->priv to determine which IRQ to
free. I looked into it and quite a few of the detach functions assume
link->priv is non-null. It seems like we can remove these checks.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Reduce stack usage in serial_2002_open() by allocating dig_in_config,
dig_out_config, chan_in_config, and chan_out_config temporary arrays
using kcalloc() and freeing them when done with.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The comedi device 'detach' method for the serial2002 driver has an
off-by-one error in its loop for freeing data belonging to its
subdevices. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The comedi device 'open' method for the serial2002 driver frees any old
'maxdata_list' and 'range_table_list' arrays belonging to a subdevice
and allocates them again, but was missing checks for allocation failure.
If an allocation fails, free the 'maxdata_list' and 'range_table_list'
arrays for all subdevices and return an error.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some comedi drivers should return an error from their 'open' method when
something goes wrong. Change the prototype of the 'open' method in
'struct comedi_device' to allow this, and change the drivers that use it.
Propagate any error to the 'open' file operation.
The corresponding 'close' method won't be called when the 'open' method
fails, so drivers failing the 'open' need to clean up any mess they
created.
The dt9812 and serial2002 drivers can now return an error on 'open'.
The jr3_pci driver also uses the 'open' method but doesn't fail it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_tio.c file that fixes a brace warning found by
the checkpatch.pl tool
Signed-off-by: Samuel Richardson <sam.j.richardson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
wimax/i2400m: fix missing endian correction read in fw loader
net8139: fix a race at the end of NAPI
pktgen: Fix accuracy of inter-packet delay.
pkt_sched: gen_estimator: add a new lock
net: deliver skbs on inactive slaves to exact matches
ipv6: fix ICMP6_MIB_OUTERRORS
r8169: fix mdio_read and update mdio_write according to hw specs
gianfar: Revive the driver for eTSEC devices (disable timestamping)
caif: fix a couple range checks
phylib: Add support for the LXT973 phy.
net: Print num_rx_queues imbalance warning only when there are allocated queues
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: clear bridge resource range if BIOS assigned bad one
PCI: hotplug/cpqphp, fix NULL dereference
Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
PCI: change resource collision messages from KERN_ERR to KERN_INFO
There are devices out there which are PCI Hot-plug controllers with
compaq PCI IDs, but are not bridges, hence have pdev->subordinate
NULL. But cpqphp expects the pointer to be non-NULL.
Add a check to the probe function to avoid oopses like:
BUG: unable to handle kernel NULL pointer dereference at 00000050
IP: [<f82e3c41>] cpqhpc_probe+0x951/0x1120 [cpqphp]
*pdpt = 0000000033779001 *pde = 0000000000000000
...
The device here was:
00:0b.0 PCI Hot-plug controller [0804]: Compaq Computer Corporation PCI Hotplug Controller [0e11:a0f7] (rev 11)
Subsystem: Compaq Computer Corporation Device [0e11:a2f8]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This reverts commit 75568f8094.
Since they're just a convenience anyway, remove these symlinks since
they're causing duplicate filename errors in the wild.
Acked-by: Alex Chiang <achiang@canonical.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
We can often deal with PCI resource issues by moving devices around. In
that case, there's no point in alarming the user with messages like these.
There are many bug reports where the message itself is the only problem,
e.g., https://bugs.launchpad.net/ubuntu/+source/linux/+bug/413419 .
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
i2400m_fw_hdr_check() was accessing hardware field
bcf_hdr->module_type (little endian 32) without converting to host
byte sex.
Reported-by: Данилин Михаил <mdanilin@nsg.net.ru>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
pcmcia: avoid validate_cis failure on CIS override
pcmcia: dev_node removal bugfix
pcmcia: yenta_socket.c Remove extra #ifdef CONFIG_YENTA_TI
pcmcia: only keep saved I365_CSCINT flag if there is no PCI irq
fix a race at the end of NAPI complete processing, it had
better do __napi_complete() first before re-enable interrupt.
Signed-off-by:Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The data in the cmd_block buffers may reach the main memory after the
writel() to the device ports. This patch introduces two calls to wmb()
to ensure the relative ordering.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Colin Tuckley <colin.tuckley@arm.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
cb->atapi.cdb is an array of 16 u8 elements. The call too memset()
would set the first part of the sge array to zero as well. It's not
a packed struct.
This one has been around for five years. I found it with Smatch. I
think the reason no one has seen it before is because we normally call
sil24_fill_sg() and that overwrites sge with proper information?
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Realtek confirmed that a 20us delay is needed after mdio_read and
mdio_write operations. Reduce the delay in mdio_write, and add it
to mdio_read too. Also add a comment that the 20us is from hw specs.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Since commit cc772ab7cd ("gianfar: Add
hardware RX timestamping support"), the driver no longer works on
at least MPC8313ERDB and MPC8568EMDS boards (and possibly much more
boards as well).
That's how MPC8313 Reference Manual describes RCTRL_TS_ENABLE bit:
Timestamp incoming packets as padding bytes. PAL field is set
to 8 if the PAL field is programmed to less than 8. Must be set
to zero if TMR_CTRL[TE]=0.
I see that the commit above sets this bit, but it doesn't handle
TMR_CTRL. Manfred probably had this bit set by the firmware for
his boards. But obviously this isn't true for all boards in the
wild.
Also, I recall that Freescale BSPs were explicitly disabling the
timestamping because of a performance drop.
For now, the best way to deal with this is just disable the
timestamping, and later we can discuss proper device tree bindings
and implement enabling this feature via some property.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch implements a work around for Erratum 5, "3.3 V Fiber Speed
Selection." If the hardware wiring does not respect this erratum, then
fiber optic mode will not work properly.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
mac80211: fix deauth before assoc
iwlwifi: add missing rcu_read_lock
mac80211: fix function pointer check
wireless: remove my name from the maintainer list
ath5k: fix NULL pointer in antenna configuration
p54usb: Add device ID for Dell WLA3310 USB
wl1251: fix a memory leak in probe
ipmr: dont corrupt lists
8139too: fix buffer overrun in rtl8139_init_board
asix: check packet size against mtu+ETH_HLEN instead of ETH_FRAME_LEN
r8169: fix random mdio_write failures
ip6mr: fix a typo in ip6mr_for_each_table()
iwlwifi: move sysfs_create_group to post request firmware
iwlwifi: add name to Maintainers list
iwl3945: fix internal scan
iwl3945: enable stuck queue detection on 3945
ipv6: avoid high order allocations
ath5k: retain promiscuous setting
ath5k: depend on CONFIG_PM_SLEEP for suspend/resume functions
mac80211: process station blockack action frames from work
...
MSM7x30 isn't supported in this driver yet. If ones tried to compile it in
with MSM7x30 configure you get,
linux-2.6/drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_fifo_addr':
linux-2.6/drivers/mmc/host/msm_sdcc.c:165: error: 'MSM_SDC1_PHYS' undeclared (first use in this function)
linux-2.6/drivers/mmc/host/msm_sdcc.c:165: error: (Each undeclared identifier is reported only once
linux-2.6/drivers/mmc/host/msm_sdcc.c:165: error: for each function it appears in.)
linux-2.6/drivers/mmc/host/msm_sdcc.c:167: error: 'MSM_SDC2_PHYS' undeclared (first use in this function)
linux-2.6/drivers/mmc/host/msm_sdcc.c:169: error: 'MSM_SDC3_PHYS' undeclared (first use in this function)
linux-2.6/drivers/mmc/host/msm_sdcc.c:171: error: 'MSM_SDC4_PHYS' undeclared (first use in this function)
So we add a Kconfig check to prevent this.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
10, 233 is allocated officially to /dev/kmview which is shipping in
Ubuntu and Debian distributions. vhost_net seem to have borrowed it
without making a proper request and this causes regressions in the other
distributions.
vhost_net can use a dynamic minor so use that instead. Also update the
file with a comment to try and avoid future misunderstandings.
cc: stable@kernel.org
Signed-off-by: Alan Cox <device@lanana.org>
[ We should have caught this before 2.6.34 got released. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: core: check for 1394a compliant IRM, fix inaccessibility of Sony camcorder
This reverts commit cfecde435d, since it
seems to cause some systems to not come up with any video output at all
(or video that only comes on when X starts up).
Fixes bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=16163
Reported-and-tested-by: David John <davidjon@xenontk.org>
Tested-by: Nick Bowler <nbowler@elliptictech.com>
Acked-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (23 commits)
drm/radeon: don't poll tv dac if crtc2 is in use.
drm/radeon: reset i2c valid to avoid incorrect tv-out polling.
drm/nv50: fix iommu errors caused by device reading from address 0
drm/nouveau: off by one in init_i2c_device_find()
nouveau: off by one in nv50_gpio_location()
drm/nouveau: completely fail init if we fail to map the PRAMIN BAR
drm/nouveau: match U/DP script against SOR link
drm/radeon/kms/pm: resurrect printing power states
drm/radeon/kms: add trivial debugging for voltage
drm/radeon/kms/r600+: use voltage from requested clock mode (v3)
drm/radeon/kms/pm: track current voltage (v2)
drm/radeon/kms/pm: Disable voltage adjust on RS780/RS880
drm/radeon/kms: fix typo in printing the HPD info
drm/radeon/kms/pm: add mid profile
drm/radeon/kms/pm: Misc fixes
drm/radeon/kms/combios: fix typo in voltage fix
drm/radeon/kms/evergreen: set accel_enabled
drm/vmwgfx: return -EFAULT for copy_to_user errors
drm/drm_crtc: return -EFAULT on copy_to_user errors
drm/fb: use printk to print out the switching to text mode error.
...
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] Update default configuration.
[S390] arch/s390/kvm: Use GFP_ATOMIC when a lock is held
[S390] kprobes: add parameter check to module_free()
[S390] appldata/extmem/kvm: add missing GFP_KERNEL flag
Commit 55929332c9 "drivers: Push down BKL into various drivers"
introduced a regression in hp_sdc_rtc, caused by a missing
change of the .unlocked_ioctl pointer to the newly introduced
function.
Fixes:
drivers/input/misc/hp_sdc_rtc.c:681: warning: initialization from
incompatible pointer type
drivers/input/misc/hp_sdc_rtc.c:665: warning:
‘hp_sdc_rtc_unlocked_ioctl’ defined but not used
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Using ieee80211_find_sta() needs to be under
RCU read lock, which iwlwifi currently misses,
so fix it.
Cc: stable@kernel.org
Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add missing GFP flag to memory allocations. The part in cio only
changes a comment.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
So when we added output polling, we'd suddenly use this code more often, and the fact that it always takes over crtc2 and messes with it during probing isn't what we really want to be happening. A more complete fix would to change it to use whatever crtc was free at the time, but for now lets stay simple and just don't poll if crtc2 is already in use.
Although a more correct fix was found I suspect we should do this as well, until we get a chance to readdres the tv out polling issues.
Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
We really don't want to be polling tv-out but since we weren't forcing the
i2c lines to invalid (tv-out has no DDC), we were adding tv connectors to the
polling setup and this was causing blinking on secondary displays.
This fixes the regression Torsten reported.
Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
If "gpio->line" is 32 then "nv50_gpio_reg[gpio->line >> 3]" reads past the
end of the array.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
On cards where there's a specific BAR for PRAMIN, we used to try and fall
back to the "legacy" aperture within the mmio BAR.
This is doomed to cause problems, so lets just fail completely as there's
obviously something else very wrong anyway.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
It appears version 0x21 'U' and 'd' tables require us to take the SOR link
into account when selecting the appropriate table for a particular output.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
* git://git.infradead.org/~dwmw2/mtd-2.6.35:
jffs2: update ctime when changing the file's permission by setfacl
jffs2: Fix NFS race by using insert_inode_locked()
jffs2: Fix in-core inode leaks on error paths
mtd: Fix NAND submenu
mtd/r852: update card detect early.
mtd/r852: Fixes in case of DMA timeout
mtd/r852: register IRQ as last step
drivers/mtd: Use memdup_user
docbook: make mtd nand module init static
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
ahci: redo stopping DMA engines on empty ports
sata_sil24: fix kernel panic on ARM caused by unaligned access in sata_sil24
ahci: add pci quirk for JMB362
sata_via: explain the magic fix
This fixes FDO bug #28375, it's kind of regression, so quite important to have
it for .35.
V2: Fix on RV770+ as well. All other chipsets have only one clock mode per
state.
V3: I'm out of luck today. Grepped for voltage in r*.c and missed evergreen.
agd5f: rebased
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
track the current voltage level and avoid setting it
if the requested voltage is already set.
v2: check voltage type before checking current voltage
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
The vddc value in the power tables is not an actual voltage
like on discrete r6xx/r7xx/evergreen systems, but instead has
a symbolic meaning (e.g., NONE, LOW, HIGH, etc.). See atombios.h
Most RS780/RS880 vbioses don't have a SetVoltage table anyway,
so it shouldn't be doing anything to the hardware at the moment.
I need to figure out how voltage is supposed to work on the newer
IGPs; until then, disable it.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This adds an additional profile, mid, to the pm profile
code which takes the place of the old low profile. The default
behavior remains the same, e.g., auto profile now selects between
mid and high profiles based on power source, however, you can now
manually force the low profile which was previously only available
as a dpms off state. Enabling the low profile when the displays
are on has been known to cause display corruption in some cases.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
- don't rest the power state in pm_init()
We already boot up to the default power state. Note this
patch relies on:
drm/radeon/kms/pm: patch default power state with default clocks/voltages on r6xx+
To make sure the default power state matches the boot up state.
- In the pm resume path asic init will have set the power state
back to the default so reset the tracking state values.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This is needed to enable accel in the ddx. However,
due to a bug in older versions of the ddx, it relies
on accel being disabled in order to load properly on
evergreen chips. To maintain compatility, we add a new
get accel param and call that from the ddx. The old one
always returns false for evergreen cards.
[this fixes a regression with older userspaces on newer kernels].
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
copy_to/from_user() returns the number of bytes remaining to be copied
but we want to return a negative error code here. This gets returned to
userspace.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
copy_from_user() returns the number of bytes left to be copied but we
want to return a negative error code here. This is in the ioctl handler
so the error code get returned to userspace.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
using DRM_ERROR, results in people blaming the drm code for the oops, and
not looking at the oops.
(sadly yes I've gotten reports).
Signed-off-by: Dave Airlie <airlied@redhat.com>
PM attemps to unmap objects that aren't actually mapped into userspace ever,
so just don't bother unmapping them at this point, since all you are doing
is nothing. We should be making sure all access to these objects are locked in
kernel space instead. In theory the VRAM gart table is already done, and both
the shaders and stolen vga memory blocks are never accessed at runtime.
fixes: https://bugzilla.kernel.org/show_bug.cgi?id=16127
Reported-by: Jure Repnic <jlp.bugs@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>