Pārlūkot izejas kodu

[phantom] Temporary workaround for bug in prototype (P3 B1) silicon

tags/v0.9.4
Michael Brown 16 gadus atpakaļ
vecāks
revīzija
f58cc3fca8
2 mainītis faili ar 14 papildinājumiem un 1 dzēšanām
  1. 13
    1
      src/drivers/net/phantom/phantom.c
  2. 1
    0
      src/drivers/net/phantom/phantom.h

+ 13
- 1
src/drivers/net/phantom/phantom.c Parādīt failu

@@ -1711,7 +1711,8 @@ static int phantom_init_cmdpeg ( struct phantom_nic *phantom ) {
1711 1711
 			 UNM_NIC_REG_DUMMY_BUF );
1712 1712
 
1713 1713
 	/* Tell the hardware that tuning is complete */
1714
-	phantom_writel ( phantom, 1, UNM_ROMUSB_GLB_PEGTUNE_DONE );
1714
+	phantom_writel ( phantom, UNM_ROMUSB_GLB_PEGTUNE_DONE_MAGIC,
1715
+			 UNM_ROMUSB_GLB_PEGTUNE_DONE );
1715 1716
 
1716 1717
 	/* Wait for command PEG to finish initialising */
1717 1718
 	DBGC ( phantom, "Phantom %p initialising command PEG (will take up to "
@@ -1859,6 +1860,17 @@ static int phantom_probe ( struct pci_device *pci,
1859 1860
 		phantom_port->port = i;
1860 1861
 	}
1861 1862
 
1863
+	/* BUG5945 - need to hack PCI config space on P3 B1 silicon.
1864
+	 * B2 will have this fixed; remove this hack when B1 is no
1865
+	 * longer in use.
1866
+	 */
1867
+	{
1868
+		uint32_t temp;
1869
+		pci_read_config_dword ( pci, 0xc8, &temp );
1870
+		pci_read_config_dword ( pci, 0xc8, &temp );
1871
+		pci_write_config_dword ( pci, 0xc8, 0xf1000 );
1872
+	}
1873
+
1862 1874
 	/* Allocate dummy DMA buffer and perform initial hardware handshake */
1863 1875
 	phantom->dma_buf = malloc_dma ( sizeof ( *(phantom->dma_buf) ),
1864 1876
 					UNM_DMA_BUFFER_ALIGN );

+ 1
- 0
src/drivers/net/phantom/phantom.h Parādīt failu

@@ -139,6 +139,7 @@ enum unm_reg_blocks {
139 139
 #define UNM_ROMUSB_GLB_SW_RESET		( UNM_ROMUSB_GLB + 0x00008 )
140 140
 #define UNM_ROMUSB_GLB_SW_RESET_MAGIC		0x0080000fUL
141 141
 #define UNM_ROMUSB_GLB_PEGTUNE_DONE	( UNM_ROMUSB_GLB + 0x0005c )
142
+#define UNM_ROMUSB_GLB_PEGTUNE_DONE_MAGIC	0x31
142 143
 
143 144
 #define UNM_ROMUSB_ROM			( UNM_CRB_ROMUSB + 0x10000 )
144 145
 #define UNM_ROMUSB_ROM_INSTR_OPCODE	( UNM_ROMUSB_ROM + 0x00004 )

Notiek ielāde…
Atcelt
Saglabāt