linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul Rolland" <rol@witbe.net>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: "Paul Rolland" <rol@witbe.net>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	"Chaoming Li" <chaoming_li@realsil.com.cn>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: rtl8192cu: slow path warning
Date: Tue, 23 Jul 2013 16:26:59 +0200	[thread overview]
Message-ID: <20130723162659.5aa59750@tux.DEF.witbe.net> (raw)
In-Reply-To: <20130723142907.53103aab@tux.DEF.witbe.net>


[-- Attachment #1.1: Type: text/plain, Size: 1319 bytes --]

Hello Richard,

If you still have the required HW and still would like a patch to remove
that warning on your machine, could you please try the attached one ?

I slightly reworked the original patch by moving the function
rtl_lps_change_work_callback from pci.c to ps.c. 

I've successfully compiled that on my machine, but I have PCI set in
my .config, so I'd like your feedback.

Best,
Paul

On Tue, 23 Jul 2013 14:29:07 +0200
Paul Rolland (ポール・ロラン)  <rol@witbe.net> wrote:

> Hello,
> 
> On Thu, 27 Jun 2013 09:33:20 +0200
> Richard Genoud <richard.genoud@gmail.com> wrote:
> 
> > Yes, of course, you can add my
> > Reported-by: Richard Genoud <richard.genoud@gmail.com>
> > 
> > But the patch doesn't compile on my platform ( since I'm on ARM, I
> > haven't got a PCI bus, so rtlwifi/pci.c is not compiled ) :
> > 
> > ERROR: "rtl_lps_change_work_callback"
> > [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
> 
> Is that the reason why this patch is not yet in 3.10.x or 3.11-rcY ?
> I'm running a 3.10.1 with USB dongle including 8192CU, and I can see this
> warning when the machine starts.
> I've check 3.10.1, 3.10.2 and 3.11-rc3 source code, but this fix is not
> there. Is there a different fix that went in in 3.10.2 or 3.11-rc?
> 
> Best,
> Paul


[-- Attachment #1.2: patch --]
[-- Type: application/octet-stream, Size: 2461 bytes --]

diff -uprN -X /usr/src/linux-3.10.2/Documentation/dontdiff rtlwifi.orig/pci.c rtlwifi/pci.c
--- rtlwifi.orig/pci.c	2013-07-23 15:29:47.000000000 +0200
+++ rtlwifi/pci.c	2013-07-23 15:30:59.000000000 +0200
@@ -1008,19 +1008,6 @@ static void _rtl_pci_prepare_bcn_tasklet
 	return;
 }
 
-static void rtl_lps_change_work_callback(struct work_struct *work)
-{
-	struct rtl_works *rtlworks =
-	    container_of(work, struct rtl_works, lps_change_work);
-	struct ieee80211_hw *hw = rtlworks->hw;
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-
-	if (rtlpriv->enter_ps)
-		rtl_lps_enter(hw);
-	else
-		rtl_lps_leave(hw);
-}
-
 static void _rtl_pci_init_trx_var(struct ieee80211_hw *hw)
 {
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
diff -uprN -X /usr/src/linux-3.10.2/Documentation/dontdiff rtlwifi.orig/ps.c rtlwifi/ps.c
--- rtlwifi.orig/ps.c	2013-07-23 15:29:47.000000000 +0200
+++ rtlwifi/ps.c	2013-07-23 15:49:50.000000000 +0200
@@ -922,3 +922,17 @@ void rtl_p2p_info(struct ieee80211_hw *h
 	else
 		rtl_p2p_noa_ie(hw, data, len - FCS_LEN);
 }
+
+void rtl_lps_change_work_callback(struct work_struct *work)
+{
+	struct rtl_works *rtlworks =
+	    container_of(work, struct rtl_works, lps_change_work);
+	struct ieee80211_hw *hw = rtlworks->hw;
+	struct rtl_priv *rtlpriv = rtl_priv(hw);
+
+	if (rtlpriv->enter_ps)
+		rtl_lps_enter(hw);
+	else
+		rtl_lps_leave(hw);
+}
+
diff -uprN -X /usr/src/linux-3.10.2/Documentation/dontdiff rtlwifi.orig/ps.h rtlwifi/ps.h
--- rtlwifi.orig/ps.h	2013-07-23 15:29:47.000000000 +0200
+++ rtlwifi/ps.h	2013-07-23 15:32:15.000000000 +0200
@@ -49,5 +49,6 @@ void rtl_swlps_rf_awake(struct ieee80211
 void rtl_swlps_rf_sleep(struct ieee80211_hw *hw);
 void rtl_p2p_ps_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state);
 void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len);
+void rtl_lps_change_work_callback(struct work_struct *work);
 
 #endif
diff -uprN -X /usr/src/linux-3.10.2/Documentation/dontdiff rtlwifi.orig/usb.c rtlwifi/usb.c
--- rtlwifi.orig/usb.c	2013-07-23 15:29:47.000000000 +0200
+++ rtlwifi/usb.c	2013-07-23 15:32:51.000000000 +0200
@@ -1070,6 +1070,8 @@ int rtl_usb_probe(struct usb_interface *
 	spin_lock_init(&rtlpriv->locks.usb_lock);
 	INIT_WORK(&rtlpriv->works.fill_h2c_cmd,
 		  rtl_fill_h2c_cmd_work_callback);
+	INIT_WORK(&rtlpriv->works.lps_change_work,
+		  rtl_lps_change_work_callback);
 
 	rtlpriv->usb_data_index = 0;
 	init_completion(&rtlpriv->firmware_loading_complete);

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-07-23 14:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 12:38 rtl8192cu: slow path warning and connection problem v3.10-rc5 Richard GENOUD
2013-06-11 13:42 ` Richard Genoud
2013-06-26 14:22 ` rtl8192cu: slow path warning Richard GENOUD
2013-06-26 15:54   ` Larry Finger
2013-06-27  7:33     ` Richard Genoud
2013-06-27 14:38       ` Larry Finger
2013-06-27 18:20       ` Larry Finger
2013-06-28  8:58         ` Richard GENOUD
2013-06-28 13:53         ` Maxime Ripard
2013-06-28 14:16           ` Larry Finger
2013-07-23 12:29       ` Paul Rolland
2013-07-23 14:26         ` Paul Rolland [this message]
2013-07-23 15:00           ` Richard Genoud
2013-07-23 15:05         ` Larry Finger
2013-07-23 15:49           ` Paul Rolland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130723162659.5aa59750@tux.DEF.witbe.net \
    --to=rol@witbe.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=richard.genoud@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).