• Bartlomiej Zolnierkiewicz's avatar
    [PATCH] init_idedisk_capacity() cleanup() · c98a3356
    Bartlomiej Zolnierkiewicz authored
    - no need to zero drive->capacity48 and drive->select.b.lba
    - don't call idedisk_read_native_max_address_ext() twice
      if drive uses LBA-48 and CONFIG_IDEDISK_STROKE is defined
    - remove uneccessary setup of drive->capacity48/cyl/select.b.lba
      if drive uses LBA-48, maximum virtual LBA address needs to be set
      and CONFIG_IDEDISK_STROKE is defined
    - set drive->cyl only once if drive uses LBA-48
    - don't call idedisk_read_native_max_address() if drive uses LBA-48
      and don't call it twice if CONFIG_IDEDISK_STROKE is defined
    - don't check for Host Protected Area if drive uses CHS addressing
      (such combination is not supported by a driver)
    - remove duplicated code (at the end of the function) that is never executed
    c98a3356
ide-disk.c 56.8 KB