diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:07 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:07 -0400 |
commit | 9ffcf364f9d0aca3ea79e9987c368eb75925460e (patch) | |
tree | 2916b96c1c020acd5ce19aa07fce0d6790567916 /include/linux/ide.h | |
parent | 47b687882c02f802dd5bbe1227effe006820246e (diff) |
ide: remove ->init_setup_dma from ide_pci_device_t (take 2)
* Make ide_pci_device_t.host_flags u32 and add IDE_HFLAG_CS5520 host flag.
* Pass ide_pci_device_t *d to setup-pci.c::ide_get_or_set_dma_base()
and use d->name instead of hwif->cds->name.
* Set IDE_HFLAG_CS5520 host flag in cs5520 host driver and use it in
ide_get_or_set_dma_base() to find out which PCI BAR to use, remove no longer
needed cs5520.c::cs5520_init_setup_dma() and ide_pci_device_t.init_setup_dma.
This fixes PCI bus-mastering not being checked for CS5510/CS5520 hosts.
v2:
* It is wrong to check simplex bits on CS5510/CS5520 as v1 did.
(Noticed by Alan).
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 6f375e044c3e..b721f0b379f6 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1252,6 +1252,8 @@ enum { | |||
1252 | IDE_HFLAG_NO_DMA = (1 << 14), | 1252 | IDE_HFLAG_NO_DMA = (1 << 14), |
1253 | /* check if host is PCI IDE device before allowing DMA */ | 1253 | /* check if host is PCI IDE device before allowing DMA */ |
1254 | IDE_HFLAG_NO_AUTODMA = (1 << 15), | 1254 | IDE_HFLAG_NO_AUTODMA = (1 << 15), |
1255 | /* host is CS5510/CS5520 */ | ||
1256 | IDE_HFLAG_CS5520 = (1 << 16), | ||
1255 | }; | 1257 | }; |
1256 | 1258 | ||
1257 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1259 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1263,7 +1265,6 @@ enum { | |||
1263 | typedef struct ide_pci_device_s { | 1265 | typedef struct ide_pci_device_s { |
1264 | char *name; | 1266 | char *name; |
1265 | int (*init_setup)(struct pci_dev *, struct ide_pci_device_s *); | 1267 | int (*init_setup)(struct pci_dev *, struct ide_pci_device_s *); |
1266 | void (*init_setup_dma)(struct pci_dev *, struct ide_pci_device_s *, ide_hwif_t *); | ||
1267 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1268 | unsigned int (*init_chipset)(struct pci_dev *, const char *); |
1268 | void (*init_iops)(ide_hwif_t *); | 1269 | void (*init_iops)(ide_hwif_t *); |
1269 | void (*init_hwif)(ide_hwif_t *); | 1270 | void (*init_hwif)(ide_hwif_t *); |
@@ -1272,7 +1273,7 @@ typedef struct ide_pci_device_s { | |||
1272 | ide_pci_enablebit_t enablebits[2]; | 1273 | ide_pci_enablebit_t enablebits[2]; |
1273 | unsigned int extra; | 1274 | unsigned int extra; |
1274 | struct ide_pci_device_s *next; | 1275 | struct ide_pci_device_s *next; |
1275 | u16 host_flags; | 1276 | u32 host_flags; |
1276 | u8 pio_mask; | 1277 | u8 pio_mask; |
1277 | u8 udma_mask; | 1278 | u8 udma_mask; |
1278 | } ide_pci_device_t; | 1279 | } ide_pci_device_t; |