1. 02 2月, 2008 2 次提交
  2. 01 2月, 2008 1 次提交
  3. 28 1月, 2008 2 次提交
    • K
      blk_end_request: changing ide-cd (take 4) · aaa04c28
      Kiyoshi Ueda 提交于
      This patch converts ide-cd (cdrom_newpc_intr()) to use blk_end_request
      interfaces.  Related 'uptodate' arguments are converted to 'error'.
      
      In PIO mode, ide-cd (cdrom_newpc_intr()) needs to defer
      end_that_request_last() until the device clears DRQ_STAT and raises
      an interrupt after end_that_request_first().
      So blk_end_request() has to return without completing request
      even if no leftover in the request.
      
      ide-cd uses blk_end_request_callback() and a dummy callback function,
      which just returns value '1', to tell blk_end_request_callback()
      about that.
      
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NKiyoshi Ueda <k-ueda@ct.jp.nec.com>
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      aaa04c28
    • K
      blk_end_request: changing ide normal caller (take 4) · 5e36bb6e
      Kiyoshi Ueda 提交于
      This patch converts "normal" parts of ide to use blk_end_request
      interfaces.  Related 'uptodate' arguments are converted to 'error'.
      
      The conversion of 'uptodate' to 'error' is done only for the internal
      function, __ide_end_request().
      ide_end_request() was not changed since it's exported and used
      by many ide drivers.
      
      With this patch, blkdev_dequeue_request() in __ide_end_request() is
      moved to blk_end_request, since blk_end_request takes care of
      dequeueing request like below:
      
      	if (!list_empty(&rq->queuelist))
      		blkdev_dequeue_request(rq);
      
      In the case of ide,
        o 'dequeue' variable of __ide_end_request() is 1 only when the request
          is still linked to the queue (i.e. rq->queuelist is not empty)
        o 'dequeue' variable of __ide_end_request() is 0 only when the request
          has already been removed from the queue (i.e. rq->queuelist is empty)
      So blk_end_request can handle it correctly although ide always run
      thought the code above.
      
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NKiyoshi Ueda <k-ueda@ct.jp.nec.com>
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5e36bb6e
  4. 26 1月, 2008 2 次提交
  5. 24 12月, 2007 9 次提交
  6. 13 12月, 2007 2 次提交
    • B
      ide-cd: remove dead post_transform_command() · c86ae7df
      Bartlomiej Zolnierkiewicz 提交于
      post_transform_command() call in cdrom_newpc_intr() has no effect because
      it is done after the request has already been fully completed (rq->bio and
      rq->data are always NULL).  It was verified to be true regardless whether
      INQUIRY command is using DMA or PIO to transfer data (by using modified
      Tejun Heo's test-shortsg.c utility and adding a few printk()-s to ide-cd).
      
      This was uncovered thanks to the "blk_end_request: full I/O completion
      handler (take 3)" patch series from Kiyoshi Ueda.
      
      Cc: jens.axboe@oracle.com
      Cc: bharrosh@panasas.com
      Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com
      Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Cc: Tejun Heo <htejun@gmail.com>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c86ae7df
    • B
      ide: DMA reporting and validity checking fixes (take 3) · 3ab7efe8
      Bartlomiej Zolnierkiewicz 提交于
      * ide_xfer_verbose() fixups:
        - beautify returned mode names
        - fix PIO5 reporting
        - make it return 'const char *'
      
      * Change printk() level from KERN_DEBUG to KERN_INFO in ide_find_dma_mode().
      
      * Add ide_id_dma_bug() helper based on ide_dma_verbose() to check for invalid
        DMA info in identify block.
      
      * Use ide_id_dma_bug() in ide_tune_dma() and ide_driveid_update().
      
        As a result DMA won't be tuned or will be disabled after tuning if device
        reports inconsistent info about enabled DMA mode (ide_dma_verbose() does the
        same checks while the IDE device is probed by ide-{cd,disk} device driver).
      
      * Remove no longer needed ide_dma_verbose().
      
      This patch should fix the following problem with out-of-sync IDE messages
      reported by Nick Warne:
      
             hdd: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache<7>hdd:
             skipping word 93 validity check
              , UDMA(66)
      
      and later debugged by Mark Lord to be caused by:
      
              ide_dma_verbose()
                      printk( ... "2048kB Cache");
              eighty_ninty_three()
                      printk(KERN_DEBUG "%s: skipping word 93 validity check\n");
              ide_dma_verbose()
                      printk(", UDMA(66)"
      
      Please note that as a result ide-{cd,disk} device drivers won't report the
      DMA speed used but this is intended since now DMA mode being used is always
      reported by IDE core code.
      
      v2:
      * fixes suggested by Randy:
        - use KERN_CONT for printk()-s in ide-{cd,disk}.c
        - don't remove argument name from ide_xfer_verbose() declaration
      
      v3:
      * Remove incorrect check for (id->field_valid & 1) from ide_id_dma_bug()
        (spotted by Sergei).
      
      * "XFER SLOW" -> "PIO SLOW" in ide_xfer_verbose() (suggested by Sergei).
      
      * Fix ide_find_dma_mode() to report the correct mode ('mode' after being
        limited by 'req_mode').
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Nick Warne <nick@ukfsn.org>
      Cc: Mark Lord <lkml@rtr.ca>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ab7efe8
  7. 20 10月, 2007 1 次提交
  8. 24 7月, 2007 1 次提交
  9. 10 7月, 2007 1 次提交
  10. 10 5月, 2007 3 次提交
    • B
      ide: move IDE settings handling to ide-proc.c · 7662d046
      Bartlomiej Zolnierkiewicz 提交于
      * move
      	__ide_add_setting()
      	ide_add_setting()
      	__ide_remove_setting()
      	auto_remove_settings()
      	ide_find_setting_by_name()
      	ide_read_setting()
      	ide_write_setting()
      	set_xfer_rate()
      	ide_add_generic_settings()
      	ide_register_subdriver()
      	ide_unregister_subdriver()
      
        from ide.c to ide-proc.c
      
      * set_{io_32bit,pio_mode,using_dma}() cannot be marked static now, fix it
      
      * rename ide_[un]register_subdriver() to ide_proc_[un]register_driver(),
        update device drivers to use new names
      
      * add CONFIG_IDE_PROC_FS=n versions of ide_proc_[un]register_driver()
        and ide_add_generic_settings()
      
      * make ide_find_setting_by_name(), ide_{read,write}_setting()
        and ide_{add,remove}_proc_entries() static
      
      * cover IDE settings code in device drivers with CONFIG_IDE_PROC_FS #ifdef,
        also while at it cover with CONFIG_IDE_PROC_FS #ifdef ide_driver_t.proc
      
      * remove bogus comment from ide.h
      
      * cover with CONFIG_IDE_PROC_FS #ifdef .proc and .settings in ide_drive_t
      
      Besides saner code this patch results in the IDE core smaller by ~2 kB
      (on x86-32) and IDE disk driver by ~1 kB (ditto) when CONFIG_IDE_PROC_FS=n.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7662d046
    • B
      ide: split off ioctl handling from IDE settings (v2) · 1497943e
      Bartlomiej Zolnierkiewicz 提交于
      * do write permission and min/max checks in ide_procset_t functions
      
      * ide-disk.c: drive->id is always available so cleanup "multcount" setting
        accordingly
      
      * ide-disk.c: "address" setting was incorrectly defined as type TYPE_INTA,
        fix it by using type TYPE_BYTE and updating ide_drive_t->adressing field,
        the bug didn't trigger because this IDE setting uses custom ->set function
      
      * ide.c: add set_ksettings() for handling HDIO_SET_KEEPSETTINGS ioctl
      
      * ide.c: add set_unmaskirq() for handling HDIO_SET_UNMASKINTR ioctl
      
      * handle ioctls directly in generic_ide_ioclt() and idedisk_ioctl()
        instead of using IDE settings to deal with them
      
      * remove no longer needed ide_find_setting_by_ioctl() and {read,write}_ioctl
        fields from ide_settings_t, also remove now unused TYPE_INTA handling
      
      v2:
      * add missing EXPORT_SYMBOL_GPL(ide_setting_sem) needed now for ide-disk
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1497943e
    • B
      ide: make /proc/ide/ optional · ecfd80e4
      Bartlomiej Zolnierkiewicz 提交于
      All important information/features should be already available through
      sysfs and ioctl interfaces.
      
      Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
      disabling it makes IDE driver ~5 kB smaller (on x86-32).
      
      While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
      and remove no longer needed #ifdefs.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ecfd80e4
  11. 11 4月, 2007 1 次提交
    • S
      ide: ugly messages trying to open CD drive with no media present · 76ca1af1
      Stuart Hayes 提交于
      I get the following error messages when trying to open a CD device
      (specifically, the Teac CD-ROM CD-224E) that has no media present:
      
      hda: packet command error: status=3D0x51 { DriveReady SeekComplete Error }
      hda: packet command error: error=3D0x54 { AbortedCommand LastFailedSense=0x05 }
      ide: failed opcode was: unknown
      
      This happens when a "start stop unit" command (0x1b 0 0 0 3 0 0 0 0 0)
      is sent to the drive to try to close the CD-ROM tray, but this drive
      doesn't have that capability (it's a slim portable-type CD-ROM), so it
      reports sense key 5 (illegal request) with asc/ascq 24/0.  This is
      exactly how SFF8090i says it should respond.
      
      But ide-cd.c (in cdrom_decode_status() ) just sees sense key 5 and spews
      out an error.  It then goes on to request sense data, and
      cdrom_log_sense() understands this error and doesn't log it.
      
      The patch, for kernel 2.6.20.4, suppresses this error message.
      Signed-off-by: NStuart Hayes <stuart_hayes@dell.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      76ca1af1
  12. 17 2月, 2007 5 次提交
  13. 11 12月, 2006 1 次提交
  14. 14 11月, 2006 1 次提交
  15. 12 10月, 2006 2 次提交
  16. 01 10月, 2006 1 次提交
    • 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
  17. 01 7月, 2006 1 次提交
  18. 27 6月, 2006 1 次提交
  19. 26 6月, 2006 1 次提交
    • A
      [PATCH] IDE CD end-of media error fix · dbe217af
      Alan Cox 提交于
      This is a patch from Alan that fixes a real ide-cd.c regression causing
      bogus "Media Check" failures for perfectly valid Fedora install ISOs, on
      certain CD-ROM drives.
      
      This is a forward port to 2.6.16 (from RHEL) of the minimal changes for the
      end of media problem.  It may not be sufficient for some controllers
      (promise notably) and it does not touch the locking so the error path
      locking is as horked as in mainstream.
      
      From: Ingo Molnar <mingo@elte.hu>
      
      I have ported the patch to 2.6.17-rc4 and tested it by provoking
      end-of-media IO errors with an unaligned ISO image.  Unlike the vanilla
      kernel, the patched kernel interpreted the error condition correctly with
      512 byte granularity:
      
       hdc: command error: status=0x51 { DriveReady SeekComplete Error }
       hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
       ide: failed opcode was: unknown
       ATAPI device hdc:
         Error: Illegal request -- (Sense key=0x05)
         Illegal mode for this track or incompatible medium -- (asc=0x64, ascq=0x00)
         The failed "Read 10" packet command was:
         "28 00 00 04 fb 78 00 00 06 00 00 00 00 00 00 00 "
       end_request: I/O error, dev hdc, sector 1306080
       Buffer I/O error on device hdc, logical block 163260
       Buffer I/O error on device hdc, logical block 163261
       Buffer I/O error on device hdc, logical block 163262
      
      the unpatched kernel produces an incorrect error dump:
      
       hdc: command error: status=0x51 { DriveReady SeekComplete Error }
       hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
       ide: failed opcode was: unknown
       end_request: I/O error, dev hdc, sector 1306080
       Buffer I/O error on device hdc, logical block 163260
       hdc: command error: status=0x51 { DriveReady SeekComplete Error }
       hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
       ide: failed opcode was: unknown
       end_request: I/O error, dev hdc, sector 1306088
       Buffer I/O error on device hdc, logical block 163261
       hdc: command error: status=0x51 { DriveReady SeekComplete Error }
       hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
       ide: failed opcode was: unknown
       end_request: I/O error, dev hdc, sector 1306096
       Buffer I/O error on device hdc, logical block 163262
      
      I do not have the right type of CD-ROM drive to reproduce the end-of-media
      data corruption bug myself, but this same patch in RHEL solved it.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Matt Mackall <mpm@selenic.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dbe217af
  20. 23 6月, 2006 2 次提交