Re: Not enough resource for old configuration after USB bus reset
2013/2/4 Soar Hung soarh...@realtek.com: Hi Alan, Sarah, Thank you for your kindly help. Can I do something to provide some help? You found the issue on the 3.0.30+ kernel. Can you test it on the usb-next branch of usb tree? Sarah has fixed a lot of bugs since v3.0. Best regards, Soar -Original Message- From: Alan Stern [mailto:st...@rowland.harvard.edu] Sent: Friday, February 01, 2013 11:36 PM To: Soar Hung Cc: Sarah Sharp; linux-usb@vger.kernel.org Subject: RE: Not enough resource for old configuration after USB bus reset On Fri, 1 Feb 2013, [big5] x R wrote: Hi, According to xHCI spec Rev1 page 125, Endpoint context state diagram. When reset device, the endpoint state transit to disabled state. Do I make some mistake? I'll try to figure out the endopint state transitions during the reset flow, and update information later. Thanks for the direction. Ah, now I understand the problem. The device reset automatically disables the endpoints, so when usb_reset_and_verify_device calls usb_hcd_alloc_bandwidth, and that routine tries to drop the endpoints, it fails because the endpoints are already disabled. Sarah is going to to have to figure out the right way to fix this. She's the maintainer for xhci-hcd. Alan Stern -- Best regards Tianyu Lan -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: Not enough resource for old configuration after USB bus reset
Hi Tianyu, I can produce the issue on the Ubuntu 12.10 (linux 3.5), too. However, could you tell me more detail about what to do or give me some hint for google? Do you mean replacing the usb related source with source from 'usb next', rebuild the kernel, and test again? Best regards, Soar -Original Message- From: Lan Tianyu [mailto:lantianyu1...@gmail.com] Sent: Thursday, February 07, 2013 4:18 PM To: Soar Hung Cc: Alan Stern; Sarah Sharp; linux-usb@vger.kernel.org Subject: Re: Not enough resource for old configuration after USB bus reset 2013/2/4 Soar Hung soarh...@realtek.com: Hi Alan, Sarah, Thank you for your kindly help. Can I do something to provide some help? You found the issue on the 3.0.30+ kernel. Can you test it on the usb-next branch of usb tree? Sarah has fixed a lot of bugs since v3.0. Best regards, Soar -Original Message- From: Alan Stern [mailto:st...@rowland.harvard.edu] Sent: Friday, February 01, 2013 11:36 PM To: Soar Hung Cc: Sarah Sharp; linux-usb@vger.kernel.org Subject: RE: Not enough resource for old configuration after USB bus reset On Fri, 1 Feb 2013, [big5] x R wrote: Hi, According to xHCI spec Rev1 page 125, Endpoint context state diagram. When reset device, the endpoint state transit to disabled state. Do I make some mistake? I'll try to figure out the endopint state transitions during the reset flow, and update information later. Thanks for the direction. Ah, now I understand the problem. The device reset automatically disables the endpoints, so when usb_reset_and_verify_device calls usb_hcd_alloc_bandwidth, and that routine tries to drop the endpoints, it fails because the endpoints are already disabled. Sarah is going to to have to figure out the right way to fix this. She's the maintainer for xhci-hcd. Alan Stern -- Best regards Tianyu Lan --Please consider the environment before printing this e-mail. N�妓緶r��y���匒淅炮カv傂�)瑎{.n�+�極�{捱〇�傂n�r←屹��螐�刻俾p埂��嶭�(剝���摃j���m翯z嫡��僠fㄑ搬��坍�m�
Re: MUSB regression in linux next at least for pandboard
On 02/06/2013 05:43 PM, Alan Stern wrote: On Wed, 6 Feb 2013, Felipe Balbi wrote: I can't reproduce the problem on Panda, but I can on Beagle with a slightly different behaviour. 1) connecting/disconnecting device directly to the beagleboard's USB port works fine. 2) If I connect a USB Hub to the port and connect a device to it after the hub has autosuspended, the device is never detected. doing lsusb after that triggers the detection and produces a lot of transaction errors. Beagle log is below, before and after 'lsusb' I suppose this doesn't affect Panda because it has a hub connected immediately below the root hub that never suspends (as ethernet is hardwired to it). Roger, try changing hub's autosuspend delay to something greater than 30ms and see if it helps. There was a discussion lately about that. There also were some patches to address this problem recently merged by Greg KH (they are in Linus's current git, added after 3.8-rc6 was released): da0aa7169b97d90f4af39a9dc84d58bbe19d7e78 USB: add usb_hcd_{start,end}_port_resume f292e7f9fb0e4bec68bbd83443407d6bb7922d36 USB: EHCI: notify usbcore about port resumes ee74290b7853db9d5fd64db70e5c175241c59fba USB: EHCI: fix timer bug affecting port resume Alan, thanks for the hints. It seems the beagleboard problem is related to OMAP silicon errata [1]. Apparently, remote wakeup as well as host issued wakeup break omap-ehci and have nothing to do with the hub or it's driver. I'll work on this issue after I'm done with device tree migration. cheers, -roger [1] - Advisory 3.1.1.157 EHCI Controller- Issue in Suspend Resume Protocol http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprz278ffileType=pdf -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4] USB: add devicetree helpers for determining dr_mode and phy_type
Alexander, Did you have a chance to look at this series? Development of this driver has stalled for too long now, I don't want to miss the next merge window. Thanks Sascha On Mon, Feb 04, 2013 at 02:24:26PM +0100, Sascha Hauer wrote: 4th round of patches. Peter, I would be glad if you could test them before your holiday. I rebased your last round of Chipidea OTG patches onto this series which you can pull here: git://git.pengutronix.de/git/imx/linux-2.6.git tags/usb-chipidea-otg-for-next I couldn't really test the otg patches since my current hardware does not have the ID pin connected, but I can verify that my usecase still works with your patches applied. Alex, should the patches work for you and are fine otherwise, could you apply them for v3.9? Sascha changes since v3: - add phy patches (which were accidently already part of v2) - Use OP_DEVLC instead of OP_PORTSC for lpm case - Use enum usb_dr_mode ub ci_hdrc_probe() changes since v2: - fix adding of GPL Header was in wrong patch - add missing hunk for new file of.c changes since v1: - move phy specific of helper to drivers/usb/phy/of.c - use strcmp instead of strcasecmp for matching property values - change usb_phy_dr_mode to usb_dr_mode - change USBPHY_INTERFACE_MODE_NA to USBPHY_INTERFACE_MODE_UNKNOWN - add copyright header to new files - chipidea: drop mdelay at end of PTS/PTW setup - chipidea: implement lpm core type handling for PTS/PTW The following changes since commit 2f0760774711c957c395b31131b848043af98edf: USB: GADGET: optionally force full-speed for net2280 UDC (2013-01-31 10:09:19 +0100) are available in the git repository at: git://git.pengutronix.de/git/imx/linux-2.6.git tags/usb-chipidea-for-next for you to fetch changes up to 25682afd7be85f1462647d8530dca1bf848074fc: USB chipidea i.MX: use devm_usb_get_phy_by_phandle to get phy (2013-02-04 12:28:53 +0100) USB: chipidea patches for v3.9 These add OF helpers for handling the dr_mode and phy_type property and makes use of them in the chipidea driver. Marc Kleine-Budde (1): usb: otg: use try_module_get in all usb_get_phy functions and add missing module_put Michael Grzeschik (3): USB: add devicetree helpers for determining dr_mode and phy_type USB: chipidea: ci13xxx-imx: create dynamic platformdata USB: chipidea: add PTW and PTS handling Sascha Hauer (5): USB: move bulk of otg/otg.c to phy/phy.c USB chipidea: introduce dual role mode pdata flags USB chipidea i.MX: introduce dr_mode property USB mxs-phy: Register phy with framework USB chipidea i.MX: use devm_usb_get_phy_by_phandle to get phy .../devicetree/bindings/usb/ci13xxx-imx.txt|6 + drivers/usb/chipidea/bits.h| 14 +- drivers/usb/chipidea/ci13xxx_imx.c | 68 +-- drivers/usb/chipidea/core.c| 60 ++- drivers/usb/otg/mxs-phy.c |9 + drivers/usb/otg/otg.c | 423 --- drivers/usb/phy/Makefile |2 + drivers/usb/phy/of.c | 47 +++ drivers/usb/phy/phy.c | 438 drivers/usb/usb-common.c | 36 ++ include/linux/usb/chipidea.h |3 +- include/linux/usb/of.h | 27 ++ include/linux/usb/otg.h|7 + include/linux/usb/phy.h|9 + 14 files changed, 687 insertions(+), 462 deletions(-) create mode 100644 drivers/usb/phy/of.c create mode 100644 drivers/usb/phy/phy.c create mode 100644 include/linux/usb/of.h -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] usb: phy: moving all PHY API definitions to usb/phy directory
As drivers/usb/otg/otg.c contains most of the PHY related APIs which are not OTG specific, moving them to more logical place under drivers/usb/phy. Signed-off-by: Venu Byravarasu vbyravar...@nvidia.com --- delta from v2: renamed usb_phy.c to phy.c. delta from v1: Missed adding newly created file usb_phy.c with previous patch. hence sending v2, after adding that. drivers/usb/otg/otg.c| 422 drivers/usb/phy/Makefile |1 + drivers/usb/{otg/otg.c = phy/phy.c} | 907 -- 3 files changed, 438 insertions(+), 892 deletions(-) copy drivers/usb/{otg/otg.c = phy/phy.c} (92%) diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index e181439..a5357e9 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c @@ -9,431 +9,9 @@ * (at your option) any later version. */ -#include linux/kernel.h #include linux/export.h -#include linux/err.h -#include linux/device.h -#include linux/module.h -#include linux/slab.h -#include linux/of.h - #include linux/usb/otg.h -static LIST_HEAD(phy_list); -static LIST_HEAD(phy_bind_list); -static DEFINE_SPINLOCK(phy_lock); - -static struct usb_phy *__usb_find_phy(struct list_head *list, - enum usb_phy_type type) -{ - struct usb_phy *phy = NULL; - - list_for_each_entry(phy, list, head) { - if (phy-type != type) - continue; - - return phy; - } - - return ERR_PTR(-ENODEV); -} - -static struct usb_phy *__usb_find_phy_dev(struct device *dev, - struct list_head *list, u8 index) -{ - struct usb_phy_bind *phy_bind = NULL; - - list_for_each_entry(phy_bind, list, list) { - if (!(strcmp(phy_bind-dev_name, dev_name(dev))) - phy_bind-index == index) { - if (phy_bind-phy) - return phy_bind-phy; - else - return ERR_PTR(-EPROBE_DEFER); - } - } - - return ERR_PTR(-ENODEV); -} - -static struct usb_phy *__of_usb_find_phy(struct device_node *node) -{ - struct usb_phy *phy; - - list_for_each_entry(phy, phy_list, head) { - if (node != phy-dev-of_node) - continue; - - return phy; - } - - return ERR_PTR(-ENODEV); -} - -static void devm_usb_phy_release(struct device *dev, void *res) -{ - struct usb_phy *phy = *(struct usb_phy **)res; - - usb_put_phy(phy); -} - -static int devm_usb_phy_match(struct device *dev, void *res, void *match_data) -{ - return res == match_data; -} - -/** - * devm_usb_get_phy - find the USB PHY - * @dev - device that requests this phy - * @type - the type of the phy the controller requires - * - * Gets the phy using usb_get_phy(), and associates a device with it using - * devres. On driver detach, release function is invoked on the devres data, - * then, devres data is freed. - * - * For use by USB host and peripheral drivers. - */ -struct usb_phy *devm_usb_get_phy(struct device *dev, enum usb_phy_type type) -{ - struct usb_phy **ptr, *phy; - - ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL); - if (!ptr) - return NULL; - - phy = usb_get_phy(type); - if (!IS_ERR(phy)) { - *ptr = phy; - devres_add(dev, ptr); - } else - devres_free(ptr); - - return phy; -} -EXPORT_SYMBOL(devm_usb_get_phy); - -/** - * usb_get_phy - find the USB PHY - * @type - the type of the phy the controller requires - * - * Returns the phy driver, after getting a refcount to it; or - * -ENODEV if there is no such phy. The caller is responsible for - * calling usb_put_phy() to release that count. - * - * For use by USB host and peripheral drivers. - */ -struct usb_phy *usb_get_phy(enum usb_phy_type type) -{ - struct usb_phy *phy = NULL; - unsigned long flags; - - spin_lock_irqsave(phy_lock, flags); - - phy = __usb_find_phy(phy_list, type); - if (IS_ERR(phy)) { - pr_err(unable to find transceiver of type %s\n, - usb_phy_type_string(type)); - goto err0; - } - - get_device(phy-dev); - -err0: - spin_unlock_irqrestore(phy_lock, flags); - - return phy; -} -EXPORT_SYMBOL(usb_get_phy); - - /** - * devm_usb_get_phy_by_phandle - find the USB PHY by phandle - * @dev - device that requests this phy - * @phandle - name of the property holding the phy phandle value - * @index - the index of the phy - * - * Returns the phy driver associated with the given phandle value, - * after getting a refcount to it, -ENODEV if there is no such phy or - * -EPROBE_DEFER if there is a phandle to the phy, but the device is - * not yet loaded. While at that, it also associates the device with - * the phy using devres. On driver detach, release function is invoked - *
Re: [PATCH 1/1]linux-usb: fix the idProduct value to be compatible with current CPU in initializers.c
Hello. On 07-02-2013 11:32, fangxiaozhi 00110321 wrote: From: fangxiaozhi huana...@huawei.com 1. The idProduct is little endian, so make sure its value to be compatible with the current CPU. Make no break on big endian processors. Wrap your lines reasonable at 80 columns at last (better somewht less). And why 1. here? Where is 2.? Signed-off-by: fangxiaozhi huana...@huawei.com Either use --- tearline, or no tearline at all. WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] usb: phy: moving all PHY API definitions to usb/phy directory
Hi, On Thursday 07 February 2013 05:02 PM, Venu Byravarasu wrote: As drivers/usb/otg/otg.c contains most of the PHY related APIs which are not OTG specific, moving them to more logical place under drivers/usb/phy. Signed-off-by: Venu Byravarasu vbyravar...@nvidia.com --- delta from v2: renamed usb_phy.c to phy.c. delta from v1: Missed adding newly created file usb_phy.c with previous patch. hence sending v2, after adding that. drivers/usb/otg/otg.c| 422 drivers/usb/phy/Makefile |1 + drivers/usb/{otg/otg.c = phy/phy.c} | 907 -- 3 files changed, 438 insertions(+), 892 deletions(-) copy drivers/usb/{otg/otg.c = phy/phy.c} (92%) diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index e181439..a5357e9 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c @@ -9,431 +9,9 @@ * (at your option) any later version. */ -#include linux/kernel.h #include linux/export.h -#include linux/err.h -#include linux/device.h -#include linux/module.h -#include linux/slab.h -#include linux/of.h - #include linux/usb/otg.h -static LIST_HEAD(phy_list); -static LIST_HEAD(phy_bind_list); -static DEFINE_SPINLOCK(phy_lock); - -static struct usb_phy *__usb_find_phy(struct list_head *list, - enum usb_phy_type type) -{ - struct usb_phy *phy = NULL; - - list_for_each_entry(phy, list, head) { - if (phy-type != type) - continue; - - return phy; - } - - return ERR_PTR(-ENODEV); -} - -static struct usb_phy *__usb_find_phy_dev(struct device *dev, - struct list_head *list, u8 index) -{ - struct usb_phy_bind *phy_bind = NULL; - - list_for_each_entry(phy_bind, list, list) { - if (!(strcmp(phy_bind-dev_name, dev_name(dev))) - phy_bind-index == index) { - if (phy_bind-phy) - return phy_bind-phy; - else - return ERR_PTR(-EPROBE_DEFER); - } - } - - return ERR_PTR(-ENODEV); -} - -static struct usb_phy *__of_usb_find_phy(struct device_node *node) -{ - struct usb_phy *phy; - - list_for_each_entry(phy, phy_list, head) { - if (node != phy-dev-of_node) - continue; - - return phy; - } - - return ERR_PTR(-ENODEV); -} - -static void devm_usb_phy_release(struct device *dev, void *res) -{ - struct usb_phy *phy = *(struct usb_phy **)res; - - usb_put_phy(phy); -} - -static int devm_usb_phy_match(struct device *dev, void *res, void *match_data) -{ - return res == match_data; -} - -/** - * devm_usb_get_phy - find the USB PHY - * @dev - device that requests this phy - * @type - the type of the phy the controller requires - * - * Gets the phy using usb_get_phy(), and associates a device with it using - * devres. On driver detach, release function is invoked on the devres data, - * then, devres data is freed. - * - * For use by USB host and peripheral drivers. - */ -struct usb_phy *devm_usb_get_phy(struct device *dev, enum usb_phy_type type) -{ - struct usb_phy **ptr, *phy; - - ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL); - if (!ptr) - return NULL; - - phy = usb_get_phy(type); - if (!IS_ERR(phy)) { - *ptr = phy; - devres_add(dev, ptr); - } else - devres_free(ptr); - - return phy; -} -EXPORT_SYMBOL(devm_usb_get_phy); - -/** - * usb_get_phy - find the USB PHY - * @type - the type of the phy the controller requires - * - * Returns the phy driver, after getting a refcount to it; or - * -ENODEV if there is no such phy. The caller is responsible for - * calling usb_put_phy() to release that count. - * - * For use by USB host and peripheral drivers. - */ -struct usb_phy *usb_get_phy(enum usb_phy_type type) -{ - struct usb_phy *phy = NULL; - unsigned long flags; - - spin_lock_irqsave(phy_lock, flags); - - phy = __usb_find_phy(phy_list, type); - if (IS_ERR(phy)) { - pr_err(unable to find transceiver of type %s\n, - usb_phy_type_string(type)); - goto err0; - } - - get_device(phy-dev); - -err0: - spin_unlock_irqrestore(phy_lock, flags); - - return phy; -} -EXPORT_SYMBOL(usb_get_phy); - - /** - * devm_usb_get_phy_by_phandle - find the USB PHY by phandle - * @dev - device that requests this phy - * @phandle - name of the property holding the phy phandle value - * @index - the index of the phy - * - * Returns the phy driver associated with the given phandle value, - * after getting a refcount to it, -ENODEV if there is no such phy or - * -EPROBE_DEFER if there is a phandle to the phy, but the device is - * not yet loaded. While at that, it also associates the device with -
[PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
From: Freddy Xin fre...@asix.com.tw This is a resubmission. Added const to ethtool_ops structure and fixed the coding style of AX88179_BULKIN_SIZE array. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an MTU higher than 1500. Fixed indentation and empty line coding style errors. The _nopm version usb functions were added to access register in suspend and resume functions. Serveral variables allocted dynamically were removed and replaced by stack variables. ax88179_get_eeprom were modified from asix_get_eeprom in asix_common. This patch adds a driver for ASIX's AX88179 family of USB 3.0/2.0 to gigabit ethernet adapters. It's based on the AX88xxx driver but the usb commands used to access registers for AX88179 are completely different. This driver had been verified on x86 system with AX88179/AX88178A and Sitcomm LN-032 USB dongles. Signed-off-by: Freddy Xin fre...@asix.com.tw --- drivers/net/usb/Kconfig| 18 + drivers/net/usb/Makefile |1 + drivers/net/usb/ax88179_178a.c | 1399 3 files changed, 1418 insertions(+) create mode 100644 drivers/net/usb/ax88179_178a.c diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index ef97621..75af401 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig @@ -158,6 +158,24 @@ config USB_NET_AX8817X This driver creates an interface named ethX, where X depends on what other networking devices you have in use. +config USB_NET_AX88179_178A + tristate ASIX AX88179/178A USB 3.0/2.0 to Gigabit Ethernet + depends on USB_USBNET + select CRC32 + select PHYLIB + default y + help + This option adds support for ASIX AX88179 based USB 3.0/2.0 + to Gigabit Ethernet adapters. + + This driver should work with at least the following devices: + * ASIX AX88179 + * ASIX AX88178A + * Sitcomm LN-032 + + This driver creates an interface named ethX, where X depends on + what other networking devices you have in use. + config USB_NET_CDCETHER tristate CDC Ethernet support (smart devices such as cable modems) depends on USB_USBNET diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile index 4786913..119b06c 100644 --- a/drivers/net/usb/Makefile +++ b/drivers/net/usb/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_USB_RTL8150) += rtl8150.o obj-$(CONFIG_USB_HSO) += hso.o obj-$(CONFIG_USB_NET_AX8817X) += asix.o asix-y := asix_devices.o asix_common.o ax88172a.o +obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o obj-$(CONFIG_USB_NET_DM9601) += dm9601.o diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c new file mode 100644 index 000..545151a --- /dev/null +++ b/drivers/net/usb/ax88179_178a.c @@ -0,0 +1,1399 @@ +/* + * ASIX AX88179/178A USB 3.0/2.0 to Gigabit Ethernet Devices + * + * Copyright (C) 2011-2013 ASIX + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include linux/module.h +#include linux/etherdevice.h +#include linux/mii.h +#include linux/usb.h +#include linux/crc32.h +#include linux/usb/usbnet.h + +#define AX88179_PHY_ID 0x03 +#define AX_EEPROM_LEN 0x100 +#define AX88179_EEPROM_MAGIC 0x17900b95 +#define AX_MCAST_FLTSIZE 8 +#define AX_MAX_MCAST 64 +#define AX_INT_PPLS_LINK BIT(0) +#define AX_RXHDR_L4_TYPE_UDP 1 +#define AX_RXHDR_L4_TYPE_TCP 4 +#define AX_ACCESS_MAC 0x01 +#define AX_ACCESS_PHY 0x02 +#define AX_ACCESS_EEPROM 0x04 +#define AX_ACCESS_EFUS 0x05 +#define AX_PAUSE_WATERLVL_HIGH 0x54 +#define AX_PAUSE_WATERLVL_LOW 0x55 + +#define PHYSICAL_LINK_STATUS 0x02 + #define AX_USB_SS 0x04 + #define AX_USB_HS 0x02 + +#define GENERAL_STATUS 0x03 +/* Check AX88179
Disconnecting an USB3 device from xhci-port isn't detected properly
Hi After updating from 3.7.2 to 3.7.6 disconnecting a USB3 device from a xhci-port isn't detected properly anymore. After removing a 32GB stick the only line in syslog i can see is: sdc: detected capacity change from 31625052160 to 0 /dev/sdc is still there. Reconnecting the device results in usb 3-1: USB disconnect, device number 2 immediatly followed by the normal slew of new device found messages. I tested the usb-stick on an ehci-port and there is worked normaly. I'm quite sure i read a similar bug-report a little while ago on LKML, is this bug already known and on the way to be fixed (in 3.7.7)? -- Matthias -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
question on valid characters for serial numbers
Hi, I have a question interpreting the specs.The bulk only storage spec clearly states that serial numbers shall contain only 0-9 and A-F. The USB spec says that serial numbers shall be Unicode strings. Is that to be read so that for storage devices requirements are stricter or is that just an omission in the USB spec? Reagrds Oliver -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: MUSB regression in linux next at least for pandboard
On Thu, Feb 7, 2013 at 11:16 AM, Roger Quadros rog...@ti.com wrote: snip It seems the beagleboard problem is related to OMAP silicon errata [1]. Apparently, remote wakeup as well as host issued wakeup break omap-ehci and have nothing to do with the hub or it's driver. I'll work on this issue after I'm done with device tree migration. Looking forward to this, mainline has been suffering from this since almost forever.. -- Gražvydas -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: question on valid characters for serial numbers
On Thu, 7 Feb 2013, Oliver Neukum wrote: Hi, I have a question interpreting the specs.The bulk only storage spec clearly states that serial numbers shall contain only 0-9 and A-F. The USB spec says that serial numbers shall be Unicode strings. Is that to be read so that for storage devices requirements are stricter or is that just an omission in the USB spec? The storage requirements are indeed more strict than the general USB requirements. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: MUSB regression in linux next at least for pandboard
On Wed, 6 Feb 2013, Alan Stern wrote: Is this issue fixed ? Actually we too are getting very similar issue with samsung exynos5250 hardware. With latest 'usb-next' kernel and supporting arch patches, when i use following test scenerio: Connect a USB 2.0 external hub to USB 2.0 port, and connect mice or keyboard enumeration and functionality is fine but once disconnecting the HID we get to see the error log: hid-generic 0003:04B3:3025.0002: can't reset device, s5p-ehci-1.3/input0, status -71 When i tried to enable CONFIG_USB_DEBUG, get the following log: looks like it's not OMAP-specific. Alan any tips ? It could be a problem with the hub the keyboard is plugged into. Or something going on with the hub driver. I'll try doing the same thing on my system. I tried it. This is on an Intel system, not OMAP or anything like that. The result was as expected; there were a few can't reset device error messages but they stopped after a few hundred ms. If they persist for several minutes then something else is wrong. On the other hand, we could change the priority of those log messages. They don't have to be errors or warnings. Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: question on valid characters for serial numbers
On Thursday 07 February 2013 09:54:05 Alan Stern wrote: On Thu, 7 Feb 2013, Oliver Neukum wrote: Hi, I have a question interpreting the specs.The bulk only storage spec clearly states that serial numbers shall contain only 0-9 and A-F. The USB spec says that serial numbers shall be Unicode strings. Is that to be read so that for storage devices requirements are stricter or is that just an omission in the USB spec? The storage requirements are indeed more strict than the general USB requirements. Thank you. It is a bit odd, but we'll have to live with it. Regards Oliver -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Disconnecting an USB3 device from xhci-port isn't detected properly
On Thu, Feb 07, 2013 at 02:42:05PM +0100, Matthias Schniedermeyer wrote: Hi After updating from 3.7.2 to 3.7.6 disconnecting a USB3 device from a xhci-port isn't detected properly anymore. After removing a 32GB stick the only line in syslog i can see is: sdc: detected capacity change from 31625052160 to 0 /dev/sdc is still there. Reconnecting the device results in usb 3-1: USB disconnect, device number 2 immediatly followed by the normal slew of new device found messages. I tested the usb-stick on an ehci-port and there is worked normaly. I'm quite sure i read a similar bug-report a little while ago on LKML, is this bug already known and on the way to be fixed (in 3.7.7)? Possibly, we have a bunch of USB 3 patches queued up for 3.7.7, give me a day or so to get 3.7.7-rc1 out for review, and it would be great if you could test it then to see if it solves the issue for you or not. thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 00/30] USB: omap-ehci: Move PHY management to PHY driver
On 02/06/2013 07:11 PM, Tony Lindgren wrote: * Roger Quadros rog...@ti.com [130206 01:53]: On 02/05/2013 07:17 PM, Tony Lindgren wrote: * Greg KH gre...@linuxfoundation.org [130205 09:00]: On Tue, Feb 05, 2013 at 01:28:51PM +0200, Roger Quadros wrote: Hi Tony Greg, What's the best way to get these patches in? All patches have been acked by respective maintainers. If Tony can Ack the arch/arm/mach-omap2 stuff then should I send a pull request directly to Greg? or the other way round? Tony, fyi, these patches should not interfere with the dw3c/musb stuff sent by Felipe Kishon. I'm fine with Tony just taking them all if he wants to. OK. Roger, can you please do me a pull request with these against v3.8-rc6? Tony, Since this depends on [1] and [2] which are both in linux-next, should I base it on linux-next? Maybe you can base it on some commit in Greg's USB tree? Just check with Greg that whatever you use as a base is an immutable commit and OK to use as a base. Another option is to defer this to 3.10 merge window, along with the DT adaptation for OMAP USB Host. Once you have a branch ready that builds and boots, let's see how badly that conflicts with other branches we have queued up. If it's trivial only, then maybe Greg can pick up the patches. If not, we can still try to merge it in later on during the merge window as it would be nice to get USB to usable point with DT. Great! The DT patches are still under review. I've based the $subject patches on Greg's usb-next branch. Since dependent patches [1] went into linux-next through Samuel's MFD tree and are not in Greg's usb-next, I've added them as well in my branch. Not sure how this goes :P. The $subject patches are since commit a0c750bb8b023ab92e27c670a1c9378d52dd2053: mfd: omap-usb-host: get rid of build warning (2013-02-07 16:37:41 +0200) are available in the git repository at: git://github.com/rogerq/linux.git usb-next-usbhost16 The patches [1] are since commit 9662ced3527f5994e83957cf40765ed126abe97f: usb: gadget: imx_udc: make it depend on BROKEN (2013-02-06 11:43:39 -0800) are available in the git repository at: git://github.com/rogerq/linux.git usb-next-usbhost16-part cheers, -roger [1] [PATCH v9 00/20] OMAP USB Host cleanup https://lkml.org/lkml/2013/1/23/155 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] qmi_wwan, cdc-ether: add ADU960S
On Wed, 2013-02-06 at 20:51 +0100, Bjørn Mork wrote: Dan Williams d...@redhat.com writes: It advertises a standard CDC-ETHER interface, which actually should be driven by qmi_wwan. Signed-off-by: Dan Williams d...@redhat.com --- diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 3f3d12d..cc6d0c1 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c @@ -615,6 +615,13 @@ static const struct usb_device_id products [] = { .driver_info = 0, }, +/* AnyDATA ADU960S - handled by qmi_wwan */ +{ + USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a, USB_CLASS_COMM, + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info = 0, +}, + /* * WHITELIST!!! * diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 6a1ca50..2b5ea32 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -459,6 +459,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ {QMI_FIXED_INTF(0x1199, 0x901c, 8)},/* Sierra Wireless EM7700 */ {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)},/* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */ + {QMI_FIXED_INTF(0x16d5, 0x650a, 8)},/* AnyDATA ADU960S */ /* 4. Gobi 1000 devices */ {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)},/* Acer Gobi Modem Device */ Just thinking Maybe we should use USB_DEVICE_AND_INTERFACE_INFO() in qmi_wwan as well for these devices? The only reason we match on interface number for most devices in that driver is because those devices use ff/ff/ff for multiple different functions. When the function is uniquely identified using class/subclass/protocol as here, then I believe it makes more sense to use those values. And it creates a symmetry between the cdc_ether and the qmi_wwan entries, making the connection between them clearer. Ok, I'll resubmit with DEVICE_AND_INTERFACE_INFO in qmi_wwan. Dan Not to mention that such symmetry prevents us from ending up with no driver supporting the device if some firmware upgrade happened to change the interface number.. Bjørn -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] usb: phy: moving all PHY API definitions to usb/phy directory
On 02/07/2013 06:38 AM, kishon wrote: On Thursday 07 February 2013 05:02 PM, Venu Byravarasu wrote: As drivers/usb/otg/otg.c contains most of the PHY related APIs which are not OTG specific, moving them to more logical place under drivers/usb/phy. diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile index b13faa1..886be13 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -4,6 +4,7 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG +obj-$(CONFIG_USB_COMMON)+= phy.o I think we should have a separate config for PHYs. There might be controllers which dont need separate PHY. But we can have that as a separate patch later since we might want to change the Kconfig of other UDC drivers. +/* + * phy.c -- USB PHY utility code + * + * Copyright (C) 2004 Texas Instruments You can update this to 2013. I'm not sure if anyone other that TI can do that? +EXPORT_SYMBOL_GPL(usb_bind_phy); + + Unnecessary spaces here. Thanks for the review. It was very difficult to find you review comments since you quoted the entire patch rather than just the few pieces you were commenting on... You might want to do this patch after applying *[PATCH] usb: otg: use try_module_get in all usb_get_phy functions and add missing module_put* by Marc. Venu, please make sure you include the changes in that patch in your Tegra USB/PHY driver rework too, before you post it upstream. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Not enough resource for old configuration after USB bus reset
于 2013/2/7 16:59, Soar Hung 写道: Hi Tianyu, I can produce the issue on the Ubuntu 12.10 (linux 3.5), too. However, could you tell me more detail about what to do or give me some hint for google? Do you mean replacing the usb related source with source from 'usb next', rebuild the kernel, and test again? I think you can git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git and git checkout usb-next. Compile kernel and test it. Best regards, Soar -Original Message- From: Lan Tianyu [mailto:lantianyu1...@gmail.com] Sent: Thursday, February 07, 2013 4:18 PM To: Soar Hung Cc: Alan Stern; Sarah Sharp; linux-usb@vger.kernel.org Subject: Re: Not enough resource for old configuration after USB bus reset 2013/2/4 Soar Hung soarh...@realtek.com: Hi Alan, Sarah, Thank you for your kindly help. Can I do something to provide some help? You found the issue on the 3.0.30+ kernel. Can you test it on the usb-next branch of usb tree? Sarah has fixed a lot of bugs since v3.0. Best regards, Soar -Original Message- From: Alan Stern [mailto:st...@rowland.harvard.edu] Sent: Friday, February 01, 2013 11:36 PM To: Soar Hung Cc: Sarah Sharp; linux-usb@vger.kernel.org Subject: RE: Not enough resource for old configuration after USB bus reset On Fri, 1 Feb 2013, [big5] x R wrote: Hi, According to xHCI spec Rev1 page 125, Endpoint context state diagram. When reset device, the endpoint state transit to disabled state. Do I make some mistake? I'll try to figure out the endopint state transitions during the reset flow, and update information later. Thanks for the direction. Ah, now I understand the problem. The device reset automatically disables the endpoints, so when usb_reset_and_verify_device calls usb_hcd_alloc_bandwidth, and that routine tries to drop the endpoints, it fails because the endpoints are already disabled. Sarah is going to to have to figure out the right way to fix this. She's the maintainer for xhci-hcd. Alan Stern -- Best regards Tianyu Lan --Please consider the environment before printing this e-mail. -- Best regards Tianyu Lan -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2 v2] sierra_net: fix issues with SYNC/RESTART messages and interrupt pipe setup
On Wed, 2013-02-06 at 22:11 +0100, Bjørn Mork wrote: Dan Williams d...@redhat.com writes: As part of the initialization sequence, the driver sends a SYNC message via the control pipe to the firmware, which appears to request a firmware restart. The firmware responds with an indication via the interrupt pipe set up by usbnet. If the driver does not receive a RESTART indication within a certain amount of time, it will periodically send additional SYNC messages until it receives the RESTART indication. Unfortunately, the interrupt URB is only submitted while the netdev is open, which is usually not the case during initialization, and thus the firmware's RESTART indication is lost. So the driver continues sending SYNC messages, and eventually the firmware crashes when it receives too many. This leads to a wedged netdev. To ensure the firmware's RESTART indications can be received by the driver, request that usbnet keep the interrupt URB active via FLAG_INTR_ALWAYS. Second, move the code that sends the SYNC message out of the bind() hook and after usbnet_probe() to ensure the interrupt URB is set up before trying to use it. Given this description I am wondering if you couldn't just move the whole SYNC thing to a new reset() hook, using some private flag to make sure it only runs once? Does it really need to start at probe time? It doesn't need to run exactly at probe, but it appears to need to be the first thing the driver does when communicating with the firmware to ensure clear state and whatnot. Possibly like the QMI SYNC message that clears all the client IDs and resets the internal stack. (the driver also sends a shutdown message to the firmware when unbinding). So I do think that somewhere around probe() is the best time to do this, because it's best to initialize the device when the driver binds to it and react to errors as soon as possible, rather than trying to set everything up on open/IFF_UP and then fail right before you want to actually use the device. Late-fail is quite unhelpful for applications. I don't really care if it happens in probe() or somewhere else right after the driver is bound to the device, but it should be part of the initialization process. Dan -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 00/10] usb: ehci: more bus glues as separate modules
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the SOC On-Chip host controller driver from ehci-hcd host code into its own driver module. Manjunath Goudar (10): USB:Changed omap2plus_defconfig to support OMAP USB static driver USB: EHCI: make ehci-omap a separate driver USB: EHCI: make ehci-spear a separate driver USB: EHCI: make ehci-orion a separate driver USB: EHCI: make ehci-atmel a separate driver USB: EHCI: make ehci-s5p a separate driver USB: EHCI: make ehci-mv a separate driver USB: EHCI: make ehci-vt8500 a separate driver USB: EHCI: make ehci-msm a separate driver USB: EHCI: make ehci-w90X900 a separate driver arch/arm/configs/omap2plus_defconfig |4 ++ drivers/usb/host/Kconfig | 43 --- drivers/usb/host/Makefile| 10 +++- drivers/usb/host/ehci-atmel.c| 78 ++- drivers/usb/host/ehci-hcd.c | 75 +++--- drivers/usb/host/ehci-msm.c | 84 + drivers/usb/host/ehci-mv.c | 81 +--- drivers/usb/host/ehci-omap.c | 69 ++-- drivers/usb/host/ehci-orion.c| 98 +- drivers/usb/host/ehci-s5p.c | 69 +--- drivers/usb/host/ehci-spear.c| 77 +- drivers/usb/host/ehci-vt8500.c | 73 - drivers/usb/host/ehci-w90x900.c | 90 ++- 13 files changed, 415 insertions(+), 436 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 01/10] USB:Changed omap2plus_defconfig to support OMAP USB static driver
From: Manjunath Goudar manjunath.gou...@linaro.org Selected EHCI and OMAP driver as static drivers using omap2plus_defconfig configuration Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Signed-off-by: Arnd Bergmann a...@linaro.org Cc: Felipe Balbi ba...@ti.com Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: linux-usb@vger.kernel.org Cc: Tony Lindgren t...@atomide.com --- arch/arm/configs/omap2plus_defconfig |4 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 82ce8d7..9ea7a9c 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -182,6 +182,10 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_DEVICEFS=y CONFIG_USB_SUSPEND=y CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_OMAP=y CONFIG_USB_WDM=y CONFIG_USB_STORAGE=y CONFIG_USB_LIBUSUAL=y -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 02/10] USB: EHCI: make ehci-omap a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the OMAP host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Signed-off-by: Arnd Bergmann a...@linaro.org Cc: Felipe Balbi ba...@ti.com Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: linux-usb@vger.kernel.org Cc: Tony Lindgren t...@atomide.com --- drivers/usb/host/Kconfig |2 +- drivers/usb/host/Makefile|2 +- drivers/usb/host/ehci-hcd.c |6 +--- drivers/usb/host/ehci-omap.c | 69 ++ 4 files changed, 32 insertions(+), 47 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 3a21c5d..11e102e 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -155,7 +155,7 @@ config USB_EHCI_MXC Variation of ARC USB block used in some Freescale chips. config USB_EHCI_HCD_OMAP - bool EHCI support for OMAP3 and later chips + tristate EHCI support for OMAP3 and later chips depends on USB_EHCI_HCD ARCH_OMAP default y ---help--- diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 001fbff..b54a597 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -27,7 +27,7 @@ obj-$(CONFIG_USB_EHCI_HCD)+= ehci-hcd.o obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o obj-$(CONFIG_USB_EHCI_HCD_PLATFORM)+= ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o - +obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index b416a3f..aaf93ca 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1252,11 +1252,6 @@ MODULE_LICENSE (GPL); #define PLATFORM_DRIVERehci_hcd_sh_driver #endif -#ifdef CONFIG_USB_EHCI_HCD_OMAP -#include ehci-omap.c -#definePLATFORM_DRIVER ehci_hcd_omap_driver -#endif - #ifdef CONFIG_PPC_PS3 #include ehci-ps3.c #definePS3_SYSTEM_BUS_DRIVER ps3_ehci_driver @@ -1347,6 +1342,7 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) \ !IS_ENABLED(CONFIG_USB_EHCI_MXC) \ !defined(PLATFORM_DRIVER) \ + !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index ac17a7c..9c10fc3 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -43,6 +43,11 @@ #include linux/pm_runtime.h #include linux/gpio.h #include linux/clk.h +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h #include linux/platform_data/usb-omap.h @@ -58,9 +63,12 @@ #defineEHCI_INSNREG05_ULPI_WRDATA_SHIFT0 /*-*/ +#include ehci.h -static const struct hc_driver ehci_omap_hc_driver; +#define DRIVER_DESC EHCI OMAP driver +static const char hcd_name[] = ehci-omap; +static struct hc_driver __read_mostly ehci_omap_hc_driver; static inline void ehci_write(void __iomem *base, u32 reg, u32 val) { @@ -323,56 +331,37 @@ static struct platform_driver ehci_hcd_omap_driver = { /*.suspend = ehci_hcd_omap_suspend, */ /*.resume = ehci_hcd_omap_resume, */ .driver = { - .name = ehci-omap, + .name = hcd_name, } }; -/*-*/ - -static const struct hc_driver ehci_omap_hc_driver = { - .description= hcd_name, - .product_desc = OMAP-EHCI Host Controller, - .hcd_priv_size = sizeof(struct ehci_hcd), - /* -* generic hardware linkage -*/ - .irq= ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, +static const struct ehci_driver_overrides omap_overrides __initdata = { + .reset = omap_ehci_init, +}; - /* -* basic lifecycle operations -*/ - .reset = omap_ehci_init, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, +static int __init ehci_omap_init(void) +{ + if (usb_disabled()) + return -ENODEV; - /* -* managing i/o requests and associated device resources -*/ - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset
[PATCH 03/10] USB: EHCI: make ehci-spear a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Spear host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Signed-off-by: Deepak Saxena dsax...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Viresh Kumar viresh.li...@gmail.com Cc: Shiraz Hashim shiraz.has...@st.com Cc: linux-usb@vger.kernel.org Cc: spear-de...@list.st.com --- drivers/usb/host/Kconfig |8 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |6 +--- drivers/usb/host/ehci-spear.c | 77 ++--- 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 11e102e..4413075 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_SPEAR +tristate Support for ST spear on-chip EHCI USB controller +depends on USB_EHCI_HCD PLAT_SPEAR +default y +---help--- + Enables support for the on-chip EHCI controller on + ST spear chips. + config USB_EHCI_MSM bool Support for MSM on-chip EHCI USB controller depends on USB_EHCI_HCD ARCH_MSM diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index b54a597..c97f4ab 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_USB_EHCI_PCI)+= ehci-pci.o obj-$(CONFIG_USB_EHCI_HCD_PLATFORM)+= ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o +obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index aaf93ca..68cea63 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1292,11 +1292,6 @@ MODULE_LICENSE (GPL); #definePLATFORM_DRIVER vt8500_ehci_driver #endif -#ifdef CONFIG_PLAT_SPEAR -#include ehci-spear.c -#define PLATFORM_DRIVERspear_ehci_hcd_driver -#endif - #ifdef CONFIG_USB_EHCI_MSM #include ehci-msm.c #define PLATFORM_DRIVERehci_msm_driver @@ -1343,6 +1338,7 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_USB_EHCI_MXC) \ !defined(PLATFORM_DRIVER) \ !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) \ + !IS_ENABLED(CONFIG_PLAT_SPEAR) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index 466c1bb..6e42cee 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -11,11 +11,25 @@ * more details. */ +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h + + #include linux/clk.h #include linux/jiffies.h #include linux/of.h #include linux/platform_device.h #include linux/pm.h +#include linux/dma-mapping.h + +#include ehci.h + +#define DRIVER_DESC EHCI spear driver + +static const char hcd_name[] = ehci-spear; struct spear_ehci { struct ehci_hcd ehci; @@ -43,40 +57,7 @@ static int ehci_spear_setup(struct usb_hcd *hcd) return ehci_setup(hcd); } - -static const struct hc_driver ehci_spear_hc_driver = { - .description= hcd_name, - .product_desc = SPEAr EHCI, - .hcd_priv_size = sizeof(struct spear_ehci), - - /* generic hardware linkage */ - .irq= ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, - - /* basic lifecycle operations */ - .reset = ehci_spear_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* managing i/o requests and associated device resources */ - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - - /* scheduling support */ - .get_frame_number = ehci_get_frame, - - /* root hub support */ - .hub_status_data= ehci_hub_status_data, - .hub_control= ehci_hub_control, - .bus_suspend= ehci_bus_suspend, - .bus_resume = ehci_bus_resume, - .relinquish_port=
[PATCH 04/10] USB: EHCI: make ehci-orion a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Marvell Orion host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Jason Cooper ja...@lakedaemon.net Cc: Andrew Lunn and...@lunn.ch Cc: Russell King li...@arm.linux.org.uk Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig |7 +++ drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c | 27 +--- drivers/usb/host/ehci-orion.c | 98 + 4 files changed, 69 insertions(+), 64 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 4413075..3689b7b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -169,6 +169,13 @@ config USB_EHCI_HCD_SPEAR ---help--- Enables support for the on-chip EHCI controller on ST spear chips. +config USB_EHCI_HCD_ORION +tristate Support for Marvell Orion on-chip EHCI USB controller +depends on USB_EHCI_HCD PLAT_ORION +default y +---help--- + Enables support for the on-chip EHCI controller on + Morvell Orion chips. config USB_EHCI_MSM bool Support for MSM on-chip EHCI USB controller diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index c97f4ab..23b07dd 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o +obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 68cea63..5a19a57 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -155,7 +155,7 @@ static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) * before driver shutdown. But it also seems to be caused by bugs in cardbus * bridge shutdown: shutting down the bridge before the devices using it. */ -static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, +int handshake(struct ehci_hcd *ehci, void __iomem *ptr, u32 mask, u32 done, int usec) { u32 result; @@ -172,9 +172,9 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, } while (usec 0); return -ETIMEDOUT; } - +EXPORT_SYMBOL_GPL(handshake); /* check TDI/ARC silicon is in host mode */ -static int tdi_in_host_mode (struct ehci_hcd *ehci) +static int tdi_in_host_mode(struct ehci_hcd *ehci) { u32 tmp; @@ -186,7 +186,7 @@ static int tdi_in_host_mode (struct ehci_hcd *ehci) * Force HC to halt state from unknown (EHCI spec section 2.3). * Must be called with interrupts enabled and the lock not held. */ -static int ehci_halt (struct ehci_hcd *ehci) +int ehci_halt(struct ehci_hcd *ehci) { u32 temp; @@ -215,9 +215,9 @@ static int ehci_halt (struct ehci_hcd *ehci) return handshake(ehci, ehci-regs-status, STS_HALT, STS_HALT, 16 * 125); } - +EXPORT_SYMBOL_GPL(ehci_halt); /* put TDI/ARC silicon into EHCI mode */ -static void tdi_reset (struct ehci_hcd *ehci) +void tdi_reset(struct ehci_hcd *ehci) { u32 tmp; @@ -231,12 +231,12 @@ static void tdi_reset (struct ehci_hcd *ehci) tmp |= USBMODE_BE; ehci_writel(ehci, tmp, ehci-regs-usbmode); } - +EXPORT_SYMBOL_GPL(tdi_reset); /* * Reset a non-running (STS_HALT == 1) controller. * Must be called with interrupts enabled and the lock not held. */ -static int ehci_reset (struct ehci_hcd *ehci) +int ehci_reset(struct ehci_hcd *ehci) { int retval; u32 command = ehci_readl(ehci, ehci-regs-command); @@ -272,7 +272,7 @@ static int ehci_reset (struct ehci_hcd *ehci) ehci-resuming_ports = 0; return retval; } - +EXPORT_SYMBOL_GPL(ehci_reset); /* * Idle the controller (turn off the schedules). * Must be called with interrupts enabled and the lock not held. @@ -352,7 +352,7 @@ static void ehci_silence_controller(struct ehci_hcd *ehci) * This forcibly disables dma and IRQs, helping kexec and other cases * where the next system software may expect clean state. */ -static void ehci_shutdown(struct usb_hcd *hcd) +void ehci_shutdown(struct usb_hcd *hcd) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); @@ -366,7 +366,7 @@ static void ehci_shutdown(struct usb_hcd *hcd) hrtimer_cancel(ehci-hrtimer); } - +EXPORT_SYMBOL_GPL(ehci_shutdown);
[PATCH 06/10] USB: EHCI: make ehci-s5p a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the s5p host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Kukjin Kim kgene@samsung.com Cc: Kyungmin Park kyungmin.p...@samsung.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Rob Herring rob.herr...@calxeda.com Cc: linux-usb@vger.kernel.org --- drivers/usb/host/Kconfig|2 +- drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |6 +--- drivers/usb/host/ehci-s5p.c | 69 +++ 4 files changed, 40 insertions(+), 38 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 5a13f9d..f2e0ed3 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -221,7 +221,7 @@ config USB_EHCI_SH If you use the PCI EHCI controller, this option is not necessary. config USB_EHCI_S5P - boolean S5P EHCI support + tristate S5P EHCI support depends on USB_EHCI_HCD PLAT_S5P help Enable support for the S5P SOC's on-chip EHCI controller. diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 96b4839..5c4f5e1 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o +obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 628ed139..36557e3 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1297,11 +1297,6 @@ MODULE_LICENSE (GPL); #definePLATFORM_DRIVER ehci_hcd_msp_driver #endif -#ifdef CONFIG_USB_EHCI_TEGRA -#include ehci-tegra.c -#define PLATFORM_DRIVERtegra_ehci_driver -#endif - #ifdef CONFIG_USB_EHCI_S5P #include ehci-s5p.c #define PLATFORM_DRIVERs5p_ehci_driver @@ -1330,6 +1325,7 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) \ !IS_ENABLED(CONFIG_PLAT_SPEAR) \ !IS_ENABLED(CONFIG_ARCH_AT91) \ + !IS_ENABLED(CONFIG_USB_EHCI_S5P) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 319dcfa..653e096 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c @@ -18,6 +18,16 @@ #include linux/of_gpio.h #include linux/platform_data/usb-ehci-s5p.h #include plat/usb-phy.h +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h +#include linux/dma-mapping.h + +#include ehci.h + +#define DRIVER_DESC EHCI s5p driver #define EHCI_INSNREG00(base) (base + 0x90) #define EHCI_INSNREG00_ENA_INCR16 (0x1 25) @@ -28,43 +38,16 @@ (EHCI_INSNREG00_ENA_INCR16 | EHCI_INSNREG00_ENA_INCR8 | \ EHCI_INSNREG00_ENA_INCR4 | EHCI_INSNREG00_ENA_INCRX_ALIGN) +static const char hcd_name[] = ehci-s5p; +static struct hc_driver __read_mostly s5p_ehci_hc_driver; + + struct s5p_ehci_hcd { struct device *dev; struct usb_hcd *hcd; struct clk *clk; }; -static const struct hc_driver s5p_ehci_hc_driver = { - .description= hcd_name, - .product_desc = S5P EHCI Host Controller, - .hcd_priv_size = sizeof(struct ehci_hcd), - - .irq= ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, - - .reset = ehci_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - .get_frame_number = ehci_get_frame, - - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - - .hub_status_data= ehci_hub_status_data, - .hub_control= ehci_hub_control, - .bus_suspend= ehci_bus_suspend, - .bus_resume = ehci_bus_resume, - - .relinquish_port= ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, - - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, -}; - static void s5p_setup_vbus_gpio(struct platform_device *pdev) { int err; @@ -283,5 +266,27 @@ static struct platform_driver s5p_ehci_driver = { .of_match_table =
[PATCH 09/10] USB: EHCI: make ehci-msm a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Qualcomm On-Chip host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: David Brown dav...@codeaurora.org Cc: Daniel Walker dwal...@fifo99.com Cc: Bryan Huntsman bry...@codeaurora.org Cc: Brian Swetland swetl...@google.com Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig|5 +-- drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |7 ++-- drivers/usb/host/ehci-msm.c | 84 +++ 4 files changed, 43 insertions(+), 54 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index d20d22c..8d18a6c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -184,6 +184,7 @@ config USB_EHCI_HCD_ORION ---help--- Enables support for the on-chip EHCI controller on Morvell Orion chips. + config USB_EHCI_HCD_AT91 tristate Support for Atmel on-chip EHCI USB controller depends on USB_EHCI_HCD ARCH_AT91 @@ -193,7 +194,7 @@ config USB_EHCI_HCD_AT91 Atmel chips. config USB_EHCI_MSM - bool Support for MSM on-chip EHCI USB controller + tristate Support for MSM on-chip EHCI USB controller depends on USB_EHCI_HCD ARCH_MSM select USB_EHCI_ROOT_HUB_TT select USB_MSM_OTG @@ -209,7 +210,7 @@ config USB_EHCI_TEGRA boolean NVIDIA Tegra HCD support depends on USB_EHCI_HCD ARCH_TEGRA select USB_EHCI_ROOT_HUB_TT - help + --- help--- This driver enables support for the internal USB Host Controllers found in NVIDIA Tegra SoCs. The controllers are EHCI compliant. diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index cf71e5d..6c1d0e0 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -35,6 +35,7 @@ obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o +obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 952f85e..d44115b 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1277,11 +1277,6 @@ MODULE_LICENSE (GPL); #define PLATFORM_DRIVERehci_octeon_driver #endif -#ifdef CONFIG_USB_EHCI_MSM -#include ehci-msm.c -#define PLATFORM_DRIVERehci_msm_driver -#endif - #ifdef CONFIG_TILE_USB #include ehci-tilegx.c #definePLATFORM_DRIVER ehci_hcd_tilegx_driver @@ -1317,6 +1312,8 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_ARCH_AT91) \ !IS_ENABLED(CONFIG_USB_EHCI_S5P) \ !IS_ENABLED(CONFIG_USB_EHCI_MV) \ + !IS_ENABLED(CONFIG_ARCH_VT8500) \ + !IS_ENABLED(CONFIG_USB_EHCI_MSM) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 88a49c8..fdf66a9 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -30,8 +30,19 @@ #include linux/usb/otg.h #include linux/usb/msm_hsusb_hw.h +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h +#include ehci.h + #define MSM_USB_BASE (hcd-regs) +#define DRIVER_DESC Qualcomm On-Chip EHCI Host Controller + +static const char hcd_name[] = msm_hsusb_host; +static struct hc_driver __read_mostly msm_hc_driver; static struct usb_phy *phy; static int ehci_msm_reset(struct usb_hcd *hcd) @@ -56,52 +67,6 @@ static int ehci_msm_reset(struct usb_hcd *hcd) return 0; } -static struct hc_driver msm_hc_driver = { - .description= hcd_name, - .product_desc = Qualcomm On-Chip EHCI Host Controller, - .hcd_priv_size = sizeof(struct ehci_hcd), - - /* -* generic hardware linkage -*/ - .irq= ehci_irq, - .flags = HCD_USB2 | HCD_MEMORY, - - .reset = ehci_msm_reset, - .start = ehci_run, - - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* -* managing i/o requests and associated device resources -*/ - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, -
[PATCH 10/10] USB: EHCI: make ehci-w90X900 a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Nuvoton On-Chip host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Wan ZongShun mcuos@gmail.com Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig|2 +- drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |6 +-- drivers/usb/host/ehci-w90x900.c | 90 +-- 4 files changed, 43 insertions(+), 56 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8d18a6c..1b5e30b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -245,7 +245,7 @@ config USB_EHCI_MV only be EHCI host. OTG is controller that can switch to host mode. config USB_W90X900_EHCI - bool W90X900(W90P910) EHCI support +tristate W90X900(W90P910) EHCI support depends on USB_EHCI_HCD ARCH_W90X900 ---help--- Enables support for the W90X900 USB controller diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 6c1d0e0..74db4d4 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -36,6 +36,7 @@ obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o +obj-$(CONFIG_USB_W90X900_EHCI) += ehci-w90x900.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index d44115b..84ed7d7 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1267,11 +1267,6 @@ MODULE_LICENSE (GPL); #define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver #endif -#ifdef CONFIG_USB_W90X900_EHCI -#include ehci-w90x900.c -#definePLATFORM_DRIVER ehci_hcd_w90x900_driver -#endif - #ifdef CONFIG_USB_OCTEON_EHCI #include ehci-octeon.c #define PLATFORM_DRIVERehci_octeon_driver @@ -1314,6 +1309,7 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_USB_EHCI_MV) \ !IS_ENABLED(CONFIG_ARCH_VT8500) \ !IS_ENABLED(CONFIG_USB_EHCI_MSM) \ + !IS_ENABLED(CONFIG_USB_W90X900_EHCI) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-w90x900.c b/drivers/usb/host/ehci-w90x900.c index 59e0e24..0b677ec 100644 --- a/drivers/usb/host/ehci-w90x900.c +++ b/drivers/usb/host/ehci-w90x900.c @@ -13,11 +13,31 @@ #include linux/platform_device.h +#include linux/dma-mapping.h +#include linux/of.h +#include linux/platform_device.h +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h +#include ehci.h + /* enable phy0 and phy1 for w90p910 */ #defineENPHY (0x018) #define PHY0_CTR (0xA4) #define PHY1_CTR (0xA8) +#define DRIVER_DESC Nuvoton w90x900 On-Chip EHCI Host driver + +static const char hcd_name[] = ehci-w90x900; + +static struct hc_driver __read_mostly ehci_w90x900_hc_driver; + +static const struct ehci_driver_overrides ehci_w90X900_overrides __initdata = { + .reset = ehci_setup, +}; + static int usb_w90x900_probe(const struct hc_driver *driver, struct platform_device *pdev) { @@ -99,54 +119,6 @@ void usb_w90x900_remove(struct usb_hcd *hcd, struct platform_device *pdev) usb_put_hcd(hcd); } -static const struct hc_driver ehci_w90x900_hc_driver = { - .description = hcd_name, - .product_desc = Nuvoton w90x900 EHCI Host Controller, - .hcd_priv_size = sizeof(struct ehci_hcd), - - /* -* generic hardware linkage -*/ - .irq = ehci_irq, - .flags = HCD_USB2|HCD_MEMORY, - - /* -* basic lifecycle operations -*/ - .reset = ehci_setup, - .start = ehci_run, - - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* -* managing i/o requests and associated device resources -*/ - .urb_enqueue = ehci_urb_enqueue, - .urb_dequeue = ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - - /* -* scheduling support -*/ - .get_frame_number = ehci_get_frame, - - /* -* root hub support -*/ - .hub_status_data = ehci_hub_status_data, - .hub_control = ehci_hub_control, -#ifdef CONFIG_PM - .bus_suspend = ehci_bus_suspend, - .bus_resume = ehci_bus_resume, -#endif - .relinquish_port= ehci_relinquish_port, - .port_handed_over =
[PATCH 08/10] USB: EHCI: make ehci-vt8500 a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the vt8500 host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Tony Prisk li...@prisktech.co.nz Cc: Alexey Charkov alch...@gmail.com Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig |8 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c|5 --- drivers/usb/host/ehci-vt8500.c | 73 ++-- 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index e7c3ce0..d20d22c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_VT8500 +tristate Support for VT8500 on-chip EHCI USB controller +depends on USB_EHCI_HCD ARCH_VT8500 +default y +---help--- + Enables support for the on-chip EHCI controller on + VT8500 chips. + config USB_EHCI_HCD_SPEAR tristate Support for ST spear on-chip EHCI USB controller depends on USB_EHCI_HCD PLAT_SPEAR diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 677f1d3..cf71e5d 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -34,6 +34,7 @@ obj-$(CONFIG_USB_OXU210HP_HCD)+= oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o +obj-$(CONFIG_USB_EHCI_HCD_VT8500)+= ehci-vt8500.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index e636719..952f85e 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1277,11 +1277,6 @@ MODULE_LICENSE (GPL); #define PLATFORM_DRIVERehci_octeon_driver #endif -#ifdef CONFIG_ARCH_VT8500 -#include ehci-vt8500.c -#definePLATFORM_DRIVER vt8500_ehci_driver -#endif - #ifdef CONFIG_USB_EHCI_MSM #include ehci-msm.c #define PLATFORM_DRIVERehci_msm_driver diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c index 11695d5..ff4e3ae 100644 --- a/drivers/usb/host/ehci-vt8500.c +++ b/drivers/usb/host/ehci-vt8500.c @@ -16,52 +16,25 @@ * */ +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h +#include linux/dma-mapping.h #include linux/of.h #include linux/platform_device.h -static const struct hc_driver vt8500_ehci_hc_driver = { - .description= hcd_name, - .product_desc = VT8500 EHCI, - .hcd_priv_size = sizeof(struct ehci_hcd), +#include ehci.h - /* -* generic hardware linkage -*/ - .irq= ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, - - /* -* basic lifecycle operations -*/ - .reset = ehci_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, +#define DRIVER_DESC vt8500 On-Chip EHCI Host driver - /* -* managing i/o requests and associated device resources -*/ - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, +static const char hcd_name[] = ehci-vt8500; - /* -* scheduling support -*/ - .get_frame_number = ehci_get_frame, +static struct hc_driver __read_mostly vt8500_ehci_hc_driver; - /* -* root hub support -*/ - .hub_status_data= ehci_hub_status_data, - .hub_control= ehci_hub_control, - .bus_suspend= ehci_bus_suspend, - .bus_resume = ehci_bus_resume, - .relinquish_port= ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, - - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, +static const struct ehci_driver_overrides ehci_vt8500_overrides __initdata = { + .reset = ehci_setup, }; static u64 vt8500_ehci_dma_mask = DMA_BIT_MASK(32); @@ -140,11 +113,31 @@ static struct platform_driver vt8500_ehci_driver = { .remove = vt8500_ehci_drv_remove, .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = vt8500-ehci, + .name = hcd_name,
[PATCH 05/10] USB: EHCI: make ehci-atmel a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Atmel host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Alan Stern st...@rowland.harvard.edu Cc: Greg KH g...@kroah.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Rob Herring rob.herr...@calxeda.com Cc: Andrew Victor li...@maxim.org.za Cc: Nicolas Ferre nicolas.fe...@atmel.com Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig |7 drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-atmel.c | 78 ++--- drivers/usb/host/ehci-hcd.c |6 +--- 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 3689b7b..5a13f9d 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -176,6 +176,13 @@ config USB_EHCI_HCD_ORION ---help--- Enables support for the on-chip EHCI controller on Morvell Orion chips. +config USB_EHCI_HCD_AT91 +tristate Support for Atmel on-chip EHCI USB controller +depends on USB_EHCI_HCD ARCH_AT91 +default y +---help--- + Enables support for the on-chip EHCI controller on + Atmel chips. config USB_EHCI_MSM bool Support for MSM on-chip EHCI USB controller diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 23b07dd..96b4839 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o +obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 27639487..2f06711 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -15,6 +15,19 @@ #include linux/platform_device.h #include linux/of.h #include linux/of_platform.h +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h +#include linux/dma-mapping.h + +#include ehci.h + +#define DRIVER_DESC EHCI atmel driver + +static const char hcd_name[] = ehci-atmel; +static struct hc_driver __read_mostly ehci_atmel_hc_driver; /* interface and function clocks */ static struct clk *iclk, *fclk; @@ -60,41 +73,6 @@ static int ehci_atmel_setup(struct usb_hcd *hcd) return ehci_setup(hcd); } -static const struct hc_driver ehci_atmel_hc_driver = { - .description= hcd_name, - .product_desc = Atmel EHCI UHP HS, - .hcd_priv_size = sizeof(struct ehci_hcd), - - /* generic hardware linkage */ - .irq= ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, - - /* basic lifecycle operations */ - .reset = ehci_atmel_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* managing i/o requests and associated device resources */ - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - - /* scheduling support */ - .get_frame_number = ehci_get_frame, - - /* root hub support */ - .hub_status_data= ehci_hub_status_data, - .hub_control= ehci_hub_control, - .bus_suspend= ehci_bus_suspend, - .bus_resume = ehci_bus_resume, - .relinquish_port= ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, - - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, -}; - static u64 at91_ehci_dma_mask = DMA_BIT_MASK(32); static int ehci_atmel_drv_probe(struct platform_device *pdev) @@ -210,7 +188,35 @@ static struct platform_driver ehci_atmel_driver = { .remove = ehci_atmel_drv_remove, .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = atmel-ehci, + .name = hcd_name, .of_match_table = of_match_ptr(atmel_ehci_dt_ids), }, }; + +static const struct ehci_driver_overrides atmel_overrides __initdata = { + .reset = ehci_atmel_setup, +}; + +static int __init ehci_atmel_init(void) +{ + if (usb_disabled()) + return -ENODEV; + + pr_info(%s: DRIVER_DESC \n, hcd_name); +
[PATCH 07/10] USB: EHCI: make ehci-mv a separate driver
From: Manjunath Goudar manjunath.gou...@linaro.org Separate the mv(marvell) host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Jason Cooper ja...@lakedaemon.net Cc: Andrew Lunn and...@lunn.ch Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig|2 +- drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |6 +--- drivers/usb/host/ehci-mv.c | 81 --- 4 files changed, 40 insertions(+), 50 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index f2e0ed3..e7c3ce0 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -227,7 +227,7 @@ config USB_EHCI_S5P Enable support for the S5P SOC's on-chip EHCI controller. config USB_EHCI_MV - bool EHCI support for Marvell on-chip controller + tristate EHCI support for Marvell on-chip controller depends on USB_EHCI_HCD (ARCH_PXA || ARCH_MMP) select USB_EHCI_ROOT_HUB_TT ---help--- diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 5c4f5e1..677f1d3 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_USB_EHCI_HCD_ORION)+= ehci-orion.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o +obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 36557e3..e636719 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1307,11 +1307,6 @@ MODULE_LICENSE (GPL); #define PLATFORM_DRIVERehci_grlib_driver #endif -#ifdef CONFIG_USB_EHCI_MV -#include ehci-mv.c -#definePLATFORM_DRIVER ehci_mv_driver -#endif - #ifdef CONFIG_MIPS_SEAD3 #include ehci-sead3.c #definePLATFORM_DRIVER ehci_hcd_sead3_driver @@ -1326,6 +1321,7 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_PLAT_SPEAR) \ !IS_ENABLED(CONFIG_ARCH_AT91) \ !IS_ENABLED(CONFIG_USB_EHCI_S5P) \ + !IS_ENABLED(CONFIG_USB_EHCI_MV) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 6c56297..67de419 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c @@ -17,7 +17,18 @@ #include linux/usb/otg.h #include linux/platform_data/mv_usb.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h +#include linux/dma-mapping.h + +#include ehci.h + +#define DRIVER_DESC EHCI mv driver + #define CAPLENGTH_MASK (0xff) +static const char hcd_name[] = ehci-mv; +static struct hc_driver __read_mostly mv_ehci_hc_driver; struct ehci_hcd_mv { struct usb_hcd *hcd; @@ -95,48 +106,6 @@ static int mv_ehci_reset(struct usb_hcd *hcd) return retval; } -static const struct hc_driver mv_ehci_hc_driver = { - .description = hcd_name, - .product_desc = Marvell EHCI, - .hcd_priv_size = sizeof(struct ehci_hcd), - - /* -* generic hardware linkage -*/ - .irq = ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, - - /* -* basic lifecycle operations -*/ - .reset = mv_ehci_reset, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* -* managing i/o requests and associated device resources -*/ - .urb_enqueue = ehci_urb_enqueue, - .urb_dequeue = ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, - - /* -* scheduling support -*/ - .get_frame_number = ehci_get_frame, - - /* -* root hub support -*/ - .hub_status_data = ehci_hub_status_data, - .hub_control = ehci_hub_control, - .bus_suspend = ehci_bus_suspend, - .bus_resume = ehci_bus_resume, -}; - static int mv_ehci_probe(struct platform_device *pdev) { struct mv_usb_platform_data *pdata = pdev-dev.platform_data; @@ -302,7 +271,6 @@ static int mv_ehci_remove(struct platform_device *pdev) { struct ehci_hcd_mv *ehci_mv = platform_get_drvdata(pdev); struct usb_hcd *hcd = ehci_mv-hcd; - int clk_i; if (hcd-rh_registered) usb_remove_hcd(hcd); @@ -351,8 +319,33 @@ static struct platform_driver ehci_mv_driver = { .remove = mv_ehci_remove, .shutdown = mv_ehci_shutdown, .driver
Re: [PATCH 09/10] USB: EHCI: make ehci-msm a separate driver
On 02/07/2013 10:34 AM, manjunath.gou...@linaro.org wrote: Separate the Qualcomm On-Chip host controller driver from ehci-hcd host code into its own driver module. diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig @@ -209,7 +210,7 @@ config USB_EHCI_TEGRA boolean NVIDIA Tegra HCD support depends on USB_EHCI_HCD ARCH_TEGRA select USB_EHCI_ROOT_HUB_TT - help + --- help--- This driver enables support for the internal USB Host Controllers found in NVIDIA Tegra SoCs. The controllers are EHCI compliant. That seems like an unrelated change. The indentation and space after first --- looks wrong too. It looks pretty random which of help and ---help--- is used in this file; if you're going to fix that, I think fix them all, but in a separate patch. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/10] USB: EHCI: make ehci-s5p a separate driver
On 02/07/2013 10:34 AM, manjunath.gou...@linaro.org wrote: Separate the s5p host controller driver from ehci-hcd host code into its own driver module. diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c @@ -1297,11 +1297,6 @@ MODULE_LICENSE (GPL); #define PLATFORM_DRIVER ehci_hcd_msp_driver #endif -#ifdef CONFIG_USB_EHCI_TEGRA -#include ehci-tegra.c -#define PLATFORM_DRIVER tegra_ehci_driver -#endif - That also looks wrong. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/10] USB: EHCI: make ehci-vt8500 a separate driver
On Thu, 2013-02-07 at 23:04 +0530, manjunath.gou...@linaro.org wrote: From: Manjunath Goudar manjunath.gou...@linaro.org Separate the vt8500 host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Tony Prisk li...@prisktech.co.nz Cc: Alexey Charkov alch...@gmail.com Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig |8 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c|5 --- drivers/usb/host/ehci-vt8500.c | 73 ++-- 4 files changed, 42 insertions(+), 45 deletions(-) ... diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c index 11695d5..ff4e3ae 100644 --- a/drivers/usb/host/ehci-vt8500.c +++ b/drivers/usb/host/ehci-vt8500.c @@ -16,52 +16,25 @@ ... +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_AUTHOR(Alexey Charkov); +MODULE_LICENSE(GPL); Should be GPL v2 as per the license header. MODULE_ALIAS(platform:vt8500-ehci); MODULE_DEVICE_TABLE(of, vt8500_ehci_ids); Regards Tony Prisk -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 09/10] USB: EHCI: make ehci-msm a separate driver
manjunath.gou...@linaro.org writes: +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_ALIAS(platform:omap-msm); +MODULE_LICENSE(GPL); omap-msm? I think you mean msm-ehci. I don't have any hardware to test this on, so hopefully someone can chime in after testing it. David -- sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/10] USB: EHCI: make ehci-orion a separate driver
On Thursday 07 February 2013, manjunath.gou...@linaro.org wrote: @@ -155,7 +155,7 @@ static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) * before driver shutdown. But it also seems to be caused by bugs in cardbus * bridge shutdown: shutting down the bridge before the devices using it. */ -static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, +int handshake(struct ehci_hcd *ehci, void __iomem *ptr, u32 mask, u32 done, int usec) { u32 result; I had not noticed this before, but apparently it belongs into the tegra patch that you dropped, rather than this patch. Same thing for all the changes below. @@ -172,9 +172,9 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, } while (usec 0); return -ETIMEDOUT; } - +EXPORT_SYMBOL_GPL(handshake); /* check TDI/ARC silicon is in host mode */ -static int tdi_in_host_mode (struct ehci_hcd *ehci) +static int tdi_in_host_mode(struct ehci_hcd *ehci) { u32 tmp; @@ -186,7 +186,7 @@ static int tdi_in_host_mode (struct ehci_hcd *ehci) * Force HC to halt state from unknown (EHCI spec section 2.3). * Must be called with interrupts enabled and the lock not held. */ -static int ehci_halt (struct ehci_hcd *ehci) +int ehci_halt(struct ehci_hcd *ehci) { u32 temp; @@ -215,9 +215,9 @@ static int ehci_halt (struct ehci_hcd *ehci) return handshake(ehci, ehci-regs-status, STS_HALT, STS_HALT, 16 * 125); } - +EXPORT_SYMBOL_GPL(ehci_halt); /* put TDI/ARC silicon into EHCI mode */ -static void tdi_reset (struct ehci_hcd *ehci) +void tdi_reset(struct ehci_hcd *ehci) { u32 tmp; @@ -231,12 +231,12 @@ static void tdi_reset (struct ehci_hcd *ehci) tmp |= USBMODE_BE; ehci_writel(ehci, tmp, ehci-regs-usbmode); } - +EXPORT_SYMBOL_GPL(tdi_reset); /* * Reset a non-running (STS_HALT == 1) controller. * Must be called with interrupts enabled and the lock not held. */ -static int ehci_reset (struct ehci_hcd *ehci) +int ehci_reset(struct ehci_hcd *ehci) { int retval; u32 command = ehci_readl(ehci, ehci-regs-command); @@ -272,7 +272,7 @@ static int ehci_reset (struct ehci_hcd *ehci) ehci-resuming_ports = 0; return retval; } - +EXPORT_SYMBOL_GPL(ehci_reset); /* * Idle the controller (turn off the schedules). * Must be called with interrupts enabled and the lock not held. @@ -352,7 +352,7 @@ static void ehci_silence_controller(struct ehci_hcd *ehci) * This forcibly disables dma and IRQs, helping kexec and other cases * where the next system software may expect clean state. */ -static void ehci_shutdown(struct usb_hcd *hcd) +void ehci_shutdown(struct usb_hcd *hcd) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); @@ -366,7 +366,7 @@ static void ehci_shutdown(struct usb_hcd *hcd) hrtimer_cancel(ehci-hrtimer); } - +EXPORT_SYMBOL_GPL(ehci_shutdown); Arnd -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
On Thu, 2013-02-07 at 21:39 +0800, Freddy Xin wrote: From: Freddy Xin fre...@asix.com.tw This is a resubmission. Added const to ethtool_ops structure and fixed the coding style of AX88179_BULKIN_SIZE array. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an MTU higher than 1500. Fixed indentation and empty line coding style errors. The _nopm version usb functions were added to access register in suspend and resume functions. Serveral variables allocted dynamically were removed and replaced by stack variables. ax88179_get_eeprom were modified from asix_get_eeprom in asix_common. This patch adds a driver for ASIX's AX88179 family of USB 3.0/2.0 to gigabit ethernet adapters. It's based on the AX88xxx driver but the usb commands used to access registers for AX88179 are completely different. This driver had been verified on x86 system with AX88179/AX88178A and Sitcomm LN-032 USB dongles. Signed-off-by: Freddy Xin fre...@asix.com.tw [...] --- /dev/null +++ b/drivers/net/usb/ax88179_178a.c [...] +struct ax88179_data { + u16 rxctl; +}; Should also be declared __packed, as on some architectures it may be padded to 4 bytes. rxctl is presumably required to be little-endian (__le16)? +struct ax88179_int_data { + u16 res1; + u8 link; + u16 res2; + u8 status; + u16 res3; +} __packed; Same here, the u16 fields are presumably little-endian? [...] +struct ax88179_rx_pkt_header { + u8 l4_csum_err:1, + l3_csum_err:1, + l4_type:3, + l3_type:2, + ce:1; + + u8 vlan_ind:3, + rx_ok:1, + pri:3, + bmc:1; + + u16 len:13, + crc:1, + mii:1, + drop:1; +} __packed; This won't work on both big-endian systems (assuming this works on x86). You apparently try to convert the structure in-place in ax88179_rx_fixup() by calling le32_to_cpus(); that may work if you define all the bitfields to be part of a u32 but it won't work with the current definition. [...] +static int +ax88179_set_features(struct net_device *net, netdev_features_t features) +{ + u8 tmp; + struct usbnet *dev = netdev_priv(net); + netdev_features_t changed = net-features ^ features; + + if (changed NETIF_F_TSO) + net-features ^= NETIF_F_TSO; + + if (changed NETIF_F_SG) + net-features ^= NETIF_F_SG; Don't change net-features; the caller will do that for you. + if (changed NETIF_F_IP_CSUM) { + ax88179_read_cmd(dev, AX_ACCESS_MAC, AX_TXCOE_CTL, 1, 1, tmp); + tmp ^= AX_TXCOE_TCP | AX_TXCOE_UDP; + ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_TXCOE_CTL, 1, 1, tmp); + + net-features ^= NETIF_F_IP_CSUM; + } [...] Isn't tmp going to be in little-endian byte order, so this doesn't work correctly on a big-endian system? There are a lot of reads and writes of 16-bit registers using ax88179_{read,write}_cmd(); maybe you should add ax88179_{read,write}_le16() to handle this specific case. Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
From: Ben Hutchings bhutchi...@solarflare.com Date: Thu, 7 Feb 2013 20:02:55 + On Thu, 2013-02-07 at 21:39 +0800, Freddy Xin wrote: From: Freddy Xin fre...@asix.com.tw This is a resubmission. Added const to ethtool_ops structure and fixed the coding style of AX88179_BULKIN_SIZE array. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an MTU higher than 1500. Fixed indentation and empty line coding style errors. The _nopm version usb functions were added to access register in suspend and resume functions. Serveral variables allocted dynamically were removed and replaced by stack variables. ax88179_get_eeprom were modified from asix_get_eeprom in asix_common. This patch adds a driver for ASIX's AX88179 family of USB 3.0/2.0 to gigabit ethernet adapters. It's based on the AX88xxx driver but the usb commands used to access registers for AX88179 are completely different. This driver had been verified on x86 system with AX88179/AX88178A and Sitcomm LN-032 USB dongles. Signed-off-by: Freddy Xin fre...@asix.com.tw [...] --- /dev/null +++ b/drivers/net/usb/ax88179_178a.c [...] +struct ax88179_data { + u16 rxctl; +}; Should also be declared __packed, as on some architectures it may be padded to 4 bytes. Packed is evil and should be avoid everywhere that it is possible to do so. It's going to use byte loads on this u16 on RISC cpus simply because __packed makes it so that the compiler cannot assume data alignment any longer. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/10] usb: ehci: more bus glues as separate modules
Hi Manjunath, Nice work. On Thu, Feb 07, 2013 at 11:03:57PM +0530, manjunath.gou...@linaro.org wrote: From: Manjunath Goudar manjunath.gou...@linaro.org Separate the SOC On-Chip host controller driver from ehci-hcd host code into its own driver module. Perhaps you could add a few lines explaining why you're doing this. Manjunath Goudar (10): USB:Changed omap2plus_defconfig to support OMAP USB static driver USB: EHCI: make ehci-omap a separate driver USB: EHCI: make ehci-spear a separate driver USB: EHCI: make ehci-orion a separate driver USB: EHCI: make ehci-atmel a separate driver USB: EHCI: make ehci-s5p a separate driver USB: EHCI: make ehci-mv a separate driver USB: EHCI: make ehci-vt8500 a separate driver USB: EHCI: make ehci-msm a separate driver USB: EHCI: make ehci-w90X900 a separate driver arch/arm/configs/omap2plus_defconfig |4 ++ drivers/usb/host/Kconfig | 43 --- drivers/usb/host/Makefile| 10 +++- drivers/usb/host/ehci-atmel.c| 78 ++- drivers/usb/host/ehci-hcd.c | 75 +++--- drivers/usb/host/ehci-msm.c | 84 + drivers/usb/host/ehci-mv.c | 81 +--- drivers/usb/host/ehci-omap.c | 69 ++-- drivers/usb/host/ehci-orion.c| 98 +- drivers/usb/host/ehci-s5p.c | 69 +--- drivers/usb/host/ehci-spear.c| 77 +- drivers/usb/host/ehci-vt8500.c | 73 - drivers/usb/host/ehci-w90x900.c | 90 ++- 13 files changed, 415 insertions(+), 436 deletions(-) -- 1.7.9.5 ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Thanks, -- Ezequiel García, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2 v2] sierra_net: fix issues with SYNC/RESTART messages and interrupt pipe setup
On Wed, 2013-02-06 at 21:17 +0100, Oliver Neukum wrote: On Wednesday 06 February 2013 12:42:56 Dan Williams wrote: As part of the initialization sequence, the driver sends a SYNC message via the control pipe to the firmware, which appears to request a firmware restart. The firmware responds with an indication via the interrupt pipe set up by usbnet. If the driver does not receive a RESTART indication within a certain amount of time, it will periodically send additional SYNC messages until it receives the RESTART indication. Unfortunately, the interrupt URB is only submitted while the netdev is open, which is usually not the case during initialization, and thus the firmware's RESTART indication is lost. So the driver continues sending SYNC messages, and eventually the firmware crashes when it receives too many. This leads to a wedged netdev. If I understand this correctly we should stop the interrupt pipe once RESTART has been recieved. I am afraid this patch is a bit inefficient. The firmware may send other indications to the host over the interrupt pipe at any time, apparently. However, I have not seen firmware send these indications in practice, so maybe we can ignore this and do as you suggest. So how would you suggest to handle this given the constraints? Basically, we need to allow sierra_net to submit dev-interrupt at probe/bind and then after a period of time kill it when it's no longer needed. The problem is that if the interface is set IFF_UP right after bind but before sierra_net has finished its SYNC/Restart dance, we need to ensure that sierra_net doesn't kill the URB unconditionally. One way to do this would be a new usbnet function to subdrivers could call to submit the URB which would be a NOP if the URB was already submitted. It would be paired with a function to kill the URB which would be a NOP if (URB already killed || (IFF_UP and subdriver has status() hook)). Kinda like refcounting the interrupt URB submission but not. Does that sound like a worthwhile approach? Dan -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers: net: Remove remaining alloc/OOM messages
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/memcpy to kmemdup. Removed now unused stack variables. Removed unnecessary parentheses. Neatened alignment. Signed-off-by: Joe Perches j...@perches.com --- Let me know if you want multiple small patches instead. drivers/net/can/usb/ems_usb.c | 4 +- drivers/net/ethernet/amd/pcnet32.c | 47 +++--- drivers/net/ethernet/freescale/gianfar.c | 25 +--- drivers/net/ethernet/intel/e1000/e1000_main.c | 14 ++- drivers/net/ethernet/intel/ixgb/ixgb_main.c| 10 + drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 4 +- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c| 2 - drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 11 ++--- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 +-- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 22 -- drivers/net/ethernet/smsc/smsc9420.c | 9 ++--- drivers/net/usb/pegasus.c | 6 +-- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 11 ++--- drivers/net/wireless/ath/ath9k/hw.c| 7 +--- drivers/net/wireless/ath/ath9k/rc.c| 12 +- drivers/net/wireless/ath/wil6210/txrx.c| 2 - drivers/net/wireless/ath/wil6210/wmi.c | 10 ++--- drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 5 +-- drivers/net/wireless/brcm80211/brcmfmac/usb.c | 7 ++-- drivers/net/wireless/mwl8k.c | 2 - 20 files changed, 66 insertions(+), 150 deletions(-) diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 0e7bde7..5f9a7ad 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -1019,10 +1019,8 @@ static int ems_usb_probe(struct usb_interface *intf, dev-tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + sizeof(struct ems_cpc_msg), GFP_KERNEL); - if (!dev-tx_msg_buffer) { - dev_err(intf-dev, Couldn't alloc Tx buffer\n); + if (!dev-tx_msg_buffer) goto cleanup_intr_in_buffer; - } usb_set_intfdata(intf, dev); diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index 74cfc01..797f847 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c @@ -494,19 +494,15 @@ static void pcnet32_realloc_tx_ring(struct net_device *dev, } memset(new_tx_ring, 0, sizeof(struct pcnet32_tx_head) * (1 size)); - new_dma_addr_list = kcalloc((1 size), sizeof(dma_addr_t), - GFP_ATOMIC); - if (!new_dma_addr_list) { - netif_err(lp, drv, dev, Memory allocation failed\n); + new_dma_addr_list = kcalloc(1 size, sizeof(dma_addr_t), + GFP_ATOMIC); + if (!new_dma_addr_list) goto free_new_tx_ring; - } - new_skb_list = kcalloc((1 size), sizeof(struct sk_buff *), - GFP_ATOMIC); - if (!new_skb_list) { - netif_err(lp, drv, dev, Memory allocation failed\n); + new_skb_list = kcalloc(1 size, sizeof(struct sk_buff *), + GFP_ATOMIC); + if (!new_skb_list) goto free_new_lists; - } kfree(lp-tx_skbuff); kfree(lp-tx_dma_addr); @@ -564,19 +560,14 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev, } memset(new_rx_ring, 0, sizeof(struct pcnet32_rx_head) * (1 size)); - new_dma_addr_list = kcalloc((1 size), sizeof(dma_addr_t), - GFP_ATOMIC); - if (!new_dma_addr_list) { - netif_err(lp, drv, dev, Memory allocation failed\n); + new_dma_addr_list = kcalloc(1 size, sizeof(dma_addr_t), GFP_ATOMIC); + if (!new_dma_addr_list) goto free_new_rx_ring; - } - new_skb_list = kcalloc((1 size), sizeof(struct sk_buff *), - GFP_ATOMIC); - if (!new_skb_list) { - netif_err(lp, drv, dev, Memory allocation failed\n); + new_skb_list = kcalloc(1 size, sizeof(struct sk_buff *), + GFP_ATOMIC); + if (!new_skb_list) goto free_new_lists; - } /* first copy the current receive buffers */ overlap = min(size, lp-rx_ring_size); @@ -1933,31 +1924,23 @@ static int pcnet32_alloc_ring(struct net_device *dev, const char *name) lp-tx_dma_addr = kcalloc(lp-tx_ring_size, sizeof(dma_addr_t), GFP_ATOMIC); - if (!lp-tx_dma_addr) { - netif_err(lp, drv, dev, Memory allocation failed\n); + if (!lp-tx_dma_addr) return
Re: [PATCH] drivers: net: Remove remaining alloc/OOM messages
On 02/07/2013 10:46 PM, Joe Perches wrote: alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/memcpy to kmemdup. Removed now unused stack variables. Removed unnecessary parentheses. Neatened alignment. for brcm80211 driver files listed below: Acked-by: Arend van Spriel ar...@broadcom.com Signed-off-by: Joe Perches j...@perches.com --- Let me know if you want multiple small patches instead. drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 5 +-- drivers/net/wireless/brcm80211/brcmfmac/usb.c | 7 ++-- -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V3 0/5] UVC webcam gadget related changes
Hi Bhupesh, On Wednesday 30 January 2013 15:56:52 Bhupesh SHARMA wrote: On Monday, January 21, 2013 6:16 PM Laurent Pinchart wrote: On Friday 18 January 2013 20:46:59 Felipe Balbi wrote: On Thu, Jan 17, 2013 at 04:23:48PM +0530, Bhupesh Sharma wrote: This patchset tries to enhance the UVC webcam gadget driver and is based on Laurent's git tree available here (head uvc-gadget): git://linuxtv.org/pinchartl/uvcvideo.git Note that to ease review and integration of these patches, I have rebased them on Laurent's repo and all the relevant patches after review can be pushed in Felipe's repo in one go. The patches 3/5 and 4/5 in this patchset try to handle all the review comments received on the following UVC gadget related patches: [PATCH V2 1/2] usb: gadget/uvc: Port UVC webcam gadget to use videobuf2 framework [PATCH V2 2/2] usb: gadget/uvc: Add support for 'USB_GADGET_DELAYED_STATUS' response for a set_intf(alt-set 1) command which can be viewed here: [1] http://www.spinics.net/lists/linux-usb/msg68297.html [2] http://www.spinics.net/lists/linux-usb/msg68298.html I have tested this patchset on a super-speed compliant USB device controller (DWC3), with the VIVI capture device acting as a dummy source of video data and I also have modified the 'uvc-gadget' application written by Laurent (original application available here: http://git.ideasonboard.org/uvc-gadget.git) for testing the complete flow from V4L2 to UVC domain and vice versa. Laurent, do you wanna queue this yourself or should I take it ? I was away last week, please give me a couple of days to review the patches. I'll take them in my tree with the other UVC gadget patches I have and I'll send you a pull request. Did you get any time to review this patchset? Sorry for the delay. I'm reviewing the patches now. I've rebased my uvcvideo-gadget branch on top of v3.8-rc6 and resolved the conflicts. As your 1/5 usb: gadget/uvc: Fix VS_INPUT_HEADER.bEndpointAddress and Video Streaming.bEndpointAddress values patch fixes a bug introduced in usb: gadget/uvc: Configure the streaming endpoint based on the speed, do you mind if I squash it with that commit to avoid breaking bisection ? I would like to send other patches which eliminate the need for doing any copy from CPU to copy the video frame into the USB request's buffer, in-case the underlying UDC controller supports Scatter-Gather DMA. Very nice ! I plan to queue them up after you merge all the UVC related patches to your repo and send a pull request to Felipe, so that I can rebase the new patches on top of the merged repo. OK, I'll speed up review of this patch series. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V3 2/5] usb: gadget/uvc: Make video streaming buffer size compliant to USB3.0 SS specs
Hi Bhupesh, Thank you for the patch. On Thursday 17 January 2013 16:23:50 Bhupesh Sharma wrote: As per the USB3.0 specs, the bandwidth requirements of a UVC's video streaming endpoint will change to support super-speed. These changes will be dependent on whether the UVC video streaming endpoint is Bulk or Isochronous: - If video streaming endpoint is Isochronous: As per Section 4.4.8.2 (Isochronous Transfer Bandwidth Requirements) of the USB3.0 specs: A SuperSpeed isochronous endpoint can move up to three burst transactions of up to 16 maximum sized packets (3 * 16 * 1024 bytes) per service interval. - If video streaming endpoint is Bulk: As per 4.4.6.1 (Bulk Transfer Data Packet Size) of the USB3.0 specs: An endpoint for bulk transfers shall set the maximum data packet payload size in its endpoint descriptor to 1024 bytes. It also specifies the burst size that the endpoint can accept from or transmit on the SuperSpeed bus. The allowable burst size for a bulk endpoint shall be in the range of 1 to 16. So, in the Isochronous case, we can define the USB request's buffer to be equal to = (Maximum packet size) * (bMaxBurst + 1) * (Mult + 1), so that the UDC driver can try to send out this buffer in one Isochronous service interval. The same computation will hold good for the Bulk case as the Mult value is 0 here and we can have a USB request buffer of maximum 16 * 1024 bytes size, which can be sent out by the UDC driver as per the Bulk bandwidth allocation on the USB3 bus. This patch adds the above-mentioned support and is also USB2.0 backward compliant. This looks good to me, except... Signed-off-by: Bhupesh Sharma bhupesh.sha...@st.com --- drivers/usb/gadget/uvc_video.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/uvc_video.c b/drivers/usb/gadget/uvc_video.c index b0e53a8..f7d1913 100644 --- a/drivers/usb/gadget/uvc_video.c +++ b/drivers/usb/gadget/uvc_video.c @@ -235,7 +235,10 @@ uvc_video_alloc_requests(struct uvc_video *video) BUG_ON(video-req_size); for (i = 0; i UVC_NUM_REQUESTS; ++i) { - video-req_buffer[i] = kmalloc(video-ep-maxpacket, GFP_KERNEL); + video-req_buffer[i] = kmalloc(video-ep-maxpacket * + video-ep-maxburst * If I'm not mistaken maxburst is 0 for FS and HS endpoints (from config_ep_by_speed in drivers/usb/gadget/composite.c). The buffer size will then be pretty small :-) + (video-ep-mult + 1), + GFP_KERNEL); if (video-req_buffer[i] == NULL) goto error; @@ -252,7 +255,9 @@ uvc_video_alloc_requests(struct uvc_video *video) list_add_tail(video-req[i]-list, video-req_free); } - video-req_size = video-ep-maxpacket; + video-req_size = video-ep-maxpacket * video-ep-maxburst * + (video-ep-mult + 1); + return 0; error: -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V3 4/5] usb: gadget/uvc: Add support for 'USB_GADGET_DELAYED_STATUS' response for a set_intf(alt-set 1) command
Hi Bhupesh, Thank you for the patch. On Thursday 17 January 2013 16:23:52 Bhupesh Sharma wrote: This patch adds the support in UVC webcam gadget design for providing USB_GADGET_DELAYED_STATUS in response to a set_interface(alt setting 1) command issue by the Host. The current UVC webcam gadget design generates a STREAMON event corresponding to a set_interface(alt setting 1) command from the Host. This STREAMON event will eventually be routed to a real V4L2 device. To start video streaming, it may be required to perform some register writes to a camera sensor device over slow external busses like I2C or SPI. So, it makes sense to ensure that we delay the STATUS stage of the set_interface (alt setting 1) command. Otherwise, a lot of ISOC IN tokens sent by the Host will be replied to by zero-length packets by the webcam device. On certain Hosts this may even lead to ISOC URBs been cancelled from the Host side. So, as soon as we finish doing all the streaming related stuff on the real V4L2 device, we call a STREAMON ioctl on the UVC side and from here we call the 'usb_composite_setup_continue' function to complete the status stage of the set_interface(alt setting 1) command. Further, we need to ensure that we queue no video buffers on the UVC webcam gadget, until we de-queue a video buffer from the V4L2 device. So, the application should call the STREAMON on UVC side only when it has dequeued sufficient buffers from the V4L2 side and queued them to the UVC gadget. Signed-off-by: Bhupesh Sharma bhupesh.sha...@st.com This looks good to me, Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com I've applied it to my tree with the commit message reflowed to fit into git's 72 characters default line length. --- drivers/usb/gadget/f_uvc.c| 15 +-- drivers/usb/gadget/uvc.h |1 + drivers/usb/gadget/uvc_v4l2.c | 14 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index 1769f3e..34612b0 100644 --- a/drivers/usb/gadget/f_uvc.c +++ b/drivers/usb/gadget/f_uvc.c @@ -265,6 +265,13 @@ uvc_function_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) return 0; } +void uvc_function_setup_continue(struct uvc_device *uvc) +{ + struct usb_composite_dev *cdev = uvc-func.config-cdev; + + usb_composite_setup_continue(cdev); +} + static int uvc_function_get_alt(struct usb_function *f, unsigned interface) { @@ -327,7 +334,7 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt) v4l2_event_queue(uvc-vdev, v4l2_event); uvc-state = UVC_STATE_CONNECTED; - break; + return 0; case 1: if (uvc-state != UVC_STATE_CONNECTED) @@ -344,15 +351,11 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt) memset(v4l2_event, 0, sizeof(v4l2_event)); v4l2_event.type = UVC_EVENT_STREAMON; v4l2_event_queue(uvc-vdev, v4l2_event); - - uvc-state = UVC_STATE_STREAMING; - break; + return USB_GADGET_DELAYED_STATUS; default: return -EINVAL; } - - return 0; } static void diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h index 93b0c11..9391993 100644 --- a/drivers/usb/gadget/uvc.h +++ b/drivers/usb/gadget/uvc.h @@ -190,6 +190,7 @@ struct uvc_file_handle * Functions */ +extern void uvc_function_setup_continue(struct uvc_device *uvc); extern void uvc_endpoint_stream(struct uvc_device *dev); extern void uvc_function_connect(struct uvc_device *uvc); diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c index 134bfe5..d03e6c7 100644 --- a/drivers/usb/gadget/uvc_v4l2.c +++ b/drivers/usb/gadget/uvc_v4l2.c @@ -245,7 +245,19 @@ uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) if (*type != video-queue.queue.type) return -EINVAL; - return uvc_video_enable(video, 1); + /* Enable UVC video. */ + ret = uvc_video_enable(video, 1); + if (ret 0) + return ret; + + /* + * Complete the alternate setting selection setup phase now that + * userspace is ready to provide video frames. + */ + uvc_function_setup_continue(uvc); + uvc-state = UVC_STATE_STREAMING; + + return 0; } case VIDIOC_STREAMOFF: -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V3 5/5] usb: gadget/uvc: Add support for 'get_unmapped_area' for MMUless architectures
Hi Bhupesh, Thank you for the patch. On Thursday 17 January 2013 16:23:53 Bhupesh Sharma wrote: This patch adds the support for 'get_unmapped_area' in UVC gadget which is called when the 'mmap' system call is executed on MMUless architectures. Signed-off-by: Bhupesh Sharma bhupesh.sha...@st.com --- drivers/usb/gadget/uvc_queue.c | 18 ++ drivers/usb/gadget/uvc_queue.h |5 + drivers/usb/gadget/uvc_v4l2.c | 15 +++ 3 files changed, 38 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c index bd20fab..b8787a0 100644 --- a/drivers/usb/gadget/uvc_queue.c +++ b/drivers/usb/gadget/uvc_queue.c @@ -226,6 +226,24 @@ static int uvc_queue_mmap(struct uvc_video_queue *queue, return ret; } +#ifndef CONFIG_MMU +/* + * Get unmapped area. + * + * NO-MMU arch need this function to make mmap() work correctly. + */ +unsigned long uvc_queue_get_unmapped_area(struct uvc_video_queue *queue, + unsigned long pgoff) This symbol is already defined in the uvcvideo host driver. Queue handling code is duplicating, sharing it between the two drivers is somewhere on my to- do list, but in the meantime a quick workaround is to make this function static as uvc_queue.c is #include'd in webcam.c. +{ + unsigned long ret; + + mutex_lock(queue-mutex); + ret = vb2_get_unmapped_area(queue-queue, 0, 0, pgoff, 0); + mutex_unlock(queue-mutex); + return ret; +} +#endif + /* * Cancel the video buffers queue. * diff --git a/drivers/usb/gadget/uvc_queue.h b/drivers/usb/gadget/uvc_queue.h index 47ad0b8..addfc3d 100644 --- a/drivers/usb/gadget/uvc_queue.h +++ b/drivers/usb/gadget/uvc_queue.h @@ -58,6 +58,11 @@ static inline int uvc_queue_streaming(struct uvc_video_queue *queue) return vb2_is_streaming(queue-queue); } +#ifndef CONFIG_MMU +extern unsigned long uvc_queue_get_unmapped_area(struct uvc_video_queue *queue, + unsigned long pgoff); +#endif + You could thus remove this change. #endif /* __KERNEL__ */ #endif /* _UVC_QUEUE_H_ */ diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c index d03e6c7..ec508d7 100644 --- a/drivers/usb/gadget/uvc_v4l2.c +++ b/drivers/usb/gadget/uvc_v4l2.c @@ -348,6 +348,18 @@ uvc_v4l2_poll(struct file *file, poll_table *wait) return mask; } +#ifndef CONFIG_MMU +static unsigned long uvc_v4l2_get_unmapped_area(struct file *file, + unsigned long addr, unsigned long len, unsigned long pgoff, + unsigned long flags) +{ + struct video_device *vdev = video_devdata(file); + struct uvc_device *uvc = video_get_drvdata(vdev); + + return uvc_queue_get_unmapped_area(uvc-video.queue, pgoff); +} +#endif + static struct v4l2_file_operations uvc_v4l2_fops = { .owner = THIS_MODULE, .open = uvc_v4l2_open, @@ -355,5 +367,8 @@ static struct v4l2_file_operations uvc_v4l2_fops = { .ioctl = uvc_v4l2_ioctl, .mmap = uvc_v4l2_mmap, .poll = uvc_v4l2_poll, +#ifndef CONFIG_MMU + .get_unmapped_area = uvc_v4l2_get_unmapped_area, +#endif }; -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers: net: Remove remaining alloc/OOM messages
On 02/07/2013 10:46 PM, Joe Perches wrote: alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/memcpy to kmemdup. Removed now unused stack variables. Removed unnecessary parentheses. Neatened alignment. Signed-off-by: Joe Perches j...@perches.com --- Let me know if you want multiple small patches instead. drivers/net/can/usb/ems_usb.c | 4 +- For ems_usb.c Acked-by: Marc Kleine-Budde m...@pengutronix.de regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH V3 0/5] UVC webcam gadget related changes
Hi Bhupesh, On Thursday 07 February 2013 23:39:07 Laurent Pinchart wrote: On Wednesday 30 January 2013 15:56:52 Bhupesh SHARMA wrote: On Monday, January 21, 2013 6:16 PM Laurent Pinchart wrote: On Friday 18 January 2013 20:46:59 Felipe Balbi wrote: On Thu, Jan 17, 2013 at 04:23:48PM +0530, Bhupesh Sharma wrote: This patchset tries to enhance the UVC webcam gadget driver and is based on Laurent's git tree available here (head uvc-gadget): git://linuxtv.org/pinchartl/uvcvideo.git Note that to ease review and integration of these patches, I have rebased them on Laurent's repo and all the relevant patches after review can be pushed in Felipe's repo in one go. The patches 3/5 and 4/5 in this patchset try to handle all the review comments received on the following UVC gadget related patches: [PATCH V2 1/2] usb: gadget/uvc: Port UVC webcam gadget to use videobuf2 framework [PATCH V2 2/2] usb: gadget/uvc: Add support for 'USB_GADGET_DELAYED_STATUS' response for a set_intf(alt-set 1) command which can be viewed here: [1] http://www.spinics.net/lists/linux-usb/msg68297.html [2] http://www.spinics.net/lists/linux-usb/msg68298.html I have tested this patchset on a super-speed compliant USB device controller (DWC3), with the VIVI capture device acting as a dummy source of video data and I also have modified the 'uvc-gadget' application written by Laurent (original application available here: http://git.ideasonboard.org/uvc-gadget.git) for testing the complete flow from V4L2 to UVC domain and vice versa. Laurent, do you wanna queue this yourself or should I take it ? I was away last week, please give me a couple of days to review the patches. I'll take them in my tree with the other UVC gadget patches I have and I'll send you a pull request. Did you get any time to review this patchset? Sorry for the delay. I'm reviewing the patches now. I've rebased my uvcvideo-gadget branch on top of v3.8-rc6 and resolved the conflicts. As your 1/5 usb: gadget/uvc: Fix VS_INPUT_HEADER.bEndpointAddress and Video Streaming.bEndpointAddress values patch fixes a bug introduced in usb: gadget/uvc: Configure the streaming endpoint based on the speed, do you mind if I squash it with that commit to avoid breaking bisection ? I've reviewed patches 1/5, 2/5, 4/5 and 5/5. I will handle patch 3 tomorrow. I have fixed the issue introduced by my usb: gadget/uvc: Configure the streaming endpoint based on the speed patch in the patch itself, so I haven't applied 1/5. 2/5 and 5/5 need to be reworked a bit. I've applied 4/5 to my tree and pushed the result to the uvcvideo-gadget branch on git://linuxtv.org/pinchartl/uvcvideo.git. Would you be able to test that branch ? If there's no issue I'll send a pull request to Felipe. I would like to send other patches which eliminate the need for doing any copy from CPU to copy the video frame into the USB request's buffer, in-case the underlying UDC controller supports Scatter-Gather DMA. Very nice ! I plan to queue them up after you merge all the UVC related patches to your repo and send a pull request to Felipe, so that I can rebase the new patches on top of the merged repo. OK, I'll speed up review of this patch series. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 05/10] USB: EHCI: make ehci-atmel a separate driver
Hi Manjunath Goudar, I test this patch based on linux master branch, the commit id is: 6bacaa9ddacb71c691d32c678d37bc59ffc71fac. (I am not sure this is the right place for testing). First, it has an compile error as following. After fix it, and tested, the EHCI doesn't work. ---8--- drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove': drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown' ---8--- And a little code style comments as following. On 2/8/2013 1:34, manjunath.gou...@linaro.org wrote: From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Atmel host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Cc: Alan Stern st...@rowland.harvard.edu Cc: Greg KH g...@kroah.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Rob Herring rob.herr...@calxeda.com Cc: Andrew Victor li...@maxim.org.za Cc: Nicolas Ferre nicolas.fe...@atmel.com Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/usb/host/Kconfig |7 drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-atmel.c | 78 ++--- drivers/usb/host/ehci-hcd.c |6 +--- 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 3689b7b..5a13f9d 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -176,6 +176,13 @@ config USB_EHCI_HCD_ORION ---help--- Enables support for the on-chip EHCI controller on Morvell Orion chips. Need blank line here. +config USB_EHCI_HCD_AT91 +tristate Support for Atmel on-chip EHCI USB controller +depends on USB_EHCI_HCD ARCH_AT91 +default y +---help--- + Enables support for the on-chip EHCI controller on + Atmel chips. config USB_EHCI_MSM bool Support for MSM on-chip EHCI USB controller [snip] +static void __exit ehci_atmel_cleanup(void) +{ + platform_driver_unregister(ehci_atmel_driver); +} +module_exit(ehci_atmel_cleanup); + +MODULE_DESCRIPTION(DRIVER_DESC); + +MODULE_ALIAS(platform:ehci-atmel); +MODULE_AUTHOR(Nicolas Ferre); +MODULE_LICENSE(GPL); + Remove the blank line here. As to it is the EOF. Best Regards, Bo Shen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
On 02/08/2013 04:02 AM, Ben Hutchings wrote: On Thu, 2013-02-07 at 21:39 +0800, Freddy Xin wrote: From: Freddy Xin fre...@asix.com.tw This is a resubmission. Added const to ethtool_ops structure and fixed the coding style of AX88179_BULKIN_SIZE array. Fixed the issue that the default MTU is not 1500. Added ax88179_change_mtu function and enabled the hardware jumbo frame function to support an MTU higher than 1500. Fixed indentation and empty line coding style errors. The _nopm version usb functions were added to access register in suspend and resume functions. Serveral variables allocted dynamically were removed and replaced by stack variables. ax88179_get_eeprom were modified from asix_get_eeprom in asix_common. This patch adds a driver for ASIX's AX88179 family of USB 3.0/2.0 to gigabit ethernet adapters. It's based on the AX88xxx driver but the usb commands used to access registers for AX88179 are completely different. This driver had been verified on x86 system with AX88179/AX88178A and Sitcomm LN-032 USB dongles. Signed-off-by: Freddy Xin fre...@asix.com.tw [...] --- /dev/null +++ b/drivers/net/usb/ax88179_178a.c [...] +struct ax88179_data { + u16 rxctl; +}; Should also be declared __packed, as on some architectures it may be padded to 4 bytes. rxctl is presumably required to be little-endian (__le16)? +struct ax88179_int_data { + u16 res1; + u8 link; + u16 res2; + u8 status; + u16 res3; +} __packed; Same here, the u16 fields are presumably little-endian? [...] +struct ax88179_rx_pkt_header { + u8 l4_csum_err:1, + l3_csum_err:1, + l4_type:3, + l3_type:2, + ce:1; + + u8 vlan_ind:3, + rx_ok:1, + pri:3, + bmc:1; + + u16 len:13, + crc:1, + mii:1, + drop:1; +} __packed; This won't work on both big-endian systems (assuming this works on x86). You apparently try to convert the structure in-place in ax88179_rx_fixup() by calling le32_to_cpus(); that may work if you define all the bitfields to be part of a u32 but it won't work with the current definition. [...] +static int +ax88179_set_features(struct net_device *net, netdev_features_t features) +{ + u8 tmp; + struct usbnet *dev = netdev_priv(net); + netdev_features_t changed = net-features ^ features; + + if (changed NETIF_F_TSO) + net-features ^= NETIF_F_TSO; + + if (changed NETIF_F_SG) + net-features ^= NETIF_F_SG; Don't change net-features; the caller will do that for you. + if (changed NETIF_F_IP_CSUM) { + ax88179_read_cmd(dev, AX_ACCESS_MAC, AX_TXCOE_CTL, 1, 1, tmp); + tmp ^= AX_TXCOE_TCP | AX_TXCOE_UDP; + ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_TXCOE_CTL, 1, 1, tmp); + + net-features ^= NETIF_F_IP_CSUM; + } [...] Isn't tmp going to be in little-endian byte order, so this doesn't work correctly on a big-endian system? There are a lot of reads and writes of 16-bit registers using ax88179_{read,write}_cmd(); maybe you should add ax88179_{read,write}_le16() to handle this specific case. Ben. Thank you, Ben. I will fix bugs and test it on a big-endian system. Freddy -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 03/10] USB: EHCI: make ehci-spear a separate driver
On Thu, Feb 7, 2013 at 11:04 PM, manjunath.gou...@linaro.org wrote: From: Manjunath Goudar manjunath.gou...@linaro.org Separate the Spear host controller driver from ehci-hcd host code into its own driver module. Please write spear as SPEAr everywhere, leaving functions/variables/config options. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Signed-off-by: Deepak Saxena dsax...@linaro.org Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Viresh Kumar viresh.li...@gmail.com Cc: Shiraz Hashim shiraz.has...@st.com Cc: linux-usb@vger.kernel.org Cc: spear-de...@list.st.com --- drivers/usb/host/Kconfig |8 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-hcd.c |6 +--- drivers/usb/host/ehci-spear.c | 77 ++--- 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 11e102e..4413075 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -162,6 +162,14 @@ config USB_EHCI_HCD_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later chips. +config USB_EHCI_HCD_SPEAR +tristate Support for ST spear on-chip EHCI USB controller +depends on USB_EHCI_HCD PLAT_SPEAR +default y +---help--- + Enables support for the on-chip EHCI controller on + ST spear chips. + config USB_EHCI_MSM bool Support for MSM on-chip EHCI USB controller depends on USB_EHCI_HCD ARCH_MSM diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index b54a597..c97f4ab 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_USB_EHCI_PCI)+= ehci-pci.o obj-$(CONFIG_USB_EHCI_HCD_PLATFORM)+= ehci-platform.o obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o +obj-$(CONFIG_USB_EHCI_HCD_SPEAR)+= ehci-spear.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index aaf93ca..68cea63 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1292,11 +1292,6 @@ MODULE_LICENSE (GPL); #definePLATFORM_DRIVER vt8500_ehci_driver #endif -#ifdef CONFIG_PLAT_SPEAR -#include ehci-spear.c -#define PLATFORM_DRIVERspear_ehci_hcd_driver -#endif - #ifdef CONFIG_USB_EHCI_MSM #include ehci-msm.c #define PLATFORM_DRIVERehci_msm_driver @@ -1343,6 +1338,7 @@ MODULE_LICENSE (GPL); !IS_ENABLED(CONFIG_USB_EHCI_MXC) \ !defined(PLATFORM_DRIVER) \ !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) \ + !IS_ENABLED(CONFIG_PLAT_SPEAR) \ !defined(PS3_SYSTEM_BUS_DRIVER) \ !defined(OF_PLATFORM_DRIVER) \ !defined(XILINX_OF_PLATFORM_DRIVER) diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index 466c1bb..6e42cee 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -11,11 +11,25 @@ * more details. */ +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/usb/hcd.h +#include linux/io.h + + remove these blank lines. #include linux/clk.h #include linux/jiffies.h #include linux/of.h #include linux/platform_device.h #include linux/pm.h +#include linux/dma-mapping.h Keep all of them in alphabetical order. +#include ehci.h + +#define DRIVER_DESC EHCI spear driver + +static const char hcd_name[] = ehci-spear; struct spear_ehci { struct ehci_hcd ehci; @@ -43,40 +57,7 @@ static int ehci_spear_setup(struct usb_hcd *hcd) return ehci_setup(hcd); } - -static const struct hc_driver ehci_spear_hc_driver = { - .description= hcd_name, - .product_desc = SPEAr EHCI, - .hcd_priv_size = sizeof(struct spear_ehci), - - /* generic hardware linkage */ - .irq= ehci_irq, - .flags = HCD_MEMORY | HCD_USB2, - - /* basic lifecycle operations */ - .reset = ehci_spear_setup, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* managing i/o requests and associated device resources */ - .urb_enqueue= ehci_urb_enqueue, - .urb_dequeue= ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - - /* scheduling support */ - .get_frame_number =
RE: [PATCH v3] usb: phy: moving all PHY API definitions to usb/phy directory
-Original Message- From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- ow...@vger.kernel.org] On Behalf Of Stephen Warren Sent: Thursday, February 07, 2013 10:26 PM To: kishon Cc: Venu Byravarasu; ba...@ti.com; gre...@linuxfoundation.org; linux- ker...@vger.kernel.org; linux-usb@vger.kernel.org Subject: Re: [PATCH v3] usb: phy: moving all PHY API definitions to usb/phy directory On 02/07/2013 06:38 AM, kishon wrote: On Thursday 07 February 2013 05:02 PM, Venu Byravarasu wrote: As drivers/usb/otg/otg.c contains most of the PHY related APIs which are not OTG specific, moving them to more logical place under drivers/usb/phy. diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile index b13faa1..886be13 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -4,6 +4,7 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG +obj-$(CONFIG_USB_COMMON)+= phy.o I think we should have a separate config for PHYs. There might be controllers which dont need separate PHY. But we can have that as a separate patch later since we might want to change the Kconfig of other UDC drivers. Thanks Kishon for review comments. Agree to your comments that we can add a new config for PHY push it in a separate patch. +/* + * phy.c -- USB PHY utility code + * + * Copyright (C) 2004 Texas Instruments You can update this to 2013. I'm not sure if anyone other that TI can do that? +EXPORT_SYMBOL_GPL(usb_bind_phy); + + Unnecessary spaces here. Will remove them in next patch update. Thanks for the review. It was very difficult to find you review comments since you quoted the entire patch rather than just the few pieces you were commenting on... You might want to do this patch after applying *[PATCH] usb: otg: use try_module_get in all usb_get_phy functions and add missing module_put* by Marc. Venu, please make sure you include the changes in that patch in your Tegra USB/PHY driver rework too, before you post it upstream. Sure Stephen, thanks for your comments. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 02/10] USB: EHCI: make ehci-omap a separate driver
HI, On Thu, Feb 07, 2013 at 11:03:59PM +0530, manjunath.gou...@linaro.org wrote: From: Manjunath Goudar manjunath.gou...@linaro.org Separate the OMAP host controller driver from ehci-hcd host code into its own driver module. Signed-off-by: Manjunath Goudar manjunath.gou...@linaro.org Signed-off-by: Arnd Bergmann a...@linaro.org Cc: Felipe Balbi ba...@ti.com Cc: Greg KH g...@kroah.com Cc: Alan Stern st...@rowland.harvard.edu Cc: linux-usb@vger.kernel.org Cc: Tony Lindgren t...@atomide.com Alan and Roger have already been working on this for ehci-omap. Their patches might already be in Greg's queue... -- balbi signature.asc Description: Digital signature