Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76900
b: refs/heads/master
c: 0106372
h: refs/heads/master
v: v3
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Jan 23, 2008
1 parent e8e1b4a commit d20010d
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: 93f8fecbe72bc3c121f3605dd198ff39ef358522
refs/heads/master: 0106372db6dc135f300035ce8e93cddd7283a26a
7 changes: 5 additions & 2 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5309,12 +5309,15 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
bytes = (bc_hi << 8) | bc_lo;

/* shall be cleared to zero, indicating xfer of data */
if (ireason & (1 << 0))
if (unlikely(ireason & (1 << 0)))
goto err_out;

/* make sure transfer direction matches expected */
i_write = ((ireason & (1 << 1)) == 0) ? 1 : 0;
if (do_write != i_write)
if (unlikely(do_write != i_write))
goto err_out;

if (unlikely(!bytes))
goto err_out;

VPRINTK("ata%u: xfering %d bytes\n", ap->print_id, bytes);
Expand Down

0 comments on commit d20010d

Please sign in to comment.