1. 09 1月, 2006 1 次提交
    • C
      [PATCH] Add block_device_operations.getgeo block device method · a885c8c4
      Christoph Hellwig 提交于
      HDIO_GETGEO is implemented in most block drivers, and all of them have to
      duplicate the code to copy the structure to userspace, as well as getting
      the start sector.  This patch moves that to common code [1] and adds a
      ->getgeo method to fill out the raw kernel hd_geometry structure.  For many
      drivers this means ->ioctl can go away now.
      
      [1] the s390 block drivers are odd in this respect.  xpram sets ->start
          to 4 always which seems more than odd, and the dasd driver shifts
          the start offset around, probably because of it's non-standard
          sector size.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: <mike.miller@hp.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a885c8c4
  2. 07 1月, 2006 3 次提交
  3. 06 1月, 2006 10 次提交
  4. 05 1月, 2006 2 次提交
    • K
      [PATCH] driver core: replace "hotplug" by "uevent" · 312c004d
      Kay Sievers 提交于
      Leave the overloaded "hotplug" word to susbsystems which are handling
      real devices. The driver core does not "plug" anything, it just exports
      the state to userspace and generates events.
      Signed-off-by: NKay Sievers <kay.sievers@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      312c004d
    • K
      [PATCH] merge kobject_uevent and kobject_hotplug · 5f123fbd
      Kay Sievers 提交于
      The distinction between hotplug and uevent does not make sense these
      days, netlink events are the default.
      
      udev depends entirely on netlink uevents. Only during early boot and
      in initramfs, /sbin/hotplug is needed. So merge the two functions and
      provide only one interface without all the options.
      
      The netlink layer got a nice generic interface with named slots
      recently, which is probably a better facility to plug events for
      subsystem specific events.
      Also the new poll() interface to /proc/mounts is a nicer way to
      notify about changes than sending events through the core.
      The uevents should only be used for driver core related requests to
      userspace now.
      Signed-off-by: NKay Sievers <kay.sievers@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5f123fbd
  5. 02 1月, 2006 1 次提交
  6. 27 12月, 2005 1 次提交
  7. 24 12月, 2005 1 次提交
    • T
      [PATCH] fix libata inquiry VPD for ATAPI devices · fd71da46
      Tony Battersby 提交于
      The following patch prevents libata from incorrectly modifying inquiry
      VPD pages and command support data from ATAPI devices.  I have tested
      the patch with a SATA ATAPI tape drive on an AHCI controller.
      
      Patch is against kernel 2.4.32 with 2.4.32-libata1.patch applied.
      
      Anthony J. Battersby
      Cybernetics
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      fd71da46
  8. 19 12月, 2005 1 次提交
  9. 18 12月, 2005 2 次提交
  10. 17 12月, 2005 3 次提交
  11. 16 12月, 2005 10 次提交
    • J
      [SCSI] fix for fc transport recursion problem. · 42e33148
      James.Smart@Emulex.Com 提交于
      In the scenario that a link was broken, the devloss timer for each
      rport was expire at roughly the same time, causing lots of "delete"
      workqueue items being queued. Depth is dependent upon the number of
      rports that were on the link.
      
      The rport target remove calls were calling flush_scheduled_work(),
      which would interrupt the stream, and start the next workqueue item,
      which did the same thing, and so on until recursion depth was large.
      
      This fix stops the recursion in the initial delete path, and pushes it
      off to a host-level work item that reaps the dead rports.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      42e33148
    • M
      [SCSI] Add PPR support to spi_print_msg · ef72582e
      Matthew Wilcox 提交于
      Introduce a new helper, print_nego() to handle SDTR/WDTR/PPR.
      Split out the guts of show_spi_transport_period_helper() into period_to_str()
      and use it in print_nego to get the period factor conversion right.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ef72582e
    • M
      [SCSI] Use ARRAY_SIZE in spi_print_msg · b32aaffc
      Matthew Wilcox 提交于
      Replace the custom NO_*_MSGS definitions with uses of ARRAY_SIZE.
      This fixes a bug in the definition of NO_EXTENDED_MSGS.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      b32aaffc
    • M
      [SCSI] Fix printing of two-byte messages · 47972153
      Matthew Wilcox 提交于
      A missing comma meant that "Ordered Queue Tag" and "Ignore Wide Residue"
      were being concatenated together.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      47972153
    • M
      [SCSI] Rename scsi_print_msg to spi_print_msg · 1abfd370
      Matthew Wilcox 提交于
      Rename scsi_print_msg to spi_print_msg and move its prototype from
      scsi_dbg.h to scsi_transport_spi.h
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1abfd370
    • M
      [SCSI] Move scsi_print_msg to SPI class · 410ca5c7
      Matthew Wilcox 提交于
      scsi_print_msg() is an SPI-specific concept.  This patch moves it from
      constants.c to scsi_transport_spi.c and updates the Kconfig to link in
      the SPI class for the drivers which use scsi_print_msg().
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      410ca5c7
    • J
      Fix up SCSI mismerge · 7b16318d
      James Bottomley 提交于
      I forgot to do a git-update-cache on the merged files ...
      7b16318d
    • K
      [SCSI] Fix st oops with new scsi_execute infrastructure · 787926b1
      Kai Makisara 提交于
      Patch from Kai minus last sg_segs clearing which was merged already.
      
      > > Was there a oops or lockup or any debug output you can send me? I will try
      > > some more large request tests with scsi_debug. You also have to compile your
      > > kernel with SCSI_MAX_PHYS_SEGMENTS == 255 to get larger requests now.
      >
      It was an oops in sgl_unmap_user_pages(). The reason is this:
      
      		/* XXX: just for debug. Remove when PageReserved is removed */
      		BUG_ON(PageReserved(page));
      
      I was using /dev/zero as input and it triggers this. When I used a file as
      input, this did not trigger. Should this BUG_ON be removed?
      
      In the same log I noticed that there was another ->sg_segs inconsistency.
      Also, the field ->last_SRpnt was not reset when scsi_execute_async()
      failed. This caused the error message "Async command already active"
      later and prevented proper close.
      
      While doing the changes, I noticed that the current code (since
      2.6.0-test4) does not set the pages dirty when reading with direct i/o.
      
      All of these st problems (including the one I sent earlier) are fixed in
      the patch at the end of this message. These fixes should probably be
      included already in 2.6.15.
      
      After these fixes, the tape seems to operate as expected. Without other
      changes, the largest block size with sym53c896 SCSI adapter is 384 kB. The
      maximum number of sg segments is set to 96 and clustering is disabled in
      the driver. 96 x 4 kB = 384 kB. OK.
      
      I enabled clustering and set max_sectors to 10000 in the SCSI HBA driver.
      Now the block size limit is 5000 kB as expected.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      787926b1
    • M
      [SCSI] seperate max_sectors from max_hw_sectors · defd94b7
      Mike Christie 提交于
      - export __blk_put_request and blk_execute_rq_nowait
      needed for async REQ_BLOCK_PC requests
      - seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and
      SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was
      already testing against max_sectors and SCSI-ml was setting max_sectors and
      max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only
      prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set
      a valid max_hw_sectors for all LLDs. Today if a LLD does not set it
      SCSI-ml sets it to a safe default and some LLDs set it to a artificial low
      value to overcome memory and feedback issues.
      
      Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024,
      drivers that used to call blk_queue_max_sectors with a large value of
      max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      defd94b7
    • A
      [PATCH] iscsi gfp_t annotations · b53cb2a4
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b53cb2a4
  12. 15 12月, 2005 5 次提交
    • M
      [SCSI] convert st to use scsi_execute_async · 8b05b773
      Mike Christie 提交于
      convert st to always send scatterlists and kill scsi_request
      usage.
      
      This is the same as last time as it was posted, but with Kai's patches
      merged and we now pass the bytes value to scsi_execute_async.
      
      TODO:
      
      - move DIO code to common place or make block layers usable for ULDs.
      - move buffer allocation code to common place for all ULDs to use. And
      make buffer allocation code handle all queue limits so we can find
      out about problems before calling scsi_execute_async.
      - move indirect (copy_to/from_user) paths commone place or make block
      layers usable for ULDs.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      8b05b773
    • M
      [SCSI] convert sg to scsi_execute_async · d6b10348
      Mike Christie 提交于
      Convert sg to always send scatterlists, and kill scsi_request usage.
      
      TODO:
      
      - move DIO code to common place or make block layers usable for ULDs.
      - move buffer allocation code to common place for all ULDs to use. And
      make buffer allocation code obey all queue limits so we can find
      out about problems before calling scsi_execute_async. Currently, sg.c
      could allocate a buffer that is too large, and send the request
      to scsi_execute_async. scsi_execute_async will then check it against
      all the queue limits and return a failure in this case. It would nicer
      to know about the queue limit violation right away.
      - move indirect (copy_to/from_user) paths commone place or make block
      layers usable for ULDs.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d6b10348
    • M
      [SCSI] add kmemcache for scsi_io_context · aa7b5cd7
      Mike Christie 提交于
      Add kmemcache of scsi io contexts.
      
      In the future when we finalize on where these functions will live
      we can add a mempool for it and do a bioset for out REQ_BLOCK_PC
      bios. This is needed becuase the dm-multipath handlers will
      want to use the scsi_exectute* functions for failover and we cannot
      have them and the bio device allocating from the same mempool.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      aa7b5cd7
    • M
      [SCSI] complete the whole command when it is REQ_BLOCK_PC · 0d95716d
      Mike Christie 提交于
      sd does not allow scsi_io_completion to retry commands for
      SG_IO requests, and it make sense that it should not happen for st
      SG_IO commands too. If for st we hit the bottom of scsi_io_completion
      we will probably screw things up pretty bad. This patch returns to the
      block layer that the whole command completed and relies on the caller to check
      the request errors field. For initialization commands like in sd, this adds
      the previous behavior where scsi_io_completion did not process the error.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      0d95716d
    • M
      [SCSI] add retries field to request for REQ_BLOCK_PC use · 17e01f21
      Mike Christie 提交于
      For tape we need to control the retries. This patch adds a retries
      counter on the request for REQ_BLOCK_PC commands originating from
      scsi_execute* to use. REQ_BLOCK_PC commands comming from the block
      layer SG_IO path continue to use the retires set in the ULD init_command.
      (scsi_execute* does not set the gendisk so we do not execute
      the init_command in that path).
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      17e01f21