Here are a bunch of tiny fixes for the USB core and drivers for 3.5-rc3
 
 A bunch of gadget fixes, and new device ids, as well as some fixes for a number
 of different regressions that have been reported recently.  We also fixed some
 PCI host controllers to resolve a long-standing bug with a whole class of host
 controllers that have been plaguing people for a number of kernel releases,
 preventing their systems from suspending properly.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk/byIEACgkQMUfUDdst+ykLBwCgiAi/cS4ObblcBEbnBvosPgsA
 PqEAoJLMAwhcozeEOWLhb++45Vs+UjKv
 =HAWc
 -----END PGP SIGNATURE-----

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

Pull USB fixes from Greg Kroah-Hartman:
 "Here are a bunch of tiny fixes for the USB core and drivers for
  3.5-rc3

  A bunch of gadget fixes, and new device ids, as well as some fixes for
  a number of different regressions that have been reported recently.
  We also fixed some PCI host controllers to resolve a long-standing bug
  with a whole class of host controllers that have been plaguing people
  for a number of kernel releases, preventing their systems from
  suspending properly.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'usb-3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (41 commits)
  USB: fix gathering of interface associations
  usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL
  usb: cdc-acm: fix devices not unthrottled on open
  Fix OMAP EHCI suspend/resume failure (i693)
  USB: ohci-hub: Mark ohci_finish_controller_resume() as __maybe_unused
  usb: use usb_serial_put in usb_serial_probe errors
  USB: EHCI: Fix build warning in xilinx ehci driver
  USB: fix PS3 EHCI systems
  xHCI: Increase the timeout for controller save/restore state operation
  xhci: Don't free endpoints in xhci_mem_cleanup()
  xhci: Fix invalid loop check in xhci_free_tt_info()
  xhci: Fix error path return value.
  USB: Checking the wrong variable in usb_disable_lpm()
  usb-storage: Add 090c:1000 to unusal-devs
  USB: serial-generic: use a single set of device IDs
  USB: serial: Enforce USB driver and USB serial driver match
  USB: add NO_D3_DURING_SLEEP flag and revert 151b612847
  USB: option: add more YUGA device ids
  USB: mos7840: Fix compilation of usb serial driver
  USB: option: fix memory leak
  ...
This commit is contained in:
Linus Torvalds 2012-06-15 17:10:02 -07:00
Родитель 8e53ed10f8 b3a3dd074f
Коммит 41c8c53523
41 изменённых файлов: 352 добавлений и 168 удалений

Просмотреть файл

@ -1744,6 +1744,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
if (target_state == PCI_POWER_ERROR) if (target_state == PCI_POWER_ERROR)
return -EIO; return -EIO;
/* Some devices mustn't be in D3 during system sleep */
if (target_state == PCI_D3hot &&
(dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP))
return 0;
pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev));
error = pci_set_power_state(dev, target_state); error = pci_set_power_state(dev, target_state);

Просмотреть файл

@ -2929,6 +2929,32 @@ static void __devinit disable_igfx_irq(struct pci_dev *dev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
/*
* The Intel 6 Series/C200 Series chipset's EHCI controllers on many
* ASUS motherboards will cause memory corruption or a system crash
* if they are in D3 while the system is put into S3 sleep.
*/
static void __devinit asus_ehci_no_d3(struct pci_dev *dev)
{
const char *sys_info;
static const char good_Asus_board[] = "P8Z68-V";
if (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)
return;
if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK)
return;
sys_info = dmi_get_system_info(DMI_BOARD_NAME);
if (sys_info && memcmp(sys_info, good_Asus_board,
sizeof(good_Asus_board) - 1) == 0)
return;
dev_info(&dev->dev, "broken D3 during system sleep on ASUS\n");
dev->dev_flags |= PCI_DEV_FLAGS_NO_D3_DURING_SLEEP;
device_set_wakeup_capable(&dev->dev, false);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c26, asus_ehci_no_d3);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c2d, asus_ehci_no_d3);
static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
struct pci_fixup *end) struct pci_fixup *end)
{ {

Просмотреть файл

@ -567,6 +567,14 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
usb_autopm_put_interface(acm->control); usb_autopm_put_interface(acm->control);
/*
* Unthrottle device in case the TTY was closed while throttled.
*/
spin_lock_irq(&acm->read_lock);
acm->throttled = 0;
acm->throttle_req = 0;
spin_unlock_irq(&acm->read_lock);
if (acm_submit_read_urbs(acm, GFP_KERNEL)) if (acm_submit_read_urbs(acm, GFP_KERNEL))
goto error_submit_read_urbs; goto error_submit_read_urbs;

Просмотреть файл

@ -55,6 +55,15 @@ static const struct usb_device_id wdm_ids[] = {
.bInterfaceSubClass = 1, .bInterfaceSubClass = 1,
.bInterfaceProtocol = 9, /* NOTE: CDC ECM control interface! */ .bInterfaceProtocol = 9, /* NOTE: CDC ECM control interface! */
}, },
{
/* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */
.match_flags = USB_DEVICE_ID_MATCH_VENDOR |
USB_DEVICE_ID_MATCH_INT_INFO,
.idVendor = HUAWEI_VENDOR_ID,
.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 57, /* NOTE: CDC ECM control interface! */
},
{ } { }
}; };

Просмотреть файл

@ -493,15 +493,6 @@ static int hcd_pci_suspend_noirq(struct device *dev)
pci_save_state(pci_dev); pci_save_state(pci_dev);
/*
* Some systems crash if an EHCI controller is in D3 during
* a sleep transition. We have to leave such controllers in D0.
*/
if (hcd->broken_pci_sleep) {
dev_dbg(dev, "Staying in PCI D0\n");
return retval;
}
/* If the root hub is dead rather than suspended, disallow remote /* If the root hub is dead rather than suspended, disallow remote
* wakeup. usb_hc_died() should ensure that both hosts are marked as * wakeup. usb_hc_died() should ensure that both hosts are marked as
* dying, so we only need to check the primary roothub. * dying, so we only need to check the primary roothub.

Просмотреть файл

@ -3379,7 +3379,7 @@ int usb_disable_lpm(struct usb_device *udev)
return 0; return 0;
udev->lpm_disable_count++; udev->lpm_disable_count++;
if ((udev->u1_params.timeout == 0 && udev->u1_params.timeout == 0)) if ((udev->u1_params.timeout == 0 && udev->u2_params.timeout == 0))
return 0; return 0;
/* If LPM is enabled, attempt to disable it. */ /* If LPM is enabled, attempt to disable it. */

Просмотреть файл

@ -1838,7 +1838,6 @@ free_interfaces:
intfc = cp->intf_cache[i]; intfc = cp->intf_cache[i];
intf->altsetting = intfc->altsetting; intf->altsetting = intfc->altsetting;
intf->num_altsetting = intfc->num_altsetting; intf->num_altsetting = intfc->num_altsetting;
intf->intf_assoc = find_iad(dev, cp, i);
kref_get(&intfc->ref); kref_get(&intfc->ref);
alt = usb_altnum_to_altsetting(intf, 0); alt = usb_altnum_to_altsetting(intf, 0);
@ -1851,6 +1850,8 @@ free_interfaces:
if (!alt) if (!alt)
alt = &intf->altsetting[0]; alt = &intf->altsetting[0];
intf->intf_assoc =
find_iad(dev, cp, alt->desc.bInterfaceNumber);
intf->cur_altsetting = alt; intf->cur_altsetting = alt;
usb_enable_interface(dev, intf, true); usb_enable_interface(dev, intf, true);
intf->dev.parent = &dev->dev; intf->dev.parent = &dev->dev;

Просмотреть файл

@ -599,12 +599,6 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
spin_lock_irqsave(&ep->udc->lock, flags); spin_lock_irqsave(&ep->udc->lock, flags);
if (ep->ep.desc) {
spin_unlock_irqrestore(&ep->udc->lock, flags);
DBG(DBG_ERR, "ep%d already enabled\n", ep->index);
return -EBUSY;
}
ep->ep.desc = desc; ep->ep.desc = desc;
ep->ep.maxpacket = maxpacket; ep->ep.maxpacket = maxpacket;

Просмотреть файл

@ -1596,7 +1596,7 @@ static int qe_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct qe_ep, ep); ep = container_of(_ep, struct qe_ep, ep);
/* catch various bogus parameters */ /* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc || _ep->name == ep_name[0] || if (!_ep || !desc || _ep->name == ep_name[0] ||
(desc->bDescriptorType != USB_DT_ENDPOINT)) (desc->bDescriptorType != USB_DT_ENDPOINT))
return -EINVAL; return -EINVAL;

Просмотреть файл

@ -567,7 +567,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct fsl_ep, ep); ep = container_of(_ep, struct fsl_ep, ep);
/* catch various bogus parameters */ /* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| (desc->bDescriptorType != USB_DT_ENDPOINT)) || (desc->bDescriptorType != USB_DT_ENDPOINT))
return -EINVAL; return -EINVAL;
@ -2575,7 +2575,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
/* for ep0: the desc defined here; /* for ep0: the desc defined here;
* for other eps, gadget layer called ep_enable with defined desc * for other eps, gadget layer called ep_enable with defined desc
*/ */
udc_controller->eps[0].desc = &fsl_ep0_desc; udc_controller->eps[0].ep.desc = &fsl_ep0_desc;
udc_controller->eps[0].ep.maxpacket = USB_MAX_CTRL_PAYLOAD; udc_controller->eps[0].ep.maxpacket = USB_MAX_CTRL_PAYLOAD;
/* setup the udc->eps[] for non-control endpoints and link /* setup the udc->eps[] for non-control endpoints and link

Просмотреть файл

@ -568,10 +568,10 @@ static void dump_msg(const char *label, const u8 * buf, unsigned int length)
/* /*
* ### internal used help routines. * ### internal used help routines.
*/ */
#define ep_index(EP) ((EP)->desc->bEndpointAddress&0xF) #define ep_index(EP) ((EP)->ep.desc->bEndpointAddress&0xF)
#define ep_maxpacket(EP) ((EP)->ep.maxpacket) #define ep_maxpacket(EP) ((EP)->ep.maxpacket)
#define ep_is_in(EP) ( (ep_index(EP) == 0) ? (EP->udc->ep0_dir == \ #define ep_is_in(EP) ( (ep_index(EP) == 0) ? (EP->udc->ep0_dir == \
USB_DIR_IN ):((EP)->desc->bEndpointAddress \ USB_DIR_IN) : ((EP)->ep.desc->bEndpointAddress \
& USB_DIR_IN)==USB_DIR_IN) & USB_DIR_IN)==USB_DIR_IN)
#define get_ep_by_pipe(udc, pipe) ((pipe == 1)? &udc->eps[0]: \ #define get_ep_by_pipe(udc, pipe) ((pipe == 1)? &udc->eps[0]: \
&udc->eps[pipe]) &udc->eps[pipe])

Просмотреть файл

@ -102,7 +102,7 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
unsigned long flags; unsigned long flags;
ep = container_of(_ep, struct goku_ep, ep); ep = container_of(_ep, struct goku_ep, ep);
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT) || desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL; return -EINVAL;
dev = ep->dev; dev = ep->dev;

Просмотреть файл

@ -464,7 +464,7 @@ static int mv_ep_enable(struct usb_ep *_ep,
ep = container_of(_ep, struct mv_ep, ep); ep = container_of(_ep, struct mv_ep, ep);
udc = ep->udc; udc = ep->udc;
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT) || desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL; return -EINVAL;

Просмотреть файл

@ -153,7 +153,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
u16 maxp; u16 maxp;
/* catch various bogus parameters */ /* catch various bogus parameters */
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| desc->bDescriptorType != USB_DT_ENDPOINT || desc->bDescriptorType != USB_DT_ENDPOINT
|| ep->bEndpointAddress != desc->bEndpointAddress || ep->bEndpointAddress != desc->bEndpointAddress
|| ep->maxpacket < usb_endpoint_maxp(desc)) { || ep->maxpacket < usb_endpoint_maxp(desc)) {

Просмотреть файл

@ -218,7 +218,7 @@ static int pxa25x_ep_enable (struct usb_ep *_ep,
struct pxa25x_udc *dev; struct pxa25x_udc *dev;
ep = container_of (_ep, struct pxa25x_ep, ep); ep = container_of (_ep, struct pxa25x_ep, ep);
if (!_ep || !desc || ep->ep.desc || _ep->name == ep0name if (!_ep || !desc || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT || desc->bDescriptorType != USB_DT_ENDPOINT
|| ep->bEndpointAddress != desc->bEndpointAddress || ep->bEndpointAddress != desc->bEndpointAddress
|| ep->fifo_size < usb_endpoint_maxp (desc)) { || ep->fifo_size < usb_endpoint_maxp (desc)) {

Просмотреть файл

@ -760,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
u32 ecr = 0; u32 ecr = 0;
hsep = our_ep(_ep); hsep = our_ep(_ep);
if (!_ep || !desc || hsep->ep.desc || _ep->name == ep0name if (!_ep || !desc || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT || desc->bDescriptorType != USB_DT_ENDPOINT
|| hsep->bEndpointAddress != desc->bEndpointAddress || hsep->bEndpointAddress != desc->bEndpointAddress
|| ep_maxpacket(hsep) < usb_endpoint_maxp(desc)) || ep_maxpacket(hsep) < usb_endpoint_maxp(desc))

Просмотреть файл

@ -1062,7 +1062,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,
ep = to_s3c2410_ep(_ep); ep = to_s3c2410_ep(_ep);
if (!_ep || !desc || ep->ep.desc if (!_ep || !desc
|| _ep->name == ep0name || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT) || desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL; return -EINVAL;

Просмотреть файл

@ -671,7 +671,9 @@ static int ehci_init(struct usb_hcd *hcd)
hw = ehci->async->hw; hw = ehci->async->hw;
hw->hw_next = QH_NEXT(ehci, ehci->async->qh_dma); hw->hw_next = QH_NEXT(ehci, ehci->async->qh_dma);
hw->hw_info1 = cpu_to_hc32(ehci, QH_HEAD); hw->hw_info1 = cpu_to_hc32(ehci, QH_HEAD);
#if defined(CONFIG_PPC_PS3)
hw->hw_info1 |= cpu_to_hc32(ehci, (1 << 7)); /* I = 1 */ hw->hw_info1 |= cpu_to_hc32(ehci, (1 << 7)); /* I = 1 */
#endif
hw->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); hw->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT);
hw->hw_qtd_next = EHCI_LIST_END(ehci); hw->hw_qtd_next = EHCI_LIST_END(ehci);
ehci->async->qh_state = QH_STATE_LINKED; ehci->async->qh_state = QH_STATE_LINKED;

Просмотреть файл

@ -43,6 +43,7 @@
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/clk.h>
/* EHCI Register Set */ /* EHCI Register Set */
#define EHCI_INSNREG04 (0xA0) #define EHCI_INSNREG04 (0xA0)
@ -55,6 +56,15 @@
#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8 #define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8
#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0 #define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0
/* Errata i693 */
static struct clk *utmi_p1_fck;
static struct clk *utmi_p2_fck;
static struct clk *xclk60mhsp1_ck;
static struct clk *xclk60mhsp2_ck;
static struct clk *usbhost_p1_fck;
static struct clk *usbhost_p2_fck;
static struct clk *init_60m_fclk;
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static const struct hc_driver ehci_omap_hc_driver; static const struct hc_driver ehci_omap_hc_driver;
@ -70,6 +80,41 @@ static inline u32 ehci_read(void __iomem *base, u32 reg)
return __raw_readl(base + reg); return __raw_readl(base + reg);
} }
/* Erratum i693 workaround sequence */
static void omap_ehci_erratum_i693(struct ehci_hcd *ehci)
{
int ret = 0;
/* Switch to the internal 60 MHz clock */
ret = clk_set_parent(utmi_p1_fck, init_60m_fclk);
if (ret != 0)
ehci_err(ehci, "init_60m_fclk set parent"
"failed error:%d\n", ret);
ret = clk_set_parent(utmi_p2_fck, init_60m_fclk);
if (ret != 0)
ehci_err(ehci, "init_60m_fclk set parent"
"failed error:%d\n", ret);
clk_enable(usbhost_p1_fck);
clk_enable(usbhost_p2_fck);
/* Wait 1ms and switch back to the external clock */
mdelay(1);
ret = clk_set_parent(utmi_p1_fck, xclk60mhsp1_ck);
if (ret != 0)
ehci_err(ehci, "xclk60mhsp1_ck set parent"
"failed error:%d\n", ret);
ret = clk_set_parent(utmi_p2_fck, xclk60mhsp2_ck);
if (ret != 0)
ehci_err(ehci, "xclk60mhsp2_ck set parent"
"failed error:%d\n", ret);
clk_disable(usbhost_p1_fck);
clk_disable(usbhost_p2_fck);
}
static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port) static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port)
{ {
struct usb_hcd *hcd = dev_get_drvdata(&pdev->dev); struct usb_hcd *hcd = dev_get_drvdata(&pdev->dev);
@ -100,6 +145,50 @@ static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port)
} }
} }
static int omap_ehci_hub_control(
struct usb_hcd *hcd,
u16 typeReq,
u16 wValue,
u16 wIndex,
char *buf,
u16 wLength
)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
u32 __iomem *status_reg = &ehci->regs->port_status[
(wIndex & 0xff) - 1];
u32 temp;
unsigned long flags;
int retval = 0;
spin_lock_irqsave(&ehci->lock, flags);
if (typeReq == SetPortFeature && wValue == USB_PORT_FEAT_SUSPEND) {
temp = ehci_readl(ehci, status_reg);
if ((temp & PORT_PE) == 0 || (temp & PORT_RESET) != 0) {
retval = -EPIPE;
goto done;
}
temp &= ~PORT_WKCONN_E;
temp |= PORT_WKDISC_E | PORT_WKOC_E;
ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
omap_ehci_erratum_i693(ehci);
set_bit((wIndex & 0xff) - 1, &ehci->suspended_ports);
goto done;
}
spin_unlock_irqrestore(&ehci->lock, flags);
/* Handle the hub control events here */
return ehci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength);
done:
spin_unlock_irqrestore(&ehci->lock, flags);
return retval;
}
static void disable_put_regulator( static void disable_put_regulator(
struct ehci_hcd_omap_platform_data *pdata) struct ehci_hcd_omap_platform_data *pdata)
{ {
@ -264,8 +353,76 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
/* root ports should always stay powered */ /* root ports should always stay powered */
ehci_port_power(omap_ehci, 1); ehci_port_power(omap_ehci, 1);
/* get clocks */
utmi_p1_fck = clk_get(dev, "utmi_p1_gfclk");
if (IS_ERR(utmi_p1_fck)) {
ret = PTR_ERR(utmi_p1_fck);
dev_err(dev, "utmi_p1_gfclk failed error:%d\n", ret);
goto err_add_hcd;
}
xclk60mhsp1_ck = clk_get(dev, "xclk60mhsp1_ck");
if (IS_ERR(xclk60mhsp1_ck)) {
ret = PTR_ERR(xclk60mhsp1_ck);
dev_err(dev, "xclk60mhsp1_ck failed error:%d\n", ret);
goto err_utmi_p1_fck;
}
utmi_p2_fck = clk_get(dev, "utmi_p2_gfclk");
if (IS_ERR(utmi_p2_fck)) {
ret = PTR_ERR(utmi_p2_fck);
dev_err(dev, "utmi_p2_gfclk failed error:%d\n", ret);
goto err_xclk60mhsp1_ck;
}
xclk60mhsp2_ck = clk_get(dev, "xclk60mhsp2_ck");
if (IS_ERR(xclk60mhsp2_ck)) {
ret = PTR_ERR(xclk60mhsp2_ck);
dev_err(dev, "xclk60mhsp2_ck failed error:%d\n", ret);
goto err_utmi_p2_fck;
}
usbhost_p1_fck = clk_get(dev, "usb_host_hs_utmi_p1_clk");
if (IS_ERR(usbhost_p1_fck)) {
ret = PTR_ERR(usbhost_p1_fck);
dev_err(dev, "usbhost_p1_fck failed error:%d\n", ret);
goto err_xclk60mhsp2_ck;
}
usbhost_p2_fck = clk_get(dev, "usb_host_hs_utmi_p2_clk");
if (IS_ERR(usbhost_p2_fck)) {
ret = PTR_ERR(usbhost_p2_fck);
dev_err(dev, "usbhost_p2_fck failed error:%d\n", ret);
goto err_usbhost_p1_fck;
}
init_60m_fclk = clk_get(dev, "init_60m_fclk");
if (IS_ERR(init_60m_fclk)) {
ret = PTR_ERR(init_60m_fclk);
dev_err(dev, "init_60m_fclk failed error:%d\n", ret);
goto err_usbhost_p2_fck;
}
return 0; return 0;
err_usbhost_p2_fck:
clk_put(usbhost_p2_fck);
err_usbhost_p1_fck:
clk_put(usbhost_p1_fck);
err_xclk60mhsp2_ck:
clk_put(xclk60mhsp2_ck);
err_utmi_p2_fck:
clk_put(utmi_p2_fck);
err_xclk60mhsp1_ck:
clk_put(xclk60mhsp1_ck);
err_utmi_p1_fck:
clk_put(utmi_p1_fck);
err_add_hcd: err_add_hcd:
disable_put_regulator(pdata); disable_put_regulator(pdata);
pm_runtime_put_sync(dev); pm_runtime_put_sync(dev);
@ -294,6 +451,15 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
disable_put_regulator(dev->platform_data); disable_put_regulator(dev->platform_data);
iounmap(hcd->regs); iounmap(hcd->regs);
usb_put_hcd(hcd); usb_put_hcd(hcd);
clk_put(utmi_p1_fck);
clk_put(utmi_p2_fck);
clk_put(xclk60mhsp1_ck);
clk_put(xclk60mhsp2_ck);
clk_put(usbhost_p1_fck);
clk_put(usbhost_p2_fck);
clk_put(init_60m_fclk);
pm_runtime_put_sync(dev); pm_runtime_put_sync(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
@ -364,7 +530,7 @@ static const struct hc_driver ehci_omap_hc_driver = {
* root hub support * root hub support
*/ */
.hub_status_data = ehci_hub_status_data, .hub_status_data = ehci_hub_status_data,
.hub_control = ehci_hub_control, .hub_control = omap_ehci_hub_control,
.bus_suspend = ehci_bus_suspend, .bus_suspend = ehci_bus_suspend,
.bus_resume = ehci_bus_resume, .bus_resume = ehci_bus_resume,

Просмотреть файл

@ -144,14 +144,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
hcd->has_tt = 1; hcd->has_tt = 1;
tdi_reset(ehci); tdi_reset(ehci);
} }
if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) {
/* EHCI #1 or #2 on 6 Series/C200 Series chipset */
if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) {
ehci_info(ehci, "broken D3 during system sleep on ASUS\n");
hcd->broken_pci_sleep = 1;
device_set_wakeup_capable(&pdev->dev, false);
}
}
break; break;
case PCI_VENDOR_ID_TDI: case PCI_VENDOR_ID_TDI:
if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {

Просмотреть файл

@ -126,7 +126,6 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
goto fail_create_hcd; goto fail_create_hcd;
} }
if (pdev->dev.platform_data != NULL)
pdata = pdev->dev.platform_data; pdata = pdev->dev.platform_data;
/* initialize hcd */ /* initialize hcd */

Просмотреть файл

@ -270,14 +270,12 @@ static int ehci_hcd_xilinx_of_remove(struct platform_device *op)
* *
* Properly shutdown the hcd, call driver's shutdown routine. * Properly shutdown the hcd, call driver's shutdown routine.
*/ */
static int ehci_hcd_xilinx_of_shutdown(struct platform_device *op) static void ehci_hcd_xilinx_of_shutdown(struct platform_device *op)
{ {
struct usb_hcd *hcd = dev_get_drvdata(&op->dev); struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
if (hcd->driver->shutdown) if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd); hcd->driver->shutdown(hcd);
return 0;
} }

Просмотреть файл

@ -317,7 +317,7 @@ static int ohci_bus_resume (struct usb_hcd *hcd)
} }
/* Carry out the final steps of resuming the controller device */ /* Carry out the final steps of resuming the controller device */
static void ohci_finish_controller_resume(struct usb_hcd *hcd) static void __maybe_unused ohci_finish_controller_resume(struct usb_hcd *hcd)
{ {
struct ohci_hcd *ohci = hcd_to_ohci(hcd); struct ohci_hcd *ohci = hcd_to_ohci(hcd);
int port; int port;

Просмотреть файл

@ -793,10 +793,9 @@ static void xhci_free_tt_info(struct xhci_hcd *xhci,
struct xhci_virt_device *virt_dev, struct xhci_virt_device *virt_dev,
int slot_id) int slot_id)
{ {
struct list_head *tt;
struct list_head *tt_list_head; struct list_head *tt_list_head;
struct list_head *tt_next; struct xhci_tt_bw_info *tt_info, *next;
struct xhci_tt_bw_info *tt_info; bool slot_found = false;
/* If the device never made it past the Set Address stage, /* If the device never made it past the Set Address stage,
* it may not have the real_port set correctly. * it may not have the real_port set correctly.
@ -808,34 +807,16 @@ static void xhci_free_tt_info(struct xhci_hcd *xhci,
} }
tt_list_head = &(xhci->rh_bw[virt_dev->real_port - 1].tts); tt_list_head = &(xhci->rh_bw[virt_dev->real_port - 1].tts);
if (list_empty(tt_list_head)) list_for_each_entry_safe(tt_info, next, tt_list_head, tt_list) {
return; /* Multi-TT hubs will have more than one entry */
if (tt_info->slot_id == slot_id) {
list_for_each(tt, tt_list_head) { slot_found = true;
tt_info = list_entry(tt, struct xhci_tt_bw_info, tt_list); list_del(&tt_info->tt_list);
if (tt_info->slot_id == slot_id) kfree(tt_info);
} else if (slot_found) {
break; break;
} }
/* Cautionary measure in case the hub was disconnected before we }
* stored the TT information.
*/
if (tt_info->slot_id != slot_id)
return;
tt_next = tt->next;
tt_info = list_entry(tt, struct xhci_tt_bw_info,
tt_list);
/* Multi-TT hubs will have more than one entry */
do {
list_del(tt);
kfree(tt_info);
tt = tt_next;
if (list_empty(tt_list_head))
break;
tt_next = tt->next;
tt_info = list_entry(tt, struct xhci_tt_bw_info,
tt_list);
} while (tt_info->slot_id == slot_id);
} }
int xhci_alloc_tt_info(struct xhci_hcd *xhci, int xhci_alloc_tt_info(struct xhci_hcd *xhci,
@ -1791,17 +1772,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
{ {
struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
struct dev_info *dev_info, *next; struct dev_info *dev_info, *next;
struct list_head *tt_list_head;
struct list_head *tt;
struct list_head *endpoints;
struct list_head *ep, *q;
struct xhci_tt_bw_info *tt_info;
struct xhci_interval_bw_table *bwt;
struct xhci_virt_ep *virt_ep;
unsigned long flags; unsigned long flags;
int size; int size;
int i; int i, j, num_ports;
/* Free the Event Ring Segment Table and the actual Event Ring */ /* Free the Event Ring Segment Table and the actual Event Ring */
size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries);
@ -1860,21 +1833,22 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
} }
spin_unlock_irqrestore(&xhci->lock, flags); spin_unlock_irqrestore(&xhci->lock, flags);
bwt = &xhci->rh_bw->bw_table; num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
for (i = 0; i < XHCI_MAX_INTERVAL; i++) { for (i = 0; i < num_ports; i++) {
endpoints = &bwt->interval_bw[i].endpoints; struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
list_for_each_safe(ep, q, endpoints) { for (j = 0; j < XHCI_MAX_INTERVAL; j++) {
virt_ep = list_entry(ep, struct xhci_virt_ep, bw_endpoint_list); struct list_head *ep = &bwt->interval_bw[j].endpoints;
list_del(&virt_ep->bw_endpoint_list); while (!list_empty(ep))
kfree(virt_ep); list_del_init(ep->next);
} }
} }
tt_list_head = &xhci->rh_bw->tts; for (i = 0; i < num_ports; i++) {
list_for_each_safe(tt, q, tt_list_head) { struct xhci_tt_bw_info *tt, *n;
tt_info = list_entry(tt, struct xhci_tt_bw_info, tt_list); list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) {
list_del(tt); list_del(&tt->tt_list);
kfree(tt_info); kfree(tt);
}
} }
xhci->num_usb2_ports = 0; xhci->num_usb2_ports = 0;

Просмотреть файл

@ -795,8 +795,8 @@ int xhci_suspend(struct xhci_hcd *xhci)
command = xhci_readl(xhci, &xhci->op_regs->command); command = xhci_readl(xhci, &xhci->op_regs->command);
command |= CMD_CSS; command |= CMD_CSS;
xhci_writel(xhci, command, &xhci->op_regs->command); xhci_writel(xhci, command, &xhci->op_regs->command);
if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10*100)) { if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10 * 1000)) {
xhci_warn(xhci, "WARN: xHC CMD_CSS timeout\n"); xhci_warn(xhci, "WARN: xHC save state timeout\n");
spin_unlock_irq(&xhci->lock); spin_unlock_irq(&xhci->lock);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
@ -848,8 +848,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
command |= CMD_CRS; command |= CMD_CRS;
xhci_writel(xhci, command, &xhci->op_regs->command); xhci_writel(xhci, command, &xhci->op_regs->command);
if (handshake(xhci, &xhci->op_regs->status, if (handshake(xhci, &xhci->op_regs->status,
STS_RESTORE, 0, 10*100)) { STS_RESTORE, 0, 10 * 1000)) {
xhci_dbg(xhci, "WARN: xHC CMD_CSS timeout\n"); xhci_warn(xhci, "WARN: xHC restore state timeout\n");
spin_unlock_irq(&xhci->lock); spin_unlock_irq(&xhci->lock);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
@ -3906,7 +3906,7 @@ static u16 xhci_get_timeout_no_hub_lpm(struct usb_device *udev,
default: default:
dev_warn(&udev->dev, "%s: Can't get timeout for non-U1 or U2 state.\n", dev_warn(&udev->dev, "%s: Can't get timeout for non-U1 or U2 state.\n",
__func__); __func__);
return -EINVAL; return USB3_LPM_DISABLED;
} }
if (sel <= max_sel_pel && pel <= max_sel_pel) if (sel <= max_sel_pel && pel <= max_sel_pel)

Просмотреть файл

@ -34,6 +34,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <mach/cputype.h> #include <mach/cputype.h>
#include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>

Просмотреть файл

@ -15,7 +15,7 @@
*/ */
/* Integrated highspeed/otg PHY */ /* Integrated highspeed/otg PHY */
#define USBPHY_CTL_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x34) #define USBPHY_CTL_PADDR 0x01c40034
#define USBPHY_DATAPOL BIT(11) /* (dm355) switch D+/D- */ #define USBPHY_DATAPOL BIT(11) /* (dm355) switch D+/D- */
#define USBPHY_PHYCLKGD BIT(8) #define USBPHY_PHYCLKGD BIT(8)
#define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */ #define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */
@ -27,7 +27,7 @@
#define USBPHY_OTGPDWN BIT(1) #define USBPHY_OTGPDWN BIT(1)
#define USBPHY_PHYPDWN BIT(0) #define USBPHY_PHYPDWN BIT(0)
#define DM355_DEEPSLEEP_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x48) #define DM355_DEEPSLEEP_PADDR 0x01c40048
#define DRVVBUS_FORCE BIT(2) #define DRVVBUS_FORCE BIT(2)
#define DRVVBUS_OVERRIDE BIT(1) #define DRVVBUS_OVERRIDE BIT(1)

Просмотреть файл

@ -1232,6 +1232,7 @@ static int musb_gadget_disable(struct usb_ep *ep)
} }
musb_ep->desc = NULL; musb_ep->desc = NULL;
musb_ep->end_point.desc = NULL;
/* abort all pending DMA and requests */ /* abort all pending DMA and requests */
nuke(musb_ep, -ESHUTDOWN); nuke(musb_ep, -ESHUTDOWN);

Просмотреть файл

@ -82,6 +82,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */
{ USB_DEVICE(0x10C4, 0x806F) }, /* IMS USB to RS422 Converter Cable */ { USB_DEVICE(0x10C4, 0x806F) }, /* IMS USB to RS422 Converter Cable */
{ USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */
{ USB_DEVICE(0x10C4, 0x80C4) }, /* Cygnal Integrated Products, Inc., Optris infrared thermometer */
{ USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
{ USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */ { USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */
{ USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */

Просмотреть файл

@ -737,6 +737,7 @@ static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
{ USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) },
{ USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) },
{ USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_RTS01_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) },
{ USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },

Просмотреть файл

@ -784,6 +784,7 @@
#define RTSYSTEMS_VID 0x2100 /* Vendor ID */ #define RTSYSTEMS_VID 0x2100 /* Vendor ID */
#define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */
#define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */ #define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */
#define RTSYSTEMS_RTS01_PID 0x9e57 /* USB-RTS01 Radio Cable */
/* /*

Просмотреть файл

@ -39,13 +39,6 @@ MODULE_PARM_DESC(product, "User specified USB idProduct");
static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */ static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
/* we want to look at all devices, as the vendor/product id can change
* depending on the command line argument */
static const struct usb_device_id generic_serial_ids[] = {
{.driver_info = 42},
{}
};
/* All of the device info needed for the Generic Serial Converter */ /* All of the device info needed for the Generic Serial Converter */
struct usb_serial_driver usb_serial_generic_device = { struct usb_serial_driver usb_serial_generic_device = {
.driver = { .driver = {
@ -79,7 +72,8 @@ int usb_serial_generic_register(int _debug)
USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
/* register our generic driver with ourselves */ /* register our generic driver with ourselves */
retval = usb_serial_register_drivers(serial_drivers, "usbserial_generic", generic_serial_ids); retval = usb_serial_register_drivers(serial_drivers,
"usbserial_generic", generic_device_ids);
#endif #endif
return retval; return retval;
} }

Просмотреть файл

@ -309,13 +309,16 @@ static int mct_u232_set_modem_ctrl(struct usb_serial *serial,
MCT_U232_SET_REQUEST_TYPE, MCT_U232_SET_REQUEST_TYPE,
0, 0, buf, MCT_U232_SET_MODEM_CTRL_SIZE, 0, 0, buf, MCT_U232_SET_MODEM_CTRL_SIZE,
WDR_TIMEOUT); WDR_TIMEOUT);
if (rc < 0) kfree(buf);
dev_err(&serial->dev->dev,
"Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc);
dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr);
kfree(buf); if (rc < 0) {
dev_err(&serial->dev->dev,
"Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc);
return rc; return rc;
}
return 0;
} /* mct_u232_set_modem_ctrl */ } /* mct_u232_set_modem_ctrl */
static int mct_u232_get_modem_stat(struct usb_serial *serial, static int mct_u232_get_modem_stat(struct usb_serial *serial,

Просмотреть файл

@ -190,7 +190,7 @@
static int device_type; static int device_type;
static const struct usb_device_id id_table[] __devinitconst = { static const struct usb_device_id id_table[] = {
{USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)},
{USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)},
{USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7810)}, {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7810)},

Просмотреть файл

@ -47,6 +47,7 @@
/* Function prototypes */ /* Function prototypes */
static int option_probe(struct usb_serial *serial, static int option_probe(struct usb_serial *serial,
const struct usb_device_id *id); const struct usb_device_id *id);
static void option_release(struct usb_serial *serial);
static int option_send_setup(struct usb_serial_port *port); static int option_send_setup(struct usb_serial_port *port);
static void option_instat_callback(struct urb *urb); static void option_instat_callback(struct urb *urb);
@ -150,6 +151,7 @@ static void option_instat_callback(struct urb *urb);
#define HUAWEI_PRODUCT_E14AC 0x14AC #define HUAWEI_PRODUCT_E14AC 0x14AC
#define HUAWEI_PRODUCT_K3806 0x14AE #define HUAWEI_PRODUCT_K3806 0x14AE
#define HUAWEI_PRODUCT_K4605 0x14C6 #define HUAWEI_PRODUCT_K4605 0x14C6
#define HUAWEI_PRODUCT_K5005 0x14C8
#define HUAWEI_PRODUCT_K3770 0x14C9 #define HUAWEI_PRODUCT_K3770 0x14C9
#define HUAWEI_PRODUCT_K3771 0x14CA #define HUAWEI_PRODUCT_K3771 0x14CA
#define HUAWEI_PRODUCT_K4510 0x14CB #define HUAWEI_PRODUCT_K4510 0x14CB
@ -425,7 +427,7 @@ static void option_instat_callback(struct urb *urb);
#define SAMSUNG_VENDOR_ID 0x04e8 #define SAMSUNG_VENDOR_ID 0x04e8
#define SAMSUNG_PRODUCT_GT_B3730 0x6889 #define SAMSUNG_PRODUCT_GT_B3730 0x6889
/* YUGA products www.yuga-info.com*/ /* YUGA products www.yuga-info.com gavin.kx@qq.com */
#define YUGA_VENDOR_ID 0x257A #define YUGA_VENDOR_ID 0x257A
#define YUGA_PRODUCT_CEM600 0x1601 #define YUGA_PRODUCT_CEM600 0x1601
#define YUGA_PRODUCT_CEM610 0x1602 #define YUGA_PRODUCT_CEM610 0x1602
@ -442,6 +444,8 @@ static void option_instat_callback(struct urb *urb);
#define YUGA_PRODUCT_CEU516 0x160C #define YUGA_PRODUCT_CEU516 0x160C
#define YUGA_PRODUCT_CEU528 0x160D #define YUGA_PRODUCT_CEU528 0x160D
#define YUGA_PRODUCT_CEU526 0x160F #define YUGA_PRODUCT_CEU526 0x160F
#define YUGA_PRODUCT_CEU881 0x161F
#define YUGA_PRODUCT_CEU882 0x162F
#define YUGA_PRODUCT_CWM600 0x2601 #define YUGA_PRODUCT_CWM600 0x2601
#define YUGA_PRODUCT_CWM610 0x2602 #define YUGA_PRODUCT_CWM610 0x2602
@ -457,23 +461,26 @@ static void option_instat_callback(struct urb *urb);
#define YUGA_PRODUCT_CWU518 0x260B #define YUGA_PRODUCT_CWU518 0x260B
#define YUGA_PRODUCT_CWU516 0x260C #define YUGA_PRODUCT_CWU516 0x260C
#define YUGA_PRODUCT_CWU528 0x260D #define YUGA_PRODUCT_CWU528 0x260D
#define YUGA_PRODUCT_CWU581 0x260E
#define YUGA_PRODUCT_CWU526 0x260F #define YUGA_PRODUCT_CWU526 0x260F
#define YUGA_PRODUCT_CWU582 0x261F
#define YUGA_PRODUCT_CWU583 0x262F
#define YUGA_PRODUCT_CLM600 0x2601 #define YUGA_PRODUCT_CLM600 0x3601
#define YUGA_PRODUCT_CLM610 0x2602 #define YUGA_PRODUCT_CLM610 0x3602
#define YUGA_PRODUCT_CLM500 0x2603 #define YUGA_PRODUCT_CLM500 0x3603
#define YUGA_PRODUCT_CLM510 0x2604 #define YUGA_PRODUCT_CLM510 0x3604
#define YUGA_PRODUCT_CLM800 0x2605 #define YUGA_PRODUCT_CLM800 0x3605
#define YUGA_PRODUCT_CLM900 0x2606 #define YUGA_PRODUCT_CLM900 0x3606
#define YUGA_PRODUCT_CLU718 0x2607 #define YUGA_PRODUCT_CLU718 0x3607
#define YUGA_PRODUCT_CLU716 0x2608 #define YUGA_PRODUCT_CLU716 0x3608
#define YUGA_PRODUCT_CLU728 0x2609 #define YUGA_PRODUCT_CLU728 0x3609
#define YUGA_PRODUCT_CLU726 0x260A #define YUGA_PRODUCT_CLU726 0x360A
#define YUGA_PRODUCT_CLU518 0x260B #define YUGA_PRODUCT_CLU518 0x360B
#define YUGA_PRODUCT_CLU516 0x260C #define YUGA_PRODUCT_CLU516 0x360C
#define YUGA_PRODUCT_CLU528 0x260D #define YUGA_PRODUCT_CLU528 0x360D
#define YUGA_PRODUCT_CLU526 0x260F #define YUGA_PRODUCT_CLU526 0x360F
/* Viettel products */ /* Viettel products */
#define VIETTEL_VENDOR_ID 0x2262 #define VIETTEL_VENDOR_ID 0x2262
@ -666,6 +673,11 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
@ -1209,6 +1221,11 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU881) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU882) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU581) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU582) },
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU583) },
{ USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
{ USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */ { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */
@ -1245,7 +1262,7 @@ static struct usb_serial_driver option_1port_device = {
.ioctl = usb_wwan_ioctl, .ioctl = usb_wwan_ioctl,
.attach = usb_wwan_startup, .attach = usb_wwan_startup,
.disconnect = usb_wwan_disconnect, .disconnect = usb_wwan_disconnect,
.release = usb_wwan_release, .release = option_release,
.read_int_callback = option_instat_callback, .read_int_callback = option_instat_callback,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = usb_wwan_suspend, .suspend = usb_wwan_suspend,
@ -1259,35 +1276,6 @@ static struct usb_serial_driver * const serial_drivers[] = {
static bool debug; static bool debug;
/* per port private data */
#define N_IN_URB 4
#define N_OUT_URB 4
#define IN_BUFLEN 4096
#define OUT_BUFLEN 4096
struct option_port_private {
/* Input endpoints and buffer for this port */
struct urb *in_urbs[N_IN_URB];
u8 *in_buffer[N_IN_URB];
/* Output endpoints and buffer for this port */
struct urb *out_urbs[N_OUT_URB];
u8 *out_buffer[N_OUT_URB];
unsigned long out_busy; /* Bit vector of URBs in use */
int opened;
struct usb_anchor delayed;
/* Settings for the port */
int rts_state; /* Handshaking pins (outputs) */
int dtr_state;
int cts_state; /* Handshaking pins (inputs) */
int dsr_state;
int dcd_state;
int ri_state;
unsigned long tx_start_time[N_OUT_URB];
};
module_usb_serial_driver(serial_drivers, option_ids); module_usb_serial_driver(serial_drivers, option_ids);
static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason, static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason,
@ -1356,12 +1344,22 @@ static int option_probe(struct usb_serial *serial,
return 0; return 0;
} }
static void option_release(struct usb_serial *serial)
{
struct usb_wwan_intf_private *priv = usb_get_serial_data(serial);
usb_wwan_release(serial);
kfree(priv);
}
static void option_instat_callback(struct urb *urb) static void option_instat_callback(struct urb *urb)
{ {
int err; int err;
int status = urb->status; int status = urb->status;
struct usb_serial_port *port = urb->context; struct usb_serial_port *port = urb->context;
struct option_port_private *portdata = usb_get_serial_port_data(port); struct usb_wwan_port_private *portdata =
usb_get_serial_port_data(port);
dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata);
@ -1421,7 +1419,7 @@ static int option_send_setup(struct usb_serial_port *port)
struct usb_serial *serial = port->serial; struct usb_serial *serial = port->serial;
struct usb_wwan_intf_private *intfdata = struct usb_wwan_intf_private *intfdata =
(struct usb_wwan_intf_private *) serial->private; (struct usb_wwan_intf_private *) serial->private;
struct option_port_private *portdata; struct usb_wwan_port_private *portdata;
int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
int val = 0; int val = 0;

Просмотреть файл

@ -105,7 +105,13 @@ static const struct usb_device_id id_table[] = {
{USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */
{USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */
{USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */
{USB_DEVICE(0x1199, 0x9010)}, /* Sierra Wireless Gobi 3000 QDL */
{USB_DEVICE(0x1199, 0x9012)}, /* Sierra Wireless Gobi 3000 QDL */
{USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */
{USB_DEVICE(0x1199, 0x9014)}, /* Sierra Wireless Gobi 3000 QDL */
{USB_DEVICE(0x1199, 0x9015)}, /* Sierra Wireless Gobi 3000 Modem device */
{USB_DEVICE(0x1199, 0x9018)}, /* Sierra Wireless Gobi 3000 QDL */
{USB_DEVICE(0x1199, 0x9019)}, /* Sierra Wireless Gobi 3000 Modem device */
{USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */
{USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */
{ } /* Terminating entry */ { } /* Terminating entry */

Просмотреть файл

@ -294,6 +294,10 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */
.driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
}, },
/* AT&T Direct IP LTE modems */
{ USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF),
.driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
},
{ USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */
.driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
}, },

Просмотреть файл

@ -659,11 +659,13 @@ exit:
static struct usb_serial_driver *search_serial_device( static struct usb_serial_driver *search_serial_device(
struct usb_interface *iface) struct usb_interface *iface)
{ {
const struct usb_device_id *id; const struct usb_device_id *id = NULL;
struct usb_serial_driver *drv; struct usb_serial_driver *drv;
struct usb_driver *driver = to_usb_driver(iface->dev.driver);
/* Check if the usb id matches a known device */ /* Check if the usb id matches a known device */
list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { list_for_each_entry(drv, &usb_serial_driver_list, driver_list) {
if (drv->usb_driver == driver)
id = get_iface_id(drv, iface); id = get_iface_id(drv, iface);
if (id) if (id)
return drv; return drv;
@ -755,7 +757,7 @@ static int usb_serial_probe(struct usb_interface *interface,
if (retval) { if (retval) {
dbg("sub driver rejected device"); dbg("sub driver rejected device");
kfree(serial); usb_serial_put(serial);
module_put(type->driver.owner); module_put(type->driver.owner);
return retval; return retval;
} }
@ -827,7 +829,7 @@ static int usb_serial_probe(struct usb_interface *interface,
*/ */
if (num_bulk_in == 0 || num_bulk_out == 0) { if (num_bulk_in == 0 || num_bulk_out == 0) {
dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n"); dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
kfree(serial); usb_serial_put(serial);
module_put(type->driver.owner); module_put(type->driver.owner);
return -ENODEV; return -ENODEV;
} }
@ -841,7 +843,7 @@ static int usb_serial_probe(struct usb_interface *interface,
if (num_ports == 0) { if (num_ports == 0) {
dev_err(&interface->dev, dev_err(&interface->dev,
"Generic device with no bulk out, not allowed.\n"); "Generic device with no bulk out, not allowed.\n");
kfree(serial); usb_serial_put(serial);
module_put(type->driver.owner); module_put(type->driver.owner);
return -EIO; return -EIO;
} }

Просмотреть файл

@ -1107,6 +1107,13 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999,
USB_SC_RBC, USB_PR_BULK, NULL, USB_SC_RBC, USB_PR_BULK, NULL,
0 ), 0 ),
/* Feiya QDI U2 DISK, reported by Hans de Goede <hdegoede@redhat.com> */
UNUSUAL_DEV( 0x090c, 0x1000, 0x0000, 0xffff,
"Feiya",
"QDI U2 DISK",
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_NO_READ_CAPACITY_16 ),
/* aeb */ /* aeb */
UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
"Feiya", "Feiya",

Просмотреть файл

@ -176,6 +176,8 @@ enum pci_dev_flags {
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
/* Provide indication device is assigned by a Virtual Machine Manager */ /* Provide indication device is assigned by a Virtual Machine Manager */
PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4,
/* Device causes system crash if in D3 during S3 sleep */
PCI_DEV_FLAGS_NO_D3_DURING_SLEEP = (__force pci_dev_flags_t) 8,
}; };
enum pci_irq_reroute_variant { enum pci_irq_reroute_variant {

Просмотреть файл

@ -126,8 +126,6 @@ struct usb_hcd {
unsigned wireless:1; /* Wireless USB HCD */ unsigned wireless:1; /* Wireless USB HCD */
unsigned authorized_default:1; unsigned authorized_default:1;
unsigned has_tt:1; /* Integrated TT in root hub */ unsigned has_tt:1; /* Integrated TT in root hub */
unsigned broken_pci_sleep:1; /* Don't put the
controller in PCI-D3 for system sleep */
unsigned int irq; /* irq allocated */ unsigned int irq; /* irq allocated */
void __iomem *regs; /* device memory/io */ void __iomem *regs; /* device memory/io */