1. 10 7月, 2007 2 次提交
    • B
      [PATCH] fix request->cmd == INT cases · e654bc43
      Boaz Harrosh 提交于
       - I have unearthed very old bugs in stale drivers that still
         used request->cmd as a READ|WRITE int
       - This patch is maybe a proof that these drivers have not been
         used for a long time. Should they be removed completely?
      
      Drivers that currently do not work for sure:
       drivers/acorn/block/fd1772.c |    2 +-
       drivers/acorn/block/mfmhd.c  |    8 ++++----
       drivers/cdrom/aztcd.c        |    2 +-
       drivers/cdrom/cm206.c        |    2 +-
       drivers/cdrom/gscd.c         |    2 +-
       drivers/cdrom/mcdx.c         |    2 +-
       drivers/cdrom/optcd.c        |    2 +-
       drivers/cdrom/sjcd.c         |    2 +-
      
      Drivers with cosmetic fixes only:
        b/drivers/block/amiflop.c
        b/drivers/block/nbd.c
        b/drivers/ide/legacy/hd.c
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      e654bc43
    • D
      [PATCH] cdrom_sysctl_info fix · 554988d6
      Dave Young 提交于
      Fix the cdrom_sysctl_info possible buffer overwrite bug. Also
      fix the locking of accessing topCdromPtr pointer.
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      554988d6
  2. 09 6月, 2007 1 次提交
  3. 08 5月, 2007 1 次提交
  4. 05 3月, 2007 1 次提交
  5. 15 2月, 2007 4 次提交
  6. 13 2月, 2007 1 次提交
  7. 04 1月, 2007 1 次提交
  8. 20 12月, 2006 1 次提交
  9. 19 12月, 2006 1 次提交
    • J
      [PATCH] Fixup blk_rq_unmap_user() API · 8e5cfc45
      Jens Axboe 提交于
      The blk_rq_unmap_user() API is not very nice. It expects the caller to
      know that rq->bio has to be reset to the original bio, and it will
      silently do nothing if that is not done. Instead make it explicit that
      we need to pass in the first bio, by expecting a bio argument.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      8e5cfc45
  10. 14 12月, 2006 1 次提交
    • R
      [PATCH] getting rid of all casts of k[cmz]alloc() calls · 5cbded58
      Robert P. J. Day 提交于
      Run this:
      
      	#!/bin/sh
      	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
      	  echo "De-casting $f..."
      	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
      	done
      
      And then go through and reinstate those cases where code is casting pointers
      to non-pointers.
      
      And then drop a few hunks which conflicted with outstanding work.
      
      Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Karsten Keil <kkeil@suse.de>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5cbded58
  11. 08 12月, 2006 1 次提交
  12. 01 12月, 2006 1 次提交
  13. 11 10月, 2006 1 次提交
  14. 07 10月, 2006 1 次提交
    • J
      Various drivers' irq handlers: kill dead code, needless casts · c7bec5ab
      Jeff Garzik 提交于
      - Eliminate casts to/from void*
      
      - Eliminate checks for conditions that never occur.  These typically
        fall into two classes:
      
      	1) Checking for 'dev_id == NULL', then it is never called with
      	NULL as an argument.
      
      	2) Checking for invalid irq number, when the only caller (the
      	system) guarantees the irq handler is called with the proper
      	'irq' number argument.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c7bec5ab
  15. 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
  16. 04 10月, 2006 1 次提交
  17. 01 10月, 2006 2 次提交
    • D
      [PATCH] BLOCK: Make it possible to disable the block layer [try #6] · 9361401e
      David Howells 提交于
      Make it possible to disable the block layer.  Not all embedded devices require
      it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
      the block layer to be present.
      
      This patch does the following:
      
       (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
           support.
      
       (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
           an item that uses the block layer.  This includes:
      
           (*) Block I/O tracing.
      
           (*) Disk partition code.
      
           (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
      
           (*) The SCSI layer.  As far as I can tell, even SCSI chardevs use the
           	 block layer to do scheduling.  Some drivers that use SCSI facilities -
           	 such as USB storage - end up disabled indirectly from this.
      
           (*) Various block-based device drivers, such as IDE and the old CDROM
           	 drivers.
      
           (*) MTD blockdev handling and FTL.
      
           (*) JFFS - which uses set_bdev_super(), something it could avoid doing by
           	 taking a leaf out of JFFS2's book.
      
       (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
           linux/elevator.h contingent on CONFIG_BLOCK being set.  sector_div() is,
           however, still used in places, and so is still available.
      
       (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
           parts of linux/fs.h.
      
       (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
      
       (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
      
       (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
           is not enabled.
      
       (*) fs/no-block.c is created to hold out-of-line stubs and things that are
           required when CONFIG_BLOCK is not set:
      
           (*) Default blockdev file operations (to give error ENODEV on opening).
      
       (*) Makes some /proc changes:
      
           (*) /proc/devices does not list any blockdevs.
      
           (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
      
       (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
      
       (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
           given command other than Q_SYNC or if a special device is specified.
      
       (*) In init/do_mounts.c, no reference is made to the blockdev routines if
           CONFIG_BLOCK is not defined.  This does not prohibit NFS roots or JFFS2.
      
       (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
           error ENOSYS by way of cond_syscall if so).
      
       (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
           CONFIG_BLOCK is not set, since they can't then happen.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      9361401e
    • J
      [PATCH] Split struct request ->flags into two parts · 4aff5e23
      Jens Axboe 提交于
      Right now ->flags is a bit of a mess: some are request types, and
      others are just modifiers. Clean this up by splitting it into
      ->cmd_type and ->cmd_flags. This allows introduction of generic
      Linux block message types, useful for sending generic Linux commands
      to block devices.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      4aff5e23
  18. 28 8月, 2006 1 次提交
  19. 11 7月, 2006 1 次提交
  20. 03 7月, 2006 1 次提交
  21. 01 7月, 2006 2 次提交
  22. 27 6月, 2006 5 次提交
  23. 26 6月, 2006 1 次提交
  24. 18 6月, 2006 1 次提交
    • J
      [PATCH] fix cdrom open · 16070428
      Jens Axboe 提交于
      Some time ago the cdrom open routine was changed so that we call the
      driver's open routine before checking to see if it is read only.  However,
      if we discovered that a read write open was not possible and the open
      flags required a writable open, we just returned -EROFS without calling
      the driver's release routine.   This seems to work for most cdrom drivers,
      but breaks the Powerpc iSeries virtual cdrom rather badly.
      
      This just inserts the release call in the error path to balance the call
      to "->open()" done by "open_for_data()".
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      16070428
  25. 19 5月, 2006 1 次提交
  26. 11 4月, 2006 1 次提交
  27. 26 3月, 2006 1 次提交
  28. 23 3月, 2006 2 次提交
  29. 08 2月, 2006 1 次提交