mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	s390/pci: add error message on device number limit
The config option CONFIG_PCI_NR_FUNCTIONS sets a limit on the number of PCI functions we can support. Previously on reaching this limit there was no indication why newly attached devices are not recognized by Linux which could be quite confusing. Thus this patch adds a pr_err() for this case. Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
		
							parent
							
								
									794b8846dc
								
							
						
					
					
						commit
						d497b7ec83
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -673,6 +673,8 @@ static int zpci_alloc_domain(struct zpci_dev *zdev)
 | 
			
		|||
	zdev->domain = find_first_zero_bit(zpci_domain, ZPCI_NR_DEVICES);
 | 
			
		||||
	if (zdev->domain == ZPCI_NR_DEVICES) {
 | 
			
		||||
		spin_unlock(&zpci_domain_lock);
 | 
			
		||||
		pr_err("Adding PCI function %08x failed because the configured limit of %d is reached\n",
 | 
			
		||||
			zdev->fid, ZPCI_NR_DEVICES);
 | 
			
		||||
		return -ENOSPC;
 | 
			
		||||
	}
 | 
			
		||||
	set_bit(zdev->domain, zpci_domain);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue