X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fmoxa.c;h=d57d3a61919b310f22e972e97cf1c8797334db1d;hb=d3352520273426e4c16e91d189aa8aa7ee5e96c5;hp=318c465451e645d105b920c8e35f7a05d2298a79;hpb=08d01c792568ba07d2bcf5202dbc8484dbff6747;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 318c465451e..d57d3a61919 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -2,7 +2,8 @@ /* * moxa.c -- MOXA Intellio family multiport serial driver. * - * Copyright (C) 1999-2000 Moxa Technologies (support@moxa.com.tw). + * Copyright (C) 1999-2000 Moxa Technologies (support@moxa.com). + * Copyright (c) 2007 Jiri Slaby * * This code is loosely based on the Linux serial driver, written by * Linus Torvalds, Theodore T'so and others. @@ -49,7 +50,7 @@ #include "moxa.h" -#define MOXA_VERSION "5.1k" +#define MOXA_VERSION "6.0k" #define MOXA_FW_HDRLEN 32 @@ -845,7 +846,10 @@ static int moxa_init_board(struct moxa_board_conf *brd, struct device *dev) ret = request_firmware(&fw, file, dev); if (ret) { - printk(KERN_ERR "request_firmware failed\n"); + printk(KERN_ERR "MOXA: request_firmware failed. Make sure " + "you've placed '%s' file into your firmware " + "loader directory (e.g. /lib/firmware)\n", + file); goto err_free; } @@ -933,7 +937,7 @@ static int __devinit moxa_pci_probe(struct pci_dev *pdev, goto err; } - board->basemem = ioremap(pci_resource_start(pdev, 2), 0x4000); + board->basemem = ioremap_nocache(pci_resource_start(pdev, 2), 0x4000); if (board->basemem == NULL) { dev_err(&pdev->dev, "can't remap io space 2\n"); goto err_reg; @@ -961,6 +965,9 @@ static int __devinit moxa_pci_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, board); + dev_info(&pdev->dev, "board '%s' ready (%u ports, firmware loaded)\n", + moxa_brdname[board_type - 1], board->numPorts); + return 0; err_base: iounmap(board->basemem); @@ -1035,7 +1042,7 @@ static int __init moxa_init(void) brd->numPorts = type[i] == MOXA_BOARD_C218_ISA ? 8 : numports[i]; brd->busType = MOXA_BUS_TYPE_ISA; - brd->basemem = ioremap(baseaddr[i], 0x4000); + brd->basemem = ioremap_nocache(baseaddr[i], 0x4000); if (!brd->basemem) { printk(KERN_ERR "MOXA: can't remap %lx\n", baseaddr[i]); @@ -1047,6 +1054,10 @@ static int __init moxa_init(void) continue; } + printk(KERN_INFO "MOXA isa board found at 0x%.8lu and " + "ready (%u ports, firmware loaded)\n", + baseaddr[i], brd->numPorts); + brd++; isabrds++; } @@ -1269,6 +1280,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty) */ if (ch == NULL) return 0; + lock_kernel(); chars = MoxaPortTxQueue(ch); if (chars) { /* @@ -1278,6 +1290,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty) if (!(ch->statusflags & EMPTYWAIT)) moxa_setup_empty_event(tty); } + unlock_kernel(); return chars; }