Skip to contentSkip to conversation

new mt76 usb crashes on device removal

DISCUSSION Stanislaw Gruszka 2 participants 7 messages Oct 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

After

b11e19694dc9 "mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature"

I have new crashs when remove mt76x0u and mt76x2u devices. I can not provide calltrace because some other warning/traces show up instantly after the problem happen and mask prints for initall problem. Then the machine hungs.

Anyway bisection blame b11e19694dc9 commit and I confirm that problem not happen before this commit. I also applied the fix with I just posted, so this is diffrent issue.

Thanks
Stanislaw

#1 lore raw
Quoted 4 lines

After

b11e19694dc9 "mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature"

Quoted 8 lines

I have new crashs when remove mt76x0u and mt76x2u devices. I can not provide calltrace because some other warning/traces show up instantly after the problem happen and mask prints for initall problem. Then the machine hungs.

Anyway bisection blame b11e19694dc9 commit and I confirm that problem not happen before this commit. I also applied the fix with I just posted, so this is diffrent issue.

Hi Stanislaw,

I do not know if it is related or not, but could you please try following patch:

Regards,
Lorenzo

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +2 -2
@@ -179,11 +179,11 @@ static int mt76x0u_register_device(struct mt76x0_dev *dev)
 	struct ieee80211_hw *hw = dev->mt76.hw;
 	int err;
 
-	err = mt76u_mcu_init_rx(&dev->mt76);
+	err = mt76u_alloc_queues(&dev->mt76);
 	if (err < 0)
 		return err;
 
-	err = mt76u_alloc_queues(&dev->mt76);
+	err = mt76u_mcu_init_rx(&dev->mt76);
 	if (err < 0)
 		return err;
 
Quoted 3 lines

Thanks
Stanislaw

#2 lore raw
Quoted 25 lines · Lorenzo Bianconi
Quoted 4 lines

After

b11e19694dc9 "mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature"

Quoted 8 lines

I have new crashs when remove mt76x0u and mt76x2u devices. I can not provide calltrace because some other warning/traces show up instantly after the problem happen and mask prints for initall problem. Then the machine hungs.

Anyway bisection blame b11e19694dc9 commit and I confirm that problem not happen before this commit. I also applied the fix with I just posted, so this is diffrent issue.

Hi Stanislaw,

I do not know if it is related or not, but could you please try following patch:

Regards,
Lorenzo

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +0 -0
@@ -179,11 +179,11 @@ static int mt76x0u_register_device(struct mt76x0_dev *dev)
 	struct ieee80211_hw *hw = dev->mt76.hw;
 	int err;

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c static int mt76x0u_register_device(struct mt76x0_dev *dev) · line 188

Quoted 10 lines
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +2 -2
 
-	err = mt76u_mcu_init_rx(&dev->mt76);
+	err = mt76u_alloc_queues(&dev->mt76);
 	if (err < 0)
 		return err;
 
-	err = mt76u_alloc_queues(&dev->mt76);
+	err = mt76u_mcu_init_rx(&dev->mt76);
 	if (err < 0)
 		return err;

It still crashes. You can not reproduce the problem ?
It's 100% reproducible for me, when I unplug mt76x0u or mt76x2 device.

Thanks
Stanislaw

#3 lore raw
Quoted 32 lines · Stanislaw Gruszka
Quoted 31 lines · Lorenzo Bianconi
Quoted 4 lines

After

b11e19694dc9 "mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature"

Quoted 8 lines

I have new crashs when remove mt76x0u and mt76x2u devices. I can not provide calltrace because some other warning/traces show up instantly after the problem happen and mask prints for initall problem. Then the machine hungs.

Anyway bisection blame b11e19694dc9 commit and I confirm that problem not happen before this commit. I also applied the fix with I just posted, so this is diffrent issue.

Hi Stanislaw,

I do not know if it is related or not, but could you please try following patch:

Regards,
Lorenzo

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +1 -1
@@ -179,11 +179,11 @@ static int mt76x0u_register_device(struct mt76x0_dev *dev)
 	struct ieee80211_hw *hw = dev->mt76.hw;
 	int err;
 
-	err = mt76u_mcu_init_rx(&dev->mt76);
+	err = mt76u_alloc_queues(&dev->mt76);
 	if (err < 0)
 		return err;
 
Quoted 7 lines

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c static int mt76x0u_register_device(struct mt76x0_dev *dev) · line 188

Quoted 4 lines
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +1 -1
-	err = mt76u_alloc_queues(&dev->mt76);
+	err = mt76u_mcu_init_rx(&dev->mt76);
 	if (err < 0)
 		return err;

It still crashes. You can not reproduce the problem ?
It's 100% reproducible for me, when I unplug mt76x0u or mt76x2 device.

I think I get it, I will send you a series to test. Thanks

Regards,
Lorenzo

Quoted 3 lines

Thanks
Stanislaw

#4 lore raw
In reply to Stanislaw Gruszka
Quoted 32 lines · Lorenzo Bianconi
Quoted 31 lines
Quoted 4 lines

After

b11e19694dc9 "mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature"

Quoted 8 lines

I have new crashs when remove mt76x0u and mt76x2u devices. I can not provide calltrace because some other warning/traces show up instantly after the problem happen and mask prints for initall problem. Then the machine hungs.

Anyway bisection blame b11e19694dc9 commit and I confirm that problem not happen before this commit. I also applied the fix with I just posted, so this is diffrent issue.

Hi Stanislaw,

I do not know if it is related or not, but could you please try following patch:

Regards,
Lorenzo

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +1 -1
@@ -179,11 +179,11 @@ static int mt76x0u_register_device(struct mt76x0_dev *dev)
 	struct ieee80211_hw *hw = dev->mt76.hw;
 	int err;
 
-	err = mt76u_mcu_init_rx(&dev->mt76);
+	err = mt76u_alloc_queues(&dev->mt76);
 	if (err < 0)
 		return err;
 
Quoted 7 lines

drivers/net/wireless/mediatek/mt76/mt76x0/usb.c static int mt76x0u_register_device(struct mt76x0_dev *dev) · line 188

Quoted 4 lines
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +1 -1
-	err = mt76u_alloc_queues(&dev->mt76);
+	err = mt76u_mcu_init_rx(&dev->mt76);
 	if (err < 0)
 		return err;

It still crashes. You can not reproduce the problem ?
It's 100% reproducible for me, when I unplug mt76x0u or mt76x2 device.

Hi Stanislaw,

any news about the latest patchset I sent to fix that issue?

Regards,
Lorenzo

Quoted 3 lines

Thanks
Stanislaw

#5 lore raw
Quoted 6 lines · Lorenzo Bianconi
Quoted 2 lines

It still crashes. You can not reproduce the problem ?
It's 100% reproducible for me, when I unplug mt76x0u or mt76x2 device.

Hi Stanislaw,

any news about the latest patchset I sent to fix that issue?

It fixed the problem, I thought you tested that by yourself.

Regards
Stanislaw

#6 lore raw
Quoted 10 lines · Lorenzo Bianconi
Quoted 6 lines
Quoted 2 lines

It still crashes. You can not reproduce the problem ?
It's 100% reproducible for me, when I unplug mt76x0u or mt76x2 device.

Hi Stanislaw,

any news about the latest patchset I sent to fix that issue?

It fixed the problem, I thought you tested that by yourself.

Yes, I did. I would like to have even a confirmation from you. Thanks.

Regards,
Lorenzo

Quoted 3 lines

Regards
Stanislaw