Browse Source

[phantom] Fix P3 B1 silicon bug workaround

Commit f58cc3f introduced a temporary workaround for a bug in current
prototype silicon, but failed to apply it to all eight PCI functions
within the device.
tags/v0.9.4
Michael Brown 16 years ago
parent
commit
cb6fea0690
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/drivers/net/phantom/phantom.c

+ 3
- 1
src/drivers/net/phantom/phantom.c View File

1861
 	 * B2 will have this fixed; remove this hack when B1 is no
1861
 	 * B2 will have this fixed; remove this hack when B1 is no
1862
 	 * longer in use.
1862
 	 * longer in use.
1863
 	 */
1863
 	 */
1864
-	{
1864
+	for ( i = 0 ; i < 8 ; i++ ) {
1865
 		uint32_t temp;
1865
 		uint32_t temp;
1866
+		pci->devfn = PCI_DEVFN ( PCI_SLOT ( pci->devfn ), i );
1866
 		pci_read_config_dword ( pci, 0xc8, &temp );
1867
 		pci_read_config_dword ( pci, 0xc8, &temp );
1867
 		pci_read_config_dword ( pci, 0xc8, &temp );
1868
 		pci_read_config_dword ( pci, 0xc8, &temp );
1868
 		pci_write_config_dword ( pci, 0xc8, 0xf1000 );
1869
 		pci_write_config_dword ( pci, 0xc8, 0xf1000 );
1869
 	}
1870
 	}
1871
+	pci->devfn = PCI_DEVFN ( PCI_SLOT ( pci->devfn ), 0 );
1870
 
1872
 
1871
 	/* Allocate dummy DMA buffer and perform initial hardware handshake */
1873
 	/* Allocate dummy DMA buffer and perform initial hardware handshake */
1872
 	phantom->dma_buf = malloc_dma ( sizeof ( *(phantom->dma_buf) ),
1874
 	phantom->dma_buf = malloc_dma ( sizeof ( *(phantom->dma_buf) ),

Loading…
Cancel
Save