On Mon, Feb 22, 2010 at 11:14 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: Dear Alan, Thanks for the information. > Usb-storage sets max_sectors to 240 in the host template. For some > reason, the block layer also changes max_hw_sectors to the same value > (see block/blk-settings.c:blk_queue_max_sectors()). I am setting the max_sectors in host template (scsiglue.c file). When the max_sectors value is <= 1024, then only the max_sectors_kb and max_hw_sectors_kb are same in the sys interface. However, if the max_sectors value is > 1024 then the values in the sys interface files are different as shown in block/blk-setting.c:blk_queue_max_sectors(). if (BLK_DEF_MAX_SECTORS > max_sectors) q->limits.max_hw_sectors = q->limits.max_sectors = max_sectors; else { q->limits.max_sectors = BLK_DEF_MAX_SECTORS; q->limits.max_hw_sectors = max_sectors; } I guess, in my case, it enters into the ELSE part. I tried to debug these sources (block/blk-setting.c), but I am not able to do it. Please let me know, how can I get the debug statements from this file? > The value can be changed by writing to > /sys/block/sdX/device/max_sectors (where X is the drive letter). Note > that this value is in 512-byte blocks, not in KB. However it is > limited to SCSI_DEFAULT_MAX_SECTORS, which is 1024, corresponding to > 512 MB. If larger transfers are needed then > drivers/usb/storage/scsiglue.c:store_max_sectors() must be changed. I have chaged the value in /sys/block/sdb/queue/max_sectors_kb through echo command. Even after this change, I have received only 1024 sectors (512 KB) data transfer buffers in my SCSI command. Even I have modified the store_max_sectors() function code in the scsiglue.c file. But, there is no luck and still I received 1024 sectors (512 KB) transfer buffers in the scsi_command. Please let me know, if you need any additional information. Thanks and Regards, RD. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html