diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-07-23 13:56:01 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:56:01 -0400 |
commit | 3b8ac5398ca8137b41aa5da4d9fad89153450aaa (patch) | |
tree | 994f2ecca99e3edf685108bca7c2dba4058584e0 /include/linux/ide.h | |
parent | 8fccf8995c6d462db50265a5f7fa9a288a5a4590 (diff) |
ide: add per-device flags
Push device flags up into ide_drive_t.
There should be no functionality change resulting from this patch.
[bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags]
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | 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 d8ec8afb4ef3..fcf2d1bede08 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -308,6 +308,64 @@ struct ide_acpi_drive_link; | |||
308 | struct ide_acpi_hwif_link; | 308 | struct ide_acpi_hwif_link; |
309 | #endif | 309 | #endif |
310 | 310 | ||
311 | /* ATAPI device flags */ | ||
312 | enum { | ||
313 | IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), | ||
314 | IDE_AFLAG_MEDIA_CHANGED = (1 << 1), | ||
315 | |||
316 | /* ide-cd */ | ||
317 | /* Drive cannot lock the door. */ | ||
318 | IDE_AFLAG_NO_DOORLOCK = (1 << 2), | ||
319 | /* Drive cannot eject the disc. */ | ||
320 | IDE_AFLAG_NO_EJECT = (1 << 3), | ||
321 | /* Drive is a pre ATAPI 1.2 drive. */ | ||
322 | IDE_AFLAG_PRE_ATAPI12 = (1 << 4), | ||
323 | /* TOC addresses are in BCD. */ | ||
324 | IDE_AFLAG_TOCADDR_AS_BCD = (1 << 5), | ||
325 | /* TOC track numbers are in BCD. */ | ||
326 | IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 6), | ||
327 | /* | ||
328 | * Drive does not provide data in multiples of SECTOR_SIZE | ||
329 | * when more than one interrupt is needed. | ||
330 | */ | ||
331 | IDE_AFLAG_LIMIT_NFRAMES = (1 << 7), | ||
332 | /* Seeking in progress. */ | ||
333 | IDE_AFLAG_SEEKING = (1 << 8), | ||
334 | /* Saved TOC information is current. */ | ||
335 | IDE_AFLAG_TOC_VALID = (1 << 9), | ||
336 | /* We think that the drive door is locked. */ | ||
337 | IDE_AFLAG_DOOR_LOCKED = (1 << 10), | ||
338 | /* SET_CD_SPEED command is unsupported. */ | ||
339 | IDE_AFLAG_NO_SPEED_SELECT = (1 << 11), | ||
340 | IDE_AFLAG_VERTOS_300_SSD = (1 << 12), | ||
341 | IDE_AFLAG_VERTOS_600_ESD = (1 << 13), | ||
342 | IDE_AFLAG_SANYO_3CD = (1 << 14), | ||
343 | IDE_AFLAG_FULL_CAPS_PAGE = (1 << 15), | ||
344 | IDE_AFLAG_PLAY_AUDIO_OK = (1 << 16), | ||
345 | IDE_AFLAG_LE_SPEED_FIELDS = (1 << 17), | ||
346 | |||
347 | /* ide-floppy */ | ||
348 | /* Format in progress */ | ||
349 | IDE_AFLAG_FORMAT_IN_PROGRESS = (1 << 18), | ||
350 | /* Avoid commands not supported in Clik drive */ | ||
351 | IDE_AFLAG_CLIK_DRIVE = (1 << 19), | ||
352 | /* Requires BH algorithm for packets */ | ||
353 | IDE_AFLAG_ZIP_DRIVE = (1 << 20), | ||
354 | |||
355 | /* ide-tape */ | ||
356 | IDE_AFLAG_IGNORE_DSC = (1 << 21), | ||
357 | /* 0 When the tape position is unknown */ | ||
358 | IDE_AFLAG_ADDRESS_VALID = (1 << 22), | ||
359 | /* Device already opened */ | ||
360 | IDE_AFLAG_BUSY = (1 << 23), | ||
361 | /* Attempt to auto-detect the current user block size */ | ||
362 | IDE_AFLAG_DETECT_BS = (1 << 24), | ||
363 | /* Currently on a filemark */ | ||
364 | IDE_AFLAG_FILEMARK = (1 << 25), | ||
365 | /* 0 = no tape is loaded, so we don't rewind after ejecting */ | ||
366 | IDE_AFLAG_MEDIUM_PRESENT = (1 << 26) | ||
367 | }; | ||
368 | |||
311 | struct ide_drive_s { | 369 | struct ide_drive_s { |
312 | char name[4]; /* drive name, such as "hda" */ | 370 | char name[4]; /* drive name, such as "hda" */ |
313 | char driver_req[10]; /* requests specific driver */ | 371 | char driver_req[10]; /* requests specific driver */ |
@@ -403,6 +461,8 @@ struct ide_drive_s { | |||
403 | 461 | ||
404 | /* callback for packet commands */ | 462 | /* callback for packet commands */ |
405 | void (*pc_callback)(struct ide_drive_s *); | 463 | void (*pc_callback)(struct ide_drive_s *); |
464 | |||
465 | unsigned long atapi_flags; | ||
406 | }; | 466 | }; |
407 | 467 | ||
408 | typedef struct ide_drive_s ide_drive_t; | 468 | typedef struct ide_drive_s ide_drive_t; |