From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Suvci-0000eV-WA for qemu-devel@nongnu.org; Fri, 27 Jul 2012 21:15:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Suvci-0008FT-1m for qemu-devel@nongnu.org; Fri, 27 Jul 2012 21:15:16 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:49684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Suvch-0008FO-QO for qemu-devel@nongnu.org; Fri, 27 Jul 2012 21:15:15 -0400 Received: by pbbro12 with SMTP id ro12so5676720pbb.4 for ; Fri, 27 Jul 2012 18:15:15 -0700 (PDT) From: Ronnie Sahlberg Date: Sat, 28 Jul 2012 11:14:52 +1000 Message-Id: <1343438093-13151-1-git-send-email-ronniesahlberg@gmail.com> Subject: [Qemu-devel] [PATCH] SCSI: STARTSTOPUNIT fix for PWRCND!=0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, pbonzini@redhat.com Paolo, List Please find a trivial fix for the STARTSTOPUNIT emulation. This command will only eject/load media if powercondition is 0. With this patch, QEMU SCSI emulation now pass all my SSU tests : $ ./bin/iscsi-test --dataloss --test="*startstop*" iscsi://127.0.0.1:32601/iqn.qemu.scsi-test/3 0360_startstopunit_simple: =================== Media is removable. STARTSTOPUNIT should work Try to eject the media ... [OK] Try to mount the media again ... [OK] TEST T0360_startstopunit_simple [OK] 0361_startstopunit_pwrcnd: =================== Media is removable. STARTSTOPUNIT should work Try to eject media with PC != 0 ... [OK] Try to mount the media again ... [OK] TEST T0361_startstopunit_pwrcnd [OK] regards ronnie sahlberg