Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210015
b: refs/heads/master
c: 60f5d6e
h: refs/heads/master
i:
  210013: da452f3
  210011: fe21f7d
  210007: a5c3c33
  209999: dcefd47
  209983: 074cf67
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 25, 2010
1 parent 449af10 commit 6e08dc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: d26377b83972917cfb8f5bee193981aaa1130627
refs/heads/master: 60f5d6ef6b6e70fe850554381fd8336f11530002
11 changes: 7 additions & 4 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5111,15 +5111,18 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
qc->flags |= ATA_QCFLAG_ACTIVE;
ap->qc_active |= 1 << qc->tag;

/* We guarantee to LLDs that they will have at least one
/*
* We guarantee to LLDs that they will have at least one
* non-zero sg if the command is a data command.
*/
BUG_ON(ata_is_data(prot) && (!qc->sg || !qc->n_elem || !qc->nbytes));
if (WARN_ON_ONCE(ata_is_data(prot) &&
(!qc->sg || !qc->n_elem || !qc->nbytes)))
goto sys_err;

if (ata_is_dma(prot) || (ata_is_pio(prot) &&
(ap->flags & ATA_FLAG_PIO_DMA)))
if (ata_sg_setup(qc))
goto sg_err;
goto sys_err;

/* if device is sleeping, schedule reset and abort the link */
if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) {
Expand All @@ -5136,7 +5139,7 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
goto err;
return;

sg_err:
sys_err:
qc->err_mask |= AC_ERR_SYSTEM;
err:
ata_qc_complete(qc);
Expand Down

0 comments on commit 6e08dc6

Please sign in to comment.