ia64/xen-unstable

changeset 10171:ad33b3882867

Fix IDE CD-drive PIO mode.
CD drives in PIO mode don't work under Xen because of a change in Linux
between 2.6.12 and 2.6.16, as a result of the following thread:
http://lists.parisc-linux.org/pipermail/parisc-linux/2005-August/027197.html

The change breaks systems which have highmem and a swiotlb because the
ide-cd driver doesn't use the swiotlb, resulting in read/writes to/from
highmem pages in PIO mode not working any longer. Xen kernels usually have
both highmem and a swiotlb.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed May 24 19:41:47 2006 +0100 (2006-05-24)
parents 2436cc71de50
children e0bbba2b9850
files patches/linux-2.6.16.13/fix-ide-cd-pio-mode.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/linux-2.6.16.13/fix-ide-cd-pio-mode.patch	Wed May 24 19:41:47 2006 +0100
     1.3 @@ -0,0 +1,18 @@
     1.4 +diff -ru ../pristine-linux-2.6.16.13/drivers/ide/ide-lib.c ./drivers/ide/ide-lib.c
     1.5 +--- ../pristine-linux-2.6.16.13/drivers/ide/ide-lib.c	2006-05-02 22:38:44.000000000 +0100
     1.6 ++++ ./drivers/ide/ide-lib.c	2006-05-24 18:37:05.000000000 +0100
     1.7 +@@ -410,10 +410,10 @@
     1.8 + {
     1.9 + 	u64 addr = BLK_BOUNCE_HIGH;	/* dma64_addr_t */
    1.10 + 
    1.11 +-	if (!PCI_DMA_BUS_IS_PHYS) {
    1.12 +-		addr = BLK_BOUNCE_ANY;
    1.13 +-	} else if (on && drive->media == ide_disk) {
    1.14 +-		if (HWIF(drive)->pci_dev)
    1.15 ++	if (on && drive->media == ide_disk) {
    1.16 ++		if (!PCI_DMA_BUS_IS_PHYS)
    1.17 ++			addr = BLK_BOUNCE_ANY;
    1.18 ++		else if (HWIF(drive)->pci_dev)
    1.19 + 			addr = HWIF(drive)->pci_dev->dma_mask;
    1.20 + 	}
    1.21 +