-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ide: add generic ATA/ATAPI disk driver
* Add struct ide_disk_ops containing protocol specific methods. * Add 'struct ide_disk_ops *' to ide_drive_t. * Convert ide-{disk,floppy} drivers to use struct ide_disk_ops. * Merge ide-{disk,floppy} drivers into generic ide-gd driver. While at it: - ide_disk_init_capacity() -> ide_disk_get_capacity() Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
- Loading branch information
Bartlomiej Zolnierkiewicz
committed
Oct 17, 2008
1 parent
79cb380
commit 806f80a
Showing
13 changed files
with
303 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
#ifndef __IDE_DISK_H | ||
#define __IDE_DISK_H | ||
|
||
struct ide_disk_obj { | ||
ide_drive_t *drive; | ||
ide_driver_t *driver; | ||
struct gendisk *disk; | ||
struct kref kref; | ||
unsigned int openers; /* protected by BKL for now */ | ||
}; | ||
|
||
sector_t ide_gd_capacity(ide_drive_t *); | ||
#include "ide-gd.h" | ||
|
||
#ifdef CONFIG_IDE_GD_ATA | ||
/* ide-disk.c */ | ||
void ide_disk_init_capacity(ide_drive_t *); | ||
void ide_disk_setup(ide_drive_t *); | ||
void ide_disk_flush(ide_drive_t *); | ||
int ide_disk_set_doorlock(ide_drive_t *, int); | ||
ide_startstop_t ide_do_rw_disk(ide_drive_t *, struct request *, sector_t); | ||
extern const struct ide_disk_ops ide_ata_disk_ops; | ||
ide_decl_devset(address); | ||
ide_decl_devset(multcount); | ||
ide_decl_devset(nowerr); | ||
ide_decl_devset(wcache); | ||
ide_decl_devset(acoustic); | ||
|
||
/* ide-disk_ioctl.c */ | ||
int ide_disk_ioctl(struct inode *, struct file *, unsigned int, unsigned long); | ||
int ide_disk_ioctl(ide_drive_t *, struct inode *, struct file *, unsigned int, | ||
unsigned long); | ||
|
||
#ifdef CONFIG_IDE_PROC_FS | ||
/* ide-disk_proc.c */ | ||
extern ide_proc_entry_t ide_disk_proc[]; | ||
extern const struct ide_proc_devset ide_disk_settings[]; | ||
#endif | ||
#else | ||
#define ide_disk_proc NULL | ||
#define ide_disk_settings NULL | ||
#endif | ||
|
||
#endif /* __IDE_DISK_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.