All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 1/3] snic: reserve tag for TMF
Date: Fri, 20 Aug 2021 12:12:00 +0200	[thread overview]
Message-ID: <de4a7479-3dbf-0842-f8f7-5d82b8bd6ea6@suse.de> (raw)
In-Reply-To: <20210820100047.GA9872@lst.de>

On 8/20/21 12:00 PM, Christoph Hellwig wrote:
> On Thu, Aug 19, 2021 at 11:12:22AM +0200, Hannes Reinecke wrote:
>>   
>> diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c
>> index 14f4ce665e58..65f50057c66e 100644
>> --- a/drivers/scsi/snic/snic_main.c
>> +++ b/drivers/scsi/snic/snic_main.c
>> @@ -512,6 +512,9 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>   					 max_t(u32, SNIC_MIN_IO_REQ, max_ios));
>>   
>>   	snic->max_tag_id = shost->can_queue;
>> +	/* Reserve one reset command */
>> +	shost->can_queue--;
>> +	snic->tmf_tag_id = shost->can_queue;
> 
> This is decrementing can_queue before scsi_add_host, which allocates
> the requests ..
> 
>> +	sc = scsi_host_find_tag(shost, snic->tmf_tag_id);
>> +	if (!sc) {
> 
> ... but this is expecting a scsi_cmnd / struct request for that tag
> value.
> 
> How is that supposed to work?
> 
Ah, right. Will be fixing it.

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-20 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  9:12 [PATCH 0/3] snic: Fixes for SCSI EH rework Hannes Reinecke
2021-08-19  9:12 ` [PATCH 1/3] snic: reserve tag for TMF Hannes Reinecke
2021-08-20 10:00   ` Christoph Hellwig
2021-08-20 10:12     ` Hannes Reinecke [this message]
2021-08-19  9:12 ` [PATCH 2/3] snic: use dedicated device reset command Hannes Reinecke
2021-08-19  9:12 ` [PATCH 3/3] snic: Use scsi_host_busy_iter() to traverse commands Hannes Reinecke

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=de4a7479-3dbf-0842-f8f7-5d82b8bd6ea6@suse.de \
    --to=hare@suse.de \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.