FreeBSD Bugzilla – Attachment 9084 Details for
Bug 18744
fix newbus stuff for bktr driver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.67 KB, created by
Alexander Langer
on 2000-05-22 15:30:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Alexander Langer
Created:
2000-05-22 15:30:00 UTC
Size:
2.67 KB
patch
obsolete
>Index: bktr_os.c >=================================================================== >RCS file: /usr/home/ncvs/src/sys/dev/bktr/bktr_os.c,v >retrieving revision 1.7 >diff -u -r1.7 bktr_os.c >--- bktr_os.c 2000/04/16 07:50:09 1.7 >+++ bktr_os.c 2000/05/22 14:16:11 >@@ -274,7 +274,6 @@ > unsigned int rev; > unsigned int unit; > int error = 0; >- int rid; > #ifdef BROOKTREE_IRQ > u_long old_irq, new_irq; > #endif >@@ -293,8 +292,8 @@ > /* > * Map control/status registers. > */ >- rid = PCI_MAP_REG_START; >- bktr->res_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, >+ bktr->mem_rid = PCI_MAP_REG_START; >+ bktr->res_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &bktr->mem_rid, > 0, ~0, 1, RF_ACTIVE); > > if (!bktr->res_mem) { >@@ -324,9 +323,9 @@ > /* > * Allocate our interrupt. > */ >- rid = 0; >- bktr->res_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, >- RF_SHAREABLE | RF_ACTIVE); >+ bktr->irq_rid = 0; >+ bktr->res_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &bktr->irq_rid, >+ 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); > if (bktr->res_irq == NULL) { > device_printf(dev, "could not map interrupt\n"); > error = ENXIO; >@@ -405,8 +404,11 @@ > return 0; > > fail: >+ if (bktr->res_irq) >+ bus_release_resource(dev, SYS_RES_IRQ, bktr->irq_rid, bktr->res_irq); >+ if (bktr->res_mem) >+ bus_release_resource(dev, SYS_RES_IRQ, bktr->mem_rid, bktr->res_mem); > return error; >- > } > > /* >@@ -423,12 +425,12 @@ > > /* FIXME - Free memory for RISC programs, grab buffer, vbi buffers */ > > /* > * Deallocate resources. > */ > bus_teardown_intr(dev, bktr->res_irq, bktr->res_ih); >- bus_release_resource(dev, SYS_RES_IRQ, 0, bktr->res_irq); >- bus_release_resource(dev, SYS_RES_MEMORY, PCI_MAP_REG_START, bktr->res_mem); >+ bus_release_resource(dev, SYS_RES_IRQ, bktr->irq_rid, bktr->res_irq); >+ bus_release_resource(dev, SYS_RES_MEMORY, bktr->mem_rid, bktr->res_mem); > > return 0; > } >Index: bktr_reg.h >=================================================================== >RCS file: /usr/home/ncvs/src/sys/dev/bktr/bktr_reg.h,v >retrieving revision 1.37 >diff -u -r1.37 bktr_reg.h >--- bktr_reg.h 2000/04/04 16:54:13 1.37 >+++ bktr_reg.h 2000/05/22 13:58:32 >@@ -498,7 +498,9 @@ > pcici_t tag; /* 2.x PCI tag, for doing PCI commands */ > #endif > #if (__FreeBSD_version >= 400000) >+ int mem_rid; /* 4.x resource id */ > struct resource *res_mem; /* 4.x resource descriptor for registers */ >+ int irq_rid; /* 4.x resource id */ > struct resource *res_irq; /* 4.x resource descriptor for interrupt */ > void *res_ih; /* 4.x newbus interrupt handler cookie */ > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18744
: 9084