1. 07 6月, 2017 2 次提交
  2. 06 6月, 2017 4 次提交
    • A
      [media] mceusb: TX -EPIPE (urb status = -32) lockup fix · c779a9cd
      A Sun 提交于
      Once IR blasting or mceusb device commands fail with mce_async_callback()
      TX -EPIPE error, all subsequent TX to device then fail with the same error.
      ...
      [  249.986174] mceusb 1-1.2:1.0: requesting 38000 HZ carrier
      [  249.986210] mceusb 1-1.2:1.0: send request called (size=0x4)
      [  249.986256] mceusb 1-1.2:1.0: send request complete (res=0)
      [  249.986403] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT)
      [  249.999885] mceusb 1-1.2:1.0: send request called (size=0x3)
      [  249.999929] mceusb 1-1.2:1.0: send request complete (res=0)
      [  250.000013] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT)
      [  250.019830] mceusb 1-1.2:1.0: send request called (size=0x21)
      [  250.019868] mceusb 1-1.2:1.0: send request complete (res=0)
      [  250.020007] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT)
      ...
      
      Fault simulation/injection is by executing the following USB operation
      in a mceusb instrumented driver, prior to TX I/O.
          retval = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
      	USB_REQ_SET_FEATURE, USB_RECIP_ENDPOINT,
      	USB_ENDPOINT_HALT, usb_pipeendpoint(ir->pipe_out),
      	NULL, 0, USB_CTRL_SET_TIMEOUT);
          dev_dbg(ir->dev, "set halt retval, %d", retval);
      
      After setting halt state for the TX endpoint, perform an lirc "irsend"
      to generate TX traffic to device. After the TX HALT, the patch restores
      subsequent TX to working state.
      ...
      [  508.009638] mceusb 1-1.2:1.0: send request called (size=0x3)
      [  508.009697] mceusb 1-1.2:1.0: send request complete (res=0)
      [  508.009847] mce_async_callback()
      [  508.009864] mceusb 1-1.2:1.0: Error: request urb status = -32 (TX HALT)
      [  508.009890] mceusb 1-1.2:1.0: kevent 0 scheduled
      [  508.021552] mceusb 1-1.2:1.0: send request called (size=0x21)
      [  508.021598] mceusb 1-1.2:1.0: send request complete (res=0)
      [  508.021963] mce_async_callback()
      [  508.021981] mceusb 1-1.2:1.0: tx data: 84 b0 0c 8c 0c 84 8c 0c 8c 0c 84 8c 0c 8c 0c 84 98 0c 98 0c 84 98 0c 8c 0c 84 8c 0c 8c 0c 81 8c 80 (length=33)
      [  508.021997] mceusb 1-1.2:1.0: Raw IR data, 0 pulse/space samples
      [  508.066627] mceusb 1-1.2:1.0: send request called (size=0x3)
      [  508.066669] mceusb 1-1.2:1.0: send request complete (res=0)
      [  508.066841] mce_async_callback()
      [  508.066858] mceusb 1-1.2:1.0: tx data: 9f 08 03 (length=3)
      ...
      Signed-off-by: NA Sun <as1033x@comcast.net>
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      c779a9cd
    • A
      [media] mceusb: RX -EPIPE (urb status = -32) lockup failure fix · a06854a6
      A Sun 提交于
      RX -EPIPE failure with infinite loop and flooding of
      [ 2851.966506] mceusb 1-1.2:1.0: Error: urb status = -32
      log message at 8000 messages per second.
      Bug trigger appears to be normal, but heavy, IR receiver use.
      Driver and Linux host become unusable after error.
      Also seen at https://sourceforge.net/p/lirc/mailman/message/34886165/
      
      Fix:
      
      Message reports RX usb halt (stall) condition requiring usb_clear_halt()
      call in non-interrupt context to recover. Add driver workqueue call to
      perform this recovery based on method in use for the usbnet device driver.
      Signed-off-by: NA Sun <as1033x@comcast.net>
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      a06854a6
    • A
      [media] mceusb: fix inaccurate debug buffer dumps, and misleading debug messages · 5c80992e
      A Sun 提交于
      Some dev_dbg messages are misleading. Some dev_dbg messages have
      inconsistent formatting. mceusb_dev_printdata() prints incorrect range
      of bytes (0 to len) in buffer which the driver will actually process next.
      Signed-off-by: NA Sun <as1033x@comcast.net>
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      5c80992e
    • A
      [media] mceusb: sporadic RX truncation corruption fix · 8e175b22
      A Sun 提交于
      Intermittent RX truncation and loss of IR received data. This resulted
      in receive stream synchronization errors where driver attempted to
      incorrectly parse IR data (eg 0x90 below) as command response.
      
      [ 3969.139898] mceusb 1-1.2:1.0: processed IR data
      [ 3969.151315] mceusb 1-1.2:1.0: rx data: 00 90 (length=2)
      [ 3969.151321] mceusb 1-1.2:1.0: Unknown command 0x00 0x90
      [ 3969.151336] mceusb 1-1.2:1.0: rx data: 98 0a 8d 0a 8e 0a 8e 0a 8e 0a 8e 0a 9a 0a 8e 0a 0b 3a 8e 00 80 41 59 00 00 (length=25)
      [ 3969.151341] mceusb 1-1.2:1.0: Raw IR data, 24 pulse/space samples
      [ 3969.151348] mceusb 1-1.2:1.0: Storing space with duration 500000
      
      Bug trigger appears to be normal, but heavy, IR receiver use.
      Signed-off-by: NA Sun <as1033x@comcast.net>
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      8e175b22
  3. 24 3月, 2017 1 次提交
  4. 30 1月, 2017 3 次提交
  5. 27 1月, 2017 1 次提交
    • S
      [media] media: Drop FSF's postal address from the source code files · bcb63314
      Sakari Ailus 提交于
      Drop the FSF's postal address from the source code files that typically
      contain mostly the license text. Of the 628 removed instances, 578 are
      outdated.
      
      The patch has been created with the following command without manual edits:
      
      git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \
      	drivers/media/ include/media|while read i; do i=$i perl -e '
      open(F,"< $ENV{i}");
      $a=join("", <F>);
      $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m
      	&& $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m;
      close(F);
      open(F, "> $ENV{i}");
      print F $a;
      close(F);'; done
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      bcb63314
  6. 23 11月, 2016 2 次提交
  7. 21 10月, 2016 1 次提交
    • M
      [media] rc: don't break long lines · 25ec587c
      Mauro Carvalho Chehab 提交于
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      25ec587c
  8. 15 7月, 2016 2 次提交
  9. 07 5月, 2016 2 次提交
  10. 11 3月, 2016 1 次提交
  11. 24 9月, 2014 2 次提交
  12. 28 7月, 2014 2 次提交
  13. 26 7月, 2014 1 次提交
    • D
      [media] rc-core: remove protocol arrays · c5540fbb
      David Härdeman 提交于
      The basic API of rc-core used to be:
      
      	dev = rc_allocate_device();
      	dev->x = a;
      	dev->y = b;
      	dev->z = c;
      	rc_register_device();
      
      which is a pretty common pattern in the kernel, after the introduction of
      protocol arrays the API looks something like:
      
      	dev = rc_allocate_device();
      	dev->x = a;
      	rc_set_allowed_protocols(dev, RC_BIT_X);
      	dev->z = c;
      	rc_register_device();
      
      There's no real need for the protocols to be an array, so change it
      back to be consistent (and in preparation for the following patches).
      
      [m.chehab@samsung.com: added missing changes at some files]
      Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      c5540fbb
  14. 26 5月, 2014 1 次提交
  15. 12 3月, 2014 1 次提交
  16. 05 2月, 2014 1 次提交
  17. 11 12月, 2013 1 次提交
  18. 17 4月, 2013 1 次提交
  19. 14 2月, 2013 1 次提交
  20. 09 2月, 2013 2 次提交
  21. 04 1月, 2013 1 次提交
    • G
      Drivers: media: remove __dev* attributes. · 4c62e976
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c62e976
  22. 27 10月, 2012 1 次提交
    • D
      [media] rc-core: add separate defines for protocol bitmaps and numbers · c003ab1b
      David Härdeman 提交于
      The RC_TYPE_* defines are currently used both where a single protocol is
      expected and where a bitmap of protocols is expected.
      
      Functions like rc_keydown() and functions which add/remove entries to the
      keytable want a single protocol. Future userspace APIs would also
      benefit from numeric protocols (rather than bitmap ones). Keytables are
      smaller if they can use a small(ish) integer rather than a bitmap.
      
      Other functions or struct members (e.g. allowed_protos,
      enabled_protocols, etc) accept multiple protocols and need a bitmap.
      
      Using different types reduces the risk of programmer error. Using a
      protocol enum whereever possible also makes for a more future-proof
      user-space API as we don't need to worry about a sufficient number of
      bits being available (e.g. in structs used for ioctl() calls).
      
      The use of both a number and a corresponding bit is dalso one in e.g.
      the input subsystem as well (see all the references to set/clear bit when
      changing keytables for example).
      
      This patch separate the different usages in preparation for
      upcoming patches.
      
      Where a single protocol is expected, enum rc_type is used; where one or more
      protocol(s) are expected, something like u64 is used.
      
      The patch has been rewritten so that the format of the sysfs "protocols"
      file is no longer altered (at the loss of some detail). The file itself
      should probably be deprecated in the future though.
      Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Cc: Antti Palosaari <crope@iki.fi>
      Cc: Mike Isely <isely@pobox.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c003ab1b
  23. 18 9月, 2012 1 次提交
  24. 14 8月, 2012 2 次提交
  25. 31 7月, 2012 2 次提交
  26. 15 5月, 2012 1 次提交