|
@@ -684,23 +684,23 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
|
|
|
if (sdev->id < ATA_MAX_DEVICES) {
|
|
|
struct ata_port *ap;
|
|
|
struct ata_device *dev;
|
|
|
+ unsigned int max_sectors;
|
|
|
|
|
|
ap = (struct ata_port *) &sdev->host->hostdata[0];
|
|
|
dev = &ap->device[sdev->id];
|
|
|
|
|
|
- /* TODO: 1024 is an arbitrary number, not the
|
|
|
+ /* TODO: 2048 is an arbitrary number, not the
|
|
|
* hardware maximum. This should be increased to
|
|
|
* 65534 when Jens Axboe's patch for dynamically
|
|
|
* determining max_sectors is merged.
|
|
|
*/
|
|
|
- if ((dev->flags & ATA_DFLAG_LBA48) &&
|
|
|
- ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) {
|
|
|
- /*
|
|
|
- * do not overwrite sdev->host->max_sectors, since
|
|
|
- * other drives on this host may not support LBA48
|
|
|
- */
|
|
|
- blk_queue_max_sectors(sdev->request_queue, 2048);
|
|
|
- }
|
|
|
+ max_sectors = ATA_MAX_SECTORS;
|
|
|
+ if (dev->flags & ATA_DFLAG_LBA48)
|
|
|
+ max_sectors = 2048;
|
|
|
+ if (dev->max_sectors)
|
|
|
+ max_sectors = dev->max_sectors;
|
|
|
+
|
|
|
+ blk_queue_max_sectors(sdev->request_queue, max_sectors);
|
|
|
|
|
|
/*
|
|
|
* SATA DMA transfers must be multiples of 4 byte, so
|