Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 147898 Details for
Bug 219085
Silicon Integrated Systems [SiS 900] network card shuts down
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to reoder refill operations in sis driver
sis900-rhel4.patch (text/plain), 2.45 KB, created by
Neil Horman
on 2007-02-12 15:15:41 UTC
(
hide
)
Description:
patch to reoder refill operations in sis driver
Filename:
MIME Type:
Creator:
Neil Horman
Created:
2007-02-12 15:15:41 UTC
Size:
2.45 KB
patch
obsolete
>--- linux-2.6.9/drivers/net/sis900.c.orig 2004-10-18 17:53:51.000000000 -0400 >+++ linux-2.6.9/drivers/net/sis900.c 2007-02-12 10:04:40.000000000 -0500 >@@ -1652,6 +1652,24 @@ static int sis900_rx(struct net_device * > } else { > struct sk_buff * skb; > >+ pci_unmap_single(sis_priv->pci_dev, >+ sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, >+ PCI_DMA_FROMDEVICE); >+ >+ /* refill the Rx buffer, what if there is not enought >+ * memory for new socket buffer ?? */ >+ if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { >+ /* >+ * Not enough memory to refill the buffer >+ * so we need to recycle the old one so >+ * as to avoid creating a memory hole >+ * in the rx ring >+ */ >+ skb = sis_priv->rx_skbuff[entry]; >+ sis_priv->stats.rx_dropped++; >+ goto refill_rx_ring; >+ } >+ > /* This situation should never happen, but due to > some unknow bugs, it is possible that > we are working on NULL sk_buff :-( */ >@@ -1662,9 +1680,6 @@ static int sis900_rx(struct net_device * > break; > } > >- pci_unmap_single(sis_priv->pci_dev, >- sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, >- PCI_DMA_FROMDEVICE); > /* give the socket buffer to upper layers */ > skb = sis_priv->rx_skbuff[entry]; > skb_put(skb, rx_size); >@@ -1677,31 +1692,15 @@ static int sis900_rx(struct net_device * > net_dev->last_rx = jiffies; > sis_priv->stats.rx_bytes += rx_size; > sis_priv->stats.rx_packets++; >+ sis_priv->dirty_rx++; > >- /* refill the Rx buffer, what if there is not enought memory for >- new socket buffer ?? */ >- if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { >- /* not enough memory for skbuff, this makes a "hole" >- on the buffer ring, it is not clear how the >- hardware will react to this kind of degenerated >- buffer */ >- printk(KERN_INFO "%s: Memory squeeze," >- "deferring packet.\n", >- net_dev->name); >- sis_priv->rx_skbuff[entry] = NULL; >- /* reset buffer descriptor state */ >- sis_priv->rx_ring[entry].cmdsts = 0; >- sis_priv->rx_ring[entry].bufptr = 0; >- sis_priv->stats.rx_dropped++; >- break; >- } >+refill_rx_ring: > skb->dev = net_dev; > sis_priv->rx_skbuff[entry] = skb; > sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; > sis_priv->rx_ring[entry].bufptr = > pci_map_single(sis_priv->pci_dev, skb->tail, > RX_BUF_SIZE, PCI_DMA_FROMDEVICE); >- sis_priv->dirty_rx++; > } > sis_priv->cur_rx++; > entry = sis_priv->cur_rx % NUM_RX_DESC;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219085
: 147898