diff options
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 3628fedc9865..86da46502b3e 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -684,23 +684,23 @@ int ata_scsi_slave_config(struct scsi_device *sdev) | |||
684 | if (sdev->id < ATA_MAX_DEVICES) { | 684 | if (sdev->id < ATA_MAX_DEVICES) { |
685 | struct ata_port *ap; | 685 | struct ata_port *ap; |
686 | struct ata_device *dev; | 686 | struct ata_device *dev; |
687 | unsigned int max_sectors; | ||
687 | 688 | ||
688 | ap = (struct ata_port *) &sdev->host->hostdata[0]; | 689 | ap = (struct ata_port *) &sdev->host->hostdata[0]; |
689 | dev = &ap->device[sdev->id]; | 690 | dev = &ap->device[sdev->id]; |
690 | 691 | ||
691 | /* TODO: 1024 is an arbitrary number, not the | 692 | /* TODO: 2048 is an arbitrary number, not the |
692 | * hardware maximum. This should be increased to | 693 | * hardware maximum. This should be increased to |
693 | * 65534 when Jens Axboe's patch for dynamically | 694 | * 65534 when Jens Axboe's patch for dynamically |
694 | * determining max_sectors is merged. | 695 | * determining max_sectors is merged. |
695 | */ | 696 | */ |
696 | if ((dev->flags & ATA_DFLAG_LBA48) && | 697 | max_sectors = ATA_MAX_SECTORS; |
697 | ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) { | 698 | if (dev->flags & ATA_DFLAG_LBA48) |
698 | /* | 699 | max_sectors = 2048; |
699 | * do not overwrite sdev->host->max_sectors, since | 700 | if (dev->max_sectors) |
700 | * other drives on this host may not support LBA48 | 701 | max_sectors = dev->max_sectors; |
701 | */ | 702 | |
702 | blk_queue_max_sectors(sdev->request_queue, 2048); | 703 | blk_queue_max_sectors(sdev->request_queue, max_sectors); |
703 | } | ||
704 | 704 | ||
705 | /* | 705 | /* |
706 | * SATA DMA transfers must be multiples of 4 byte, so | 706 | * SATA DMA transfers must be multiples of 4 byte, so |