Commit 2c4e969c authored by Linus Torvalds's avatar Linus Torvalds

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

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

  They include:

   - usb-storage quirk additions

   - usb-serial new device ids

   - usb-serial driver fixes

   - USB roothub registration bugfix to resolve a long-reported issue

   - usb gadget driver fixes for a large number of small things

   - dwc2 driver fixes

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
  USB: serial: option: add device id for Foxconn T99W265
  USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
  USB: serial: cp210x: add part-number debug printk
  USB: serial: cp210x: fix dropped characters with CP2102
  MAINTAINERS: usb, update Peter Korsgaard's entries
  usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
  usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
  Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
  USB: serial: option: remove duplicate USB device ID
  USB: serial: mos7840: remove duplicated 0xac24 device ID
  arm64: dts: qcom: ipq8074: remove USB tx-fifo-resize property
  usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval
  usb: gadget: f_uac2: Add missing companion descriptor for feedback EP
  usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
  usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd()
  xhci: Set HCD flag to defer primary roothub registration
  usb: core: hcd: Add support for deferring roothub registration
  usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
  usb: dwc3: core: balance phy init and exit
  Revert "USB: bcma: Add a check for devm_gpiod_get"
  ...
parents 7d42e981 0292dbd7
...@@ -19288,13 +19288,12 @@ S: Maintained ...@@ -19288,13 +19288,12 @@ S: Maintained
F: drivers/usb/misc/chaoskey.c F: drivers/usb/misc/chaoskey.c
USB CYPRESS C67X00 DRIVER USB CYPRESS C67X00 DRIVER
M: Peter Korsgaard <jacmet@sunsite.dk>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Orphan
F: drivers/usb/c67x00/ F: drivers/usb/c67x00/
USB DAVICOM DM9601 DRIVER USB DAVICOM DM9601 DRIVER
M: Peter Korsgaard <jacmet@sunsite.dk> M: Peter Korsgaard <peter@korsgaard.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
W: http://www.linux-usb.org/usbnet W: http://www.linux-usb.org/usbnet
......
...@@ -487,7 +487,6 @@ dwc_0: dwc3@8a00000 { ...@@ -487,7 +487,6 @@ dwc_0: dwc3@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&usb0_ssphy>; phys = <&qusb_phy_0>, <&usb0_ssphy>;
phy-names = "usb2-phy", "usb3-phy"; phy-names = "usb2-phy", "usb3-phy";
tx-fifo-resize;
snps,is-utmi-l1-suspend; snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>; snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk; snps,dis_u2_susphy_quirk;
...@@ -528,7 +527,6 @@ dwc_1: dwc3@8c00000 { ...@@ -528,7 +527,6 @@ dwc_1: dwc3@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&usb1_ssphy>; phys = <&qusb_phy_1>, <&usb1_ssphy>;
phy-names = "usb2-phy", "usb3-phy"; phy-names = "usb2-phy", "usb3-phy";
tx-fifo-resize;
snps,is-utmi-l1-suspend; snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>; snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk; snps,dis_u2_susphy_quirk;
......
...@@ -1100,6 +1100,19 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep, ...@@ -1100,6 +1100,19 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep,
return 0; return 0;
} }
static void cdns3_rearm_drdy_if_needed(struct cdns3_endpoint *priv_ep)
{
struct cdns3_device *priv_dev = priv_ep->cdns3_dev;
if (priv_dev->dev_ver < DEV_VER_V3)
return;
if (readl(&priv_dev->regs->ep_sts) & EP_STS_TRBERR) {
writel(EP_STS_TRBERR, &priv_dev->regs->ep_sts);
writel(EP_CMD_DRDY, &priv_dev->regs->ep_cmd);
}
}
/** /**
* cdns3_ep_run_transfer - start transfer on no-default endpoint hardware * cdns3_ep_run_transfer - start transfer on no-default endpoint hardware
* @priv_ep: endpoint object * @priv_ep: endpoint object
...@@ -1351,6 +1364,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, ...@@ -1351,6 +1364,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
/*clearing TRBERR and EP_STS_DESCMIS before seting DRDY*/ /*clearing TRBERR and EP_STS_DESCMIS before seting DRDY*/
writel(EP_STS_TRBERR | EP_STS_DESCMIS, &priv_dev->regs->ep_sts); writel(EP_STS_TRBERR | EP_STS_DESCMIS, &priv_dev->regs->ep_sts);
writel(EP_CMD_DRDY, &priv_dev->regs->ep_cmd); writel(EP_CMD_DRDY, &priv_dev->regs->ep_cmd);
cdns3_rearm_drdy_if_needed(priv_ep);
trace_cdns3_doorbell_epx(priv_ep->name, trace_cdns3_doorbell_epx(priv_ep->name,
readl(&priv_dev->regs->ep_traddr)); readl(&priv_dev->regs->ep_traddr));
} }
......
...@@ -726,6 +726,7 @@ static void acm_port_destruct(struct tty_port *port) ...@@ -726,6 +726,7 @@ static void acm_port_destruct(struct tty_port *port)
{ {
struct acm *acm = container_of(port, struct acm, port); struct acm *acm = container_of(port, struct acm, port);
if (acm->minor != ACM_MINOR_INVALID)
acm_release_minor(acm); acm_release_minor(acm);
usb_put_intf(acm->control); usb_put_intf(acm->control);
kfree(acm->country_codes); kfree(acm->country_codes);
...@@ -1323,8 +1324,10 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1323,8 +1324,10 @@ static int acm_probe(struct usb_interface *intf,
usb_get_intf(acm->control); /* undone in destruct() */ usb_get_intf(acm->control); /* undone in destruct() */
minor = acm_alloc_minor(acm); minor = acm_alloc_minor(acm);
if (minor < 0) if (minor < 0) {
acm->minor = ACM_MINOR_INVALID;
goto err_put_port; goto err_put_port;
}
acm->minor = minor; acm->minor = minor;
acm->dev = usb_dev; acm->dev = usb_dev;
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#define ACM_TTY_MAJOR 166 #define ACM_TTY_MAJOR 166
#define ACM_TTY_MINORS 256 #define ACM_TTY_MINORS 256
#define ACM_MINOR_INVALID ACM_TTY_MINORS
/* /*
* Requests. * Requests.
*/ */
......
...@@ -2760,6 +2760,26 @@ static void usb_put_invalidate_rhdev(struct usb_hcd *hcd) ...@@ -2760,6 +2760,26 @@ static void usb_put_invalidate_rhdev(struct usb_hcd *hcd)
usb_put_dev(rhdev); usb_put_dev(rhdev);
} }
/**
* usb_stop_hcd - Halt the HCD
* @hcd: the usb_hcd that has to be halted
*
* Stop the root-hub polling timer and invoke the HCD's ->stop callback.
*/
static void usb_stop_hcd(struct usb_hcd *hcd)
{
hcd->rh_pollable = 0;
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
del_timer_sync(&hcd->rh_timer);
hcd->driver->stop(hcd);
hcd->state = HC_STATE_HALT;
/* In case the HCD restarted the timer, stop it again. */
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
del_timer_sync(&hcd->rh_timer);
}
/** /**
* usb_add_hcd - finish generic HCD structure initialization and register * usb_add_hcd - finish generic HCD structure initialization and register
* @hcd: the usb_hcd structure to initialize * @hcd: the usb_hcd structure to initialize
...@@ -2775,6 +2795,7 @@ int usb_add_hcd(struct usb_hcd *hcd, ...@@ -2775,6 +2795,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
{ {
int retval; int retval;
struct usb_device *rhdev; struct usb_device *rhdev;
struct usb_hcd *shared_hcd;
if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) { if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) {
hcd->phy_roothub = usb_phy_roothub_alloc(hcd->self.sysdev); hcd->phy_roothub = usb_phy_roothub_alloc(hcd->self.sysdev);
...@@ -2935,24 +2956,31 @@ int usb_add_hcd(struct usb_hcd *hcd, ...@@ -2935,24 +2956,31 @@ int usb_add_hcd(struct usb_hcd *hcd,
goto err_hcd_driver_start; goto err_hcd_driver_start;
} }
/* starting here, usbcore will pay attention to the shared HCD roothub */
shared_hcd = hcd->shared_hcd;
if (!usb_hcd_is_primary_hcd(hcd) && shared_hcd && HCD_DEFER_RH_REGISTER(shared_hcd)) {
retval = register_root_hub(shared_hcd);
if (retval != 0)
goto err_register_root_hub;
if (shared_hcd->uses_new_polling && HCD_POLL_RH(shared_hcd))
usb_hcd_poll_rh_status(shared_hcd);
}
/* starting here, usbcore will pay attention to this root hub */ /* starting here, usbcore will pay attention to this root hub */
if (!HCD_DEFER_RH_REGISTER(hcd)) {
retval = register_root_hub(hcd); retval = register_root_hub(hcd);
if (retval != 0) if (retval != 0)
goto err_register_root_hub; goto err_register_root_hub;
if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
usb_hcd_poll_rh_status(hcd); usb_hcd_poll_rh_status(hcd);
}
return retval; return retval;
err_register_root_hub: err_register_root_hub:
hcd->rh_pollable = 0; usb_stop_hcd(hcd);
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
del_timer_sync(&hcd->rh_timer);
hcd->driver->stop(hcd);
hcd->state = HC_STATE_HALT;
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
del_timer_sync(&hcd->rh_timer);
err_hcd_driver_start: err_hcd_driver_start:
if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0) if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0)
free_irq(irqnum, hcd); free_irq(irqnum, hcd);
...@@ -2985,6 +3013,7 @@ EXPORT_SYMBOL_GPL(usb_add_hcd); ...@@ -2985,6 +3013,7 @@ EXPORT_SYMBOL_GPL(usb_add_hcd);
void usb_remove_hcd(struct usb_hcd *hcd) void usb_remove_hcd(struct usb_hcd *hcd)
{ {
struct usb_device *rhdev = hcd->self.root_hub; struct usb_device *rhdev = hcd->self.root_hub;
bool rh_registered;
dev_info(hcd->self.controller, "remove, state %x\n", hcd->state); dev_info(hcd->self.controller, "remove, state %x\n", hcd->state);
...@@ -2995,6 +3024,7 @@ void usb_remove_hcd(struct usb_hcd *hcd) ...@@ -2995,6 +3024,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
dev_dbg(hcd->self.controller, "roothub graceful disconnect\n"); dev_dbg(hcd->self.controller, "roothub graceful disconnect\n");
spin_lock_irq (&hcd_root_hub_lock); spin_lock_irq (&hcd_root_hub_lock);
rh_registered = hcd->rh_registered;
hcd->rh_registered = 0; hcd->rh_registered = 0;
spin_unlock_irq (&hcd_root_hub_lock); spin_unlock_irq (&hcd_root_hub_lock);
...@@ -3004,6 +3034,7 @@ void usb_remove_hcd(struct usb_hcd *hcd) ...@@ -3004,6 +3034,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
cancel_work_sync(&hcd->died_work); cancel_work_sync(&hcd->died_work);
mutex_lock(&usb_bus_idr_lock); mutex_lock(&usb_bus_idr_lock);
if (rh_registered)
usb_disconnect(&rhdev); /* Sets rhdev to NULL */ usb_disconnect(&rhdev); /* Sets rhdev to NULL */
mutex_unlock(&usb_bus_idr_lock); mutex_unlock(&usb_bus_idr_lock);
...@@ -3022,16 +3053,7 @@ void usb_remove_hcd(struct usb_hcd *hcd) ...@@ -3022,16 +3053,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
* interrupt occurs), but usb_hcd_poll_rh_status() won't invoke * interrupt occurs), but usb_hcd_poll_rh_status() won't invoke
* the hub_status_data() callback. * the hub_status_data() callback.
*/ */
hcd->rh_pollable = 0; usb_stop_hcd(hcd);
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
del_timer_sync(&hcd->rh_timer);
hcd->driver->stop(hcd);
hcd->state = HC_STATE_HALT;
/* In case the HCD restarted the timer, stop it again. */
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
del_timer_sync(&hcd->rh_timer);
if (usb_hcd_is_primary_hcd(hcd)) { if (usb_hcd_is_primary_hcd(hcd)) {
if (hcd->irq > 0) if (hcd->irq > 0)
......
This diff is collapsed.
...@@ -5191,6 +5191,10 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg) ...@@ -5191,6 +5191,10 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg)
hcd->has_tt = 1; hcd->has_tt = 1;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
retval = -EINVAL;
goto error1;
}
hcd->rsrc_start = res->start; hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res); hcd->rsrc_len = resource_size(res);
......
...@@ -264,19 +264,6 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc) ...@@ -264,19 +264,6 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
{ {
u32 reg; u32 reg;
int retries = 1000; int retries = 1000;
int ret;
usb_phy_init(dwc->usb2_phy);
usb_phy_init(dwc->usb3_phy);
ret = phy_init(dwc->usb2_generic_phy);
if (ret < 0)
return ret;
ret = phy_init(dwc->usb3_generic_phy);
if (ret < 0) {
phy_exit(dwc->usb2_generic_phy);
return ret;
}
/* /*
* We're resetting only the device side because, if we're in host mode, * We're resetting only the device side because, if we're in host mode,
...@@ -310,9 +297,6 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc) ...@@ -310,9 +297,6 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
udelay(1); udelay(1);
} while (--retries); } while (--retries);
phy_exit(dwc->usb3_generic_phy);
phy_exit(dwc->usb2_generic_phy);
return -ETIMEDOUT; return -ETIMEDOUT;
done: done:
...@@ -982,9 +966,21 @@ static int dwc3_core_init(struct dwc3 *dwc) ...@@ -982,9 +966,21 @@ static int dwc3_core_init(struct dwc3 *dwc)
dwc->phys_ready = true; dwc->phys_ready = true;
} }
usb_phy_init(dwc->usb2_phy);
usb_phy_init(dwc->usb3_phy);
ret = phy_init(dwc->usb2_generic_phy);
if (ret < 0)
goto err0a;
ret = phy_init(dwc->usb3_generic_phy);
if (ret < 0) {
phy_exit(dwc->usb2_generic_phy);
goto err0a;
}
ret = dwc3_core_soft_reset(dwc); ret = dwc3_core_soft_reset(dwc);
if (ret) if (ret)
goto err0a; goto err1;
if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD && if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD &&
!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) { !DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) {
......
...@@ -406,6 +406,14 @@ static struct usb_endpoint_descriptor ss_epin_fback_desc = { ...@@ -406,6 +406,14 @@ static struct usb_endpoint_descriptor ss_epin_fback_desc = {
.bInterval = 4, .bInterval = 4,
}; };
static struct usb_ss_ep_comp_descriptor ss_epin_fback_desc_comp = {
.bLength = sizeof(ss_epin_fback_desc_comp),
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
.bMaxBurst = 0,
.bmAttributes = 0,
.wBytesPerInterval = cpu_to_le16(4),
};
/* Audio Streaming IN Interface - Alt0 */ /* Audio Streaming IN Interface - Alt0 */
static struct usb_interface_descriptor std_as_in_if0_desc = { static struct usb_interface_descriptor std_as_in_if0_desc = {
...@@ -597,6 +605,7 @@ static struct usb_descriptor_header *ss_audio_desc[] = { ...@@ -597,6 +605,7 @@ static struct usb_descriptor_header *ss_audio_desc[] = {
(struct usb_descriptor_header *)&ss_epout_desc_comp, (struct usb_descriptor_header *)&ss_epout_desc_comp,
(struct usb_descriptor_header *)&as_iso_out_desc, (struct usb_descriptor_header *)&as_iso_out_desc,
(struct usb_descriptor_header *)&ss_epin_fback_desc, (struct usb_descriptor_header *)&ss_epin_fback_desc,
(struct usb_descriptor_header *)&ss_epin_fback_desc_comp,
(struct usb_descriptor_header *)&std_as_in_if0_desc, (struct usb_descriptor_header *)&std_as_in_if0_desc,
(struct usb_descriptor_header *)&std_as_in_if1_desc, (struct usb_descriptor_header *)&std_as_in_if1_desc,
...@@ -705,6 +714,7 @@ static void setup_headers(struct f_uac2_opts *opts, ...@@ -705,6 +714,7 @@ static void setup_headers(struct f_uac2_opts *opts,
{ {
struct usb_ss_ep_comp_descriptor *epout_desc_comp = NULL; struct usb_ss_ep_comp_descriptor *epout_desc_comp = NULL;
struct usb_ss_ep_comp_descriptor *epin_desc_comp = NULL; struct usb_ss_ep_comp_descriptor *epin_desc_comp = NULL;
struct usb_ss_ep_comp_descriptor *epin_fback_desc_comp = NULL;
struct usb_endpoint_descriptor *epout_desc; struct usb_endpoint_descriptor *epout_desc;
struct usb_endpoint_descriptor *epin_desc; struct usb_endpoint_descriptor *epin_desc;
struct usb_endpoint_descriptor *epin_fback_desc; struct usb_endpoint_descriptor *epin_fback_desc;
...@@ -730,6 +740,7 @@ static void setup_headers(struct f_uac2_opts *opts, ...@@ -730,6 +740,7 @@ static void setup_headers(struct f_uac2_opts *opts,
epout_desc_comp = &ss_epout_desc_comp; epout_desc_comp = &ss_epout_desc_comp;
epin_desc_comp = &ss_epin_desc_comp; epin_desc_comp = &ss_epin_desc_comp;
epin_fback_desc = &ss_epin_fback_desc; epin_fback_desc = &ss_epin_fback_desc;
epin_fback_desc_comp = &ss_epin_fback_desc_comp;
ep_int_desc = &ss_ep_int_desc; ep_int_desc = &ss_ep_int_desc;
} }
...@@ -773,8 +784,11 @@ static void setup_headers(struct f_uac2_opts *opts, ...@@ -773,8 +784,11 @@ static void setup_headers(struct f_uac2_opts *opts,
headers[i++] = USBDHDR(&as_iso_out_desc); headers[i++] = USBDHDR(&as_iso_out_desc);
if (EPOUT_FBACK_IN_EN(opts)) if (EPOUT_FBACK_IN_EN(opts)) {
headers[i++] = USBDHDR(epin_fback_desc); headers[i++] = USBDHDR(epin_fback_desc);
if (epin_fback_desc_comp)
headers[i++] = USBDHDR(epin_fback_desc_comp);
}
} }
if (EPIN_EN(opts)) { if (EPIN_EN(opts)) {
...@@ -1164,6 +1178,9 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) ...@@ -1164,6 +1178,9 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
agdev->out_ep_maxpsize = max_t(u16, agdev->out_ep_maxpsize, agdev->out_ep_maxpsize = max_t(u16, agdev->out_ep_maxpsize,
le16_to_cpu(ss_epout_desc.wMaxPacketSize)); le16_to_cpu(ss_epout_desc.wMaxPacketSize));
ss_epin_desc_comp.wBytesPerInterval = ss_epin_desc.wMaxPacketSize;
ss_epout_desc_comp.wBytesPerInterval = ss_epout_desc.wMaxPacketSize;
// HS and SS endpoint addresses are copied from autoconfigured FS descriptors // HS and SS endpoint addresses are copied from autoconfigured FS descriptors
hs_ep_int_desc.bEndpointAddress = fs_ep_int_desc.bEndpointAddress; hs_ep_int_desc.bEndpointAddress = fs_ep_int_desc.bEndpointAddress;
hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress; hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress;
......
...@@ -96,11 +96,13 @@ static const struct snd_pcm_hardware uac_pcm_hardware = { ...@@ -96,11 +96,13 @@ static const struct snd_pcm_hardware uac_pcm_hardware = {
}; };
static void u_audio_set_fback_frequency(enum usb_device_speed speed, static void u_audio_set_fback_frequency(enum usb_device_speed speed,
struct usb_ep *out_ep,
unsigned long long freq, unsigned long long freq,
unsigned int pitch, unsigned int pitch,
void *buf) void *buf)
{ {
u32 ff = 0; u32 ff = 0;
const struct usb_endpoint_descriptor *ep_desc;
/* /*
* Because the pitch base is 1000000, the final divider here * Because the pitch base is 1000000, the final divider here
...@@ -128,8 +130,13 @@ static void u_audio_set_fback_frequency(enum usb_device_speed speed, ...@@ -128,8 +130,13 @@ static void u_audio_set_fback_frequency(enum usb_device_speed speed,
* byte fromat (that is Q16.16) * byte fromat (that is Q16.16)
* *
* ff = (freq << 16) / 8000 * ff = (freq << 16) / 8000
*
* Win10 and OSX UAC2 drivers require number of samples per packet
* in order to honor the feedback value.
* Linux snd-usb-audio detects the applied bit-shift automatically.
*/ */
freq <<= 4; ep_desc = out_ep->desc;
freq <<= 4 + (ep_desc->bInterval - 1);
} }
ff = DIV_ROUND_CLOSEST_ULL((freq * pitch), 1953125); ff = DIV_ROUND_CLOSEST_ULL((freq * pitch), 1953125);
...@@ -267,7 +274,7 @@ static void u_audio_iso_fback_complete(struct usb_ep *ep, ...@@ -267,7 +274,7 @@ static void u_audio_iso_fback_complete(struct usb_ep *ep,
pr_debug("%s: iso_complete status(%d) %d/%d\n", pr_debug("%s: iso_complete status(%d) %d/%d\n",
__func__, status, req->actual, req->length); __func__, status, req->actual, req->length);
u_audio_set_fback_frequency(audio_dev->gadget->speed, u_audio_set_fback_frequency(audio_dev->gadget->speed, audio_dev->out_ep,
params->c_srate, prm->pitch, params->c_srate, prm->pitch,
req->buf); req->buf);
...@@ -526,7 +533,7 @@ int u_audio_start_capture(struct g_audio *audio_dev) ...@@ -526,7 +533,7 @@ int u_audio_start_capture(struct g_audio *audio_dev)
* be meauserd at start of playback * be meauserd at start of playback
*/ */
prm->pitch = 1000000; prm->pitch = 1000000;
u_audio_set_fback_frequency(audio_dev->gadget->speed, u_audio_set_fback_frequency(audio_dev->gadget->speed, ep,
params->c_srate, prm->pitch, params->c_srate, prm->pitch,
req_fback->buf); req_fback->buf);
......
...@@ -1250,7 +1250,7 @@ static void set_feature(struct r8a66597 *r8a66597, struct usb_ctrlrequest *ctrl) ...@@ -1250,7 +1250,7 @@ static void set_feature(struct r8a66597 *r8a66597, struct usb_ctrlrequest *ctrl)
do { do {
tmp = r8a66597_read(r8a66597, INTSTS0) & CTSQ; tmp = r8a66597_read(r8a66597, INTSTS0) & CTSQ;
udelay(1); udelay(1);
} while (tmp != CS_IDST || timeout-- > 0); } while (tmp != CS_IDST && timeout-- > 0);
if (tmp == CS_IDST) if (tmp == CS_IDST)
r8a66597_bset(r8a66597, r8a66597_bset(r8a66597,
......
...@@ -406,12 +406,9 @@ static int bcma_hcd_probe(struct bcma_device *core) ...@@ -406,12 +406,9 @@ static int bcma_hcd_probe(struct bcma_device *core)
return -ENOMEM; return -ENOMEM;
usb_dev->core = core; usb_dev->core = core;
if (core->dev.of_node) { if (core->dev.of_node)
usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc", usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
GPIOD_OUT_HIGH); GPIOD_OUT_HIGH);
if (IS_ERR(usb_dev->gpio_desc))
return PTR_ERR(usb_dev->gpio_desc);
}
switch (core->id.id) { switch (core->id.id) {
case BCMA_CORE_USB20_HOST: case BCMA_CORE_USB20_HOST:
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
...@@ -1278,29 +1279,39 @@ MODULE_LICENSE ("GPL"); ...@@ -1278,29 +1279,39 @@ MODULE_LICENSE ("GPL");
#ifdef CONFIG_USB_EHCI_SH #ifdef CONFIG_USB_EHCI_SH
#include "ehci-sh.c" #include "ehci-sh.c"
#define PLATFORM_DRIVER ehci_hcd_sh_driver
#endif #endif
#ifdef CONFIG_PPC_PS3 #ifdef CONFIG_PPC_PS3
#include "ehci-ps3.c" #include "ehci-ps3.c"
#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver
#endif #endif
#ifdef CONFIG_USB_EHCI_HCD_PPC_OF #ifdef CONFIG_USB_EHCI_HCD_PPC_OF
#include "ehci-ppc-of.c" #include "ehci-ppc-of.c"
#define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver
#endif #endif
#ifdef CONFIG_XPS_USB_HCD_XILINX #ifdef CONFIG_XPS_USB_HCD_XILINX
#include "ehci-xilinx-of.c" #include "ehci-xilinx-of.c"
#define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver
#endif #endif
#ifdef CONFIG_SPARC_LEON #ifdef CONFIG_SPARC_LEON
#include "ehci-grlib.c" #include "ehci-grlib.c"
#define PLATFORM_DRIVER ehci_grlib_driver
#endif #endif
static struct platform_driver * const platform_drivers[] = {
#ifdef CONFIG_USB_EHCI_SH
&ehci_hcd_sh_driver,
#endif
#ifdef CONFIG_USB_EHCI_HCD_PPC_OF
&ehci_hcd_ppc_of_driver,
#endif
#ifdef CONFIG_XPS_USB_HCD_XILINX
&ehci_hcd_xilinx_of_driver,
#endif
#ifdef CONFIG_SPARC_LEON
&ehci_grlib_driver,
#endif
};
static int __init ehci_hcd_init(void) static int __init ehci_hcd_init(void)
{ {
int retval = 0; int retval = 0;
...@@ -1324,47 +1335,23 @@ static int __init ehci_hcd_init(void) ...@@ -1324,47 +1335,23 @@ static int __init ehci_hcd_init(void)
ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root);
#endif #endif
#ifdef PLATFORM_DRIVER retval = platform_register_drivers(platform_drivers, ARRAY_SIZE(platform_drivers));
retval = platform_driver_register(&PLATFORM_DRIVER);
if (retval < 0) if (retval < 0)
goto clean0; goto clean0;
#endif
#ifdef PS3_SYSTEM_BUS_DRIVER
retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER);
if (retval < 0)
goto clean2;
#endif
#ifdef OF_PLATFORM_DRIVER #ifdef CONFIG_PPC_PS3
retval = platform_driver_register(&OF_PLATFORM_DRIVER); retval = ps3_ehci_driver_register(&ps3_ehci_driver);
if (retval < 0) if (retval < 0)
goto clean3; goto clean1;
#endif #endif
#ifdef XILINX_OF_PLATFORM_DRIVER return 0;
retval = platform_driver_register(&XILINX_OF_PLATFORM_DRIVER);
if (retval < 0)
goto clean4;
#endif
return retval;
#ifdef XILINX_OF_PLATFORM_DRIVER #ifdef CONFIG_PPC_PS3
/* platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); */ clean1:
clean4:
#endif
#ifdef OF_PLATFORM_DRIVER
platform_driver_unregister(&OF_PLATFORM_DRIVER);
clean3:
#endif
#ifdef PS3_SYSTEM_BUS_DRIVER
ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
clean2:
#endif #endif
#ifdef PLATFORM_DRIVER platform_unregister_drivers(platform_drivers, ARRAY_SIZE(platform_drivers));
platform_driver_unregister(&PLATFORM_DRIVER);
clean0: clean0:
#endif
#ifdef CONFIG_DYNAMIC_DEBUG #ifdef CONFIG_DYNAMIC_DEBUG
debugfs_remove(ehci_debug_root); debugfs_remove(ehci_debug_root);
ehci_debug_root = NULL; ehci_debug_root = NULL;
...@@ -1376,18 +1363,10 @@ module_init(ehci_hcd_init); ...@@ -1376,18 +1363,10 @@ module_init(ehci_hcd_init);
static void __exit ehci_hcd_cleanup(void) static void __exit ehci_hcd_cleanup(void)
{ {
#ifdef XILINX_OF_PLATFORM_DRIVER #ifdef CONFIG_PPC_PS3
platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); ps3_ehci_driver_unregister(&ps3_ehci_driver);
#endif
#ifdef OF_PLATFORM_DRIVER
platform_driver_unregister(&OF_PLATFORM_DRIVER);
#endif
#ifdef PLATFORM_DRIVER
platform_driver_unregister(&PLATFORM_DRIVER);
#endif
#ifdef PS3_SYSTEM_BUS_DRIVER
ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
#endif #endif
platform_unregister_drivers(platform_drivers, ARRAY_SIZE(platform_drivers));
#ifdef CONFIG_DYNAMIC_DEBUG #ifdef CONFIG_DYNAMIC_DEBUG
debugfs_remove(ehci_debug_root); debugfs_remove(ehci_debug_root);
#endif #endif
......
...@@ -692,6 +692,7 @@ int xhci_run(struct usb_hcd *hcd) ...@@ -692,6 +692,7 @@ int xhci_run(struct usb_hcd *hcd)
if (ret) if (ret)
xhci_free_command(xhci, command); xhci_free_command(xhci, command);
} }
set_bit(HCD_FLAG_DEFER_RH_REGISTER, &hcd->flags);
xhci_dbg_trace(xhci, trace_xhci_dbg_init, xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Finished xhci_run for USB2 roothub"); "Finished xhci_run for USB2 roothub");
......
...@@ -190,6 +190,7 @@ tusb_fifo_write_unaligned(void __iomem *fifo, const u8 *buf, u16 len) ...@@ -190,6 +190,7 @@ tusb_fifo_write_unaligned(void __iomem *fifo, const u8 *buf, u16 len)
} }
if (len > 0) { if (len > 0) {
/* Write the rest 1 - 3 bytes to FIFO */ /* Write the rest 1 - 3 bytes to FIFO */
val = 0;
memcpy(&val, buf, len); memcpy(&val, buf, len);
musb_writel(fifo, 0, val); musb_writel(fifo, 0, val);
} }
......
...@@ -233,6 +233,7 @@ static const struct usb_device_id id_table[] = { ...@@ -233,6 +233,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */
{ USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */
{ USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */
{ USB_DEVICE(0x2184, 0x0030) }, /* GW Instek GDM-834x Digital Multimeter */
{ USB_DEVICE(0x2626, 0xEA60) }, /* Aruba Networks 7xxx USB Serial Console */ { USB_DEVICE(0x2626, 0xEA60) }, /* Aruba Networks 7xxx USB Serial Console */
{ USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
{ USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */
...@@ -258,6 +259,7 @@ struct cp210x_serial_private { ...@@ -258,6 +259,7 @@ struct cp210x_serial_private {
speed_t max_speed; speed_t max_speed;
bool use_actual_rate; bool use_actual_rate;
bool no_flow_control; bool no_flow_control;
bool no_event_mode;
}; };
enum cp210x_event_state { enum cp210x_event_state {
...@@ -1113,12 +1115,16 @@ static void cp210x_change_speed(struct tty_struct *tty, ...@@ -1113,12 +1115,16 @@ static void cp210x_change_speed(struct tty_struct *tty,
static void cp210x_enable_event_mode(struct usb_serial_port *port) static void cp210x_enable_event_mode(struct usb_serial_port *port)
{ {
struct cp210x_serial_private *priv = usb_get_serial_data(port->serial);
struct cp210x_port_private *port_priv = usb_get_serial_port_data(port); struct cp210x_port_private *port_priv = usb_get_serial_port_data(port);
int ret; int ret;
if (port_priv->event_mode) if (port_priv->event_mode)
return; return;
if (priv->no_event_mode)
return;
port_priv->event_state = ES_DATA; port_priv->event_state = ES_DATA;
port_priv->event_mode = true; port_priv->event_mode = true;
...@@ -2074,6 +2080,33 @@ static void cp210x_init_max_speed(struct usb_serial *serial) ...@@ -2074,6 +2080,33 @@ static void cp210x_init_max_speed(struct usb_serial *serial)
priv->use_actual_rate = use_actual_rate; priv->use_actual_rate = use_actual_rate;
} }
static void cp2102_determine_quirks(struct usb_serial *serial)
{
struct cp210x_serial_private *priv = usb_get_serial_data(serial);
u8 *buf;
int ret;
buf = kmalloc(2, GFP_KERNEL);
if (!buf)
return;
/*
* Some (possibly counterfeit) CP2102 do not support event-insertion
* mode and respond differently to malformed vendor requests.
* Specifically, they return one instead of two bytes when sent a
* two-byte part-number request.
*/
ret = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
CP210X_VENDOR_SPECIFIC, REQTYPE_DEVICE_TO_HOST,
CP210X_GET_PARTNUM, 0, buf, 2, USB_CTRL_GET_TIMEOUT);
if (ret == 1) {
dev_dbg(&serial->interface->dev,
"device does not support event-insertion mode\n");
priv->no_event_mode = true;
}
kfree(buf);
}
static int cp210x_get_fw_version(struct usb_serial *serial, u16 value) static int cp210x_get_fw_version(struct usb_serial *serial, u16 value)
{ {
struct cp210x_serial_private *priv = usb_get_serial_data(serial); struct cp210x_serial_private *priv = usb_get_serial_data(serial);
...@@ -2108,7 +2141,12 @@ static void cp210x_determine_type(struct usb_serial *serial) ...@@ -2108,7 +2141,12 @@ static void cp210x_determine_type(struct usb_serial *serial)
return; return;
} }
dev_dbg(&serial->interface->dev, "partnum = 0x%02x\n", priv->partnum);
switch (priv->partnum) { switch (priv->partnum) {
case CP210X_PARTNUM_CP2102:
cp2102_determine_quirks(serial);
break;
case CP210X_PARTNUM_CP2105: case CP210X_PARTNUM_CP2105:
case CP210X_PARTNUM_CP2108: case CP210X_PARTNUM_CP2108:
cp210x_get_fw_version(serial, CP210X_GET_FW_VER); cp210x_get_fw_version(serial, CP210X_GET_FW_VER);
......
...@@ -107,7 +107,6 @@ ...@@ -107,7 +107,6 @@
#define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02 #define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02
#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 #define BANDB_DEVICE_ID_USOPTL4_4 0xAC44
#define BANDB_DEVICE_ID_USOPTL4_4P 0xBC03 #define BANDB_DEVICE_ID_USOPTL4_4P 0xBC03
#define BANDB_DEVICE_ID_USOPTL2_4 0xAC24
/* Interrupt Routine Defines */ /* Interrupt Routine Defines */
...@@ -186,7 +185,6 @@ static const struct usb_device_id id_table[] = { ...@@ -186,7 +185,6 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P) }, { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P) },
{ USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4) }, { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4) },
{ USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P) }, { USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P) },
{ USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4) },
{} /* terminating entry */ {} /* terminating entry */
}; };
MODULE_DEVICE_TABLE(usb, id_table); MODULE_DEVICE_TABLE(usb, id_table);
......
...@@ -1205,6 +1205,14 @@ static const struct usb_device_id option_ids[] = { ...@@ -1205,6 +1205,14 @@ static const struct usb_device_id option_ids[] = {
.driver_info = NCTRL(0) | RSVD(1) }, .driver_info = NCTRL(0) | RSVD(1) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */
.driver_info = NCTRL(2) | RSVD(3) }, .driver_info = NCTRL(2) | RSVD(3) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */
.driver_info = NCTRL(0) | RSVD(1) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1062, 0xff), /* Telit LN920 (RNDIS) */
.driver_info = NCTRL(2) | RSVD(3) },
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */
.driver_info = NCTRL(0) | RSVD(1) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
...@@ -1650,7 +1658,6 @@ static const struct usb_device_id option_ids[] = { ...@@ -1650,7 +1658,6 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff), { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff),
.driver_info = RSVD(1) }, .driver_info = RSVD(1) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff), { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff),
...@@ -2068,6 +2075,8 @@ static const struct usb_device_id option_ids[] = { ...@@ -2068,6 +2075,8 @@ static const struct usb_device_id option_ids[] = {
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
{ USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */
.driver_info = RSVD(3) },
{ USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
.driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, .driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
{ USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
......
...@@ -416,9 +416,16 @@ UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, ...@@ -416,9 +416,16 @@ UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210,
USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN),
/* /*
* Reported by Ondrej Zary <linux@rainbow-software.org> * Reported by Ondrej Zary <linux@zary.sk>
* The device reports one sector more and breaks when that sector is accessed * The device reports one sector more and breaks when that sector is accessed
* Firmwares older than 2.6c (the latest one and the only that claims Linux
* support) have also broken tag handling
*/ */
UNUSUAL_DEV( 0x04ce, 0x0002, 0x0000, 0x026b,
"ScanLogic",
"SL11R-IDE",
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG),
UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c,
"ScanLogic", "ScanLogic",
"SL11R-IDE", "SL11R-IDE",
......
...@@ -50,7 +50,7 @@ UNUSUAL_DEV(0x059f, 0x1061, 0x0000, 0x9999, ...@@ -50,7 +50,7 @@ UNUSUAL_DEV(0x059f, 0x1061, 0x0000, 0x9999,
"LaCie", "LaCie",
"Rugged USB3-FW", "Rugged USB3-FW",
USB_SC_DEVICE, USB_PR_DEVICE, NULL, USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_IGNORE_UAS), US_FL_NO_REPORT_OPCODES | US_FL_NO_SAME),
/* /*
* Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI
......
...@@ -124,6 +124,7 @@ struct usb_hcd { ...@@ -124,6 +124,7 @@ struct usb_hcd {
#define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */ #define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */
#define HCD_FLAG_DEAD 6 /* controller has died? */ #define HCD_FLAG_DEAD 6 /* controller has died? */
#define HCD_FLAG_INTF_AUTHORIZED 7 /* authorize interfaces? */ #define HCD_FLAG_INTF_AUTHORIZED 7 /* authorize interfaces? */
#define HCD_FLAG_DEFER_RH_REGISTER 8 /* Defer roothub registration */
/* The flags can be tested using these macros; they are likely to /* The flags can be tested using these macros; they are likely to
* be slightly faster than test_bit(). * be slightly faster than test_bit().
...@@ -134,6 +135,7 @@ struct usb_hcd { ...@@ -134,6 +135,7 @@ struct usb_hcd {
#define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))
#define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING)) #define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))
#define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) #define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD))
#define HCD_DEFER_RH_REGISTER(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEFER_RH_REGISTER))
/* /*
* Specifies if interfaces are authorized by default * Specifies if interfaces are authorized by default
......
...@@ -265,12 +265,6 @@ static int find_testdev(const char *name, const struct stat *sb, int flag) ...@@ -265,12 +265,6 @@ static int find_testdev(const char *name, const struct stat *sb, int flag)
} }
entry->ifnum = ifnum; entry->ifnum = ifnum;
/* FIXME update USBDEVFS_CONNECTINFO so it tells about high speed etc */
fprintf(stderr, "%s speed\t%s\t%u\n",
speed(entry->speed), entry->name, entry->ifnum);
entry->next = testdevs; entry->next = testdevs;
testdevs = entry; testdevs = entry;
return 0; return 0;
...@@ -299,6 +293,14 @@ static void *handle_testdev (void *arg) ...@@ -299,6 +293,14 @@ static void *handle_testdev (void *arg)
return 0; return 0;
} }
status = ioctl(fd, USBDEVFS_GET_SPEED, NULL);
if (status < 0)
fprintf(stderr, "USBDEVFS_GET_SPEED failed %d\n", status);
else
dev->speed = status;
fprintf(stderr, "%s speed\t%s\t%u\n",
speed(dev->speed), dev->name, dev->ifnum);
restart: restart:
for (i = 0; i < TEST_CASES; i++) { for (i = 0; i < TEST_CASES; i++) {
if (dev->test != -1 && dev->test != i) if (dev->test != -1 && dev->test != i)
......
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