func: static void scsi_qdev_unrealize(DeviceState *qdev, Error **errp) SCSIDevice * dev = SCSI_DEVICE ( qdev ) ; scsi_device_purge_requests ( dev , SENSE_CODE ( NO_SENSE ) ); void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense) SCSIRequest * req ; while ( ! QTAILQ_EMPTY ( & sdev -> requests ) )  req = QTAILQ_FIRST ( & sdev -> requests ); scsi_req_cancel ( req ); void scsi_req_cancel(SCSIRequest *req) if ( ! req -> enqueued )  scsi_req_ref ( req ); SCSIRequest *scsi_req_ref(SCSIRequest *req) assert ( req -> refcount > 0 ); 