Re: [PATCH 3/3] stex: use block layer tagging

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

 



On Wed, 2006-08-30 at 17:30 +0800, Ed Lin wrote:
> +stex_slave_alloc(struct scsi_device *sdev)
> +{
> +       struct st_hba *hba = (struct st_hba *) sdev->host->hostdata;
> +       unsigned long flags;
> +
> +       /*
> +        * this should be done in slave_configure routine. but we need
> +        * tagging ever since the first command. we can't wait...
> +        */
> +       spin_lock_irqsave(hba->host->host_lock, flags);
> +       if (hba->devnum++ == 0) {
> +               if (blk_queue_init_tags(sdev->request_queue,
> +                               hba->host->can_queue, NULL) == 0) {
> +                       hba->ref = 1;
> +                       hba->shared_queue = sdev->request_queue;
> +               }
> +       } else if (hba->ref) {
> +               blk_queue_init_tags(sdev->request_queue,
> +                       hba->host->can_queue,
> hba->shared_queue->queue_tags);
> +               hba->ref++;
> +       }
> +
> +       if (hba->ref) {
> +               sdev->tagged_supported = 1;
> +               scsi_set_tag_type(sdev, MSG_SIMPLE_TAG);
> +               scsi_adjust_queue_depth(sdev,
> +                       scsi_get_tag_type(sdev),
> hba->host->can_queue);
> +       } else
> +               sdev->tagged_supported = 0;
> +       spin_unlock_irqrestore(hba->host->host_lock, flags);

OK, this is indicating an inherent problem in using the shared tag maps.
I talked a bit with Jens and we think there's a way to eliminate most of
this and collapse it down to a simple SCSI helper.  I'll post the two
patches separately, but basically when its done your slave alloc should
become a simple scsi_activate_tcq().

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux