diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-22 19:19:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-22 19:19:19 -0400 |
commit | 0f1d9f78ce41a8874d30271ef8480e6f8f7f1fce (patch) | |
tree | a55f50977c4f1c7d5f14beaeb8f4a71b8bcb7444 /drivers | |
parent | 8c9e80ed276fc4b9c9fadf29d8bf6b3576112f1a (diff) | |
parent | 9db4e4381a8e881ff65a5d3400bfa471f84217e7 (diff) |
Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
tty/n_gsm: fix bug in CRC calculation for gsm1 mode
serial/imx: read cts state only after acking cts change irq
parport_pc.c: correctly release the requested region for the IT887x
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parport/parport_pc.c | 8 | ||||
-rw-r--r-- | drivers/tty/n_gsm.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/imx.c | 3 |
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index a3755ffc03d4..bc8ce48f0778 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -2550,7 +2550,6 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, | |||
2550 | const struct parport_pc_via_data *via) | 2550 | const struct parport_pc_via_data *via) |
2551 | { | 2551 | { |
2552 | short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; | 2552 | short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; |
2553 | struct resource *base_res; | ||
2554 | u32 ite8872set; | 2553 | u32 ite8872set; |
2555 | u32 ite8872_lpt, ite8872_lpthi; | 2554 | u32 ite8872_lpt, ite8872_lpthi; |
2556 | u8 ite8872_irq, type; | 2555 | u8 ite8872_irq, type; |
@@ -2561,8 +2560,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, | |||
2561 | 2560 | ||
2562 | /* make sure which one chip */ | 2561 | /* make sure which one chip */ |
2563 | for (i = 0; i < 5; i++) { | 2562 | for (i = 0; i < 5; i++) { |
2564 | base_res = request_region(inta_addr[i], 32, "it887x"); | 2563 | if (request_region(inta_addr[i], 32, "it887x")) { |
2565 | if (base_res) { | ||
2566 | int test; | 2564 | int test; |
2567 | pci_write_config_dword(pdev, 0x60, | 2565 | pci_write_config_dword(pdev, 0x60, |
2568 | 0xe5000000 | inta_addr[i]); | 2566 | 0xe5000000 | inta_addr[i]); |
@@ -2571,7 +2569,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, | |||
2571 | test = inb(inta_addr[i]); | 2569 | test = inb(inta_addr[i]); |
2572 | if (test != 0xff) | 2570 | if (test != 0xff) |
2573 | break; | 2571 | break; |
2574 | release_region(inta_addr[i], 0x8); | 2572 | release_region(inta_addr[i], 32); |
2575 | } | 2573 | } |
2576 | } | 2574 | } |
2577 | if (i >= 5) { | 2575 | if (i >= 5) { |
@@ -2635,7 +2633,7 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, | |||
2635 | /* | 2633 | /* |
2636 | * Release the resource so that parport_pc_probe_port can get it. | 2634 | * Release the resource so that parport_pc_probe_port can get it. |
2637 | */ | 2635 | */ |
2638 | release_resource(base_res); | 2636 | release_region(inta_addr[i], 32); |
2639 | if (parport_pc_probe_port(ite8872_lpt, ite8872_lpthi, | 2637 | if (parport_pc_probe_port(ite8872_lpt, ite8872_lpthi, |
2640 | irq, PARPORT_DMA_NONE, &pdev->dev, 0)) { | 2638 | irq, PARPORT_DMA_NONE, &pdev->dev, 0)) { |
2641 | printk(KERN_INFO | 2639 | printk(KERN_INFO |
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 47f8cdb207f1..74273e638c0d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -1658,8 +1658,12 @@ static void gsm_queue(struct gsm_mux *gsm) | |||
1658 | 1658 | ||
1659 | if ((gsm->control & ~PF) == UI) | 1659 | if ((gsm->control & ~PF) == UI) |
1660 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); | 1660 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); |
1661 | /* generate final CRC with received FCS */ | 1661 | if (gsm->encoding == 0){ |
1662 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | 1662 | /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only. |
1663 | In this case it contain the last piece of data | ||
1664 | required to generate final CRC */ | ||
1665 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | ||
1666 | } | ||
1663 | if (gsm->fcs != GOOD_FCS) { | 1667 | if (gsm->fcs != GOOD_FCS) { |
1664 | gsm->bad_fcs++; | 1668 | gsm->bad_fcs++; |
1665 | if (debug & 4) | 1669 | if (debug & 4) |
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index cb36b0d4ef3c..62df72d9f0aa 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -382,12 +382,13 @@ static void imx_start_tx(struct uart_port *port) | |||
382 | static irqreturn_t imx_rtsint(int irq, void *dev_id) | 382 | static irqreturn_t imx_rtsint(int irq, void *dev_id) |
383 | { | 383 | { |
384 | struct imx_port *sport = dev_id; | 384 | struct imx_port *sport = dev_id; |
385 | unsigned int val = readl(sport->port.membase + USR1) & USR1_RTSS; | 385 | unsigned int val; |
386 | unsigned long flags; | 386 | unsigned long flags; |
387 | 387 | ||
388 | spin_lock_irqsave(&sport->port.lock, flags); | 388 | spin_lock_irqsave(&sport->port.lock, flags); |
389 | 389 | ||
390 | writel(USR1_RTSD, sport->port.membase + USR1); | 390 | writel(USR1_RTSD, sport->port.membase + USR1); |
391 | val = readl(sport->port.membase + USR1) & USR1_RTSS; | ||
391 | uart_handle_cts_change(&sport->port, !!val); | 392 | uart_handle_cts_change(&sport->port, !!val); |
392 | wake_up_interruptible(&sport->port.state->port.delta_msr_wait); | 393 | wake_up_interruptible(&sport->port.state->port.delta_msr_wait); |
393 | 394 | ||