lkml.org 
[lkml]   [2008]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/32] ide-tape: remove struct idetape_request_sense_result_t
Date
On Sunday 27 January 2008, Borislav Petkov wrote:
> Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
> ---
> drivers/ide/ide-tape.c | 83 +++++++++++++++--------------------------------
> 1 files changed, 27 insertions(+), 56 deletions(-)

applied with minor changes

> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index 3bedeb8..173ac0d 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c

[...]

> /*
> - * If error was the result of a zero-length read or write command,
> - * with sense key=5, asc=0x22, ascq=0, let it slide. Some drives
> - * (i.e. Seagate STT3401A Travan) don't support 0-length read/writes.
> + * If error was the result of a zero-length read or write command, with
> + * sense key=5, asc=0x22, ascq=0, let it slide. Some drives (i.e.
> + * Seagate STT3401A Travan) don't support 0-length read/writes.
> */

This chunk is unnecessary, I dropped it.

> if ((pc->c[0] == IDETAPE_READ_CMD || pc->c[0] == IDETAPE_WRITE_CMD)
> - && pc->c[4] == 0 && pc->c[3] == 0 && pc->c[2] == 0) { /* length==0 */
> - if (result->sense_key == 5) {
> + /* length==0 */
> + && pc->c[4] == 0 && pc->c[3] == 0 && pc->c[2] == 0) {
> + if (tape->sense_key == 5) {
> /* don't report an error, everything's ok */
> pc->error = 0;
> /* don't retry read/write */
> set_bit(PC_ABORT, &pc->flags);
> }
> }
> - if (pc->c[0] == IDETAPE_READ_CMD && result->filemark) {
> + if (pc->c[0] == IDETAPE_READ_CMD && !!(sense[2] & 0x80)) {

needless "!!" removed

> pc->error = IDETAPE_ERROR_FILEMARK;
> set_bit(PC_ABORT, &pc->flags);
> }
> if (pc->c[0] == IDETAPE_WRITE_CMD) {
> - if (result->eom ||
> - (result->sense_key == 0xd && result->asc == 0x0 &&
> - result->ascq == 0x2)) {
> + if (!!(sense[2] & 0x40) ||

ditto


\
 
 \ /
  Last update: 2008-01-27 20:35    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site