summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:37 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:37 +0200
commit7bf7420a318978cd6042e5a5da34b7cfa18ae559 (patch)
tree7498ae013e3603dc66628873eaa2647fd001fe98 /include
parent385a4b8787c70b708688bee65139f15b0f79f144 (diff)
downloadop-kernel-dev-7bf7420a318978cd6042e5a5da34b7cfa18ae559.zip
op-kernel-dev-7bf7420a318978cd6042e5a5da34b7cfa18ae559.tar.gz
ide: add ide_init_pc() helper
* Add IDE_PC_BUFFER_SIZE define. * Add ide_init_pc() and convert ide-{floppy,tape}.c to use it instead of ide*_init_pc(). * Remove no longer used IDE*_PC_BUFFER_SIZE and ide*_init_pc(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ide.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 03dc215..bba2f73 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -724,6 +724,12 @@ enum {
PC_FLAG_TIMEDOUT = (1 << 7),
};
+/*
+ * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes.
+ * This is used for several packet commands (not for READ/WRITE commands).
+ */
+#define IDE_PC_BUFFER_SIZE 256
+
struct ide_atapi_pc {
/* actual packet bytes */
u8 c[12];
@@ -753,7 +759,7 @@ struct ide_atapi_pc {
* those are more or less driver-specific and some of them are subject
* to change/removal later.
*/
- u8 pc_buf[256];
+ u8 pc_buf[IDE_PC_BUFFER_SIZE];
/* idetape only */
struct idetape_bh *bh;
@@ -1113,6 +1119,8 @@ void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8);
int ide_check_atapi_device(ide_drive_t *, const char *);
+void ide_init_pc(struct ide_atapi_pc *);
+
ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry,
void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *),
OpenPOWER on IntegriCloud