Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: ar71xx remove packages from archer-c7-v1 #1349

Closed
wants to merge 1 commit into from

Conversation

a-mcintosh
Copy link
Contributor

removed ath10k because the 5 GHz hardware,
QCA9880-AR1A, is unsupported and boot loops
kmod-ath10k ath10k-firmware-qca988x
5 GHz radio decommissioned, but router works.

Signed-off-by: Aubrey McIntosh, PhD aubrey.mcintosh@utexas.edu

  removed ath10k because the 5 GHz hardware,
  QCA9880-AR1A, is unsupported and boot loops
  kmod-ath10k ath10k-firmware-qca988x
  5 GHz radio decommissioned, but router works.

Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
@chunkeey
Copy link
Member

chunkeey commented Sep 4, 2018

FS#1743

The real bug still lurks in ath10k though. I remember that it would just refuse to load due to the unsupported chip. Now, it crashes because it shares the same board-id with the C7 v2.

@neheb
Copy link
Contributor

neheb commented Sep 6, 2018

There was a discussion on IRC about this. The consensus was that Qualcomm killed support for it since the hardware was defective in some or several ways.

@dedeckeh dedeckeh added the target/ar71xx pull request/issue for ar71xx target label Sep 6, 2018
@chunkeey
Copy link
Member

chunkeey commented Sep 6, 2018

@neheb (and irc? is there a log of that discussion somewhere?)

The Archer C7 V1(.1) has a minipcie slot! So changing out the original QCA9880-AR1A and replacing it with a wle900vx or a unex card, etc. is easily possible on the V1. The C7 V2 did away with the minipcie slot and has the QCA9880 soldered on.

The problem now is, that even if the card is replaced by a supported QCA9880-2R4E or QCA9880-BR4A based card, "this" Archer C7 v1 image will still happily crash in the very same way.

And this is because of the 11-ath10k-caldata extraction script:

https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata#L143

The Archer C7 V1 does not have a caldata there, instead the area is filled with 0xff... And this is what's crashing ath10k, since it gets fed that 0xff... through the ath10k/cal-pci-0000:01:00.0.bin file.

This can easily tested too: just remove the /etc/hotplug.d/firmware/11-ath10k-caldata file from the C7 V1 image. And ath10k will no longer crash for QCA9880-AR1A cards (instead it will say that it is not supported) and for users that have a QCA9880-2R4E or QCA9880-BR4A card, ath10k will work as expected.

@neheb
Copy link
Contributor

neheb commented Sep 6, 2018

Ah interesting. I didn't know it was crashing because of that.

Anyway, the V2 and V3 also have a minipcie slot (I have both, completely identical hardware).

I keep IRC logs. I can post if you want.

@chunkeey
Copy link
Member

chunkeey commented Sep 6, 2018

Anyway, the V2 and V3 also have a minipcie slot (I have both, completely identical hardware).

Oh Ok, thanks. Yes I'm wrong, the pictures I found for the V2 and V3 confirmed that they had the minipcie slot too.

I keep IRC logs. I can post if you want.

Yes please. I've posted the ART hexdump on debian's paste for my C7 V1.
https://paste.debian.net/1041019/ (it's all 0xff from 0x1440 - 0xffff. This includes the supposedly present caldata at 20480/0x5000)

@neheb
Copy link
Contributor

neheb commented Sep 7, 2018

@chunkeey https://gist.github.com/neheb/4ce7af482800a5c89cced9860be38945

@danielg4
Copy link
Contributor

danielg4 commented Sep 9, 2018

BTW, that IRC discussion was specifically in reference to this PR.

@neheb
Copy link
Contributor

neheb commented Sep 18, 2018

In any case, ACK.

If someone with an Archer C7v1 replaces the miniPCIe card, they can install the appropriate driver. This PR is for image defaults.

@chunkeey
Copy link
Member

@neheb

If someone with an Archer C7v1 replaces the miniPCIe card, they can install the appropriate driver. This PR is for image defaults.

Ok, I'll try it again.

If the card has been the unsupported QCA9880v1 has been replaced with a QCA9880v2 and installed the kmod-ath10k package, they will see the same panic.

In fact, you can test this too with your C7v2 (I think most QCA988X will do, However please keep a serial cable ready! Because you could get locked-out).

Just run the following on your C7v2:

# dd if=/dev/zero ibs=2116 count=1 | tr "\000" "\377" > /lib/firmware/ath10k/cal-pci-0000:00:00.0.bin

and reload ath10k_pci and watch it panic.

@neheb
Copy link
Contributor

neheb commented Sep 19, 2018

That is indeed a problem. My thinking is that useless packages should not be included by default.

@chunkeey
Copy link
Member

My thinking is that useless packages should not be included by default.

That's 100% true.

If someone with an Archer C7v1 replaces the miniPCIe card, they can install the appropriate driver. This PR is for image defaults.

that one does not work, if the replacement card is a QCA9880v2/QCA9880-2R4E/QCA9880-BR4A though.

@a-mcintosh
Copy link
Contributor Author

a-mcintosh commented Sep 19, 2018 via email

@hauke hauke added the release/18.06 pull request/issue targeted (also) for OpenWrt 18.06 release label Oct 7, 2018
@ynezz
Copy link
Member

ynezz commented Mar 20, 2019

Can we come to some conclusion? :-) My view is, that we should accept this PR as it is, if we can't come up with some better fix/solution like the one suggested by @greearb on that IRC

< greearb> for v1, I'd suggest hacking the ath10k/pci.c to cause it to not even try to load that chipset. Maybe that AP has a 2.4 radio that can work at least?

For the record, download stats for c7-v1 images:

/releases/18.06.2/targets/ar71xx/generic/openwrt-18.06.2-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 171
/releases/18.06.2/targets/ar71xx/generic/openwrt-18.06.2-ar71xx-generic-archer-c7-v1-squashfs-sysupgrade.bin 94
/releases/18.06.1/targets/ar71xx/generic/openwrt-18.06.1-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 31
/snapshots/targets/ath79/generic/openwrt-ath79-generic-tplink_archer-c7-v1-squashfs-factory.bin 30
/releases/18.06.1/targets/ar71xx/generic/openwrt-18.06.1-ar71xx-generic-archer-c7-v1-squashfs-sysupgrade.bin 29
/snapshots/targets/ar71xx/generic/openwrt-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 24
/snapshots/targets/ar71xx/generic/openwrt-ar71xx-generic-archer-c7-v1-squashfs-sysupgrade.bin 22
/releases/17.01.6/targets/ar71xx/generic/lede-17.01.6-ar71xx-generic-archer-c7-v1-squashfs-sysupgrade.bin 20
/snapshots/targets/ath79/generic/openwrt-ath79-generic-tplink_archer-c7-v1-squashfs-sysupgrade.bin 20
/releases/18.06.0/targets/ar71xx/generic/openwrt-18.06.0-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 20
/releases/17.01.6/targets/ar71xx/generic/lede-17.01.6-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 19
/releases/17.01.5/targets/ar71xx/generic/lede-17.01.5-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 19
/releases/18.06.0/targets/ar71xx/generic/openwrt-18.06.0-ar71xx-generic-archer-c7-v1-squashfs-sysupgrade.bin 18
/releases/17.01.5/targets/ar71xx/generic/lede-17.01.5-ar71xx-generic-archer-c7-v1-squashfs-sysupgrade.bin 17
/snapshots/targets/ath79/generic/openwrt-ath79-generic-tplink_archer-c7-v1-initramfs-kernel.bin 14
/releases/18.06.0-rc2/targets/ar71xx/generic/openwrt-18.06.0-rc2-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 11
/releases/18.06.0-rc1/targets/ar71xx/generic/openwrt-18.06.0-rc1-ar71xx-generic-archer-c7-v1-squashfs-factory.bin 10

@neheb
Copy link
Contributor

neheb commented Mar 20, 2019

This PR looks correct. If ath10k does not work, space should not be increased needlessly.

@ynezz
Copy link
Member

ynezz commented Mar 20, 2019

space should not be increased needlessly.

If I understand it correctly, space isn't issue, the issue is crashing kernel, reboot loop.

@neheb
Copy link
Contributor

neheb commented Mar 20, 2019

right. Both size and crashing are problems.

@danielg4
Copy link
Contributor

There have been reports as recently as this month that 18.06.2 does a bootloop.

@chunkeey
Copy link
Member

Can we come to some conclusion? :-) My view is, that we should accept this PR as it is, if we can't come up with some better fix/solution like the one suggested by @greearb on that IRC

Yes you can if you want. To stop the crashes when ath10k_pci is loaded (in this case bootloop) requires to revert this upstream change:

commit 1a7fecb766c83dace747f42b25bbb544b00a0163
Author: Michal Kazior <michal.kazior@tieto.com>
Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

But since the QCA9880-AR1A is technically no longer supported by the ath10k driver that patch can't be undone in upstream because of that. What's more, the patch already there survived multiple takedowns, so this would need to be done locally in OpenWrt's ath10k-ct and ath10k and I can't see anyone doing that (or come up with another patch) since Michal is no longer working there.

(The null caldata is only a problem if the user replaced the QCA9880. However, It should no longer crash as bad, so at least something got fixed 👍 )

ynezz pushed a commit to ynezz/openwrt that referenced this pull request Mar 20, 2019
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
ynezz pushed a commit to ynezz/openwrt that referenced this pull request Mar 20, 2019
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
@ynezz
Copy link
Member

ynezz commented Mar 20, 2019

So I'm going to push this fix ynezz@c531735 to master later today, once the updated snapshot images are built and ready for testing, I'll ask on FS#1743 for some Tested-by: and then push this fix
ynezz@2d6e8ec to openwrt-18.06 branch.

Thank you all.

@ynezz ynezz closed this Mar 20, 2019
jow- pushed a commit to lede-project/source that referenced this pull request Mar 21, 2019
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt/openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
hingbong pushed a commit to hingbong/openwrt-r7800 that referenced this pull request Mar 22, 2019
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt/openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
@psyborg55
Copy link
Contributor

so much wrong informations provided here that i can't afford time to reply to everbody. i'd provide patch to ath10k list but it won't be included in next final release since drivers won't get updated. a rather simple change to keep the driver building without bootloop is to move chip reset after chip supported check so it doesn't crash with AR1A and works if other card is put in mpcie slot.

jollaman999 pushed a commit to jollaman999/openwrt that referenced this pull request Mar 23, 2019
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt/openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
@ynezz
Copy link
Member

ynezz commented Apr 5, 2019

FYI snapshot images are ready for testing

Ping. This is last reminder, I'm removing this from my TODO list.

jow- pushed a commit that referenced this pull request Apr 11, 2019
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. #1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Reviewed-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
TiffanyKalin-untangle pushed a commit to TiffanyKalin-untangle/openwrt that referenced this pull request Oct 20, 2020
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Reviewed-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
TiffanyKalin-untangle pushed a commit to TiffanyKalin-untangle/openwrt that referenced this pull request Oct 21, 2020
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Reviewed-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
ArtelMike pushed a commit to ArtelMike/openwrt-1 that referenced this pull request Jan 31, 2023
ath10k_pci driver crashes once loaded and causes boot loops on this
device as 5GHz radio QCA9880-AR1A shipped with this router is broken.
It's not possible to fix this problem in software, miniPCIe radio has to
be replaced.

We could've probably fixed crashing of the ath10k driver by reverting
following upstream commit:

 commit 1a7fecb766c83dace747f42b25bbb544b00a0163
 Author: Michal Kazior <michal.kazior@tieto.com>
 Date:   Sat Jan 24 12:14:48 2015 +0200

    ath10k: reset chip before reading chip_id in probe

but it's not worth the effort as it wouldn't make that 5GHz radio usable
anyway. So it seems more convenient to just remove the crashing driver
and provide bootable images, as I believe, that a router that is working
but degraded is better than a router that will not work.

For details please see discussions in PR[1] and in FS#1743[2].

1. openwrt#1349
2. https://bugs.openwrt.org/index.php?do=details&task_id=1743

Reviewed-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Aubrey McIntosh, PhD <aubrey.mcintosh@utexas.edu>
[subject and commit message tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/18.06 pull request/issue targeted (also) for OpenWrt 18.06 release target/ar71xx pull request/issue for ar71xx target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants