Skip to contentSkip to conversation

libata: stop setting sdev->host->max_sectors for lba48 drives

PATCH Applied John W. Linville 2 participants 2 messages May 12, 2005 – May 15, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata: stop setting sdev->host->max_sectors for lba48 drives

Avoid changing sdev->host->max_sectors because it can prevent use of non-lba48 drives on other ports of the same adapter.

---

 drivers/scsi/libata-scsi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/libata-scsi.c renamed from drivers/scsi/libata-scsi.c.orig +4 -1
@@ -347,7 +347,10 @@ int ata_scsi_slave_config(struct scsi_de
 		 */
 		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);
 		}
 	}
Signature · 2 lines
John W. Linville
[email protected]