From: Borislav Petkov <petkovbb@googlemail.com>
To: bzolnier@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 11/16] ide: add per-device flags
Date: Sun, 29 Jun 2008 12:59:14 +0200 [thread overview]
Message-ID: <1214737159-1078-12-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1214737159-1078-1-git-send-email-petkovbb@gmail.com>
Push device flags up into ide_drive_t.
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
include/linux/ide.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 57e99e9..0e52c3c 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -286,6 +286,64 @@ struct ide_acpi_drive_link;
struct ide_acpi_hwif_link;
#endif
+/* device flags */
+enum {
+ IDE_FLAG_DRQ_INTERRUPT = (1 << 0),
+ IDE_FLAG_MEDIA_CHANGED = (1 << 1),
+
+ /* ide-cd */
+ /* Drive cannot lock the door. */
+ IDE_FLAG_NO_DOORLOCK = (1 << 2),
+ /* Drive cannot eject the disc. */
+ IDE_FLAG_NO_EJECT = (1 << 3),
+ /* Drive is a pre ATAPI 1.2 drive. */
+ IDE_FLAG_PRE_ATAPI12 = (1 << 4),
+ /* TOC addresses are in BCD. */
+ IDE_FLAG_TOCADDR_AS_BCD = (1 << 5),
+ /* TOC track numbers are in BCD. */
+ IDE_FLAG_TOCTRACKS_AS_BCD = (1 << 6),
+ /*
+ * Drive does not provide data in multiples of SECTOR_SIZE
+ * when more than one interrupt is needed.
+ */
+ IDE_FLAG_LIMIT_NFRAMES = (1 << 7),
+ /* Seeking in progress. */
+ IDE_FLAG_SEEKING = (1 << 8),
+ /* Saved TOC information is current. */
+ IDE_FLAG_TOC_VALID = (1 << 9),
+ /* We think that the drive door is locked. */
+ IDE_FLAG_DOOR_LOCKED = (1 << 10),
+ /* SET_CD_SPEED command is unsupported. */
+ IDE_FLAG_NO_SPEED_SELECT = (1 << 11),
+ IDE_FLAG_VERTOS_300_SSD = (1 << 12),
+ IDE_FLAG_VERTOS_600_ESD = (1 << 13),
+ IDE_FLAG_SANYO_3CD = (1 << 14),
+ IDE_FLAG_FULL_CAPS_PAGE = (1 << 15),
+ IDE_FLAG_PLAY_AUDIO_OK = (1 << 16),
+ IDE_FLAG_LE_SPEED_FIELDS = (1 << 17),
+
+ /* ide-floppy */
+ /* Format in progress */
+ IDE_FLAG_FORMAT_IN_PROGRESS = (1 << 18),
+ /* Avoid commands not supported in Clik drive */
+ IDE_FLAG_CLIK_DRIVE = (1 << 19),
+ /* Requires BH algorithm for packets */
+ IDE_FLAG_ZIP_DRIVE = (1 << 20),
+
+ /* ide-tape */
+ IDE_FLAG_IGNORE_DSC = (1 << 21),
+ /* 0 When the tape position is unknown */
+ IDE_FLAG_ADDRESS_VALID = (1 << 22),
+ /* Device already opened */
+ IDE_FLAG_BUSY = (1 << 23),
+ /* Attempt to auto-detect the current user block size */
+ IDE_FLAG_DETECT_BS = (1 << 24),
+ /* Currently on a filemark */
+ IDE_FLAG_FILEMARK = (1 << 25),
+ /* 0 = no tape is loaded, so we don't rewind after ejecting */
+ IDE_FLAG_MEDIUM_PRESENT = (1 << 26)
+};
+
struct ide_drive_s {
char name[4]; /* drive name, such as "hda" */
char driver_req[10]; /* requests specific driver */
@@ -382,6 +440,8 @@ struct ide_drive_s {
/* callback for packet commands */
void (*pc_callback)(struct ide_drive_s *);
+
+ unsigned long dev_flags;
};
typedef struct ide_drive_s ide_drive_t;
--
1.5.5.4
next prev parent reply other threads:[~2008-06-29 10:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-29 10:59 [PATCH 00/16] Generic ide device flags Borislav Petkov
2008-06-29 10:59 ` [PATCH 01/16] ide: push pc callback pointer into the ide_drive_t structure Borislav Petkov
2008-06-29 10:59 ` [PATCH 02/16] ide-floppy: use drive->pc_callback instead of pc->callback Borislav Petkov
2008-06-29 10:59 ` [PATCH 03/16] ide-tape: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 04/16] ide-scsi: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 05/16] ide: remove pc->callback member from ide_atapi_pc Borislav Petkov
2008-06-29 10:59 ` [PATCH 06/16] ide-floppy: pass packet command in rq->cmd Borislav Petkov
2008-06-29 10:59 ` [PATCH 07/16] ide-tape: make room for packet command ids " Borislav Petkov
2008-06-29 10:59 ` [PATCH 08/16] ide-tape: pass packet command " Borislav Petkov
2008-06-29 10:59 ` [PATCH 09/16] ide-scsi: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 10/16] ide: use rq->cmd instead of pc->c in atapi common code Borislav Petkov
2008-06-29 10:59 ` Borislav Petkov [this message]
2008-06-29 10:59 ` [PATCH 12/16] ide-floppy: convert to using the new dev_flags Borislav Petkov
2008-06-29 10:59 ` [PATCH 13/16] ide-tape: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 14/16] ide-scsi: " Borislav Petkov
2008-06-29 10:59 ` [PATCH 15/16] ide: remove unused PC_FLAG_DRQ_INTERRUPT Borislav Petkov
2008-06-29 10:59 ` [PATCH 16/16] ide-cd: convert to using the new dev_flags Borislav Petkov
2008-06-30 20:44 ` [PATCH 00/16] Generic ide device flags Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214737159-1078-12-git-send-email-petkovbb@gmail.com \
--to=petkovbb@googlemail.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).