aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 00:22:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 00:22:26 -0400
commit399f486286f44d55c4fff0e9cc5d712f2b443489 (patch)
tree0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /drivers/atm
parentInput: apm-power - fix crash when unloading modules (diff)
parentfix uevent action-string regression (diff)
downloadlinux-dev-399f486286f44d55c4fff0e9cc5d712f2b443489.tar.xz
linux-dev-399f486286f44d55c4fff0e9cc5d712f2b443489.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/firestream.c4
-rw-r--r--drivers/atm/fore200e.c114
-rw-r--r--drivers/atm/fore200e.h106
-rw-r--r--drivers/atm/idt77252.c12
4 files changed, 118 insertions, 118 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index c662d686154a..47c57a4294b7 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -331,8 +331,8 @@ module_param(fs_keystream, int, 0);
#define FS_DEBUG_QSIZE 0x00001000
-#define func_enter() fs_dprintk (FS_DEBUG_FLOW, "fs: enter %s\n", __FUNCTION__)
-#define func_exit() fs_dprintk (FS_DEBUG_FLOW, "fs: exit %s\n", __FUNCTION__)
+#define func_enter() fs_dprintk(FS_DEBUG_FLOW, "fs: enter %s\n", __func__)
+#define func_exit() fs_dprintk(FS_DEBUG_FLOW, "fs: exit %s\n", __func__)
static struct fs_dev *fs_boards = NULL;
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f97e050338f0..432181ed7bb5 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -95,8 +95,8 @@
#if 1
#define ASSERT(expr) if (!(expr)) { \
printk(FORE200E "assertion failed! %s[%d]: %s\n", \
- __FUNCTION__, __LINE__, #expr); \
- panic(FORE200E "%s", __FUNCTION__); \
+ __func__, __LINE__, #expr); \
+ panic(FORE200E "%s", __func__); \
}
#else
#define ASSERT(expr) do {} while (0)
@@ -1988,19 +1988,19 @@ fore200e_fetch_stats(struct fore200e* fore200e, struct sonet_stats __user *arg)
if (fore200e_getstats(fore200e) < 0)
return -EIO;
- 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);
+ tmp.section_bip = be32_to_cpu(fore200e->stats->oc3.section_bip8_errors);
+ tmp.line_bip = be32_to_cpu(fore200e->stats->oc3.line_bip24_errors);
+ tmp.path_bip = be32_to_cpu(fore200e->stats->oc3.path_bip8_errors);
+ tmp.line_febe = be32_to_cpu(fore200e->stats->oc3.line_febe_errors);
+ tmp.path_febe = be32_to_cpu(fore200e->stats->oc3.path_febe_errors);
+ tmp.corr_hcs = be32_to_cpu(fore200e->stats->oc3.corr_hcs_errors);
+ tmp.uncorr_hcs = be32_to_cpu(fore200e->stats->oc3.ucorr_hcs_errors);
+ tmp.tx_cells = be32_to_cpu(fore200e->stats->aal0.cells_transmitted) +
+ be32_to_cpu(fore200e->stats->aal34.cells_transmitted) +
+ be32_to_cpu(fore200e->stats->aal5.cells_transmitted);
+ tmp.rx_cells = be32_to_cpu(fore200e->stats->aal0.cells_received) +
+ be32_to_cpu(fore200e->stats->aal34.cells_received) +
+ be32_to_cpu(fore200e->stats->aal5.cells_received);
if (arg)
return copy_to_user(arg, &tmp, sizeof(struct sonet_stats)) ? -EFAULT : 0;
@@ -2587,7 +2587,7 @@ fore200e_start_fw(struct fore200e* fore200e)
static int __devinit
fore200e_load_fw(struct fore200e* fore200e)
{
- u32* fw_data = (u32*) fore200e->bus->fw_data;
+ __le32* fw_data = (__le32*) fore200e->bus->fw_data;
u32 fw_size = (u32) *fore200e->bus->fw_size / sizeof(u32);
struct fw_header* fw_header = (struct fw_header*) fw_data;
@@ -2965,8 +2965,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",
- cpu_to_be32(fore200e->stats->phy.crc_header_errors),
- cpu_to_be32(fore200e->stats->phy.framing_errors));
+ be32_to_cpu(fore200e->stats->phy.crc_header_errors),
+ be32_to_cpu(fore200e->stats->phy.framing_errors));
if (!left--)
return sprintf(page, "\n"
@@ -2978,13 +2978,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",
- 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));
+ be32_to_cpu(fore200e->stats->oc3.section_bip8_errors),
+ be32_to_cpu(fore200e->stats->oc3.path_bip8_errors),
+ be32_to_cpu(fore200e->stats->oc3.line_bip24_errors),
+ be32_to_cpu(fore200e->stats->oc3.line_febe_errors),
+ be32_to_cpu(fore200e->stats->oc3.path_febe_errors),
+ be32_to_cpu(fore200e->stats->oc3.corr_hcs_errors),
+ be32_to_cpu(fore200e->stats->oc3.ucorr_hcs_errors));
if (!left--)
return sprintf(page,"\n"
@@ -2995,12 +2995,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",
- 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));
+ be32_to_cpu(fore200e->stats->atm.cells_transmitted),
+ be32_to_cpu(fore200e->stats->atm.cells_received),
+ be32_to_cpu(fore200e->stats->atm.vpi_bad_range),
+ be32_to_cpu(fore200e->stats->atm.vpi_no_conn),
+ be32_to_cpu(fore200e->stats->atm.vci_bad_range),
+ be32_to_cpu(fore200e->stats->atm.vci_no_conn));
if (!left--)
return sprintf(page,"\n"
@@ -3008,9 +3008,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",
- cpu_to_be32(fore200e->stats->aal0.cells_transmitted),
- cpu_to_be32(fore200e->stats->aal0.cells_received),
- cpu_to_be32(fore200e->stats->aal0.cells_dropped));
+ be32_to_cpu(fore200e->stats->aal0.cells_transmitted),
+ be32_to_cpu(fore200e->stats->aal0.cells_received),
+ be32_to_cpu(fore200e->stats->aal0.cells_dropped));
if (!left--)
return sprintf(page,"\n"
@@ -3026,15 +3026,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",
- 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));
+ be32_to_cpu(fore200e->stats->aal34.cells_transmitted),
+ be32_to_cpu(fore200e->stats->aal34.cells_received),
+ be32_to_cpu(fore200e->stats->aal34.cells_dropped),
+ be32_to_cpu(fore200e->stats->aal34.cells_crc_errors),
+ be32_to_cpu(fore200e->stats->aal34.cells_protocol_errors),
+ be32_to_cpu(fore200e->stats->aal34.cspdus_transmitted),
+ be32_to_cpu(fore200e->stats->aal34.cspdus_received),
+ be32_to_cpu(fore200e->stats->aal34.cspdus_dropped),
+ be32_to_cpu(fore200e->stats->aal34.cspdus_protocol_errors));
if (!left--)
return sprintf(page,"\n"
@@ -3050,15 +3050,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",
- 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));
+ be32_to_cpu(fore200e->stats->aal5.cells_transmitted),
+ be32_to_cpu(fore200e->stats->aal5.cells_received),
+ be32_to_cpu(fore200e->stats->aal5.cells_dropped),
+ be32_to_cpu(fore200e->stats->aal5.congestion_experienced),
+ be32_to_cpu(fore200e->stats->aal5.cspdus_transmitted),
+ be32_to_cpu(fore200e->stats->aal5.cspdus_received),
+ be32_to_cpu(fore200e->stats->aal5.cspdus_dropped),
+ be32_to_cpu(fore200e->stats->aal5.cspdus_crc_errors),
+ be32_to_cpu(fore200e->stats->aal5.cspdus_protocol_errors));
if (!left--)
return sprintf(page,"\n"
@@ -3069,11 +3069,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",
- 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),
+ be32_to_cpu(fore200e->stats->aux.small_b1_failed),
+ be32_to_cpu(fore200e->stats->aux.large_b1_failed),
+ be32_to_cpu(fore200e->stats->aux.small_b2_failed),
+ be32_to_cpu(fore200e->stats->aux.large_b2_failed),
+ be32_to_cpu(fore200e->stats->aux.rpd_alloc_failed),
fore200e->tx_sat);
if (!left--)
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h
index b85a54613dea..183841cc8fdf 100644
--- a/drivers/atm/fore200e.h
+++ b/drivers/atm/fore200e.h
@@ -349,90 +349,90 @@ typedef struct oc3_block {
/* physical encoding statistics */
typedef struct stats_phy {
- u32 crc_header_errors; /* cells received with bad header CRC */
- u32 framing_errors; /* cells received with bad framing */
- u32 pad[ 2 ]; /* i960 padding */
+ __be32 crc_header_errors; /* cells received with bad header CRC */
+ __be32 framing_errors; /* cells received with bad framing */
+ __be32 pad[ 2 ]; /* i960 padding */
} stats_phy_t;
/* OC-3 statistics */
typedef struct stats_oc3 {
- u32 section_bip8_errors; /* section 8 bit interleaved parity */
- u32 path_bip8_errors; /* path 8 bit interleaved parity */
- u32 line_bip24_errors; /* line 24 bit interleaved parity */
- u32 line_febe_errors; /* line far end block errors */
- u32 path_febe_errors; /* path far end block errors */
- u32 corr_hcs_errors; /* correctable header check sequence */
- u32 ucorr_hcs_errors; /* uncorrectable header check sequence */
- u32 pad[ 1 ]; /* i960 padding */
+ __be32 section_bip8_errors; /* section 8 bit interleaved parity */
+ __be32 path_bip8_errors; /* path 8 bit interleaved parity */
+ __be32 line_bip24_errors; /* line 24 bit interleaved parity */
+ __be32 line_febe_errors; /* line far end block errors */
+ __be32 path_febe_errors; /* path far end block errors */
+ __be32 corr_hcs_errors; /* correctable header check sequence */
+ __be32 ucorr_hcs_errors; /* uncorrectable header check sequence */
+ __be32 pad[ 1 ]; /* i960 padding */
} stats_oc3_t;
/* ATM statistics */
typedef struct stats_atm {
- u32 cells_transmitted; /* cells transmitted */
- u32 cells_received; /* cells received */
- u32 vpi_bad_range; /* cell drops: VPI out of range */
- u32 vpi_no_conn; /* cell drops: no connection for VPI */
- u32 vci_bad_range; /* cell drops: VCI out of range */
- u32 vci_no_conn; /* cell drops: no connection for VCI */
- u32 pad[ 2 ]; /* i960 padding */
+ __be32 cells_transmitted; /* cells transmitted */
+ __be32 cells_received; /* cells received */
+ __be32 vpi_bad_range; /* cell drops: VPI out of range */
+ __be32 vpi_no_conn; /* cell drops: no connection for VPI */
+ __be32 vci_bad_range; /* cell drops: VCI out of range */
+ __be32 vci_no_conn; /* cell drops: no connection for VCI */
+ __be32 pad[ 2 ]; /* i960 padding */
} stats_atm_t;
/* AAL0 statistics */
typedef struct stats_aal0 {
- u32 cells_transmitted; /* cells transmitted */
- u32 cells_received; /* cells received */
- u32 cells_dropped; /* cells dropped */
- u32 pad[ 1 ]; /* i960 padding */
+ __be32 cells_transmitted; /* cells transmitted */
+ __be32 cells_received; /* cells received */
+ __be32 cells_dropped; /* cells dropped */
+ __be32 pad[ 1 ]; /* i960 padding */
} stats_aal0_t;
/* AAL3/4 statistics */
typedef struct stats_aal34 {
- u32 cells_transmitted; /* cells transmitted from segmented PDUs */
- u32 cells_received; /* cells reassembled into PDUs */
- u32 cells_crc_errors; /* payload CRC error count */
- u32 cells_protocol_errors; /* SAR or CS layer protocol errors */
- u32 cells_dropped; /* cells dropped: partial reassembly */
- u32 cspdus_transmitted; /* CS PDUs transmitted */
- u32 cspdus_received; /* CS PDUs received */
- u32 cspdus_protocol_errors; /* CS layer protocol errors */
- u32 cspdus_dropped; /* reassembled PDUs drop'd (in cells) */
- u32 pad[ 3 ]; /* i960 padding */
+ __be32 cells_transmitted; /* cells transmitted from segmented PDUs */
+ __be32 cells_received; /* cells reassembled into PDUs */
+ __be32 cells_crc_errors; /* payload CRC error count */
+ __be32 cells_protocol_errors; /* SAR or CS layer protocol errors */
+ __be32 cells_dropped; /* cells dropped: partial reassembly */
+ __be32 cspdus_transmitted; /* CS PDUs transmitted */
+ __be32 cspdus_received; /* CS PDUs received */
+ __be32 cspdus_protocol_errors; /* CS layer protocol errors */
+ __be32 cspdus_dropped; /* reassembled PDUs drop'd (in cells) */
+ __be32 pad[ 3 ]; /* i960 padding */
} stats_aal34_t;
/* AAL5 statistics */
typedef struct stats_aal5 {
- u32 cells_transmitted; /* cells transmitted from segmented SDUs */
- u32 cells_received; /* cells reassembled into SDUs */
- u32 cells_dropped; /* reassembled PDUs dropped (in cells) */
- u32 congestion_experienced; /* CRC error and length wrong */
- u32 cspdus_transmitted; /* CS PDUs transmitted */
- u32 cspdus_received; /* CS PDUs received */
- u32 cspdus_crc_errors; /* CS PDUs CRC errors */
- u32 cspdus_protocol_errors; /* CS layer protocol errors */
- u32 cspdus_dropped; /* reassembled PDUs dropped */
- u32 pad[ 3 ]; /* i960 padding */
+ __be32 cells_transmitted; /* cells transmitted from segmented SDUs */
+ __be32 cells_received; /* cells reassembled into SDUs */
+ __be32 cells_dropped; /* reassembled PDUs dropped (in cells) */
+ __be32 congestion_experienced; /* CRC error and length wrong */
+ __be32 cspdus_transmitted; /* CS PDUs transmitted */
+ __be32 cspdus_received; /* CS PDUs received */
+ __be32 cspdus_crc_errors; /* CS PDUs CRC errors */
+ __be32 cspdus_protocol_errors; /* CS layer protocol errors */
+ __be32 cspdus_dropped; /* reassembled PDUs dropped */
+ __be32 pad[ 3 ]; /* i960 padding */
} stats_aal5_t;
/* auxiliary statistics */
typedef struct stats_aux {
- u32 small_b1_failed; /* receive BD allocation failures */
- u32 large_b1_failed; /* receive BD allocation failures */
- u32 small_b2_failed; /* receive BD allocation failures */
- u32 large_b2_failed; /* receive BD allocation failures */
- u32 rpd_alloc_failed; /* receive PDU allocation failures */
- u32 receive_carrier; /* no carrier = 0, carrier = 1 */
- u32 pad[ 2 ]; /* i960 padding */
+ __be32 small_b1_failed; /* receive BD allocation failures */
+ __be32 large_b1_failed; /* receive BD allocation failures */
+ __be32 small_b2_failed; /* receive BD allocation failures */
+ __be32 large_b2_failed; /* receive BD allocation failures */
+ __be32 rpd_alloc_failed; /* receive PDU allocation failures */
+ __be32 receive_carrier; /* no carrier = 0, carrier = 1 */
+ __be32 pad[ 2 ]; /* i960 padding */
} stats_aux_t;
@@ -643,10 +643,10 @@ typedef struct host_bsq {
/* header of the firmware image */
typedef struct fw_header {
- u32 magic; /* magic number */
- u32 version; /* firmware version id */
- u32 load_offset; /* fw load offset in board memory */
- u32 start_offset; /* fw execution start address in board memory */
+ __le32 magic; /* magic number */
+ __le32 version; /* firmware version id */
+ __le32 load_offset; /* fw load offset in board memory */
+ __le32 start_offset; /* fw execution start address in board memory */
} fw_header_t;
#define FW_HEADER_MAGIC 0x65726f66 /* 'fore' */
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index eee54c0cde68..b967919fb7e2 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -555,7 +555,7 @@ idt77252_tx_dump(struct idt77252_dev *card)
struct vc_map *vc;
int i;
- printk("%s\n", __FUNCTION__);
+ printk("%s\n", __func__);
for (i = 0; i < card->tct_size; i++) {
vc = card->vcs[i];
if (!vc)
@@ -1035,7 +1035,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
skb = sb_pool_skb(card, le32_to_cpu(rsqe->word_2));
if (skb == NULL) {
printk("%s: NULL skb in %s, rsqe: %08x %08x %08x %08x\n",
- card->name, __FUNCTION__,
+ card->name, __func__,
le32_to_cpu(rsqe->word_1), le32_to_cpu(rsqe->word_2),
le32_to_cpu(rsqe->word_3), le32_to_cpu(rsqe->word_4));
return;
@@ -1873,7 +1873,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
return;
if (sb_pool_add(card, skb, queue)) {
- printk("%s: SB POOL full\n", __FUNCTION__);
+ printk("%s: SB POOL full\n", __func__);
goto outfree;
}
@@ -1883,7 +1883,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
IDT77252_PRV_PADDR(skb) = paddr;
if (push_rx_skb(card, skb, queue)) {
- printk("%s: FB QUEUE full\n", __FUNCTION__);
+ printk("%s: FB QUEUE full\n", __func__);
goto outunmap;
}
}
@@ -3821,12 +3821,12 @@ static int __init idt77252_init(void)
{
struct sk_buff *skb;
- printk("%s: at %p\n", __FUNCTION__, idt77252_init);
+ printk("%s: at %p\n", __func__, idt77252_init);
if (sizeof(skb->cb) < sizeof(struct atm_skb_data) +
sizeof(struct idt77252_skb_prv)) {
printk(KERN_ERR "%s: skb->cb is too small (%lu < %lu)\n",
- __FUNCTION__, (unsigned long) sizeof(skb->cb),
+ __func__, (unsigned long) sizeof(skb->cb),
(unsigned long) sizeof(struct atm_skb_data) +
sizeof(struct idt77252_skb_prv));
return -EIO;