summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-12-13usb: renesas_usbhs: add usbhsh_endpoint_detach_all() for error caseKuninori Morimoto
This patch adds usbhsh_endpoint_detach_all() for error case. usbhs_endpoitn_xxx() functions were moved to upper side in source code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-13usb: renesas_usbhs: modify device attach methodKuninori Morimoto
Current renesas_usbhs had been assigning udev to each urb. It was executed even though it was device0. For this reason, the device0 had to set the new device address which has still not been assigned. (it will be assigned on next step). Current renesas_usbhs used fixed address for it. but it is not good for USB hub support. This patch modifies this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: pop packet when urb dequeuedKuninori Morimoto
usbhsh_ureq_free() is not enough when urb dequeued. Without this patch, the driver can not recognize re-connected USB device after USB hub disconnected Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add lost error value when enqueueKuninori Morimoto
usbhsh_urb_enqueue() didn't have error value when usbhsh_device_attach() failed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: mv_udc: replace some debug infoNeil Zhang
replace some debug info, make it easy to use. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: mv_udc: refine suspend/resume functionNeil Zhang
This patch impletments system suspend/resume functions for Marvell otg controller. If OTG is enabled, OTG driver will do most of the work. If not, we will check clock gating. If clock gating is enabled, the UDC will be start/stop automatically. If not, UDC will be start/stop in suspend/resume functions. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: mv_udc: refine the clock relative codeNeil Zhang
Split the clock relative code from clock gating solution. Then we can remove some duplicate code, make the code more clean. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: mv_udc: disable ISR when stoppedNeil Zhang
When device is stopped, there is no need to handle ISR. Especially when otg switch to HOST mode. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: mv_udc: add otg relative codeNeil Zhang
Add otg relative code, make it possible to switch between host and device. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: Use kcalloc instead of kzalloc to allocate arrayThomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Acked-by: Michal Nazarewicz <[4]mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: remove the_controller_linkKuninori Morimoto
current renesas_usbhs is using new style udc_start/stop from af1d7056a5c1e5eaaf807ddd1423101db84668d0 (usb: gadget: renesas: convert to new style). with this patch we can finally remove the global "the_controller_link" Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add test-mode supportKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: call usbhsg_queue_pop() when pipe disable.Kuninori Morimoto
When poping packet from queue, it needs correct end procedure. This patch call usbhsg_queue_pop() in usbhsg_pipe_disable(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: send packet in necessary timing.Kuninori Morimoto
Current renesas_usbhs driver always tries to send packet in end of recip handler. But it breaks chapter 9 EndpointHalt test. This patch fixup this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add basic USB_REQ_GET_STATUS supportKuninori Morimoto
This patch adds basic get-status support for chapter 9 test. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add basic USB_REQ_SET_FEATURE supportKuninori Morimoto
This patch adds basic set-feature support for chapter 9 test. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: add usbhs_pipe_is_stall()Kuninori Morimoto
This is preparation for chapter 9 test Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: renesas_usbhs: remove superfluous usbhs_lock from recip handlerKuninori Morimoto
recip handler will call various functions which are holding usbhs_lock. This patch removes superfluous usbhs_lock from recip handler to escape double lock. [ balbi@ti.com : brushed up commit log a bit ] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: rename usb_gadget_driver::speed to max_speedMichal Nazarewicz
This commit renames the “speed” field of the usb_gadget_driver structure to “max_speed”. This is so that to make it more apparent that the field represents the maximum speed gadget driver can support. This also make the field look more like fields with the same name in usb_gadget and usb_composite_driver structures. All of those represent the *maximal* speed given entity supports. After this commit, there are the following fields in various structures: * usb_gadget::speed - the current connection speed, * usb_gadget::max_speed - maximal speed UDC supports, * usb_gadget_driver::max_speed - maximal speed gadget driver supports, and * usb_composite_driver::max_speed - maximal speed composite gadget supports. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: replace usb_gadget::is_dualspeed with max_speedMichal Nazarewicz
This commit replaces usb_gadget's is_dualspeed field with a max_speed field. [ balbi@ti.com : Fixed DWC3 driver ] Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_device_xx()Kuninori Morimoto
current mod_host used usbhs_device_alloc/free(), but allocated variable was attached to each xx->hcpriv. The intuitively clear name was not xxx_alloc/free() but xxx_attach/detach(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_endpoint_xx()Kuninori Morimoto
current mod_host used usbhs_endpoint_alloc/free(), but allocated variable was attached to each xx->hcpriv. The intuitively clear name was not xxx_alloc/free() but xxx_attach/detach(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: parameter cleanup for usbhsh_xx_queue_push()Kuninori Morimoto
This patch remove unneeded parameter from usbhsh_xx_queue_push() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: cleanup usbhsh_endpoint_xxx()Kuninori Morimoto
this patch cleanup - make sure static function - remove unneeded label - useless local variable were removed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: adds spin lock area on mod_hostKuninori Morimoto
spin lock was needed in mod_host. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: check device0 status when allocKuninori Morimoto
device0 was treated without checking in usbhsh_device_alloc(). but "udev->usbv" and "dev_set_drvdata()" will be overwritten if device0 was multi-allocated. This patch fixes this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: remove usbhsh_request listKuninori Morimoto
mod_host had usbhsh_request active/free list. it was almost meaningless, and vainly complicated. This patch remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: usbhs_set_device_config() care upphub/hubportKuninori Morimoto
current usbhs_set_device_config() didn't care upphub/hubport. This patch adds its value. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: cleanup usbhs_endpoint_disable()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: modify function name of usbhs_set_device_xx()Kuninori Morimoto
it was device configuration setting function, not only speed. This patch modify function name usbhs_set_device_speed() -> usbhs_set_device_config() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: usbhsh_ureq_alloc/free() care urb->hcprivKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: cleanup complicated ureq alloc/freeKuninori Morimoto
DCP data/status stage needs ureq to usbhs_pkt_push(), but sometimes, there is no data stage. In that case, allocated ureq was not freed, Current ureq alloc/free pair were difficult to understand. This patch removed unnecessary/un-understandable ureq alloc from usbhsh_urb_enqueue(), and create simpler alloc/free pair. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: drop dependency for mod_gadgetKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: mass_storage: support multi-luns with different logic block sizeYuping Luo
With Peiyu's patch "gadget: mass_storage: adapt logic block size to bound block devices" (http://www.spinics.net/lists/linux-usb/msg50791.html), now mass storage can adjust logic block size dynamically based on real devices. Then there is one issue caused by it, if two luns have different logic block size, mass storage can't work. Let's check the current software flow: 1. get_next_command(): call received_cbw(); 2. received_cbw(): update common->lun = cbw->Lun, but common->curlen is not updated; 3. do_scsi_command(): in READ_X and WRITE_X commands, common->data_size_from_cmnd is updated by common->curlun->blkbits; 4. check_command(): update common->curlun according to common->lun As you can see, the step 3 uses wrong common->curlun, then wrong common->curlun->blkbits. If the two luns have same blkbits, there isn't issue. Otherwise, both will fail. This patch moves the common->curlun update to step 1, then make sure step 3 gets right blkbits and data_size_from_cmnd. Cc: Peiyu Li <peiyu.li@csr.com> Signed-off-by: YuPing Luo <yuping.luo@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: unified callback functionKuninori Morimoto
renesas_usbhs needs callback for notify hotplug. but it were 2 methods which are almost same. This patch unified these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: add platform power control functionKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: tidyup the unit of detection_delayKuninori Morimoto
detection_delay was assumed as msec Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: tidyup mod_host request variable nameKuninori Morimoto
renesas_usbhs driver use "req" for struct usb_ctrlrequest, and "ureq" for struct usbhsh_request Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: tidyup usbhs_sys_clock_ctrl() was local functionKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: remove usbhs_sys_usb_ctrl()Kuninori Morimoto
usbhs_sys_usb_ctrl() can collect into usbhs_sys_host/function_ctrl(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: renesas_usbhs: remove usbhs_sys_hispeed_ctrl()Kuninori Morimoto
usbhs_sys_hispeed_ctrl() can collect into usbhs_sys_host/function_ctrl(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12USB: ci13xxx_udc: handle controllers with less than 16 EPsMarc Kleine-Budde
The ci13xxx_udc driver checks the number of endpoints in the udc controller, however some routines expect that the hardware has 16 bidirectional endpoints. This patch improves the driver to work on controllers with less than 16 endpoints like the udc controller found on freescale's mx23 and mx28. Tested-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12USB: ci13xxx_udc: make suspend and resume in gadget driver optionalMarc Kleine-Budde
Some gadget drivers don't implement suspend and/or resume functions. Instead of changing the gadget drivers, make suspend and resume in ci13xxx_udc (following other udc drivers) optional. Tested-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-09Linux 3.2-rc5Linus Torvalds
2011-12-09Merge git://git.samba.org/sfrench/cifs-2.6Linus Torvalds
* git://git.samba.org/sfrench/cifs-2.6: cifs: check for NULL last_entry before calling cifs_save_resume_key cifs: attempt to freeze while looping on a receive attempt cifs: Fix sparse warning when calling cifs_strtoUCS CIFS: Add descriptions to the brlock cache functions
2011-12-09Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, efi: Calling __pa() with an ioremap()ed address is invalid x86, hpet: Immediately disable HPET timer 1 if rtc irq is masked x86/intel_mid: Kconfig select fix x86/intel_mid: Fix the Kconfig for MID selection
2011-12-09Merge branch 'spi/for-3.2' of git://git.pengutronix.de/git/wsa/linux-2.6Linus Torvalds
* 'spi/for-3.2' of git://git.pengutronix.de/git/wsa/linux-2.6: spi/gpio: fix section mismatch warning spi/fsl-espi: disable CONFIG_SPI_FSL_ESPI=m build spi/nuc900: Include linux/module.h spi/ath79: fix compile error due to missing include
2011-12-09Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds
* 'for-linus' of git://neil.brown.name/md: md: raid5 crash during degradation md/raid5: never wait for bad-block acks on failed device. md: ensure new badblocks are handled promptly. md: bad blocks shouldn't cause a Blocked status on a Faulty device. md: take a reference to mddev during sysfs access. md: refine interpretation of "hold_active == UNTIL_IOCTL". md/lock: ensure updates to page_attrs are properly locked.
2011-12-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tileLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: use new generic {enable,disable}_percpu_irq() routines drivers/net/ethernet/tile: use skb_frag_page() API asm-generic/unistd.h: support new process_vm_{readv,write} syscalls arch/tile: fix double-free bug in homecache_free_pages() arch/tile: add a few #includes and an EXPORT to catch up with kernel changes.
2011-12-09Merge branch 'iommu/fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu * 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: MAINTAINERS: Update amd-iommu F: patterns iommu/amd: Fix typo in kernel-parameters.txt iommu/msm: Fix compile error in mach-msm/devices-iommu.c Fix comparison using wrong pointer variable in dma debug code