Skip to contentSkip to conversation

Return hw error directly from oustream_write.

PATCH Applied [email protected] 2 participants 2 messages Aug 28, 2010 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Return hw error directly from oustream_write.

From: Eliot Blennerhassett <[email protected]>

If hw error is ignored, status is updated with invalid info.

---
 sound/pci/asihpi/hpi6205.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
sound/pci/asihpi/hpi6205.c +5 -2
index 3b44134..22c5fc6 100644
@@ -941,8 +941,7 @@ static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
 
 }
 
-static u32 outstream_get_space_available(struct hpi_hostbuffer_status
-	*status)
+static u32 outstream_get_space_available(struct hpi_hostbuffer_status *status)
 {
 	return status->size_in_bytes - (status->host_index -
 		status->dSP_index);
@@ -987,6 +986,10 @@ static void outstream_write(struct hpi_adapter_obj *pao,
 		/* write it */
 		phm->function = HPI_OSTREAM_WRITE;
 		hw_message(pao, phm, phr);
+
+		if (phr->error)
+			return;
+
 		/* update status information that the DSP would typically
 		 * update (and will update next time the DSP
 		 * buffer update task reads data from the host BBM buffer)
Signature · 1 line
1.7.0.4
Applied
#1 lore raw

At Sat, 28 Aug 2010 19:52:24 +1200,

Quoted 6 lines · [email protected] wrote:

From: Eliot Blennerhassett <[email protected]>

If hw error is ignored, status is updated with invalid info.

Thanks, applied now.

Takashi

Quoted 32 lines
---
 sound/pci/asihpi/hpi6205.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
sound/pci/asihpi/hpi6205.c +5 -2
index 3b44134..22c5fc6 100644
@@ -941,8 +941,7 @@ static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
 
 }
 
-static u32 outstream_get_space_available(struct hpi_hostbuffer_status
-	*status)
+static u32 outstream_get_space_available(struct hpi_hostbuffer_status *status)
 {
 	return status->size_in_bytes - (status->host_index -
 		status->dSP_index);
@@ -987,6 +986,10 @@ static void outstream_write(struct hpi_adapter_obj *pao,
 		/* write it */
 		phm->function = HPI_OSTREAM_WRITE;
 		hw_message(pao, phm, phr);
+
+		if (phr->error)
+			return;
+
 		/* update status information that the DSP would typically
 		 * update (and will update next time the DSP
 		 * buffer update task reads data from the host BBM buffer)
Signature · 1 line
1.7.0.4