Re: [PATCH] block: add support for shared tag maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-09-18 at 19:47 +0100, Christoph Hellwig wrote:
> On Fri, Sep 01, 2006 at 02:31:51PM +0800, Ed Lin wrote:
> >  static int
> > +stex_slave_alloc(struct scsi_device *sdev)
> > +{
> > +	/* Cheat: usually extracted from Inquiry data */
> > +	sdev->tagged_supported = 1;
> > +
> > +	scsi_activate_tcq(sdev, sdev->host->can_queue);
> 
> these two calls look wrong here. scsi_activate_tcq is supposed to be
> called from slave_configure.  similarly tagged_supported is probably
> going to be overwriten as part of the scanning process, but you already
> set it in slave_configure anyway.

If a lld is doing host wide tagging will they always need a tag? For
those drivers it seems like they are not doing tagging based on this in
scsi_scan

        if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) &&
> >             !(*bflags & BLIST_NOTQ))
> >                 sdev->tagged_supported = 1;

Instead they need a tag because their FW or driver require it.

If so then should we just set this in scsi_alloc_sdev if shost->bqt is
set? For qla4xxx we are doing something like stex which is a little odd.
See patch below. It is untested and not even compile tested - just shows
what I mean and for Qlogic to test if it is ok with you guys.

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index fd9e281..2efd90c 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -206,6 +206,11 @@ static struct scsi_device *scsi_alloc_sd
 
 	scsi_sysfs_device_initialize(sdev);
 
+	if (shost->bqt) {
+		sdev->tagged_supported = 1;
+		scsi_activate_tcq(sdev, shost->can_queue);
+	}
+
 	if (shost->hostt->slave_alloc) {
 		ret = shost->hostt->slave_alloc(sdev);
 		if (ret) {


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux