From: Larry Finger <Larry.Finger@lwfinger.net>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: linux-wireless@vger.kernel.org, kvalo@codeaurora.org,
johannes@sipsolutions.net
Subject: Re: [PATCH 1/1] New driver: rtl8xxxu (mac80211)
Date: Mon, 31 Aug 2015 19:16:47 -0500 [thread overview]
Message-ID: <55E4EE6F.2010008@lwfinger.net> (raw)
In-Reply-To: <wrfjio7v3txe.fsf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2853 bytes --]
On 08/31/2015 06:43 PM, Jes Sorensen wrote:
> Larry Finger <Larry.Finger@lwfinger.net> writes:
>> On 08/30/2015 09:39 PM, Jes Sorensen wrote:
>>> Larry Finger <Larry.Finger@lwfinger.net> writes:
>>>> On 08/30/2015 01:41 PM, Jes Sorensen wrote:
>>>>>>> +{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x817e, 0xff,
>>>>>> 0xff, 0xff),
>>>>>>> + .driver_info = (unsigned long)&rtl8192cu_fops},
>>>>>>
>>>>>> I have tested a device with USB ID 0x0bda (USB_VENDOR_ID_REALTEK):0x817e.
>>>>>
>>>>> Were you happy with the results, or did it cause problems? Ie. did you
>>>>> try on x86 or on PPC32?
>>>>
>>>> As covered in the other mail, it works very well at G rates.
>>>
>>> I see - I am a little confused, it works well on G rates but not on N
>>> rates, or was this due to the AP used?
>>
>> The AP is AC1200. It supports full N rates on other devices.
>
> You only manage to make it work on G rates against this AP? Urgh, I
> don't like that at all.
>
> I thought you reported 30+Mbps performances though?, thats more than you
> get on G.
OK, I get a bit better than the top G rate of 27 Mbps, but the connection
reports a 54 Mbps raw rate. My Intel 7260 gets RX of 95 and TX of 53 Mbps from
the same location relative to the AP. For the Intel, the listed raw rate is 300
Mbps.
>>>>> I don't think any of this is showstopper material for inclusion right
>>>>> now, albeit I do want to address them.
>>>>
>>>> The scheduling while atomic problems do need to be fixed, and I am
>>>> still working on the failure to get a wifi device on PPC.
>>>
>>> It's already fixed :)
>>
>> A full debug=0x3fff showed me one problem on the PPC. I will be
>> testing a patch later today.
>
> Interesting, let me know what you find.
Thanks for the fixes. I'm still getting the sleeping while atomic BUG splat from
rtl8723a_h2c_cmd+0x48. Today I know that is not a lock dependency issue. I have
one in VirtualBox that fires and disables further checking, but that driver is
not loading now.
I have made some progress on the big-endian issues. When the firmware file is
read from disk, the first byte read must be the first byte written to the
device. In the slow write N routine, four bytes are picked and written using the
write32 routine, which does a cpu_to_32() byte swap. As a result, the order of
bytes to the device is 03, 02, 01, 00! Rather than byte swap twice, I am calling
the regular writeN routine with each hunk. After a bit of thinking about the
best blocksize to use, I settled on 64. That reduces the number of full-size
hunks that are written without unduly increasing the worst-case number of writes
needed for the remainder.
On PPC, I now get a device registered; however, the scan data are garbled. That
shouldn't be too difficult to debug, but just in case, I have attached the patch
for rtl8xxxu_slow_writeN().
Larry
[-- Attachment #2: fix_big_endian_fw_download.patch --]
[-- Type: text/x-patch, Size: 938 bytes --]
diff --git a/drivers/net/wireless/rtl8xxxu.c b/drivers/net/wireless/rtl8xxxu.c
index 8773884..80602b8 100644
--- a/drivers/net/wireless/rtl8xxxu.c
+++ b/drivers/net/wireless/rtl8xxxu.c
@@ -1099,17 +1099,18 @@ rtl8xxxu_writeN(struct rtl8xxxu_priv *priv, u16 addr, u8 *buf, u16 len)
static int
rtl8xxxu_slow_writeN(struct rtl8xxxu_priv *priv, u16 addr, u8 *buf, u16 len)
{
- u32 blocksize = sizeof(u32);
- u32 *buf4 = (u32 *)buf;
+ u32 blocksize = 64;
int i, offset, count, remainder;
+ /* This routine does not do any btye swapping on big-endian machines.
+ * It should be used for writing firmware, and nothing else */
count = len / blocksize;
remainder = len % blocksize;
for (i = 0; i < count; i++) {
offset = i * blocksize;
- rtl8xxxu_write32(priv, (REG_FW_START_ADDRESS + offset),
- buf4[i]);
+ rtl8xxxu_writeN(priv, (REG_FW_START_ADDRESS + offset),
+ (buf + offset), blocksize);
}
if (remainder) {
next prev parent reply other threads:[~2015-09-01 0:16 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-29 21:18 [PATCH 0/1] rtl8xxxu (mac80211) driver for rtl8188[cr]u/rtl8192cu/rtl8723au Jes.Sorensen
2015-08-29 21:18 ` [PATCH 1/1] New driver: rtl8xxxu (mac80211) Jes.Sorensen
2015-08-30 4:42 ` Larry Finger
2015-08-30 18:41 ` Jes Sorensen
2015-08-30 21:02 ` Jes Sorensen
2015-08-30 23:51 ` Larry Finger
2015-08-31 2:39 ` Jes Sorensen
2015-08-31 15:45 ` Larry Finger
2015-08-31 23:43 ` Jes Sorensen
2015-09-01 0:16 ` Larry Finger [this message]
2015-09-01 4:54 ` Jes Sorensen
2015-09-01 5:17 ` Larry Finger
2015-09-01 5:26 ` Jes Sorensen
2015-08-31 1:06 ` Joe Perches
2015-08-31 13:11 ` Jes Sorensen
2015-08-31 8:19 ` Johannes Berg
2015-08-31 14:48 ` Johannes Berg
2015-08-31 23:42 ` Jes Sorensen
2015-09-01 15:07 ` Johannes Berg
2015-09-03 1:59 ` Jes Sorensen
2015-09-03 2:39 ` Jes Sorensen
2015-09-03 10:17 ` Johannes Berg
2015-09-04 18:24 ` Jes Sorensen
2015-09-04 18:25 ` Johannes Berg
2015-09-05 4:02 ` Sujith Manoharan
2015-09-17 16:46 ` Johannes Berg
2015-10-05 18:49 ` Jes Sorensen
2015-10-05 18:56 ` Johannes Berg
2015-10-05 19:04 ` Jes Sorensen
2015-10-05 19:12 ` Johannes Berg
2015-10-05 19:19 ` Jes Sorensen
2015-10-05 19:20 ` Johannes Berg
2015-10-05 19:53 ` Jes Sorensen
2015-09-03 10:17 ` Johannes Berg
2015-09-04 17:48 ` Jes Sorensen
2015-09-04 18:02 ` Johannes Berg
2015-10-08 16:23 ` Jakub Sitnicki
2015-10-08 19:09 ` Jes Sorensen
2015-10-08 20:33 ` Stefan Lippers-Hollmann
2015-10-08 21:06 ` Jes Sorensen
2015-10-08 21:03 ` Jes Sorensen
2015-10-10 4:17 ` Taehee Yoo
2015-08-30 16:49 ` [PATCH 0/1] rtl8xxxu (mac80211) driver for rtl8188[cr]u/rtl8192cu/rtl8723au Larry Finger
2015-08-30 18:45 ` Jes Sorensen
-- strict thread matches above, loose matches on Subject: below --
2015-08-30 21:02 [PATCH v2 " Jes.Sorensen
2015-08-30 21:02 ` [PATCH 1/1] New driver: rtl8xxxu (mac80211) Jes.Sorensen
2015-09-06 14:59 ` Kalle Valo
2015-09-06 17:06 ` Larry Finger
2015-09-07 1:41 ` Jes Sorensen
2015-09-07 1:40 ` Jes Sorensen
2015-09-07 13:20 ` Kalle Valo
2015-09-07 21:08 ` Jes Sorensen
2015-10-15 0:44 [PATCH v3 0/1] rtl8xxxu (mac80211) driver for rtl8188[cr]u/rtl8192cu/rtl8723au Jes.Sorensen
2015-10-15 0:44 ` [PATCH 1/1] New driver: rtl8xxxu (mac80211) Jes.Sorensen
2015-10-15 12:09 ` Bruno Randolf
2015-10-15 12:16 ` Jes Sorensen
2015-10-23 13:07 Xose Vazquez Perez
2015-10-23 14:00 ` Jes Sorensen
2015-10-23 16:09 ` Jes Sorensen
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=55E4EE6F.2010008@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=Jes.Sorensen@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/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).