Commit 06efbebc authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 42153d54 cb77f8e1
...@@ -795,7 +795,6 @@ static inline void drain_rx_pool (amb_dev * dev, unsigned char pool) { ...@@ -795,7 +795,6 @@ static inline void drain_rx_pool (amb_dev * dev, unsigned char pool) {
return; return;
} }
#ifdef MODULE
static void drain_rx_pools (amb_dev * dev) { static void drain_rx_pools (amb_dev * dev) {
unsigned char pool; unsigned char pool;
...@@ -803,10 +802,7 @@ static void drain_rx_pools (amb_dev * dev) { ...@@ -803,10 +802,7 @@ static void drain_rx_pools (amb_dev * dev) {
for (pool = 0; pool < NUM_RX_POOLS; ++pool) for (pool = 0; pool < NUM_RX_POOLS; ++pool)
drain_rx_pool (dev, pool); drain_rx_pool (dev, pool);
return;
} }
#endif
static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, int priority) { static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, int priority) {
rx_in rx; rx_in rx;
......
...@@ -627,7 +627,7 @@ typedef struct { ...@@ -627,7 +627,7 @@ typedef struct {
struct amb_dev { struct amb_dev {
u8 irq; u8 irq;
u8 flags; long flags;
u32 iobase; u32 iobase;
u32 * membase; u32 * membase;
......
...@@ -603,8 +603,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r, ...@@ -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 // note: rounding the rate down means rounding 'p' up
const unsigned long br = test_bit (ultra, (hrz_flags *) &dev->flags) ? const unsigned long br = test_bit(ultra, &dev->flags) ? BR_ULT : BR_HRZ;
BR_ULT : BR_HRZ;
u32 div = CR_MIND; u32 div = CR_MIND;
u32 pre; u32 pre;
...@@ -1106,9 +1105,9 @@ static inline void rx_bus_master_complete_handler (hrz_dev * dev) { ...@@ -1106,9 +1105,9 @@ static inline void rx_bus_master_complete_handler (hrz_dev * dev) {
static inline int tx_hold (hrz_dev * dev) { static inline int tx_hold (hrz_dev * dev) {
while (test_and_set_bit (tx_busy, &dev->flags)) { 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); 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)) if (signal_pending (current))
return -1; return -1;
} }
......
...@@ -429,7 +429,7 @@ struct hrz_dev { ...@@ -429,7 +429,7 @@ struct hrz_dev {
#endif #endif
u8 irq; u8 irq;
u8 flags; long flags;
u8 tx_last; u8 tx_last;
u8 tx_idle; u8 tx_idle;
......
...@@ -328,13 +328,7 @@ struct mxser_hwconf mxsercfg[MXSER_BOARDS]; ...@@ -328,13 +328,7 @@ struct mxser_hwconf mxsercfg[MXSER_BOARDS];
* static functions: * static functions:
*/ */
#ifdef MODULE
int init_module(void);
void cleanup_module(void);
#endif
static void mxser_getcfg(int board, struct mxser_hwconf *hwconf); 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_ISA_conf(int, struct mxser_hwconf *);
static int mxser_get_PCI_conf(struct pci_dev *, int, struct mxser_hwconf *); static int mxser_get_PCI_conf(struct pci_dev *, int, struct mxser_hwconf *);
static void mxser_do_softint(void *); static void mxser_do_softint(void *);
...@@ -373,21 +367,7 @@ static int mxser_set_modem_info(struct mxser_struct *, unsigned int, unsigned in ...@@ -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! * The MOXA C168/C104 serial driver boot-time initialization code!
*/ */
static void __exit mxser_module_exit(void)
#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)
{ {
int i, err = 0; int i, err = 0;
...@@ -411,8 +391,6 @@ void cleanup_module(void) ...@@ -411,8 +391,6 @@ void cleanup_module(void)
printk("Done.\n"); printk("Done.\n");
} }
#endif
int mxser_initbrd(int board, struct mxser_hwconf *hwconf) 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 ...@@ -510,7 +488,7 @@ static int mxser_get_PCI_conf(struct pci_dev *pdev, int board_type, struct mxser
return (0); return (0);
} }
int mxser_init(void) static int __init mxser_module_init(void)
{ {
int i, m, retval, b; int i, m, retval, b;
int n, index; int n, index;
...@@ -2493,3 +2471,6 @@ static void mxser_normal_mode(int port) ...@@ -2493,3 +2471,6 @@ static void mxser_normal_mode(int port)
} }
outb(0x00, port + 4); outb(0x00, port + 4);
} }
module_init(mxser_module_init);
module_exit(mxser_module_exit);
...@@ -44,7 +44,7 @@ struct sx_board { ...@@ -44,7 +44,7 @@ struct sx_board {
int poll; int poll;
int ta_type; int ta_type;
struct timer_list timer; struct timer_list timer;
int locks; long locks;
}; };
struct vpd_prom { struct vpd_prom {
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
* *
* ADB HID driver for Power Macintosh computers. * ADB HID driver for Power Macintosh computers.
* *
* Adapted from drivers/macintosh/mac_keyb.c by Franz Sirl * Adapted from drivers/macintosh/mac_keyb.c by Franz Sirl.
* (see that file for its authors and contributors). * drivers/macintosh/mac_keyb.c was Copyright (C) 1996 Paul Mackerras
* with considerable contributions from Ben Herrenschmidt and others.
* *
* Copyright (C) 2000 Franz Sirl. * Copyright (C) 2000 Franz Sirl.
* *
...@@ -433,22 +434,17 @@ static void leds_done(struct adb_request *req) ...@@ -433,22 +434,17 @@ static void leds_done(struct adb_request *req)
static int static int
adb_message_handler(struct notifier_block *this, unsigned long code, void *x) adb_message_handler(struct notifier_block *this, unsigned long code, void *x)
{ {
unsigned long flags;
switch (code) { switch (code) {
case ADB_MSG_PRE_RESET: case ADB_MSG_PRE_RESET:
case ADB_MSG_POWERDOWN: case ADB_MSG_POWERDOWN:
/* Stop the repeat timer. Autopoll is already off at this point */ /* Stop the repeat timer. Autopoll is already off at this point */
save_flags(flags);
cli();
{ {
int i; int i;
for (i = 1; i < 16; i++) { for (i = 1; i < 16; i++) {
if (adbhid[i]) if (adbhid[i])
del_timer(&adbhid[i]->input.timer); del_timer_sync(&adbhid[i]->input.timer);
} }
} }
restore_flags(flags);
/* Stop pending led requests */ /* Stop pending led requests */
while(!led_request.complete) while(!led_request.complete)
...@@ -479,7 +475,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id, ...@@ -479,7 +475,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
memset(adbhid[id], 0, sizeof(struct adbhid)); memset(adbhid[id], 0, sizeof(struct adbhid));
sprintf(adbhid[id]->phys, "adb%d:%d.%02x/input", id, default_id, original_handler_id); sprintf(adbhid[id]->phys, "adb%d:%d.%02x/input", id, default_id, original_handler_id);
init_input_dev(&adbhid[id]); init_input_dev(&adbhid[id]->input);
adbhid[id]->id = default_id; adbhid[id]->id = default_id;
adbhid[id]->original_handler_id = original_handler_id; adbhid[id]->original_handler_id = original_handler_id;
...@@ -508,21 +504,21 @@ adbhid_input_register(int id, int default_id, int original_handler_id, ...@@ -508,21 +504,21 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
switch (original_handler_id) { switch (original_handler_id) {
default: default:
printk("<unknown>.\n"); printk("<unknown>.\n");
adbhid[id]->input.idversion = ADB_KEYBOARD_UNKNOWN; adbhid[id]->input.id.version = ADB_KEYBOARD_UNKNOWN;
break; break;
case 0x01: case 0x02: case 0x03: case 0x06: case 0x08: case 0x01: case 0x02: case 0x03: case 0x06: case 0x08:
case 0x0C: case 0x10: case 0x18: case 0x1B: case 0x1C: case 0x0C: case 0x10: case 0x18: case 0x1B: case 0x1C:
case 0xC0: case 0xC3: case 0xC6: case 0xC0: case 0xC3: case 0xC6:
printk("ANSI.\n"); printk("ANSI.\n");
adbhid[id]->input.idversion = ADB_KEYBOARD_ANSI; adbhid[id]->input.id.version = ADB_KEYBOARD_ANSI;
break; break;
case 0x04: case 0x05: case 0x07: case 0x09: case 0x0D: case 0x04: case 0x05: case 0x07: case 0x09: case 0x0D:
case 0x11: case 0x14: case 0x19: case 0x1D: case 0xC1: case 0x11: case 0x14: case 0x19: case 0x1D: case 0xC1:
case 0xC4: case 0xC7: case 0xC4: case 0xC7:
printk("ISO, swapping keys.\n"); printk("ISO, swapping keys.\n");
adbhid[id]->input.idversion = ADB_KEYBOARD_ISO; adbhid[id]->input.id.version = ADB_KEYBOARD_ISO;
i = adbhid[id]->keycode[10]; i = adbhid[id]->keycode[10];
adbhid[id]->keycode[10] = adbhid[id]->keycode[50]; adbhid[id]->keycode[10] = adbhid[id]->keycode[50];
adbhid[id]->keycode[50] = i; adbhid[id]->keycode[50] = i;
...@@ -531,7 +527,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id, ...@@ -531,7 +527,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
case 0x12: case 0x15: case 0x16: case 0x17: case 0x1A: case 0x12: case 0x15: case 0x16: case 0x17: case 0x1A:
case 0x1E: case 0xC2: case 0xC5: case 0xC8: case 0xC9: case 0x1E: case 0xC2: case 0xC5: case 0xC8: case 0xC9:
printk("JIS.\n"); printk("JIS.\n");
adbhid[id]->input.idversion = ADB_KEYBOARD_JIS; adbhid[id]->input.id.version = ADB_KEYBOARD_JIS;
break; break;
} }
......
...@@ -1155,8 +1155,8 @@ static void netdev_timer(unsigned long data) ...@@ -1155,8 +1155,8 @@ static void netdev_timer(unsigned long data)
unsigned int old_linkok = np->linkok; unsigned int old_linkok = np->linkok;
if (debug) if (debug)
printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8lx " printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x "
"config %8.8lx.\n", dev->name, readl(ioaddr + ISR), "config %8.8x.\n", dev->name, readl(ioaddr + ISR),
readl(ioaddr + TCRRCR)); readl(ioaddr + TCRRCR));
if (np->flags == HAS_MII_XCVR) { if (np->flags == HAS_MII_XCVR) {
...@@ -1184,7 +1184,7 @@ static void tx_timeout(struct net_device *dev) ...@@ -1184,7 +1184,7 @@ static void tx_timeout(struct net_device *dev)
long ioaddr = dev->base_addr; long ioaddr = dev->base_addr;
int i; 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)); " resetting...\n", dev->name, readl(ioaddr + ISR));
{ {
...@@ -1554,7 +1554,7 @@ static void intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) ...@@ -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; np->stats.rx_crc_errors += (readl(ioaddr + TALLY) & 0x7fff0000) >> 16;
if (debug) 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)); dev->name, readl(ioaddr + ISR));
writel(np->imrvalue, ioaddr + IMR); writel(np->imrvalue, ioaddr + IMR);
......
...@@ -390,7 +390,7 @@ int __init lance_probe(struct net_device *dev) ...@@ -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) static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int options)
{ {
struct lance_private *lp; 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; int i, reset_val, lance_version;
const char *chipname; const char *chipname;
/* Flags for specific chips or boards. */ /* Flags for specific chips or boards. */
......
...@@ -184,11 +184,41 @@ static struct card { ...@@ -184,11 +184,41 @@ static struct card {
short addr_offset; short addr_offset;
unsigned char *vendor_id; unsigned char *vendor_id;
char *cardname; char *cardname;
unsigned char config; long config;
} cards[] = { } 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 } , .id0 = NI65_ID0,
{ NE2100_ID0,NE2100_ID1,0x0e,0x18,0x10,0x0,NULL,"generic NE2100", 0x0 } .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 #define NUM_CARDS 3
...@@ -415,7 +445,8 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr) ...@@ -415,7 +445,8 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
else { else {
if(dev->dma == 0) { if(dev->dma == 0) {
/* 'stuck test' from lance.c */ /* '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++) { for(i=1;i<5;i++) {
int dma = dmatab[i]; int dma = dmatab[i];
if(test_bit(dma,&dma_channels) || request_dma(dma,"ni6510")) if(test_bit(dma,&dma_channels) || request_dma(dma,"ni6510"))
......
...@@ -142,14 +142,13 @@ static void __init network_ldisc_init(void) ...@@ -142,14 +142,13 @@ static void __init network_ldisc_init(void)
static void __init special_device_init(void) static void __init special_device_init(void)
{ {
#ifdef CONFIG_NET_SB1000 #ifdef CONFIG_NET_SB1000
{
extern int sb1000_probe(struct net_device *dev); extern int sb1000_probe(struct net_device *dev);
static struct net_device sb1000_dev =
{ static struct net_device sb1000_dev = {
"cm0" __PAD3, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, sb1000_probe .name = "cm0" __PAD3,
.init = sb1000_probe,
}; };
register_netdev(&sb1000_dev); register_netdev(&sb1000_dev);
}
#endif #endif
} }
......
...@@ -214,7 +214,7 @@ struct hdlcdrv_state { ...@@ -214,7 +214,7 @@ struct hdlcdrv_state {
struct hdlcdrv_hdlctx { struct hdlcdrv_hdlctx {
struct hdlcdrv_hdlcbuffer hbuf; struct hdlcdrv_hdlcbuffer hbuf;
int in_hdlc_tx; long in_hdlc_tx;
/* /*
* 0 = send flags * 0 = send flags
* 1 = send txtail (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