Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95673
b: refs/heads/master
c: 8eeb12e
h: refs/heads/master
i:
  95671: 7327524
v: v3
  • Loading branch information
Vitja Makarov authored and Linus Torvalds committed May 1, 2008
1 parent bdfec10 commit d0a08bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef3fb66ced1a890769d71a4f4ae9f68b8afa98b6
refs/heads/master: 8eeb12e5a2486ab958fa27ec97e71dabf234b73b
7 changes: 5 additions & 2 deletions trunk/drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ static void pump_transfers(unsigned long data)
u8 width;
u16 cr, dma_width, dma_config;
u32 tranf_success = 1;
u8 full_duplex = 0;

/* Get current state information */
message = drv_data->cur_msg;
Expand Down Expand Up @@ -658,6 +659,7 @@ static void pump_transfers(unsigned long data)
}

if (transfer->rx_buf != NULL) {
full_duplex = transfer->tx_buf != NULL;
drv_data->rx = transfer->rx_buf;
drv_data->rx_end = drv_data->rx + transfer->len;
dev_dbg(&drv_data->pdev->dev, "rx_buf is %p, rx_end is %p\n",
Expand Down Expand Up @@ -740,7 +742,8 @@ static void pump_transfers(unsigned long data)
* successful use different way to r/w according to
* drv_data->cur_chip->enable_dma
*/
if (drv_data->cur_chip->enable_dma && drv_data->len > 6) {
if (!full_duplex && drv_data->cur_chip->enable_dma
&& drv_data->len > 6) {

disable_dma(drv_data->dma_channel);
clear_dma_irqstat(drv_data->dma_channel);
Expand Down Expand Up @@ -828,7 +831,7 @@ static void pump_transfers(unsigned long data)
/* IO mode write then read */
dev_dbg(&drv_data->pdev->dev, "doing IO transfer\n");

if (drv_data->tx != NULL && drv_data->rx != NULL) {
if (full_duplex) {
/* full duplex mode */
BUG_ON((drv_data->tx_end - drv_data->tx) !=
(drv_data->rx_end - drv_data->rx));
Expand Down

0 comments on commit d0a08bd

Please sign in to comment.