lsi: use qbus_reset_all to reset SCSI bus
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
		
							parent
							
								
									0369f06f74
								
							
						
					
					
						commit
						032f0101aa
					
				@ -1670,12 +1670,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        if (val & LSI_SCNTL1_RST) {
 | 
					        if (val & LSI_SCNTL1_RST) {
 | 
				
			||||||
            if (!(s->sstat0 & LSI_SSTAT0_RST)) {
 | 
					            if (!(s->sstat0 & LSI_SSTAT0_RST)) {
 | 
				
			||||||
                BusChild *kid;
 | 
					                qbus_reset_all(&s->bus.qbus);
 | 
				
			||||||
 | 
					 | 
				
			||||||
                QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) {
 | 
					 | 
				
			||||||
                    DeviceState *dev = kid->child;
 | 
					 | 
				
			||||||
                    device_reset(dev);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                s->sstat0 |= LSI_SSTAT0_RST;
 | 
					                s->sstat0 |= LSI_SSTAT0_RST;
 | 
				
			||||||
                lsi_script_scsi_interrupt(s, LSI_SIST0_RST, 0);
 | 
					                lsi_script_scsi_interrupt(s, LSI_SIST0_RST, 0);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user