diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:35 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:35 -0400 |
commit | fe635c7e91036282e4fd0cc5b4eebc712e43270d (patch) | |
tree | 22054d039df52c19e729f30ceee836936a730ce6 /include/linux/libata.h | |
parent | 158693031d7c58a355ec1852052a4fca75fd3bda (diff) |
[PATCH] libata: use preallocated buffers
It's not a very good idea to allocate memory during EH. Use
statically allocated buffer for dev->id[] and add 512byte buffer
ap->sector_buf. This buffer is owned by EH (or probing) and to be
used as temporary buffer for various purposes (IDENTIFY, NCQ log page
10h, PM GSCR block).
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 220b9d7bfc28..0e1a3be39475 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -360,7 +360,7 @@ struct ata_device { | |||
360 | unsigned long flags; /* ATA_DFLAG_xxx */ | 360 | unsigned long flags; /* ATA_DFLAG_xxx */ |
361 | unsigned int class; /* ATA_DEV_xxx */ | 361 | unsigned int class; /* ATA_DEV_xxx */ |
362 | unsigned int devno; /* 0 or 1 */ | 362 | unsigned int devno; /* 0 or 1 */ |
363 | u16 *id; /* IDENTIFY xxx DEVICE data */ | 363 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
364 | u8 pio_mode; | 364 | u8 pio_mode; |
365 | u8 dma_mode; | 365 | u8 dma_mode; |
366 | u8 xfer_mode; | 366 | u8 xfer_mode; |
@@ -425,6 +425,8 @@ struct ata_port { | |||
425 | struct list_head eh_done_q; | 425 | struct list_head eh_done_q; |
426 | 426 | ||
427 | void *private_data; | 427 | void *private_data; |
428 | |||
429 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | ||
428 | }; | 430 | }; |
429 | 431 | ||
430 | struct ata_port_operations { | 432 | struct ata_port_operations { |