[haiku-bugs] Re: [Haiku] #16778: Problem with SDHC

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 15 Mar 2021 18:28:37 -0000

#16778: Problem with SDHC
-------------------------------+------------------------
  Reporter:  AlienSoldier      |      Owner:  pulkomandy
      Type:  bug               |     Status:  new
  Priority:  high              |  Milestone:  R1/beta3
 Component:  Drivers/Disk/MMC  |    Version:  R1/beta2
Resolution:                    |   Keywords:
Blocked By:                    |   Blocking:
  Platform:  All               |
-------------------------------+------------------------
Comment (by pulkomandy):

 Ok, we're making progress.

 First there was an error in computing the bar numbers. I have fixed it in
 hrev54991.

 Then, I see something strange and I don't know what to make of it.

 In the initial PCI enumeration we see this:

 {{{
 KERN: PCI: [dom 0, bus  6] bus   6, device  4, function  4: vendor 104c,
 device 8034, revision 00
 KERN: PCI:   class_base 08, class_function 05, class_api 00
 KERN: PCI:   vendor 104c: Texas Instruments
 KERN: PCI:   device 8034: PCIxx21/PCIxx11 SD Host Controller
 KERN: PCI:   info: Generic system peripheral (SD Host controller)
 KERN: PCI:   line_size 08, latency 39, header_type 80, BIST 00
 KERN: PCI:   ROM base host 00000000, pci 00000000, size 00000000
 KERN: PCI:   cardbus_CIS 00000000, subsystem_id ff05, subsystem_vendor_id
 1179
 KERN: PCI:   interrupt_line 0a, interrupt_pin 04, min_grant 07,
 max_latency 04
 KERN: PCI:   base reg 0: host bc009400, pci bc009400, size 00000100, flags
 00
 KERN: PCI:   base reg 1: host bc009000, pci bc009000, size 00000100, flags
 00
 KERN: PCI:   base reg 2: host bc006400, pci bc006400, size 00000100, flags
 00
 KERN: PCI:   base reg 3: host 00000000, pci 00000000, size 00000000, flags
 00
 KERN: PCI:   base reg 4: host 00000000, pci 00000000, size 00000000, flags
 00
 KERN: PCI:   base reg 5: host 00000000, pci 00000000, size 00000000, flags
 00
 KERN: PCI:   Capabilities: PM
 }}}

 In particular there is this information: interrupt_line 0a

 But later on when the SD driver initializes we see this:

 {{{
 KERN: sdhci_pci: supports_device(vid:104c pid:8034)
 KERN: sdhci_pci: SDHCI Device found! Subtype: 0x0005, type:
 0x0008
 KERN: sdhci_pci: CALLED status_t init_device(device_node *, void
 **)
 KERN: sdhci_pci: CALLED status_t register_child_devices(void *)
 KERN: sdhci_pci: CALLED status_t init_bus(device_node *, void **)
 KERN: sdhci_pci: Register SD bus at slot 1, using bar 0
 KERN: sdhci_pci: interrupts count: 0
 KERN: sdhci_pci: irq interrupt line: 19
 KERN: sdhci_pci: Card not inserted, not powering on for no
 }}}

 The interrupt has become 19. Why has it changed between these two steps?
 Is that ok?

 Can someone explain how interrupts are managed? Is this normal, or is it
 unexpected?

 In case that's useful, the documentation for this device is available
 online, for example here: https://pdf1.alldatasheet.com/datasheet-
 pdf/view/118234/TI/PCI6411.html
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16778#comment:21>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: