net: dc2114x: check for apropriate command
The code had two paths depending on whether the card was to be accessed from plain memory or the IO region. However the error path checks whether IO region was obtained - twice. Fix up the error path according to the probable intention. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
		
							parent
							
								
									b0e55d5b5a
								
							
						
					
					
						commit
						df6a36fbef
					
				| 
						 | 
					@ -245,15 +245,17 @@ int dc21x4x_initialize(bd_t *bis)
 | 
				
			||||||
		pci_write_config_word(devbusfn, PCI_COMMAND, status);
 | 
							pci_write_config_word(devbusfn, PCI_COMMAND, status);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pci_read_config_word(devbusfn, PCI_COMMAND, &status);
 | 
							pci_read_config_word(devbusfn, PCI_COMMAND, &status);
 | 
				
			||||||
 | 
					#ifdef CONFIG_TULIP_USE_IO
 | 
				
			||||||
		if (!(status & PCI_COMMAND_IO)) {
 | 
							if (!(status & PCI_COMMAND_IO)) {
 | 
				
			||||||
			printf("Error: Can not enable I/O access.\n");
 | 
								printf("Error: Can not enable I/O access.\n");
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
		if (!(status & PCI_COMMAND_IO)) {
 | 
							if (!(status & PCI_COMMAND_MEMORY)) {
 | 
				
			||||||
			printf("Error: Can not enable I/O access.\n");
 | 
								printf("Error: Can not enable MEMORY access.\n");
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!(status & PCI_COMMAND_MASTER)) {
 | 
							if (!(status & PCI_COMMAND_MASTER)) {
 | 
				
			||||||
			printf("Error: Can not enable Bus Mastering.\n");
 | 
								printf("Error: Can not enable Bus Mastering.\n");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue