mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	scsi: sd: Defer spinning up drive while SANITIZE is in progress
A drive being sanitized will return NOT READY / ASC 0x4 / ASCQ
0x1b ("LOGICAL UNIT NOT READY. SANITIZE IN PROGRESS").
Prevent spinning up the drive until this condition clears.
[mkp: tweaked commit message]
Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
			
			
This commit is contained in:
		
							parent
							
								
									fb1633d56b
								
							
						
					
					
						commit
						505aa4b6a8
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2121,6 +2121,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
 | 
			
		|||
				break;	/* standby */
 | 
			
		||||
			if (sshdr.asc == 4 && sshdr.ascq == 0xc)
 | 
			
		||||
				break;	/* unavailable */
 | 
			
		||||
			if (sshdr.asc == 4 && sshdr.ascq == 0x1b)
 | 
			
		||||
				break;	/* sanitize in progress */
 | 
			
		||||
			/*
 | 
			
		||||
			 * Issue command to spin up drive when not ready
 | 
			
		||||
			 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue