Commit 4742eb3d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'usb-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB driver fixes and new device ids for 3.18-rc7.

  Full details are in the shortlog, and all of these have been in the
  linux-next tree for a while"

* tag 'usb-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000
  usb: xhci: rework root port wake bits if controller isn't allowed to wakeup
  USB: xhci: Reset a halted endpoint immediately when we encounter a stall.
  Revert "xhci: clear root port wake on bits if controller isn't wake-up capable"
  USB: xhci: don't start a halted endpoint before its new dequeue is set
  USB: uas: Add no-uas quirk for Hitachi usb-3 enclosures 4971:1012
  USB: ssu100: fix overrun-error reporting
  USB: keyspan: fix overrun-error reporting
  USB: keyspan: fix tty line-status reporting
  usb: serial: ftdi_sio: add PIDs for Matrix Orbital products
  usb: dwc3: ep0: fix for dead code
  USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick
parents cba3b00d 263e80b4
...@@ -44,6 +44,9 @@ static const struct usb_device_id usb_quirk_list[] = { ...@@ -44,6 +44,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Creative SB Audigy 2 NX */ /* Creative SB Audigy 2 NX */
{ USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },
/* Microsoft Wireless Laser Mouse 6000 Receiver */
{ USB_DEVICE(0x045e, 0x00e1), .driver_info = USB_QUIRK_RESET_RESUME },
/* Microsoft LifeCam-VX700 v2.0 */ /* Microsoft LifeCam-VX700 v2.0 */
{ USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME }, { USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },
......
...@@ -791,6 +791,10 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, ...@@ -791,6 +791,10 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
trb = dwc->ep0_trb; trb = dwc->ep0_trb;
r = next_request(&ep0->request_list);
if (!r)
return;
status = DWC3_TRB_SIZE_TRBSTS(trb->size); status = DWC3_TRB_SIZE_TRBSTS(trb->size);
if (status == DWC3_TRBSTS_SETUP_PENDING) { if (status == DWC3_TRBSTS_SETUP_PENDING) {
dwc3_trace(trace_dwc3_ep0, "Setup Pending received"); dwc3_trace(trace_dwc3_ep0, "Setup Pending received");
...@@ -801,10 +805,6 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, ...@@ -801,10 +805,6 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
return; return;
} }
r = next_request(&ep0->request_list);
if (!r)
return;
ur = &r->request; ur = &r->request;
length = trb->size & DWC3_TRB_SIZE_MASK; length = trb->size & DWC3_TRB_SIZE_MASK;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/device.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include "xhci.h" #include "xhci.h"
...@@ -1149,9 +1148,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd) ...@@ -1149,9 +1148,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
* including the USB 3.0 roothub, but only if CONFIG_PM_RUNTIME * including the USB 3.0 roothub, but only if CONFIG_PM_RUNTIME
* is enabled, so also enable remote wake here. * is enabled, so also enable remote wake here.
*/ */
if (hcd->self.root_hub->do_remote_wakeup if (hcd->self.root_hub->do_remote_wakeup) {
&& device_may_wakeup(hcd->self.controller)) {
if (t1 & PORT_CONNECT) { if (t1 & PORT_CONNECT) {
t2 |= PORT_WKOC_E | PORT_WKDISC_E; t2 |= PORT_WKOC_E | PORT_WKDISC_E;
t2 &= ~PORT_WKCONN_E; t2 &= ~PORT_WKCONN_E;
......
...@@ -281,7 +281,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) ...@@ -281,7 +281,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
if (xhci->quirks & XHCI_COMP_MODE_QUIRK) if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
pdev->no_d3cold = true; pdev->no_d3cold = true;
return xhci_suspend(xhci); return xhci_suspend(xhci, do_wakeup);
} }
static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated) static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
......
...@@ -204,7 +204,15 @@ static int xhci_plat_suspend(struct device *dev) ...@@ -204,7 +204,15 @@ static int xhci_plat_suspend(struct device *dev)
struct usb_hcd *hcd = dev_get_drvdata(dev); struct usb_hcd *hcd = dev_get_drvdata(dev);
struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd *xhci = hcd_to_xhci(hcd);
return xhci_suspend(xhci); /*
* xhci_suspend() needs `do_wakeup` to know whether host is allowed
* to do wakeup during suspend. Since xhci_plat_suspend is currently
* only designed for system suspend, device_may_wakeup() is enough
* to dertermine whether host is allowed to do wakeup. Need to
* reconsider this when xhci_plat_suspend enlarges its scope, e.g.,
* also applies to runtime suspend.
*/
return xhci_suspend(xhci, device_may_wakeup(dev));
} }
static int xhci_plat_resume(struct device *dev) static int xhci_plat_resume(struct device *dev)
......
...@@ -1067,9 +1067,8 @@ static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id, ...@@ -1067,9 +1067,8 @@ static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id,
false); false);
xhci_ring_cmd_db(xhci); xhci_ring_cmd_db(xhci);
} else { } else {
/* Clear our internal halted state and restart the ring(s) */ /* Clear our internal halted state */
xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_HALTED; xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_HALTED;
ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
} }
} }
...@@ -1823,22 +1822,13 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -1823,22 +1822,13 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
ep->stopped_td = td; ep->stopped_td = td;
return 0; return 0;
} else { } else {
if (trb_comp_code == COMP_STALL) { if (trb_comp_code == COMP_STALL ||
/* The transfer is completed from the driver's xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
* perspective, but we need to issue a set dequeue trb_comp_code)) {
* command for this stalled endpoint to move the dequeue /* Issue a reset endpoint command to clear the host side
* pointer past the TD. We can't do that here because * halt, followed by a set dequeue command to move the
* the halt condition must be cleared first. Let the * dequeue pointer past the TD.
* USB class driver clear the stall later. * The class driver clears the device side halt later.
*/
ep->stopped_td = td;
ep->stopped_stream = ep_ring->stream_id;
} else if (xhci_requires_manual_halt_cleanup(xhci,
ep_ctx, trb_comp_code)) {
/* Other types of errors halt the endpoint, but the
* class driver doesn't call usb_reset_endpoint() unless
* the error is -EPIPE. Clear the halted status in the
* xHCI hardware manually.
*/ */
xhci_cleanup_halted_endpoint(xhci, xhci_cleanup_halted_endpoint(xhci,
slot_id, ep_index, ep_ring->stream_id, slot_id, ep_index, ep_ring->stream_id,
...@@ -1958,9 +1948,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -1958,9 +1948,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
else else
td->urb->actual_length = 0; td->urb->actual_length = 0;
xhci_cleanup_halted_endpoint(xhci, return finish_td(xhci, td, event_trb, event, ep, status, false);
slot_id, ep_index, 0, td, event_trb);
return finish_td(xhci, td, event_trb, event, ep, status, true);
} }
/* /*
* Did we transfer any data, despite the errors that might have * Did we transfer any data, despite the errors that might have
...@@ -2519,17 +2507,8 @@ static int handle_tx_event(struct xhci_hcd *xhci, ...@@ -2519,17 +2507,8 @@ static int handle_tx_event(struct xhci_hcd *xhci,
if (ret) { if (ret) {
urb = td->urb; urb = td->urb;
urb_priv = urb->hcpriv; urb_priv = urb->hcpriv;
/* Leave the TD around for the reset endpoint function
* to use(but only if it's not a control endpoint,
* since we already queued the Set TR dequeue pointer
* command for stalled control endpoints).
*/
if (usb_endpoint_xfer_control(&urb->ep->desc) ||
(trb_comp_code != COMP_STALL &&
trb_comp_code != COMP_BABBLE))
xhci_urb_free_priv(xhci, urb_priv); xhci_urb_free_priv(xhci, urb_priv);
else
kfree(urb_priv);
usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb); usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
if ((urb->actual_length != urb->transfer_buffer_length && if ((urb->actual_length != urb->transfer_buffer_length &&
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#define DRIVER_AUTHOR "Sarah Sharp" #define DRIVER_AUTHOR "Sarah Sharp"
#define DRIVER_DESC "'eXtensible' Host Controller (xHC) Driver" #define DRIVER_DESC "'eXtensible' Host Controller (xHC) Driver"
#define PORT_WAKE_BITS (PORT_WKOC_E | PORT_WKDISC_E | PORT_WKCONN_E)
/* Some 0.95 hardware can't handle the chain bit on a Link TRB being cleared */ /* Some 0.95 hardware can't handle the chain bit on a Link TRB being cleared */
static int link_quirk; static int link_quirk;
module_param(link_quirk, int, S_IRUGO | S_IWUSR); module_param(link_quirk, int, S_IRUGO | S_IWUSR);
...@@ -851,13 +853,47 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci) ...@@ -851,13 +853,47 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci)
xhci_set_cmd_ring_deq(xhci); xhci_set_cmd_ring_deq(xhci);
} }
static void xhci_disable_port_wake_on_bits(struct xhci_hcd *xhci)
{
int port_index;
__le32 __iomem **port_array;
unsigned long flags;
u32 t1, t2;
spin_lock_irqsave(&xhci->lock, flags);
/* disble usb3 ports Wake bits*/
port_index = xhci->num_usb3_ports;
port_array = xhci->usb3_ports;
while (port_index--) {
t1 = readl(port_array[port_index]);
t1 = xhci_port_state_to_neutral(t1);
t2 = t1 & ~PORT_WAKE_BITS;
if (t1 != t2)
writel(t2, port_array[port_index]);
}
/* disble usb2 ports Wake bits*/
port_index = xhci->num_usb2_ports;
port_array = xhci->usb2_ports;
while (port_index--) {
t1 = readl(port_array[port_index]);
t1 = xhci_port_state_to_neutral(t1);
t2 = t1 & ~PORT_WAKE_BITS;
if (t1 != t2)
writel(t2, port_array[port_index]);
}
spin_unlock_irqrestore(&xhci->lock, flags);
}
/* /*
* Stop HC (not bus-specific) * Stop HC (not bus-specific)
* *
* This is called when the machine transition into S3/S4 mode. * This is called when the machine transition into S3/S4 mode.
* *
*/ */
int xhci_suspend(struct xhci_hcd *xhci) int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup)
{ {
int rc = 0; int rc = 0;
unsigned int delay = XHCI_MAX_HALT_USEC; unsigned int delay = XHCI_MAX_HALT_USEC;
...@@ -868,6 +904,10 @@ int xhci_suspend(struct xhci_hcd *xhci) ...@@ -868,6 +904,10 @@ int xhci_suspend(struct xhci_hcd *xhci)
xhci->shared_hcd->state != HC_STATE_SUSPENDED) xhci->shared_hcd->state != HC_STATE_SUSPENDED)
return -EINVAL; return -EINVAL;
/* Clear root port wake on bits if wakeup not allowed. */
if (!do_wakeup)
xhci_disable_port_wake_on_bits(xhci);
/* Don't poll the roothubs on bus suspend. */ /* Don't poll the roothubs on bus suspend. */
xhci_dbg(xhci, "%s: stopping port polling.\n", __func__); xhci_dbg(xhci, "%s: stopping port polling.\n", __func__);
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
...@@ -2912,68 +2952,33 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, ...@@ -2912,68 +2952,33 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
} }
} }
/* Deal with stalled endpoints. The core should have sent the control message /* Called when clearing halted device. The core should have sent the control
* to clear the halt condition. However, we need to make the xHCI hardware * message to clear the device halt condition. The host side of the halt should
* reset its sequence number, since a device will expect a sequence number of * already be cleared with a reset endpoint command issued when the STALL tx
* zero after the halt condition is cleared. * event was received.
*
* Context: in_interrupt * Context: in_interrupt
*/ */
void xhci_endpoint_reset(struct usb_hcd *hcd, void xhci_endpoint_reset(struct usb_hcd *hcd,
struct usb_host_endpoint *ep) struct usb_host_endpoint *ep)
{ {
struct xhci_hcd *xhci; struct xhci_hcd *xhci;
struct usb_device *udev;
unsigned int ep_index;
unsigned long flags;
int ret;
struct xhci_virt_ep *virt_ep;
struct xhci_command *command;
xhci = hcd_to_xhci(hcd); xhci = hcd_to_xhci(hcd);
udev = (struct usb_device *) ep->hcpriv;
/* Called with a root hub endpoint (or an endpoint that wasn't added
* with xhci_add_endpoint()
*/
if (!ep->hcpriv)
return;
ep_index = xhci_get_endpoint_index(&ep->desc);
virt_ep = &xhci->devs[udev->slot_id]->eps[ep_index];
if (!virt_ep->stopped_td) {
xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
"Endpoint 0x%x not halted, refusing to reset.",
ep->desc.bEndpointAddress);
return;
}
if (usb_endpoint_xfer_control(&ep->desc)) {
xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
"Control endpoint stall already handled.");
return;
}
command = xhci_alloc_command(xhci, false, false, GFP_ATOMIC);
if (!command)
return;
xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
"Queueing reset endpoint command");
spin_lock_irqsave(&xhci->lock, flags);
ret = xhci_queue_reset_ep(xhci, command, udev->slot_id, ep_index);
/* /*
* Can't change the ring dequeue pointer until it's transitioned to the * We might need to implement the config ep cmd in xhci 4.8.1 note:
* stopped state, which is only upon a successful reset endpoint * The Reset Endpoint Command may only be issued to endpoints in the
* command. Better hope that last command worked! * Halted state. If software wishes reset the Data Toggle or Sequence
* Number of an endpoint that isn't in the Halted state, then software
* may issue a Configure Endpoint Command with the Drop and Add bits set
* for the target endpoint. that is in the Stopped state.
*/ */
if (!ret) {
xhci_cleanup_stalled_ring(xhci, udev, ep_index);
kfree(virt_ep->stopped_td);
xhci_ring_cmd_db(xhci);
}
virt_ep->stopped_td = NULL;
virt_ep->stopped_stream = 0;
spin_unlock_irqrestore(&xhci->lock, flags);
if (ret) /* For now just print debug to follow the situation */
xhci_warn(xhci, "FIXME allocate a new ring segment\n"); xhci_dbg(xhci, "Endpoint 0x%x ep reset callback called\n",
ep->desc.bEndpointAddress);
} }
static int xhci_check_streams_endpoint(struct xhci_hcd *xhci, static int xhci_check_streams_endpoint(struct xhci_hcd *xhci,
......
...@@ -1746,7 +1746,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks); ...@@ -1746,7 +1746,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks);
void xhci_init_driver(struct hc_driver *drv, int (*setup_fn)(struct usb_hcd *)); void xhci_init_driver(struct hc_driver *drv, int (*setup_fn)(struct usb_hcd *));
#ifdef CONFIG_PM #ifdef CONFIG_PM
int xhci_suspend(struct xhci_hcd *xhci); int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup);
int xhci_resume(struct xhci_hcd *xhci, bool hibernated); int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
#else #else
#define xhci_suspend NULL #define xhci_suspend NULL
......
...@@ -120,6 +120,7 @@ static const struct usb_device_id id_table[] = { ...@@ -120,6 +120,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
{ USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
{ USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
{ USB_DEVICE(0x10C4, 0x8875) }, /* CEL MeshConnect USB Stick */
{ USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */ { USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
......
...@@ -470,6 +470,39 @@ static const struct usb_device_id id_table_combined[] = { ...@@ -470,6 +470,39 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FD_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FD_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FE_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FE_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FF_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FF_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_4701_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9300_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9301_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9302_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9303_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9304_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9305_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9306_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9307_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9308_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9309_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930A_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930B_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930C_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930D_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930E_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930F_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9310_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9311_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9312_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9313_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9314_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9315_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9316_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9317_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9318_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9319_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931A_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931B_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931C_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931D_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931E_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931F_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) },
......
...@@ -926,8 +926,8 @@ ...@@ -926,8 +926,8 @@
#define BAYER_CONTOUR_CABLE_PID 0x6001 #define BAYER_CONTOUR_CABLE_PID 0x6001
/* /*
* The following are the values for the Matrix Orbital FTDI Range * Matrix Orbital Intelligent USB displays.
* Anything in this range will use an FT232RL. * http://www.matrixorbital.com
*/ */
#define MTXORB_VID 0x1B3D #define MTXORB_VID 0x1B3D
#define MTXORB_FTDI_RANGE_0100_PID 0x0100 #define MTXORB_FTDI_RANGE_0100_PID 0x0100
...@@ -1186,8 +1186,39 @@ ...@@ -1186,8 +1186,39 @@
#define MTXORB_FTDI_RANGE_01FD_PID 0x01FD #define MTXORB_FTDI_RANGE_01FD_PID 0x01FD
#define MTXORB_FTDI_RANGE_01FE_PID 0x01FE #define MTXORB_FTDI_RANGE_01FE_PID 0x01FE
#define MTXORB_FTDI_RANGE_01FF_PID 0x01FF #define MTXORB_FTDI_RANGE_01FF_PID 0x01FF
#define MTXORB_FTDI_RANGE_4701_PID 0x4701
#define MTXORB_FTDI_RANGE_9300_PID 0x9300
#define MTXORB_FTDI_RANGE_9301_PID 0x9301
#define MTXORB_FTDI_RANGE_9302_PID 0x9302
#define MTXORB_FTDI_RANGE_9303_PID 0x9303
#define MTXORB_FTDI_RANGE_9304_PID 0x9304
#define MTXORB_FTDI_RANGE_9305_PID 0x9305
#define MTXORB_FTDI_RANGE_9306_PID 0x9306
#define MTXORB_FTDI_RANGE_9307_PID 0x9307
#define MTXORB_FTDI_RANGE_9308_PID 0x9308
#define MTXORB_FTDI_RANGE_9309_PID 0x9309
#define MTXORB_FTDI_RANGE_930A_PID 0x930A
#define MTXORB_FTDI_RANGE_930B_PID 0x930B
#define MTXORB_FTDI_RANGE_930C_PID 0x930C
#define MTXORB_FTDI_RANGE_930D_PID 0x930D
#define MTXORB_FTDI_RANGE_930E_PID 0x930E
#define MTXORB_FTDI_RANGE_930F_PID 0x930F
#define MTXORB_FTDI_RANGE_9310_PID 0x9310
#define MTXORB_FTDI_RANGE_9311_PID 0x9311
#define MTXORB_FTDI_RANGE_9312_PID 0x9312
#define MTXORB_FTDI_RANGE_9313_PID 0x9313
#define MTXORB_FTDI_RANGE_9314_PID 0x9314
#define MTXORB_FTDI_RANGE_9315_PID 0x9315
#define MTXORB_FTDI_RANGE_9316_PID 0x9316
#define MTXORB_FTDI_RANGE_9317_PID 0x9317
#define MTXORB_FTDI_RANGE_9318_PID 0x9318
#define MTXORB_FTDI_RANGE_9319_PID 0x9319
#define MTXORB_FTDI_RANGE_931A_PID 0x931A
#define MTXORB_FTDI_RANGE_931B_PID 0x931B
#define MTXORB_FTDI_RANGE_931C_PID 0x931C
#define MTXORB_FTDI_RANGE_931D_PID 0x931D
#define MTXORB_FTDI_RANGE_931E_PID 0x931E
#define MTXORB_FTDI_RANGE_931F_PID 0x931F
/* /*
* The Mobility Lab (TML) * The Mobility Lab (TML)
......
...@@ -311,24 +311,30 @@ static void usa26_indat_callback(struct urb *urb) ...@@ -311,24 +311,30 @@ static void usa26_indat_callback(struct urb *urb)
if ((data[0] & 0x80) == 0) { if ((data[0] & 0x80) == 0) {
/* no errors on individual bytes, only /* no errors on individual bytes, only
possible overrun err */ possible overrun err */
if (data[0] & RXERROR_OVERRUN) if (data[0] & RXERROR_OVERRUN) {
err = TTY_OVERRUN; tty_insert_flip_char(&port->port, 0,
else TTY_OVERRUN);
err = 0; }
for (i = 1; i < urb->actual_length ; ++i) for (i = 1; i < urb->actual_length ; ++i)
tty_insert_flip_char(&port->port, data[i], err); tty_insert_flip_char(&port->port, data[i],
TTY_NORMAL);
} else { } else {
/* some bytes had errors, every byte has status */ /* some bytes had errors, every byte has status */
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__); dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
for (i = 0; i + 1 < urb->actual_length; i += 2) { for (i = 0; i + 1 < urb->actual_length; i += 2) {
int stat = data[i], flag = 0; int stat = data[i];
if (stat & RXERROR_OVERRUN) int flag = TTY_NORMAL;
flag |= TTY_OVERRUN;
if (stat & RXERROR_FRAMING) if (stat & RXERROR_OVERRUN) {
flag |= TTY_FRAME; tty_insert_flip_char(&port->port, 0,
if (stat & RXERROR_PARITY) TTY_OVERRUN);
flag |= TTY_PARITY; }
/* XXX should handle break (0x10) */ /* XXX should handle break (0x10) */
if (stat & RXERROR_PARITY)
flag = TTY_PARITY;
else if (stat & RXERROR_FRAMING)
flag = TTY_FRAME;
tty_insert_flip_char(&port->port, data[i+1], tty_insert_flip_char(&port->port, data[i+1],
flag); flag);
} }
...@@ -649,14 +655,19 @@ static void usa49_indat_callback(struct urb *urb) ...@@ -649,14 +655,19 @@ static void usa49_indat_callback(struct urb *urb)
} else { } else {
/* some bytes had errors, every byte has status */ /* some bytes had errors, every byte has status */
for (i = 0; i + 1 < urb->actual_length; i += 2) { for (i = 0; i + 1 < urb->actual_length; i += 2) {
int stat = data[i], flag = 0; int stat = data[i];
if (stat & RXERROR_OVERRUN) int flag = TTY_NORMAL;
flag |= TTY_OVERRUN;
if (stat & RXERROR_FRAMING) if (stat & RXERROR_OVERRUN) {
flag |= TTY_FRAME; tty_insert_flip_char(&port->port, 0,
if (stat & RXERROR_PARITY) TTY_OVERRUN);
flag |= TTY_PARITY; }
/* XXX should handle break (0x10) */ /* XXX should handle break (0x10) */
if (stat & RXERROR_PARITY)
flag = TTY_PARITY;
else if (stat & RXERROR_FRAMING)
flag = TTY_FRAME;
tty_insert_flip_char(&port->port, data[i+1], tty_insert_flip_char(&port->port, data[i+1],
flag); flag);
} }
...@@ -713,15 +724,19 @@ static void usa49wg_indat_callback(struct urb *urb) ...@@ -713,15 +724,19 @@ static void usa49wg_indat_callback(struct urb *urb)
*/ */
for (x = 0; x + 1 < len && for (x = 0; x + 1 < len &&
i + 1 < urb->actual_length; x += 2) { i + 1 < urb->actual_length; x += 2) {
int stat = data[i], flag = 0; int stat = data[i];
int flag = TTY_NORMAL;
if (stat & RXERROR_OVERRUN) if (stat & RXERROR_OVERRUN) {
flag |= TTY_OVERRUN; tty_insert_flip_char(&port->port, 0,
if (stat & RXERROR_FRAMING) TTY_OVERRUN);
flag |= TTY_FRAME; }
if (stat & RXERROR_PARITY)
flag |= TTY_PARITY;
/* XXX should handle break (0x10) */ /* XXX should handle break (0x10) */
if (stat & RXERROR_PARITY)
flag = TTY_PARITY;
else if (stat & RXERROR_FRAMING)
flag = TTY_FRAME;
tty_insert_flip_char(&port->port, data[i+1], tty_insert_flip_char(&port->port, data[i+1],
flag); flag);
i += 2; i += 2;
...@@ -773,25 +788,31 @@ static void usa90_indat_callback(struct urb *urb) ...@@ -773,25 +788,31 @@ static void usa90_indat_callback(struct urb *urb)
if ((data[0] & 0x80) == 0) { if ((data[0] & 0x80) == 0) {
/* no errors on individual bytes, only /* no errors on individual bytes, only
possible overrun err*/ possible overrun err*/
if (data[0] & RXERROR_OVERRUN) if (data[0] & RXERROR_OVERRUN) {
err = TTY_OVERRUN; tty_insert_flip_char(&port->port, 0,
else TTY_OVERRUN);
err = 0; }
for (i = 1; i < urb->actual_length ; ++i) for (i = 1; i < urb->actual_length ; ++i)
tty_insert_flip_char(&port->port, tty_insert_flip_char(&port->port,
data[i], err); data[i], TTY_NORMAL);
} else { } else {
/* some bytes had errors, every byte has status */ /* some bytes had errors, every byte has status */
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__); dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
for (i = 0; i + 1 < urb->actual_length; i += 2) { for (i = 0; i + 1 < urb->actual_length; i += 2) {
int stat = data[i], flag = 0; int stat = data[i];
if (stat & RXERROR_OVERRUN) int flag = TTY_NORMAL;
flag |= TTY_OVERRUN;
if (stat & RXERROR_FRAMING) if (stat & RXERROR_OVERRUN) {
flag |= TTY_FRAME; tty_insert_flip_char(
if (stat & RXERROR_PARITY) &port->port, 0,
flag |= TTY_PARITY; TTY_OVERRUN);
}
/* XXX should handle break (0x10) */ /* XXX should handle break (0x10) */
if (stat & RXERROR_PARITY)
flag = TTY_PARITY;
else if (stat & RXERROR_FRAMING)
flag = TTY_FRAME;
tty_insert_flip_char(&port->port, tty_insert_flip_char(&port->port,
data[i+1], flag); data[i+1], flag);
} }
......
...@@ -490,10 +490,9 @@ static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr, ...@@ -490,10 +490,9 @@ static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr,
if (*tty_flag == TTY_NORMAL) if (*tty_flag == TTY_NORMAL)
*tty_flag = TTY_FRAME; *tty_flag = TTY_FRAME;
} }
if (lsr & UART_LSR_OE){ if (lsr & UART_LSR_OE) {
port->icount.overrun++; port->icount.overrun++;
if (*tty_flag == TTY_NORMAL) tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
*tty_flag = TTY_OVERRUN;
} }
} }
...@@ -511,12 +510,8 @@ static void ssu100_process_read_urb(struct urb *urb) ...@@ -511,12 +510,8 @@ static void ssu100_process_read_urb(struct urb *urb)
if ((len >= 4) && if ((len >= 4) &&
(packet[0] == 0x1b) && (packet[1] == 0x1b) && (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
((packet[2] == 0x00) || (packet[2] == 0x01))) { ((packet[2] == 0x00) || (packet[2] == 0x01))) {
if (packet[2] == 0x00) { if (packet[2] == 0x00)
ssu100_update_lsr(port, packet[3], &flag); ssu100_update_lsr(port, packet[3], &flag);
if (flag == TTY_OVERRUN)
tty_insert_flip_char(&port->port, 0,
TTY_OVERRUN);
}
if (packet[2] == 0x01) if (packet[2] == 0x01)
ssu100_update_msr(port, packet[3]); ssu100_update_msr(port, packet[3]);
......
...@@ -103,3 +103,10 @@ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, ...@@ -103,3 +103,10 @@ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
"VL711", "VL711",
USB_SC_DEVICE, USB_PR_DEVICE, NULL, USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_NO_ATA_1X), US_FL_NO_ATA_1X),
/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999,
"Hitachi",
"External HDD",
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_IGNORE_UAS),
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment