Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69327
b: refs/heads/master
c: 7920369
h: refs/heads/master
i:
  69325: 2b87cea
  69323: 90edb1b
  69319: cc4b3c6
  69311: d999e62
v: v3
  • Loading branch information
Michael Ellerman authored and Jeff Garzik committed Oct 15, 2007
1 parent 1fe5064 commit a3323d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc2618f7528d4b6ea0c2c53539a3b8cff2b33b24
refs/heads/master: 792036952123a0670c7dd6960ca5458cdfd5e4fd
9 changes: 5 additions & 4 deletions trunk/drivers/net/ibm_newemac/mal.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
struct mal_instance *mal;
int err = 0, i, bd_size;
int index = mal_count++;
unsigned int dcr_base;
const u32 *prop;
u32 cfg;

Expand Down Expand Up @@ -497,14 +498,14 @@ static int __devinit mal_probe(struct of_device *ofdev,
}
mal->num_rx_chans = prop[0];

mal->dcr_base = dcr_resource_start(ofdev->node, 0);
if (mal->dcr_base == 0) {
dcr_base = dcr_resource_start(ofdev->node, 0);
if (dcr_base == 0) {
printk(KERN_ERR
"mal%d: can't find DCR resource!\n", index);
err = -ENODEV;
goto fail;
}
mal->dcr_host = dcr_map(ofdev->node, mal->dcr_base, 0x100);
mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100);
if (!DCR_MAP_OK(mal->dcr_host)) {
printk(KERN_ERR
"mal%d: failed to map DCRs !\n", index);
Expand Down Expand Up @@ -626,7 +627,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
fail2:
dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma);
fail_unmap:
dcr_unmap(mal->dcr_host, mal->dcr_base, 0x100);
dcr_unmap(mal->dcr_host, dcr_base, 0x100);
fail:
kfree(mal);

Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/ibm_newemac/mal.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ struct mal_commac {

struct mal_instance {
int version;
int dcr_base;
dcr_host_t dcr_host;

int num_tx_chans; /* Number of TX channels */
Expand Down Expand Up @@ -213,12 +212,12 @@ struct mal_instance {

static inline u32 get_mal_dcrn(struct mal_instance *mal, int reg)
{
return dcr_read(mal->dcr_host, mal->dcr_base + reg);
return dcr_read(mal->dcr_host, mal->dcr_host.base + reg);
}

static inline void set_mal_dcrn(struct mal_instance *mal, int reg, u32 val)
{
dcr_write(mal->dcr_host, mal->dcr_base + reg, val);
dcr_write(mal->dcr_host, mal->dcr_host.base + reg, val);
}

/* Register MAL devices */
Expand Down

0 comments on commit a3323d2

Please sign in to comment.