1. 02 2月, 2008 1 次提交
  2. 28 1月, 2008 1 次提交
  3. 25 10月, 2007 1 次提交
  4. 24 10月, 2007 1 次提交
  5. 23 10月, 2007 1 次提交
  6. 24 7月, 2007 1 次提交
  7. 16 7月, 2007 1 次提交
  8. 13 7月, 2007 1 次提交
  9. 28 4月, 2007 1 次提交
  10. 22 11月, 2006 1 次提交
  11. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      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: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  12. 28 9月, 2006 1 次提交
    • P
      USB: UB: Let cdrecord to see a device with media absent · d1ad4ea3
      Pete Zaitcev 提交于
      The command "cdrecord dev=/dev/uba x.iso" prints nasty garbage if a blank
      is not in the drive. This happens because drivers have to set req->errors
      separately from just returning zero uptodate with end_that_request_first,
      end_that_request_last. These functions only set error in BIO, but sg_io()
      ignores it.
      
      Since we're on it, let cdrecord access a device when ->changed is set.
      It's useful if someone wants to know device capabilities without burning
      anything.
      Signed-Off-By: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d1ad4ea3
  13. 27 6月, 2006 4 次提交
  14. 22 6月, 2006 3 次提交
  15. 09 5月, 2006 1 次提交
    • P
      [PATCH] USB: ub oops in block_uevent · 77ef6c4d
      Pete Zaitcev 提交于
      In kernel 2.6.16, if a mounted storage device is removed, an oops happens
      because ub supplies an interface device (and kobject) to the block layer,
      but neglects to pin it. And apparently, the block layer expects its users
      to pin device structures.
      
      The code in ub was broken this way for years. But the bug was exposed only
      by 2.6.16 when it started to call block_uevent on close, which traverses
      device structures (kobjects actually).
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      77ef6c4d
  16. 21 3月, 2006 4 次提交
  17. 01 2月, 2006 3 次提交
    • P
      [PATCH] USB: ub 05 Bulk reset · 2c2e4a2e
      Pete Zaitcev 提交于
      For crying out loud, they have devices which do not like port resets.
      So, do what usb-storage does and try both bulk and port resets.
      We start with a port reset (which usb-storage does at the end of transport),
      then do a Bulk reset, then a port reset again. This seems to work for me.
      
      The code is getting dirtier and dirtier here, but I swear that I'll
      do something about it (see those two new XXX). Honest.
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2c2e4a2e
    • P
      [PATCH] USB: ub 04 Loss of timer and a hang · b31f821c
      Pete Zaitcev 提交于
      If SCSI commands are submitted while other commands are still processed,
      the dispatch loop turns, and we stop the work_timer. Then, if URB fails
      to complete, ub hangs until the device is unplugged.
      
      This does not happen often, becase we only allow one SCSI command per
      block device, but does happen (on multi-LUN devices, for example).
      
      The fix is to stop timer only when we actually going to change the state.
      
      The nicest code would be to have the timer stopped in URB callback, but
      this is impossible, because it can be called from inside a timer, through
      the urb_unlink. Then we get BUG in timer.c:cascade(). So, we do it a
      little dirtier.
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b31f821c
    • P
      [PATCH] USB: ub 03 Oops with CFQ · 65b4fe55
      Pete Zaitcev 提交于
      The blk_cleanup_queue does not necesserily destroy the queue. When we
      destroy the corresponding ub_dev, it may leave the queue spinlock pointer
      dangling.
      
      This patch moves spinlocks from ub_dev to static memory. The locking
      scheme is not changed. These spinlocks are still separate from the ub_lock.
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65b4fe55
  18. 06 1月, 2006 1 次提交
    • T
      [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn() · 8ffdc655
      Tejun Heo 提交于
      add @uptodate argument to end_that_request_last() and @error
      to rq_end_io_fn().  there's no generic way to pass error code
      to request completion function, making generic error handling
      of non-fs request difficult (rq->errors is driver-specific and
      each driver uses it differently).  this patch adds @uptodate
      to end_that_request_last() and @error to rq_end_io_fn().
      
      for fs requests, this doesn't really matter, so just using the
      same uptodate argument used in the last call to
      end_that_request_first() should suffice.  imho, this can also
      help the generic command-carrying request jens is working on.
      Signed-off-by: Ntejun heo <htejun@gmail.com>
      Signed-Off-By: NJens Axboe <axboe@suse.de>
      8ffdc655
  19. 05 1月, 2006 5 次提交
  20. 29 10月, 2005 1 次提交
  21. 22 9月, 2005 2 次提交
  22. 09 9月, 2005 4 次提交
    • A
      [PATCH] USB: URB_ASYNC_UNLINK flag removed from the kernel · b375a049
      Alan Stern 提交于
      29 July 2005, Cambridge, MA:
      
      This afternoon Alan Stern submitted a patch to remove the URB_ASYNC_UNLINK
      flag from the Linux kernel.  Mr. Stern explained, "This flag is a relic
      from an earlier, less-well-designed system.  For over a year it hasn't
      been used for anything other than printing warning messages."
      
      An anonymous spokesman for the Linux kernel development community
      commented, "This is exactly the sort of thing we see happening all the
      time.  As the kernel evolves, support for old techniques and old code can
      be jettisoned and replaced by newer, better approaches.  Proprietary
      operating systems do not have the freedom or flexibility to change so
      quickly."
      
      Mr. Stern, a staff member at Harvard University's Rowland Institute who
      works on Linux only as a hobby, noted that the patch (labelled as548) did
      not update two files, keyspan.c and option.c, in the USB drivers' "serial"
      subdirectory.  "Those files need more extensive changes," he remarked.
      "They examine the status field of several URBs at times when they're not
      supposed to.  That will need to be fixed before the URB_ASYNC_UNLINK flag
      is removed."
      
      Greg Kroah-Hartman, the kernel maintainer responsible for overseeing all
      of Linux's USB drivers, did not respond to our inquiries or return our
      calls.  His only comment was "Applied, thanks."
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b375a049
    • P
      [PATCH] USB: ub 4: Zaitcev's quasi-S/G · a1cf96ef
      Pete Zaitcev 提交于
      Back out Axboe-style quasi-S/G and replace it with one command and
      repeated URBs. This is similar to what usb-storage does, only instead
      of a few URBs allocated together, one URB is reused.
      
      Jens's idea was very nice, but it collapsed when I had to support
      packet commads for CD burning. I cannot issue two or more packet
      commands where application expected only one.
      
      However, burning does not work completely yet. The cdrecord starts,
      recognizes the device, then aborts without writing a TOC.
      Signed-off-by: NPete Zaitcev <zaitcev@yahoo.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a1cf96ef
    • P
      [PATCH] USB: ub 3/3: death to ub_bd_rq_fn_1 · 6c1eb8c1
      Pete Zaitcev 提交于
      When Al Viro saw the ub.c, he observed that it was a proof positive of
      Linus not reading patches anymore: names like fo_ob_ar_ba_2 used to
      cause serious fireworks. In my defence, any good scheme can be pushed
      to the realm of absurd if pushed far enough.
      Signed-off-by: NPete Zaitcev <zaitcev@yahoo.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6c1eb8c1
    • P
      [PATCH] USB: ub 2/3: Fold one line · 07d4fd25
      Pete Zaitcev 提交于
      Evidently, Yani Ioannou's display is wider than mine.
      Signed-off-by: NPete Zaitcev <zaitcev@yahoo.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      07d4fd25