---559023410-959030623-1025032496=:27820
Content-Type: TEXT/PLAIN; charset=US-ASCII
- add udma_generic_setup() to pcidma.c, which
- equals functionality of driver specific udma_setup()
and config_chipset_for_dma()
- makes use of ch->modes_map, ch->no_atapi_autodma
and ch->speedproc()/tuneproc()
- auto-tunes PIO only if we failed to enable DMA
(PIO auto-tuning is already handled by ch->tuneproc()
call in probe.c, it is controlled separetly of autodma)
- convert aec62xx.c, amd74xx.c, cmd64x.c, hpt34x.c, piix.c,
serverworks.c, sis5513.c and via82cxxx.c to new scheme
- this has nice side effect of teaching aec, amd, piix and via
drivers using DMA blacklist/whitelist
-- Bartlomiej Zolnierkiewicz---559023410-959030623-1025032496=:27820 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ata-hosts-8.diff" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.SOL.4.30.0206252114560.27820@mion.elka.pw.edu.pl> Content-Description: Content-Disposition: attachment; filename="ata-hosts-8.diff"
ZGlmZiAtdXIgbGludXgtYXRhLWhvc3RzLTcvaW5jbHVkZS9saW51eC9pZGUu aCBsaW51eC9pbmNsdWRlL2xpbnV4L2lkZS5oDQotLS0gbGludXgtYXRhLWhv c3RzLTcvaW5jbHVkZS9saW51eC9pZGUuaAlNb24gSnVuIDI0IDIyOjI0OjMw IDIwMDINCisrKyBsaW51eC9pbmNsdWRlL2xpbnV4L2lkZS5oCU1vbiBKdW4g MjQgMjI6MzU6MTAgMjAwMg0KQEAgLTgwMSw2ICs4MDEsOCBAQA0KIGV4dGVy biB2b2lkIHVkbWFfcGNpX2lycV9sb3N0KHN0cnVjdCBhdGFfZGV2aWNlICop Ow0KIGV4dGVybiBpbnQgdWRtYV9wY2lfc2V0dXAoc3RydWN0IGF0YV9kZXZp Y2UgKik7DQogDQorZXh0ZXJuIGludCB1ZG1hX2dlbmVyaWNfc2V0dXAoc3Ry dWN0IGF0YV9kZXZpY2UgKik7DQorDQogZXh0ZXJuIGludCB1ZG1hX25ld190 YWJsZShzdHJ1Y3QgY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YV9jb25maWctPmZsYWdzICYgVklBX1VETUEpID49IFZJQV9V RE1BXzY2ID8gWEZFUl9VRE1BXzY2IDogMCkgfA0KLQkJCSh3ODAgJiYgKHZp YV9jb25maWctPmZsYWdzICYgVklBX1VETUEpID49IFZJQV9VRE1BXzEwMCA/ IFhGRVJfVURNQV8xMDAgOiAwKSB8DQotCQkJKHc4MCAmJiAodmlhX2NvbmZp Zy0+ZmxhZ3MgJiBWSUFfVURNQSkgPj0gVklBX1VETUFfMTMzID8gWEZFUl9V RE1BXzEzMyA6IDApKTsNCi0NCi0JdmlhX3NldF9kcml2ZShkcml2ZSwgc3Bl ZWQpOw0KLQ0KLQl1ZG1hX2VuYWJsZShkcml2ZSwgZHJpdmUtPmNoYW5uZWwt PmF1dG9kbWEgJiYgKHNwZWVkICYgWEZFUl9NT0RFKSAhPSBYRkVSX1BJTywg MCk7DQotDQotCXJldHVybiAwOw0KKwlyZXR1cm4gbWFwOw0KIH0NCiAjZW5k aWYNCiANCkBAIC0zNjYsNyArMzYwLDggQEANCiAjaWZkZWYgQ09ORklHX0JM S19ERVZfSURFRE1BDQogCWlmIChod2lmLT5kbWFfYmFzZSkgew0KIAkJaHdp Zi0+aGlnaG1lbSA9IDE7DQotCQlod2lmLT51ZG1hX3NldHVwID0gdmlhODJj eHh4X3VkbWFfc2V0dXA7DQorCQlod2lmLT5tb2Rlc19tYXAgPSB2aWFfbW9k ZXNfbWFwKGh3aWYpOw0KKwkJaHdpZi0+dWRtYV9zZXR1cCA9IHVkbWFfZ2Vu ZXJpY19zZXR1cDsNCiAjIGlmZGVmIENPTkZJR19JREVETUFfQVVUTw0KIAkJ aWYgKCFub2F1dG9kbWEpDQogCQkJaHdpZi0+YXV0b2RtYSA9IDE7DQo= ---559023410-959030623-1025032496=:27820-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/