aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 16:52:30 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 16:52:30 -0800
commit1ea72e7c40b239c6b6f88a4993196be66fc3d892 (patch)
treeddcbdf8a5d387c2891d2d90d3cb0174540431602
parente82dcdd686d4696039c42866a88736b2ad5f7222 (diff)
downloadpatches-1ea72e7c40b239c6b6f88a4993196be66fc3d892.tar.gz
remove tty kfifo patch that broke the build
-rw-r--r--series1
-rw-r--r--tty/tty-sdio_uart-use-kfifo-instead-of-the-messy-circ-stuff.patch244
2 files changed, 0 insertions, 245 deletions
diff --git a/series b/series
index 1356f5187ae2bc..11bb360f907624 100644
--- a/series
+++ b/series
@@ -37,7 +37,6 @@ driver-core/kset-example-spelling-fixes.patch
#####################################
# TTY patches for after 2.6.33 is out
#####################################
-tty/tty-sdio_uart-use-kfifo-instead-of-the-messy-circ-stuff.patch
tty/serial-core-resume-serial-hardware-with-no_console_suspend.patch
tty/serial-fit-blackfin-uart-over-sport-driver-into-common-uart-infrastructure.patch
tty/serial-copy-uart-properties-of-upf_fixed_type-ports-provisioned-using-early_serial_setup.patch
diff --git a/tty/tty-sdio_uart-use-kfifo-instead-of-the-messy-circ-stuff.patch b/tty/tty-sdio_uart-use-kfifo-instead-of-the-messy-circ-stuff.patch
deleted file mode 100644
index 503eb726d498b9..00000000000000
--- a/tty/tty-sdio_uart-use-kfifo-instead-of-the-messy-circ-stuff.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From alan@linux.intel.com Mon Dec 7 16:56:14 2009
-From: Alan Cox <alan@linux.intel.com>
-Date: Mon, 30 Nov 2009 13:16:20 +0000
-Subject: tty: sdio_uart: Use kfifo instead of the messy circ stuff
-To: greg@kroah.com
-Message-ID: <20091130131619.26701.31871.stgit@localhost.localdomain>
-
-
-Probably all the tty code should switch to this, especially when the new
-lockless kfifo is merged.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
-
- drivers/mmc/card/sdio_uart.c | 92 +++++++++++++------------------------------
- 1 file changed, 29 insertions(+), 63 deletions(-)
-
-
---- a/drivers/mmc/card/sdio_uart.c
-+++ b/drivers/mmc/card/sdio_uart.c
-@@ -33,7 +33,7 @@
- #include <linux/mutex.h>
- #include <linux/seq_file.h>
- #include <linux/serial_reg.h>
--#include <linux/circ_buf.h>
-+#include <linux/kfifo.h>
- #include <linux/gfp.h>
- #include <linux/tty.h>
- #include <linux/tty_flip.h>
-@@ -47,18 +47,9 @@
- #define UART_NR 8 /* Number of UARTs this driver can handle */
-
-
--#define UART_XMIT_SIZE PAGE_SIZE
-+#define FIFO_SIZE PAGE_SIZE
- #define WAKEUP_CHARS 256
-
--#define circ_empty(circ) ((circ)->head == (circ)->tail)
--#define circ_clear(circ) ((circ)->head = (circ)->tail = 0)
--
--#define circ_chars_pending(circ) \
-- (CIRC_CNT((circ)->head, (circ)->tail, UART_XMIT_SIZE))
--
--#define circ_chars_free(circ) \
-- (CIRC_SPACE((circ)->head, (circ)->tail, UART_XMIT_SIZE))
--
-
- struct uart_icount {
- __u32 cts;
-@@ -82,7 +73,7 @@ struct sdio_uart_port {
- struct mutex func_lock;
- struct task_struct *in_sdio_uart_irq;
- unsigned int regs_offset;
-- struct circ_buf xmit;
-+ struct kfifo *xmit_fifo;
- spinlock_t write_lock;
- struct uart_icount icount;
- unsigned int uartclk;
-@@ -105,6 +96,9 @@ static int sdio_uart_add_port(struct sdi
- kref_init(&port->kref);
- mutex_init(&port->func_lock);
- spin_lock_init(&port->write_lock);
-+ port->xmit_fifo = kfifo_alloc(FIFO_SIZE, GFP_KERNEL, &port->write_lock);
-+ if (port->xmit_fifo == NULL)
-+ return -ENOMEM;
-
- spin_lock(&sdio_uart_table_lock);
- for (index = 0; index < UART_NR; index++) {
-@@ -140,6 +134,7 @@ static void sdio_uart_port_destroy(struc
- {
- struct sdio_uart_port *port =
- container_of(kref, struct sdio_uart_port, kref);
-+ kfifo_free(port->xmit_fifo);
- kfree(port);
- }
-
-@@ -456,9 +451,11 @@ static void sdio_uart_receive_chars(stru
-
- static void sdio_uart_transmit_chars(struct sdio_uart_port *port)
- {
-- struct circ_buf *xmit = &port->xmit;
-+ struct kfifo *xmit = port->xmit_fifo;
- int count;
- struct tty_struct *tty;
-+ u8 iobuf[16];
-+ int len;
-
- if (port->x_char) {
- sdio_out(port, UART_TX, port->x_char);
-@@ -469,26 +466,23 @@ static void sdio_uart_transmit_chars(str
-
- tty = tty_port_tty_get(&port->port);
-
-- if (tty == NULL || circ_empty(xmit) ||
-+ if (tty == NULL || !kfifo_len(xmit) ||
- tty->stopped || tty->hw_stopped) {
- sdio_uart_stop_tx(port);
- tty_kref_put(tty);
- return;
- }
-
-- count = 16;
-- do {
-- sdio_out(port, UART_TX, xmit->buf[xmit->tail]);
-- xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-+ len = kfifo_get(xmit, iobuf, 16);
-+ for (count = 0; count < len; count++) {
-+ sdio_out(port, UART_TX, iobuf[count]);
- port->icount.tx++;
-- if (circ_empty(xmit))
-- break;
-- } while (--count > 0);
-+ }
-
-- if (circ_chars_pending(xmit) < WAKEUP_CHARS)
-+ if (len < WAKEUP_CHARS)
- tty_wakeup(tty);
-
-- if (circ_empty(xmit))
-+ if (len == 0)
- sdio_uart_stop_tx(port);
- tty_kref_put(tty);
- }
-@@ -632,7 +626,6 @@ static int sdio_uart_activate(struct tty
- {
- struct sdio_uart_port *port =
- container_of(tport, struct sdio_uart_port, port);
-- unsigned long page;
- int ret;
-
- /*
-@@ -641,22 +634,17 @@ static int sdio_uart_activate(struct tty
- */
- set_bit(TTY_IO_ERROR, &tty->flags);
-
-- /* Initialise and allocate the transmit buffer. */
-- page = __get_free_page(GFP_KERNEL);
-- if (!page)
-- return -ENOMEM;
-- port->xmit.buf = (unsigned char *)page;
-- circ_clear(&port->xmit);
-+ kfifo_reset(port->xmit_fifo);
-
- ret = sdio_uart_claim_func(port);
- if (ret)
-- goto err1;
-+ return ret;
- ret = sdio_enable_func(port->func);
- if (ret)
-- goto err2;
-+ goto err1;
- ret = sdio_claim_irq(port->func, sdio_uart_irq);
- if (ret)
-- goto err3;
-+ goto err2;
-
- /*
- * Clear the FIFO buffers and disable them.
-@@ -700,12 +688,10 @@ static int sdio_uart_activate(struct tty
- sdio_uart_release_func(port);
- return 0;
-
--err3:
-- sdio_disable_func(port->func);
- err2:
-- sdio_uart_release_func(port);
-+ sdio_disable_func(port->func);
- err1:
-- free_page((unsigned long)port->xmit.buf);
-+ sdio_uart_release_func(port);
- return ret;
- }
-
-@@ -723,11 +709,9 @@ static void sdio_uart_shutdown(struct tt
- {
- struct sdio_uart_port *port =
- container_of(tport, struct sdio_uart_port, port);
-- int ret;
-
-- ret = sdio_uart_claim_func(port);
-- if (ret)
-- goto skip;
-+ if (sdio_uart_claim_func(port))
-+ return;
-
- sdio_uart_stop_rx(port);
-
-@@ -749,10 +733,6 @@ static void sdio_uart_shutdown(struct tt
- sdio_disable_func(port->func);
-
- sdio_uart_release_func(port);
--
--skip:
-- /* Free the transmit buffer page. */
-- free_page((unsigned long)port->xmit.buf);
- }
-
- /**
-@@ -822,26 +802,12 @@ static int sdio_uart_write(struct tty_st
- int count)
- {
- struct sdio_uart_port *port = tty->driver_data;
-- struct circ_buf *circ = &port->xmit;
-- int c, ret = 0;
-+ int ret;
-
- if (!port->func)
- return -ENODEV;
-
-- spin_lock(&port->write_lock);
-- while (1) {
-- c = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE);
-- if (count < c)
-- c = count;
-- if (c <= 0)
-- break;
-- memcpy(circ->buf + circ->head, buf, c);
-- circ->head = (circ->head + c) & (UART_XMIT_SIZE - 1);
-- buf += c;
-- count -= c;
-- ret += c;
-- }
-- spin_unlock(&port->write_lock);
-+ ret = kfifo_put(port->xmit_fifo, buf, count);
-
- if (!(port->ier & UART_IER_THRI)) {
- int err = sdio_uart_claim_func(port);
-@@ -859,13 +825,13 @@ static int sdio_uart_write(struct tty_st
- static int sdio_uart_write_room(struct tty_struct *tty)
- {
- struct sdio_uart_port *port = tty->driver_data;
-- return port ? circ_chars_free(&port->xmit) : 0;
-+ return FIFO_SIZE - kfifo_len(port->xmit_fifo);
- }
-
- static int sdio_uart_chars_in_buffer(struct tty_struct *tty)
- {
- struct sdio_uart_port *port = tty->driver_data;
-- return port ? circ_chars_pending(&port->xmit) : 0;
-+ return kfifo_len(port->xmit_fifo);
- }
-
- static void sdio_uart_send_xchar(struct tty_struct *tty, char ch)