summaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/.gitignore2
-rw-r--r--drivers/atm/Kconfig5
-rw-r--r--drivers/atm/Makefile2
-rw-r--r--drivers/atm/ambassador.c19
-rw-r--r--drivers/atm/eni.c4
-rw-r--r--drivers/atm/firestream.c2
-rw-r--r--drivers/atm/fore200e.c166
-rw-r--r--drivers/atm/he.c8
-rw-r--r--drivers/atm/idt77252.c9
-rw-r--r--drivers/atm/iphase.c2
-rw-r--r--drivers/atm/lanai.c2
-rw-r--r--drivers/atm/nicstar.c4
-rw-r--r--drivers/atm/zatm.c4
13 files changed, 93 insertions, 136 deletions
diff --git a/drivers/atm/.gitignore b/drivers/atm/.gitignore
index a165b716771..fc0ae5eb05d 100644
--- a/drivers/atm/.gitignore
+++ b/drivers/atm/.gitignore
@@ -2,4 +2,4 @@
fore200e_mkfirm
fore200e_pca_fw.c
pca200e.bin
-
+pca200e_ecd.bin2
diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig
index cfa5af883e1..33687454eb3 100644
--- a/drivers/atm/Kconfig
+++ b/drivers/atm/Kconfig
@@ -167,10 +167,6 @@ config ATM_ZATM_DEBUG
Note that extended debugging may create certain race conditions
itself. Enable this ONLY if you suspect problems with the driver.
-# bool 'Rolfs TI TNETA1570' CONFIG_ATM_TNETA1570 y
-# if [ "$CONFIG_ATM_TNETA1570" = "y" ]; then
-# bool ' Enable extended debugging' CONFIG_ATM_TNETA1570_DEBUG n
-# fi
config ATM_NICSTAR
tristate "IDT 77201 (NICStAR) (ForeRunnerLE)"
depends on PCI && ATM && !64BIT
@@ -242,6 +238,7 @@ config ATM_IDT77252_USE_SUNI
config ATM_AMBASSADOR
tristate "Madge Ambassador (Collage PCI 155 Server)"
depends on PCI && ATM
+ select BITREVERSE
help
This is a driver for ATMizer based ATM card produced by Madge
Networks Ltd. Say Y (or M to compile as a module named ambassador)
diff --git a/drivers/atm/Makefile b/drivers/atm/Makefile
index b5077ce8cb4..1b16f8166b0 100644
--- a/drivers/atm/Makefile
+++ b/drivers/atm/Makefile
@@ -41,7 +41,7 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
# guess the target endianess to choose the right PCA-200E firmware image
ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h
- CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2)
+ CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) $(CPPFLAGS) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2)
endif
endif
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 9fffa7af6db..3c372e08f77 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/poison.h>
+#include <linux/bitrev.h>
#include <asm/atomic.h>
#include <asm/io.h>
@@ -972,7 +973,7 @@ static int make_rate (unsigned int rate, rounding r,
}
case round_up: {
// check all bits that we are discarding
- if (man & (-1>>9)) {
+ if (man & (~0U>>9)) {
man = (man>>(32-9)) + 1;
if (man == (1<<9)) {
// no need to check for round up outside of range
@@ -2068,18 +2069,6 @@ static void __devinit amb_ucode_version (amb_dev * dev) {
PRINTK (KERN_INFO, "microcode version is %u.%u", major, minor);
}
-// swap bits within byte to get Ethernet ordering
-static u8 bit_swap (u8 byte)
-{
- const u8 swap[] = {
- 0x0, 0x8, 0x4, 0xc,
- 0x2, 0xa, 0x6, 0xe,
- 0x1, 0x9, 0x5, 0xd,
- 0x3, 0xb, 0x7, 0xf
- };
- return ((swap[byte & 0xf]<<4) | swap[byte>>4]);
-}
-
// get end station address
static void __devinit amb_esi (amb_dev * dev, u8 * esi) {
u32 lower4;
@@ -2101,9 +2090,9 @@ static void __devinit amb_esi (amb_dev * dev, u8 * esi) {
PRINTDB (DBG_INIT, "ESI:");
for (i = 0; i < ESI_LEN; ++i) {
if (i < 4)
- esi[i] = bit_swap (lower4>>(8*i));
+ esi[i] = bitrev8(lower4>>(8*i));
else
- esi[i] = bit_swap (upper2>>(8*(i-4)));
+ esi[i] = bitrev8(upper2>>(8*(i-4)));
PRINTDM (DBG_INIT, " %02x", esi[i]);
}
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index bc1b13c8f5d..5aab7bd473a 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -1832,7 +1832,7 @@ static int __devinit eni_start(struct atm_dev *dev)
/* initialize memory management */
buffer_mem = eni_dev->mem - (buf - eni_dev->ram);
eni_dev->free_list_size = buffer_mem/MID_MIN_BUF_SIZE/2;
- eni_dev->free_list = (struct eni_free *) kmalloc(
+ eni_dev->free_list = kmalloc(
sizeof(struct eni_free)*(eni_dev->free_list_size+1),GFP_KERNEL);
if (!eni_dev->free_list) {
printk(KERN_ERR DEV_LABEL "(itf %d): couldn't get free page\n",
@@ -2232,7 +2232,7 @@ static int __devinit eni_init_one(struct pci_dev *pci_dev,
goto out0;
}
- eni_dev = (struct eni_dev *) kmalloc(sizeof(struct eni_dev),GFP_KERNEL);
+ eni_dev = kmalloc(sizeof(struct eni_dev),GFP_KERNEL);
if (!eni_dev) goto out0;
if (!cpu_zeroes) {
cpu_zeroes = pci_alloc_consistent(pci_dev,ENI_ZEROES_SIZE,
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 697ad82f663..9c67df5ccfa 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -512,7 +512,7 @@ static unsigned int make_rate (unsigned int rate, int r,
}
case ROUND_UP: {
/* check all bits that we are discarding */
- if (man & (-1>>9)) {
+ if (man & (~0U>>9)) {
man = (man>>(32-9)) + 1;
if (man == (1<<9)) {
/* no need to check for round up outside of range */
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 3a7b21ff30a..4aeb3d062ff 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -172,25 +172,6 @@ fore200e_irq_itoa(int irq)
}
-static void*
-fore200e_kmalloc(int size, gfp_t flags)
-{
- void *chunk = kzalloc(size, flags);
-
- if (!chunk)
- printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags);
-
- return chunk;
-}
-
-
-static void
-fore200e_kfree(void* chunk)
-{
- kfree(chunk);
-}
-
-
/* allocate and align a chunk of memory intended to hold the data behing exchanged
between the driver and the adapter (using streaming DVMA) */
@@ -206,7 +187,7 @@ fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, i
chunk->align_size = size;
chunk->direction = direction;
- chunk->alloc_addr = fore200e_kmalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA);
+ chunk->alloc_addr = kzalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA);
if (chunk->alloc_addr == NULL)
return -ENOMEM;
@@ -228,7 +209,7 @@ fore200e_chunk_free(struct fore200e* fore200e, struct chunk* chunk)
{
fore200e->bus->dma_unmap(fore200e, chunk->dma_addr, chunk->dma_size, chunk->direction);
- fore200e_kfree(chunk->alloc_addr);
+ kfree(chunk->alloc_addr);
}
@@ -882,7 +863,7 @@ fore200e_sba_detect(const struct fore200e_bus* bus, int index)
return NULL;
}
- fore200e = fore200e_kmalloc(sizeof(struct fore200e), GFP_KERNEL);
+ fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL);
if (fore200e == NULL)
return NULL;
@@ -1505,7 +1486,7 @@ fore200e_open(struct atm_vcc *vcc)
spin_unlock_irqrestore(&fore200e->q_lock, flags);
- fore200e_vcc = fore200e_kmalloc(sizeof(struct fore200e_vcc), GFP_ATOMIC);
+ fore200e_vcc = kzalloc(sizeof(struct fore200e_vcc), GFP_ATOMIC);
if (fore200e_vcc == NULL) {
vc_map->vcc = NULL;
return -ENOMEM;
@@ -1526,7 +1507,7 @@ fore200e_open(struct atm_vcc *vcc)
if (fore200e->available_cell_rate < vcc->qos.txtp.max_pcr) {
up(&fore200e->rate_sf);
- fore200e_kfree(fore200e_vcc);
+ kfree(fore200e_vcc);
vc_map->vcc = NULL;
return -EAGAIN;
}
@@ -1554,7 +1535,7 @@ fore200e_open(struct atm_vcc *vcc)
fore200e->available_cell_rate += vcc->qos.txtp.max_pcr;
- fore200e_kfree(fore200e_vcc);
+ kfree(fore200e_vcc);
return -EINVAL;
}
@@ -1630,7 +1611,7 @@ fore200e_close(struct atm_vcc* vcc)
clear_bit(ATM_VF_PARTIAL,&vcc->flags);
ASSERT(fore200e_vcc);
- fore200e_kfree(fore200e_vcc);
+ kfree(fore200e_vcc);
}
@@ -1831,7 +1812,7 @@ fore200e_getstats(struct fore200e* fore200e)
u32 stats_dma_addr;
if (fore200e->stats == NULL) {
- fore200e->stats = fore200e_kmalloc(sizeof(struct stats), GFP_KERNEL | GFP_DMA);
+ fore200e->stats = kzalloc(sizeof(struct stats), GFP_KERNEL | GFP_DMA);
if (fore200e->stats == NULL)
return -ENOMEM;
}
@@ -2002,17 +1983,6 @@ fore200e_setloop(struct fore200e* fore200e, int loop_mode)
}
-static inline unsigned int
-fore200e_swap(unsigned int in)
-{
-#if defined(__LITTLE_ENDIAN)
- return swab32(in);
-#else
- return in;
-#endif
-}
-
-
static int
fore200e_fetch_stats(struct fore200e* fore200e, struct sonet_stats __user *arg)
{
@@ -2021,19 +1991,19 @@ fore200e_fetch_stats(struct fore200e* fore200e, struct sonet_stats __user *arg)
if (fore200e_getstats(fore200e) < 0)
return -EIO;
- tmp.section_bip = fore200e_swap(fore200e->stats->oc3.section_bip8_errors);
- tmp.line_bip = fore200e_swap(fore200e->stats->oc3.line_bip24_errors);
- tmp.path_bip = fore200e_swap(fore200e->stats->oc3.path_bip8_errors);
- tmp.line_febe = fore200e_swap(fore200e->stats->oc3.line_febe_errors);
- tmp.path_febe = fore200e_swap(fore200e->stats->oc3.path_febe_errors);
- tmp.corr_hcs = fore200e_swap(fore200e->stats->oc3.corr_hcs_errors);
- tmp.uncorr_hcs = fore200e_swap(fore200e->stats->oc3.ucorr_hcs_errors);
- tmp.tx_cells = fore200e_swap(fore200e->stats->aal0.cells_transmitted) +
- fore200e_swap(fore200e->stats->aal34.cells_transmitted) +
- fore200e_swap(fore200e->stats->aal5.cells_transmitted);
- tmp.rx_cells = fore200e_swap(fore200e->stats->aal0.cells_received) +
- fore200e_swap(fore200e->stats->aal34.cells_received) +
- fore200e_swap(fore200e->stats->aal5.cells_received);
+ tmp.section_bip = cpu_to_be32(fore200e->stats->oc3.section_bip8_errors);
+ tmp.line_bip = cpu_to_be32(fore200e->stats->oc3.line_bip24_errors);
+ tmp.path_bip = cpu_to_be32(fore200e->stats->oc3.path_bip8_errors);
+ tmp.line_febe = cpu_to_be32(fore200e->stats->oc3.line_febe_errors);
+ tmp.path_febe = cpu_to_be32(fore200e->stats->oc3.path_febe_errors);
+ tmp.corr_hcs = cpu_to_be32(fore200e->stats->oc3.corr_hcs_errors);
+ tmp.uncorr_hcs = cpu_to_be32(fore200e->stats->oc3.ucorr_hcs_errors);
+ tmp.tx_cells = cpu_to_be32(fore200e->stats->aal0.cells_transmitted) +
+ cpu_to_be32(fore200e->stats->aal34.cells_transmitted) +
+ cpu_to_be32(fore200e->stats->aal5.cells_transmitted);
+ tmp.rx_cells = cpu_to_be32(fore200e->stats->aal0.cells_received) +
+ cpu_to_be32(fore200e->stats->aal34.cells_received) +
+ cpu_to_be32(fore200e->stats->aal5.cells_received);
if (arg)
return copy_to_user(arg, &tmp, sizeof(struct sonet_stats)) ? -EFAULT : 0;
@@ -2146,7 +2116,7 @@ fore200e_irq_request(struct fore200e* fore200e)
static int __devinit
fore200e_get_esi(struct fore200e* fore200e)
{
- struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
+ struct prom_data* prom = kzalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
int ok, i;
if (!prom)
@@ -2154,7 +2124,7 @@ fore200e_get_esi(struct fore200e* fore200e)
ok = fore200e->bus->prom_read(fore200e, prom);
if (ok < 0) {
- fore200e_kfree(prom);
+ kfree(prom);
return -EBUSY;
}
@@ -2169,7 +2139,7 @@ fore200e_get_esi(struct fore200e* fore200e)
fore200e->esi[ i ] = fore200e->atm_dev->esi[ i ] = prom->mac_addr[ i + 2 ];
}
- fore200e_kfree(prom);
+ kfree(prom);
return 0;
}
@@ -2194,7 +2164,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
DPRINTK(2, "rx buffers %d / %d are being allocated\n", scheme, magn);
/* allocate the array of receive buffers */
- buffer = bsq->buffer = fore200e_kmalloc(nbr * sizeof(struct buffer), GFP_KERNEL);
+ buffer = bsq->buffer = kzalloc(nbr * sizeof(struct buffer), GFP_KERNEL);
if (buffer == NULL)
return -ENOMEM;
@@ -2217,7 +2187,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
while (i > 0)
fore200e_chunk_free(fore200e, &buffer[ --i ].data);
- fore200e_kfree(buffer);
+ kfree(buffer);
return -ENOMEM;
}
@@ -2736,7 +2706,7 @@ fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent
goto out;
}
- fore200e = fore200e_kmalloc(sizeof(struct fore200e), GFP_KERNEL);
+ fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL);
if (fore200e == NULL) {
err = -ENOMEM;
goto out_disable;
@@ -2999,8 +2969,8 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" 4b5b:\n"
" crc_header_errors:\t\t%10u\n"
" framing_errors:\t\t%10u\n",
- fore200e_swap(fore200e->stats->phy.crc_header_errors),
- fore200e_swap(fore200e->stats->phy.framing_errors));
+ cpu_to_be32(fore200e->stats->phy.crc_header_errors),
+ cpu_to_be32(fore200e->stats->phy.framing_errors));
if (!left--)
return sprintf(page, "\n"
@@ -3012,13 +2982,13 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" path_febe_errors:\t\t%10u\n"
" corr_hcs_errors:\t\t%10u\n"
" ucorr_hcs_errors:\t\t%10u\n",
- fore200e_swap(fore200e->stats->oc3.section_bip8_errors),
- fore200e_swap(fore200e->stats->oc3.path_bip8_errors),
- fore200e_swap(fore200e->stats->oc3.line_bip24_errors),
- fore200e_swap(fore200e->stats->oc3.line_febe_errors),
- fore200e_swap(fore200e->stats->oc3.path_febe_errors),
- fore200e_swap(fore200e->stats->oc3.corr_hcs_errors),
- fore200e_swap(fore200e->stats->oc3.ucorr_hcs_errors));
+ cpu_to_be32(fore200e->stats->oc3.section_bip8_errors),
+ cpu_to_be32(fore200e->stats->oc3.path_bip8_errors),
+ cpu_to_be32(fore200e->stats->oc3.line_bip24_errors),
+ cpu_to_be32(fore200e->stats->oc3.line_febe_errors),
+ cpu_to_be32(fore200e->stats->oc3.path_febe_errors),
+ cpu_to_be32(fore200e->stats->oc3.corr_hcs_errors),
+ cpu_to_be32(fore200e->stats->oc3.ucorr_hcs_errors));
if (!left--)
return sprintf(page,"\n"
@@ -3029,12 +2999,12 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" vpi no conn:\t\t%10u\n"
" vci out of range:\t\t%10u\n"
" vci no conn:\t\t%10u\n",
- fore200e_swap(fore200e->stats->atm.cells_transmitted),
- fore200e_swap(fore200e->stats->atm.cells_received),
- fore200e_swap(fore200e->stats->atm.vpi_bad_range),
- fore200e_swap(fore200e->stats->atm.vpi_no_conn),
- fore200e_swap(fore200e->stats->atm.vci_bad_range),
- fore200e_swap(fore200e->stats->atm.vci_no_conn));
+ cpu_to_be32(fore200e->stats->atm.cells_transmitted),
+ cpu_to_be32(fore200e->stats->atm.cells_received),
+ cpu_to_be32(fore200e->stats->atm.vpi_bad_range),
+ cpu_to_be32(fore200e->stats->atm.vpi_no_conn),
+ cpu_to_be32(fore200e->stats->atm.vci_bad_range),
+ cpu_to_be32(fore200e->stats->atm.vci_no_conn));
if (!left--)
return sprintf(page,"\n"
@@ -3042,9 +3012,9 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" TX:\t\t\t%10u\n"
" RX:\t\t\t%10u\n"
" dropped:\t\t\t%10u\n",
- fore200e_swap(fore200e->stats->aal0.cells_transmitted),
- fore200e_swap(fore200e->stats->aal0.cells_received),
- fore200e_swap(fore200e->stats->aal0.cells_dropped));
+ cpu_to_be32(fore200e->stats->aal0.cells_transmitted),
+ cpu_to_be32(fore200e->stats->aal0.cells_received),
+ cpu_to_be32(fore200e->stats->aal0.cells_dropped));
if (!left--)
return sprintf(page,"\n"
@@ -3060,15 +3030,15 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" RX:\t\t\t%10u\n"
" dropped:\t\t\t%10u\n"
" protocol errors:\t\t%10u\n",
- fore200e_swap(fore200e->stats->aal34.cells_transmitted),
- fore200e_swap(fore200e->stats->aal34.cells_received),
- fore200e_swap(fore200e->stats->aal34.cells_dropped),
- fore200e_swap(fore200e->stats->aal34.cells_crc_errors),
- fore200e_swap(fore200e->stats->aal34.cells_protocol_errors),
- fore200e_swap(fore200e->stats->aal34.cspdus_transmitted),
- fore200e_swap(fore200e->stats->aal34.cspdus_received),
- fore200e_swap(fore200e->stats->aal34.cspdus_dropped),
- fore200e_swap(fore200e->stats->aal34.cspdus_protocol_errors));
+ cpu_to_be32(fore200e->stats->aal34.cells_transmitted),
+ cpu_to_be32(fore200e->stats->aal34.cells_received),
+ cpu_to_be32(fore200e->stats->aal34.cells_dropped),
+ cpu_to_be32(fore200e->stats->aal34.cells_crc_errors),
+ cpu_to_be32(fore200e->stats->aal34.cells_protocol_errors),
+ cpu_to_be32(fore200e->stats->aal34.cspdus_transmitted),
+ cpu_to_be32(fore200e->stats->aal34.cspdus_received),
+ cpu_to_be32(fore200e->stats->aal34.cspdus_dropped),
+ cpu_to_be32(fore200e->stats->aal34.cspdus_protocol_errors));
if (!left--)
return sprintf(page,"\n"
@@ -3084,15 +3054,15 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" dropped:\t\t\t%10u\n"
" CRC errors:\t\t%10u\n"
" protocol errors:\t\t%10u\n",
- fore200e_swap(fore200e->stats->aal5.cells_transmitted),
- fore200e_swap(fore200e->stats->aal5.cells_received),
- fore200e_swap(fore200e->stats->aal5.cells_dropped),
- fore200e_swap(fore200e->stats->aal5.congestion_experienced),
- fore200e_swap(fore200e->stats->aal5.cspdus_transmitted),
- fore200e_swap(fore200e->stats->aal5.cspdus_received),
- fore200e_swap(fore200e->stats->aal5.cspdus_dropped),
- fore200e_swap(fore200e->stats->aal5.cspdus_crc_errors),
- fore200e_swap(fore200e->stats->aal5.cspdus_protocol_errors));
+ cpu_to_be32(fore200e->stats->aal5.cells_transmitted),
+ cpu_to_be32(fore200e->stats->aal5.cells_received),
+ cpu_to_be32(fore200e->stats->aal5.cells_dropped),
+ cpu_to_be32(fore200e->stats->aal5.congestion_experienced),
+ cpu_to_be32(fore200e->stats->aal5.cspdus_transmitted),
+ cpu_to_be32(fore200e->stats->aal5.cspdus_received),
+ cpu_to_be32(fore200e->stats->aal5.cspdus_dropped),
+ cpu_to_be32(fore200e->stats->aal5.cspdus_crc_errors),
+ cpu_to_be32(fore200e->stats->aal5.cspdus_protocol_errors));
if (!left--)
return sprintf(page,"\n"
@@ -3103,11 +3073,11 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
" large b2:\t\t\t%10u\n"
" RX PDUs:\t\t\t%10u\n"
" TX PDUs:\t\t\t%10lu\n",
- fore200e_swap(fore200e->stats->aux.small_b1_failed),
- fore200e_swap(fore200e->stats->aux.large_b1_failed),
- fore200e_swap(fore200e->stats->aux.small_b2_failed),
- fore200e_swap(fore200e->stats->aux.large_b2_failed),
- fore200e_swap(fore200e->stats->aux.rpd_alloc_failed),
+ cpu_to_be32(fore200e->stats->aux.small_b1_failed),
+ cpu_to_be32(fore200e->stats->aux.large_b1_failed),
+ cpu_to_be32(fore200e->stats->aux.small_b2_failed),
+ cpu_to_be32(fore200e->stats->aux.large_b2_failed),
+ cpu_to_be32(fore200e->stats->aux.rpd_alloc_failed),
fore200e->tx_sat);
if (!left--)
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index c7314a79da0..db33f6f4dd2 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -820,7 +820,7 @@ he_init_group(struct he_dev *he_dev, int group)
void *cpuaddr;
#ifdef USE_RBPS_POOL
- cpuaddr = pci_pool_alloc(he_dev->rbps_pool, SLAB_KERNEL|SLAB_DMA, &dma_handle);
+ cpuaddr = pci_pool_alloc(he_dev->rbps_pool, GFP_KERNEL|GFP_DMA, &dma_handle);
if (cpuaddr == NULL)
return -ENOMEM;
#else
@@ -884,7 +884,7 @@ he_init_group(struct he_dev *he_dev, int group)
void *cpuaddr;
#ifdef USE_RBPL_POOL
- cpuaddr = pci_pool_alloc(he_dev->rbpl_pool, SLAB_KERNEL|SLAB_DMA, &dma_handle);
+ cpuaddr = pci_pool_alloc(he_dev->rbpl_pool, GFP_KERNEL|GFP_DMA, &dma_handle);
if (cpuaddr == NULL)
return -ENOMEM;
#else
@@ -1724,7 +1724,7 @@ __alloc_tpd(struct he_dev *he_dev)
struct he_tpd *tpd;
dma_addr_t dma_handle;
- tpd = pci_pool_alloc(he_dev->tpd_pool, SLAB_ATOMIC|SLAB_DMA, &dma_handle);
+ tpd = pci_pool_alloc(he_dev->tpd_pool, GFP_ATOMIC|GFP_DMA, &dma_handle);
if (tpd == NULL)
return NULL;
@@ -2351,7 +2351,7 @@ he_open(struct atm_vcc *vcc)
cid = he_mkcid(he_dev, vpi, vci);
- he_vcc = (struct he_vcc *) kmalloc(sizeof(struct he_vcc), GFP_ATOMIC);
+ he_vcc = kmalloc(sizeof(struct he_vcc), GFP_ATOMIC);
if (he_vcc == NULL) {
hprintk("unable to allocate he_vcc during open\n");
return -ENOMEM;
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 87b17c33b3f..f4078612194 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -135,7 +135,7 @@ static int idt77252_change_qos(struct atm_vcc *vcc, struct atm_qos *qos,
int flags);
static int idt77252_proc_read(struct atm_dev *dev, loff_t * pos,
char *page);
-static void idt77252_softint(void *dev_id);
+static void idt77252_softint(struct work_struct *work);
static struct atmdev_ops idt77252_ops =
@@ -2866,9 +2866,10 @@ out:
}
static void
-idt77252_softint(void *dev_id)
+idt77252_softint(struct work_struct *work)
{
- struct idt77252_dev *card = dev_id;
+ struct idt77252_dev *card =
+ container_of(work, struct idt77252_dev, tqueue);
u32 stat;
int done;
@@ -3697,7 +3698,7 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
card->pcidev = pcidev;
sprintf(card->name, "idt77252-%d", card->index);
- INIT_WORK(&card->tqueue, idt77252_softint, (void *)card);
+ INIT_WORK(&card->tqueue, idt77252_softint);
membase = pci_resource_start(pcidev, 1);
srambase = pci_resource_start(pcidev, 2);
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 9ed1c60048f..bb7ef570514 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -305,7 +305,7 @@ static void clear_lockup (struct atm_vcc *vcc, IADEV *dev) {
** | R | NZ | 5-bit exponent | 9-bit mantissa |
** +----+----+------------------+-------------------------------+
**
-** R = reserverd (written as 0)
+** R = reserved (written as 0)
** NZ = 0 if 0 cells/sec; 1 otherwise
**
** if NZ = 1, rate = 1.mmmmmmmmm x 2^(eeeee) cells/sec
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 267825501df..09f477d4237 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -2602,7 +2602,7 @@ static int __devinit lanai_init_one(struct pci_dev *pci,
struct atm_dev *atmdev;
int result;
- lanai = (struct lanai_dev *) kmalloc(sizeof(*lanai), GFP_KERNEL);
+ lanai = kmalloc(sizeof(*lanai), GFP_KERNEL);
if (lanai == NULL) {
printk(KERN_ERR DEV_LABEL
": couldn't allocate dev_data structure!\n");
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index bd090459480..aab9b3733d5 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -997,7 +997,7 @@ static scq_info *get_scq(int size, u32 scd)
if (size != VBR_SCQSIZE && size != CBR_SCQSIZE)
return NULL;
- scq = (scq_info *) kmalloc(sizeof(scq_info), GFP_KERNEL);
+ scq = kmalloc(sizeof(scq_info), GFP_KERNEL);
if (scq == NULL)
return NULL;
scq->org = kmalloc(2 * size, GFP_KERNEL);
@@ -1006,7 +1006,7 @@ static scq_info *get_scq(int size, u32 scd)
kfree(scq);
return NULL;
}
- scq->skb = (struct sk_buff **) kmalloc(sizeof(struct sk_buff *) *
+ scq->skb = kmalloc(sizeof(struct sk_buff *) *
(size / NS_SCQE_SIZE), GFP_KERNEL);
if (scq->skb == NULL)
{
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 7df0f373188..756d4f760da 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -996,7 +996,7 @@ static int start_tx(struct atm_dev *dev)
DPRINTK("start_tx\n");
zatm_dev = ZATM_DEV(dev);
- zatm_dev->tx_map = (struct atm_vcc **) kmalloc(sizeof(struct atm_vcc *)*
+ zatm_dev->tx_map = kmalloc(sizeof(struct atm_vcc *)*
zatm_dev->chans,GFP_KERNEL);
if (!zatm_dev->tx_map) return -ENOMEM;
zatm_dev->tx_bw = ATM_OC3_PCR;
@@ -1591,7 +1591,7 @@ static int __devinit zatm_init_one(struct pci_dev *pci_dev,
struct zatm_dev *zatm_dev;
int ret = -ENOMEM;
- zatm_dev = (struct zatm_dev *) kmalloc(sizeof(*zatm_dev), GFP_KERNEL);
+ zatm_dev = kmalloc(sizeof(*zatm_dev), GFP_KERNEL);
if (!zatm_dev) {
printk(KERN_EMERG "%s: memory shortage\n", DEV_LABEL);
goto out;