diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 16:30:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 16:30:35 -0400 |
commit | 43d39ae0cf8f891c35e8316948229c7cbffa3994 (patch) | |
tree | c8af6999a9327c8b9bbc7384efe8f52f851ff3d8 /drivers/net/ibm_newemac/mal.c | |
parent | 63bd8c48e04bbbc9cee3d752857914609d8d406f (diff) | |
parent | 84284d3c1d6372bc9ab496607661d230d9c45de4 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (35 commits)
xen-netfront: rearrange netfront structure to separate tx and rx
netdev: convert non-obvious instances to use ARRAY_SIZE()
ucc_geth: Fix build break introduced by commit 09f75cd7bf13720738e6a196cc0107ce9a5bd5a0
gianfar: Fix regression caused by new napi interface
gianfar: Cleanup compile warning caused by 0795af57
gianfar: Fix compile regression caused by bea3348e
add new prom.h for AU1x00
update AU1000 get_ethernet_addr()
MIPSsim: General cleanup
Jazzsonic: Fix warning about unused variable.
Remove msic_dcr_read() in axon_msi.c
Use dcr_host_t.base in dcr_unmap()
Add dcr_host_t.base in dcr_read()/dcr_write()
Use dcr_host_t.base in ibm_emac_mal
Update ibm_newemac to use dcr_host_t.base
tehuti: possible leak in bdx_probe
TC35815: Fix build
SAA9730: Fix build
AR7 ethernet
myri10ge: update driver version to 1.3.2-1.287
...
Diffstat (limited to 'drivers/net/ibm_newemac/mal.c')
-rw-r--r-- | drivers/net/ibm_newemac/mal.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 58854117b1a9..39f4cb6b0cf3 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -461,6 +461,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
461 | struct mal_instance *mal; | 461 | struct mal_instance *mal; |
462 | int err = 0, i, bd_size; | 462 | int err = 0, i, bd_size; |
463 | int index = mal_count++; | 463 | int index = mal_count++; |
464 | unsigned int dcr_base; | ||
464 | const u32 *prop; | 465 | const u32 *prop; |
465 | u32 cfg; | 466 | u32 cfg; |
466 | 467 | ||
@@ -497,14 +498,14 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
497 | } | 498 | } |
498 | mal->num_rx_chans = prop[0]; | 499 | mal->num_rx_chans = prop[0]; |
499 | 500 | ||
500 | mal->dcr_base = dcr_resource_start(ofdev->node, 0); | 501 | dcr_base = dcr_resource_start(ofdev->node, 0); |
501 | if (mal->dcr_base == 0) { | 502 | if (dcr_base == 0) { |
502 | printk(KERN_ERR | 503 | printk(KERN_ERR |
503 | "mal%d: can't find DCR resource!\n", index); | 504 | "mal%d: can't find DCR resource!\n", index); |
504 | err = -ENODEV; | 505 | err = -ENODEV; |
505 | goto fail; | 506 | goto fail; |
506 | } | 507 | } |
507 | mal->dcr_host = dcr_map(ofdev->node, mal->dcr_base, 0x100); | 508 | mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100); |
508 | if (!DCR_MAP_OK(mal->dcr_host)) { | 509 | if (!DCR_MAP_OK(mal->dcr_host)) { |
509 | printk(KERN_ERR | 510 | printk(KERN_ERR |
510 | "mal%d: failed to map DCRs !\n", index); | 511 | "mal%d: failed to map DCRs !\n", index); |
@@ -626,7 +627,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
626 | fail2: | 627 | fail2: |
627 | dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); | 628 | dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); |
628 | fail_unmap: | 629 | fail_unmap: |
629 | dcr_unmap(mal->dcr_host, mal->dcr_base, 0x100); | 630 | dcr_unmap(mal->dcr_host, 0x100); |
630 | fail: | 631 | fail: |
631 | kfree(mal); | 632 | kfree(mal); |
632 | 633 | ||