rtl8139: address TODOs
Make rtl8139 spec compliant, fixing reset values for command register. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
		
							parent
							
								
									f2b07c92a4
								
							
						
					
					
						commit
						fdac1d99c4
					
				@ -3357,11 +3357,8 @@ static int pci_rtl8139_init(PCIDevice *dev)
 | 
				
			|||||||
    pci_conf = s->dev.config;
 | 
					    pci_conf = s->dev.config;
 | 
				
			||||||
    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);
 | 
					    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);
 | 
				
			||||||
    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8139);
 | 
					    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8139);
 | 
				
			||||||
    /* TODO: value should be 0 at RST#. */
 | 
					 | 
				
			||||||
    pci_conf[PCI_COMMAND] = PCI_COMMAND_IO | PCI_COMMAND_MASTER;
 | 
					 | 
				
			||||||
    pci_conf[PCI_REVISION_ID] = RTL8139_PCI_REVID; /* >=0x20 is for 8139C+ */
 | 
					    pci_conf[PCI_REVISION_ID] = RTL8139_PCI_REVID; /* >=0x20 is for 8139C+ */
 | 
				
			||||||
    pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET);
 | 
					    pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET);
 | 
				
			||||||
    /* TODO: value should be 0 at RST# */
 | 
					 | 
				
			||||||
    pci_conf[PCI_INTERRUPT_PIN] = 1;    /* interrupt pin 0 */
 | 
					    pci_conf[PCI_INTERRUPT_PIN] = 1;    /* interrupt pin 0 */
 | 
				
			||||||
    /* TODO: start of capability list, but no capability
 | 
					    /* TODO: start of capability list, but no capability
 | 
				
			||||||
     * list bit in status register, and offset 0xdc seems unused. */
 | 
					     * list bit in status register, and offset 0xdc seems unused. */
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user