Commit c55457c2 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo

Merge conectiva.com.br:/home/BK/misc-2.5.old

into conectiva.com.br:/home/BK/misc-2.5
parents 942abc30 0c315582
......@@ -795,7 +795,6 @@ static inline void drain_rx_pool (amb_dev * dev, unsigned char pool) {
return;
}
#ifdef MODULE
static void drain_rx_pools (amb_dev * dev) {
unsigned char pool;
......@@ -803,10 +802,7 @@ static void drain_rx_pools (amb_dev * dev) {
for (pool = 0; pool < NUM_RX_POOLS; ++pool)
drain_rx_pool (dev, pool);
return;
}
#endif
static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, int priority) {
rx_in rx;
......
......@@ -627,7 +627,7 @@ typedef struct {
struct amb_dev {
u8 irq;
u8 flags;
long flags;
u32 iobase;
u32 * membase;
......
......@@ -603,8 +603,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r,
// note: rounding the rate down means rounding 'p' up
const unsigned long br = test_bit (ultra, (hrz_flags *) &dev->flags) ?
BR_ULT : BR_HRZ;
const unsigned long br = test_bit(ultra, &dev->flags) ? BR_ULT : BR_HRZ;
u32 div = CR_MIND;
u32 pre;
......@@ -1106,9 +1105,9 @@ static inline void rx_bus_master_complete_handler (hrz_dev * dev) {
static inline int tx_hold (hrz_dev * dev) {
while (test_and_set_bit (tx_busy, &dev->flags)) {
PRINTD (DBG_TX, "sleeping at tx lock %p %u", dev, dev->flags);
PRINTD (DBG_TX, "sleeping at tx lock %p %lu", dev, dev->flags);
interruptible_sleep_on (&dev->tx_queue);
PRINTD (DBG_TX, "woken at tx lock %p %u", dev, dev->flags);
PRINTD (DBG_TX, "woken at tx lock %p %lu", dev, dev->flags);
if (signal_pending (current))
return -1;
}
......
......@@ -429,7 +429,7 @@ struct hrz_dev {
#endif
u8 irq;
u8 flags;
long flags;
u8 tx_last;
u8 tx_idle;
......
......@@ -328,13 +328,7 @@ struct mxser_hwconf mxsercfg[MXSER_BOARDS];
* static functions:
*/
#ifdef MODULE
int init_module(void);
void cleanup_module(void);
#endif
static void mxser_getcfg(int board, struct mxser_hwconf *hwconf);
int mxser_init(void);
static int mxser_get_ISA_conf(int, struct mxser_hwconf *);
static int mxser_get_PCI_conf(struct pci_dev *, int, struct mxser_hwconf *);
static void mxser_do_softint(void *);
......@@ -373,21 +367,7 @@ static int mxser_set_modem_info(struct mxser_struct *, unsigned int, unsigned in
* The MOXA C168/C104 serial driver boot-time initialization code!
*/
#ifdef MODULE
int init_module(void)
{
int ret;
if (verbose)
printk("Loading module mxser ...\n");
ret = mxser_init();
if (verbose)
printk("Done.\n");
return (ret);
}
void cleanup_module(void)
static void __exit mxser_module_exit(void)
{
int i, err = 0;
......@@ -411,8 +391,6 @@ void cleanup_module(void)
printk("Done.\n");
}
#endif
int mxser_initbrd(int board, struct mxser_hwconf *hwconf)
{
......@@ -510,7 +488,7 @@ static int mxser_get_PCI_conf(struct pci_dev *pdev, int board_type, struct mxser
return (0);
}
int mxser_init(void)
static int __init mxser_module_init(void)
{
int i, m, retval, b;
int n, index;
......@@ -2493,3 +2471,6 @@ static void mxser_normal_mode(int port)
}
outb(0x00, port + 4);
}
module_init(mxser_module_init);
module_exit(mxser_module_exit);
......@@ -44,7 +44,7 @@ struct sx_board {
int poll;
int ta_type;
struct timer_list timer;
int locks;
long locks;
};
struct vpd_prom {
......
......@@ -1155,8 +1155,8 @@ static void netdev_timer(unsigned long data)
unsigned int old_linkok = np->linkok;
if (debug)
printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8lx "
"config %8.8lx.\n", dev->name, readl(ioaddr + ISR),
printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x "
"config %8.8x.\n", dev->name, readl(ioaddr + ISR),
readl(ioaddr + TCRRCR));
if (np->flags == HAS_MII_XCVR) {
......@@ -1184,7 +1184,7 @@ static void tx_timeout(struct net_device *dev)
long ioaddr = dev->base_addr;
int i;
printk(KERN_WARNING "%s: Transmit timed out, status %8.8lx,"
printk(KERN_WARNING "%s: Transmit timed out, status %8.8x,"
" resetting...\n", dev->name, readl(ioaddr + ISR));
{
......@@ -1554,7 +1554,7 @@ static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
np->stats.rx_crc_errors += (readl(ioaddr + TALLY) & 0x7fff0000) >> 16;
if (debug)
printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4lx.\n",
printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n",
dev->name, readl(ioaddr + ISR));
writel(np->imrvalue, ioaddr + IMR);
......
......@@ -390,7 +390,7 @@ int __init lance_probe(struct net_device *dev)
static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int options)
{
struct lance_private *lp;
short dma_channels; /* Mark spuriously-busy DMA channels */
long dma_channels; /* Mark spuriously-busy DMA channels */
int i, reset_val, lance_version;
const char *chipname;
/* Flags for specific chips or boards. */
......
......@@ -184,11 +184,41 @@ static struct card {
short addr_offset;
unsigned char *vendor_id;
char *cardname;
unsigned char config;
long config;
} cards[] = {
{ NI65_ID0,NI65_ID1,0x0e,0x10,0x0,0x8,ni_vendor,"ni6510", 0x1 } ,
{ NI65_EB_ID0,NI65_EB_ID1,0x0e,0x18,0x10,0x0,ni_vendor,"ni6510 EtherBlaster", 0x2 } ,
{ NE2100_ID0,NE2100_ID1,0x0e,0x18,0x10,0x0,NULL,"generic NE2100", 0x0 }
{
.id0 = NI65_ID0,
.id1 = NI65_ID1,
.id_offset = 0x0e,
.total_size = 0x10,
.cmd_offset = 0x0,
.addr_offset = 0x8,
.vendor_id = ni_vendor,
.cardname = "ni6510",
.config = 0x1,
},
{
.id0 = NI65_EB_ID0,
.id1 = NI65_EB_ID1,
.id_offset = 0x0e,
.total_size = 0x18,
.cmd_offset = 0x10,
.addr_offset = 0x0,
.vendor_id = ni_vendor,
.cardname = "ni6510 EtherBlaster",
.config = 0x2,
},
{
.id0 = NE2100_ID0,
.id1 = NE2100_ID1,
.id_offset = 0x0e,
.total_size = 0x18,
.cmd_offset = 0x10,
.addr_offset = 0x0,
.vendor_id = NULL,
.cardname = "generic NE2100",
.config = 0x0,
},
};
#define NUM_CARDS 3
......@@ -415,7 +445,8 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
else {
if(dev->dma == 0) {
/* 'stuck test' from lance.c */
int dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0x0f) | (inb(DMA2_STAT_REG) & 0xf0);
long dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0x0f) |
(inb(DMA2_STAT_REG) & 0xf0);
for(i=1;i<5;i++) {
int dma = dmatab[i];
if(test_bit(dma,&dma_channels) || request_dma(dma,"ni6510"))
......
......@@ -142,14 +142,13 @@ static void __init network_ldisc_init(void)
static void __init special_device_init(void)
{
#ifdef CONFIG_NET_SB1000
{
extern int sb1000_probe(struct net_device *dev);
static struct net_device sb1000_dev =
{
"cm0" __PAD3, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, sb1000_probe
static struct net_device sb1000_dev = {
.name = "cm0" __PAD3,
.init = sb1000_probe,
};
register_netdev(&sb1000_dev);
}
#endif
}
......
......@@ -214,7 +214,7 @@ struct hdlcdrv_state {
struct hdlcdrv_hdlctx {
struct hdlcdrv_hdlcbuffer hbuf;
int in_hdlc_tx;
long in_hdlc_tx;
/*
* 0 = send flags
* 1 = send txtail (flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment