Roland Vossen [Tue, 5 Jul 2011 20:06:08 +0000 (22:06 +0200)]
staging: brcm80211: fullmac register access macro's take u32 instead of pointers
Code cleanup. Fullmac contains macro's that access registers on the 32 bits
backplane bus. These registers should not be declared as pointers since
pointers can be 64 bits. The following patch series gets rid of these pointers
and ultimately of all compiler warning when compiling for amd64.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: rename dhd_bus structure and functions
The header file dhd_bus.h contains several function prototypes
starting with dhd_bus_ and using parameter with struct dhd_bus.
These function and structure have been renamed to brcmf_bus.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jesper Juhl [Thu, 23 Jun 2011 22:40:01 +0000 (00:40 +0200)]
Remove unneeded version.h includes from drivers/staging/rtl*/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/rtl8187se/,
drivers/staging/rtl8192e/, drivers/staging/rtl8192u/ &
drivers/staging/rtl8712/.
This patch removes them.
Jesper Juhl [Thu, 23 Jun 2011 22:47:43 +0000 (00:47 +0200)]
Remove unneeded version.h include from drivers/staging/cxt1e1/sbecom_inline_linux.h
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in
drivers/staging/cxt1e1/sbecom_inline_linux.h
This patch removes it.
Jesper Juhl [Thu, 23 Jun 2011 22:51:12 +0000 (00:51 +0200)]
Remove unneeded version.h includes (and add where needed) for drivers/staging/easycap/
It was pointed out by 'make versioncheck' that linux/version.h was not
always being included where needed and sometimes included needlessly
in drivers/staging/easycap/.
This patch fixes up the includes.
Jesper Juhl [Thu, 23 Jun 2011 23:02:55 +0000 (01:02 +0200)]
Remove unneeded version.h include from drivers/staging/tidspbridge/include/dspbridge/host_os.h
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in
drivers/staging/tidspbridge/include/dspbridge/host_os.h
This patch removes it.
Jesper Juhl [Thu, 23 Jun 2011 23:04:19 +0000 (01:04 +0200)]
Remove unneeded version.h includes (and add where needed) for drivers/tm6000/
It was pointed out by 'make versioncheck' that linux/version.h was not
always being included where needed and sometimes included needlessly
in drivers/staging/tm6000/.
This patch fixes up the includes.
Jesper Juhl [Thu, 23 Jun 2011 23:05:44 +0000 (01:05 +0200)]
Remove unneeded version.h includes from drivers/staging/wlags49_h2/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/wlags49_h2/.
This patch removes them.
Jesper Juhl [Thu, 23 Jun 2011 23:06:48 +0000 (01:06 +0200)]
Remove unneeded version.h include from drivers/staging/wlan-ng/prism2sta.c
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in drivers/staging/wlan-ng/prism2sta.c .
This patch removes it.
Ondrej Zary [Sat, 25 Jun 2011 17:14:21 +0000 (19:14 +0200)]
staging: ft1000: Merge common definitions from USB and PCMCIA drivers
Merge common definitions from ft1000-usb and ft1000-pcmcia drivers to
a common ft1000.h file.
This revealed two odd things in ft1000-usb which might be bugs so add
comments about them to ft1000_usb.h.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kirill Smelkov [Mon, 13 Jun 2011 12:18:32 +0000 (16:18 +0400)]
staging/easycap: Fix bytesperline calculation
As described above fillin_formats()
"""
/*
* THE 16-BIT easycap_format.mask HAS MEANING:
* (least significant) BIT 0: 0 => PAL, 25 FPS; 1 => NTSC, 30 FPS
* BITS 2-4: RESERVED FOR DIFFERENTIATING STANDARDS
* BITS 5-7: NUMBER OF BYTES PER PIXEL
* BIT 8: 0 => NATIVE BYTE ORDER; 1 => SWAPPED
* BITS 9-10: RESERVED FOR OTHER BYTE PERMUTATIONS
* BIT 11: 0 => UNDECIMATED; 1 => DECIMATED
* BIT 12: 0 => OFFER FRAMES; 1 => OFFER FIELDS
* BIT 13: 0 => FULL FRAMERATE; 1 => REDUCED
* (most significant) BITS 14-15: RESERVED FOR OTHER FIELD/FRAME OPTIONS
* IT FOLLOWS THAT:
* bytesperpixel IS ((0x00E0 & easycap_format.mask) >> 5)
* byteswaporder IS true IF (0 != (0x0100 & easycap_format.mask))
*
* decimatepixel IS true IF (0 != (0x0800 & easycap_format.mask))
*
* offerfields IS true IF (0 != (0x1000 & easycap_format.mask))
*/
"""
bytes-per-pixel is stored in bits 5-7 of calculated mask.
But when calculating bytes-per-line we were extracting wrong value
instead of bytes-per-pixel, which was usually 2 times bigger -- e.g. for
PAL YUV 422 I was getting ((mask3 & 0x00F0) >> 4) = 4 bytes instead of 2.
The error here is that even in comments there is a line saying
* bytesperpixel IS ((0x00E0 & easycap_format.mask) >> 5)
but we were using
((0x00F0 & easycap_format.mask) >> 4)
With 2 times bigger bytesperpixel and automatically bytesperline, the
video was shown halfheight'ed, which is understandable if we look at
video-memory layout:
for each line, we should display width pixels, then move to next line
with bytesperline, and oops, if bytesperline = 2*real-bytesperlin, we'll
skip one line and move to next-next line, and so only half lines will be
shown.
Initially I've debugged the problem with my video application[1], but
I've checked that after this patch both rawv (mine app) and tvtime work
correctly.
[1] http://repo.or.cz/w/rawv.git
P.S. why at all we use those mask/shifts? Why not use bitfields?
Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kirill Smelkov [Tue, 14 Jun 2011 16:46:49 +0000 (20:46 +0400)]
staging/easycap: Fix thinko in "bars" module option description
Both bars=0 and bars=1 were described as meaning to display bars on
signal lost. Actually bars=1 means "display bars", but bars=0 means
display raw source as is (usually black screen).
Instead of changing bars=0 to "_no_ testcard bars ..." as suggested by
Dan Carpenter reword the whole bars description for clarity.
Cc: Mike Thomas <rmthomas@sciolus.org> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kirill Smelkov [Mon, 13 Jun 2011 12:18:28 +0000 (16:18 +0400)]
staging/easycap: Kill leftover build options in readme
The following options were removed from in-tree driver, but were left
in README:
- EASYCAP_IS_VIDEODEV_CLIENT was removed in cb81fa07 (staging/easycap:
kill EASYCAP_IS_VIDEODEV_CLIENT compilation conditional);
- EASYCAP_NEEDS_V4L2_DEVICE_H/EASYCAP_NEEDS_V4L2_FOPS were removed in 30516058 (staging/easycap: kill EASYCAP_NEEDS_V4L2_DEVICE_H and
EASYCAP_NEEDS_V4L2_FOPS);
- EASYCAP_NEEDS_UNLOCKED_IOCTL was removed in f2b3c685 (staging/easycap:
kill EASYCAP_NEEDS_UNLOCKED_IOCTL).
Remove them.
Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tobias Klauser [Fri, 17 Jun 2011 08:53:54 +0000 (10:53 +0200)]
Staging: usbip: Fix out-of-tree build for userspace
This fixes out-of-tree builds ($builddir != $srcdir). In such cases,
libusbip.la cannot be found because it is generated in the build
directory and not the source directory.
Larry Finger [Sun, 19 Jun 2011 03:34:34 +0000 (22:34 -0500)]
staging: r8192e_pci: Handle duplicate PCI ID 0x10ec:0x8192 conflict with rtl8192se
There are two devices with PCI ID 0x10ec:0x8192, namely RTL8192E and
RTL8192SE. The method of distinguishing them is by the revision ID
at offset 0x8 of the PCI configuration space. If the value is 0x10,
then the device uses rtl8192se for a driver.
Jerome Marchand [Fri, 10 Jun 2011 13:28:49 +0000 (15:28 +0200)]
Staging: zram: Replace mutex lock by a R/W semaphore
Currently, nothing protects zram table from concurrent access.
For instance, ZRAM_UNCOMPRESSED bit can be cleared by zram_free_page()
called from a concurrent write between the time ZRAM_UNCOMPRESSED has
been set and the time it is tested to unmap KM_USER0 in
zram_bvec_write(). This ultimately leads to kernel panic.
Also, a read request can occurs when the page has been freed by a
running write request and before it has been updated, leading to
zero filled block being incorrectly read and "Read before write"
error message.
This patch replace the current mutex by a rw_semaphore. It extends
the protection to zram table (currently, only compression buffers are
protected) and read requests (currently, only write requests are
protected).
Jerome Marchand [Fri, 10 Jun 2011 13:28:48 +0000 (15:28 +0200)]
Staging: zram: allow partial page operations
Commit 7b19b8d45b216ff3186f066b31937bdbde066f08 (zram: Prevent overflow
in logical block size) introduced ZRAM_LOGICAL_BLOCK_SIZE constant to
prevent overflow of logical block size on 64k page kernel.
However, the current implementation of zram only allow operation on block
of the same size as a page. That makes theorically legit 4k requests fail
on 64k page kernel.
This patch makes zram allow operation on partial pages. Basically, it
means we still do operations on full pages internally, but only copy the
relevent segments from/to the user memory.
This patch refactor the code of zram_read/write() functions. It does
not removes a lot of duplicate code alone, but is mostly a helper for
the third patch of this series (Staging: zram: allow partial page
operations).
The message has been deleted, the driver requires no special action on this
particular event (). See: https://bugzilla.kernel.org/show_bug.cgi?id=38162
Reported-by: David Hill <hilld@binarystorm.net> Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Wed, 29 Jun 2011 23:47:50 +0000 (16:47 -0700)]
staging: brcm80211: rename structure definitions in dhd.h
Structure definitions in dhd.h have been prefixed with brcmf_ for
consistent naming in fullmac driver and typedef of these structures
has been removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Wed, 29 Jun 2011 23:47:48 +0000 (16:47 -0700)]
staging: brcm80211: rename function variables
The fullmac driver uses dhd as variable name for the driver instance
in a number of functions. This has been changed to a more generic name
as the dhd is not meaningful (broadcom internal name).
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Franky Lin [Wed, 29 Jun 2011 23:47:47 +0000 (16:47 -0700)]
staging: brcm80211: clean up firmware download code in fullmac
In brcmfmac the firmware download related code scatter all around.
And some old dead code which is not following the standard firmware
routine is still present. This patch limits the firmware download
related code only in dhd_sdio.c and removes the rest.
Signed-off-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>