1. 13 8月, 2013 8 次提交
    • M
      USBNET: ax88179_178a: enable tso if usb host supports sg dma · 3804fad4
      Ming Lei 提交于
      This patch enables 'can_dma_sg' flag for ax88179_178a device
      if the attached host controller supports building packet from
      discontinuous buffers(DMA SG is possible), so TSO can be enabled
      and skb fragment buffers can be passed to usb stack via urb->sg
      directly.
      
      With the patch, system CPU utilization decreased ~50% and throughput
      increased by ~10% when doing iperf client test on one ARM A15 dual
      core board.
      
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Grant Grundler <grundler@google.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Freddy Xin <freddy@asix.com.tw>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Acked-by: NEric Dumazet <edumazet@gmail.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3804fad4
    • M
      USBNET: support DMA SG · 638c5115
      Ming Lei 提交于
      This patch introduces support of DMA SG if the USB host controller
      which usbnet device is attached to is capable of building packet from
      discontinuous buffers.
      
      The patch supports passing the skb fragment buffers to usb stack directly
      via urb->sg.
      
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Grant Grundler <grundler@google.com>
      Cc: Freddy Xin <freddy@asix.com.tw>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      638c5115
    • M
      USB: XHCI: mark no_sg_constraint · fc76051c
      Ming Lei 提交于
      This patch marks all xHCI controllers as no_sg_constraint
      since xHCI supports building packet from discontinuous buffers.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc76051c
    • M
      USB: introduce usb_device_no_sg_constraint() helper · bcc48f1a
      Ming Lei 提交于
      Some host controllers(such as xHCI) can support building
      packet from discontinuous buffers, so introduce one flag
      and helper for this kind of host controllers, then the
      feature can help some applications(such as usbnet) by
      supporting arbitrary length of sg buffers.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bcc48f1a
    • M
      USB: EHCI: support running URB giveback in tasklet context · 428aac8a
      Ming Lei 提交于
      All 4 transfer types can work well on EHCI HCD after switching to run
      URB giveback in tasklet context, so mark all HCD drivers to support
      it.
      
      Also we don't need to release ehci->lock during URB giveback any more.
      
      >From below test results on 3 machines(2 ARM and one x86), time
      consumed by EHCI interrupt handler droped much without performance
      loss.
      
      1 test description
      1.1 mass storage performance test:
      - run below command 10 times and compute the average performance
      
          dd if=/dev/sdN iflag=direct of=/dev/null bs=200M count=1
      
      - two usb mass storage device:
      A: sandisk extreme USB 3.0 16G(used in test case 1 & case 2)
      B: kingston DataTraveler G2 4GB(only used in test case 2)
      
      1.2 uvc function test:
      - run one simple capture program in the below link
      
         http://kernel.ubuntu.com/~ming/up/capture.c
      
      - capture format 640*480 and results in High Bandwidth mode on the
      uvc device: Z-Star 0x0ac8/0x3450
      
      - on T410(x86) laptop, also use guvcview to watch video capture/playback
      
      1.3 about test2 and test4
      - both two devices involved are tested concurrently by above test items
      
      1.4 how to compute irq time(the time consumed by ehci_irq)
      - use trace points of irq:irq_handler_entry and irq:irq_handler_exit
      
      1.5 kernel
      3.10.0-rc3-next-20130528
      
      1.6 test machines
      Pandaboard A1: ARM CortexA9 dural core
      Arndale board: ARM CortexA15 dural core
      T410: i5 CPU 2.67GHz quad core
      
      2 test result
      2.1 test case1: single mass storage device performance test
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  25.280(avg:145,max:772)	| 25.540(avg:14, max:75)
      Arndale board:  29.700(avg:33, max:129)	| 29.700(avg:10,  max:50)
      T410: 		34.430(avg:17, max:154*)| 34.660(avg:12, max:155)
      ---------------------------------------------------------------------
      
      2.2 test case2: two mass storage devices' performance test
      --------------------------------------------------------------------
      		upstream 			| patched
      		perf(MB/s)+irq time(us)		| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  15.840/15.580(avg:158,max:1216)	| 16.500/16.160(avg:15,max:139)
      Arndale board:  17.370/16.220(avg:33 max:234)	| 17.480/16.200(avg:11, max:91)
      T410: 		21.180/19.820(avg:18 max:160)	| 21.220/19.880(avg:11, max:149)
      ---------------------------------------------------------------------
      
      2.3 test case3: one uvc streaming test
      - uvc device works well(on x86, luvcview can be used too and has
      same result with uvc capture)
      --------------------------------------------------------------------
      		upstream 		| patched
      		irq time(us)		| irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  (avg:445, max:873)	| (avg:33, max:44)
      Arndale board:  (avg:316, max:630)	| (avg:20, max:27)
      T410: 		(avg:39,  max:107)	| (avg:10, max:65)
      ---------------------------------------------------------------------
      
      2.4 test case4: one uvc streaming plus one mass storage device test
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  20.340(avg:259,max:1704)| 20.390(avg:24, max:101)
      Arndale board:  23.460(avg:124,max:726)	| 23.370(avg:15, max:52)
      T410: 		28.520(avg:27, max:169)	| 28.630(avg:13, max:160)
      ---------------------------------------------------------------------
      
      2.5 test case5: read single mass storage device with small transfer
      - run below command 10 times and compute the average speed
      
       dd if=/dev/sdN iflag=direct of=/dev/null bs=4K count=4000
      
      1), test device A:
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  6.5(avg:21, max:64)	| 6.5(avg:10, max:24)
      Arndale board:  8.13(avg:12, max:23)	| 8.06(avg:7,  max:17)
      T410: 		6.66(avg:13, max:131)   | 6.84(avg:11, max:149)
      ---------------------------------------------------------------------
      
      2), test device B:
      --------------------------------------------------------------------
      		upstream 		| patched
      		perf(MB/s)+irq time(us)	| perf(MB/s)+irq time(us)
      --------------------------------------------------------------------
      Pandaboard A1:  5.5(avg:21,max:43)	| 5.49(avg:10, max:24)
      Arndale board:  5.9(avg:12, max:22)	| 5.9(avg:7, max:17)
      T410: 		5.48(avg:13, max:155)	| 5.48(avg:7, max:140)
      ---------------------------------------------------------------------
      
      * On T410, sometimes read ehci status register in ehci_irq takes more
      than 100us, and the problem has been reported on the link:
      
      	http://marc.info/?t=137065867300001&r=1&w=2Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      428aac8a
    • M
      USB: EHCI: improve interrupt qh unlink · 9118f9eb
      Ming Lei 提交于
      ehci-hcd currently unlinks an interrupt QH when it becomes empty, that
      is, after its last URB completes.  This works well because in almost
      all cases, the completion handler for an interrupt URB resubmits the
      URB; therefore the QH doesn't become empty and doesn't get unlinked.
      
      When we start using tasklets for URB completion, this scheme won't work
      as well.  The resubmission won't occur until the tasklet runs, which
      will be some time after the completion is queued with the tasklet.
      During that delay, the QH will be empty and so will be unlinked
      unnecessarily.
      
      To prevent this problem, this patch adds a 5-ms time delay before empty
      interrupt QHs are unlinked.  Most often, during that time the interrupt
      URB will be resubmitted and thus we can avoid unlinking the QH.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9118f9eb
    • M
      USB: EHCI: improve ehci_endpoint_disable · 35371e4f
      Ming Lei 提交于
      The patch does the below improvement:
      
      - think QH_STATE_COMPLETING as unlinking state since all URBs on the
      endpoint should be in unlinking or unlinked when doing endpoint_disable()
      
      - add "WARN_ON(!list_empty(&qh->qtd_list));" if qh->qh_state is
      QH_STATE_LINKED because there shouldn't be any active transfer in qh
      
      - when qh->qh_state is QH_STATE_LINKED, the QH(async or periodic)
      should be in its corresponding list, so the search through the async
      list isn't necessary.
      
      - unlink periodic QH to speed up unlinking if the QH is in linked
      state
      
      Basically, only the last one is related with this patchset because
      the assumption of "periodic qh self-unlinks on empty" isn't true
      any more when we introduce unlink-wait for periodic qh.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      35371e4f
    • M
      USB: HCD: support giveback of URB in tasklet context · 94dfd7ed
      Ming Lei 提交于
      This patch implements the mechanism of giveback of URB in
      tasklet context, so that hardware interrupt handling time for
      usb host controller can be saved much, and HCD interrupt handling
      can be simplified.
      
      Motivations:
      
      1), on some arch(such as ARM), DMA mapping/unmapping is a bit
      time-consuming, for example: when accessing usb mass storage
      via EHCI on pandaboard, the common length of transfer buffer is 120KB,
      the time consumed on DMA unmapping may reach hundreds of microseconds;
      even on A15 based box, the time is still about scores of microseconds
      
      2), on some arch, reading DMA coherent memoery is very time-consuming,
      the most common example is usb video class driver[1]
      
      3), driver's complete() callback may do much things which is driver
      specific, so the time is consumed unnecessarily in hardware irq context.
      
      4), running driver's complete() callback in hardware irq context causes
      that host controller driver has to release its lock in interrupt handler,
      so reacquiring the lock after return may busy wait a while and increase
      interrupt handling time. More seriously, releasing the HCD lock makes
      HCD becoming quite complicated to deal with introduced races.
      
      So the patch proposes to run giveback of URB in tasklet context, then
      time consumed in HCD irq handling doesn't depend on drivers' complete and
      DMA mapping/unmapping any more, also we can simplify HCD since the HCD
      lock isn't needed to be released during irq handling.
      
      The patch should be reasonable and doable:
      
      1), for drivers, they don't care if the complete() is called in hard irq
      context or softirq context
      
      2), the biggest change is the situation in which usb_submit_urb() is called
      in complete() callback, so the introduced tasklet schedule delay might be a
      con, but it shouldn't be a big deal:
      
      	- control/bulk asynchronous transfer isn't sensitive to schedule
      	  delay
      
      	- the patch schedules giveback of periodic URBs using
      	  tasklet_hi_schedule, so the introduced delay should be very
      	  small
      
      	- for ISOC transfer, generally, drivers submit several URBs
      	  concurrently to avoid interrupt delay, so it is OK with the
      	  little schedule delay.
      
      	- for interrupt transfer, generally, drivers only submit one URB
      	  at the same time, but interrupt transfer is often used in event
      	  report, polling, ... situations, and a little delay should be OK.
      
      Considered that HCDs may optimize on submitting URB in complete(), the
      patch may cause the optimization not working, so introduces one flag to mark
      if the HCD supports to run giveback URB in tasklet context. When all HCDs
      are ready, the flag can be removed.
      
      [1], http://marc.info/?t=136438111600010&r=1&w=2
      
      Cc: Oliver Neukum <oliver@neukum.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      94dfd7ed
  2. 04 8月, 2013 10 次提交
  3. 03 8月, 2013 5 次提交
    • V
      hwmon: (max6697) fix MAX6581 ideality · 5c52add1
      Vivien Didelot 提交于
      Without this patch, the values for ideality (register 0x4b) and ideality
      selection mask (register 0x4c) are inverted.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Cc: stable@vger.kernel.org # 3.9+
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      5c52add1
    • Y
      usb: fix some scripts/kernel-doc warnings · 626f090c
      Yacine Belkadi 提交于
      When building the htmldocs (in verbose mode), scripts/kernel-doc reports the
      following type of warnings:
      
      Warning(drivers/usb/core/usb.c:76): No description found for return value of
      'usb_find_alt_setting'
      
      Fix them by:
      - adding some missing descriptions of return values
      - using "Return" sections for those descriptions
      Signed-off-by: NYacine Belkadi <yacine.belkadi.1@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      626f090c
    • D
      sis900: Fix the tx queue timeout issue · 3508ea33
      Denis Kirjanov 提交于
      [  198.720048] ------------[ cut here ]------------
      [  198.720108] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:255 dev_watchdog+0x229/0x240()
      [  198.720118] NETDEV WATCHDOG: eth0 (sis900): transmit queue 0 timed out
      [  198.720125] Modules linked in: bridge stp llc dmfe sundance 3c59x sis900 mii
      [  198.720159] CPU: 0 PID: 0 Comm: swapper Not tainted 3.11.0-rc3+ #12
      [  198.720167] Hardware name: System Manufacturer System Name/TUSI-M, BIOS ASUS TUSI-M ACPI BIOS
      Revision 1013 Beta 001 12/14/2001
      [  198.720175]  000000ff c13fa6b9 c169ddcc c12208d6 c169ddf8 c1031e4d c1664a84 c169de24
      [  198.720197]  00000000 c165f5ea 000000ff c13fa6b9 00000001 000000ff c1664a84 c169de10
      [  198.720217]  c1031f13 00000009 c169de08 c1664a84 c169de24 c169de50 c13fa6b9 c165f5ea
      [  198.720240] Call Trace:
      [  198.720257]  [<c13fa6b9>] ? dev_watchdog+0x229/0x240
      [  198.720274]  [<c12208d6>] dump_stack+0x16/0x20
      [  198.720306]  [<c1031e4d>] warn_slowpath_common+0x7d/0xa0
      [  198.720318]  [<c13fa6b9>] ? dev_watchdog+0x229/0x240
      [  198.720330]  [<c1031f13>] warn_slowpath_fmt+0x33/0x40
      [  198.720342]  [<c13fa6b9>] dev_watchdog+0x229/0x240
      [  198.720357]  [<c103f158>] call_timer_fn+0x78/0x150
      [  198.720369]  [<c103f0e0>] ? internal_add_timer+0x40/0x40
      [  198.720381]  [<c13fa490>] ? dev_init_scheduler+0xa0/0xa0
      [  198.720392]  [<c103f33f>] run_timer_softirq+0x10f/0x200
      [  198.720412]  [<c103954f>] ? __do_softirq+0x6f/0x210
      [  198.720424]  [<c13fa490>] ? dev_init_scheduler+0xa0/0xa0
      [  198.720435]  [<c1039598>] __do_softirq+0xb8/0x210
      [  198.720467]  [<c14b54d2>] ? _raw_spin_unlock+0x22/0x30
      [  198.720484]  [<c1003245>] ? handle_irq+0x25/0xd0
      [  198.720496]  [<c1039c0c>] irq_exit+0x9c/0xb0
      [  198.720508]  [<c14bc9d7>] do_IRQ+0x47/0x94
      [  198.720534]  [<c1056078>] ? hrtimer_start+0x28/0x30
      [  198.720564]  [<c14bc8b1>] common_interrupt+0x31/0x38
      [  198.720589]  [<c1008692>] ? default_idle+0x22/0xa0
      [  198.720600]  [<c10083c7>] arch_cpu_idle+0x17/0x30
      [  198.720631]  [<c106d23d>] cpu_startup_entry+0xcd/0x180
      [  198.720643]  [<c14ae30a>] rest_init+0xaa/0xb0
      [  198.720654]  [<c14ae260>] ? reciprocal_value+0x50/0x50
      [  198.720668]  [<c17044e0>] ? repair_env_string+0x60/0x60
      [  198.720679]  [<c1704bda>] start_kernel+0x29a/0x350
      [  198.720690]  [<c17044e0>] ? repair_env_string+0x60/0x60
      [  198.720721]  [<c1704269>] i386_start_kernel+0x39/0xa0
      [  198.720729] ---[ end trace 81e0a6266f5c73a8 ]---
      [  198.720740] eth0: Transmit timeout, status 00000204 00000000
      
      timer routine checks the link status and if it's up calls
      netif_carrier_on() allowing upper layer to start the tx queue
      even if the auto-negotiation process is not finished.
      
      Also remove ugly auto-negotiation check from the sis900_start_xmit()
      
      CC: Duan Fugang <B38611@freescale.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3508ea33
    • L
      r8169: remove "PHY reset until link up" log spam · 9bb8eeb5
      Lekensteyn 提交于
      This message was added in commit a7154cb8 (June 2004, [PATCH] r8169:
      link handling and phy reset rework) and is printed every ten seconds
      when no cable is connected and runtime power management is disabled.
      (Before that commit, "Reset RTL8169s PHY" would be printed instead.)
      Signed-off-by: NPeter Wu <lekensteyn@gmail.com>
      Acked-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9bb8eeb5
    • F
      net: ethernet: cpsw: drop IRQF_DISABLED · 7069f982
      Felipe Balbi 提交于
      IRQF_DISABLED is a no-op by now and should be
      removed.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7069f982
  4. 02 8月, 2013 9 次提交
    • B
      USB: ohci-at91: add usb_clk for transition to common clk framework · 6b0a1cf7
      Boris BREZILLON 提交于
      The AT91 PMC (Power Management Controller) provides an USB clock used by
      USB Full Speed host (ohci) and USB Full Speed device (udc).
      The usb drivers (ohci and udc) must configure this clock to 48Mhz.
      This configuration was formely done in mach-at91/clock.c, but this
      implementation will be removed when moving to common clk framework.
      
      This patch adds support for usb clock retrieval and configuration, and is
      backward compatible with the current at91 clk implementation (if usb clk
      is not found, it does not configure/enable it).
      
      Changes since v1:
       - use IS_ENABLED(CONFIG_COMMON_CLK) to isolate new at91 clk support
      Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6b0a1cf7
    • M
      macvlan: handle set_promiscuity failures · 78738141
      Michael S. Tsirkin 提交于
      It's quite unlikely that dev_set_promiscuity will fail,
      but worth checking just in case.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78738141
    • M
      macvlan: better mode validation · 266e8347
      Michael S. Tsirkin 提交于
      macvlan passthrough mode is special: it's not possible to switch to or
      from it through a netlink command.
      
      But if you try, the command will succeed, which is
      confusing.
      
      Validate input and return error to user.
      
      Cc:  Sridhar Samudrala <sri@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      266e8347
    • C
      net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL · e0d1095a
      Cong Wang 提交于
      Eliezer renames several *ll_poll to *busy_poll, but forgets
      CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too.
      
      Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0d1095a
    • J
      net/mlx4_core: VFs must ignore the enable_64b_cqe_eqe module param · b3051320
      Jack Morgenstein 提交于
      Slaves get the 64B CQE/EQE state from QUERY_HCA, not from the module parameter.
      
      If the parameter is set to zero, the slave outputs an incorrect/irrelevant
      warning message that 64B CQEs/EQEs are supported but not enabled (even if the
      hypervisor has enabled 64B CQEs/EQEs).
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3051320
    • O
      net/mlx4_core: Don't give VFs MAC addresses which are derived from the PF MAC · 0508ad64
      Or Gerlitz 提交于
      If the user has not assigned a MAC address to a VM, then don't give it MAC which
      is based on the PF one. The current derivation scheme is wrong and leads to VM
      MAC collisions when the number of cards/hypervisors becomes big enough.
      
      Instead, just give it zeros and let them figure out what to do with that.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0508ad64
    • A
      USB: EHCI: don't depend on hardware for tracking port resets and resumes · 6753f4cf
      Alan Stern 提交于
      In theory, an EHCI controller can turn off the PORT_RESUME or
      PORT_RESET bits in a port status register all by itself (and some
      controllers actually do this).  We shouldn't depend on these bits
      being set correctly.
      
      This patch rearranges the code in ehci-hcd that handles completion of
      port resets and resumes.  We guarantee that ehci->reset_done[portnum]
      is nonzero if a reset or resume is in progress, and that the portnum
      bit is set in ehci->resuming_ports if the operation is a resume.  (To
      help enforce this guarantee, the patch prevents suspended ports from
      being reset.)  Therefore it's not necessary to look at the port status
      bits to learn what's going on.
      
      The patch looks bigger than it really is, because it changes the
      indentation level of a sizeable region of code.  Most of what it
      actually does is interchange some tests.  The only functional changes
      are testing reset_done and resuming_ports rather than PORT_RESUME and
      PORT_RESET, removing a now-unnecessary check for spontaneous
      resets of the PORT_RESUME and PORT_RESET bits, and preventing a
      suspended or resuming port from being reset.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6753f4cf
    • A
      USB: EHCI: keep better track of resuming ports · 3a20446f
      Alan Stern 提交于
      The ehci-hcd driver isn't as careful as it should be about the way it
      uses ehci->resuming_ports.  One of the omissions was fixed recently by
      commit 47a64a13 (USB: EHCI: Fix resume signalling on remote
      wakeup), but there are other places that need attention:
      
      	When a port's suspend feature is explicitly cleared, the
      	corresponding bit in resuming_ports should be set and the core
      	should be notified about the port resume.
      
      	We don't need to clear a resuming_ports bit when a reset
      	completes.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a20446f
    • T
      PCI: mvebu: Disable prefetchable memory support in PCI-to-PCI bridge · 36dd1f3e
      Thomas Petazzoni 提交于
      The Marvell PCIe driver uses an emulated PCI-to-PCI bridge to be able
      to dynamically set up MBus address decoding windows for PCI I/O and
      memory regions depending on the PCI devices enumerated by Linux.
      
      However, this emulated PCI-to-PCI bridge logic makes the Linux PCI
      core believe that prefetchable memory regions are supported (because
      the registers are read/write), while in fact no adress decoding window
      is ever created for such regions. Since the Marvell MBus address
      decoding windows do not distinguish memory regions and prefetchable
      memory regions, this patch takes a simple approach: change the
      PCI-to-PCI bridge emulation to let the Linux PCI core know that we
      don't support prefetchable memory regions.
      
      To achieve this, we simply make the prefetchable memory base a
      read-only register that always returns 0. Reading/writing all the
      other prefetchable memory related registers has no effect.
      
      This problem was originally reported by Finn Hoffmann
      <finn@uni-bremen.de>, who couldn't get a RTL8111/8168B PCI NIC working
      on the NSA310 Kirkwood platform after updating to 3.11-rc. The problem
      was that the PCI-to-PCI bridge emulation was making the Linux PCI core
      believe that we support prefetchable memory, so the Linux PCI core was
      only filling the prefetchable memory base and limit registers, which
      does not lead to a MBus window being created. The below patch has been
      confirmed by Finn Hoffmann to fix his problem on Kirkwood, and has
      otherwise been successfully tested on the Armada XP GP platform with a
      e1000e PCIe NIC and a Marvell SATA PCIe card.
      Reported-by: NFinn Hoffmann <finn@uni-bremen.de>
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      36dd1f3e
  5. 01 8月, 2013 8 次提交