linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: John Garry <john.garry@huawei.com>,
	Bart Van Assche <bvanassche@acm.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: satishkh@cisco.com, sebaddel@cisco.com, kartilak@cisco.com,
	jejb@linux.ibm.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 0/3] Remove scsi_cmnd.tag
Date: Thu, 19 Aug 2021 09:50:21 +0200	[thread overview]
Message-ID: <6090371d-9688-11ae-8219-ba9929a96526@suse.de> (raw)
In-Reply-To: <c9d9891b-780b-4641-2b60-6319d525e17c@huawei.com>

On 8/19/21 9:27 AM, John Garry wrote:
> On 19/08/2021 08:15, Hannes Reinecke wrote:
>> Hey Bart,
>>
>> Thanks for this!
>> Really helpful.
>>
>> Just a tiny wee snag:
>>
>> On 8/19/21 4:41 AM, Bart Van Assche wrote:
>>> On 8/18/21 11:08 AM, John Garry wrote:
>>>> Or maybe you or Bart have a better idea?
>>>
>>> This is how I test compilation of SCSI drivers on a SUSE system (only
>>> the cross-compilation prefix is distro specific):
>>>
>>>      # Acorn RiscPC
>>>      make ARCH=arm xconfig
>>>      # Select the RiscPC architecture (ARCH_RPC)
>>>      make -j9 ARCH=arm CROSS_COMPILE=arm-suse-linux-gnueabi- </dev/null
>>>
>>
>> Acorn RiscPC is ARMv3, which sadly isn't supported anymore with gcc9.
>> So for compilation I had to modify Kconfig to select ARMv4:
>>
> 
> Yeah, that is what I was tackling this very moment.
> 
>> diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
>> index 8355c3895894..22ec9e275335 100644
>> --- a/arch/arm/mm/Kconfig
>> +++ b/arch/arm/mm/Kconfig
>> @@ -278,7 +278,7 @@ config CPU_ARM1026
>>   # SA110
>>   config CPU_SA110
>>          bool
>> -       select CPU_32v3 if ARCH_RPC
>> +       select CPU_32v4 if ARCH_RPC
> 
> Does that build fully for xconfig or any others which you tried?
> 

Yep, xconfig and full build works.

Well.

Would've worked if you hadn't messed up tag handling for acornscsi :-)

Besides: tag handling in acornscsi (and fas216, for that matter) seems 
to be completely broken.

Consider this beauty:

#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
        /*
         * tagged queueing - allocate a new tag to this command
         */
        if (SCpnt->device->simple_tags) {
            SCpnt->device->current_tag += 1;
            if (SCpnt->device->current_tag == 0)
                SCpnt->device->current_tag = 1;
            SCpnt->tag = SCpnt->device->current_tag;
        } else
#endif

which is broken on _soo many_ counts.
Not only does it try to allocate its own tags, the code also assumes 
that a tag value of '0' indicates that tagged queueing is not active:

static
void acornscsi_abortcmd(AS_Host *host, unsigned char tag)
{
     host->scsi.phase = PHASE_ABORTED;
     sbic_arm_write(host, SBIC_CMND, CMND_ASSERTATN);

     msgqueue_flush(&host->scsi.msgs);
#ifdef CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
     if (tag)
         msgqueue_addmsg(&host->scsi.msgs, 2, ABORT_TAG, tag);
     else
#endif
         msgqueue_addmsg(&host->scsi.msgs, 1, ABORT);
}

And, of course, there's the usual confusion about when to check for
sdev->tagged_supported and sdev->simple_tags.

Drop me a note if I can give a hand.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

  reply	other threads:[~2021-08-19  7:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 13:49 [PATCH 0/3] Remove scsi_cmnd.tag John Garry
2021-08-13 13:49 ` [PATCH 1/3] scsi: wd719: Stop using scsi_cmnd.tag John Garry
2021-08-13 16:30   ` Hannes Reinecke
2021-08-14  3:11   ` Bart Van Assche
2021-08-13 13:49 ` [PATCH 2/3] scsi: fnic: Stop setting scsi_cmnd.tag John Garry
2021-08-13 16:31   ` Hannes Reinecke
2021-08-14  3:17   ` Bart Van Assche
2021-08-14  7:39     ` Christoph Hellwig
2021-08-14 12:35       ` Hannes Reinecke
2021-08-16 10:00         ` John Garry
2021-08-16 11:11           ` Hannes Reinecke
2021-08-13 13:49 ` [PATCH 3/3] scsi: Remove scsi_cmnd.tag John Garry
2021-08-13 16:31   ` Hannes Reinecke
2021-08-14  3:18   ` Bart Van Assche
2021-08-14  7:40 ` [PATCH 0/3] " Christoph Hellwig
2021-08-16 17:34 ` Martin K. Petersen
2021-08-18 18:08   ` John Garry
2021-08-18 18:46     ` Martin K. Petersen
2021-08-19  2:41     ` Bart Van Assche
2021-08-19  7:15       ` Hannes Reinecke
2021-08-19  7:27         ` John Garry
2021-08-19  7:50           ` Hannes Reinecke [this message]
2021-08-19  9:09             ` John Garry
2021-08-24  4:03 ` Martin K. Petersen
2021-08-24  7:54   ` John Garry

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=6090371d-9688-11ae-8219-ba9929a96526@suse.de \
    --to=hare@suse.de \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jejb@linux.ibm.com \
    --cc=john.garry@huawei.com \
    --cc=kartilak@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=satishkh@cisco.com \
    --cc=sebaddel@cisco.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).