OSDN Git Service

[PATCH] libata: stop setting sdev->host->max_sectors for lba48 drives
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 12 May 2005 19:49:54 +0000 (15:49 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Sun, 15 May 2005 22:01:22 +0000 (18:01 -0400)
Avoid changing sdev->host->max_sectors because it can prevent use of
non-lba48 drives on other ports of the same adapter.

Signed-off-by: Stuart Hayes <stuart_hayes@Dell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/scsi/libata-scsi.c

index 4c96df0..416ba67 100644 (file)
@@ -347,7 +347,10 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
                 */
                if ((dev->flags & ATA_DFLAG_LBA48) &&
                    ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) {
-                       sdev->host->max_sectors = 2048;
+                       /*
+                        * 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);
                }
        }