All of lore.kernel.org
 help / color / mirror / Atom feed
* Maximum data size in a single transfer for MS driver
@ 2010-02-17 12:37 Ramya Desai
       [not found] ` <3e7aae31002170437i52ba4ba1w10c1ff224d9b37ef-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 40+ messages in thread
From: Ramya Desai @ 2010-02-17 12:37 UTC (permalink / raw)
  To: USB list, linux-scsi-u79uwXL29TY76Z2rM5mHXA; +Cc: Greg KH, Alan Stern

Dear All,

What is  the number of maximum sectors that SCSI can send to MS driver
in a single data transfer?

I changed the max_sectors in struct scsi_host_template
usb_stor_host_template structure to 2048. Still, SCSI is sending 1024
sectors (512 KB) in a single data transfer.
I know that my device supports 1 MB data in a sigle transfer.  How can
I change this to 1 MB?

Thanks and Regards,
RD
--
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] 40+ messages in thread
* Re: Maximum data size in a single transfer for MS driver
@ 2010-02-25 16:59 scameron
  2010-02-25 17:00 ` scameron
  2010-02-25 17:18 ` scameron
  0 siblings, 2 replies; 40+ messages in thread
From: scameron @ 2010-02-25 16:59 UTC (permalink / raw)
  To: linux-scsi; +Cc: James.Bottomley, scameron, axboe


James.Bottomley@suse.de wrote:

> On Mon, 2010-02-22 at 18:20 +0530, Ramya Desai wrote:
> > On Fri, Feb 19, 2010 at 7:56 PM, James Bottomley
> > <James.Bottomley@suse.de> wrote:
> > 
> > > Before we get into that, what architecture is this?  There are a few,
> > > like arm that don't have architecture support for chaining, so they can
> > > never go over 128 segments.
> > 
> > I am using the desktop PC to access my device. i.e, Intel processor
> > with x86 architecture.
> 
> OK, so now see what max_hw_sectors_kb says ... if it's still 512 and
> you're sure you've got sg_tablesize set to something higher, there's
> likely something in the USB stack resetting it ... I suppose it's
> possible there's something else in your kernel doing that for the
> architecture, but you could rule that out by looking at
> max_hw_sectors_kb for either a SCSI or libata device and verifying it's
> much higher than 512.
> 
> James
> 

I might be off in the weeds, but I noticed this while looking at a similar
512k limit hpsa was hitting in the last few days, and I came across this,
in block/blk-settings.c:

void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_sectors)
{
        if (BLK_DEF_MAX_SECTORS > max_sectors)
                q->limits.max_hw_sectors = BLK_DEF_MAX_SECTORS;
        else
                q->limits.max_hw_sectors = max_sectors;
}
EXPORT_SYMBOL(blk_queue_max_hw_sectors);


And BLK_DEF_MAX_SECTORS is 1024 (means, 512k), from blkdev.h:
#define MAX_PHYS_SEGMENTS 128
#define MAX_HW_SEGMENTS 128
#define SAFE_MAX_SECTORS 255
#define BLK_DEF_MAX_SECTORS 1024

So if you try to set max_hw_sectors to allow more than 512k via
blk_queue_max_hw_sectors(), it will cap it at 512k.

YOu can set q->limits.max_hw_sectors to a bigger number yourself
without using the helper function, though I don't know if that's
cool (though it seems to work with cciss, for example.)  I haven't
tried it with hpsa, though did try changing blkdev.h BLK_DEF_MAX_SECTORS,
and rebuilding the kernel, and was able to get by the 512k limit.

-- steve


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

end of thread, other threads:[~2010-02-26  3:37 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-17 12:37 Maximum data size in a single transfer for MS driver Ramya Desai
     [not found] ` <3e7aae31002170437i52ba4ba1w10c1ff224d9b37ef-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-02-17 15:02   ` James Bottomley
2010-02-18  8:46     ` Ramya Desai
2010-02-18 15:47       ` James Bottomley
     [not found]         ` <1266508049.4355.37.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
2010-02-18 16:24           ` Alan Stern
     [not found]             ` <Pine.LNX.4.44L0.1002181115120.1294-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-02-18 16:30               ` James Bottomley
     [not found]                 ` <1266510627.4355.41.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
2010-02-18 16:51                   ` Alan Stern
2010-02-19 12:43         ` Ramya Desai
2010-02-19 14:26           ` James Bottomley
2010-02-22 12:50             ` Ramya Desai
     [not found]               ` <3e7aae31002220450o6f83d2f3n45c795d70ef01f72-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-02-22 13:06                 ` James Bottomley
2010-02-22 14:15                   ` Ramya Desai
2010-02-22 17:44                   ` Alan Stern
2010-02-22 18:07                     ` Alan Stern
     [not found]                     ` <Pine.LNX.4.44L0.1002221232160.1251-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-02-23 15:29                       ` Ramya Desai
2010-02-23 16:49                         ` Alan Stern
2010-02-23 17:00                           ` Martin K. Petersen
2010-02-23 18:01                             ` Alan Stern
     [not found]                               ` <Pine.LNX.4.44L0.1002231253320.1308-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-02-24 13:07                                 ` Ramya Desai
2010-02-24 13:12                                   ` Jens Axboe
2010-02-24 16:30                                   ` Alan Stern
2010-02-24 19:07                                     ` Jens Axboe
2010-02-25 14:47                                       ` Ramya Desai
2010-02-25 14:44                                     ` Ramya Desai
2010-02-25 16:37                             ` Alan Stern
2010-02-25 16:49                               ` Martin K. Petersen
2010-02-25 16:53                                 ` Martin K. Petersen
2010-02-25 17:54                                   ` Jens Axboe
     [not found]                                   ` <yq1zl2xl0j3.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
2010-02-25 18:28                                     ` Alan Stern
2010-02-25 19:05                                       ` Martin K. Petersen
     [not found]                                         ` <yq1iq9lkueh.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
2010-02-25 19:47                                           ` Alan Stern
2010-02-26  3:37                                             ` Martin K. Petersen
     [not found]                               ` <Pine.LNX.4.44L0.1002251132170.1686-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-02-25 17:52                                 ` Jens Axboe
2010-02-25 16:59 scameron
2010-02-25 17:00 ` scameron
2010-02-25 17:18 ` scameron
2010-02-25 17:28   ` Martin K. Petersen
2010-02-25 17:41     ` Boaz Harrosh
2010-02-25 17:58       ` Martin K. Petersen
2010-02-25 19:07       ` Martin K. Petersen

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.