linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] 8250: add AgeStar AS-PRS2-009
@ 2012-08-16 11:01 Alan Cox
  2012-08-16 11:01 ` [PATCH 2/2] Remove BUG_ON from n_tty_read() Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2012-08-16 11:01 UTC (permalink / raw)
  To: greg, linux-serial

From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=22502
---

 drivers/tty/serial/8250/8250_pci.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 62e10fe..ad4bb8d 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1194,6 +1194,8 @@ pci_xr17c154_setup(struct serial_private *priv,
 #define PCIE_DEVICE_ID_NEO_2_OX_IBM	0x00F6
 #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA	0xc001
 #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
+#define PCI_VENDOR_ID_AGESTAR		0x5372
+#define PCI_DEVICE_ID_AGESTAR_9375	0x6872
 #define PCI_VENDOR_ID_ASIX		0x9710
 
 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
@@ -4189,6 +4191,12 @@ static struct pci_device_id serial_pci_tbl[] = {
 		pbn_omegapci },
 
 	/*
+	 * AgeStar as-prs2-009
+	 */
+	{	PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,
+		PCI_ANY_ID, PCI_ANY_ID,
+		0, 0, pbn_b0_bt_2_115200 },
+	/*
 	 * These entries match devices with class COMMUNICATION_SERIAL,
 	 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
 	 */


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Remove BUG_ON from n_tty_read()
  2012-08-16 11:01 [PATCH 1/2] 8250: add AgeStar AS-PRS2-009 Alan Cox
@ 2012-08-16 11:01 ` Alan Cox
  2012-08-16 18:46   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2012-08-16 11:01 UTC (permalink / raw)
  To: greg, linux-serial

From: Stanislav Kozina <skozina@redhat.com>

Change the BUG_ON to WARN_ON and return in case of tty->read_buf==NULL. We want to track a
couple of long standing reports of this but at the same time we can avoid killing the box.

Signed-off-by: Stanislav Kozina <skozina@redhat.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Horses <stable@kernel.org>
---

 drivers/tty/n_tty.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 4776aa2..ece22c0 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1734,7 +1734,8 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 
 do_it_again:
 
-	BUG_ON(!tty->read_buf);
+	if (WARN_ON(!tty->read_buf))
+		return -EAGAIN;
 
 	c = job_control(tty, file);
 	if (c < 0)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] Remove BUG_ON from n_tty_read()
  2012-08-16 11:01 ` [PATCH 2/2] Remove BUG_ON from n_tty_read() Alan Cox
@ 2012-08-16 18:46   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2012-08-16 18:46 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-serial

On Thu, Aug 16, 2012 at 12:01:47PM +0100, Alan Cox wrote:
> From: Stanislav Kozina <skozina@redhat.com>
> 
> Change the BUG_ON to WARN_ON and return in case of tty->read_buf==NULL. We want to track a
> couple of long standing reports of this but at the same time we can avoid killing the box.
> 
> Signed-off-by: Stanislav Kozina <skozina@redhat.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Cc: Horses <stable@kernel.org>

Heh, "Horses"?  That's a first...


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-16 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16 11:01 [PATCH 1/2] 8250: add AgeStar AS-PRS2-009 Alan Cox
2012-08-16 11:01 ` [PATCH 2/2] Remove BUG_ON from n_tty_read() Alan Cox
2012-08-16 18:46   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).