1. 28 9月, 2009 1 次提交
  2. 16 9月, 2009 2 次提交
  3. 23 8月, 2009 1 次提交
  4. 17 4月, 2009 1 次提交
  5. 25 3月, 2009 3 次提交
    • I
      UIO: Take offset into account when determining number of pages that can be mapped · 6da2d377
      Ian Abbott 提交于
      If a UIO memory region does not start on a page boundary but straddles one,
      the number of actual pages that overlap the memory region may be calculated
      incorrectly because the offset isn't taken into account.  If userspace sets
      the mmap length to offset+size, it may fail with -EINVAL if UIO thinks it's
      trying to allocate too many pages.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Cc: Hans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6da2d377
    • B
      uio: add the uio_aec driver · 1bafeb37
      Brandon Philips 提交于
      UIO driver for the Adrienne Electronics Corporation PCI time code
      device.
      
      This device differs from other UIO devices since it uses I/O ports instead of
      memory mapped I/O. In order to make it possible for UIO to work with this
      device a utility, uioport, can be used to read and write the ports.
      
      uioport is designed to be a setuid program and checks the permissions of
      the /dev/uio* node and if the user has write permissions it will use
      iopl and out*/in* to access the device.
      
      [1] git clone git://ifup.org/philips/uioport.gitSigned-off-by: NBrandon Philips <brandon@ifup.org>
      Signed-off-by: NHans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1bafeb37
    • H
      UIO: Add name attributes for mappings and port regions · 82057791
      Hans J. Koch 提交于
      If a UIO device has several memory mappings, it can be difficult for userspace
      to find the right one. The situation becomes even worse if the UIO driver can
      handle different versions of a card that have different numbers of mappings.
      Benedikt Spranger has such cards and pointed this out to me. Thanks, Bene!
      
      To address this problem, this patch adds "name" sysfs attributes for each
      mapping. Userspace can use these to clearly identify each mapping. The name
      string is optional. If a driver doesn't set it, an empty string will be
      returned, so this patch won't break existing drivers.
      
      The same problem exists for port region information, so a "name" attribute is
      added there, too.
      Signed-off-by: NHans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      82057791
  6. 07 1月, 2009 3 次提交
    • H
      UIO: Pass information about ioports to userspace (V2) · e70c412e
      Hans J. Koch 提交于
      Devices sometimes have memory where all or parts of it can not be mapped to
      userspace. But it might still be possible to access this memory from
      userspace by other means. An example are PCI cards that advertise not only
      mappable memory but also ioport ranges. On x86 architectures, these can be
      accessed with ioperm, iopl, inb, outb, and friends. Mike Frysinger (CCed)
      reported a similar problem on Blackfin arch where it doesn't seem to be easy
      to mmap non-cached memory but it can still be accessed from userspace.
      
      This patch allows kernel drivers to pass information about such ports to
      userspace. Similar to the existing mem[] array, it adds a port[] array to
      struct uio_info. Each port range is described by start, size, and porttype.
      
      If a driver fills in at least one such port range, the UIO core will simply
      pass this information to userspace by creating a new directory "portio"
      underneath /sys/class/uio/uioN/. Similar to the "mem" directory, it will
      contain a subdirectory (portX) for each port range given.
      
      Note that UIO simply passes this information to userspace, it performs no
      action whatsoever with this data. It's userspace's responsibility to obtain
      access to these ports and to solve arch dependent issues. The "porttype"
      attribute tells userspace what kind of port it is dealing with.
      
      This mechanism could also be used to give userspace information about GPIOs
      related to a device. You frequently find such hardware in embedded devices,
      so I added a UIO_PORT_GPIO definition. I'm not really sure if this is a good
      idea since there are other solutions to this problem, but it won't hurt much
      anyway.
      Signed-off-by: NHans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e70c412e
    • M
      UIO: uio_pdrv_genirq: allow custom irq_flags · e543ae89
      Mike Frysinger 提交于
      I can't think of a reason why the driver prevents people from setting any
      custom bits in their platform device, but I can think of some reasons for
      allowing custom flags.  Like setting the IRQF_TRIGGER_... bits.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NHans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e543ae89
    • A
      UIO: use pci_ioremap_bar() in drivers/uio · 7898aa5c
      Arjan van de Ven 提交于
      Use the newly introduced pci_ioremap_bar() function in drivers/uio.
      pci_ioremap_bar() just takes a pci device and a bar number, with the goal
      of making it really hard to get wrong, while also having a central place
      to stick sanity checks.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NHans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7898aa5c
  7. 02 11月, 2008 1 次提交
    • A
      saner FASYNC handling on file close · 233e70f4
      Al Viro 提交于
      As it is, all instances of ->release() for files that have ->fasync()
      need to remember to evict file from fasync lists; forgetting that
      creates a hole and we actually have a bunch that *does* forget.
      
      So let's keep our lives simple - let __fput() check FASYNC in
      file->f_flags and call ->fasync() there if it's been set.  And lose that
      crap in ->release() instances - leaving it there is still valid, but we
      don't have to bother anymore.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      233e70f4
  8. 17 10月, 2008 6 次提交
  9. 22 8月, 2008 3 次提交
  10. 22 7月, 2008 3 次提交
  11. 21 6月, 2008 1 次提交
  12. 21 5月, 2008 1 次提交
    • G
      UIO: fix race in device_create · 43691da4
      Greg Kroah-Hartman 提交于
      There is a race from when a device is created with device_create() and
      then the drvdata is set with a call to dev_set_drvdata() in which a
      sysfs file could be open, yet the drvdata will be NULL, causing all
      sorts of bad things to happen.
      
      This patch fixes the problem by using the new function,
      device_create_drvdata().
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Hans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      43691da4
  13. 20 4月, 2008 5 次提交
  14. 25 3月, 2008 1 次提交
  15. 22 2月, 2008 1 次提交
  16. 07 2月, 2008 1 次提交
  17. 25 1月, 2008 6 次提交
反馈
建议
客服 返回
顶部