1. 10 Mar, 2011 27 commits
  2. 09 Mar, 2011 13 commits
    • Tejun Heo's avatar
      staging: Convert to bdops->check_events() · cafb0bfc
      Tejun Heo authored
      Convert two staging drivers - blkvsc_drv and cyasblkdev_block - from
      ->media_changed() to ->check_events().  The former always indicated
      media changed while the latter always indicated media not changed.
      Not sure what the drivers are trying to achieve but keep the original
      behavior.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      cafb0bfc
    • Tejun Heo's avatar
      pktcdvd: Convert to bdops->check_events() · 3c0d2060
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      pktcdvd needs to forward all event related operations to the
      underlying device.  Forward ->check_events() instead of
      ->media_changed() and inherit disk->[async_]events.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Peter Osterlund <petero2@telia.com>
      3c0d2060
    • Tejun Heo's avatar
      umem: Drop dummy ->media_changed() · 6fac80e3
      Tejun Heo authored
      umem doesn't implement media changed detection and there's no need to
      implement dummy callback anymore.  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      6fac80e3
    • Tejun Heo's avatar
      s390/tape_block: Convert to bdops->check_events() · ffe80cea
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      s390/tape_block buffers media changed state and clears it on
      revalidation.  It will behave correctly with kernel event polling.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      ffe80cea
    • Tejun Heo's avatar
      i2o_block: Convert to bdops->check_events() · f47350fd
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      i2o_block buffers media changed state and clears it after reporting.
      It will behave correctly with kernel event polling.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      f47350fd
    • Tejun Heo's avatar
      xsysace: Convert to bdops->check_events() · 3a200911
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      xsysace buffers media changed state and clears it on revalidation.  It
      will behave correctly with kernel event polling.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      3a200911
    • Tejun Heo's avatar
      ub: Convert to bdops->check_events() · aaa7c015
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      ub buffers media changed state and clears it on revalidation.  It will
      behave correctly with kernel event polling.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      aaa7c015
    • Tejun Heo's avatar
      swim[3]: Convert to bdops->check_events() · 4bbde777
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      Both swim and swim3 buffer media changed state and clear it on
      revalidation.  They will behave correctly with kernel event polling.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Laurent Vivier <laurent@lvivier.info>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      4bbde777
    • Tejun Heo's avatar
      dac960: Convert to bdops->check_events() · 507daea2
      Tejun Heo authored
      Convert from ->media_changed() to ->check_events().
      
      DAC960 media change notification seems to be one way (once set, never
      cleared) and will generate spurious events when polled once the
      condition triggers.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      507daea2
    • Tejun Heo's avatar
      paride: Convert to bdops->check_events() · b1b56b93
      Tejun Heo authored
      Convert paride drivers from ->media_changed() to ->check_events().
      
      pcd and pd buffer and clear events after reporting; however, pf
      unconditionally reports MEDIA_CHANGE and will generate spurious events
      when polled.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Tim Waugh <tim@cyberelk.net>
      b1b56b93
    • Tejun Heo's avatar
      gdrom,viocd: Convert to bdops->check_events() · 1c27030b
      Tejun Heo authored
      Convert gdrom and viocd from ->media_changed() to ->check_events().
      
      It's unclear how the conditions are cleared and it's possible that it
      may generate spurious events when polled.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      1c27030b
    • Tejun Heo's avatar
      floppy,{ami|ata}flop: Convert to bdops->check_events() · 1a8a74f0
      Tejun Heo authored
      Convert the floppy drivers from ->media_changed() to ->check_events().
      Both floppy and ataflop buffer media changed state bit and clear them
      on revalidation and will behave correctly with kernel event polling.
      
      I can't tell how amiflop clears its event and it's possible that it
      may generate spurious events when polled.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      1a8a74f0
    • Tejun Heo's avatar
      ide: Convert to bdops->check_events() · 5b03a1b1
      Tejun Heo authored
      Convert ->media_changed() to the new ->check_events() method.  The
      conversion is mostly mechanical.  The only notable change is that
      cdrom now doesn't generate any event if @slot_nr isn't CDSL_CURRENT.
      It used to return -EINVAL which would be treated as media changed.  As
      media changer isn't supported anyway, this doesn't make any
      difference.
      
      This makes ide emit the standard disk events and allows kernel event
      polling.  Currently, only MEDIA_CHANGE event is implemented.  Adding
      support for EJECT_REQUEST shouldn't be difficult; however, given that
      ide driver is already deprecated, it probably is best to leave it
      alone.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-ide@vger.kernel.org
      5b03a1b1