- Revert arguments for several functions to pre bus_get_dma_tag()
changes. Each softc contains information about their own device_t, use that instead. - bus_setup_intr() -> snd_setup_intr().
This commit is contained in:
parent
2cc08b748c
commit
5583760956
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166919
@ -157,7 +157,7 @@ struct {
|
||||
*/
|
||||
|
||||
/* stuff */
|
||||
static int ds_init(struct sc_info *, device_t);
|
||||
static int ds_init(struct sc_info *);
|
||||
static void ds_intr(void *);
|
||||
|
||||
/* talk to the card */
|
||||
@ -785,7 +785,7 @@ ds_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
|
||||
}
|
||||
|
||||
static int
|
||||
ds_init(struct sc_info *sc, device_t dev)
|
||||
ds_init(struct sc_info *sc)
|
||||
{
|
||||
int i;
|
||||
u_int32_t *ci, r, pcs, rcs, ecs, ws, memsz, cb;
|
||||
@ -833,7 +833,7 @@ ds_init(struct sc_info *sc, device_t dev)
|
||||
memsz += (64 + 1) * 4;
|
||||
|
||||
if (sc->regbase == NULL) {
|
||||
if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0,
|
||||
if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 2, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT,
|
||||
BUS_SPACE_MAXADDR,
|
||||
NULL, NULL, memsz, 1, memsz, 0, NULL,
|
||||
@ -985,7 +985,7 @@ ds_pci_attach(device_t dev)
|
||||
}
|
||||
|
||||
sc->regbase = NULL;
|
||||
if (ds_init(sc, dev) == -1) {
|
||||
if (ds_init(sc) == -1) {
|
||||
device_printf(dev, "unable to initialize the card\n");
|
||||
goto bad;
|
||||
}
|
||||
@ -1053,7 +1053,7 @@ ds_pci_resume(device_t dev)
|
||||
|
||||
sc = pcm_getdevinfo(dev);
|
||||
|
||||
if (ds_init(sc, dev) == -1) {
|
||||
if (ds_init(sc) == -1) {
|
||||
device_printf(dev, "unable to reinitialize the card\n");
|
||||
return ENXIO;
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ static void emu_addefxop(struct emu_sc_info *sc, unsigned int op, unsigned int z
|
||||
static void emu_initefx(struct emu_sc_info *sc);
|
||||
|
||||
static int emu_cardbus_init(struct emu_sc_info *sc);
|
||||
static int emu_init(struct emu_sc_info *sc, device_t dev);
|
||||
static int emu_init(struct emu_sc_info *sc);
|
||||
static int emu_uninit(struct emu_sc_info *sc);
|
||||
|
||||
static int emu_read_ivar(device_t bus __unused, device_t dev, int ivar_index, uintptr_t * result);
|
||||
@ -2338,7 +2338,7 @@ emu_cardbus_init(struct emu_sc_info *sc)
|
||||
|
||||
/* Probe and attach the card */
|
||||
static int
|
||||
emu_init(struct emu_sc_info *sc, device_t dev)
|
||||
emu_init(struct emu_sc_info *sc)
|
||||
{
|
||||
uint32_t ch, tmp;
|
||||
uint32_t spdif_sr;
|
||||
@ -2385,7 +2385,7 @@ emu_init(struct emu_sc_info *sc, device_t dev)
|
||||
emu_wrptr(sc, 0, SPBYPASS, 0xf00); /* What will happen if
|
||||
* we write 1 here? */
|
||||
|
||||
if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev),
|
||||
if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(sc->dev),
|
||||
/* alignment */ 2, /* boundary */ 0,
|
||||
/* lowaddr */ 1 << 31, /* can only access 0-2gb */
|
||||
/* highaddr */ BUS_SPACE_MAXADDR,
|
||||
@ -2835,7 +2835,7 @@ emu_pci_attach(device_t dev)
|
||||
|
||||
i = 0;
|
||||
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE);
|
||||
if ((sc->irq == NULL) || bus_setup_intr(dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV, NULL, emu_intr, sc, &sc->ih)) {
|
||||
if ((sc->irq == NULL) || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
|
||||
device_printf(dev, "unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
@ -2854,7 +2854,7 @@ emu_pci_attach(device_t dev)
|
||||
sc->root = device_get_sysctl_tree(dev);
|
||||
if (sc->root == NULL)
|
||||
goto bad;
|
||||
if (emu_init(sc, dev) == -1) {
|
||||
if (emu_init(sc) == -1) {
|
||||
device_printf(dev, "unable to initialize the card\n");
|
||||
goto bad;
|
||||
}
|
||||
|
@ -2301,7 +2301,7 @@ envy24_init(struct sc_info *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
envy24_alloc_resource(struct sc_info *sc, device_t dev)
|
||||
envy24_alloc_resource(struct sc_info *sc)
|
||||
{
|
||||
/* allocate I/O port resource */
|
||||
sc->csid = PCIR_CCS;
|
||||
@ -2348,7 +2348,8 @@ envy24_alloc_resource(struct sc_info *sc, device_t dev)
|
||||
}
|
||||
|
||||
/* allocate DMA resource */
|
||||
if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/4,
|
||||
if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
|
||||
/*alignment*/4,
|
||||
/*boundary*/0,
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
|
||||
@ -2395,7 +2396,7 @@ envy24_pci_attach(device_t dev)
|
||||
data = pci_read_config(dev, PCIR_COMMAND, 2);
|
||||
|
||||
/* allocate resources */
|
||||
err = envy24_alloc_resource(sc, dev);
|
||||
err = envy24_alloc_resource(sc);
|
||||
if (err) {
|
||||
device_printf(dev, "unable to allocate system resources\n");
|
||||
goto bad;
|
||||
|
@ -2332,7 +2332,7 @@ envy24ht_init(struct sc_info *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
envy24ht_alloc_resource(struct sc_info *sc, device_t dev)
|
||||
envy24ht_alloc_resource(struct sc_info *sc)
|
||||
{
|
||||
/* allocate I/O port resource */
|
||||
sc->csid = PCIR_CCS;
|
||||
@ -2367,7 +2367,8 @@ envy24ht_alloc_resource(struct sc_info *sc, device_t dev)
|
||||
}
|
||||
|
||||
/* allocate DMA resource */
|
||||
if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/4,
|
||||
if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(sc->dev),
|
||||
/*alignment*/4,
|
||||
/*boundary*/0,
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_ENVY24,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR_ENVY24,
|
||||
@ -2414,7 +2415,7 @@ envy24ht_pci_attach(device_t dev)
|
||||
data = pci_read_config(dev, PCIR_COMMAND, 2);
|
||||
|
||||
/* allocate resources */
|
||||
err = envy24ht_alloc_resource(sc, dev);
|
||||
err = envy24ht_alloc_resource(sc);
|
||||
if (err) {
|
||||
device_printf(dev, "unable to allocate system resources\n");
|
||||
goto bad;
|
||||
|
Loading…
Reference in New Issue
Block a user