linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Sitnicki <jsitnicki@gmail.com>
To: Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: Larry.Finger@lwfinger.net, linux-wireless@vger.kernel.org
Subject: Re: [RFC 02/16] rtl8xxxu: Use REG_EFUSE_TEST register only on multifunctional devices
Date: Fri, 23 Oct 2015 07:45:24 +0200	[thread overview]
Message-ID: <87zizarvd7.fsf@frog.home> (raw)
In-Reply-To: <wrfj37x5xcln.fsf@redhat.com>

On Wed, Oct 21, 2015 at 02:57 AM CEST, Jes Sorensen <Jes.Sorensen@redhat.com> wrote:
> Jakub Sitnicki <jsitnicki@gmail.com> writes:
>> rtl8192cu driver doesn't read/write the REG_EFUSE_TEST register.
>> Neither does the rtl8188eu driver.  Do it only for RTL8192CU-based
>> devices.
>>
>> Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
>> ---
>>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 9 ++++++---
>>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 +
>>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> This looks a reasonable change - I verified the 8723BU does this as
> well, but 8192EU doesn't.
>
> I did modify you commit message slightly since it said "Do it only for
> RTL8192CU-based devices" and I am sure you meant 8723AU (and now
> 8723BU).
>
> If you dislike the change to the message, let me know and I'll pull the
> patch or change it.

You're right.  It should say "RTL8723AU-based devices".  Must have had a
brain-fart there.  Thanks for fixing the message.

-Jakub

>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
>> index 5f90261..a8d7e0a 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
>> @@ -1704,6 +1704,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
>>  			priv->has_bluetooth = 1;
>>  		if (val32 & MULTI_GPS_FUNC_EN)
>>  			priv->has_gps = 1;
>> +		priv->is_multi_func = 1;
>>  	} else if (val32 & SYS_CFG_TYPE_ID) {
>>  		bonding = rtl8xxxu_read32(priv, REG_HPON_FSM);
>>  		bonding &= HPON_FSM_BONDING_MASK;
>> @@ -1934,9 +1935,11 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv)
>>  	if (val8 & EEPROM_BOOT)
>>  		priv->boot_eeprom = 1;
>>  
>> -	val32 = rtl8xxxu_read32(priv, REG_EFUSE_TEST);
>> -	val32 = (val32 & ~EFUSE_SELECT_MASK) | EFUSE_WIFI_SELECT;
>> -	rtl8xxxu_write32(priv, REG_EFUSE_TEST, val32);
>> +	if (priv->is_multi_func) {
>> +		val32 = rtl8xxxu_read32(priv, REG_EFUSE_TEST);
>> +		val32 = (val32 & ~EFUSE_SELECT_MASK) | EFUSE_WIFI_SELECT;
>> +		rtl8xxxu_write32(priv, REG_EFUSE_TEST, val32);
>> +	}
>>  
>>  	dev_dbg(dev, "Booting from %s\n",
>>  		priv->boot_eeprom ? "EEPROM" : "EFUSE");
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> index f2a1bac..622e6f5 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> @@ -597,6 +597,7 @@ struct rtl8xxxu_priv {
>>  	struct rtl8723au_idx ht20_max_power_offset[3];
>>  	u32 chip_cut:4;
>>  	u32 rom_rev:4;
>> +	u32 is_multi_func:1;
>>  	u32 has_wifi:1;
>>  	u32 has_bluetooth:1;
>>  	u32 enable_bluetooth:1;

  reply	other threads:[~2015-10-23  5:45 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20  6:45 [RFC 00/16] rtl8xxxu: eFUSE parsing for RTL8188EU chips Jakub Sitnicki
2015-10-20  6:45 ` [RFC 01/16] rtl8xxxu: Treat REG_9346CR as an 8-bit wide register Jakub Sitnicki
2015-10-21  0:29   ` Jes Sorensen
2015-10-23  5:38     ` Jakub Sitnicki
2015-10-20  6:45 ` [RFC 02/16] rtl8xxxu: Use REG_EFUSE_TEST register only on multifunctional devices Jakub Sitnicki
2015-10-21  0:57   ` Jes Sorensen
2015-10-23  5:45     ` Jakub Sitnicki [this message]
2015-10-20  6:45 ` [RFC 03/16] rtl8xxxu: Don't check for illegal offset when reading from efuse Jakub Sitnicki
2015-10-21  1:07   ` Jes Sorensen
2015-10-20  6:45 ` [RFC 04/16] rtl8xxxu: Skip disabled efuse words early Jakub Sitnicki
2015-10-21  1:09   ` Jes Sorensen
2015-10-20  6:45 ` [RFC 05/16] rtl8xxxu: Unbreak a user-visible string Jakub Sitnicki
2015-10-21  1:46   ` Jes Sorensen
2015-10-23  5:54     ` Jakub Sitnicki
2015-10-23 15:38       ` Jes Sorensen
2015-10-20  6:45 ` [RFC 06/16] rtl8xxxu: rtl8723au: Introduce a pointer to efuse Jakub Sitnicki
2015-10-21  1:52   ` Jes Sorensen
2015-10-20  6:45 ` [RFC 07/16] rtl8xxxu: rtl8192cu: " Jakub Sitnicki
2015-10-20  6:45 ` [RFC 08/16] rtl8xxxu: Extract TX power fields from struct rtl8xxu_priv Jakub Sitnicki
2015-10-21  1:58   ` Jes Sorensen
2015-10-23 21:16     ` Jakub Sitnicki
2015-10-26 17:40       ` Jes Sorensen
2015-10-20  6:45 ` [RFC 09/16] rtl8xxxu: Rename struct struct rtl8723au_tx_power fields Jakub Sitnicki
2015-10-20  6:45 ` [RFC 10/16] rtl8xxxu: Rename struct rtl8723au_idx Jakub Sitnicki
2015-10-21  2:00   ` Jes Sorensen
2015-10-20  6:45 ` [RFC 11/16] rtl8xxxu: Make efuse content length a parameter Jakub Sitnicki
2015-10-21  2:01   ` Jes Sorensen
2015-10-20  6:45 ` [RFC 12/16] rtl8xxxu: Prepare to have more than one kind of struct *_tx_power Jakub Sitnicki
2015-10-20  6:45 ` [RFC 13/16] rtl8xxxu: Make set_tx_power a chip-type-dependent operation Jakub Sitnicki
2015-10-21  2:07   ` Jes Sorensen
2015-10-23 21:17     ` Jakub Sitnicki
2015-10-20  6:45 ` [RFC 14/16] rtl8xxxu: Introduce a device agnostic constant for efuse map length Jakub Sitnicki
2015-10-21  2:03   ` Jes Sorensen
2015-10-20  6:45 ` [RFC 15/16] rtl8xxxu: rtl8188eu: Add stubbed fileops and chip-specific constants Jakub Sitnicki
2015-10-20  6:45 ` [RFC 16/16] rtl8xxxu: rtl8188eu: Implement parse_efuse() Jakub Sitnicki
2015-10-21  2:15   ` Jes Sorensen
2015-10-23 21:52     ` Jakub Sitnicki
2015-10-26 17:45       ` Jes Sorensen
2015-11-02  8:21         ` [PATCH] rtl8xxxu: rtl8192eu: Map out EFUSE TX power area Jakub Sitnicki
2015-11-10 21:57           ` Jes Sorensen
2015-10-21  0:29 ` [RFC 00/16] rtl8xxxu: eFUSE parsing for RTL8188EU chips Jes Sorensen
2015-10-23  5:24   ` Jakub Sitnicki

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=87zizarvd7.fsf@frog.home \
    --to=jsitnicki@gmail.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --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).