--- ref-2.3.99-pre6-atm-0.77/drivers/atm/Makefile +++ linux-2.3.99-pre6-atm-0.77-fore200e-0.2f/drivers/atm/Makefile Mon May 8 14:50:10 2000 @@ -103,7 +103,7 @@ endif ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y) # guess the target endianess to choose the right PCA-200E firmware image - CONFIG_ATM_FORE200E_PCA_FW := $(shell if test -n "`$(CC) -E -dM ../../include/asm/byteorder.h | grep ' __LITTLE_ENDIAN '`"; then echo pca200e.bin; else echo pca200e_ecd.bin2; fi) + CONFIG_ATM_FORE200E_PCA_FW := $(shell if test -n "`$(CC) -E -dM ../../include/asm/byteorder.h | grep -w '__BIG_ENDIAN'`"; then echo pca200e_ecd.bin2; else echo pca200e.bin; fi) endif endif ifeq ($(CONFIG_ATM_FORE200E_SBA),y) --- ref-2.3.99-pre6-atm-0.77/drivers/atm/fore200e.c +++ linux-2.3.99-pre6-atm-0.77-fore200e-0.2f/drivers/atm/fore200e.c Sun May 21 15:21:38 2000 @@ -67,7 +67,7 @@ #define FORE200E_52BYTE_AAL0_SDU #endif -#define FORE200E_VERSION "0.2d" +#define FORE200E_VERSION "0.2f" #define FORE200E "fore200e: " @@ -1214,8 +1214,8 @@ fore200e_push_rpd(fore200e, entry->rpd); } else { - printk(FORE200E "damaged PDU on %d.%d.%d\n", - fore200e->atm_dev->number, entry->rpd->atm_header.vpi, entry->rpd->atm_header.vci); + DPRINTK(1, "damaged PDU on %d.%d.%d\n", + fore200e->atm_dev->number, entry->rpd->atm_header.vpi, entry->rpd->atm_header.vci); } fore200e_collect_rpd(fore200e, entry->rpd); @@ -1550,7 +1550,7 @@ retry_here: - tasklet_disable(&fore200e->tasklet); + spin_lock_bh(&fore200e->tx_lock); entry = &txq->host_entry[ txq->head ]; @@ -1560,8 +1560,8 @@ fore200e_irq_tx(fore200e); if (*entry->status != STATUS_FREE) { - - tasklet_enable(&fore200e->tasklet); + + spin_unlock_bh(&fore200e->tx_lock); /* retry once again? */ if(--retry > 0) @@ -1600,8 +1600,9 @@ entry->data = kmalloc(tx_len, GFP_ATOMIC | GFP_DMA); if (entry->data == NULL) { - - tasklet_enable(&fore200e->tasklet); + + spin_unlock_bh(&fore200e->tx_lock); + if (vcc->pop) vcc->pop(vcc, skb); else @@ -1625,7 +1626,7 @@ FORE200E_NEXT_ENTRY(txq->head, QUEUE_SIZE_TX); txq->txing++; - tasklet_enable(&fore200e->tasklet); + spin_unlock_bh(&fore200e->tx_lock); /* ensure DMA synchronisation */ fore200e->bus->dma_sync(fore200e, tpd->tsd[ 0 ].buffer, tpd->tsd[ 0 ].length, FORE200E_DMA_TODEVICE); @@ -2358,6 +2359,7 @@ DPRINTK(2, "device %s being initialized\n", fore200e->name); + spin_lock_init(&fore200e->tx_lock); init_MUTEX(&fore200e->rate_sf); cpq = fore200e->cp_queues = (struct cp_queues*) (fore200e->virt_base + FORE200E_CP_QUEUES_OFFSET); --- ref-2.3.99-pre6-atm-0.77/drivers/atm/fore200e.h +++ linux-2.3.99-pre6-atm-0.77-fore200e-0.2f/drivers/atm/fore200e.h Mon May 8 13:34:33 2000 @@ -879,6 +879,7 @@ struct stats* stats; /* last snapshot of the stats */ struct semaphore rate_sf; /* protects rate reservation ops */ + spinlock_t tx_lock; /* protects tx ops */ struct tasklet_struct tasklet; /* performs interrupt work */ } fore200e_t;