Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150396
b: refs/heads/master
c: 465b635
h: refs/heads/master
v: v3
  • Loading branch information
Max Filippov authored and John W. Linville committed May 20, 2009
1 parent fc34d6b commit c8b310a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 69712e926bad9c163d5ba5597f08084ee7902480
refs/heads/master: 465b63537f93e82a2606332830801acb64467ec9
14 changes: 7 additions & 7 deletions trunk/drivers/net/wireless/p54/p54spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static inline void p54spi_int_ack(struct p54s_priv *priv, u32 val)
p54spi_write32(priv, SPI_ADRS_HOST_INT_ACK, cpu_to_le32(val));
}

static void p54spi_wakeup(struct p54s_priv *priv)
static int p54spi_wakeup(struct p54s_priv *priv)
{
/* wake the chip */
p54spi_write32(priv, SPI_ADRS_ARM_INTERRUPTS,
Expand All @@ -335,13 +335,11 @@ static void p54spi_wakeup(struct p54s_priv *priv)
if (!p54spi_wait_bit(priv, SPI_ADRS_HOST_INTERRUPTS,
cpu_to_le32(SPI_HOST_INT_READY))) {
dev_err(&priv->spi->dev, "INT_READY timeout\n");
goto out;
return -EBUSY;
}

p54spi_int_ack(priv, SPI_HOST_INT_READY);

out:
return;
return 0;
}

static inline void p54spi_sleep(struct p54s_priv *priv)
Expand Down Expand Up @@ -374,7 +372,8 @@ static int p54spi_rx(struct p54s_priv *priv)
struct sk_buff *skb;
u16 len;

p54spi_wakeup(priv);
if (p54spi_wakeup(priv) < 0)
return -EBUSY;

/* dummy read to flush SPI DMA controller bug */
p54spi_read16(priv, SPI_ADRS_GEN_PURP_1);
Expand Down Expand Up @@ -425,7 +424,8 @@ static int p54spi_tx_frame(struct p54s_priv *priv, struct sk_buff *skb)
struct p54_hdr *hdr = (struct p54_hdr *) skb->data;
int ret = 0;

p54spi_wakeup(priv);
if (p54spi_wakeup(priv) < 0)
return -EBUSY;

ret = p54spi_spi_write_dma(priv, hdr->req_id, skb->data, skb->len);
if (ret < 0)
Expand Down

0 comments on commit c8b310a

Please sign in to comment.