Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53299
b: refs/heads/master
c: d74472f
h: refs/heads/master
i:
  53297: c66a8b6
  53295: 0619a37
v: v3
  • Loading branch information
Finn Thain authored and Linus Torvalds committed May 5, 2007
1 parent 35be978 commit 32c1c13
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 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: 8b6aaab8c8bdbe011aac79af218dd1e657984bab
refs/heads/master: d74472f0b2553e59eafb7feee0ff9558136a17e0
4 changes: 2 additions & 2 deletions trunk/drivers/net/jazzsonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ static int __devexit jazz_sonic_device_remove (struct platform_device *pdev)
struct net_device *dev = platform_get_drvdata(pdev);
struct sonic_local* lp = netdev_priv(dev);

unregister_netdev (dev);
unregister_netdev(dev);
dma_free_coherent(lp->device, SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
lp->descriptors, lp->descriptors_laddr);
release_region (dev->base_addr, SONIC_MEM_SIZE);
free_netdev (dev);
free_netdev(dev);

return 0;
}
Expand Down
17 changes: 8 additions & 9 deletions trunk/drivers/net/macsonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ int __init mac_nubus_sonic_probe(struct net_device* dev)
return macsonic_init(dev);
}

static int __init mac_sonic_probe(struct platform_device *device)
static int __init mac_sonic_probe(struct platform_device *pdev)
{
struct net_device *dev;
struct sonic_local *lp;
Expand All @@ -534,8 +534,8 @@ static int __init mac_sonic_probe(struct platform_device *device)
return -ENOMEM;

lp = netdev_priv(dev);
lp->device = &device->dev;
SET_NETDEV_DEV(dev, &device->dev);
lp->device = &pdev->dev;
SET_NETDEV_DEV(dev, &pdev->dev);
SET_MODULE_OWNER(dev);

/* This will catch fatal stuff like -ENOMEM as well as success */
Expand Down Expand Up @@ -576,15 +576,15 @@ MODULE_PARM_DESC(sonic_debug, "macsonic debug level (1-4)");

#include "sonic.c"

static int __devexit mac_sonic_device_remove (struct platform_device *device)
static int __devexit mac_sonic_device_remove (struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(device);
struct net_device *dev = platform_get_drvdata(pdev);
struct sonic_local* lp = netdev_priv(dev);

unregister_netdev (dev);
unregister_netdev(dev);
dma_free_coherent(lp->device, SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
lp->descriptors, lp->descriptors_laddr);
free_netdev (dev);
free_netdev(dev);

return 0;
}
Expand All @@ -607,9 +607,8 @@ static int __init mac_sonic_init_module(void)
}

mac_sonic_device = platform_device_alloc(mac_sonic_string, 0);
if (!mac_sonic_device) {
if (!mac_sonic_device)
goto out_unregister;
}

if (platform_device_add(mac_sonic_device)) {
platform_device_put(mac_sonic_device);
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/sonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ static void sonic_tx_timeout(struct net_device *dev)
{
struct sonic_local *lp = netdev_priv(dev);
int i;
/* Stop the interrupts for this */
/*
* put the Sonic into software-reset mode and
* disable all interrupts before releasing DMA buffers
*/
SONIC_WRITE(SONIC_IMR, 0);
SONIC_WRITE(SONIC_ISR, 0x7fff);
SONIC_WRITE(SONIC_CMD, SONIC_CR_RST);
/* We could resend the original skbs. Easier to re-initialise. */
for (i = 0; i < SONIC_NUM_TDS; i++) {
if(lp->tx_laddr[i]) {
Expand Down

0 comments on commit 32c1c13

Please sign in to comment.