1. 17 Feb, 2007 3 commits
    • Alan Cox's avatar
      ide-floppy: Fix unformatted media crash · fdb77da4
      Alan Cox authored
      A ZIP or similar with unformatted media will cause crashes when attempts
      are made to read/write it in some cases. This is because bs_factor is
      zero and we divide by it causing an oops.
      
      As the size of a non-accessible/non-existant media is really a bit of a
      zen question it doesn't matter if non-existant media is 512 bytes per
      sector or zero. Setting it to 1 causes us to generate 512 bytes/sector
      accesses and error properly.
      
      Based on a fix found lurking in an ancient bugzilla entry since about 2004 (ugghhh)
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      fdb77da4
    • Bartlomiej Zolnierkiewicz's avatar
      atiixp/jmicron/triflex: fix PIO fallback · 39baf8a7
      Bartlomiej Zolnierkiewicz authored
      * atiixp: if DMA can't be used atiixp_config_drive_for_dma() should return 0,
        atiixp_dma_check() will tune the correct PIO mode anyway
      
      * jmicron: if DMA can't be used config_chipset_for_dma() should return 0,
        micron_config_drive_for_dma() will tune the correct PIO mode anyway
      
        config_jmicron_chipset_for_pio(drive, !speed) doesn't program
        device transfer mode for speed != 0 (only wastes some CPU cycles
        on ide_get_best_pio_mode() call) so remove it
      
      * triflex: if DMA can't be used triflex_config_drive_for_dma() should return 0,
        triflex_config_drive_xfer_rate() will tune correct PIO mode anyway
      
      Above changes also fix (theoretical) issue when ->speedproc fails to set
      device transfer mode (i.e. when ide_config_drive_speed() fails to program it)
      but one of DMA transfer modes is already enabled on the device by the BIOS.
      In such scenario ide_dma_enable() will incorrectly return true statement
      and ->ide_dma_check will try to enable DMA on the device.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      39baf8a7
    • Bartlomiej Zolnierkiewicz's avatar
      hpt34x: hpt34x_tune_chipset() (->speedproc) fix · 296d9bcc
      Bartlomiej Zolnierkiewicz authored
      * remember to clear reg2 bits for the current device before setting mode
      * remove no longer needed hpt34x_clear_chipset()
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      296d9bcc
  2. 16 Feb, 2007 37 commits