Bugzilla – Attachment 64889 Details for
Bug 145197
e100 crashes on resume from suspend-to-RAM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Proposed patch
e100-resume-fix (text/plain), 1.79 KB, created by
Olaf Kirch
on 2006-01-25 10:23:34 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Olaf Kirch
Created:
2006-01-25 10:23:34 UTC
Size:
1.79 KB
patch
obsolete
>[PATCH] e100: allocate cbs early on when resuming > >Signed-off-by: Olaf Kirch <okir@suse.de> > > drivers/net/e100.c | 14 +++++++++++--- > 1 files changed, 11 insertions(+), 3 deletions(-) > >Index: build/drivers/net/e100.c >=================================================================== >--- build.orig/drivers/net/e100.c >+++ build/drivers/net/e100.c >@@ -1298,8 +1298,10 @@ static inline int e100_exec_cb_wait(stru > int err = 0, counter = 50; > struct cb *cb = nic->cb_to_clean; > >- if ((err = e100_exec_cb(nic, NULL, e100_setup_ucode))) >+ if ((err = e100_exec_cb(nic, NULL, e100_setup_ucode))) { > DPRINTK(PROBE,ERR, "ucode cmd failed with error %d\n", err); >+ return err; >+ } > > /* must restart cuc */ > nic->cuc_cmd = cuc_start; >@@ -1721,9 +1723,11 @@ static int e100_alloc_cbs(struct nic *ni > struct cb *cb; > unsigned int i, count = nic->params.cbs.count; > >+ /* bail out if we've been here before */ >+ if (nic->cbs_avail) >+ return 0; >+ > nic->cuc_cmd = cuc_start; >- nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = NULL; >- nic->cbs_avail = 0; > > nic->cbs = pci_alloc_consistent(nic->pdev, > sizeof(struct cb) * count, &nic->cbs_dma_addr); >@@ -2578,6 +2582,8 @@ static int __devinit e100_probe(struct p > nic->pdev = pdev; > nic->msg_enable = (1 << debug) - 1; > pci_set_drvdata(pdev, netdev); >+ nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = NULL; >+ nic->cbs_avail = 0; > > if((err = pci_enable_device(pdev))) { > DPRINTK(PROBE, ERR, "Cannot enable PCI device, aborting.\n"); >@@ -2752,6 +2758,8 @@ static int e100_resume(struct pci_dev *p > retval = pci_enable_wake(pdev, 0, 0); > if (retval) > DPRINTK(PROBE,ERR, "Error clearing wake events\n"); >+ if ((retval = e100_alloc_cbs(nic))) >+ DPRINTK(PROBE,ERR, "No memory for cbs\n"); > if(e100_hw_init(nic)) > DPRINTK(HW, ERR, "e100_hw_init failed\n"); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 145197
:
64761
| 64889