1. 12 Oct, 2007 4 commits
    • Pete Zaitcev's avatar
      usblp: Cosmetics · 283face8
      Pete Zaitcev authored
      
      
      This is a small bunch of cosmetic fixes:
       - Timeout is not a write timeout anymore, rename
       - Condition in poll was confusingly backwards, invert and simplify
       - The comment log gave a wrong impression of version 0.13, terminate it.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      283face8
    • Pete Zaitcev's avatar
      usblp: mutex in usblp_check_status · fc401e69
      Pete Zaitcev authored
      
      
      Add a mutex to protect the ->statusbuf. Not really an issue, because CUPS
      is single-threaded when it talks to the printer, but I feel safer this way.
      This should be deadlock-free, but I kept this as a separate patch in case
      someone ends running a git bisect.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fc401e69
    • Pete Zaitcev's avatar
      usblp: Make use of URB_FREE_BUFFER · e8fa0ce6
      Pete Zaitcev authored
      
      
      Employ the new API URB_FREE_BUFFER that we've got. There was talk of a combined
      constructor for this case, but apparently it's not happening, so just set the
      flag explicitly for now.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e8fa0ce6
    • Pete Zaitcev's avatar
      usblp: Implement the ENOSPC convention · 7f477358
      Pete Zaitcev authored
      
      
      This patch implements a mode when a printer returns ENOSPC when it runs
      out of paper. The default remains the same as before. An application which
      wishes to use this function has to enable it explicitly with an ioctl
      LPABORT.
      
      This is done on a request by our (Fedora) CUPS guy, Tim Waugh. The API is
      similar enough to the lp0's one that CUPS works with both (but see below),
      but it's has some differences.
      
      Most importantly, the abort mode is persistent in case of lp0: once tunelp
      was run your cat fill blow up until you reboot or run tunelp again. For
      usblp, I made it so the abort mode is only in effect as long as device
      is open. This way you can mix and match CUPS and cat(1) freely and nothing
      bad happens even if you run out of paper. It is also safer in the face
      of any unexpected crashes.
      
      It has to be noted that mixing LPABORT and O_NONBLOCK is not advised.
      It probably does not do what you want: instead of returning -ENOSPC
      it will always return -EAGAIN (because it would otherwise block while
      waiting for the paper). Applications which use O_NONBLOCK should continue
      to use LPGETSTATUS like before.
      
      Finally, CUPS actually requires patching to take full advantage of this.
      It has several components; those which invoke LPABORT work, but some of
      them need the ioctl added. This is completely compatible, you can mix
      old CUPS and new kernels or vice versa.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7f477358
  2. 19 Jul, 2007 2 commits
  3. 12 Jul, 2007 1 commit
    • Pete Zaitcev's avatar
      USB: usblp: add dynamic URBs, fix races · 317c67b8
      Pete Zaitcev authored
      
      
      This patch's main bulk aims to make usblp the premier driver for code
      pillaging once again. The code is as streamlined as possible and is bug-free
      as possible. The usb-skeleton performs the same function, but is somewhat
      abstract. The usblp is usb-skeleton which is actually used by many.
      
      Since I combed a few small bugs away, this also fixes the small races we
      had in usblp for a while. For example, now it's possible for several threads
      to make write(2) calls (sounds silly, but consider a printer for paper
      record, where every line of text is self-contained and thus it's all right
      to have them interleaved). Also gone are issues with interrupts using
      barriers dangerously.
      
      This patch makes use of Oliver's anchor, and so it must trail the anchor
      patch on the way to Linus.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      317c67b8
  4. 08 Jun, 2007 1 commit
  5. 23 May, 2007 1 commit
  6. 08 May, 2007 1 commit
  7. 19 Mar, 2007 1 commit
  8. 07 Feb, 2007 1 commit
  9. 05 Jan, 2007 1 commit
    • Martin Williges's avatar
      USB: usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers · 4f45d038
      Martin Williges authored
      
      
      This patch gets the Kyocera FS-820 working with cups 1.2 via usb again. It
      adds the printer to the list of "quirky" printers. The printer seems not
      answer to ID requests some seconds after plugging in. Patch is based on
      linux-2.6.19.1.
      
      Background:
      As far as I could see (strace, usbmon), the Kyocera FS-820 answers to ID
      requests only a few seconds after plugging it in. This applies to detecting
      it with cups and is also true for the printing itself, which is initiated
      with an ID request. Since I have little usb knowledge, maybe someone can
      interpret the data, especially the fist bulk transfer - why request 8192
      bytes? This is the second version of the patch.
      
      usbmon output of printing an email without patch:
      tail -F /tmp/printlog.txt
      c636e140 3374734463 S Bi:002:02 -115 8192 <
      c9d43b40 3374734494 S Ci:002:00 s a1 00 0000 0000 03ff 1023 <
      c9d43b40 3379732301 C Ci:002:00 -104 0
      c636e140 3379733294 C Bi:002:02 -2 0
      [...repeating...]
      
      with patch:
      tail -F /tmp/printlog.txt
      d9cb82c0 3729790131 S Ci:002:00 s a1 00 0000 0000 03ff 1023 <
      d9cb82c0 3729791725 C Ci:002:00 0 91 = 005b4944 3a46532d 3832303b 4d46473a
       4b796f63 6572613b 434d443a 50434c58 df956320 3732493190 S Bo:002:01 -115
       1347 = 1b252d31 32333435 5840504a 4c0a4050 4a4c2053 4554204d 414e5541
       4c464545 [...more data...]
      Signed-off-by: default avatarMartin Williges <kernel@zut.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4f45d038
  10. 20 Dec, 2006 1 commit
  11. 03 Nov, 2006 2 commits
  12. 17 Oct, 2006 1 commit
  13. 05 Oct, 2006 1 commit
    • David Howells's avatar
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells authored
      
      
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  14. 27 Sep, 2006 3 commits
  15. 20 Mar, 2006 1 commit
  16. 31 Jan, 2006 1 commit
  17. 04 Jan, 2006 4 commits
  18. 03 Jan, 2006 1 commit
  19. 28 Oct, 2005 1 commit
    • Greg Kroah-Hartman's avatar
      [PATCH] devfs: Remove the mode field from usb_class_driver as it's no longer needed · d6e5bcf4
      Greg Kroah-Hartman authored
      
      
      Also fixes all drivers that set this field, and removes some other devfs
      specfic USB logic.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/class/usblp.c           |    3 +--
       drivers/usb/core/file.c             |   19 ++++---------------
       drivers/usb/image/mdc800.c          |    3 +--
       drivers/usb/input/aiptek.c          |    2 +-
       drivers/usb/input/hiddev.c          |    3 +--
       drivers/usb/media/dabusb.c          |    3 +--
       drivers/usb/misc/auerswald.c        |    3 +--
       drivers/usb/misc/idmouse.c          |    5 ++---
       drivers/usb/misc/legousbtower.c     |    5 ++---
       drivers/usb/misc/rio500.c           |    3 +--
       drivers/usb/misc/sisusbvga/sisusb.c |    5 -----
       drivers/usb/misc/usblcd.c           |    9 ++++-----
       drivers/usb/usb-skeleton.c          |    3 +--
       include/linux/usb.h                 |    7 ++-----
       14 files changed, 22 insertions(+), 51 deletions(-)
      d6e5bcf4
  20. 08 Sep, 2005 1 commit
  21. 27 Jun, 2005 2 commits
  22. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4