Smart Card Reader BCM 5880 doesn't work with outdated firmware

Bug #1579918 reported by Karl Hill
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Native to Ubuntu 14.04 and 16.04 (kernel 4.2.0) on Dell Precision 7510 with Broadcom 5880 (internal card reader). Card reads successfully from SCRx31 USB reader (external). Card also works on kernel 3.13.0 (Dell Latitude E6430, 14.04) with same Broadcom 5880 reader.

snippet from syslog:

May 1 19:06:41 m-Precision pcscd: eventhandler.c:313:EHStatusHandlerThread() Error communicating to: Broadcom Corp 5880 [Contacted SmartCard] (0123456789ABCD) 00 00
May 1 19:06:46 m-Precision kernel: [15276.197331] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
May 1 19:06:46 m-Precision kernel: [15276.426405] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
May 1 19:06:46 m-Precision kernel: [15276.442649] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
May 1 19:06:46 m-Precision kernel: [15276.465888] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
May 1 19:06:46 m-Precision pcscd: commands.c:1456:CCID_Receive() Can't read all data (54 out of 92 expected)
May 1 19:06:46 m-Precision pcscd: openct/proto-t1.c:214:t1_transceive() fatal: transmit/receive failed
May 1 19:06:46 m-Precision pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
May 1 19:06:46 m-Precision pcscd: winscard.c:1612:SCardTransmit() Card not transacted: 0x80100016
May 1 19:06:46 m-Precision pcscd: openct/proto-t1.c:170:t1_transceive() T=1 state machine is DEAD. Reset the card first.
May 1 19:06:46 m-Precision pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
May 1 19:06:46 m-Precision pcscd: winscard.c:1612:SCardTransmit() Card not transacted: 0x80100016
May 1 19:06:46 m-Precision pcscd: openct/proto-t1.c:170:t1_transceive() T=1 state machine is DEAD. Reset the card first.
May 1 19:06:46 m-Precision pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
May 1 19:06:46 m-Precision pcscd: winscard.c:1612:SCardTransmit() Card not transacted: 0x80100016
May 1 19:06:46 m-Precision pcscd: openct/proto-t1.c:170:t1_transceive() T=1 state machine is DEAD. Reset the card first.
May 1 19:06:46 m-Precision pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
May 1 19:06:46 m-Precision pcscd: winscard.c:1612:SCardTransmit() Card not transacted: 0x80100016
May 1 19:06:46 m-Precision pcscd: openct/proto-t1.c:170:t1_transceive() T=1 state machine is DEAD. Reset the card first.
May 1 19:06:46 m-Precision pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
May 1 19:06:46 m-Precision pcscd: winscard.c:1612:SCardTransmit() Card not transacted: 0x80100016
May 1 19:06:47 m-Precision pcscd: ccid_usb.c:790:ReadUSB() read failed (1/2): -8 Resource temporarily unavailable
May 1 19:06:47 m-Precision pcscd: ifdwrapper.c:348:IFDStatusICC() Card not transacted: 612
May 1 19:06:47 m-Precision pcscd: eventhandler.c:313:EHStatusHandlerThread() Error communicating to: Broadcom Corp 5880 [Contacted SmartCard] (0123456789ABCD) 00 00
May 1 19:06:52 m-Precision kernel: [15281.960976] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?

The above cycles on syslog roughly every second until card is removed.

pcsc_scan shows card as alternating between successfully read to card reader not available, also on the roughly 1 sec interval.

---
ApportVersion: 2.14.1-0ubuntu3.20
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: grumpy 2207 F.... pulseaudio
CurrentDesktop: Unity
DistroRelease: Ubuntu 14.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-05-21 (0 days ago)
InstallationMedia: Ubuntu 14.04.4 LTS "Trusty Tahr" - Release amd64 (20160217.1)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 003: ID 1bcf:28b8 Sunplus Innovation Technology Inc.
 Bus 001 Device 002: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. Precision 7510
Package: linux (not installed)
ProcFB:
 0 inteldrmfb
 1 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.2.0-36-generic.efi.signed root=UUID=62ed5a52-92de-456c-8a4b-433666572702 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 4.2.0-36.42~14.04.1-generic 4.2.8-ckt8
RelatedPackageVersions:
 linux-restricted-modules-4.2.0-36-generic N/A
 linux-backports-modules-4.2.0-36-generic N/A
 linux-firmware 1.127.22
Tags: trusty
Uname: Linux 4.2.0-36-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 04/28/2016
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.4.14
dmi.board.name: 0RJHDG
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.4.14:bd04/28/2016:svnDellInc.:pnPrecision7510:pvr:rvnDellInc.:rn0RJHDG:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.name: Precision 7510
dmi.sys.vendor: Dell Inc.

Revision history for this message
penalvch (penalvch) wrote :

Karl Hill, thank you for reporting this and helping make Ubuntu better.

Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1579918

affects: linux-lts-wily (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Karl Hill (karl-hill) wrote : JournalErrors.txt

apport information

tags: added: apport-collected xenial
description: updated
Revision history for this message
Karl Hill (karl-hill) wrote : ProcEnviron.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : AlsaInfo.txt

apport information

description: updated
Revision history for this message
Karl Hill (karl-hill) wrote : BootDmesg.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : CRDA.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : IwConfig.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : Lspci.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : ProcEnviron.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : ProcModules.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : PulseList.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : RfKill.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : UdevDb.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : UdevLog.txt

apport information

Revision history for this message
Karl Hill (karl-hill) wrote : WifiSyslog.txt

apport information

Revision history for this message
penalvch (penalvch) wrote : Re: Smart Card Reader BCM 5880 with kernel 4.2

Karl Hill, in order to allow additional upstream developers to examine the issue, at your earliest convenience, could you please test the latest upstream kernel available from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D ? Please keep in mind the following:
1) The one to test is at the very top line at the top of the page (not the daily folder).
2) The release names are irrelevant.
3) The folder time stamps aren't indicative of when the kernel actually was released upstream.
4) Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds .

If testing on your main install would be inconvenient, one may:
1) Install Ubuntu to a different partition and then test this there.
2) Backup, or clone the primary install.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the report description:
kernel-fixed-upstream
kernel-fixed-upstream-X.Y-rcZ

Where X, and Y are the first two numbers of the kernel version, and Z is the release candidate number if it exists.

If the mainline kernel does not fix the issue, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-X.Y-rcZ

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Also, you don't need to apport-collect further unless specifically requested to do so.

Once testing of the latest upstream kernel is complete, please mark this report Status Confirmed. Please let us know your results.

Thank you for your understanding.

description: updated
tags: added: latest-bios-1.4.14
Changed in linux (Ubuntu):
importance: Low → Medium
Revision history for this message
Karl Hill (karl-hill) wrote :

Above was the results of apport-collect for both 16.04 (kernel 4.2) and 14.04 (kernel 4.2)

installed /~kernel-ppa/mainline/v4.6-yakkety

g-Precision-7510:~$ uname -a
Linux g-Precision-7510 4.6.0-040600-generic #201605151930 SMP Sun May 15 23:32:59 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

the pcsc errors have disappeared, however the xhc error remain

dmesg snippet

[ 254.902220] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
[ 255.128099] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
[ 255.144777] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
[ 255.168487] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?
[ 261.308501] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 1 ep 4 with no TDs queued?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Karl Hill (karl-hill)
tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-4.6.0
Revision history for this message
penalvch (penalvch) wrote :

Karl Hill, to clarify, do you have a functionality issue when using the card in Ubuntu 16.04 or while using the 4.6 kernel?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Karl Hill (karl-hill) wrote :

In short, yes.

Internal BCM5880:
16.04 kernels 4.2, 4.4, 4.6 do not work (xhci_hcd error)
14.04 kernel 4.2 does not work

only 14.04 kernel 3.13 works

However, on all above versions, external USB SCRx31 card reader functions normally. I add this to show the OS software and the middleware work for card reading (same card, same middleware), it seems to me to be kernel related in regards to the BCM5880 internal card reader starting with kernel 4.2

Revision history for this message
penalvch (penalvch) wrote :

Karl Hill, the next step is to fully commit bisect from kernel 3.13 to 4.2 in order to identify the last good kernel commit, followed immediately by the first bad one. This will allow for a more expedited analysis of the root cause of your issue. Could you please do this following https://wiki.ubuntu.com/Kernel/KernelBisection ?

Please note, finding adjacent kernel versions is not fully commit bisecting.

After the offending commit (not kernel version) has been identified, then please mark this report Status Confirmed.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

tags: added: kernel-bug-exists-upstream-4.6 needs-bisect regression-release
removed: kernel-bug-exists-upstream-4.6.0
Revision history for this message
Karl Hill (karl-hill) wrote :

Before I went down the bisection road, I did something I probably should have done a while ago...I tested the 14.04 4.2 kernel build on the "good" computer (Latitude 6430 running 14.04 kernel 3.13), and it worked....full details: booted live image from usb, added all trusty sources, ran steps from http://www.vleeuwen.net/2015/05/install-safenet-etoken-pro-on-ubuntu-14-04-lts, tested and worked fine. Did exact same steps on "bad" computer (Precision 7510) and got the error.

So, I have to assume that its a hardware issue between the Dell Latitude E6430 and the Dell Precision 7510.

Thanks for the help and keep up the great work, and if you have any pointers on Dell hardware, I'd love to hear them.

Revision history for this message
Karl Hill (karl-hill) wrote :

So for anyone who was following, the answer from Dell (and huge shout out to Steven from the Linux team there at Dell who called me direct)

Skylake is the problem, existing drivers no longer work with the new chipset. Drivers are being re-written and its a work in progress.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Garrett Warnell (warnellg-t) wrote :

This bug also affects me. Machine that "works" is a Dell Precision M6800 with BCM5880 smart card reader. Machine that doesn't "work" is Dell Precision 7710 with same reader. Same kernel version (4.4), same middleware, but the 7710 can't read the certificates from an inserted smart card.

The relevant difference appears to be that the M6800 has a Broadwell processor while the 7710 has Skylake.

information type: Public → Public Security
Changed in linux (Ubuntu):
status: Expired → Confirmed
information type: Public Security → Private Security
Revision history for this message
Seth Arnold (seth-arnold) wrote : Bug is not a security issue

Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.

information type: Private Security → Public
Revision history for this message
penalvch (penalvch) wrote : Re: Smart Card Reader BCM 5880 with kernel 4.2

Garrett Warnell (warnellg-t), it will help immensely if you filed a new report with the Ubuntu repository kernel (not mainline/upstream) via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Karl Hill (karl-hill) wrote :

In case anybody finds this via search, Dell put out a firmware patch (Windows only right now) that upgrades the chip.

https://ludovicrousseau.blogspot.com/2016/08/broadcom-ccid-readers.html

http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=JP80V&fileId=3559873652&osCode=W764&productCode=latitude-e5570-laptop&languageCode=en&categoryId=SY

Basically, if you can upgrade the firmware and ccid versions, the card reader should work (of course, it takes booting into windows to updgrade the firmware, so....)

https://cloudnull.io/2017/07/x1-firmware-without-windows/ may help, YMMV

Revision history for this message
penalvch (penalvch) wrote :

Karl Hill, regarding your comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1579918/comments/32 did you update the firmware with your hardware, and confirmed afterwards it started to work with no modifications?

Revision history for this message
Karl Hill (karl-hill) wrote : Re: [Bug 1579918] Re: Smart Card Reader BCM 5880 with kernel 4.2

Short answer, no.

I've not been able to get a working instance of windows up yet on a usb
stick (I've no interest in dual boot or re-install).
Others in the company I work with have used the procedure successfully
(but they also have a slightly later version of the reader, too...)

I've been working on it this week, but so far, no luck yet.

Karl Hill

On 01/28/2018 12:28 PM, Christopher M. Penalver wrote:
> Karl Hill, regarding your comment
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1579918/comments/32
> did you update the firmware with your hardware, and confirmed afterwards
> it started to work with no modifications?
>

Revision history for this message
penalvch (penalvch) wrote : Re: Smart Card Reader BCM 5880 with kernel 4.2

Karl Hill, the quickest way to confirm for your hardware is backup your install, temporarily install Windows via either:
http://www.dell.com/support/home/us/en/19/drivers/osiso/recoverytool/WT64A
https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool

and test the firmware update. This would be the most helpful for folks who have exactly the same hardware as you do.

Revision history for this message
Karl Hill (karl-hill) wrote :

******SUCCESS********

ok, not an easy process, but it works

I had to use a Windows computer to load a usb version of windows onto a usb drive (WinToUSB app on windows computer, I had zero luck using a VM)..I have a company-mate who used a separate harddrive, installed windows and that worked as well.

After I booted into Windows (usb for me, separate harddrive for buddy), downloaded latest drivers from Dell for Precision 7510 (http://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverId=Y13VJ as of today)

Ran hardware flash, let it finish...MOST IMPORTANT, reboot back into windows (it finished something after the reboot...first time I did not do this, device disappeared completely from linux, but I booted back to windows, installer popped up for second, now it works)

You will also need libccid 1.4.26-1

Good luck

Short version:
1. Boot to windows
2. Download and run http://www.dell.com/support/home/us/en/19/drivers/driversdetails?driverId=Y13VJ
3. Reboot to windows
4. Boot to Ubuntu, ensure libccid 1.4.26-1
5. pcsc_scan shows device, insert card, see it work :D

Revision history for this message
penalvch (penalvch) wrote :

Karl Hill, thanks for the follow up. I'll close this report given it's due to having outdated smart card firmware.

Changed in linux (Ubuntu):
importance: Medium → Undecided
status: Expired → Invalid
summary: - Smart Card Reader BCM 5880 with kernel 4.2
+ Smart Card Reader BCM 5880 doesn't work with outdated firmware
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.