Skip to content

ide: add generic ATA/ATAPI disk driver

Bartlomiej Zolnierkiewicz linux-ide lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18ide-disk: fix IDE_DFLAG_LBA48 handling on resumedrivers/ide/ide-disk.c+20 -200 replies
2/18ide-disk: lock media before checking for media changedrivers/ide/ide-disk.c+1 -10 replies
3/18ide-floppy: use alloc_disk_node()drivers/ide/ide-floppy.c+1 -10 replies
4/18ide-disk: use to_ide_drv() and ide_drv_g()drivers/ide/ide-disk.c drivers/ide/ide-disk.h drivers/ide/ide-disk_ioctl.c+7 -120 replies
5/18ide-disk: move IDE_DFLAG_DOORLOCKING flag handling to idedisk_set_doorlock()drivers/ide/ide-disk.c+13 -90 replies
6/18ide-{disk,floppy}: set IDE_DFLAG_ATTACH in *_setup()drivers/ide/ide-disk.c drivers/ide/ide-floppy.c+12 -90 replies
7/18ide-floppy: drop 'floppy' argument from idefloppy_setup()drivers/ide/ide-floppy.c+3 -20 replies
8/18ide-floppy: use drive->capacity64 for caching current capacitydrivers/ide/ide-floppy.c+13 -102 replies
9/18ide: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGEDdrivers/ide/ide-cd.c drivers/ide/ide-cd_ioctl.c drivers/ide/ide-floppy.c +1 more+9 -90 replies
10/18ide: IDE_AFLAG_WP -> IDE_DFLAG_WPdrivers/ide/ide-floppy.c include/linux/ide.h+6 -60 replies
11/18ide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESSdrivers/ide/ide-floppy.c drivers/ide/ide-floppy_ioctl.c include/linux/ide.h+7 -80 replies
12/18ide: remove IDE_AFLAG_NO_DOORLOCKINGdrivers/ide/ide-atapi.c drivers/ide/ide-cd.c drivers/ide/ide-cd_ioctl.c +4 more+7 -80 replies
13/18ide-disk: factor out generic disk handling code to ide-gd.cdrivers/ide/Makefile drivers/ide/ide-disk.c drivers/ide/ide-disk.h +2 more+307 -2930 replies
14/18ide-disk: use IDE_DFLAG_MEDIA_CHANGEDdrivers/ide/ide-gd.c+6 -20 replies
15/18ide-floppy: factor out generic disk handling code to ide-gd-floppy.cdrivers/ide/Makefile drivers/ide/ide-floppy.c drivers/ide/ide-floppy.h +1 more+327 -3110 replies
16/18ide: prepare for merging ide-gd-floppy.c with ide-gd.cdrivers/ide/ide-floppy.h drivers/ide/ide-floppy_proc.c drivers/ide/ide-gd-floppy.c+91 -920 replies
17/18ide: allow device drivers to specify per-device type /proc settingsdrivers/ide/ide-cd.c drivers/ide/ide-gd-floppy.c drivers/ide/ide-gd.c +4 more+74 -220 replies
18/18ide: add generic ATA/ATAPI disk driverdrivers/ide/Kconfig drivers/ide/Makefile drivers/ide/ide-disk.c +10 more+305 -4550 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/18] ide: add generic ATA/ATAPI disk driver

[ Borislav, this is the 'futuristic' stuff that we were talking about. :) ]

Hi,

This patch series adds a generic ATA/ATAPI disk driver (ide-gd) replacing ide-disk and ide-floppy drivers. It is achieved by moving the common code to ide-gd.c, adding struct ide_disk_ops (which is used to abstract protocol specific details) and updating ide-{disk,floppy}.c accordingly.

The main goal is to make the code more maintainable / easier to extend later. As an immediate result we get driver specific debugging support for ATA disks and ability for driver specific Power Management for ATAPI devices. Otherwise it is really an initial merge (which means that in the future the code can be further unified, struct ide_disk_ops can be made more fine-grained etc.).

patches:
#01-02 drive-by bugfixes
#03-04 small improvements (good on their own) #05-12 small cleanups (good on their own)
#13-17 preparatory patches (just to make the review easier)
#18 the main patch

diffstat:

 drivers/ide/Kconfig            |   64 +--
 drivers/ide/Makefile           |   23 -
 drivers/ide/ide-atapi.c        |    2 
 drivers/ide/ide-cd.c           |   22 -
 drivers/ide/ide-cd_ioctl.c     |    8 
 drivers/ide/ide-disk.c         |  434 ++++------------------
 drivers/ide/ide-disk.h         |   35 -
 drivers/ide/ide-disk_ioctl.c   |    6 
 drivers/ide/ide-disk_proc.c    |    2 
 drivers/ide/ide-floppy.c       |  419 +++------------------
 drivers/ide/ide-floppy.h       |   79 +---
 drivers/ide/ide-floppy_ioctl.c |   15 
 drivers/ide/ide-floppy_proc.c  |    2 
 drivers/ide/ide-gd-floppy.c    |  802 ++++++++++++++++++++---------------------
 drivers/ide/ide-gd.c           |  437 +++++++++++++++++++++-
 drivers/ide/ide-gd.h           |   44 ++
 drivers/ide/ide-probe.c        |    1 
 drivers/ide/ide-proc.c         |    6 
 drivers/ide/ide-tape.c         |   16 
 drivers/leds/Kconfig           |    2 
 drivers/scsi/ide-scsi.c        |   26 -
 include/linux/ide.h            |   34 +
 22 files changed, 1209 insertions(+), 1270 deletions(-)