Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185409
b: refs/heads/master
c: 49d6271
h: refs/heads/master
i:
  185407: 463f9b2
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent ea7a118 commit 4bfed83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efe7daf2231a6beb59f0f641461d19fa62fb83ab
refs/heads/master: 49d6271b85a3e18062eaf4d6f8d899abe00a7725
10 changes: 5 additions & 5 deletions trunk/drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int slave_configure(struct scsi_device *sdev)

if (us->fflags & US_FL_MAX_SECTORS_MIN)
max_sectors = PAGE_CACHE_SIZE >> 9;
if (queue_max_sectors(sdev->request_queue) > max_sectors)
if (queue_max_hw_sectors(sdev->request_queue) > max_sectors)
blk_queue_max_hw_sectors(sdev->request_queue,
max_sectors);
} else if (sdev->type == TYPE_TAPE) {
Expand Down Expand Up @@ -484,7 +484,7 @@ static ssize_t show_max_sectors(struct device *dev, struct device_attribute *att
{
struct scsi_device *sdev = to_scsi_device(dev);

return sprintf(buf, "%u\n", queue_max_sectors(sdev->request_queue));
return sprintf(buf, "%u\n", queue_max_hw_sectors(sdev->request_queue));
}

/* Input routine for the sysfs max_sectors file */
Expand All @@ -494,9 +494,9 @@ static ssize_t store_max_sectors(struct device *dev, struct device_attribute *at
struct scsi_device *sdev = to_scsi_device(dev);
unsigned short ms;

if (sscanf(buf, "%hu", &ms) > 0 && ms <= SCSI_DEFAULT_MAX_SECTORS) {
if (sscanf(buf, "%hu", &ms) > 0) {
blk_queue_max_hw_sectors(sdev->request_queue, ms);
return strlen(buf);
return count;
}
return -EINVAL;
}
Expand Down Expand Up @@ -539,7 +539,7 @@ struct scsi_host_template usb_stor_host_template = {
.slave_configure = slave_configure,

/* lots of sg segments can be handled */
.sg_tablesize = SG_ALL,
.sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS,

/* limit the total size of a transfer to 120 KB */
.max_sectors = 240,
Expand Down

0 comments on commit 4bfed83

Please sign in to comment.