1. 29 8月, 2008 5 次提交
  2. 27 8月, 2008 2 次提交
    • F
      sg: restore command permission for TYPE_SCANNER · 14e507b8
      FUJITA Tomonori 提交于
      sg allowed any command for TYPE_SCANNER. The cmd_filter patchset
      doesn't. We can't change sg's permission since it might break the
      existing software.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      14e507b8
    • F
      block: move cmdfilter from gendisk to request_queue · abf54393
      FUJITA Tomonori 提交于
      cmd_filter works only for the block layer SG_IO with SCSI block
      devices. It breaks scsi/sg.c, bsg, and the block layer SG_IO with SCSI
      character devices (such as st). We hit a kernel crash with them.
      
      The problem is that cmd_filter code accesses to gendisk (having struct
      blk_scsi_cmd_filter) via inode->i_bdev->bd_disk. It works for only
      SCSI block device files. With character device files, inode->i_bdev
      leads you to struct cdev. inode->i_bdev->bd_disk->blk_scsi_cmd_filter
      isn't safe.
      
      SCSI ULDs don't expose gendisk; they keep it private. bsg needs to be
      independent on any protocols. We shouldn't change ULDs to expose their
      gendisk.
      
      This patch moves struct blk_scsi_cmd_filter from gendisk to
      request_queue, a common object, which eveyone can access to.
      
      The user interface doesn't change; users can change the filters via
      /sys/block/. gendisk has a pointer to request_queue so the cmd_filter
      code accesses to struct blk_scsi_cmd_filter.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      abf54393
  3. 24 8月, 2008 1 次提交
  4. 16 8月, 2008 21 次提交
  5. 12 8月, 2008 1 次提交
  6. 07 8月, 2008 2 次提交
  7. 06 8月, 2008 3 次提交
    • L
      Re-introduce "[SCSI] extend the last_sector_bug flag to cover more sectors" · 18351070
      Linus Torvalds 提交于
      This re-introduces commit 2b142900,
      which was reverted due to the regression it caused by commit
      fca082c9.
      
      That regression was not root-caused by the original commit, it was just
      uncovered by it, and the real fix was done by Alan Stern in commit
      580da348 ("Fix USB storage hang on
      command abort").
      
      We can thus re-introduce the change that was confirmed by Alan Jenkins
      to be still required by his odd card reader.
      
      Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      18351070
    • B
      ide: fix regression caused by ide_device_{get,put}() addition (take 2) · d3e33ff5
      Bartlomiej Zolnierkiewicz 提交于
      On Monday 28 July 2008, Benjamin Herrenschmidt wrote:
      
      [...]
      
      > Vector: 300 (Data Access) at [c58b7b80]
      >     pc: c014f264: elv_may_queue+0x10/0x44
      >     lr: c0152750: get_request+0x2c/0x2c0
      >     sp: c58b7c30
      >    msr: 1032
      >    dar: c
      >  dsisr: 40000000
      >   current = 0xc58aaae0
      >     pid   = 854, comm = media-bay
      > enter ? for help
      > mon> t
      > [c58b7c40] c0152750 get_request+0x2c/0x2c0
      > [c58b7c70] c0152a08 get_request_wait+0x24/0xec
      > [c58b7cc0] c0225674 ide_cd_queue_pc+0x58/0x1a0
      > [c58b7d40] c022672c ide_cdrom_packet+0x9c/0xdc
      > [c58b7d70] c0261810 cdrom_get_disc_info+0x60/0xd0
      > [c58b7dc0] c026208c cdrom_mrw_exit+0x1c/0x11c
      > [c58b7e30] c0260f7c unregister_cdrom+0x84/0xe8
      > [c58b7e50] c022395c ide_cd_release+0x80/0x84
      > [c58b7e70] c0163650 kref_put+0x54/0x6c
      > [c58b7e80] c0223884 ide_cd_put+0x40/0x5c
      > [c58b7ea0] c0211100 generic_ide_remove+0x28/0x3c
      > [c58b7eb0] c01e9d34 __device_release_driver+0x78/0xb4
      > [c58b7ec0] c01e9e44 device_release_driver+0x28/0x44
      > [c58b7ee0] c01e8f7c bus_remove_device+0xac/0xd8
      > [c58b7f00] c01e7424 device_del+0x104/0x198
      > [c58b7f20] c01e74d0 device_unregister+0x18/0x30
      > [c58b7f40] c02121c4 __ide_port_unregister_devices+0x6c/0x88
      > [c58b7f60] c0212398 ide_port_unregister_devices+0x38/0x80
      > [c58b7f80] c0208ca4 media_bay_step+0x1cc/0x5c0
      > [c58b7fb0] c0209124 media_bay_task+0x8c/0xcc
      > [c58b7fd0] c00485c0 kthread+0x48/0x84
      > [c58b7ff0] c0011b20 kernel_thread+0x44/0x60
      
      The guilty commit turned out to be 08da591e
      ("ide: add ide_device_{get,put}() helpers").  ide_device_put() is called
      before kref_put() in ide_cd_put() so IDE device is already gone by the time
      ide_cd_release() is reached.
      
      Fix it by calling ide_device_get() before kref_get() and ide_device_put()
      after kref_put() in all affected device drivers.
      
      v2:
      Brown paper bag time.  In v1 cd->drive was referenced after dropping last
      reference on cd object (which could result in OOPS in ide_device_put() as
      reported/debugged by Mariusz Kozlowski).  Fix it by caching cd->drive in
      the local variable (fix other device drivers too).
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reported-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Borislav Petkov <petkovbb@gmail.com>
      Tested-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Tested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d3e33ff5
    • B
      remove unnecessary <linux/hdreg.h> includes · b5b9309d
      Bartlomiej Zolnierkiewicz 提交于
      Following files don't need <linux/hdreg.h> at all:
      
      - arch/mips/jazz/setup.c
      - arch/sh/boards/mach-systemh/irq.c
      - drivers/macintosh/mediabay.c
      - drivers/scsi/hptiop.c
      - drivers/usb/storage/freecom.c
      - arch/powerpc/include/asm/ide.h
      - init/main.c
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b5b9309d
  8. 05 8月, 2008 2 次提交
  9. 30 7月, 2008 3 次提交