mbox series

[RFC,0/4] mt76x0: phy/rf fixups for PCIe

Message ID 1538037450-18949-1-git-send-email-sgruszka@redhat.com (mailing list archive)
Headers show
Series mt76x0: phy/rf fixups for PCIe | expand

Message

Stanislaw Gruszka Sept. 27, 2018, 8:37 a.m. UTC
This is RFC for now, especially I'm interesting if patch 3 and 4
is direction we should go.

This is on top of Lorenzo github mt7610ev5 branch. 

Stanislaw Gruszka (4):
  mt76x0: print BBP version only for debug
  mt76x0: correct RF access via RF_CSR regiser.
  mt76: allow to identify bus
  mt76x0: correct RF reg pairs write for PCIe

 drivers/net/wireless/mediatek/mt76/mmio.c         |  1 +
 drivers/net/wireless/mediatek/mt76/mt76.h         |  9 ++++++++
 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c   | 27 ++++++++++++++++-------
 drivers/net/wireless/mediatek/mt76/mt76x02_regs.h |  4 ++--
 drivers/net/wireless/mediatek/mt76/usb.c          |  1 +
 5 files changed, 32 insertions(+), 10 deletions(-)

Comments

Felix Fietkau Sept. 27, 2018, 11:47 a.m. UTC | #1
On 2018-09-27 10:37, Stanislaw Gruszka wrote:
> This is RFC for now, especially I'm interesting if patch 3 and 4
> is direction we should go.
> 
> This is on top of Lorenzo github mt7610ev5 branch. 
Looks good to me.

Thanks,

- Felix
Lorenzo Bianconi Sept. 30, 2018, 7:11 p.m. UTC | #2
>
> On 2018-09-27 10:37, Stanislaw Gruszka wrote:
> > This is RFC for now, especially I'm interesting if patch 3 and 4
> > is direction we should go.
> >
> > This is on top of Lorenzo github mt7610ev5 branch.
> Looks good to me.
>
> Thanks,
>
> - Felix

Hi Stanislaw,

I tested this series and it works fine, so feel free to add my
'tested-by' when you submit the patchset.
I guess we should add a 'mt76_is_usb()' check in rf_rr()/rf_wr(),
agree? Something like:

@@ -111,7 +111,8 @@
 static int
 rf_wr(struct mt76x02_dev *dev, u32 offset, u8 val)
 {
-    if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mt76.state)) {
+    if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mt76.state) &&
+        mt76_is_usb(dev)) {
         struct mt76_reg_pair pair = {
             .reg = offset,
             .value = val,
@@ -129,7 +130,8 @@
     int ret;
     u32 val;

-    if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mt76.state)) {
+    if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mt76.state) &&
+        mt76_is_usb(dev)) {
         struct mt76_reg_pair pair = {
             .reg = offset,
         };


Regards,
Lorenzo