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>
This commit is contained in:
@@ -1252,6 +1252,8 @@ enum {
|
||||
IDE_HFLAG_NO_DMA = (1 << 14),
|
||||
/* check if host is PCI IDE device before allowing DMA */
|
||||
IDE_HFLAG_NO_AUTODMA = (1 << 15),
|
||||
/* host is CS5510/CS5520 */
|
||||
IDE_HFLAG_CS5520 = (1 << 16),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_OFFBOARD
|
||||
@@ -1263,7 +1265,6 @@ enum {
|
||||
typedef struct ide_pci_device_s {
|
||||
char *name;
|
||||
int (*init_setup)(struct pci_dev *, struct ide_pci_device_s *);
|
||||
void (*init_setup_dma)(struct pci_dev *, struct ide_pci_device_s *, ide_hwif_t *);
|
||||
unsigned int (*init_chipset)(struct pci_dev *, const char *);
|
||||
void (*init_iops)(ide_hwif_t *);
|
||||
void (*init_hwif)(ide_hwif_t *);
|
||||
@@ -1272,7 +1273,7 @@ typedef struct ide_pci_device_s {
|
||||
ide_pci_enablebit_t enablebits[2];
|
||||
unsigned int extra;
|
||||
struct ide_pci_device_s *next;
|
||||
u16 host_flags;
|
||||
u32 host_flags;
|
||||
u8 pio_mask;
|
||||
u8 udma_mask;
|
||||
} ide_pci_device_t;
|
||||
|
Reference in New Issue
Block a user