On Fri, 27 Jan 2012 15:01:27 +1100 ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote: > From 9875346857c9d1c383c5da91b0f9cb097fe068cf Mon Sep 17 00:00:00 2001 > From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> > Date: Thu, 26 Jan 2012 11:05:09 +1100 > Subject: [PATCH] SBC: Support removable devices for SBC > > SBC supports removable devices. > See SBC 4.3.1 REMOVABLE MEDIUM OVERVIEW > > TEST UNIT READY, START STOP UNIT and PREVENT ALLOW MEDIUM REMOVAL > already provide the required behaviour described in 4.3.1 > > This patch adds support for the SBC medium access opcodes to return > check condition/not ready/medium not present > for any calls when the devie is set in offline mode. > > regards > ronnie sahlberg > > Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> > --- > usr/sbc.c | 35 ++++++++++++++++++++++++++++++++++- > 1 files changed, 34 insertions(+), 1 deletions(-) > > diff --git a/usr/sbc.c b/usr/sbc.c > index 8330291..b96cc7a 100644 > --- a/usr/sbc.c > +++ b/usr/sbc.c > @@ -154,6 +154,12 @@ static int sbc_rw(int host_no, struct scsi_cmd *cmd) > if (ret) > return SAM_STAT_RESERVATION_CONFLICT; > > + if (cmd->dev->attrs.removable && !cmd->dev->attrs.online) { Only if cmd->dev->attrs.removable is true, cmd->dev->attrs.online can be true? No? Thanks a lot! -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html