Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
cs5536: define dma_sff_read_status() method
ide: fix barriers support
ide: Remove void casts
hpt366: use ATA_DMA_* constants
hpt366: fix HPT370 DMA timeouts

+17 -11
+1
drivers/ide/cs5536.c
··· 236 236 .dma_test_irq = ide_dma_test_irq, 237 237 .dma_lost_irq = ide_dma_lost_irq, 238 238 .dma_timer_expiry = ide_dma_sff_timer_expiry, 239 + .dma_sff_read_status = ide_dma_sff_read_status, 239 240 }; 240 241 241 242 static const struct ide_port_info cs5536_info = {
+8 -6
drivers/ide/hpt366.c
··· 3 3 * Portions Copyright (C) 2001 Sun Microsystems, Inc. 4 4 * Portions Copyright (C) 2003 Red Hat Inc 5 5 * Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz 6 - * Portions Copyright (C) 2005-2008 MontaVista Software, Inc. 6 + * Portions Copyright (C) 2005-2009 MontaVista Software, Inc. 7 7 * 8 8 * Thanks to HighPoint Technologies for their assistance, and hardware. 9 9 * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his ··· 114 114 * the register setting lists into the table indexed by the clock selected 115 115 * - set the correct hwif->ultra_mask for each individual chip 116 116 * - add Ultra and MW DMA mode filtering for the HPT37[24] based SATA cards 117 + * - stop resetting HPT370's state machine before each DMA transfer as that has 118 + * caused more harm than good 117 119 * Sergei Shtylyov, <sshtylyov@ru.mvista.com> or <source@mvista.com> 118 120 */ 119 121 ··· 135 133 #define DRV_NAME "hpt366" 136 134 137 135 /* various tuning parameters */ 138 - #define HPT_RESET_STATE_ENGINE 136 + #undef HPT_RESET_STATE_ENGINE 139 137 #undef HPT_DELAY_INTERRUPT 140 138 141 139 static const char *quirk_drives[] = { ··· 810 808 /* get DMA command mode */ 811 809 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); 812 810 /* stop DMA */ 813 - outb(dma_cmd & ~0x1, hwif->dma_base + ATA_DMA_CMD); 811 + outb(dma_cmd & ~ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD); 814 812 hpt370_clear_engine(drive); 815 813 } 816 814 ··· 827 825 ide_hwif_t *hwif = drive->hwif; 828 826 u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); 829 827 830 - if (dma_stat & 0x01) { 828 + if (dma_stat & ATA_DMA_ACTIVE) { 831 829 /* wait a little */ 832 830 udelay(20); 833 831 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); 834 - if (dma_stat & 0x01) 832 + if (dma_stat & ATA_DMA_ACTIVE) 835 833 hpt370_irq_timeout(drive); 836 834 } 837 835 return ide_dma_end(drive); ··· 853 851 854 852 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); 855 853 /* return 1 if INTR asserted */ 856 - if (dma_stat & 4) 854 + if (dma_stat & ATA_DMA_INTR) 857 855 return 1; 858 856 859 857 return 0;
+7 -4
drivers/ide/ide-io.c
··· 102 102 drive->dev_flags |= IDE_DFLAG_PARKED; 103 103 } 104 104 105 - if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) 106 - memcpy(rq->special, cmd, sizeof(*cmd)); 105 + if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { 106 + struct ide_cmd *orig_cmd = rq->special; 107 107 108 - if (cmd->tf_flags & IDE_TFLAG_DYN) 109 - kfree(cmd); 108 + if (cmd->tf_flags & IDE_TFLAG_DYN) 109 + kfree(orig_cmd); 110 + else 111 + memcpy(orig_cmd, cmd, sizeof(*cmd)); 112 + } 110 113 } 111 114 112 115 /* obsolete, blk_rq_bytes() should be used instead */
+1 -1
drivers/ide/pmac.c
··· 1682 1682 * The +2 is +1 for the stop command and +1 to allow for 1683 1683 * aligning the start address to a multiple of 16 bytes. 1684 1684 */ 1685 - pmif->dma_table_cpu = (struct dbdma_cmd*)pci_alloc_consistent( 1685 + pmif->dma_table_cpu = pci_alloc_consistent( 1686 1686 dev, 1687 1687 (MAX_DCMDS + 2) * sizeof(struct dbdma_cmd), 1688 1688 &hwif->dmatable_dma);