All of lore.kernel.org
 help / color / mirror / Atom feed
* Alternate ways to do Scatter-Gather from BOT Class driver
@ 2010-06-28 16:29 Subs
  2010-06-28 18:55 ` Alan Stern
  0 siblings, 1 reply; 4+ messages in thread
From: Subs @ 2010-06-28 16:29 UTC (permalink / raw)
  To: linux-usb, linux-scsi

Hi All,

In my class driver I am receiving data transfer buffer as number of
Scatter-Gather lists from SCSI layer to perform data transfers.

Is there any alternate way to get the transfer buffer from SCSI other
than SG. I wanted to receive the complete data transfer buffer as a
single pointer.

-Subs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Alternate ways to do Scatter-Gather from BOT Class driver
  2010-06-28 16:29 Alternate ways to do Scatter-Gather from BOT Class driver Subs
@ 2010-06-28 18:55 ` Alan Stern
  2010-06-29 15:00   ` Subs
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Stern @ 2010-06-28 18:55 UTC (permalink / raw)
  To: Subs; +Cc: linux-usb, linux-scsi

On Mon, 28 Jun 2010, Subs wrote:

> Hi All,
> 
> In my class driver I am receiving data transfer buffer as number of
> Scatter-Gather lists from SCSI layer to perform data transfers.
> 
> Is there any alternate way to get the transfer buffer from SCSI other
> than SG. I wanted to receive the complete data transfer buffer as a
> single pointer.

As far as I know, there is no alternate way to get the transfer buffer 
from the SCSI layer.

However you can get the effect you want by setting the sg_tablesize 
field in your scsi_host_template to 1.

Just out of curiosity, why are you writing a class driver for the BOT 
class?  Aren't the two existing drivers in the kernel good enough?

Alan Stern


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Alternate ways to do Scatter-Gather from BOT Class driver
  2010-06-28 18:55 ` Alan Stern
@ 2010-06-29 15:00   ` Subs
       [not found]     ` <AANLkTilIM-9svLKrqaPfsjESn_9VnqsffBDwtiau8B_3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Subs @ 2010-06-29 15:00 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-usb, linux-scsi

On Tue, Jun 29, 2010 at 12:25 AM, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Mon, 28 Jun 2010, Subs wrote:
>
>> Hi All,
>>
>> In my class driver I am receiving data transfer buffer as number of
>> Scatter-Gather lists from SCSI layer to perform data transfers.
>>
>> Is there any alternate way to get the transfer buffer from SCSI other
>> than SG. I wanted to receive the complete data transfer buffer as a
>> single pointer.
>
> As far as I know, there is no alternate way to get the transfer buffer
> from the SCSI layer.
>
> However you can get the effect you want by setting the sg_tablesize
> field in your scsi_host_template to 1.
>
> Just out of curiosity, why are you writing a class driver for the BOT
> class?  Aren't the two existing drivers in the kernel good enough?
>
> Alan Stern
>
>

By changing sg_tablesize to 1, there is no change in number of buffers
that I am receiving in SG list.


> Just out of curiosity, why are you writing a class driver for the BOT
> class?  Aren't the two existing drivers in the kernel good enough?

I am writing my custom class driver, which can do Control and Bulk
transfers only. This is nowhere related to Mass Storage BOT transfers.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Alternate ways to do Scatter-Gather from BOT Class driver
       [not found]     ` <AANLkTilIM-9svLKrqaPfsjESn_9VnqsffBDwtiau8B_3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-06-29 18:06       ` Alan Stern
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Stern @ 2010-06-29 18:06 UTC (permalink / raw)
  To: Subs; +Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-scsi-u79uwXL29TY76Z2rM5mHXA

On Tue, 29 Jun 2010, Subs wrote:

> On Tue, Jun 29, 2010 at 12:25 AM, Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLrNAH6kLmebB@public.gmane.orgdu> wrote:
> > On Mon, 28 Jun 2010, Subs wrote:
> >
> >> Hi All,
> >>
> >> In my class driver I am receiving data transfer buffer as number of
> >> Scatter-Gather lists from SCSI layer to perform data transfers.
> >>
> >> Is there any alternate way to get the transfer buffer from SCSI other
> >> than SG. I wanted to receive the complete data transfer buffer as a
> >> single pointer.
> >
> > As far as I know, there is no alternate way to get the transfer buffer
> > from the SCSI layer.
> >
> > However you can get the effect you want by setting the sg_tablesize
> > field in your scsi_host_template to 1.
> >
> > Just out of curiosity, why are you writing a class driver for the BOT
> > class?  Aren't the two existing drivers in the kernel good enough?
> >
> > Alan Stern
> >
> >
> 
> By changing sg_tablesize to 1, there is no change in number of buffers
> that I am receiving in SG list.

Then you must be doing something wrong.  I just tried changing
sg_tablesize in the usb-storage driver, and as a result the
scatterlists it received contained only one element.  (Of course, in
usb-storage what matters is not the value in the scsi_host_template but
rather the value returned by usb_stor_sg_tablesize.)

> > Just out of curiosity, why are you writing a class driver for the BOT
> > class?  Aren't the two existing drivers in the kernel good enough?
> 
> I am writing my custom class driver, which can do Control and Bulk
> transfers only. This is nowhere related to Mass Storage BOT transfers.

Then why did you mention BOT in the email Subject: line?  Does it refer 
to something other than Bulk-Only-Transport?

Alan Stern

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-29 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 16:29 Alternate ways to do Scatter-Gather from BOT Class driver Subs
2010-06-28 18:55 ` Alan Stern
2010-06-29 15:00   ` Subs
     [not found]     ` <AANLkTilIM-9svLKrqaPfsjESn_9VnqsffBDwtiau8B_3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-29 18:06       ` Alan Stern

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.