* "scsi: use host wide tags by default" causes uas regression
@ 2016-03-09 17:58 Hans de Goede
2016-03-09 18:26 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2016-03-09 17:58 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: SCSI development list, funnybutton
Hi Christoph,
I've received a bug report that uas is causing a 2-disk enclosure to
lookup with 4.4 and later:
https://bugzilla.redhat.com/show_bug.cgi?id=1315013
Looking at the dmesg this stands out:
Mar 09 01:55:21 larry kernel: sd 2:0:0:1: [sdc] tag#31 uas_eh_abort_handler 0 uas-tag 32 inflight: CMD OUT
Mar 09 01:55:21 larry kernel: sd 2:0:0:1: [sdc] tag#31 CDB: Write(10) 2a 00 e8 10 f4 00 00 04 00 00
Specifically the uas-tag 32, technically that is correct, but we have been avoiding
actually submitting commands with that tag because bulk-streams are numbered 1-x
and I was afraid that actually using the full-range would trigger off-by-one
errors in devices and it looks I was right.
Before your patch uas was doing:
@@ -929,10 +928,6 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)
if (result)
goto set_alt0;
- result = scsi_init_shared_tag_map(shost, devinfo->qdepth - 2);
- if (result)
- goto free_streams;
-
usb_set_intfdata(intf, shost);
result = scsi_add_host(shost, &intf->dev);
if (result)
With devinfo->qdepth being 32 in this case, so the end-result would be passing
30 to scsi_init_shared_tag_map, reserving one tag for untagged commands and one
tag for the off-by-one thingie.
We also have:
static int uas_slave_configure(struct scsi_device *sdev)
{
...
scsi_change_queue_depth(sdev, devinfo->qdepth - 2);
...
}
But that only helps with single lun enclosures, so I guess that once we fix the issue that
line can actually go.
So my question is how do I tell the scsi layer to not submit more then X commands with
scsi_init_shared_tag_map() gone ?
Regards,
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "scsi: use host wide tags by default" causes uas regression
2016-03-09 17:58 "scsi: use host wide tags by default" causes uas regression Hans de Goede
@ 2016-03-09 18:26 ` Christoph Hellwig
2016-03-09 18:28 ` Hans de Goede
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2016-03-09 18:26 UTC (permalink / raw)
To: Hans de Goede; +Cc: Christoph Hellwig, SCSI development list, funnybutton
On Wed, Mar 09, 2016 at 06:58:48PM +0100, Hans de Goede wrote:
> So my question is how do I tell the scsi layer to not submit more then X commands with
> scsi_init_shared_tag_map() gone ?
By setting ->can_queue in the Scsi_Host structure to the maximum number
of command you want outstanding for this host.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "scsi: use host wide tags by default" causes uas regression
2016-03-09 18:26 ` Christoph Hellwig
@ 2016-03-09 18:28 ` Hans de Goede
2016-03-09 18:31 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2016-03-09 18:28 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Christoph Hellwig, SCSI development list, funnybutton
Hi,
On 09-03-16 19:26, Christoph Hellwig wrote:
> On Wed, Mar 09, 2016 at 06:58:48PM +0100, Hans de Goede wrote:
>> So my question is how do I tell the scsi layer to not submit more then X commands with
>> scsi_init_shared_tag_map() gone ?
>
> By setting ->can_queue in the Scsi_Host structure to the maximum number
> of command you want outstanding for this host.
Can I lower this after calling scsi_host_alloc(), or do I need to make
my template "dynamic" ?
Regards,
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "scsi: use host wide tags by default" causes uas regression
2016-03-09 18:28 ` Hans de Goede
@ 2016-03-09 18:31 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2016-03-09 18:31 UTC (permalink / raw)
To: Hans de Goede; +Cc: SCSI development list, funnybutton
On Wed, Mar 09, 2016 at 07:28:06PM +0100, Hans de Goede wrote:
> >By setting ->can_queue in the Scsi_Host structure to the maximum number
> >of command you want outstanding for this host.
>
> Can I lower this after calling scsi_host_alloc(), or do I need to make
> my template "dynamic" ?
You don't need to set in the host template, you can set it directly
in the Scsi_Host structure. It needs to be set before scsi_add_host,
though.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-09 18:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 17:58 "scsi: use host wide tags by default" causes uas regression Hans de Goede
2016-03-09 18:26 ` Christoph Hellwig
2016-03-09 18:28 ` Hans de Goede
2016-03-09 18:31 ` Christoph Hellwig
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).