aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-disk.c8
-rw-r--r--drivers/ide/ide-probe.c3
-rw-r--r--drivers/ide/ide.c1
-rw-r--r--drivers/ide/pci/alim15x3.c3
-rw-r--r--drivers/ide/pci/trm290.c4
5 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 92177ca48b4d..2722d9165b6b 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -169,7 +169,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
169 169
170 nsectors.all = (u16) rq->nr_sectors; 170 nsectors.all = (u16) rq->nr_sectors;
171 171
172 if (hwif->no_lba48_dma && lba48 && dma) { 172 if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) {
173 if (block + rq->nr_sectors > 1ULL << 28) 173 if (block + rq->nr_sectors > 1ULL << 28)
174 dma = 0; 174 dma = 0;
175 else 175 else
@@ -856,7 +856,7 @@ static int set_lba_addressing(ide_drive_t *drive, int arg)
856 856
857 drive->addressing = 0; 857 drive->addressing = 0;
858 858
859 if (HWIF(drive)->no_lba48) 859 if (drive->hwif->host_flags & IDE_HFLAG_NO_LBA48)
860 return 0; 860 return 0;
861 861
862 if (!idedisk_supports_lba48(drive->id)) 862 if (!idedisk_supports_lba48(drive->id))
@@ -889,6 +889,7 @@ static inline void idedisk_add_settings(ide_drive_t *drive) { ; }
889 889
890static void idedisk_setup (ide_drive_t *drive) 890static void idedisk_setup (ide_drive_t *drive)
891{ 891{
892 ide_hwif_t *hwif = drive->hwif;
892 struct hd_driveid *id = drive->id; 893 struct hd_driveid *id = drive->id;
893 unsigned long long capacity; 894 unsigned long long capacity;
894 895
@@ -909,7 +910,6 @@ static void idedisk_setup (ide_drive_t *drive)
909 (void)set_lba_addressing(drive, 1); 910 (void)set_lba_addressing(drive, 1);
910 911
911 if (drive->addressing == 1) { 912 if (drive->addressing == 1) {
912 ide_hwif_t *hwif = HWIF(drive);
913 int max_s = 2048; 913 int max_s = 2048;
914 914
915 if (max_s > hwif->rqsize) 915 if (max_s > hwif->rqsize)
@@ -932,7 +932,7 @@ static void idedisk_setup (ide_drive_t *drive)
932 drive->capacity64 = 1ULL << 28; 932 drive->capacity64 = 1ULL << 28;
933 } 933 }
934 934
935 if (drive->hwif->no_lba48_dma && drive->addressing) { 935 if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && drive->addressing) {
936 if (drive->capacity64 > 1ULL << 28) { 936 if (drive->capacity64 > 1ULL << 28) {
937 printk(KERN_INFO "%s: cannot use LBA48 DMA - PIO mode will" 937 printk(KERN_INFO "%s: cannot use LBA48 DMA - PIO mode will"
938 " be used for accessing sectors > %u\n", 938 " be used for accessing sectors > %u\n",
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 3c945d64d845..e294c7415c27 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -951,7 +951,8 @@ static int ide_init_queue(ide_drive_t *drive)
951 blk_queue_segment_boundary(q, 0xffff); 951 blk_queue_segment_boundary(q, 0xffff);
952 952
953 if (!hwif->rqsize) { 953 if (!hwif->rqsize) {
954 if (hwif->no_lba48 || hwif->no_lba48_dma) 954 if ((hwif->host_flags & IDE_HFLAG_NO_LBA48) ||
955 (hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA))
955 hwif->rqsize = 256; 956 hwif->rqsize = 256;
956 else 957 else
957 hwif->rqsize = 65536; 958 hwif->rqsize = 65536;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index f78943f86314..961e6c897286 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -437,7 +437,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
437 437
438 hwif->mmio = tmp_hwif->mmio; 438 hwif->mmio = tmp_hwif->mmio;
439 hwif->rqsize = tmp_hwif->rqsize; 439 hwif->rqsize = tmp_hwif->rqsize;
440 hwif->no_lba48 = tmp_hwif->no_lba48;
441 440
442#ifndef CONFIG_BLK_DEV_IDECS 441#ifndef CONFIG_BLK_DEV_IDECS
443 hwif->irq = tmp_hwif->irq; 442 hwif->irq = tmp_hwif->irq;
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 4e034acc61b3..79f572572ffb 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -665,7 +665,8 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
665 hwif->udma_filter = &ali_udma_filter; 665 hwif->udma_filter = &ali_udma_filter;
666 666
667 /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ 667 /* don't use LBA48 DMA on ALi devices before rev 0xC5 */
668 hwif->no_lba48_dma = (m5229_revision <= 0xC4) ? 1 : 0; 668 if (m5229_revision <= 0xC4)
669 hwif->host_flags |= IDE_HFLAG_NO_LBA48_DMA;
669 670
670 if (!hwif->dma_base) { 671 if (!hwif->dma_base) {
671 hwif->drives[0].autotune = 1; 672 hwif->drives[0].autotune = 1;
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index 783ef457eb60..140d486f6237 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -250,7 +250,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
250 u8 reg = 0; 250 u8 reg = 0;
251 struct pci_dev *dev = hwif->pci_dev; 251 struct pci_dev *dev = hwif->pci_dev;
252 252
253 hwif->no_lba48 = 1;
254 hwif->chipset = ide_trm290; 253 hwif->chipset = ide_trm290;
255 cfgbase = pci_resource_start(dev, 4); 254 cfgbase = pci_resource_start(dev, 4);
256 if ((dev->class & 5) && cfgbase) { 255 if ((dev->class & 5) && cfgbase) {
@@ -329,7 +328,8 @@ static ide_pci_device_t trm290_chipset __devinitdata = {
329 IDE_HFLAG_TRUST_BIOS_FOR_DMA | 328 IDE_HFLAG_TRUST_BIOS_FOR_DMA |
330#endif 329#endif
331 IDE_HFLAG_NO_AUTODMA | 330 IDE_HFLAG_NO_AUTODMA |
332 IDE_HFLAG_BOOTABLE, 331 IDE_HFLAG_BOOTABLE |
332 IDE_HFLAG_NO_LBA48,
333}; 333};
334 334
335static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) 335static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)