[PATCH] staging: goldfish: Call free_irq in error path

2014-04-08 Thread Tuomas Tynkkynen
If misc_register failed in goldfish_audio_probe, the already requested
IRQ wouldn't get freed. Add a call to free_irq() like there is in
goldfish_audio_remove().

Signed-off-by: Tuomas Tynkkynen tuomas.tynkky...@iki.fi
---
Only compile tested. For the Eudyptula Challenge.
 drivers/staging/goldfish/goldfish_audio.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/goldfish/goldfish_audio.c 
b/drivers/staging/goldfish/goldfish_audio.c
index f96dcec..7ac2602 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -334,6 +334,7 @@ static int goldfish_audio_probe(struct platform_device 
*pdev)
return 0;
 
 err_misc_register_failed:
+   free_irq(data-irq, data);
 err_request_irq_failed:
dma_free_coherent(pdev-dev, COMBINED_BUFFER_SIZE,
data-buffer_virt, data-buffer_phys);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v12][ 07/12] drm: drm_display_mode: add signal polarity flags

2014-04-08 Thread Andrzej Hajda
Hi Denis,

On 04/07/2014 02:44 PM, Denis Carikli wrote:
 We need a way to pass signal polarity informations
   between DRM panels, and the display drivers.
 
 To do that, a pol_flags field was added to drm_display_mode.
 
 Signed-off-by: Denis Carikli de...@eukrea.com
 ---
 ChangeLog v11-v12:
 - Rebased: This patch now applies against drm_modes.h
 - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names
 
 ChangeLog v10-v11:
 - Since the imx-drm won't be able to retrive its regulators
   from the device tree when using display-timings nodes,
   and that I was told that the drm simple-panel driver 
   already supported that, I then, instead, added what was
   lacking to make the eukrea displays work with the
   drm-simple-panel driver.
 
   That required a way to get back the display polarity
   informations from the imx-drm driver without affecting
   userspace.
 ---
  include/drm/drm_modes.h |8 
  1 file changed, 8 insertions(+)
 
 diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
 index 2dbbf99..b3789e2 100644
 --- a/include/drm/drm_modes.h
 +++ b/include/drm/drm_modes.h
 @@ -93,6 +93,13 @@ enum drm_mode_status {
  
  #define DRM_MODE_FLAG_3D_MAX DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF
  
 +#define DRM_MODE_FLAG_POL_PIXDATA_NEGEDGEBIT(1)
 +#define DRM_MODE_FLAG_POL_PIXDATA_POSEDGEBIT(2)
 +#define DRM_MODE_FLAG_POL_PIXDATA_PRESERVE   BIT(3)

What is the purpose of DRM_MODE_FLAG_POL_PIXDATA_PRESERVE?
If 'preserve' means 'ignore' we can set to zero negedge and posedge bits
instead of adding new bit. If it is something different please describe it.

 +#define DRM_MODE_FLAG_POL_DE_LOW BIT(4)
 +#define DRM_MODE_FLAG_POL_DE_HIGHBIT(5)
 +#define DRM_MODE_FLAG_POL_DE_PRESERVEBIT(6)
 +

The same comments here.

  struct drm_display_mode {
   /* Header */
   struct list_head head;
 @@ -144,6 +151,7 @@ struct drm_display_mode {
   int vrefresh;   /* in Hz */
   int hsync;  /* in kHz */
   enum hdmi_picture_aspect picture_aspect_ratio;
 + unsigned int pol_flags;

Adding field and macros description to the DocBook would be nice.

Regards
Andrzej

  };
  
  /* mode specified on the command line */
 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: goldfish: switch from spinlock to mutex

2014-04-08 Thread Dan Carpenter
On Sat, Apr 05, 2014 at 05:38:05PM +0300, Kristina Martšenko wrote:
 On 04/04/14 16:30, Dan Carpenter wrote:
  On Fri, Apr 04, 2014 at 02:46:14PM +0300, Kristina Martšenko wrote:
  
  Yes, I didn't find any interrupt handlers either, which is partially why
  I thought it was (probably) safe.
  
  What's the other part of why it was safe?  Put that stuff in the
  changelog.  When we're reviewing patches we're always interested to know
  if it's safe.  :)
 
 The other part was whether the code was allowed to sleep. I figured it
 probably was since it's only accessed from MTD callback functions and
 other drivers in drivers/mtd/devices/ also sleep in those functions
 (either by using mutexes or by calling schedule() directly).
 
 I didn't mention why I thought it was safe in the changelog because I
 thought maybe the reasons would seem too obvious to more experienced
 kernel developers.

Yeah.  In the end, I looked up those functions and saw that they sleep
as well.  On the staging list, we're not going to be subsystem experts.
Also I prefer just emailing people my questions instead of looking
things up in the code since hopefully they know the answers already
if they wrote the patch.

 
 Should I test and resend the patch with a new changelog?

Whatever...  The patch is fine.

Reviewed-by: Dan Carpenter dan.carpen...@oracle.com

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 3/3] memstick: Add realtek USB memstick host driver

2014-04-08 Thread Roger


On 04/02/2014 11:16 PM, Lee Jones wrote:

On Tue, 01 Apr 2014, Andrew Morton wrote:


On Tue, 1 Apr 2014 11:20:32 +0800 Roger rogera...@realtek.com wrote:


On 03/25/2014 06:44 PM, rogera...@realtek.com wrote:

From: Roger Tseng rogera...@realtek.com

Realtek USB memstick host driver provides memstick host support based on the
Realtek USB card reader MFD driver.

Signed-off-by: Roger Tseng rogera...@realtek.com
---
   drivers/memstick/host/Kconfig   |  10 +
   drivers/memstick/host/Makefile  |   1 +
   drivers/memstick/host/rtsx_usb_ms.c | 839 

   3 files changed, 850 insertions(+)
   create mode 100644 drivers/memstick/host/rtsx_usb_ms.c

Hi Andrew,

Since I'll have to send next revision(v6, to modify patch 1/3) and
you've commented v4, would you also comment or Ack the 3/3 of this one?
This should save one revision for me to make any necessary change.


It looks OK to my inexpert eye.  It would be better if Maxim and/or Alex
could review the code.  If that doesn't happen then I guess the best we
can do is to go ahead and merge it.  Have you worked out via which tree
the patches will be merged?


I'll be happy to take the set if one of the subsystem experts would be
kind enough to cast an eye over it.

Maxim, Alex?


Lee,

When I prepare my next submission, I found a previous version of this 
patch set(and only the 1/3 'mfd' part)  seems to be merged in the 
following commit:


commit e5744abb2fa3629aa5a94e21ca1eae32ff2fe00b
Merge: c29aa15 2d28ca7
Author: Linus Torvalds torva...@linux-foundation.org
Date:   Mon Apr 7 10:24:18 2014 -0700

Merge tag 'mfd-for-linus-3.15' of 
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd


Is there any chance to revert it? Or what can I do to help current 
situation?


note: the merged commit:
commit 730876be256603b4ee7225a125467d97a7ce9060
Author: Roger Tseng rogera...@realtek.com
Date:   Wed Feb 12 18:00:36 2014 +0800

mfd: Add realtek USB card reader driver


Best regards,
Roger Tseng
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v12][ 07/12] drm: drm_display_mode: add signal polarity flags

2014-04-08 Thread Denis Carikli

On 04/08/2014 08:36 AM, Andrzej Hajda wrote:


Hi Denis,

Hi,


+#define DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE  BIT(1)
+#define DRM_MODE_FLAG_POL_PIXDATA_POSEDGE  BIT(2)
+#define DRM_MODE_FLAG_POL_PIXDATA_PRESERVE BIT(3)


What is the purpose of DRM_MODE_FLAG_POL_PIXDATA_PRESERVE?
If 'preserve' means 'ignore' we can set to zero negedge and posedge bits
instead of adding new bit. If it is something different please describe it.

Yes, it meant 'ignore'.

The goal was to be able to have a way to keep the old behavior while 
still being able to set the flags.


So, with the imx-drm driver, if none of the DRM_MODE_FLAG_POL_PIXDATA 
were set(that is POSEDGE, NEGEDGE, PRESERVE), then in ipuv3-crtc.c, it 
went using the old flags settings that were previously hardcoded.


The same applied for DRM_MODE_FLAG_POL_DE.
The patch using theses flags is the 08/12 of this same serie.


  struct drm_display_mode {

[..]

+   unsigned int pol_flags;


Adding field and macros description to the DocBook would be nice.
So I will have to describe it in the Connector Helper Operations 
section of drm.tmpl, right before the mode_valid synopsis ?


Denis.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] Staging: rtl8192e: Fix declaration of symbols

2014-04-08 Thread Dan Carpenter
On Sun, Apr 06, 2014 at 09:26:55PM -0500, Joel Pelaez Jorge wrote:
 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
 @@ -19,6 +19,7 @@
 
  #include linux/string.h
  #include rtl_core.h
 +#include rtl_wx.h
 
  #define RATE_COUNT 12
  static u32 rtl8192_rates[] = {
 @@ -1320,7 +1321,7 @@ static struct iw_statistics
 *r8192_get_wireless_stats(struct net_device *dev)

This patch is line-wrapped and doesn't apply.  Read
Documentation/email-clients.txt or use git send-email.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] Staging: vt6655: iwctl.c: fix a sparse warning

2014-04-08 Thread Jimmy Li
thanks for correcting my patch format.

Signed-off-by: Jimmy Li coder.l...@gmail.com
---
v1 fix a sparse warning.
(iwctl.c:1846:35: expected restricted gfp_t [usertype] flags)
v2 clear up two unnecessary variable, buf and blen.
v3 fix patch format.
 drivers/staging/vt6655/iwctl.c |9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index ac3fc16..394031b 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -1835,19 +1835,14 @@ int iwctl_siwencodeext(struct net_device *dev,
size_t seq_len = 0, key_len = 0;
 //
// int ii;
-   u8 *buf;
-   size_t blen;
u8 key_array[64];
int ret = 0;
 
PRINT_K(SIOCSIWENCODEEXT.. \n);
 
-   blen = sizeof(*param);
-   buf = kmalloc((int)blen, (int)GFP_KERNEL);
-   if (buf == NULL)
+   param = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);
+   if (param == NULL)
return -ENOMEM;
-   memset(buf, 0, blen);
-   param = (struct viawget_wpa_param *)buf;
 
 //recover alg_name
switch (ext-alg) {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: goldfish: Call free_irq in error path

2014-04-08 Thread One Thousand Gnomes
On Tue,  8 Apr 2014 09:15:22 +0300
Tuomas Tynkkynen tuomas.tynkky...@iki.fi wrote:

 If misc_register failed in goldfish_audio_probe, the already requested
 IRQ wouldn't get freed. Add a call to free_irq() like there is in
 goldfish_audio_remove().
 
 Signed-off-by: Tuomas Tynkkynen tuomas.tynkky...@iki.fi

Acked-by: Alan Cox a...@linux.intel.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] Staging: vt6655: iwctl.c: fix a sparse warning

2014-04-08 Thread Dan Carpenter
On Tue, Apr 08, 2014 at 07:09:27PM +0800, Jimmy Li wrote:
 thanks for correcting my patch format.
 
 Signed-off-by: Jimmy Li coder.l...@gmail.com
 ---
 v1 fix a sparse warning.
   (iwctl.c:1846:35: expected restricted gfp_t [usertype] flags)
 v2 clear up two unnecessary variable, buf and blen.
 v3 fix patch format.
  drivers/staging/vt6655/iwctl.c |9 ++---
  1 file changed, 2 insertions(+), 7 deletions(-)

Please try applying your patch.  Save the email as raw text including
headers and everything.  `cat raw_email.txt | git am`.  Then review the
log with `git log`.  You'll see that the format is still messed up.  :(

The part which should be discarded is saved and the part which should be
saved is deleted.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 3/3] memstick: Add realtek USB memstick host driver

2014-04-08 Thread Lee Jones
 From: Roger Tseng rogera...@realtek.com
 
 Realtek USB memstick host driver provides memstick host support based on 
 the
 Realtek USB card reader MFD driver.
 
 Signed-off-by: Roger Tseng rogera...@realtek.com
 ---
drivers/memstick/host/Kconfig   |  10 +
drivers/memstick/host/Makefile  |   1 +
drivers/memstick/host/rtsx_usb_ms.c | 839 
  
3 files changed, 850 insertions(+)
create mode 100644 drivers/memstick/host/rtsx_usb_ms.c
 Hi Andrew,
 
 Since I'll have to send next revision(v6, to modify patch 1/3) and
 you've commented v4, would you also comment or Ack the 3/3 of this one?
 This should save one revision for me to make any necessary change.
 
 It looks OK to my inexpert eye.  It would be better if Maxim and/or Alex
 could review the code.  If that doesn't happen then I guess the best we
 can do is to go ahead and merge it.  Have you worked out via which tree
 the patches will be merged?
 
 I'll be happy to take the set if one of the subsystem experts would be
 kind enough to cast an eye over it.
 
 Maxim, Alex?
 
 Lee,
 
 When I prepare my next submission, I found a previous version of
 this patch set(and only the 1/3 'mfd' part)  seems to be merged in
 the following commit:
 
 commit e5744abb2fa3629aa5a94e21ca1eae32ff2fe00b
 Merge: c29aa15 2d28ca7
 Author: Linus Torvalds torva...@linux-foundation.org
 Date:   Mon Apr 7 10:24:18 2014 -0700
 
 Merge tag 'mfd-for-linus-3.15' of
 git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
 
 Is there any chance to revert it? Or what can I do to help current
 situation?

What will happen if we don't revert it? Does it depend on something
else?

 note: the merged commit:
 commit 730876be256603b4ee7225a125467d97a7ce9060
 Author: Roger Tseng rogera...@realtek.com
 Date:   Wed Feb 12 18:00:36 2014 +0800
 
 mfd: Add realtek USB card reader driver
 
 
 Best regards,
 Roger Tseng

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v12][ 06/12] ARM: dts: imx5*, imx6*: correct display-timings nodes.

2014-04-08 Thread Shawn Guo
On Mon, Apr 07, 2014 at 02:44:45PM +0200, Denis Carikli wrote:
 The imx-drm driver can't use the de-active and
 pixelclk-active display-timings properties yet.
 
 Instead the data-enable and the pixel data clock
 polarity are hardcoded in the imx-drm driver.
 
 So theses properties are now set to keep
 the same behaviour when imx-drm will start
 using them.
 
 Signed-off-by: Denis Carikli de...@eukrea.com
 ---
 ChangeLog v9-v10:
 - New patch that was splitted out of:
   staging imx-drm: Use de-active and pixelclk-active
   display-timings.
 ---
  arch/arm/boot/dts/imx51-babbage.dts   |2 ++
  arch/arm/boot/dts/imx53-m53evk.dts|2 ++
  arch/arm/boot/dts/imx53-tx53-x03x.dts |2 +-
  arch/arm/boot/dts/imx6qdl-gw53xx.dtsi |2 ++
  arch/arm/boot/dts/imx6qdl-gw54xx.dtsi |2 ++
  arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi |2 ++
  arch/arm/boot/dts/imx6qdl-sabreauto.dtsi  |2 ++
  arch/arm/boot/dts/imx6qdl-sabrelite.dtsi  |2 ++
  arch/arm/boot/dts/imx6qdl-sabresd.dtsi|2 ++
  9 files changed, 17 insertions(+), 1 deletion(-)

...

 diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts 
 b/arch/arm/boot/dts/imx53-tx53-x03x.dts
 index 0217dde3..4092a81 100644
 --- a/arch/arm/boot/dts/imx53-tx53-x03x.dts
 +++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts
 @@ -93,7 +93,7 @@
   hsync-active = 0;
   vsync-active = 0;
   de-active = 1;
 - pixelclk-active = 1;
 + pixelclk-active = 0;

@Lothar, is this change correct?

Shawn

   };
  
   ET0500 {

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v12][ 12/12] ARM: imx_v6_v7_defconfig: Add more drm drivers.

2014-04-08 Thread Shawn Guo
On Mon, Apr 07, 2014 at 02:44:51PM +0200, Denis Carikli wrote:
 The DRM_PANEL_SIMPLE is needed by the eukrea
 mbimxsd51's displays.
 
 Signed-off-by: Denis Carikli de...@eukrea.com

Applied, thanks.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v12][ 03/12] imx-drm: Correct BGR666 and the board's dts that use them.

2014-04-08 Thread Russell King - ARM Linux
On Mon, Apr 07, 2014 at 02:44:42PM +0200, Denis Carikli wrote:
  arch/arm/boot/dts/imx51-apf51dev.dts|2 +-
  arch/arm/boot/dts/imx53-m53evk.dts  |2 +-
  drivers/staging/imx-drm/imx-ldb.c   |4 ++--
  drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++--
  4 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts 
 b/arch/arm/boot/dts/imx51-apf51dev.dts
 index c5a9a24..7b3851d 100644
 --- a/arch/arm/boot/dts/imx51-apf51dev.dts
 +++ b/arch/arm/boot/dts/imx51-apf51dev.dts
 @@ -18,7 +18,7 @@
  
   display@di1 {
   compatible = fsl,imx-parallel-display;
 - interface-pix-fmt = bgr666;
 + interface-pix-fmt = rgb666;

...

   /* bgr666 */
   ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
 - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
 + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */
   ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */
 - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
 + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */

arm-soc people have become very obtuse with respect to changes to any
patches to arch/arm/boot/dts, and complain loudly if any changes to
that directory do not go through them as separate patches.

What this means is that your patch is unacceptable and needs to be split
up.

The choices seem to be to either break imx-drm by splitting the patch in
two, thereby ending up with the two dependent changes being merged
entirely separate, resulting in breakage while one or other is merged,
or to add the RGB666 support, wait for that to hit mainline, then
update the DT files, wait for that to hit mainline, then fix the BGR666
support.  That'll take around six to nine months (two to three months
per release cycle.)

Or arm-soc could come to their senses and realise that they do not have
sole ownership over arch/arm/boot/dts.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v4] Staging: vt6655: iwctl.c: fix a sparse warning

2014-04-08 Thread Joe Perches
On Tue, 2014-04-08 at 20:36 +0800, Jimmy Li wrote:
 fix a sparse warning and do some clean up.
 
 Signed-off-by: Jimmy Li coder.l...@gmail.com

The --- line should go here

 v1 fix a sparse warning.
   (iwctl.c:1846:35: expected restricted gfp_t [usertype] flags)
 v2 clear up two unnecessary variable, buf and blen.
 v3 fix patch format.
 v4 fix patch format again.
 
 ---

not here

As is, the versioning information would end up
in the changlog and that isn't the desired style.

 diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
[]
 @@ -1835,19 +1835,14 @@ int iwctl_siwencodeext(struct net_device *dev,
[]
 + param = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);

Also, param is a struct viawget_wpa_param * so
this should use:

param = kzalloc(sizeof(*param), GFP_KERNEL);


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 3/3] memstick: Add realtek USB memstick host driver

2014-04-08 Thread Roger

On 04/08/2014 07:37 PM, Lee Jones wrote:



Lee,

When I prepare my next submission, I found a previous version of
this patch set(and only the 1/3 'mfd' part)  seems to be merged in
the following commit:

commit e5744abb2fa3629aa5a94e21ca1eae32ff2fe00b
Merge: c29aa15 2d28ca7
Author: Linus Torvalds torva...@linux-foundation.org
Date:   Mon Apr 7 10:24:18 2014 -0700

 Merge tag 'mfd-for-linus-3.15' of
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Is there any chance to revert it? Or what can I do to help current
situation?


What will happen if we don't revert it? Does it depend on something
else?

No, it has no dependency error but only provides an unused mfd device 
and exports nothing functional to user.


I think it would be good to submit the diff between the merged 1/3 patch 
and the v6, along with full 2/3 and 3/3.



note: the merged commit:
commit 730876be256603b4ee7225a125467d97a7ce9060
Author: Roger Tseng rogera...@realtek.com
Date:   Wed Feb 12 18:00:36 2014 +0800

 mfd: Add realtek USB card reader driver


Best regards,
Roger Tseng



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 3/3] memstick: Add realtek USB memstick host driver

2014-04-08 Thread Dan Carpenter
On Tue, Apr 08, 2014 at 09:10:13PM +0800, Roger wrote:
 On 04/08/2014 07:37 PM, Lee Jones wrote:
 
 Lee,
 
 When I prepare my next submission, I found a previous version of
 this patch set(and only the 1/3 'mfd' part)  seems to be merged in
 the following commit:
 
 commit e5744abb2fa3629aa5a94e21ca1eae32ff2fe00b
 Merge: c29aa15 2d28ca7
 Author: Linus Torvalds torva...@linux-foundation.org
 Date:   Mon Apr 7 10:24:18 2014 -0700
 
  Merge tag 'mfd-for-linus-3.15' of
 git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
 
 Is there any chance to revert it? Or what can I do to help current
 situation?
 
 What will happen if we don't revert it? Does it depend on something
 else?
 
 No, it has no dependency error but only provides an unused mfd
 device and exports nothing functional to user.
 
 I think it would be good to submit the diff between the merged 1/3
 patch and the v6, along with full 2/3 and 3/3.

Yes.  That sounds best.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5] Staging: vt6655: iwctl.c: fix a sparse warning

2014-04-08 Thread Dan Carpenter
On Tue, Apr 08, 2014 at 09:35:02PM +0800, Jimmy Li wrote:
 fix a sparse warning and do some clean up.
 iwctl.c:1846:35: expected restricted gfp_t [usertype] flags
 
 Signed-off-by: Jimmy Li coder.l...@gmail.com
 ---

Looks good.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging:Octeon-usb:octeon-hcd.c return value

2014-04-08 Thread Paul McQuade
return value instead of function.

Signed-off-by: Paul McQuade paulmcq...@gmail.com
---
 drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c 
b/drivers/staging/octeon-usb/octeon-hcd.c
index 8b8ce72..2d15001 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -3483,7 +3483,7 @@ static int octeon_usb_hub_status_data(struct usb_hcd 
*hcd, char *buf)
buf[0] = 0;
buf[0] = port_status.connect_change  1;
 
-   return (buf[0] != 0);
+   return buf[0] != 0;
 }
 
 static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 
wValue, u16 wIndex, char *buf, u16 wLength)
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [visorchipset] invalid opcode: 0000 [#1] PREEMPT SMP

2014-04-08 Thread Romer, Benjamin M
On Tue, 2014-04-08 at 10:53 +0800, Fengguang Wu wrote:
 Hi Benjamin,
 
  Fengguang,
  
  I ran your script against freshly-checked-out source from staging-next, and 
  was not able to reproduce the error with it. My boot log is attached. I 
  noticed that your log did not have Hypervisor detected: KVM in the trace. 
  The KVM options in your script also differ substantially from the ones 
  shown at the end of your trace...
  
  When I reran your script with the -cpu Haswell,+smep,+smap option I was 
  able to get the same result as you. IMHO KVM should not be setting this bit 
  if it's emulating bare metal.
 
 Sorry.. We tried to provide a simplified reproduce script and in your
 case, it has a significant mismatch with the real KVM options. We'll
 fix it, thanks for pointing it out!
 
 Thanks,
 Fengguang

That will be helpful, and as I mentioned, I can reproduce your results,
but I'm still not sure why a virtualized processor is giving an invalid
opcode fault on a vmcall. The Intel documentation is pretty specific
about this - IF not in VMX operation THEN #UD; ELSIF in VMX non-root
operation THEN VM exit.

Either KVM should be saying I'm a real processor and not a virtual CPU,
really! - in which case, the hypervisor bit should be off and vmcalls
should cause an invalid opcode fault, or, KVM should be saying I'm a
vritualized processor! and setting the hypervisor bit, and doing a
vmexit on vmcall instead. This seems like a KVM bug to me.

-- Ben
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH net-next,v4] hyperv: Add support for virtual Receive Side Scaling (vRSS)

2014-04-08 Thread Haiyang Zhang


 -Original Message-
 From: Sharat Masetty [mailto:shara...@gmail.com]
 Sent: Monday, April 7, 2014 6:13 PM
 To: David Miller
 Cc: Haiyang Zhang; Linux Netdev List; KY Srinivasan; o...@aepfle.de;
 jasow...@redhat.com; linux-ker...@vger.kernel.org; driverdev-
 de...@linuxdriverproject.org
 Subject: Re: [PATCH net-next,v4] hyperv: Add support for virtual Receive Side
 Scaling (vRSS)
 
 Hi Zhang,
 
 How is this beneficial when compared to RPS(receive packet steering)?
 Can you please provide more details on what this patch does?

This patch supports the virtual RSS feature provided by Hyper-V hosts. 
Currently,
the interrupts are received on only one CPU per vNIC. With this feature, we can 
receive interrupts from multiple CPUs and VMBus channels for one vNIC. Outgoing 
packets are put into multiple channels as well. So the network throughput can 
scale up with the number of CPUs for a VM.

RPS is basically a software implementation of RSS. This is an online doc about 
these features:
https://www.kernel.org/doc/Documentation/networking/scaling.txt

Thanks,
- Haiyang

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging:Line6:usbdefs.h parenthesis for Marcos

2014-04-08 Thread Paul McQuade
ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Paul McQuade paulmcq...@gmail.com
---
 drivers/staging/line6/usbdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index 2d1cc47..48958b5 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -40,7 +40,7 @@
 #define LINE6_DEVID_TONEPORT_UX2  0x4142
 #define LINE6_DEVID_VARIAX0x534d
 
-#define LINE6_BIT(x) LINE6_BIT_ ## x = 1  LINE6_INDEX_ ## x
+#define LINE6_BIT(x) (LINE6_BIT_ ## x = 1  LINE6_INDEX_ ## x)
 
 enum {
LINE6_INDEX_BASSPODXT,
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] Staging:keucr:scsiglue.c-no semicolon terminated

2014-04-08 Thread Paul McQuade
WARNING: do {} while (0) macros should not be semicolon terminated

Signed-off-by: Paul McQuade paulmcq...@gmail.com
---
 drivers/staging/keucr/scsiglue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
index ac3d34d..fce19a4 100644
--- a/drivers/staging/keucr/scsiglue.c
+++ b/drivers/staging/keucr/scsiglue.c
@@ -277,7 +277,7 @@ static int show_info(struct seq_file *m, struct Scsi_Host 
*host)
do { \
if (us-fflags  value) \
SPRINTF(  #name); \
-   } while (0);
+   } while (0)
 US_DO_ALL_FLAGS
 #undef US_FLAG
seq_putc(m, '\n');
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] Staging:android:uapi:binder.h __packed

2014-04-08 Thread Paul McQuade
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Paul McQuade paulmcq...@gmail.com
---
 drivers/staging/android/uapi/binder.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/uapi/binder.h 
b/drivers/staging/android/uapi/binder.h
index 904adb7..dba4cef 100644
--- a/drivers/staging/android/uapi/binder.h
+++ b/drivers/staging/android/uapi/binder.h
@@ -169,7 +169,7 @@ struct binder_ptr_cookie {
 struct binder_handle_cookie {
__u32 handle;
binder_uintptr_t cookie;
-} __attribute__((packed));
+} __packed;
 
 struct binder_pri_desc {
__s32 priority;
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[GIT PULL] More Staging driver patches for 3.15-rc1

2014-04-08 Thread Greg KH
The following changes since commit 8e0c0832348c7fda1c85d67697cfe4adf077344c:

  Merge tag 'fbdev-main-3.15' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux (2014-04-04 21:28:36 
-0700)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ 
tags/staging-3.15-rc1

for you to fetch changes up to dda26427bd5252cbea876fe8a80050943c0dc642:

  staging: rtl8723au: The 8723 only has two paths (2014-04-07 12:53:00 -0700)


More staging patches for 3.15-rc1

Here are some more staging patches for 3.15-rc1.  They include a
late-submission of a wireless driver that a bunch of people seem to have
the hardware for now.  As it's stand-alone, it should be fine (now
passes the 0-day random build bot tests.)  There are also some fixes for
the unisys drivers, as they were causing havoc on a number of different
machines.  To resolve all of those issues, we just mark the driver as
BROKEN now, and we can fix it up properly over time.

Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org


Greg Kroah-Hartman (1):
  Staging: unisys: mark drivers as BROKEN

Jes Sorensen (1):
  staging: rtl8723au: The 8723 only has two paths

Larry Finger (8):
  staging: r8723au: Add source files for new driver - part 1
  staging: r8723au: Add source files for new driver - part 2
  staging: r8723au: Add source files for new driver - part 3
  staging: r8723au: Add source files for new driver - part 4
  staging: r8723au: Additional source patches
  staging: r8723au: Turn on build of new driver
  staging: r8723au: Fix randconfig build errors
  staging: r8723au: Fix build problem when RFKILL is not selected

Masanari Iida (1):
  staging: unisys: Add missing close parentheses in filexfer.c

Sasha Levin (1):
  Staging: unisys: verify that a control channel exists

 drivers/staging/Kconfig| 2 +
 drivers/staging/Makefile   | 1 +
 drivers/staging/rtl8723au/Kconfig  |38 +
 drivers/staging/rtl8723au/Makefile |58 +
 drivers/staging/rtl8723au/TODO |13 +
 drivers/staging/rtl8723au/core/rtw_ap.c|  2087 
 drivers/staging/rtl8723au/core/rtw_cmd.c   |  1876 +++
 drivers/staging/rtl8723au/core/rtw_efuse.c |   716 ++
 drivers/staging/rtl8723au/core/rtw_ieee80211.c |  1861 +++
 drivers/staging/rtl8723au/core/rtw_io.c|   266 +
 drivers/staging/rtl8723au/core/rtw_ioctl_set.c |   601 +
 drivers/staging/rtl8723au/core/rtw_led.c   |  1899 
 drivers/staging/rtl8723au/core/rtw_mlme.c  |  2500 
 drivers/staging/rtl8723au/core/rtw_mlme_ext.c  |  9990 
 drivers/staging/rtl8723au/core/rtw_p2p.c   |  4001 +++
 drivers/staging/rtl8723au/core/rtw_pwrctrl.c   |   689 ++
 drivers/staging/rtl8723au/core/rtw_recv.c  |  2471 
 drivers/staging/rtl8723au/core/rtw_security.c  |  1652 +++
 drivers/staging/rtl8723au/core/rtw_sreset.c|   255 +
 drivers/staging/rtl8723au/core/rtw_sta_mgt.c   |   509 +
 drivers/staging/rtl8723au/core/rtw_wlan_util.c |  1760 +++
 drivers/staging/rtl8723au/core/rtw_xmit.c  |  2460 
 drivers/staging/rtl8723au/hal/Hal8723PwrSeq.c  |80 +
 drivers/staging/rtl8723au/hal/Hal8723UHWImg_CE.c   |   136 +
 .../staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c|  1063 ++
 drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c   |   726 ++
 drivers/staging/rtl8723au/hal/HalHWImg8723A_MAC.c  |   188 +
 drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c   |   259 +
 drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c   |   163 +
 drivers/staging/rtl8723au/hal/hal_com.c|   881 ++
 drivers/staging/rtl8723au/hal/hal_intf.c   |   420 +
 drivers/staging/rtl8723au/hal/odm.c|  2090 
 drivers/staging/rtl8723au/hal/odm_HWConfig.c   |   481 +
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c |   162 +
 drivers/staging/rtl8723au/hal/odm_debug.c  |24 +
 drivers/staging/rtl8723au/hal/odm_interface.c  |   236 +
 .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c| 11304 +++
 drivers/staging/rtl8723au/hal/rtl8723a_cmd.c   |   845 ++
 drivers/staging/rtl8723au/hal/rtl8723a_dm.c|   273 +
 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c  |  3452 ++
 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c|  1162 ++
 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c|   507 +
 drivers/staging/rtl8723au/hal/rtl8723a_rxdesc.c|69 +
 drivers/staging/rtl8723au/hal/rtl8723a_sreset.c|73 +
 drivers/staging/rtl8723au/hal/rtl8723a_xmit.c  |52 +
 drivers/staging/rtl8723au/hal/rtl8723au_led.c  |   113 +
 drivers/staging/rtl8723au/hal/rtl8723au_recv.c |   247 +
 

Re: staging-next: r8723au: Kconfig related nitpicks

2014-04-08 Thread Jes Sorensen
Paul Bolle pebo...@tiscali.nl writes:
 Larry,

 0) I stumbled on two minor Kconfig related issues in the r8723au driver
 in staging-next.

 1) drivers/staging/rtl8723au/include/drv_types.h
 Why is CONFIG_BR_EXT used? I couldn't find a Kconfig symbol BR_EXT nor a
 preprocessor define for CONFIG_BR_EXT.

 2) drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
 And why is CONFIG_DEBUG_CFG80211 used? I also couldn't find a Kconfig
 symbol DEBUG_CFG80211 nor a preprocessor define for
 CONFIG_DEBUG_CFG80211.

 The symbols CFG80211_REG_DEBUG and CFG80211_DEBUGFS do exist, but seem
 unrelated.

I have fixed these two and pushed the changes into my git tree on
kernel.org. The tree tracks Greg's staging-next branch, you can find all
my current changes there (unless I managed to mess it up somehow :):

git://git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git
branch rtl8723au-next

I am doing a lot of development in that tree, there's about 65 commits
there so far on top of what Greg published - more to come!

I plan to push these to Greg for the next -rc round.

Cheers,
Jes
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net 3/3] Drivers: net: hyperv: Address UDP checksum issues

2014-04-08 Thread K. Y. Srinivasan
ws2008r2 does not support UDP checksum offload. Thus, we cannnot turn on
UDP offload in the host. Also, on ws2012 and ws2012 r2, there appear to be
an issue with UDP checksum offload.
Fix this issue by computing the UDP checksum in the Hyper-V driver.

Signed-off-by: K. Y. Srinivasan k...@microsoft.com
Reviewed-by: Haiyang Zhang haiya...@microsoft.com
---
 drivers/net/hyperv/hyperv_net.h   |1 +
 drivers/net/hyperv/netvsc_drv.c   |   19 ++-
 drivers/net/hyperv/rndis_filter.c |   12 +++-
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 13010b4..d18f711d 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -747,6 +747,7 @@ struct ndis_oject_header {
 #define NDIS_TCP_LARGE_SEND_OFFLOAD_IPV4   0
 #define NDIS_TCP_LARGE_SEND_OFFLOAD_IPV6   1
 
+#define VERSION_4_OFFLOAD_SIZE 22
 /*
  * New offload OIDs for NDIS 6
  */
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 6f39baa..8e3919b 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -398,7 +398,24 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct 
net_device *net)
csum_info-transmit.tcp_checksum = 1;
csum_info-transmit.tcp_header_offset = hdr_offset;
} else if (net_trans_info  INFO_UDP) {
-   csum_info-transmit.udp_checksum = 1;
+   /* UDP checksum offload is not supported on ws2008r2.
+* Furthermore, on ws2012 and ws2012r2, there are some
+* issues with udp checksum offload from Linux guests.
+* (these are host issues).
+* For now compute the checksum here.
+*/
+   struct udphdr *uh = udp_hdr(skb);
+   u16 udp_len = ntohs(uh-len);
+
+   uh-check = 0;
+   uh-check = csum_tcpudp_magic(ip_hdr(skb)-saddr,
+ ip_hdr(skb)-daddr,
+ udp_len, IPPROTO_UDP,
+ csum_partial(uh, udp_len, 0));
+   if (uh-check == 0)
+   uh-check = CSUM_MANGLED_0;
+
+   csum_info-transmit.udp_checksum = 0;
}
goto do_send;
 
diff --git a/drivers/net/hyperv/rndis_filter.c 
b/drivers/net/hyperv/rndis_filter.c
index 4a37e3d..143a98c 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -641,6 +641,16 @@ int rndis_filter_set_offload_params(struct hv_device *hdev,
struct rndis_set_complete *set_complete;
u32 extlen = sizeof(struct ndis_offload_params);
int ret, t;
+   u32 vsp_version = nvdev-nvsp_version;
+
+   if (vsp_version = NVSP_PROTOCOL_VERSION_4) {
+   extlen = VERSION_4_OFFLOAD_SIZE;
+   /* On NVSP_PROTOCOL_VERSION_4 and below, we do not support
+* UDP checksum offload.
+*/
+   req_offloads-udp_ip_v4_csum = 0;
+   req_offloads-udp_ip_v6_csum = 0;
+   }
 
request = get_rndis_request(rdev, RNDIS_MSG_SET,
RNDIS_MESSAGE_SIZE(struct rndis_set_request) + extlen);
@@ -674,7 +684,7 @@ int rndis_filter_set_offload_params(struct hv_device *hdev,
} else {
set_complete = request-response_msg.msg.set_complete;
if (set_complete-status != RNDIS_STATUS_SUCCESS) {
-   netdev_err(ndev, Fail to set MAC on host side:0x%x\n,
+   netdev_err(ndev, Fail to set offload on host 
side:0x%x\n,
   set_complete-status);
ret = -EINVAL;
}
-- 
1.7.4.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net 0/3] Fix issues with Heper-V network offload code

2014-04-08 Thread K. Y. Srinivasan
WS2008 R2 does not support udp checksum offload. Furthermore, ws2012 and
ws2012 r2 have issues offloading udp checksum from Linux guests.
This patch-set addresses these issues as well as other bug fixes.
Please apply.

K. Y. Srinivasan (3):
  Drivers: net: hyperv: Allocate memory for all possible per-pecket
information
  Drivers: net: hyperv: Negotiate suitable ndis version for offload
support
  Drivers: net: hyperv: Address UDP checksum issues

 drivers/net/hyperv/hyperv_net.h   |1 +
 drivers/net/hyperv/netvsc.c   |2 +-
 drivers/net/hyperv/netvsc_drv.c   |   23 +--
 drivers/net/hyperv/rndis_filter.c |   12 +++-
 4 files changed, 34 insertions(+), 4 deletions(-)

-- 
1.7.4.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net 2/3] Drivers: net: hyperv: Negotiate suitable ndis version for offload support

2014-04-08 Thread K. Y. Srinivasan
Ws2008R2 supports ndis_version 6.1 and 6.1 is the minimal version required
for various offloads. Negotiate ndis_version 6.1 when on ws2008r2.

Signed-off-by: K. Y. Srinivasan k...@microsoft.com
Reviewed-by: Haiyang Zhang haiya...@microsoft.com
---
 drivers/net/hyperv/netvsc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index daddea2..f7629ec 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -344,7 +344,7 @@ static int netvsc_connect_vsp(struct hv_device *device)
memset(init_packet, 0, sizeof(struct nvsp_message));
 
if (net_device-nvsp_version = NVSP_PROTOCOL_VERSION_4)
-   ndis_version = 0x00050001;
+   ndis_version = 0x00060001;
else
ndis_version = 0x0006001e;
 
-- 
1.7.4.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net 1/3] Drivers: net: hyperv: Allocate memory for all possible per-pecket information

2014-04-08 Thread K. Y. Srinivasan
An outgoing packet can potentially need per-packet information for
all the offloads and VLAN tagging. Fix this issue.

Signed-off-by: K. Y. Srinivasan k...@microsoft.com
Reviewed-by: Haiyang Zhang haiya...@microsoft.com
---
 drivers/net/hyperv/netvsc_drv.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 4e4cf9e..6f39baa 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -319,7 +319,9 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct 
net_device *net)
packet = kzalloc(sizeof(struct hv_netvsc_packet) +
 (num_data_pgs * sizeof(struct hv_page_buffer)) +
 sizeof(struct rndis_message) +
-NDIS_VLAN_PPI_SIZE, GFP_ATOMIC);
+NDIS_VLAN_PPI_SIZE +
+NDIS_CSUM_PPI_SIZE +
+NDIS_LSO_PPI_SIZE, GFP_ATOMIC);
if (!packet) {
/* out of memory, drop packet */
netdev_err(net, unable to allocate hv_netvsc_packet\n);
-- 
1.7.4.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: bcm: Qos: fixed braces' coding style

2014-04-08 Thread Luis Ortega
Fixed badly placed and unnecessary braces.

PS: Performed as task 10 of the Eudyptula Challenge.

Signed-off-by: Luis Ortega luior...@gmail.com
---
 drivers/staging/bcm/Qos.c | 174 +-
 1 file changed, 48 insertions(+), 126 deletions(-)

diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
index 4f31583..4b9ce26 100644
--- a/drivers/staging/bcm/Qos.c
+++ b/drivers/staging/bcm/Qos.c
@@ -33,14 +33,11 @@ static bool MatchSrcIpAddress(struct bcm_classifier_rule 
*pstClassifierRule, ULO
ulSrcIP = ntohl(ulSrcIP);
if (0 == pstClassifierRule-ucIPSourceAddressLength)
return TRUE;
-   for (ucLoopIndex = 0; ucLoopIndex  
(pstClassifierRule-ucIPSourceAddressLength); ucLoopIndex++)
-   {
+   for (ucLoopIndex = 0; ucLoopIndex  
(pstClassifierRule-ucIPSourceAddressLength); ucLoopIndex++){
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, 
Src Ip Address Mask:0x%x PacketIp:0x%x and Classification:0x%x, 
(UINT)pstClassifierRule-stSrcIpAddress.ulIpv4Mask[ucLoopIndex], (UINT)ulSrcIP, 
(UINT)pstClassifierRule-stSrcIpAddress.ulIpv6Addr[ucLoopIndex]);
if ((pstClassifierRule-stSrcIpAddress.ulIpv4Mask[ucLoopIndex] 
 ulSrcIP) ==

(pstClassifierRule-stSrcIpAddress.ulIpv4Addr[ucLoopIndex]  
pstClassifierRule-stSrcIpAddress.ulIpv4Mask[ucLoopIndex]))
-   {
return TRUE;
-   }
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, Src Ip 
Address Not Matched);
return false;
@@ -68,13 +65,10 @@ static bool MatchDestIpAddress(struct bcm_classifier_rule 
*pstClassifierRule, UL
return TRUE;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, 
Destination Ip Address 0x%x 0x%x 0x%x  , (UINT)ulDestIP, 
(UINT)pstClassifierRule-stDestIpAddress.ulIpv4Mask[ucLoopIndex], 
(UINT)pstClassifierRule-stDestIpAddress.ulIpv4Addr[ucLoopIndex]);

-   for (ucLoopIndex = 0; ucLoopIndex  
(pstClassifierRule-ucIPDestinationAddressLength); ucLoopIndex++)
-   {
+   for (ucLoopIndex = 0; ucLoopIndex  
(pstClassifierRule-ucIPDestinationAddressLength); ucLoopIndex++) {
if ((pstClassifierRule-stDestIpAddress.ulIpv4Mask[ucLoopIndex] 
 ulDestIP) ==

(pstClassifierRule-stDestIpAddress.ulIpv4Addr[ucLoopIndex]  
pstClassifierRule-stDestIpAddress.ulIpv4Mask[ucLoopIndex]))
-   {
return TRUE;
-   }
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, 
Destination Ip Address Not Matched);
return false;
@@ -99,9 +93,8 @@ static bool MatchTos(struct bcm_classifier_rule 
*pstClassifierRule, UCHAR ucType
return TRUE;

if (((pstClassifierRule-ucTosMask  ucTypeOfService) = 
pstClassifierRule-ucTosHigh)  ((pstClassifierRule-ucTosMask  
ucTypeOfService) = pstClassifierRule-ucTosLow))
-   {
return TRUE;
-   }
+
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, Type Of 
Service Not Matched);
return false;
 }
@@ -123,13 +116,10 @@ bool MatchProtocol(struct bcm_classifier_rule 
*pstClassifierRule, UCHAR ucProtoc
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if (0 == pstClassifierRule-ucProtocolLength)
return TRUE;
-   for (ucLoopIndex = 0; ucLoopIndex  
pstClassifierRule-ucProtocolLength; ucLoopIndex++)
-   {
+   for (ucLoopIndex = 0; ucLoopIndex  
pstClassifierRule-ucProtocolLength; ucLoopIndex++) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, 
Protocol:0x%X Classification Protocol:0x%X, ucProtocol, 
pstClassifierRule-ucProtocol[ucLoopIndex]);
if (pstClassifierRule-ucProtocol[ucLoopIndex] == ucProtocol)
-   {
return TRUE;
-   }
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, Protocol 
Not Matched);
return false;
@@ -155,13 +145,10 @@ bool MatchSrcPort(struct bcm_classifier_rule 
*pstClassifierRule, USHORT ushSrcPo

if (0 == pstClassifierRule-ucSrcPortRangeLength)
return TRUE;
-   for (ucLoopIndex = 0; ucLoopIndex  
pstClassifierRule-ucSrcPortRangeLength; ucLoopIndex++)
-   {
+   for (ucLoopIndex = 0; ucLoopIndex  
pstClassifierRule-ucSrcPortRangeLength; ucLoopIndex++) {
if (ushSrcPort = 
pstClassifierRule-usSrcPortRangeHi[ucLoopIndex] 
ushSrcPort = 
pstClassifierRule-usSrcPortRangeLo[ucLoopIndex])
-   {
return TRUE;
-   }
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, Src Port: 
%x Not Matched , ushSrcPort);
return false;
@@ -186,15 +173,12 @@ bool MatchDestPort(struct bcm_classifier_rule 
*pstClassifierRule, USHORT ushDest

Re: [PATCH] Staging: bcm: Qos: fixed braces' coding style

2014-04-08 Thread Greg KH
On Wed, Apr 09, 2014 at 01:01:05AM +0200, Luis Ortega wrote:
 Fixed badly placed and unnecessary braces.
 
 PS: Performed as task 10 of the Eudyptula Challenge.
 
 Signed-off-by: Luis Ortega luior...@gmail.com
 ---
  drivers/staging/bcm/Qos.c | 174 
 +-
  1 file changed, 48 insertions(+), 126 deletions(-)
 
 diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
 index 4f31583..4b9ce26 100644
 --- a/drivers/staging/bcm/Qos.c
 +++ b/drivers/staging/bcm/Qos.c
 @@ -33,14 +33,11 @@ static bool MatchSrcIpAddress(struct bcm_classifier_rule 
 *pstClassifierRule, ULO
   ulSrcIP = ntohl(ulSrcIP);
   if (0 == pstClassifierRule-ucIPSourceAddressLength)
   return TRUE;
 - for (ucLoopIndex = 0; ucLoopIndex  
 (pstClassifierRule-ucIPSourceAddressLength); ucLoopIndex++)
 - {
 + for (ucLoopIndex = 0; ucLoopIndex  
 (pstClassifierRule-ucIPSourceAddressLength); ucLoopIndex++){

Why the TAB before the '{' character?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel