Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94468080 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits)
  jsm: fixing error if the driver fails to load
  jsm: removing the uart structure and filename on error
  tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call
  tty: Keep the default buffering to sub-page units
  tty: Fix up char drivers request_room usage
  tty: Fix the ldisc hangup race
  serial: timberdale: Remove dependancies
  nozomi: Tidy up the PCI table
  nozomi: Fix mutex handling
  nozomi: Add tty_port usage
  sdio_uart: Use kfifo instead of the messy circ stuff
  serial: bcm63xx_uart: allow more than one uart to be registered.
  serial: bcm63xx_uart: don't use kfree() on non kmalloced area.
  serial: bfin_5xx: pull in linux/io.h for ioremap prototypes
  serial: bfin_5xx: kgdboc should accept gdb break only when it is active
  serial: bfin_5xx: need to disable DMA TX interrupt too
  serial: bfin_5xx: remove useless gpio handling with hard flow control
  Char: synclink, remove unnecessary checks
  tty: declare MODULE_FIRMWARE in various drivers
  ip2: Add module parameter.
  ...
parents fb7b096d 137ee2f5
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -158,13 +158,11 @@ static unsigned int cy_isa_addresses[] = {

#define NR_ISA_ADDRS ARRAY_SIZE(cy_isa_addresses)

#ifdef MODULE
static long maddr[NR_CARDS];
static int irq[NR_CARDS];

module_param_array(maddr, long, NULL, 0);
module_param_array(irq, int, NULL, 0);
#endif

#endif				/* CONFIG_ISA */

@@ -598,12 +596,6 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
	save_car = readb(base_addr + (CyCAR << index));
	cy_writeb(base_addr + (CyCAR << index), save_xir);

	/* validate the port# (as configured and open) */
	if (channel + chip * 4 >= cinfo->nports) {
		cy_writeb(base_addr + (CySRER << index),
			  readb(base_addr + (CySRER << index)) & ~CyTxRdy);
		goto end;
	}
	info = &cinfo->ports[channel + chip * 4];
	tty = tty_port_tty_get(&info->port);
	if (tty == NULL) {
@@ -3316,13 +3308,10 @@ static int __init cy_detect_isa(void)
	unsigned short cy_isa_irq, nboard;
	void __iomem *cy_isa_address;
	unsigned short i, j, cy_isa_nchan;
#ifdef MODULE
	int isparam = 0;
#endif

	nboard = 0;

#ifdef MODULE
	/* Check for module parameters */
	for (i = 0; i < NR_CARDS; i++) {
		if (maddr[i] || i) {
@@ -3332,7 +3321,6 @@ static int __init cy_detect_isa(void)
		if (!maddr[i])
			break;
	}
#endif

	/* scan the address table probing for Cyclom-Y/ISA boards */
	for (i = 0; i < NR_ISA_ADDRS; i++) {
@@ -3353,11 +3341,10 @@ static int __init cy_detect_isa(void)
			iounmap(cy_isa_address);
			continue;
		}
#ifdef MODULE

		if (isparam && i < NR_CARDS && irq[i])
			cy_isa_irq = irq[i];
		else
#endif
			/* find out the board's irq by probing */
			cy_isa_irq = detect_isa_irq(cy_isa_address);
		if (cy_isa_irq == 0) {
@@ -4208,3 +4195,4 @@ module_exit(cy_cleanup_module);
MODULE_LICENSE("GPL");
MODULE_VERSION(CY_VERSION);
MODULE_ALIAS_CHARDEV_MAJOR(CYCLADES_MAJOR);
MODULE_FIRMWARE("cyzfirm.bin");
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ static void hvc_console_print(struct console *co, const char *b,
		return;

	/* This console adapter was removed so it is not usable. */
	if (vtermnos[index] < 0)
	if (vtermnos[index] == -1)
		return;

	while (count > 0 || i > 0) {
+20 −6
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ static int DumpFifoBuffer( char __user *, int);

static void ip2_init_board(int, const struct firmware *);
static unsigned short find_eisa_board(int);
static int ip2_setup(char *str);

/***************/
/* Static Data */
@@ -263,7 +264,7 @@ static int tracewrap;
/* Macros */
/**********/

#if defined(MODULE) && defined(IP2DEBUG_OPEN)
#ifdef IP2DEBUG_OPEN
#define DBG_CNT(s) printk(KERN_DEBUG "(%s): [%x] ttyc=%d, modc=%x -> %s\n", \
		    tty->name,(pCh->flags), \
		    tty->count,/*GET_USE_COUNT(module)*/0,s)
@@ -285,7 +286,10 @@ MODULE_AUTHOR("Doug McNash");
MODULE_DESCRIPTION("Computone IntelliPort Plus Driver");
MODULE_LICENSE("GPL");

#define	MAX_CMD_STR	50

static int poll_only;
static char cmd[MAX_CMD_STR];

static int Eisa_irq;
static int Eisa_slot;
@@ -309,6 +313,8 @@ module_param_array(io, int, NULL, 0);
MODULE_PARM_DESC(io, "I/O ports for IntelliPort Cards");
module_param(poll_only, bool, 0);
MODULE_PARM_DESC(poll_only, "Do not use card interrupts");
module_param_string(ip2, cmd, MAX_CMD_STR, 0);
MODULE_PARM_DESC(ip2, "Contains module parameter passed with 'ip2='");

/* for sysfs class support */
static struct class *ip2_class;
@@ -487,7 +493,6 @@ static const struct firmware *ip2_request_firmware(void)
	return fw;
}

#ifndef MODULE
/******************************************************************************
 *	ip2_setup:
 *		str: kernel command line string
@@ -531,7 +536,6 @@ static int __init ip2_setup(char *str)
	return 1;
}
__setup("ip2=", ip2_setup);
#endif /* !MODULE */

static int __init ip2_loadmain(void)
{
@@ -539,14 +543,20 @@ static int __init ip2_loadmain(void)
	int err = 0;
	i2eBordStrPtr pB = NULL;
	int rc = -1;
	struct pci_dev *pdev = NULL;
	const struct firmware *fw = NULL;
	char *str;

	str = cmd;

	if (poll_only) {
		/* Hard lock the interrupts to zero */
		irq[0] = irq[1] = irq[2] = irq[3] = poll_only = 0;
	}

	/* Check module parameter with 'ip2=' has been passed or not */
	if (!poll_only && (!strncmp(str, "ip2=", 4)))
		ip2_setup(str);

	ip2trace(ITRC_NO_PORT, ITRC_INIT, ITRC_ENTER, 0);

	/* process command line arguments to modprobe or
@@ -612,6 +622,7 @@ static int __init ip2_loadmain(void)
		case PCI:
#ifdef CONFIG_PCI
		{
			struct pci_dev *pdev = NULL;
			u32 addr;
			int status;

@@ -626,7 +637,7 @@ static int __init ip2_loadmain(void)

			if (pci_enable_device(pdev)) {
				dev_err(&pdev->dev, "can't enable device\n");
				break;
				goto out;
			}
			ip2config.type[i] = PCI;
			ip2config.pci_dev[i] = pci_dev_get(pdev);
@@ -638,6 +649,8 @@ static int __init ip2_loadmain(void)
				dev_err(&pdev->dev, "I/O address error\n");

			ip2config.irq[i] = pdev->irq;
out:
			pci_dev_put(pdev);
		}
#else
			printk(KERN_ERR "IP2: PCI card specified but PCI "
@@ -656,7 +669,6 @@ static int __init ip2_loadmain(void)
			break;
		}	/* switch */
	}	/* for */
	pci_dev_put(pdev);

	for (i = 0; i < IP2_MAX_BOARDS; ++i) {
		if (ip2config.addr[i]) {
@@ -3197,3 +3209,5 @@ static struct pci_device_id ip2main_pci_tbl[] __devinitdata = {
};

MODULE_DEVICE_TABLE(pci, ip2main_pci_tbl);

MODULE_FIRMWARE("intelliport2.bin");
+31 −23
Original line number Diff line number Diff line
@@ -113,6 +113,8 @@
 *		64-bit verification
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/kernel.h>
@@ -140,7 +142,6 @@
#define InterruptTheCard(base) outw(0, (base) + 0xc)
#define ClearInterrupt(base) inw((base) + 0x0a)

#define pr_dbg(str...) pr_debug("ISICOM: " str)
#ifdef DEBUG
#define isicom_paranoia_check(a, b, c) __isicom_paranoia_check((a), (b), (c))
#else
@@ -249,8 +250,7 @@ static int lock_card(struct isi_board *card)
		spin_unlock_irqrestore(&card->card_lock, card->flags);
		msleep(10);
	}
	printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n",
		card->base);
	pr_warning("Failed to lock Card (0x%lx)\n", card->base);

	return 0;	/* Failed to acquire the card! */
}
@@ -379,13 +379,13 @@ static inline int __isicom_paranoia_check(struct isi_port const *port,
	char *name, const char *routine)
{
	if (!port) {
		printk(KERN_WARNING "ISICOM: Warning: bad isicom magic for "
			"dev %s in %s.\n", name, routine);
		pr_warning("Warning: bad isicom magic for dev %s in %s.\n",
			   name, routine);
		return 1;
	}
	if (port->magic != ISICOM_MAGIC) {
		printk(KERN_WARNING "ISICOM: Warning: NULL isicom port for "
			"dev %s in %s.\n", name, routine);
		pr_warning("Warning: NULL isicom port for dev %s in %s.\n",
			   name, routine);
		return 1;
	}

@@ -450,8 +450,8 @@ static void isicom_tx(unsigned long _data)
		if (!(inw(base + 0x02) & (1 << port->channel)))
			continue;

		pr_dbg("txing %d bytes, port%d.\n", txcount,
			port->channel + 1);
		pr_debug("txing %d bytes, port%d.\n",
			 txcount, port->channel + 1);
		outw((port->channel << isi_card[card].shift_count) | txcount,
			base);
		residue = NO;
@@ -547,8 +547,8 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
	byte_count = header & 0xff;

	if (channel + 1 > card->port_count) {
		printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): "
			"%d(channel) > port_count.\n", base, channel+1);
		pr_warning("%s(0x%lx): %d(channel) > port_count.\n",
			   __func__, base, channel+1);
		outw(0x0000, base+0x04); /* enable interrupts */
		spin_unlock(&card->card_lock);
		return IRQ_HANDLED;
@@ -582,14 +582,15 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
				if (port->status & ISI_DCD) {
					if (!(header & ISI_DCD)) {
					/* Carrier has been lost  */
						pr_dbg("interrupt: DCD->low.\n"
							);
						pr_debug("%s: DCD->low.\n",
							 __func__);
						port->status &= ~ISI_DCD;
						tty_hangup(tty);
					}
				} else if (header & ISI_DCD) {
				/* Carrier has been detected */
					pr_dbg("interrupt: DCD->high.\n");
					pr_debug("%s: DCD->high.\n",
						__func__);
					port->status |= ISI_DCD;
					wake_up_interruptible(&port->port.open_wait);
				}
@@ -641,17 +642,19 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
			break;

		case 2:	/* Statistics		 */
			pr_dbg("isicom_interrupt: stats!!!.\n");
			pr_debug("%s: stats!!!\n", __func__);
			break;

		default:
			pr_dbg("Intr: Unknown code in status packet.\n");
			pr_debug("%s: Unknown code in status packet.\n",
				 __func__);
			break;
		}
	} else {				/* Data   Packet */

		count = tty_prepare_flip_string(tty, &rp, byte_count & ~1);
		pr_dbg("Intr: Can rx %d of %d bytes.\n", count, byte_count);
		pr_debug("%s: Can rx %d of %d bytes.\n",
			 __func__, count, byte_count);
		word_count = count >> 1;
		insw(base, rp, word_count);
		byte_count -= (word_count << 1);
@@ -661,8 +664,8 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
			byte_count -= 2;
		}
		if (byte_count > 0) {
			pr_dbg("Intr(0x%lx:%d): Flip buffer overflow! dropping "
				"bytes...\n", base, channel + 1);
			pr_debug("%s(0x%lx:%d): Flip buffer overflow! dropping bytes...\n",
				 __func__, base, channel + 1);
		/* drain out unread xtra data */
		while (byte_count > 0) {
				inw(base);
@@ -888,8 +891,8 @@ static void isicom_shutdown_port(struct isi_port *port)
	struct isi_board *card = port->card;

	if (--card->count < 0) {
		pr_dbg("isicom_shutdown_port: bad board(0x%lx) count %d.\n",
			card->base, card->count);
		pr_debug("%s: bad board(0x%lx) count %d.\n",
			 __func__, card->base, card->count);
		card->count = 0;
	}
	/* last port was closed, shutdown that board too */
@@ -1681,13 +1684,13 @@ static int __init isicom_init(void)

	retval = tty_register_driver(isicom_normal);
	if (retval) {
		pr_dbg("Couldn't register the dialin driver\n");
		pr_debug("Couldn't register the dialin driver\n");
		goto err_puttty;
	}

	retval = pci_register_driver(&isicom_driver);
	if (retval < 0) {
		printk(KERN_ERR "ISICOM: Unable to register pci driver.\n");
		pr_err("Unable to register pci driver.\n");
		goto err_unrtty;
	}

@@ -1717,3 +1720,8 @@ module_exit(isicom_exit);
MODULE_AUTHOR("MultiTech");
MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("isi608.bin");
MODULE_FIRMWARE("isi608em.bin");
MODULE_FIRMWARE("isi616em.bin");
MODULE_FIRMWARE("isi4608.bin");
MODULE_FIRMWARE("isi4616.bin");
+9 −11
Original line number Diff line number Diff line
@@ -164,24 +164,25 @@ static unsigned int moxaFuncTout = HZ / 2;
static unsigned int moxaLowWaterChk;
static DEFINE_MUTEX(moxa_openlock);
static DEFINE_SPINLOCK(moxa_lock);
/* Variables for insmod */
#ifdef MODULE

static unsigned long baseaddr[MAX_BOARDS];
static unsigned int type[MAX_BOARDS];
static unsigned int numports[MAX_BOARDS];
#endif

MODULE_AUTHOR("William Chen");
MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver");
MODULE_LICENSE("GPL");
#ifdef MODULE
MODULE_FIRMWARE("c218tunx.cod");
MODULE_FIRMWARE("cp204unx.cod");
MODULE_FIRMWARE("c320tunx.cod");

module_param_array(type, uint, NULL, 0);
MODULE_PARM_DESC(type, "card type: C218=2, C320=4");
module_param_array(baseaddr, ulong, NULL, 0);
MODULE_PARM_DESC(baseaddr, "base address");
module_param_array(numports, uint, NULL, 0);
MODULE_PARM_DESC(numports, "numports (ignored for C218)");
#endif

module_param(ttymajor, int, 0);

/*
@@ -1024,6 +1025,8 @@ static int __init moxa_init(void)
{
	unsigned int isabrds = 0;
	int retval = 0;
	struct moxa_board_conf *brd = moxa_boards;
	unsigned int i;

	printk(KERN_INFO "MOXA Intellio family driver version %s\n",
			MOXA_VERSION);
@@ -1051,10 +1054,7 @@ static int __init moxa_init(void)
	}

	/* Find the boards defined from module args. */
#ifdef MODULE
	{
	struct moxa_board_conf *brd = moxa_boards;
	unsigned int i;

	for (i = 0; i < MAX_BOARDS; i++) {
		if (!baseaddr[i])
			break;
@@ -1087,8 +1087,6 @@ static int __init moxa_init(void)
			isabrds++;
		}
	}
	}
#endif

#ifdef CONFIG_PCI
	retval = pci_register_driver(&moxa_pci_driver);
Loading