aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-13 10:07:31 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-13 10:07:31 -0700
commit44ea8a3f679a11e5ac3c5b174b645669e33fd8cf (patch)
tree207fa8165df2bbb2f2eb88c976b9f8cda6aaaeb5
parent8c4753ce7abb2f0cc0b93f857bff31269113c485 (diff)
downloadpatches-44ea8a3f679a11e5ac3c5b174b645669e33fd8cf.tar.gz
break out serial printk() fixes
-rw-r--r--serial-8250_pci-add-support-for-fintek-4-8-and-12-port-cards.patch47
-rw-r--r--serial-8250_pci-clean-up-printk-calls.patch138
-rw-r--r--series1
3 files changed, 148 insertions, 38 deletions
diff --git a/serial-8250_pci-add-support-for-fintek-4-8-and-12-port-cards.patch b/serial-8250_pci-add-support-for-fintek-4-8-and-12-port-cards.patch
index 5a6af5a81432b5..b74e2d9b75d85f 100644
--- a/serial-8250_pci-add-support-for-fintek-4-8-and-12-port-cards.patch
+++ b/serial-8250_pci-add-support-for-fintek-4-8-and-12-port-cards.patch
@@ -16,28 +16,21 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/tty/serial/8250/8250_pci.c | 131 +++++++++++++++++++++++++++++++++++--
- 1 file changed, 125 insertions(+), 6 deletions(-)
+ drivers/tty/serial/8250/8250_pci.c | 119 ++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 118 insertions(+), 1 deletion(-)
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
-@@ -9,6 +9,7 @@
+@@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*/
+-#undef DEBUG
+#define DEBUG
#include <linux/module.h>
#include <linux/init.h>
#include <linux/pci.h>
-@@ -27,7 +28,6 @@
-
- #include "8250.h"
-
--#undef SERIAL_DEBUG_PCI
-
- /*
- * init function returns:
-@@ -1344,6 +1344,77 @@ pci_brcm_trumanage_setup(struct serial_p
+@@ -1343,6 +1343,76 @@ pci_brcm_trumanage_setup(struct serial_p
return ret;
}
@@ -76,7 +69,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+ dev_dbg(&pdev->dev, "bar 3 = %lx\n", (unsigned long)pci_resource_start(pdev, 3));
+ dev_dbg(&pdev->dev, "bar 4 = %lx\n", (unsigned long)pci_resource_start(pdev, 4));
+ dev_dbg(&pdev->dev, "bar 5 = %lx\n", (unsigned long)pci_resource_start(pdev, 5));
-+ dev_dbg(&pdev->dev, "bar 6 = %lx\n", (unsigned long)pci_resource_start(pdev, 6));
+
+ if (idx < 4) {
+ base = pci_resource_start(priv->dev, 3);
@@ -115,7 +107,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static int skip_tx_en_setup(struct serial_private *priv,
const struct pciserial_board *board,
struct uart_8250_port *port, int idx)
-@@ -2255,6 +2326,27 @@ static struct pci_serial_quirk pci_seria
+@@ -2252,6 +2322,27 @@ static struct pci_serial_quirk pci_seria
.subdevice = PCI_ANY_ID,
.setup = pci_brcm_trumanage_setup,
},
@@ -143,7 +135,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/*
* Default "match everything" terminator entry
-@@ -2452,6 +2544,9 @@ enum pci_board_num_t {
+@@ -2449,6 +2540,9 @@ enum pci_board_num_t {
pbn_omegapci,
pbn_NETMOS9900_2s_115200,
pbn_brcm_trumanage,
@@ -153,7 +145,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
};
/*
-@@ -3202,6 +3297,24 @@ static struct pciserial_board pci_boards
+@@ -3199,6 +3293,24 @@ static struct pciserial_board pci_boards
.reg_shift = 2,
.base_baud = 115200,
},
@@ -178,28 +170,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
};
static const struct pci_device_id blacklist[] = {
-@@ -3362,14 +3475,15 @@ pciserial_init_ports(struct pci_dev *dev
- if (quirk->setup(priv, board, &uart, i))
- break;
-
--#ifdef SERIAL_DEBUG_PCI
-- printk(KERN_DEBUG "Setup PCI port: port %lx, irq %d, type %d\n",
-- uart.port.iobase, uart.port.irq, uart.port.iotype);
--#endif
-+ dev_dbg(&dev->dev, "Setup PCI port: port %lx, irq %d, type %d\n",
-+ uart.port.iobase, uart.port.irq, uart.port.iotype);
-
- priv->line[i] = serial8250_register_8250_port(&uart);
- if (priv->line[i] < 0) {
-- printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]);
-+ dev_err(&dev->dev,
-+ "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
-+ uart.port.iobase, uart.port.irq,
-+ uart.port.iotype, priv->line[i]);
- break;
- }
- }
-@@ -4918,6 +5032,11 @@ static struct pci_device_id serial_pci_t
+@@ -4916,6 +5028,11 @@ static struct pci_device_id serial_pci_t
0,
0, pbn_exar_XR17V358 },
diff --git a/serial-8250_pci-clean-up-printk-calls.patch b/serial-8250_pci-clean-up-printk-calls.patch
new file mode 100644
index 00000000000000..ffcff770c6e4d0
--- /dev/null
+++ b/serial-8250_pci-clean-up-printk-calls.patch
@@ -0,0 +1,138 @@
+From foo@baz Fri Sep 13 10:05:17 PDT 2013
+Date: Fri, 13 Sep 2013 10:05:17 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] serial: 8250_pci: clean up printk() calls
+
+Move the printk() calls to to dev_*() instead, to tie into the dynamic
+debugging infrastructure.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/8250/8250_pci.c | 40 +++++++++++++++++--------------------
+ 1 file changed, 19 insertions(+), 21 deletions(-)
+
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -9,6 +9,7 @@
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License.
+ */
++#undef DEBUG
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/pci.h>
+@@ -27,8 +28,6 @@
+
+ #include "8250.h"
+
+-#undef SERIAL_DEBUG_PCI
+-
+ /*
+ * init function returns:
+ * > 0 - number of ports
+@@ -63,7 +62,7 @@ static int pci_default_setup(struct seri
+
+ static void moan_device(const char *str, struct pci_dev *dev)
+ {
+- printk(KERN_WARNING
++ dev_err(&dev->dev,
+ "%s: %s\n"
+ "Please send the output of lspci -vv, this\n"
+ "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
+@@ -233,7 +232,7 @@ static int pci_inteli960ni_init(struct p
+ /* is firmware started? */
+ pci_read_config_dword(dev, 0x44, (void *)&oldval);
+ if (oldval == 0x00001000L) { /* RESET value */
+- printk(KERN_DEBUG "Local i960 firmware missing");
++ dev_dbg(&dev->dev, "Local i960 firmware missing\n");
+ return -ENODEV;
+ }
+ return 0;
+@@ -827,7 +826,7 @@ static int pci_netmos_9900_numports(stru
+ if (sub_serports > 0) {
+ return sub_serports;
+ } else {
+- printk(KERN_NOTICE "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
++ dev_err(&dev->dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
+ return 0;
+ }
+ }
+@@ -931,7 +930,7 @@ static int pci_ite887x_init(struct pci_d
+ }
+
+ if (!inta_addr[i]) {
+- printk(KERN_ERR "ite887x: could not find iobase\n");
++ dev_err(&dev->dev, "ite887x: could not find iobase\n");
+ return -ENODEV;
+ }
+
+@@ -1024,9 +1023,9 @@ static int pci_oxsemi_tornado_init(struc
+ /* Tornado device */
+ if (deviceID == 0x07000200) {
+ number_uarts = ioread8(p + 4);
+- printk(KERN_DEBUG
++ dev_dbg(&dev->dev,
+ "%d ports detected on Oxford PCI Express device\n",
+- number_uarts);
++ number_uarts);
+ }
+ pci_iounmap(dev, p);
+ return number_uarts;
+@@ -1349,12 +1348,10 @@ static int skip_tx_en_setup(struct seria
+ struct uart_8250_port *port, int idx)
+ {
+ port->port.flags |= UPF_NO_TXEN_TEST;
+- printk(KERN_DEBUG "serial8250: skipping TxEn test for device "
+- "[%04x:%04x] subsystem [%04x:%04x]\n",
+- priv->dev->vendor,
+- priv->dev->device,
+- priv->dev->subsystem_vendor,
+- priv->dev->subsystem_device);
++ dev_dbg(&priv->dev->dev,
++ "serial8250: skipping TxEn test for device [%04x:%04x] subsystem [%04x:%04x]\n",
++ priv->dev->vendor, priv->dev->device,
++ priv->dev->subsystem_vendor, priv->dev->subsystem_device);
+
+ return pci_default_setup(priv, board, port, idx);
+ }
+@@ -3362,14 +3359,15 @@ pciserial_init_ports(struct pci_dev *dev
+ if (quirk->setup(priv, board, &uart, i))
+ break;
+
+-#ifdef SERIAL_DEBUG_PCI
+- printk(KERN_DEBUG "Setup PCI port: port %lx, irq %d, type %d\n",
+- uart.port.iobase, uart.port.irq, uart.port.iotype);
+-#endif
++ dev_dbg(&dev->dev, "Setup PCI port: port %lx, irq %d, type %d\n",
++ uart.port.iobase, uart.port.irq, uart.port.iotype);
+
+ priv->line[i] = serial8250_register_8250_port(&uart);
+ if (priv->line[i] < 0) {
+- printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]);
++ dev_err(&dev->dev,
++ "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
++ uart.port.iobase, uart.port.irq,
++ uart.port.iotype, priv->line[i]);
+ break;
+ }
+ }
+@@ -3462,7 +3460,7 @@ pciserial_init_one(struct pci_dev *dev,
+ }
+
+ if (ent->driver_data >= ARRAY_SIZE(pci_boards)) {
+- printk(KERN_ERR "pci_init_one: invalid driver_data: %ld\n",
++ dev_err(&dev->dev, "invalid driver_data: %ld\n",
+ ent->driver_data);
+ return -EINVAL;
+ }
+@@ -3555,7 +3553,7 @@ static int pciserial_resume_one(struct p
+ err = pci_enable_device(dev);
+ /* FIXME: We cannot simply error out here */
+ if (err)
+- printk(KERN_ERR "pciserial: Unable to re-enable ports, trying to continue.\n");
++ dev_err(&dev->dev, "Unable to re-enable ports, trying to continue.\n");
+ pciserial_resume_ports(priv);
+ }
+ return 0;
diff --git a/series b/series
index 1bec378b497566..bc0183aac9b079 100644
--- a/series
+++ b/series
@@ -1,4 +1,5 @@
xen-disable-clock-timer-when-shutting-down.patch
+serial-8250_pci-clean-up-printk-calls.patch
serial-8250_pci-add-support-for-fintek-4-8-and-12-port-cards.patch
# patches already in my git trees, but still here so I don't loose them.