Re: Maximum data size in a single transfer for MS driver

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

 



James.Bottomley@xxxxxxx 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@xxxxxxx> 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

--
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