# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.583 -> 1.584 # include/linux/ide.h 1.16 -> 1.17 # drivers/ide/ide-dma.c 1.3 -> 1.4 # drivers/ide/ide-probe.c 1.12 -> 1.13 # drivers/ide/ide-lib.c 1.2 -> 1.3 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/19 axboe@burns.home.kernel.dk 1.584 # ide_toggle_bounce() was called prior to init'ing the block queue, # which then reset the bounce_pfn back to BLK_BOUNCE_HIGH. Make # ide_toggle_bounce() an ide-lib helper, and call it when setting up # the queue as well. # -------------------------------------------- # diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c --- a/drivers/ide/ide-dma.c Thu Sep 19 09:17:30 2002 +++ b/drivers/ide/ide-dma.c Thu Sep 19 09:17:30 2002 @@ -445,20 +445,6 @@ return 0; } -static void ide_toggle_bounce(ide_drive_t *drive, int on) -{ - u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */ - - if (on && drive->media == ide_disk) { - if (!PCI_DMA_BUS_IS_PHYS) - addr = BLK_BOUNCE_ANY; - else - addr = HWIF(drive)->pci_dev->dma_mask; - } - - blk_queue_bounce_limit(&drive->queue, addr); -} - int __ide_dma_host_off (ide_drive_t *drive) { ide_hwif_t *hwif = HWIF(drive); diff -Nru a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c --- a/drivers/ide/ide-lib.c Thu Sep 19 09:17:30 2002 +++ b/drivers/ide/ide-lib.c Thu Sep 19 09:17:30 2002 @@ -386,3 +386,19 @@ } EXPORT_SYMBOL_GPL(ide_get_best_pio_mode); + +void ide_toggle_bounce(ide_drive_t *drive, int on) +{ + u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */ + + if (on && drive->media == ide_disk) { + if (!PCI_DMA_BUS_IS_PHYS) + addr = BLK_BOUNCE_ANY; + else + addr = HWIF(drive)->pci_dev->dma_mask; + } + + blk_queue_bounce_limit(&drive->queue, addr); +} + +EXPORT_SYMBOL(ide_toggle_bounce); diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c --- a/drivers/ide/ide-probe.c Thu Sep 19 09:17:30 2002 +++ b/drivers/ide/ide-probe.c Thu Sep 19 09:17:30 2002 @@ -778,6 +778,8 @@ /* This is a driver limit and could be eliminated. */ blk_queue_max_phys_segments(q, PRD_ENTRIES); + + ide_toggle_bounce(drive, 1); } /* diff -Nru a/include/linux/ide.h b/include/linux/ide.h --- a/include/linux/ide.h Thu Sep 19 09:17:30 2002 +++ b/include/linux/ide.h Thu Sep 19 09:17:30 2002 @@ -1753,6 +1753,7 @@ extern u8 ide_rate_filter(u8 mode, u8 speed); extern int ide_dma_enable(ide_drive_t *drive); extern char *ide_xfer_verbose(u8 xfer_rate); +extern void ide_toggle_bounce(ide_drive_t *drive, int on); extern spinlock_t ide_lock;