Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1660860 > unrolled thread

Re: [PATCH v3 14/23] scsi: hisi_sas: add v3 cq interrupt handler

Started byChristoph Hellwig <hch@infradead.org>
First post2017-06-08 09:40 +0200
Last post2017-06-08 14:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 14/23] scsi: hisi_sas: add v3 cq interrupt handler Christoph Hellwig <hch@infradead.org> - 2017-06-08 09:40 +0200
    Re: [PATCH v3 14/23] scsi: hisi_sas: add v3 cq interrupt handler John Garry <john.garry@huawei.com> - 2017-06-08 14:20 +0200

#1660860 — Re: [PATCH v3 14/23] scsi: hisi_sas: add v3 cq interrupt handler

FromChristoph Hellwig <hch@infradead.org>
Date2017-06-08 09:40 +0200
SubjectRe: [PATCH v3 14/23] scsi: hisi_sas: add v3 cq interrupt handler
Message-ID<tQ0cX-1hd-59@gated-at.bofh.it>
Hi John,

sorry for dropping the ball, but your repost reminded me.

On Thu, Jun 01, 2017 at 11:36:55AM +0100, John Garry wrote:
> In the command completion code we need to check for abnormal completion due
> to underflow, but ignore it when it occurs in some commands, like inquiry.
> This is why we check for rw command - it is equivalent to !inquiry.
> 
> I'll see if we can change the check to explicitly ignore certain commands
> which complete abnormally with underflow.

In general it should be up to the higher level and not the driver
to detect underflow, and that's how most (hopefully all, but I won't
bet on some older ones) of our drivers operate.

> 
> > What about 32-byte CDs or things like Write Same?
> > 
> 
> You're talking about VARIABLE_LENGTH_CMD (opcode 0x7f) for 32-byte CDs,
> right?

Yes.

[toc] | [next] | [standalone]


#1661101

FromJohn Garry <john.garry@huawei.com>
Date2017-06-08 14:20 +0200
Message-ID<tQ4zT-48O-7@gated-at.bofh.it>
In reply to#1660860
On 08/06/2017 08:34, Christoph Hellwig wrote:
> Hi John,
>
> sorry for dropping the ball, but your repost reminded me.
>
> On Thu, Jun 01, 2017 at 11:36:55AM +0100, John Garry wrote:
>> In the command completion code we need to check for abnormal completion due
>> to underflow, but ignore it when it occurs in some commands, like inquiry.
>> This is why we check for rw command - it is equivalent to !inquiry.
>>
>> I'll see if we can change the check to explicitly ignore certain commands
>> which complete abnormally with underflow.
>
> In general it should be up to the higher level and not the driver
> to detect underflow, and that's how most (hopefully all, but I won't
> bet on some older ones) of our drivers operate.
>

Hi Christoph,

Right, I see most LLDDs will not check for underflow; but, FWIW, I do 
see scsi_cmnd.underflow referenced in some...

However, for drivers using libsas, we detect underflow for the reason 
just so libsas knows the sas_task status (SAS_DATA_UNDERRUN) and sets 
the scsi cmd result properly (and also the residual) in sas_end_task().

We used this method for the predecessor hw driver, and I think that we 
can revert to it.

Much appreciated,
John

>>
>>> What about 32-byte CDs or things like Write Same?
>>>
>>
>> You're talking about VARIABLE_LENGTH_CMD (opcode 0x7f) for 32-byte CDs,
>> right?
>
> Yes.
>
> .
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web