Wireless 168c:001c with ath5k on Acer Aspire One AOA150 download checksum fails

Bug #1137513 reported by Roman Yepishev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Hello,

This looks like a return of bug 610078. Generating a file full of "1234567890\n" on the server side and downloading the file via the wireless interface on Acer Aspire One AOA150 creates the file of the same size but with different content. The changed lines are (lineno:text format):

493694:120
493767:123456
1648014:12345234567890
1648075:127890
2869994:12345678967890
2870032:123890
2999919:12345678907890
3000051:127890
4595615:12345678907890
4595747:127890
11395687:120
11395783:12345678934567890
12702046:12345234567890
12702122:12345�-890
12702153:12345678234567890

The file is 9448764 bytes long. At some point parts of previous packet happen to be seen again, overwriting the real contents. This causes problems with downloading updates and general browsing on this device.

For some reason L0s and L1 are enabled even though pci.c has an instruction to disable L0S:
    pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);

$ sudo lspci -vvv:
03:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
        Subsystem: Foxconn International, Inc. Device e008
...
        Capabilities: [60] Express (v1) Legacy Endpoint, MSI 00
...
                LnkCtl: ASPM L0s L1 Enabled; RCB 128 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
...

WORKAROUND:
Figure out the root complex and required value for the register and set the register value according to http://wireless.kernel.org/en/users/Documentation/ASPM

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: linux-image-3.8.0-8-generic 3.8.0-8.17
ProcVersionSignature: Ubuntu 3.8.0-8.17-generic 3.8.0
Uname: Linux 3.8.0-8-generic i686
ApportVersion: 2.8-0ubuntu4
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: rtg 2367 F.... xfce4-volumed
                      rtg 2418 F.... pulseaudio
Date: Fri Mar 1 12:28:30 2013
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=4bc51c1d-e44d-4884-8456-c72060eef37d
InstallationDate: Installed on 2012-03-13 (352 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120313)
MachineType: Acer AOA150
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-8-generic root=UUID=649abb9a-71d2-43a3-96af-823ddd1b3f0b ro quiet splash elevator=noop vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.8.0-8-generic N/A
 linux-backports-modules-3.8.0-8-generic N/A
 linux-firmware 1.103
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: Upgraded to raring on 2013-01-22 (37 days ago)
dmi.bios.date: 10/06/2008
dmi.bios.vendor: Acer
dmi.bios.version: v0.3310
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.vendor: Acer
dmi.board.version: Base Board Version
dmi.chassis.type: 1
dmi.chassis.vendor: Chassis Manufacturer
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAcer:bvrv0.3310:bd10/06/2008:svnAcer:pnAOA150:pvr1:rvnAcer:rn:rvrBaseBoardVersion:cvnChassisManufacturer:ct1:cvrChassisVersion:
dmi.product.name: AOA150
dmi.product.version: 1
dmi.sys.vendor: Acer

Revision history for this message
Roman Yepishev (rye) wrote :
Roman Yepishev (rye)
description: updated
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Roman Yepishev (rye)
description: updated
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.8 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9-rc1-raring/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Roman Yepishev (rye) wrote :

Tested 3.8.2-030802-generic (i386 version, this Atom CPU does not support x86_64) and transfers are broken too.

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → New
Roman Yepishev (rye)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Was there a prior Raring kernel that did not exhibit this bug?

Revision history for this message
Roman Yepishev (rye) wrote :

Just to test that it used to work properly I booted the 12.10 i386 livecd and got the following:

03:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) [168c:001c] (rev 01)
        Subsystem: Foxconn International, Inc. Device [105b:e008]
        ...
        Capabilities: [60] Express (v1) Legacy Endpoint, MSI 00
                ...
                LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [90] MSI-X: Enable- Count=1 Masked-
        Kernel driver in use: ath5k
        Kernel modules: ath5k

Will test older raring kernels now.

Revision history for this message
Roman Yepishev (rye) wrote :

Ok, I've tested the mainline kernels in the PPA and the last kernel that had ASPM disabled for my card was 3.7.10 201302271235.

3.8.0-1-generic is where ASPM became enabled for this card.

Revision history for this message
Roman Yepishev (rye) wrote :

I failed to download the 3.8 mainline kernels so (instead got the Ubuntu ones already installed on that machine), re-testing 3.8 ones.

Revision history for this message
Roman Yepishev (rye) wrote :

Ok, the first time ASPM became enabled for ath5k device was v3.8-rc1.

This looks somehow related - https://patchwork.kernel.org/patch/1843061/ - will patch the kernel using https://patchwork.kernel.org/patch/1843081/ as a reference.

Revision history for this message
Roman Yepishev (rye) wrote :

Running pcie_capability_clear_word with PCI_EXP_LNKCTL_ASPM_L0S|PCI_EXP_LNKCTL_ASPM_L1 indeed makes the link ASPM state switch to disabled, however as I see there is more than one call of pci_disable_link_state. If it does not work with ath5k then link control is supposedly broken for r8169, intel e1000 and some other drivers.

However, this bit from e1000 is interesting:
#ifdef CONFIG_PCIEASPM
static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
{
        pci_disable_link_state_locked(pdev, state);
}
#else
static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
{
  ...
  do magic with pcie_capability_clear_word
  ...
}
#endif

CONFIG_PCIEASPM=y in 3.8.0-12-generic

I will test r8169 PCI-X device shortly to see whether it is also affected.

Revision history for this message
Roman Yepishev (rye) wrote :

r8169 test is not representative since BIOS is the system that may disable ASPM as well. In my case PCI-X r8169 had link control disabled on both 3.5 and 3.8 kernels.

Revision history for this message
Roman Yepishev (rye) wrote :

Found the offending commit after which LinkCtl became ASPM L0s L1 Enabled for ath5k devices:

commit 8c33f51df406e1a1f7fa4e9b244845b7ebd61fa6
Author: Taku Izumi <email address hidden>
Date: Tue Oct 30 15:27:13 2012 +0900

    PCI/ACPI: Request _OSC control before scanning PCI root bus

    This patch moves up the code block to request _OSC control in order to
    separate ACPI work and PCI work in acpi_pci_root_add().

    Signed-off-by: Taku Izumi <email address hidden>
    Signed-off-by: Bjorn Helgaas <email address hidden>

Filed a bug in kernel Bugzilla, https://bugzilla.kernel.org/show_bug.cgi?id=13892

Revision history for this message
Roman Yepishev (rye) wrote :
Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Changed in linux:
status: Confirmed → Fix Released
Revision history for this message
Luis Henriques (henrix) wrote :

The commit refered in comment #12 has already been reverted in raring kernel (since 3.8.0-19.29), so I'm changing this bug to 'Fix Released'.

Changed in linux (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.