diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-02-10 14:45:43 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-02-10 14:45:43 -0500 |
commit | 81b7bbd1932a04869d4c8635a75222dfc6089f96 (patch) | |
tree | 285ae868a1e3a41fb0dbfe346c28e380949bcb55 /drivers/scsi/st.c | |
parent | 98051995ab44b993f992946055edc6115351f725 (diff) | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) |
Merge branch 'linus'
Conflicts:
drivers/scsi/ipr.c
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index fba8b204e310..16e279be4a3e 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -2819,15 +2819,18 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon | |||
2819 | 2819 | ||
2820 | if (cmd_in == MTWEOF && | 2820 | if (cmd_in == MTWEOF && |
2821 | cmdstatp->have_sense && | 2821 | cmdstatp->have_sense && |
2822 | (cmdstatp->flags & SENSE_EOM) && | 2822 | (cmdstatp->flags & SENSE_EOM)) { |
2823 | (cmdstatp->sense_hdr.sense_key == NO_SENSE || | 2823 | if (cmdstatp->sense_hdr.sense_key == NO_SENSE || |
2824 | cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) && | 2824 | cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) { |
2825 | undone == 0) { | 2825 | ioctl_result = 0; /* EOF(s) written successfully at EOM */ |
2826 | ioctl_result = 0; /* EOF written successfully at EOM */ | 2826 | STps->eof = ST_NOEOF; |
2827 | if (fileno >= 0) | 2827 | } else { /* Writing EOF(s) failed */ |
2828 | fileno++; | 2828 | if (fileno >= 0) |
2829 | fileno -= undone; | ||
2830 | if (undone < arg) | ||
2831 | STps->eof = ST_NOEOF; | ||
2832 | } | ||
2829 | STps->drv_file = fileno; | 2833 | STps->drv_file = fileno; |
2830 | STps->eof = ST_NOEOF; | ||
2831 | } else if ((cmd_in == MTFSF) || (cmd_in == MTFSFM)) { | 2834 | } else if ((cmd_in == MTFSF) || (cmd_in == MTFSFM)) { |
2832 | if (fileno >= 0) | 2835 | if (fileno >= 0) |
2833 | STps->drv_file = fileno - undone; | 2836 | STps->drv_file = fileno - undone; |