[PATCH] Staging: lustre: llite: fix some sparse warnings about userspace pointer

2014-10-10 Thread Anh Le
Add __user macro to the function declarations that accept userspace pointers as
arguments.

Signed-off-by: Anh Le 
---
 .../staging/lustre/lustre/include/lprocfs_status.h |  6 +--
 drivers/staging/lustre/lustre/llite/lproc_llite.c  | 48 +++---
 .../lustre/lustre/obdclass/lprocfs_status.c|  4 +-
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h 
b/drivers/staging/lustre/lustre/include/lprocfs_status.h
index ccb6cd4..42fdb64 100644
--- a/drivers/staging/lustre/lustre/include/lprocfs_status.h
+++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h
@@ -374,8 +374,8 @@ static inline void s2dhms(struct dhms *ts, time_t secs)
 #define JOBSTATS_PROCNAME_UID  "procname_uid"
 #define JOBSTATS_NODELOCAL "nodelocal"
 
-extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count,
-int *val, int mult);
+extern int lprocfs_write_frac_helper(const char __user *buffer,
+   unsigned long count, int *val, int mult);
 extern int lprocfs_read_frac_helper(char *buffer, unsigned long count,
long val, int mult);
 #if defined (CONFIG_PROC_FS)
@@ -647,7 +647,7 @@ extern int lprocfs_rd_kbytesavail(struct seq_file *m, void 
*data);
 extern int lprocfs_rd_filestotal(struct seq_file *m, void *data);
 extern int lprocfs_rd_filesfree(struct seq_file *m, void *data);
 
-extern int lprocfs_write_helper(const char *buffer, unsigned long count,
+extern int lprocfs_write_helper(const char __user *buffer, unsigned long count,
int *val);
 extern int lprocfs_seq_read_frac_helper(struct seq_file *m, long val, int 
mult);
 extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c 
b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 3b3df9f..2a97df1 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -227,8 +227,8 @@ static int ll_max_readahead_mb_seq_show(struct seq_file *m, 
void *v)
return lprocfs_seq_read_frac_helper(m, pages_number, mult);
 }
 
-static ssize_t ll_max_readahead_mb_seq_write(struct file *file, const char 
*buffer,
-size_t count, loff_t *off)
+static ssize_t ll_max_readahead_mb_seq_write(struct file *file,
+const char __user *buffer, size_t count, loff_t *off)
 {
struct super_block *sb = ((struct seq_file 
*)file->private_data)->private;
struct ll_sb_info *sbi = ll_s2sbi(sb);
@@ -269,7 +269,7 @@ static int ll_max_readahead_per_file_mb_seq_show(struct 
seq_file *m, void *v)
 }
 
 static ssize_t ll_max_readahead_per_file_mb_seq_write(struct file *file,
- const char *buffer,
+ const char __user *buffer,
  size_t count, loff_t *off)
 {
struct super_block *sb = ((struct seq_file 
*)file->private_data)->private;
@@ -313,7 +313,7 @@ static int ll_max_read_ahead_whole_mb_seq_show(struct 
seq_file *m, void *unused)
 }
 
 static ssize_t ll_max_read_ahead_whole_mb_seq_write(struct file *file,
-   const char *buffer,
+   const char __user *buffer,
size_t count, loff_t *off)
 {
struct super_block *sb = ((struct seq_file 
*)file->private_data)->private;
@@ -469,8 +469,8 @@ static int ll_checksum_seq_show(struct seq_file *m, void *v)
return seq_printf(m, "%u\n", (sbi->ll_flags & LL_SBI_CHECKSUM) ? 1 : 0);
 }
 
-static ssize_t ll_checksum_seq_write(struct file *file, const char *buffer,
-size_t count, loff_t *off)
+static ssize_t ll_checksum_seq_write(struct file *file,
+const char __user *buffer, size_t count, loff_t *off)
 {
struct super_block *sb = ((struct seq_file 
*)file->private_data)->private;
struct ll_sb_info *sbi = ll_s2sbi(sb);
@@ -504,8 +504,8 @@ static int ll_max_rw_chunk_seq_show(struct seq_file *m, 
void *v)
return seq_printf(m, "%lu\n", ll_s2sbi(sb)->ll_max_rw_chunk);
 }
 
-static ssize_t ll_max_rw_chunk_seq_write(struct file *file, const char *buffer,
-size_t count, loff_t *off)
+static ssize_t ll_max_rw_chunk_seq_write(struct file *file,
+const char __user *buffer, size_t count, loff_t *off)
 {
struct super_block *sb = ((struct seq_file 
*)file->private_data)->private;
int rc, val;
@@ -533,8 +533,8 @@ static int ll_rd_track_id(struct seq_file *m, enum 
stats_track_type type)
}
 }
 
-static int ll_wr_track_id(const char *buffer, unsigned long count, void *data,
- enum stats_track

[PATCH] staging: media: omap24xx: fix missing asterisk

2014-10-10 Thread Tsung-Han Lin
Fix missing asterisk in one V4L2_INT_WRAPPER_1 usage.
Reported by checkpatch.pl as:

ERROR: space prohibited before that close parenthesis ')'
+V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );

Signed-off-by: Tsung-Han Lin 
---
 drivers/staging/media/omap24xx/v4l2-int-device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap24xx/v4l2-int-device.h 
b/drivers/staging/media/omap24xx/v4l2-int-device.h
index 0286c95814ff..94905951245c 100644
--- a/drivers/staging/media/omap24xx/v4l2-int-device.h
+++ b/drivers/staging/media/omap24xx/v4l2-int-device.h
@@ -292,7 +292,7 @@ V4L2_INT_WRAPPER_1(s_video_routing, struct v4l2_routing, *);
 
 V4L2_INT_WRAPPER_0(dev_init);
 V4L2_INT_WRAPPER_0(dev_exit);
-V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
+V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, *);
 V4L2_INT_WRAPPER_1(g_priv, void, *);
 V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
 V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
-- 
1.9.1

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


Re: [PATCH v2] mfd: rtsx: fix PM suspend for 5227 & 5249

2014-10-10 Thread Micky Ching


On 10/10/2014 06:21 PM, Lee Jones wrote:

On Fri, 10 Oct 2014, micky_ch...@realsil.com.cn wrote:


From: Micky Ching 

Fix rts5227&5249 failed send buffer cmd after suspend,
PM_CTRL3 should reset before send any buffer cmd after suspend.
Otherwise, buffer cmd will failed, this will lead resume fail.

Signed-off-by: Micky Ching 
---
  drivers/mfd/Makefile |  2 +-
  drivers/mfd/rts5227.c|  6 ++
  drivers/mfd/rts5249.c|  4 
  drivers/mfd/rtsx_gops.c  | 37 +
  drivers/mfd/rtsx_pcr.h   |  3 +++
  include/linux/mfd/rtsx_pci.h | 28 
  6 files changed, 79 insertions(+), 1 deletion(-)
  create mode 100644 drivers/mfd/rtsx_gops.c

[...]


+static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr,
+   u8 mask, u8 append)
+{
+   int err;
+   u8 val;
+
+   err = pci_read_config_byte(pcr->pci, addr, &val);
+   if (err < 0)
+   return err;
+   return pci_write_config_byte(pcr->pci, addr, (val & mask) | append);
+}
+

Why is this in here?  Why not put it in the generic ops file?

This function is a good interface, we will use it many times in the future.

generic ops file is only used to some operation can be used for 
different chip,

some special chip may replace generic ops by provide their own ops.
So generic ops file is just use to abstract the same code, not for good 
interface.






--
Best Regards,
micky.

Realsil Microelectronics Inc. PCBU swlinux.
Tel:86-512-6258-8966 Ext: 5806

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


Re: [PATCH v4 3/4] Staging: iio: light: Added correct vendor-prefix for device isl29028

2014-10-10 Thread Jonathan Cameron
On 07/10/14 16:19, Darshana Padmadas wrote:
> This patch adds the correct vendor-prefix for device isl29028 and
> maintains deprecated vendor-prefix found by checkpatch warning
> for older kernel releases.
> 
> Signed-off-by: Darshana Padmadas 
Acked-by: Jonathan Cameron 

Which tree does this series want to go through?
(I'm happy to take it via IIO once the outstanding issues are cleaned up
if no one else wants it).

> ---
>  drivers/staging/iio/light/isl29028.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/light/isl29028.c 
> b/drivers/staging/iio/light/isl29028.c
> index 6014625..e969107 100644
> --- a/drivers/staging/iio/light/isl29028.c
> +++ b/drivers/staging/iio/light/isl29028.c
> @@ -537,7 +537,8 @@ static const struct i2c_device_id isl29028_id[] = {
>  MODULE_DEVICE_TABLE(i2c, isl29028_id);
>  
>  static const struct of_device_id isl29028_of_match[] = {
> - { .compatible = "isil,isl29028", },
> + { .compatible = "isl,isl29028", },
> + { .compatible = "isil,isl29028", },/* deprecated, don't use */
>   { },
>  };
>  MODULE_DEVICE_TABLE(of, isl29028_of_match);
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH net 1/1] hyperv: Fix a bug in netvsc_send()

2014-10-10 Thread Long Li
Thanks Sitsofe. Can you provide more details on the test setup?

The kernel trace shows that skb->mac_header=0x (which means not yet set, 
it's in RCX: ).


-Original Message-
From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf 
Of Sitsofe Wheeler
Sent: Thursday, October 09, 2014 6:32 AM
To: David Miller
Cc: o...@aepfle.de; net...@vger.kernel.org; jasow...@redhat.com; 
linux-ker...@vger.kernel.org; a...@canonical.com; de...@linuxdriverproject.org
Subject: Re: [PATCH net 1/1] hyperv: Fix a bug in netvsc_send()

On Sun, Oct 05, 2014 at 09:11:29PM -0400, David Miller wrote:
> From: "K. Y. Srinivasan" 
> Date: Sun,  5 Oct 2014 10:42:51 -0700
> 
> > After the packet is successfully sent, we should not touch the 
> > packet as it may have been freed. This patch is based on the work 
> > done by Long Li .
> > 
> > David, please queue this up for stable.

With 3.17.0 g782d59c (which should include this patch) I'm still seeing the 
following:

Oct 09 13:14:51 a network[428]: Bringing up interface eth0:
Oct 09 13:14:51 a dhclient[538]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 
(xid=0x1dd33078) Oct 09 13:14:51 a dhclient[538]: DHCPACK from 10.x.x.x 
(xid=0x1dd33078) Oct 09 13:14:55 a kernel: BUG: unable to handle kernel paging 
request at 8800ed2e72e3 Oct 09 13:14:55 a kernel: IP: [] 
netvsc_select_queue+0x3d/0x150 Oct 09 13:14:55 a kernel: PGD 2db5067 PUD 
2075be067 PMD 207454067 PTE 8000ed2e7060 Oct 09 13:14:55 a kernel: Oops: 
 [#1] SMP DEBUG_PAGEALLOC Oct 09 13:14:55 a kernel: CPU: 6 PID: 566 Comm: 
arping Not tainted 3.17.0.x86_64-05585-g782d59c #147 Oct 09 13:14:55 a kernel: 
Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 
090006  05/23/2012 Oct 09 13:14:55 a kernel: task: 8801f978b9f0 ti: 
8801f3b84000 task.ti: 8801f3b84000 Oct 09 13:14:55 a kernel: RIP: 
0010:[]  [] netvsc_select_queue+0x3d/0x150 
Oct 09 13:14:55 a kernel: RSP: 0018:8801f3b87c60  EFLAGS: 00010202 Oc
 t 09 13:14:55 a kernel: RAX:  RBX: 8800f13e8000 RCX: 
 Oct 09 13:14:55 a kernel: RDX: 8800ed2d72d8 RSI: 
8801fabca1c0 RDI: 8800f13e8000 Oct 09 13:14:55 a kernel: RBP: 
8801f3b87c88 R08: 002a R09:  Oct 09 13:14:55 a 
kernel: R10: 8801f83b3f60 R11: 0008 R12: 8801fabca1c0 Oct 
09 13:14:55 a kernel: R13:  R14: 8800ed359bd8 R15: 
8801fabca1c0 Oct 09 13:14:55 a kernel: FS:  7f943a5c9740() 
GS:880206cc() knlGS: Oct 09 13:14:55 a kernel: CS:  
0010 DS:  ES:  CR0: 80050033 Oct 09 13:14:55 a kernel: CR2: 
8800ed2e72e3 CR3: 0001f3957000 CR4: 000406e0 Oct 09 13:14:55 a 
kernel: Stack:
Oct 09 13:14:55 a kernel:  816a0221 8800f13e8000 001c 
 Oct 09 13:14:55 a kernel:  8800ed359bd8 8801f3b87d48 
816a3fce 8801f3b87cb0 Oct 09 13:14:55 a kernel:  816c34a7 
0001 8801f3b87db8 001c Oct 09 13:14:55 a kernel: 
Call Trace:
Oct 09 13:14:55 a kernel:  [] ? 
packet_pick_tx_queue+0x31/0xa0 Oct 09 13:14:55 a kernel:  [] 
packet_sendmsg+0xc6e/0xe30 Oct 09 13:14:55 a kernel:  [] ? 
_raw_spin_unlock+0x27/0x40 Oct 09 13:14:55 a kernel:  [] ? 
prepare_creds+0x3a/0x170 Oct 09 13:14:55 a kernel:  [] 
sock_sendmsg+0x88/0xb0 Oct 09 13:14:55 a kernel:  [] ? 
might_fault+0xa3/0xb0 Oct 09 13:14:55 a kernel:  [] ? 
might_fault+0x5a/0xb0 Oct 09 13:14:55 a kernel:  [] 
SYSC_sendto+0x10e/0x150 Oct 09 13:14:55 a kernel:  [] ? 
might_fault+0x5a/0xb0 Oct 09 13:14:55 a kernel:  [] ? 
sysret_check+0x22/0x5d Oct 09 13:14:55 a kernel:  [] ? 
trace_hardirqs_on_caller+0x17d/0x210
Oct 09 13:14:55 a kernel:  [] ? 
trace_hardirqs_on_thunk+0x3a/0x3f Oct 09 13:14:55 a kernel:  
[] SyS_sendto+0xe/0x10 Oct 09 13:14:55 a kernel:  
[] system_call_fastpath+0x16/0x1b Oct 09 13:14:55 a kernel: 
Code: 00 4d 85 d2 0f 84 1c 01 00 00 44 8b 9f 8c 03 00 00 31 c0 41 83 fb 01 0f 
86 1b 01 00 00 0f b7 8e b6 00 00 00 Oct 09 13:14:55 a kernel: RIP  
[] netvsc_select_queue+0x3d/0x150 Oct 09 13:14:55 a kernel:  
RSP  Oct 09 13:14:55 a kernel: CR2: 8800ed2e72e3 Oct 09 
13:14:55 a kernel: ---[ end trace e52f922dd7435e0d ]---

Was the above meant to have been fixed by the patch "[PATCH 1/1]
Drivers: net: hyperv: Cleanup  netvsc_change_mtu ()" from
https://lkml.org/lkml/2014/8/29/369 ? If so will that patch be resent?

--
Sitsofe | http://sucs.org/~sits/
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


I am Presently in Luxemburg!!

2014-10-10 Thread Justice Mark Oweriole
From:  Justice Mark Oweriole
 (Philanthropist) 

Urgent attention,


Subject matter: Sincere compensation.

You might find it so difficult to remember me. Though, it is indeed, a very 
long time. On my  singular, I am much delighted and privileged to contact you 
again, after couple of years now. It takes fate, courage and God's fearing to 
remember old friends and at the same time, to show gratification to them, 
despite circumstances that made things, not worked out as we projected then.

I take this liberty to inform you that, the transaction we were pursing 
together, finally worked out by God's infinite mercy and I decided to contact 
you, just to let you know. I have conscience as a human being, due to your 
tremendous effort and contribution to make things work out in retrospect. 
Meanwhile, I must inform you that, I am presently in Luxemburg for numerous 
business negotiations and establishment.

I just arrived yesterday night and checked inn, in a hotel and decided to go 
down to the hotel business center to mail you. Now, with my sincere heart, I 
have raised and signed an international cashier's bank draft, to the tune of 
USD$820,000.00 (Eight Hundred and Twenty Thousand Decimal Zero-Zero United 
States Dollars Only) in your name as compensation to your dedication, humanity 
and contribution, as it were.


Please, contact now, my confidential secretary, he is in the name of: -

Miss. Ifechukwude Okeze (Secretary)
Email : informationun...@yahoo.co.jp

You are to forward to her, the following:

1. Your full name
2. Address where you can receive this draft
3. Your telephone number (if necessary)

She will advice you further about the shipment of the ICBD to your residence 
address or office address you may provide. Feel free to reach via this very 
mail address. Most importantly, the ICBD has only validity period of 30 banking 
days so, your early response to that effect, shall be admired. You have to mind 
the days on route shipment.

Sincerely yours.

Justice Mark Oweriole  
(Philanthropist)
Presently in Luxemburg.

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com

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


Re: [PATCH 00/15] staging: rtl8723au: Fixes and cleanups

2014-10-10 Thread Greg KH
On Fri, Oct 10, 2014 at 09:41:23PM +0200, jes.soren...@redhat.com wrote:
> From: Jes Sorensen 
> 
> Hi,
> 
> Please find attached a couple of fixes and cleanups for the rtl8723au
> driver. This includes a fix for the mac_addr alignment reported by Dan
> Carpenter and two patches from Greg Donald.

Should any of these go into 3.18-final, or are all ok for 3.19-rc1?

thanks,

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


[PATCH 03/15] drivers: staging: rtl8723au: Fix "open brace '{' following struct go on the same line" errors

2014-10-10 Thread Jes . Sorensen
From: Greg Donald 

Fix checkpatch.pl "open brace '{' following struct go on the same line" errors

Signed-off-by: Greg Donald 
Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_security.c | 3 +--
 drivers/staging/rtl8723au/include/rtl8723a_dm.h   | 3 +--
 drivers/staging/rtl8723au/include/rtl8723a_recv.h | 3 +--
 drivers/staging/rtl8723au/include/rtw_cmd.h   | 3 +--
 drivers/staging/rtl8723au/include/rtw_ht.h| 3 +--
 drivers/staging/rtl8723au/include/rtw_mlme_ext.h  | 6 ++
 6 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_security.c 
b/drivers/staging/rtl8723au/core/rtw_security.c
index b488622..5da620c 100644
--- a/drivers/staging/rtl8723au/core/rtw_security.c
+++ b/drivers/staging/rtl8723au/core/rtw_security.c
@@ -23,8 +23,7 @@
 
 #define CRC32_POLY 0x04c11db7
 
-struct arc4context
-{
+struct arc4context {
u32 x;
u32 y;
u8 state[256];
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_dm.h 
b/drivers/staging/rtl8723au/include/rtl8723a_dm.h
index 1811222..bf236e8 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_dm.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_dm.h
@@ -37,8 +37,7 @@ enum{
 #define IQK_BB_REG_NUM 9
 #define HP_THERMAL_NUM 8
 /*  duplicate code,will move to ODM # */
-struct dm_priv
-{
+struct dm_priv {
u32 InitODMFlag;
 
/*  Upper and Lower Signal threshold for Rate Adaptive*/
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_recv.h 
b/drivers/staging/rtl8723au/include/rtl8723a_recv.h
index 885d4d3..0109052 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_recv.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_recv.h
@@ -35,8 +35,7 @@
 #define PHY_LINKQUALITY_SLID_WIN_MAX   20
 
 
-struct phy_stat
-{
+struct phy_stat {
unsigned int phydw0;
unsigned int phydw1;
unsigned int phydw2;
diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h 
b/drivers/staging/rtl8723au/include/rtw_cmd.h
index ef67068..8ffe5de 100644
--- a/drivers/staging/rtl8723au/include/rtw_cmd.h
+++ b/drivers/staging/rtl8723au/include/rtw_cmd.h
@@ -450,8 +450,7 @@ struct getrfintfs_parm {
u8  rfintfs;
 };
 
-struct Tx_Beacon_param
-{
+struct Tx_Beacon_param {
struct wlan_bssid_ex network;
 };
 
diff --git a/drivers/staging/rtl8723au/include/rtw_ht.h 
b/drivers/staging/rtl8723au/include/rtw_ht.h
index cfc947d..780eb89 100644
--- a/drivers/staging/rtl8723au/include/rtw_ht.h
+++ b/drivers/staging/rtl8723au/include/rtw_ht.h
@@ -19,8 +19,7 @@
 #include "linux/ieee80211.h"
 #include "wifi.h"
 
-struct ht_priv
-{
+struct ht_priv {
boolht_option;
boolampdu_enable;/* for enable Tx A-MPDU */
/* u8   baddbareq_issued[16]; */
diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h 
b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
index 97c3c44..51dba1f 100644
--- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
@@ -270,8 +270,7 @@ struct action_handler {
int (*func)(struct rtw_adapter *padapter, struct recv_frame 
*precv_frame);
 };
 
-struct ss_res
-{
+struct ss_res {
int state;
int bss_cnt;
int channel_idx;
@@ -318,8 +317,7 @@ struct FW_Sta_Info {
  * 5. ... and so on, till survey done.
  */
 
-struct mlme_ext_info
-{
+struct mlme_ext_info {
u32 state;
u32 reauth_count;
u32 reassoc_count;
-- 
1.9.3

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


[PATCH 02/15] drivers: staging: rtl8723au: core: Fix "'foo * bar' should be 'foo *bar'" errors

2014-10-10 Thread Jes . Sorensen
From: Greg Donald 

Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald 
Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_ap.c|  2 +-
 drivers/staging/rtl8723au/core/rtw_led.c   |  3 ++-
 drivers/staging/rtl8723au/core/rtw_mlme.c  |  2 +-
 drivers/staging/rtl8723au/core/rtw_security.c  | 27 +-
 drivers/staging/rtl8723au/core/rtw_wlan_util.c |  2 +-
 5 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c 
b/drivers/staging/rtl8723au/core/rtw_ap.c
index 6b4092f..4c3d4c8 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -1819,7 +1819,7 @@ void rtw_ap_restore_network(struct rtw_adapter *padapter)
 {
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-   struct sta_priv * pstapriv = &padapter->stapriv;
+   struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *psta;
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct list_head *phead, *plist, *ptmp;
diff --git a/drivers/staging/rtl8723au/core/rtw_led.c 
b/drivers/staging/rtl8723au/core/rtw_led.c
index 989cda2..fa3dcff 100644
--- a/drivers/staging/rtl8723au/core/rtw_led.c
+++ b/drivers/staging/rtl8723au/core/rtw_led.c
@@ -51,7 +51,8 @@ void BlinkWorkItemCallback23a(struct work_struct *work)
 /* Description: */
 /* Reset status of led_8723a object. */
 /*  */
-void ResetLedStatus23a(struct led_8723a * pLed) {
+void ResetLedStatus23a(struct led_8723a *pLed)
+{
 
pLed->CurrLedState = RTW_LED_OFF; /*  Current LED state. */
pLed->bLedOn = false; /*  true if LED is ON, false if LED is OFF. */
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 1f60064..00e7ad0 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1766,7 +1766,7 @@ exit:
return ret;
 }
 
-int rtw_set_auth23a(struct rtw_adapter * adapter,
+int rtw_set_auth23a(struct rtw_adapter *adapter,
struct security_priv *psecuritypriv)
 {
struct cmd_obj *pcmd;
diff --git a/drivers/staging/rtl8723au/core/rtw_security.c 
b/drivers/staging/rtl8723au/core/rtw_security.c
index 76371ae..b488622 100644
--- a/drivers/staging/rtl8723au/core/rtw_security.c
+++ b/drivers/staging/rtl8723au/core/rtw_security.c
@@ -30,12 +30,12 @@ struct arc4context
u8 state[256];
 };
 
-static void arcfour_init(struct arc4context*parc4ctx, u8 * key, u32
key_len)
+static void arcfour_init(struct arc4context *parc4ctx, u8 *key, u32 key_len)
 {
u32 t, u;
u32 keyindex;
u32 stateindex;
-   u8 * state;
+   u8 *state;
u32 counter;
 
state = parc4ctx->state;
@@ -62,7 +62,7 @@ static u32 arcfour_byte(  struct arc4context  
*parc4ctx)
u32 x;
u32 y;
u32 sx, sy;
-   u8 * state;
+   u8 *state;
 
state = parc4ctx->state;
x = (parc4ctx->x + 1) & 0xff;
@@ -78,8 +78,8 @@ static u32 arcfour_byte(  struct arc4context  
*parc4ctx)
 }
 
 static void arcfour_encrypt(   struct arc4context  *parc4ctx,
-   u8 * dest,
-   u8 * src,
+   u8 *dest,
+   u8 *src,
u32 len)
 {
u32 i;
@@ -221,7 +221,7 @@ void rtw_wep_decrypt23a(struct rtw_adapter *padapter,
u8 keyindex;
struct rx_pkt_attrib *prxattrib = &precvframe->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
-   struct sk_buff * skb = precvframe->pkt;
+   struct sk_buff *skb = precvframe->pkt;
 
pframe = skb->data;
 
@@ -266,7 +266,7 @@ void rtw_wep_decrypt23a(struct rtw_adapter *padapter,
 
 /* 3   = TKIP related = */
 
-static u32 secmicgetuint32(u8 * p)
+static u32 secmicgetuint32(u8 *p)
 /*  Convert from Byte[] to u32 in a portable way */
 {
s32 i;
@@ -280,7 +280,7 @@ static u32 secmicgetuint32(u8 * p)
return res;
 }
 
-static void secmicputuint32(u8 * p, u32 val)
+static void secmicputuint32(u8 *p, u32 val)
 /*  Convert from long to Byte[] in a portable way */
 {
long i;
@@ -304,7 +304,7 @@ static void secmicclear(struct mic_data *pmicdata)
 
 }
 
-void rtw_secmicsetkey23a(struct mic_data *pmicdata, u8 * key)
+void rtw_secmicsetkey23a(struct mic_data *pmicdata, u8 *key)
 {
/*  Set the key */
 
@@ -340,7 +340,7 @@ void rtw_secmicappend23abyte23a(struct mic_data *pmicdata, 
u8 b)
 
 }
 
-void rtw_secmicappend23a(struct mic_data *pmicdata, u8 * src, u32 nbytes)
+void rtw_secmicappend23a(struct mic_data *pmicdata, u8 *src, u32 nbytes)
 {
 
/*  This is simple */
@@ -352,7 +352,7 @@ void rtw_secmicappend23a(struct mic_data *pmicdata, u8 * 
src, u32 nbytes)
 
 }
 
-void rtw_secgetmic23a(struct mic_data *pmicdata, u8 * dst)
+void

[PATCH 13/15] staging: rtl8723au: Fold struct wlan_phy_info into struct wlan_bssid_ex

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Half the entries of struct wlan_phy_info weren't used and this makes
the code a little cleaner

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 40 +++
 drivers/staging/rtl8723au/core/rtw_mlme_ext.c |  6 ++--
 drivers/staging/rtl8723au/include/wlan_bssdef.h   | 10 ++
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c |  3 +-
 4 files changed, 26 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 00e7ad0..cd10f12 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -356,12 +356,12 @@ rtw_get_oldest_wlan_network23a(struct rtw_queue 
*scanned_queue)
 void update_network23a(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
   struct rtw_adapter *padapter, bool update_ie)
 {
-   u8 ss_ori = dst->PhyInfo.SignalStrength;
-   u8 sq_ori = dst->PhyInfo.SignalQuality;
+   u8 ss_ori = dst->SignalStrength;
+   u8 sq_ori = dst->SignalQuality;
long rssi_ori = dst->Rssi;
 
-   u8 ss_smp = src->PhyInfo.SignalStrength;
-   u8 sq_smp = src->PhyInfo.SignalQuality;
+   u8 ss_smp = src->SignalStrength;
+   u8 sq_smp = src->SignalQuality;
long rssi_smp = src->Rssi;
 
u8 ss_final;
@@ -389,16 +389,16 @@ void update_network23a(struct wlan_bssid_ex *dst, struct 
wlan_bssid_ex *src,
rssi_final = rssi_ori;
} else {
if (sq_smp != 101) { /* from the right channel */
-   ss_final = ((u32)src->PhyInfo.SignalStrength +
-   (u32)dst->PhyInfo.SignalStrength * 4) / 5;
-   sq_final = ((u32)src->PhyInfo.SignalQuality +
-   (u32)dst->PhyInfo.SignalQuality * 4) / 5;
+   ss_final = ((u32)src->SignalStrength +
+   (u32)dst->SignalStrength * 4) / 5;
+   sq_final = ((u32)src->SignalQuality +
+   (u32)dst->SignalQuality * 4) / 5;
rssi_final = src->Rssi+dst->Rssi * 4 / 5;
} else {
/* bss info not receiving from the right channel, use
   the original RX signal infos */
-   ss_final = dst->PhyInfo.SignalStrength;
-   sq_final = dst->PhyInfo.SignalQuality;
+   ss_final = dst->SignalStrength;
+   sq_final = dst->SignalQuality;
rssi_final = dst->Rssi;
}
 
@@ -407,14 +407,13 @@ void update_network23a(struct wlan_bssid_ex *dst, struct 
wlan_bssid_ex *src,
if (update_ie)
memcpy(dst, src, get_wlan_bssid_ex_sz(src));
 
-   dst->PhyInfo.SignalStrength = ss_final;
-   dst->PhyInfo.SignalQuality = sq_final;
+   dst->SignalStrength = ss_final;
+   dst->SignalQuality = sq_final;
dst->Rssi = rssi_final;
 
DBG_8723A("%s %s(%pM), SignalStrength:%u, SignalQuality:%u, "
  "RawRSSI:%ld\n",  __func__, dst->Ssid.ssid, dst->MacAddress,
- dst->PhyInfo.SignalStrength,
- dst->PhyInfo.SignalQuality, dst->Rssi);
+ dst->SignalStrength, dst->SignalQuality, dst->Rssi);
 }
 
 static void update_current_network(struct rtw_adapter *adapter,
@@ -491,8 +490,8 @@ static void rtw_update_scanned_network(struct rtw_adapter 
*adapter,
pnetwork->join_res = 0;
 
/* bss info not receiving from the right channel */
-   if (pnetwork->network.PhyInfo.SignalQuality == 101)
-   pnetwork->network.PhyInfo.SignalQuality = 0;
+   if (pnetwork->network.SignalQuality == 101)
+   pnetwork->network.SignalQuality = 0;
} else {
/*
 * we have an entry and we are going to update it. But
@@ -1032,15 +1031,14 @@ rtw_joinbss_update_network23a(struct rtw_adapter 
*padapter,
 
rtw_set_signal_stat_timer(&padapter->recvpriv);
padapter->recvpriv.signal_strength =
-   ptarget_wlan->network.PhyInfo.SignalStrength;
-   padapter->recvpriv.signal_qual =
-   ptarget_wlan->network.PhyInfo.SignalQuality;
+   ptarget_wlan->network.SignalStrength;
+   padapter->recvpriv.signal_qual = ptarget_wlan->network.SignalQuality;
/*
 * the ptarget_wlan->network.Rssi is raw data, we use
-* ptarget_wlan->network.PhyInfo.SignalStrength instead (has scaled)
+* ptarget_wlan->network.SignalStrength instead (has scaled)
 */
padapter->recvpriv.rssi = translate_percentage_to_dbm(
-   ptarget_wlan->network.PhyInfo.SignalStrength);
+   ptarget_wlan->network.SignalStrength);
DBG_8723A("%s signal_strength:%3u,

[PATCH 01/15] staging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy() usage

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Make sure struct eeprom_priv->mac_addr is 2 byte aligned to work with
ether_addr_copy()

Reported-by: Dan Carpenter 
Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/include/rtw_eeprom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/include/rtw_eeprom.h 
b/drivers/staging/rtl8723au/include/rtw_eeprom.h
index e5121a2..a86f36e 100644
--- a/drivers/staging/rtl8723au/include/rtw_eeprom.h
+++ b/drivers/staging/rtl8723au/include/rtw_eeprom.h
@@ -107,12 +107,12 @@ enum rt_customer_id
 };
 
 struct eeprom_priv {
+   u8  mac_addr[6];/* PermanentAddress */
u8  bautoload_fail_flag;
u8  bloadfile_fail_flag;
u8  bloadmac_fail_flag;
/* u8   bempty; */
/* u8   sys_config; */
-   u8  mac_addr[6];/* PermanentAddress */
/* u8   config0; */
u16 channel_plan;
/* u8   country_string[3]; */
-- 
1.9.3

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


[PATCH 15/15] staging: rtl8723au: Eliminate write-only struct wlan_network->aid

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_mlme.c   | 3 ---
 drivers/staging/rtl8723au/core/rtw_mlme_ext.c   | 2 +-
 drivers/staging/rtl8723au/include/wlan_bssdef.h | 1 -
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index cd10f12..ba77ac1 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -110,7 +110,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv 
*pmlmepriv, gfp_t gfp)
pnetwork->network_type = 0;
pnetwork->fixed = false;
pnetwork->last_scanned = jiffies;
-   pnetwork->aid = 0;
pnetwork->join_res = 0;
}
 
@@ -486,7 +485,6 @@ static void rtw_update_scanned_network(struct rtw_adapter 
*adapter,
pnetwork->last_scanned = jiffies;
 
pnetwork->network_type = 0;
-   pnetwork->aid = 0;
pnetwork->join_res = 0;
 
/* bss info not receiving from the right channel */
@@ -1027,7 +1025,6 @@ rtw_joinbss_update_network23a(struct rtw_adapter 
*padapter,
cur_network->network.beacon_interval =
ptarget_wlan->network.beacon_interval;
cur_network->network.tsf = ptarget_wlan->network.tsf;
-   cur_network->aid = pnetwork->join_res;
 
rtw_set_signal_stat_timer(&padapter->recvpriv);
padapter->recvpriv.signal_strength =
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
index ca6055f..aa91351 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
@@ -4866,7 +4866,7 @@ void report_join_res23a(struct rtw_adapter *padapter, int 
res)
pjoinbss_evt = (struct joinbss_event*)(pevtcmd + sizeof(struct 
C2HEvent_Header));
memcpy((unsigned char *)&pjoinbss_evt->network.network,
   &pmlmeinfo->network, sizeof(struct wlan_bssid_ex));
-   pjoinbss_evt->network.join_res  = pjoinbss_evt->network.aid = res;
+   pjoinbss_evt->network.join_res = res;
 
DBG_8723A("report_join_res23a(%d)\n", res);
 
diff --git a/drivers/staging/rtl8723au/include/wlan_bssdef.h 
b/drivers/staging/rtl8723au/include/wlan_bssdef.h
index 8acc418..95b32e1 100644
--- a/drivers/staging/rtl8723au/include/wlan_bssdef.h
+++ b/drivers/staging/rtl8723au/include/wlan_bssdef.h
@@ -99,7 +99,6 @@ structwlan_network {
/*  set to fixed when not to be removed as site-surveying */
int fixed;
unsigned long   last_scanned; /* timestamp for the network */
-   int aid;/* will only be valid when a BSS is joined. */
int join_res;
struct wlan_bssid_exnetwork; /* must be the last item */
struct wlan_bcn_infoBcnInfo;
-- 
1.9.3

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


[PATCH 14/15] staging: rtl8723au: Remove unused struct ndis_802_11_key

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/include/wlan_bssdef.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8723au/include/wlan_bssdef.h 
b/drivers/staging/rtl8723au/include/wlan_bssdef.h
index 037942c..8acc418 100644
--- a/drivers/staging/rtl8723au/include/wlan_bssdef.h
+++ b/drivers/staging/rtl8723au/include/wlan_bssdef.h
@@ -57,16 +57,6 @@ enum  {
Ndis802_11Encryption3KeyAbsent,
 };
 
-/*  Key mapping keys require a BSSID */
-struct ndis_802_11_key {
-   u32 Length; /*  Length of this structure */
-   u32 KeyIndex;
-   u32 KeyLength;  /*  length of key in bytes */
-   unsigned char BSSID[6];
-   unsigned long long KeyRSC;
-   u8 KeyMaterial[32]; /*  variable length depending on above field */
-};
-
 struct wlan_bcn_info {
/* these infor get from rtw_get_encrypt_info when
 *   * translate scan to UI */
-- 
1.9.3

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


[PATCH 10/15] staging: rtl8723au: Re-organize struct xmit_priv for better packing

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/include/rtw_xmit.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h 
b/drivers/staging/rtl8723au/include/rtw_xmit.h
index c26d944..b170ee2 100644
--- a/drivers/staging/rtl8723au/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723au/include/rtw_xmit.h
@@ -295,8 +295,6 @@ struct  xmit_priv {
 
struct rtw_adapter  *adapter;
 
-   u8  vcs;
-
u64 tx_bytes;
u64 tx_pkts;
u64 tx_drop;
@@ -305,6 +303,8 @@ struct  xmit_priv {
 
struct hw_xmit *hwxmits;
u8  hwxmit_entry;
+   u8  vcs;
+   u8  nqos_ssn;
 
u8  wmm_para_seq[4];/* sequence for wmm ac parameter strength from
 * large to small. it's value is 0->vo, 1->vi,
@@ -329,7 +329,6 @@ struct  xmit_priv {
struct list_head xmitextbuf_list;   /* track buffers for cleanup */
uint free_xmit_extbuf_cnt;
 
-   u8  nqos_ssn;
int ack_tx;
struct mutex ack_tx_mutex;
struct submit_ctx ack_tx_ops;
-- 
1.9.3

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


[PATCH 07/15] stating: rtl8723au: Eliminate write-only struct xmit_priv->txirp_cnt

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_xmit.c| 2 --
 drivers/staging/rtl8723au/include/rtw_xmit.h | 1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c 
b/drivers/staging/rtl8723au/core/rtw_xmit.c
index 0576df4..1847cf3 100644
--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
@@ -180,8 +180,6 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
for (i = 0; i < 4; i ++)
pxmitpriv->wmm_para_seq[i] = i;
 
-   pxmitpriv->txirp_cnt = 1;
-
sema_init(&pxmitpriv->tx_retevt, 0);
 
/* per AC pending irp */
diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h 
b/drivers/staging/rtl8723au/include/rtw_xmit.h
index 70cd4b6..5a8dece 100644
--- a/drivers/staging/rtl8723au/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723au/include/rtw_xmit.h
@@ -312,7 +312,6 @@ struct  xmit_priv {
 */
 
struct semaphoretx_retevt;/* all tx return event; */
-   u8  txirp_cnt;/*  */
 
struct tasklet_struct xmit_tasklet;
/* per AC pending irp */
-- 
1.9.3

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


[PATCH 06/15] staging: rtl8723au: Eliminate write-once variable xmit_priv->vcs_setting

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_xmit.c| 2 +-
 drivers/staging/rtl8723au/include/rtw_xmit.h | 1 -
 drivers/staging/rtl8723au/os_dep/os_intfs.c  | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c 
b/drivers/staging/rtl8723au/core/rtw_xmit.c
index 7a80381..0576df4 100644
--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
@@ -1293,7 +1293,7 @@ void rtw_update_protection23a(struct rtw_adapter 
*padapter, u8 *ie, uint ie_len)
uint protection;
const u8 *p;
 
-   switch (pxmitpriv->vcs_setting) {
+   switch (pregistrypriv->vrtl_carrier_sense) {
case DISABLE_VCS:
pxmitpriv->vcs = NONE_VCS;
break;
diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h 
b/drivers/staging/rtl8723au/include/rtw_xmit.h
index 134ad6e..70cd4b6 100644
--- a/drivers/staging/rtl8723au/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723au/include/rtw_xmit.h
@@ -295,7 +295,6 @@ struct  xmit_priv {
 
struct rtw_adapter  *adapter;
 
-   u8   vcs_setting;
u8  vcs;
 
u64 tx_bytes;
diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c 
b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index 19cb11b..ddd0a9f 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -387,7 +387,6 @@ static int rtw_init_default_value(struct rtw_adapter 
*padapter)
int ret = _SUCCESS;
 
/* xmit_priv */
-   pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense;
pxmitpriv->vcs = pregistrypriv->vcs_type;
/* pxmitpriv->rts_thresh = pregistrypriv->rts_thresh; */
pxmitpriv->frag_len = pregistrypriv->frag_thresh;
-- 
1.9.3

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


[PATCH 11/15] staging: rtl8723au: Remove a stack of write only counters

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

We don't do anything with these, so get rid of them

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_xmit.c|  6 --
 drivers/staging/rtl8723au/include/rtw_xmit.h |  5 -
 drivers/staging/rtl8723au/os_dep/usb_ops_linux.c | 16 
 3 files changed, 27 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c 
b/drivers/staging/rtl8723au/core/rtw_xmit.c
index 1847cf3..5b30171 100644
--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
@@ -182,12 +182,6 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
 
sema_init(&pxmitpriv->tx_retevt, 0);
 
-   /* per AC pending irp */
-   pxmitpriv->beq_cnt = 0;
-   pxmitpriv->bkq_cnt = 0;
-   pxmitpriv->viq_cnt = 0;
-   pxmitpriv->voq_cnt = 0;
-
pxmitpriv->ack_tx = false;
mutex_init(&pxmitpriv->ack_tx_mutex);
rtw_sctx_init23a(&pxmitpriv->ack_tx_ops, 0);
diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h 
b/drivers/staging/rtl8723au/include/rtw_xmit.h
index b170ee2..73e5f9c 100644
--- a/drivers/staging/rtl8723au/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723au/include/rtw_xmit.h
@@ -314,11 +314,6 @@ struct xmit_priv {
struct semaphoretx_retevt;/* all tx return event; */
 
struct tasklet_struct xmit_tasklet;
-   /* per AC pending irp */
-   int beq_cnt;
-   int bkq_cnt;
-   int viq_cnt;
-   int voq_cnt;
 
struct rtw_queue free_xmitbuf_queue;
struct list_head xmitbuf_list;  /* track buffers for cleanup */
diff --git a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c 
b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
index a3349ac..4c94264 100644
--- a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
@@ -53,18 +53,6 @@ static void usb_write_port23a_complete(struct urb *purb)
unsigned long irqL;
 
switch (pxmitbuf->flags) {
-   case VO_QUEUE_INX:
-   pxmitpriv->voq_cnt--;
-   break;
-   case VI_QUEUE_INX:
-   pxmitpriv->viq_cnt--;
-   break;
-   case BE_QUEUE_INX:
-   pxmitpriv->beq_cnt--;
-   break;
-   case BK_QUEUE_INX:
-   pxmitpriv->bkq_cnt--;
-   break;
case HIGH_QUEUE_INX:
 #ifdef CONFIG_8723AU_AP_MODE
rtw_chk_hi_queue_cmd23a(padapter);
@@ -166,19 +154,15 @@ int rtl8723au_write_port(struct rtw_adapter *padapter, 
u32 addr, u32 cnt,
 
switch (addr) {
case VO_QUEUE_INX:
-   pxmitpriv->voq_cnt++;
pxmitbuf->flags = VO_QUEUE_INX;
break;
case VI_QUEUE_INX:
-   pxmitpriv->viq_cnt++;
pxmitbuf->flags = VI_QUEUE_INX;
break;
case BE_QUEUE_INX:
-   pxmitpriv->beq_cnt++;
pxmitbuf->flags = BE_QUEUE_INX;
break;
case BK_QUEUE_INX:
-   pxmitpriv->bkq_cnt++;
pxmitbuf->flags = BK_QUEUE_INX;
break;
case HIGH_QUEUE_INX:
-- 
1.9.3

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


[PATCH 05/15] staging: rtl8723au: Use enum values for vcs_type

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Be consistent in the use of enum VCS_TYPE

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_wlan_util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
index 5c4006a..3ec5ef2f 100644
--- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
@@ -833,7 +833,7 @@ void VCS_update23a(struct rtw_adapter *padapter, struct 
sta_info *psta)
psta->cts2self = 0;
break;
case 1: /* on */
-   if (pregpriv->vcs_type == 1) { /* 1:RTS/CTS 2:CTS to self */
+   if (pregpriv->vcs_type == RTS_CTS) {
psta->rtsen = 1;
psta->cts2self = 0;
} else {
@@ -844,7 +844,7 @@ void VCS_update23a(struct rtw_adapter *padapter, struct 
sta_info *psta)
case 2: /* auto */
default:
if (pmlmeinfo->ERP_enable && pmlmeinfo->ERP_IE & BIT(1)) {
-   if (pregpriv->vcs_type == 1) {
+   if (pregpriv->vcs_type == RTS_CTS) {
psta->rtsen = 1;
psta->cts2self = 0;
} else {
-- 
1.9.3

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


[PATCH 00/15] staging: rtl8723au: Fixes and cleanups

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Hi,

Please find attached a couple of fixes and cleanups for the rtl8723au
driver. This includes a fix for the mac_addr alignment reported by Dan
Carpenter and two patches from Greg Donald.

Cheers,
Jes


Greg Donald (2):
  drivers: staging: rtl8723au: core: Fix "'foo * bar' should be 'foo
*bar'" errors
  drivers: staging: rtl8723au: Fix "open brace '{' following struct go
on the same line" errors

Jes Sorensen (13):
  staging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy()
usage
  staging: rtl8723au: Remove write-only struct xmit_priv->vcs_type
  staging: rtl8723au: Use enum values for vcs_type
  staging: rtl8723au: Eliminate write-once variable
xmit_priv->vcs_setting
  stating: rtl8723au: Eliminate write-only struct xmit_priv->txirp_cnt
  staging: rtl8723au: Use register define REQ_NQOS_SEQ instead of
hardcoded value
  staging: rtl8723au: Don't read REQ_NQOS_SEQ 16 bits and write back 8
bits
  staging: rtl8723au: Re-organize struct xmit_priv for better packing
  staging: rtl8723au: Remove a stack of write only counters
  staging: rtl8723au: Remove unused struct zero_bulkout_content
  staging: rtl8723au: Fold struct wlan_phy_info into struct
wlan_bssid_ex
  staging: rtl8723au: Remove unused struct ndis_802_11_key
  staging: rtl8723au: Eliminate write-only struct wlan_network->aid

 drivers/staging/rtl8723au/core/rtw_ap.c   |  2 +-
 drivers/staging/rtl8723au/core/rtw_led.c  |  3 +-
 drivers/staging/rtl8723au/core/rtw_mlme.c | 45 ++-
 drivers/staging/rtl8723au/core/rtw_mlme_ext.c |  8 ++--
 drivers/staging/rtl8723au/core/rtw_security.c | 30 +++
 drivers/staging/rtl8723au/core/rtw_sreset.c   |  2 +-
 drivers/staging/rtl8723au/core/rtw_wlan_util.c|  6 +--
 drivers/staging/rtl8723au/core/rtw_xmit.c | 10 +
 drivers/staging/rtl8723au/hal/hal_com.c   |  2 +-
 drivers/staging/rtl8723au/include/rtl8723a_dm.h   |  3 +-
 drivers/staging/rtl8723au/include/rtl8723a_recv.h |  3 +-
 drivers/staging/rtl8723au/include/rtw_cmd.h   |  3 +-
 drivers/staging/rtl8723au/include/rtw_eeprom.h|  2 +-
 drivers/staging/rtl8723au/include/rtw_ht.h|  3 +-
 drivers/staging/rtl8723au/include/rtw_mlme_ext.h  |  6 +--
 drivers/staging/rtl8723au/include/rtw_xmit.h  | 13 +--
 drivers/staging/rtl8723au/include/wlan_bssdef.h   | 21 +--
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c |  3 +-
 drivers/staging/rtl8723au/os_dep/os_intfs.c   |  2 -
 drivers/staging/rtl8723au/os_dep/usb_ops_linux.c  | 23 
 20 files changed, 61 insertions(+), 129 deletions(-)

-- 
1.9.3

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


[PATCH 08/15] staging: rtl8723au: Use register define REQ_NQOS_SEQ instead of hardcoded value

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/core/rtw_sreset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_sreset.c 
b/drivers/staging/rtl8723au/core/rtw_sreset.c
index 58ed980..29a29d9 100644
--- a/drivers/staging/rtl8723au/core/rtw_sreset.c
+++ b/drivers/staging/rtl8723au/core/rtw_sreset.c
@@ -107,7 +107,7 @@ static void sreset_restore_network_station(struct 
rtw_adapter *padapter)
 
mlmeext_joinbss_event_callback23a(padapter, 1);
/* restore Sequence No. */
-   rtl8723au_write8(padapter, 0x4dc, padapter->xmitpriv.nqos_ssn);
+   rtl8723au_write8(padapter, REG_NQOS_SEQ, padapter->xmitpriv.nqos_ssn);
 
sreset_restore_security_station(padapter);
 }
-- 
1.9.3

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


[PATCH 12/15] staging: rtl8723au: Remove unused struct zero_bulkout_content

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/os_dep/usb_ops_linux.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c 
b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
index 4c94264..3e19b3b 100644
--- a/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
@@ -18,13 +18,6 @@
 #include 
 #include 
 
-struct zero_bulkout_context {
-   void *pbuf;
-   void *purb;
-   void *pirp;
-   void *padapter;
-};
-
 void rtl8723au_read_port_cancel(struct rtw_adapter *padapter)
 {
struct recv_buf *precvbuf;
-- 
1.9.3

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


[PATCH 04/15] staging: rtl8723au: Remove write-only struct xmit_priv->vcs_type

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/include/rtw_xmit.h | 1 -
 drivers/staging/rtl8723au/os_dep/os_intfs.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h 
b/drivers/staging/rtl8723au/include/rtw_xmit.h
index 32a8441..134ad6e 100644
--- a/drivers/staging/rtl8723au/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723au/include/rtw_xmit.h
@@ -297,7 +297,6 @@ struct  xmit_priv {
 
u8   vcs_setting;
u8  vcs;
-   u8  vcs_type;
 
u64 tx_bytes;
u64 tx_pkts;
diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c 
b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index b34eaec..19cb11b 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -389,7 +389,6 @@ static int rtw_init_default_value(struct rtw_adapter 
*padapter)
/* xmit_priv */
pxmitpriv->vcs_setting = pregistrypriv->vrtl_carrier_sense;
pxmitpriv->vcs = pregistrypriv->vcs_type;
-   pxmitpriv->vcs_type = pregistrypriv->vcs_type;
/* pxmitpriv->rts_thresh = pregistrypriv->rts_thresh; */
pxmitpriv->frag_len = pregistrypriv->frag_thresh;
 
-- 
1.9.3

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


[PATCH 09/15] staging: rtl8723au: Don't read REQ_NQOS_SEQ 16 bits and write back 8 bits

2014-10-10 Thread Jes . Sorensen
From: Jes Sorensen 

This fixes a potential endian bug

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/hal_com.c  | 2 +-
 drivers/staging/rtl8723au/include/rtw_xmit.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/hal_com.c 
b/drivers/staging/rtl8723au/hal/hal_com.c
index bf919f6..f906317 100644
--- a/drivers/staging/rtl8723au/hal/hal_com.c
+++ b/drivers/staging/rtl8723au/hal/hal_com.c
@@ -727,7 +727,7 @@ void rtl8723a_fifo_cleanup(struct rtw_adapter *padapter)
rtl8723au_write8(padapter, REG_TXPAUSE, 0xff);
 
/*  keep sn */
-   padapter->xmitpriv.nqos_ssn = rtl8723au_read16(padapter, REG_NQOS_SEQ);
+   padapter->xmitpriv.nqos_ssn = rtl8723au_read8(padapter, REG_NQOS_SEQ);
 
if (pwrpriv->bkeepfwalive != true) {
u32 v32;
diff --git a/drivers/staging/rtl8723au/include/rtw_xmit.h 
b/drivers/staging/rtl8723au/include/rtw_xmit.h
index 5a8dece..c26d944 100644
--- a/drivers/staging/rtl8723au/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723au/include/rtw_xmit.h
@@ -329,7 +329,7 @@ struct  xmit_priv {
struct list_head xmitextbuf_list;   /* track buffers for cleanup */
uint free_xmit_extbuf_cnt;
 
-   u16 nqos_ssn;
+   u8  nqos_ssn;
int ack_tx;
struct mutex ack_tx_mutex;
struct submit_ctx ack_tx_ops;
-- 
1.9.3

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


[PATCH 2/3] staging: comedi: usbdux: updated contact details / comments

2014-10-10 Thread Bernd Porr
I've updated my contact details and removed obsolete comments. 

Signed-off-by: Bernd Porr 
---
 drivers/staging/comedi/drivers/usbdux.c | 59 -
 1 file changed, 28 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbdux.c 
b/drivers/staging/comedi/drivers/usbdux.c
index 053bc50..24fa9f66 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -1,37 +1,34 @@
 /*
-   comedi/drivers/usbdux.c
-   Copyright (C) 2003-2007 Bernd Porr, bernd.p...@f2s.com
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+ * usbdux.c
+ * Copyright (C) 2003-2014 Bernd Porr, m...@berndporr.me.uk
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
+
 /*
-Driver: usbdux
-Description: University of Stirling USB DAQ & INCITE Technology Limited
-Devices: [ITL] USB-DUX (usbdux.o)
-Author: Bernd Porr 
-Updated: 8 Dec 2008
-Status: Stable
-Configuration options:
-  You have to upload firmware with the -i option. The
-  firmware is usually installed under /usr/share/usb or
-  /usr/local/share/usb or /lib/firmware.
-
-Connection scheme for the counter at the digital port:
-  0=/CLK0, 1=UP/DOWN0, 2=RESET0, 4=/CLK1, 5=UP/DOWN1, 6=RESET1.
-  The sampling rate of the counter is approximately 500Hz.
-
-Please note that under USB2.0 the length of the channel list determines
-the max sampling rate. If you sample only one channel you get 8kHz
-sampling rate. If you sample two channels you get 4kHz and so on.
-*/
+ * Driver: usbdux
+ * Description: University of Stirling USB DAQ & INCITE Technology Limited
+ * Devices: (ITL) USB-DUX [usbdux]
+ * Author: Bernd Porr 
+ * Updated: 10 Oct 2014
+ * Status: Stable
+ * Connection scheme for the counter at the digital port:
+ * 0=/CLK0, 1=UP/DOWN0, 2=RESET0, 4=/CLK1, 5=UP/DOWN1, 6=RESET1.
+ * The sampling rate of the counter is approximately 500Hz.
+ *
+ * Note that under USB2.0 the length of the channel list determines
+ * the max sampling rate. If you sample only one channel you get 8kHz
+ * sampling rate. If you sample two channels you get 4kHz and so on.
+ */
+
 /*
  * I must give credit here to Chris Baugher who
  * wrote the driver for AT-MIO-16d. I used some parts of this
-- 
1.9.1

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


[PATCH 1/3] staging: comedi: usbduxsigma: updated contact details and status

2014-10-10 Thread Bernd Porr
I've updated my contact details of the driver. I've also tested it
thoroughly and it works perfectly. I've changed the status to stable. 

Signed-off-by: Bernd Porr 
---
 drivers/staging/comedi/drivers/usbduxsigma.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c 
b/drivers/staging/comedi/drivers/usbduxsigma.c
index 94a09c1..309878e 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -1,6 +1,6 @@
 /*
  * usbduxsigma.c
- * Copyright (C) 2011 Bernd Porr, bernd.p...@f2s.com
+ * Copyright (C) 2011-2014 Bernd Porr, m...@berndporr.me.uk
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,9 +17,9 @@
  * Driver: usbduxsigma
  * Description: University of Stirling USB DAQ & INCITE Technology Limited
  * Devices: (ITL) USB-DUX [usbduxsigma]
- * Author: Bernd Porr 
- * Updated: 8 Nov 2011
- * Status: testing
+ * Author: Bernd Porr 
+ * Updated: 10 Oct 2014
+ * Status: stable
  */
 
 /*
-- 
1.9.1

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


[PATCH 3/3] staging: comedi: usbduxfast: updated address details

2014-10-10 Thread Bernd Porr
Updated the range of years, e-mail and added driver desription as
usually done in comedi. 

Signed-off-by: Bernd Porr 
---
 drivers/staging/comedi/drivers/usbduxfast.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/usbduxfast.c 
b/drivers/staging/comedi/drivers/usbduxfast.c
index f85818d..4f57321 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2004 Bernd Porr, bernd.p...@f2s.com
+ *  Copyright (C) 2004-2014 Bernd Porr, m...@berndporr.me.uk
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -12,6 +12,15 @@
  * GNU General Public License for more details.
  */
 
+/* 
+ * Driver: usbduxfast
+ * Description: University of Stirling USB DAQ & INCITE Technology Limited 
+ * Devices: (ITL) USB-DUX [usbduxfast]
+ * Author: Bernd Porr 
+ * Updated: 10 Oct 2014   
+ * Status: stable 
+ */
+
 /*
  * I must give credit here to Chris Baugher who
  * wrote the driver for AT-MIO-16d. I used some parts of this
-- 
1.9.1

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


Re: [PATCH 08/44] kernel: Move pm_power_off to common code

2014-10-10 Thread Guenter Roeck

On 10/09/2014 01:24 PM, Pavel Machek wrote:

Hi!


@@ -184,6 +179,8 @@ machine_halt(void)
  void
  machine_power_off(void)
  {
+   do_kernel_poweroff();
+


poweroff -> power_off for consistency.


Dunno; matter of personal preference. I started with that, but ultimately went
with poweroff to distinguish poweroff handler functions from existing code,
specifically kernel_power_off().


That works for you, but once it is merged, it is ugly/confusing typo.
Pavel



Ok, no problem, I'll change it.

Guenter

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


Re: [PATCH v2] mfd: rtsx: fix PM suspend for 5227 & 5249

2014-10-10 Thread Lee Jones
On Fri, 10 Oct 2014, micky_ch...@realsil.com.cn wrote:

> From: Micky Ching 
> 
> Fix rts5227&5249 failed send buffer cmd after suspend,
> PM_CTRL3 should reset before send any buffer cmd after suspend.
> Otherwise, buffer cmd will failed, this will lead resume fail.
> 
> Signed-off-by: Micky Ching 
> ---
>  drivers/mfd/Makefile |  2 +-
>  drivers/mfd/rts5227.c|  6 ++
>  drivers/mfd/rts5249.c|  4 
>  drivers/mfd/rtsx_gops.c  | 37 +
>  drivers/mfd/rtsx_pcr.h   |  3 +++
>  include/linux/mfd/rtsx_pci.h | 28 
>  6 files changed, 79 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/mfd/rtsx_gops.c

[...]

> +static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr,
> + u8 mask, u8 append)
> +{
> + int err;
> + u8 val;
> +
> + err = pci_read_config_byte(pcr->pci, addr, &val);
> + if (err < 0)
> + return err;
> + return pci_write_config_byte(pcr->pci, addr, (val & mask) | append);
> +}
> +

Why is this in here?  Why not put it in the generic ops file?

-- 
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 v2] mfd: rtsx: fix PM suspend for 5227 & 5249

2014-10-10 Thread Micky Ching


On 10/10/2014 05:24 PM, Lee Jones wrote:

On Fri, 10 Oct 2014, micky_ch...@realsil.com.cn wrote:


From: Micky Ching 

Fix rts5227&5249 failed send buffer cmd after suspend,
PM_CTRL3 should reset before send any buffer cmd after suspend.
Otherwise, buffer cmd will failed, this will lead resume fail.

Signed-off-by: Micky Ching 
---
  drivers/mfd/Makefile |  2 +-
  drivers/mfd/rts5227.c|  6 ++
  drivers/mfd/rts5249.c|  4 
  drivers/mfd/rtsx_gops.c  | 37 +
  drivers/mfd/rtsx_pcr.h   |  3 +++
  include/linux/mfd/rtsx_pci.h | 28 

These are Card Reader drivers right?

Do you know why these are in MFD?

Hi Lee,

Our chips support SD/MMC card and MS card,
SD/MMC card driver is put into mmc/ subsystem,
MS card driver is put into memstick/ subsystem.
We put the common functions into mfd/ subsystem.




  6 files changed, 79 insertions(+), 1 deletion(-)
  create mode 100644 drivers/mfd/rtsx_gops.c




--
Best Regards,
micky.

Realsil Microelectronics Inc. PCBU swlinux.
Tel:86-512-6258-8966 Ext: 5806

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


Re: [PATCH v2] mfd: rtsx: fix PM suspend for 5227 & 5249

2014-10-10 Thread Lee Jones
On Fri, 10 Oct 2014, micky_ch...@realsil.com.cn wrote:

> From: Micky Ching 
> 
> Fix rts5227&5249 failed send buffer cmd after suspend,
> PM_CTRL3 should reset before send any buffer cmd after suspend.
> Otherwise, buffer cmd will failed, this will lead resume fail.
> 
> Signed-off-by: Micky Ching 
> ---
>  drivers/mfd/Makefile |  2 +-
>  drivers/mfd/rts5227.c|  6 ++
>  drivers/mfd/rts5249.c|  4 
>  drivers/mfd/rtsx_gops.c  | 37 +
>  drivers/mfd/rtsx_pcr.h   |  3 +++
>  include/linux/mfd/rtsx_pci.h | 28 

These are Card Reader drivers right?

Do you know why these are in MFD?

>  6 files changed, 79 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/mfd/rtsx_gops.c


-- 
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] staging: rtl8188eu: coding style fixup

2014-10-10 Thread Sudip Mukherjee
On Fri, Oct 10, 2014 at 11:09:20AM +0400, Igor Bogomazov wrote:
> checkpatch.pl tiny fix
> get rid of 2 warnings and 2 errors for hal/fw.c:
> 
> WARNING: braces {} are not necessary for single statement blocks
> WARNING: line over 80 characters
> ERROR: space required before the open brace '{'
> ERROR: space required after that ',' (ctx:VxV)
you should usually do only one type of fix in a patch.

> 
> Signed-off-by: Igor Bogomazov 
> Cc: Greg Kroah-Hartman 
> Cc: navin patidar 
> Cc: Stephen Rothwell 
> ---
> for linux-next 3.17.0
> 
> this is an updated version of the patch I've sent yesterday, that one
> did not provide a clear description
> 
> diff --git a/drivers/staging/rtl8188eu/hal/fw.c 
> b/drivers/staging/rtl8188eu/hal/fw.c
> --- a/drivers/staging/rtl8188eu/hal/fw.c
> +++ b/drivers/staging/rtl8188eu/hal/fw.c
> @@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
>   break;
>   } while (counter++ < POLLING_READY_TIMEOUT_COUNT);
>  
> - if (counter >= POLLING_READY_TIMEOUT_COUNT) {
> + if (counter >= POLLING_READY_TIMEOUT_COUNT)
>   goto exit;
> - }
>  
>   value32 = usb_read32(adapt, REG_MCUFWDL);
>   value32 |= MCUFWDL_RDY;
> @@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
>   u32 fwsize;
>   int err;
>  
> - if (request_firmware(&fw, fw_name, device)){
> + if (request_firmware(&fw, fw_name, device)) {
>   dev_err(device, "Firmware %s not available\n", fw_name);
>   return -ENOENT;
>   }
>  
>   if (fw->size > FW_8188E_SIZE) {
> - dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
> + dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
>FW_8188E_SIZE);

align this with the open parenthesis

>   return -1;
>   }
> @@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
>   rtl88e_firmware_selfreset(adapt);
>   }
>   _rtl88e_enable_fw_download(adapt, true);
> - usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | 
> FWDL_ChkSum_rpt);
> + usb_write8(adapt, REG_MCUFWDL,
> + usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
same here also. 
check your patch with --strict option of checkpatch

thanks
sudip

>   _rtl88e_write_fw(adapt, pfwdata, fwsize);
>   _rtl88e_enable_fw_download(adapt, false);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] scsi: Use try_rc16 and try_vpd_pages quirks on Hyper-V virtual disks

2014-10-10 Thread Sitsofe Wheeler
Microsoft Hyper-V virtual disks currently only claim SPC-2 compliance causing
feature tests not to be run (even though those features are correctly announced
elsewhere). Make Hyper-V virtual disks quirk past READ CAPACITY(16) and VPD
page guards so appropriate tests are performed.

This only impacts Hyper-V's VHD/VHDX virtual disks and not passthrough devices.

Signed-off-by: Sitsofe Wheeler 
---
 drivers/scsi/scsi_devinfo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index 49014a1..3eadcb1 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -210,6 +210,7 @@ static struct {
{"Medion", "Flash XL  MMC/SD", "2.6D", BLIST_FORCELUN},
{"MegaRAID", "LD", NULL, BLIST_FORCELUN},
{"MICROP", "4110", NULL, BLIST_NOTQ},
+   {"Msft", "Virtual Disk", "1.0", BLIST_TRY_VPD_PAGES | BLIST_TRY_RC16},
{"MYLEX", "DACARMRB", "*", BLIST_REPORTLUN2},
{"nCipher", "Fastness Crypto", NULL, BLIST_FORCELUN},
{"NAKAMICH", "MJ-4.8S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
-- 
1.9.3

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


[PATCH 2/3] scsi: add try_rc16 blacklist flag

2014-10-10 Thread Sitsofe Wheeler
Microsoft Hyper-V virtual disks currently only claim SPC-2 compliance causing
the kernel skip checks for features such as thin provisioning even though the
virtual disk advertises them.

Add a blacklist flag that can allow such devices to quirk past READ
CAPACITY(16) guards.

Signed-off-by: Sitsofe Wheeler 
---
 drivers/scsi/scsi_scan.c| 3 +++
 drivers/scsi/sd.c   | 3 +++
 include/scsi/scsi_device.h  | 1 +
 include/scsi/scsi_devinfo.h | 1 +
 4 files changed, 8 insertions(+)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index ba3f1e8..d3f6267 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -962,6 +962,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned 
char *inq_result,
else if (*bflags & BLIST_SKIP_VPD_PAGES)
sdev->skip_vpd_pages = 1;
 
+   if (*bflags & BLIST_TRY_RC16)
+   sdev->try_rc16 = 1;
+
transport_configure_device(&sdev->sdev_gendev);
 
if (sdev->host->hostt->slave_configure) {
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 0cb5c9f..0ccf372 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2143,6 +2143,9 @@ static int sd_try_rc16_first(struct scsi_device *sdp)
return 0;
if (sdp->scsi_level > SCSI_SPC_2)
return 1;
+   if (sdp->try_rc16) {
+   return 1;
+   }
if (scsi_device_protection(sdp))
return 1;
return 0;
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 27ecee7..d6e2bd8 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -155,6 +155,7 @@ struct scsi_device {
unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */
unsigned skip_vpd_pages:1;  /* do not read VPD pages */
unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
+   unsigned try_rc16:1;/* attempt READ CAPACITY(16) */
unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */
unsigned no_start_on_add:1; /* do not issue start on add */
unsigned allow_restart:1; /* issue START_UNIT in error handler */
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 183eaab..9431f5e 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -36,5 +36,6 @@
 for sequential scan */
 #define BLIST_TRY_VPD_PAGES0x1000 /* Attempt to read VPD pages */
 #define BLIST_NO_RSOC  0x2000 /* don't try to issue RSOC */
+#define BLIST_TRY_RC16 0x4000 /* Attempt READ CAPACITY(16) */
 
 #endif
-- 
1.9.3

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


[PATCH 1/3] Revert "Drivers: add blist flags"

2014-10-10 Thread Sitsofe Wheeler
This reverts commit f3cfabce7a2e92564d380de3aad4b43901fb7ae6 (Drivers:
add blist flags) as it does not enable thin provisioning for my Hyper-V 2012 R2
virtual disks.

Signed-off-by: Sitsofe Wheeler 
---
 drivers/scsi/storvsc_drv.c | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 733e5f7..2cc094e 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -327,8 +327,6 @@ MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size 
(bytes)");
  */
 static int storvsc_timeout = 180;
 
-static int msft_blist_flags = BLIST_TRY_VPD_PAGES;
-
 #define STORVSC_MAX_IO_REQUESTS200
 
 static void storvsc_on_channel_callback(void *context);
@@ -1439,14 +1437,6 @@ static int storvsc_device_configure(struct scsi_device 
*sdevice)
 
sdevice->no_write_same = 1;
 
-   /*
-* Add blist flags to permit the reading of the VPD pages even when
-* the target may claim SPC-2 compliance. MSFT targets currently
-* claim SPC-2 compliance while they implement post SPC-2 features.
-* With this patch we can correctly handle WRITE_SAME_16 issues.
-*/
-   sdevice->sdev_bflags |= msft_blist_flags;
-
return 0;
 }
 
-- 
1.9.3

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


[PATCH 0/3] scsi: Add Hyper-V logical block provisioning quirks

2014-10-10 Thread Sitsofe Wheeler
Microsoft Hyper-V virtual disks currently only claim SPC-2 compliance
even though they implement post SPC-2 features (such as thin
provisioning) which means the Linux kernel does not go on to test for
those features even though they are advertised.

A previous patch attempted to add a quirk to workaround this but the
quirk was only enabled after the features had been scanned for, wouldn't
work for "small" disks and would quirk on  all Hyper-V SCSI devices
(e.g. passthrough disks).

The new patches partially revert the previous effort, add the quirk in a
more traditional manner to only Hyper-V virtual disks and work on small
virtual disks.

Sitsofe Wheeler (3):
  Revert "Drivers: add blist flags"
  scsi: add try_rc16 blacklist flag
  scsi: Use try_rc16 and try_vpd_pages quirks on Hyper-V virtual disks

 drivers/scsi/scsi_devinfo.c |  1 +
 drivers/scsi/scsi_scan.c|  3 +++
 drivers/scsi/sd.c   |  3 +++
 drivers/scsi/storvsc_drv.c  | 10 --
 include/scsi/scsi_device.h  |  1 +
 include/scsi/scsi_devinfo.h |  1 +
 6 files changed, 9 insertions(+), 10 deletions(-)

-- 
1.9.3

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


[PATCH] staging: rtl8188eu: coding style fixup

2014-10-10 Thread Igor Bogomazov
checkpatch.pl tiny fix
get rid of 2 warnings and 2 errors for hal/fw.c:

WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
ERROR: space required before the open brace '{'
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Igor Bogomazov 
Cc: Greg Kroah-Hartman 
Cc: navin patidar 
Cc: Stephen Rothwell 
---
for linux-next 3.17.0

this is an updated version of the patch I've sent yesterday, that one
did not provide a clear description

diff --git a/drivers/staging/rtl8188eu/hal/fw.c 
b/drivers/staging/rtl8188eu/hal/fw.c
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
break;
} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
 
-   if (counter >= POLLING_READY_TIMEOUT_COUNT) {
+   if (counter >= POLLING_READY_TIMEOUT_COUNT)
goto exit;
-   }
 
value32 = usb_read32(adapt, REG_MCUFWDL);
value32 |= MCUFWDL_RDY;
@@ -193,13 +192,13 @@ int rtl88eu_download_fw(struct adapter *adapt)
u32 fwsize;
int err;
 
-   if (request_firmware(&fw, fw_name, device)){
+   if (request_firmware(&fw, fw_name, device)) {
dev_err(device, "Firmware %s not available\n", fw_name);
return -ENOENT;
}
 
if (fw->size > FW_8188E_SIZE) {
-   dev_err(device,"Firmware size exceed 0x%X. Check it.\n",
+   dev_err(device, "Firmware size exceed 0x%X. Check it.\n",
 FW_8188E_SIZE);
return -1;
}
@@ -226,7 +225,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
rtl88e_firmware_selfreset(adapt);
}
_rtl88e_enable_fw_download(adapt, true);
-   usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | 
FWDL_ChkSum_rpt);
+   usb_write8(adapt, REG_MCUFWDL,
+   usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
_rtl88e_write_fw(adapt, pfwdata, fwsize);
_rtl88e_enable_fw_download(adapt, false);

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