summaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi/hpi6205.c
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-07-22 15:52:38 +1200
committerTakashi Iwai <tiwai@suse.de>2011-07-22 07:45:26 +0200
commitc6c2c9aba16c41a8f72bec0738880447d158bdf7 (patch)
tree5b89bbe77676b528fd40c939d160689d4ec3f726 /sound/pci/asihpi/hpi6205.c
parent82b5774fe02c61fc70aed6bc885f0d26b708e925 (diff)
downloadblackbird-op-linux-c6c2c9aba16c41a8f72bec0738880447d158bdf7.tar.gz
blackbird-op-linux-c6c2c9aba16c41a8f72bec0738880447d158bdf7.zip
ALSA: asihpi - Increase request and response buffer sizes
Allow for up to 256 bytes of extra data on top of standard hpi request and response sizes. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi/hpi6205.c')
-rw-r--r--sound/pci/asihpi/hpi6205.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index faff9e377798..8831a6f179e3 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -2085,13 +2085,13 @@ static u16 message_response_sequence(struct hpi_adapter_obj *pao,
u16 err = 0;
message_count++;
- if (phm->size > sizeof(interface->u)) {
+ if (phm->size > sizeof(interface->u.message_buffer)) {
phr->error = HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL;
- phr->specific_error = sizeof(interface->u);
+ phr->specific_error = sizeof(interface->u.message_buffer);
phr->size = sizeof(struct hpi_response_header);
HPI_DEBUG_LOG(ERROR,
"message len %d too big for buffer %zd \n", phm->size,
- sizeof(interface->u));
+ sizeof(interface->u.message_buffer));
return 0;
}
@@ -2123,18 +2123,19 @@ static u16 message_response_sequence(struct hpi_adapter_obj *pao,
/* read the result */
if (time_out) {
- if (interface->u.response_buffer.size <= phr->size)
+ if (interface->u.response_buffer.response.size <= phr->size)
memcpy(phr, &interface->u.response_buffer,
- interface->u.response_buffer.size);
+ interface->u.response_buffer.response.size);
else {
HPI_DEBUG_LOG(ERROR,
"response len %d too big for buffer %d\n",
- interface->u.response_buffer.size, phr->size);
+ interface->u.response_buffer.response.size,
+ phr->size);
memcpy(phr, &interface->u.response_buffer,
sizeof(struct hpi_response_header));
phr->error = HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL;
phr->specific_error =
- interface->u.response_buffer.size;
+ interface->u.response_buffer.response.size;
phr->size = sizeof(struct hpi_response_header);
}
}
OpenPOWER on IntegriCloud