We should be able to discover firewire controllers

Bug #1305013 reported by Zygmunt Krynicki
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Low
Daniel Manrique

Bug Description

For all kinds of firewire testing we should be able to discover that the user has a firewire controller (loaded drivers, appropriate udev guess, etc). This may be exposed via the device resource or perhaps from a new, dedicated resource.

Related branches

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

It looks like there are clear entries in udev database about that:

P: /devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:02.0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:02.0
E: DRIVER=firewire_ohci
E: ID_MODEL_FROM_DATABASE=GA-7VT600-1394 Motherboard
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
E: ID_VENDOR_FROM_DATABASE=VIA Technologies, Inc.
E: MODALIAS=pci:v00001106d00003044sv00001458sd00001000bc0Csc00i10
E: PCI_CLASS=C0010
E: PCI_ID=1106:3044
E: PCI_SLOT_NAME=0000:05:02.0
E: PCI_SUBSYS_ID=1458:1000
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=79070

P: /devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:02.0/fw0
N: fw0
E: DEVNAME=/dev/fw0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/0000:05:02.0/fw0
E: MAJOR=249
E: MINOR=0
E: SUBSYSTEM=firewire

We could just use SUBSYSTEM=firewire

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

If we can do this effectively for FireWire we should do it for USB as well. Currently usb jobs depend on the usb/detect job - this is a second rate way of doing hardware detection.

Revision history for this message
Daniel Manrique (roadmr) wrote :

I'd say adding a SUBSYSTEM=firewire requirement like Zygmunt said. Let's do it for FW first, where the impact will be minimal, and try to extend to USB if it works. I don't remember a system without USB support in the past 10 years or so, though...

Changed in plainbox-provider-resource:
status: New → Triaged
Revision history for this message
Daniel Manrique (roadmr) wrote :

Could we maybe get a run of udev_resource from a system with firewire? so we know how to express the requirement. It will be something like device.category == 'FIREWIRE' but not exactly this.

Changed in plainbox-provider-resource:
status: Triaged → Incomplete
importance: Undecided → Low
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Tested on 201104-7598

With 1394 NOT connected

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Without 1394 connected

Along with its lspci output
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:16.3 Serial controller [0700]: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller [8086:1c3d] (rev 04)
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
00:1c.1 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 [8086:1c12] (rev b4)
00:1c.2 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 [8086:1c14] (rev b4)
00:1c.5 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 [8086:1c1a] (rev b4)
00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation QM67 Express Chipset Family LPC Controller [8086:1c4f] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller [8086:1c03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 04)
02:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0082] (rev 34)
09:00.0 FireWire (IEEE 1394) [0c00]: O2 Micro, Inc. 1394 OHCI Compliant Host Controller [1217:13f7] (rev 05)
09:00.1 SD Host controller [0805]: O2 Micro, Inc. Integrated MMC/SD controller [1217:8321] (rev 05)

Changed in plainbox-provider-resource:
status: Incomplete → Confirmed
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hello,

the attachments are the same and have the same name, are you sure you tried with a connected firewire drive?

Anyway, the FW controller shows like this:

path: /devices/pci0000:00/0000:00:1c.5/0000:09:00.0
bus: pci
category: FIREWIRE
driver: firewire_ohci
product_id: 5111
vendor_id: 4631
subproduct_id: 1204
subvendor_id: 4136
product: 1394 OHCI Compliant Host Controller
vendor: O2 Micro, Inc.

so we can do device.category: FIREWIRE.

Changed in plainbox-provider-resource:
status: Confirmed → Triaged
Revision history for this message
Daniel Manrique (roadmr) wrote :

BTW, the resource already exists, so what we need is to modify the relevant jobs in the provider, so I'll relocate the bug there.

affects: plainbox-provider-resource → plainbox-provider-checkbox
Daniel Manrique (roadmr)
Changed in plainbox-provider-checkbox:
assignee: nobody → Daniel Manrique (roadmr)
milestone: none → 0.6
status: Triaged → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Oooops!

Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks! a Firewire device is shown for the controller only; the disk (and I imagine any other connected devices) show as the proper device type.

The code that was merged for this bug should take care of only showing these tests if a firewire controller is detected.

Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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