X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fst.c;h=56cb4900611659380e20cace52d1c395a714656f;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=7f669b6006777a05ee8e5509c25df824332887eb;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 7f669b600..56cb49006 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -368,7 +368,7 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt) SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2], SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]); if (cmdstatp->have_sense) - __scsi_print_sense(name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE); + __scsi_print_sense("st", SRpnt->sense, SCSI_SENSE_BUFFERSIZE); } ) /* end DEB */ if (!debugging) { /* Abnormal conditions for tape */ if (!cmdstatp->have_sense) @@ -384,8 +384,9 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt) scode != VOLUME_OVERFLOW && SRpnt->cmd[0] != MODE_SENSE && SRpnt->cmd[0] != TEST_UNIT_READY) { - - __scsi_print_sense(name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE); + printk(KERN_WARNING "%s: Error with sense data: ", name); + __scsi_print_sense("st", SRpnt->sense, + SCSI_SENSE_BUFFERSIZE); } } @@ -1192,7 +1193,7 @@ static int st_open(struct inode *inode, struct file *filp) /* Flush the tape buffer before close */ -static int st_flush(struct file *filp, fl_owner_t id) +static int st_flush(struct file *filp) { int result = 0, result2; unsigned char cmd[MAX_COMMAND_SIZE]; @@ -2817,7 +2818,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon (cmdstatp->sense_hdr.sense_key == NO_SENSE || cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) && undone == 0) { - ioctl_result = 0; /* EOF written successfully at EOM */ + ioctl_result = 0; /* EOF written succesfully at EOM */ if (fileno >= 0) fileno++; STps->drv_file = fileno; @@ -3598,6 +3599,7 @@ static struct st_buffer * tb->use_sg = max_sg; tb->frp = (struct st_buf_fragment *)(&(tb->sg[0]) + max_sg); + tb->in_use = 1; tb->dma = need_dma; tb->buffer_size = got; @@ -3837,7 +3839,7 @@ static int __init st_setup(char *str) break; } } - if (i >= ARRAY_SIZE(parms)) + if (i >= sizeof(parms) / sizeof(struct st_dev_parm)) printk(KERN_WARNING "st: invalid parameter in '%s'\n", stp); stp = strchr(stp, ',');