Rev 5074 | Rev 5363 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5074 | Rev 5172 | ||
---|---|---|---|
Line 119... | Line 119... | ||
119 | mov [card_bus], eax |
119 | mov [card_bus], eax |
Line 120... | Line 120... | ||
120 | 120 | ||
121 | .next_bus: |
121 | .next_bus: |
122 | and [devfn], 0 |
122 | and [devfn], 0 |
123 | .next_dev: |
123 | .next_dev: |
124 | invoke PciRead32, [bus], [devfn], PCI_header02.vendor_id |
124 | invoke PciRead32, [bus], [devfn], PCI_header.vendor_id |
125 | test eax, eax |
125 | test eax, eax |
126 | jz .next |
126 | jz .next |
127 | cmp eax, -1 |
127 | cmp eax, -1 |
Line 128... | Line 128... | ||
128 | je .next |
128 | je .next |
129 | 129 | ||
130 | invoke PciRead16, [bus], [devfn], 0x0a ; class & subclass |
130 | invoke PciRead16, [bus], [devfn], PCI_header.subclass ; class & subclass |
Line 131... | Line 131... | ||
131 | cmp ax, 0x0607 |
131 | cmp ax, 0x0607 |
- | 132 | je .found |
|
- | 133 | ||
- | 134 | .next: |
|
- | 135 | test [devfn], 7 |
|
- | 136 | jnz .next_fn |
|
- | 137 | invoke PciRead8, [bus], [devfn], PCI_header.header_type |
|
- | 138 | test al, al |
|
- | 139 | js .next_fn |
|
132 | je .found |
140 | or [devfn], 7 |
133 | 141 | ||
134 | .next: |
142 | .next_fn: |
135 | inc [devfn] |
143 | inc [devfn] |
136 | cmp [devfn], 256 |
144 | cmp [devfn], 256 |
Line 148... | Line 156... | ||
148 | 156 | ||
149 | .found: |
157 | .found: |
Line 150... | Line 158... | ||
150 | DEBUGF 1, "Found cardbus bridge: bus=0x%x, dev=0x%x\n", [bus], [devfn] |
158 | DEBUGF 1, "Found cardbus bridge: bus=0x%x, dev=0x%x\n", [bus], [devfn] |
- | 159 | ||
151 | 160 | invoke PciRead8, [bus], [devfn], PCI_header.header_type |
|
152 | invoke PciRead8, [bus], [devfn], PCI_header.header_type |
161 | and al, not 0x80 ; Mask the multifunction device bit |
153 | DEBUGF 1, "Header type=0x%x\n", eax:2 |
162 | DEBUGF 1, "Header type=0x%x\n", eax:2 |
Line 154... | Line 163... | ||
154 | cmp al, 2 |
163 | cmp al, 2 |