http://git.etherboot.org
/
people
/
indolent
/
gpxe.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ceeb121
)
eepro100.c, rx buffers are now dynamically allocated
eepro100
author
Udayan Kumar
<udayan.kumar@gmail.com>
Mon, 20 Aug 2007 02:45:48 +0000
(22:45 -0400)
committer
Udayan Kumar
<udayan.kumar@gmail.com>
Mon, 20 Aug 2007 02:45:48 +0000
(22:45 -0400)
src/drivers/net/eepro100.c
patch
|
blob
|
history
diff --git
a/src/drivers/net/eepro100.c
b/src/drivers/net/eepro100.c
index
b87f283
..
41de90f
100644
(file)
--- a/
src/drivers/net/eepro100.c
+++ b/
src/drivers/net/eepro100.c
@@
-54,7
+54,7
@@
struct speedo_private {
unsigned short tx_dirty;
unsigned short rx_cur;
struct speedo_tx txfd[TX_RING_SIZE];
unsigned short tx_dirty;
unsigned short rx_cur;
struct speedo_tx txfd[TX_RING_SIZE];
- struct speedo_rx
rxfd[NUM_RX_DESC]
;
+ struct speedo_rx
*rxfd
;
/* netdev_tx_complete needs pointer to the iobuf of the data so as to free
* it from the memory.
/* netdev_tx_complete needs pointer to the iobuf of the data so as to free
* it from the memory.
@@
-419,6
+419,12
@@
static int speedo_open ( struct net_device *netdev ) {
outw ( INT_MASK | RX_ADDR_LOAD, sp->ioaddr + SCBCmd );
wait_for_cmd_done ( sp->ioaddr + SCBCmd );
outw ( INT_MASK | RX_ADDR_LOAD, sp->ioaddr + SCBCmd );
wait_for_cmd_done ( sp->ioaddr + SCBCmd );
+ sp->rxfd=malloc((sizeof(struct speedo_rx))*NUM_RX_DESC);
+ if (!sp->rxfd) {
+ DBG("No memory for RxFD\n");
+ return -ENOMEM;
+ }
+
sp->rx_cur = 0;
for ( i = 0 ; i < NUM_RX_DESC ; i++ ) {
sp->rxfd[i].status = 0x0000;
sp->rx_cur = 0;
for ( i = 0 ; i < NUM_RX_DESC ; i++ ) {
sp->rxfd[i].status = 0x0000;