All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Kohl <bernhard.kohl@nsn.com>
To: ext Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] scsi-generic: don't report negative length to	the SCSI adapter
Date: Thu, 02 Sep 2010 18:17:52 +0200	[thread overview]
Message-ID: <4C7FCE30.5030704@nsn.com> (raw)
In-Reply-To: <4C7FB574.7090906@redhat.com>

Am 02.09.2010 16:32, schrieb ext Kevin Wolf:
> Can we add a comment why len can become<  0 and that this is a
> workaround for buggy drivers? It's in your commit message, but I prefer
> this kind of things to be explained in the code.
>    

Yes I will do that, if we decide to apply this patch (see below).

> Also, are we sure that broken drivers always return negative numbers
> when their result is wrong, or can we still get incorrect results?

Obviously there are currently no additional problems with wrong 'resid'
values. I found the problem with an older IET version (1.4.18)
which was the last one available from rpmfusion (kmod-iscsitarget,
iscsitarget, built for kernel 2.6.31.12). After that I switched
to STGT which is part of Fedora (scsi-target-utils). I don't know
how the current IET (1.4.20.2) behaves.

If the 'resid' is not reported correctly, there is no way to calculate
the correct received data length without analyzing the content of the
SCSI data. Negative length only occurred if the allocation length in
the MODE SENSE command was to small. But negative length confuses the
adapter driver.

I propose to skip this patch as long as there are no news about IET.
Sorry for the confusion. The patch was still in my queue since March.

Bernhard

      reply	other threads:[~2010-09-02 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 13:27 [Qemu-devel] [PATCH] scsi-generic: don't report negative length to the SCSI adapter Bernhard Kohl
2010-09-02 14:32 ` Kevin Wolf
2010-09-02 16:17   ` Bernhard Kohl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C7FCE30.5030704@nsn.com \
    --to=bernhard.kohl@nsn.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.