Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43668
b: refs/heads/master
c: eae4436
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Dec 8, 2006
1 parent 4bbdd2f commit 2ce1ffb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 70 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ead568c9cdab2592abdbd1f023931665cc24b5db
refs/heads/master: eae4436a4e513f5f912dcc5dac79038f22fb6403
109 changes: 40 additions & 69 deletions trunk/drivers/char/mxser_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -2803,7 +2803,8 @@ static int __init mxser_module_init(void)
{
struct pci_dev *pdev = NULL;
struct mxser_board *brd;
unsigned int i, m;
unsigned long cap;
unsigned int i, m, isaloop;
int retval, b, n;

pr_debug("Loading module mxser ...\n");
Expand Down Expand Up @@ -2839,84 +2840,54 @@ static int __init mxser_module_init(void)

m = 0;
/* Start finding ISA boards here */
for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) {
int cap;

if (!(cap = mxserBoardCAP[b]))
continue;

brd = &mxser_boards[m];
retval = mxser_get_ISA_conf(cap, brd);

if (retval != 0)
printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n",
mxser_brdname[brd->board_type - 1], ioaddr[b]);

if (retval <= 0) {
if (retval == MXSER_ERR_IRQ)
printk(KERN_ERR "Invalid interrupt number, "
"board not configured\n");
else if (retval == MXSER_ERR_IRQ_CONFLIT)
printk(KERN_ERR "Invalid interrupt number, "
"board not configured\n");
else if (retval == MXSER_ERR_VECTOR)
printk(KERN_ERR "Invalid interrupt vector, "
"board not configured\n");
else if (retval == MXSER_ERR_IOADDR)
printk(KERN_ERR "Invalid I/O address, "
"board not configured\n");
for (isaloop = 0; isaloop < 2; isaloop++)
for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) {
if (!isaloop)
cap = mxserBoardCAP[b]; /* predefined */
else
cap = ioaddr[b]; /* module param */

continue;
}
if (!cap)
continue;

brd->pdev = NULL;
brd = &mxser_boards[m];
retval = mxser_get_ISA_conf(cap, brd);

/* mxser_initbrd will hook ISR. */
if (mxser_initbrd(brd) < 0)
continue;
if (retval != 0)
printk(KERN_INFO "Found MOXA %s board "
"(CAP=0x%x)\n",
mxser_brdname[brd->board_type - 1],
ioaddr[b]);

m++;
}
if (retval <= 0) {
if (retval == MXSER_ERR_IRQ)
printk(KERN_ERR "Invalid interrupt "
"number, board not "
"configured\n");
else if (retval == MXSER_ERR_IRQ_CONFLIT)
printk(KERN_ERR "Invalid interrupt "
"number, board not "
"configured\n");
else if (retval == MXSER_ERR_VECTOR)
printk(KERN_ERR "Invalid interrupt "
"vector, board not "
"configured\n");
else if (retval == MXSER_ERR_IOADDR)
printk(KERN_ERR "Invalid I/O address, "
"board not configured\n");

/* Start finding ISA boards from module arg */
for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) {
unsigned long cap;
continue;
}

if (!(cap = ioaddr[b]))
continue;
brd->pdev = NULL;

brd = &mxser_boards[m];
retval = mxser_get_ISA_conf(cap, &mxser_boards[m]);

if (retval != 0)
printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n",
mxser_brdname[brd->board_type - 1], ioaddr[b]);

if (retval <= 0) {
if (retval == MXSER_ERR_IRQ)
printk(KERN_ERR "Invalid interrupt number, "
"board not configured\n");
else if (retval == MXSER_ERR_IRQ_CONFLIT)
printk(KERN_ERR "Invalid interrupt number, "
"board not configured\n");
else if (retval == MXSER_ERR_VECTOR)
printk(KERN_ERR "Invalid interrupt vector, "
"board not configured\n");
else if (retval == MXSER_ERR_IOADDR)
printk(KERN_ERR "Invalid I/O address, "
"board not configured\n");
/* mxser_initbrd will hook ISR. */
if (mxser_initbrd(brd) < 0)
continue;

continue;
m++;
}

brd->pdev = NULL;
/* mxser_initbrd will hook ISR. */
if (mxser_initbrd(brd) < 0)
continue;

m++;
}

/* start finding PCI board here */
n = ARRAY_SIZE(mxser_pcibrds) - 1;
b = 0;
Expand Down

0 comments on commit 2ce1ffb

Please sign in to comment.