diff options
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r-- | drivers/ide/pci/slc90e66.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index bf21f1dfb7b5..106ca7942cec 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/slc90e66.c Version 0.17 Aug 2, 2007 | 2 | * linux/drivers/ide/pci/slc90e66.c Version 0.18 Aug 9, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -82,7 +82,6 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
82 | int sitre = 0, a_speed = 7 << (drive->dn * 4); | 82 | int sitre = 0, a_speed = 7 << (drive->dn * 4); |
83 | int u_speed = 0, u_flag = 1 << drive->dn; | 83 | int u_speed = 0, u_flag = 1 << drive->dn; |
84 | u16 reg4042, reg44, reg48, reg4a; | 84 | u16 reg4042, reg44, reg48, reg4a; |
85 | u8 pio; | ||
86 | 85 | ||
87 | pci_read_config_word(dev, maslave, ®4042); | 86 | pci_read_config_word(dev, maslave, ®4042); |
88 | sitre = (reg4042 & 0x4000) ? 1 : 0; | 87 | sitre = (reg4042 & 0x4000) ? 1 : 0; |
@@ -111,10 +110,9 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
111 | pci_read_config_word(dev, 0x4a, ®4a); | 110 | pci_read_config_word(dev, 0x4a, ®4a); |
112 | pci_write_config_word(dev, 0x4a, reg4a|u_speed); | 111 | pci_write_config_word(dev, 0x4a, reg4a|u_speed); |
113 | } | 112 | } |
114 | |||
115 | pio = 4; | ||
116 | } else { | 113 | } else { |
117 | const u8 mwdma_to_pio[] = { 0, 3, 4 }; | 114 | const u8 mwdma_to_pio[] = { 0, 3, 4 }; |
115 | u8 pio; | ||
118 | 116 | ||
119 | if (reg48 & u_flag) | 117 | if (reg48 & u_flag) |
120 | pci_write_config_word(dev, 0x48, reg48 & ~u_flag); | 118 | pci_write_config_word(dev, 0x48, reg48 & ~u_flag); |
@@ -125,9 +123,9 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
125 | pio = mwdma_to_pio[speed - XFER_MW_DMA_0]; | 123 | pio = mwdma_to_pio[speed - XFER_MW_DMA_0]; |
126 | else | 124 | else |
127 | pio = 2; /* only SWDMA2 is allowed */ | 125 | pio = 2; /* only SWDMA2 is allowed */ |
128 | } | ||
129 | 126 | ||
130 | slc90e66_set_pio_mode(drive, pio); | 127 | slc90e66_set_pio_mode(drive, pio); |
128 | } | ||
131 | } | 129 | } |
132 | 130 | ||
133 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) | 131 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) |