On Saturday 12 July 2008 23:42:10 Ondrej Zary wrote:The patch below fixes the IDENTIFY problem for me and makes the RAID array accessible. Is it OK or is there a better way to do it? --- linux-2.6.25.3-orig/drivers/ata/libata-core.c 2008-07-13 12:27:56.000000000 +0200 +++ linux-2.6.25.3-pentium/drivers/ata/libata-core.c 2008-07-13 13:30:51.000000000 +0200 @@ -2217,7 +2217,8 @@ * Note that ATA4 says lba is mandatory so the second check * shoud never trigger. */ - if (ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) { + if ((ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) && + id[3] != 0 && id[6] != 0) { err_mask = ata_dev_init_params(dev, id[3], id[6]); if (err_mask) { rc = -EIO; @@ -2375,18 +2376,23 @@ "not be fully accessable.\n"); } - dev->n_sectors = ata_id_n_sectors(id); + if (dev->horkage & ATA_HORKAGE_LBA48_FORCE) + dev->n_sectors = ata_id_u64(id, 100); + else + dev->n_sectors = ata_id_n_sectors(id); if (dev->id[59] & 0x100) dev->multi_count = dev->id[59] & 0xff; - if (ata_id_has_lba(id)) { + if (ata_id_has_lba(id) || + dev->horkage & ATA_HORKAGE_LBA48_FORCE) { const char *lba_desc; char ncq_desc[20]; lba_desc = "LBA"; dev->flags |= ATA_DFLAG_LBA; - if (ata_id_has_lba48(id)) { + if (ata_id_has_lba48(id) || + dev->horkage & ATA_HORKAGE_LBA48_FORCE) { dev->flags |= ATA_DFLAG_LBA48; lba_desc = "LBA48"; @@ -4452,6 +4458,9 @@ { "TSSTcorp CDDVDW SH-S202N", "SB00", ATA_HORKAGE_IVB, }, { "TSSTcorp CDDVDW SH-S202N", "SB01", ATA_HORKAGE_IVB, }, + /* Has LBA48 but advertises neither LBA nor LBA48 */ + { "Integrated Technology Express Inc", NULL, ATA_HORKAGE_LBA48_FORCE, }, + /* End Marker */ { } }; --- linux-2.6.25.3-orig/include/linux/libata.h 2008-07-13 12:28:50.000000000 +0200 +++ linux-2.6.25.3-pentium/include/linux/libata.h 2008-07-13 11:29:39.000000000 +0200 @@ -339,6 +339,7 @@ ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ + ATA_HORKAGE_LBA48_FORCE = (1 << 10), /* Has hidden LBA48 */ /* DMA mask for user DMA control: User visible values; DO NOT renumber */ -- Ondrej Zary --
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Martin Michlmayr | Network slowdown due to CFS |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Christos Zoulas | Re: Boot device confusion |
| Manuel Bouyer | Re: NFSv3 bug |
| Anders Magnusson | Re: setsockopt() compat issue |
| Martin Husemann | Re: Compressed vnd handling tested successfully |
