diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 6bb71b687f7b..e9c1296b267e 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /************************************************************************* | 1 | /************************************************************************* |
2 | * myri10ge.c: Myricom Myri-10G Ethernet driver. | 2 | * myri10ge.c: Myricom Myri-10G Ethernet driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2005 - 2007 Myricom, Inc. | 4 | * Copyright (C) 2005 - 2009 Myricom, Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
@@ -75,7 +75,7 @@ | |||
75 | #include "myri10ge_mcp.h" | 75 | #include "myri10ge_mcp.h" |
76 | #include "myri10ge_mcp_gen_header.h" | 76 | #include "myri10ge_mcp_gen_header.h" |
77 | 77 | ||
78 | #define MYRI10GE_VERSION_STR "1.4.4-1.398" | 78 | #define MYRI10GE_VERSION_STR "1.4.4-1.401" |
79 | 79 | ||
80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); | 80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); |
81 | MODULE_AUTHOR("Maintainer: help@myri.com"); | 81 | MODULE_AUTHOR("Maintainer: help@myri.com"); |
@@ -3786,7 +3786,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3786 | if (status != 0) { | 3786 | if (status != 0) { |
3787 | dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n", | 3787 | dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n", |
3788 | status); | 3788 | status); |
3789 | goto abort_with_netdev; | 3789 | goto abort_with_enabled; |
3790 | } | 3790 | } |
3791 | 3791 | ||
3792 | pci_set_master(pdev); | 3792 | pci_set_master(pdev); |
@@ -3801,13 +3801,13 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3801 | } | 3801 | } |
3802 | if (status != 0) { | 3802 | if (status != 0) { |
3803 | dev_err(&pdev->dev, "Error %d setting DMA mask\n", status); | 3803 | dev_err(&pdev->dev, "Error %d setting DMA mask\n", status); |
3804 | goto abort_with_netdev; | 3804 | goto abort_with_enabled; |
3805 | } | 3805 | } |
3806 | (void)pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); | 3806 | (void)pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); |
3807 | mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd), | 3807 | mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd), |
3808 | &mgp->cmd_bus, GFP_KERNEL); | 3808 | &mgp->cmd_bus, GFP_KERNEL); |
3809 | if (mgp->cmd == NULL) | 3809 | if (mgp->cmd == NULL) |
3810 | goto abort_with_netdev; | 3810 | goto abort_with_enabled; |
3811 | 3811 | ||
3812 | mgp->board_span = pci_resource_len(pdev, 0); | 3812 | mgp->board_span = pci_resource_len(pdev, 0); |
3813 | mgp->iomem_base = pci_resource_start(pdev, 0); | 3813 | mgp->iomem_base = pci_resource_start(pdev, 0); |
@@ -3943,8 +3943,10 @@ abort_with_mtrr: | |||
3943 | dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd), | 3943 | dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd), |
3944 | mgp->cmd, mgp->cmd_bus); | 3944 | mgp->cmd, mgp->cmd_bus); |
3945 | 3945 | ||
3946 | abort_with_netdev: | 3946 | abort_with_enabled: |
3947 | pci_disable_device(pdev); | ||
3947 | 3948 | ||
3949 | abort_with_netdev: | ||
3948 | free_netdev(netdev); | 3950 | free_netdev(netdev); |
3949 | return status; | 3951 | return status; |
3950 | } | 3952 | } |
@@ -3990,6 +3992,7 @@ static void myri10ge_remove(struct pci_dev *pdev) | |||
3990 | mgp->cmd, mgp->cmd_bus); | 3992 | mgp->cmd, mgp->cmd_bus); |
3991 | 3993 | ||
3992 | free_netdev(netdev); | 3994 | free_netdev(netdev); |
3995 | pci_disable_device(pdev); | ||
3993 | pci_set_drvdata(pdev, NULL); | 3996 | pci_set_drvdata(pdev, NULL); |
3994 | } | 3997 | } |
3995 | 3998 | ||