aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-11 18:17:32 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-11 18:17:32 -0500
commit587005de144acd3007b8e7f2a2a7c6add157c155 (patch)
treeedc973e8d9d44a2a2ebc8695f4adda8becd25118
parent1cb9d721d9df9182a42d1ff59427a100c6522efc (diff)
[libata irq-pio] s/assert/WARN_ON/
-rw-r--r--drivers/scsi/libata-core.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 3fd55ef5410f..bfe0a00b1135 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -3226,7 +3226,7 @@ static void ata_pio_sectors(struct ata_queued_cmd *qc)
3226 /* READ/WRITE MULTIPLE */ 3226 /* READ/WRITE MULTIPLE */
3227 unsigned int nsect; 3227 unsigned int nsect;
3228 3228
3229 assert(qc->dev->multi_count); 3229 WARN_ON(qc->dev->multi_count == 0);
3230 3230
3231 nsect = min(qc->nsect - qc->cursect, qc->dev->multi_count); 3231 nsect = min(qc->nsect - qc->cursect, qc->dev->multi_count);
3232 while (nsect--) 3232 while (nsect--)
@@ -3251,7 +3251,7 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc)
3251{ 3251{
3252 /* send SCSI cdb */ 3252 /* send SCSI cdb */
3253 DPRINTK("send cdb\n"); 3253 DPRINTK("send cdb\n");
3254 assert(ap->cdb_len >= 12); 3254 WARN_ON(ap->cdb_len < 12);
3255 3255
3256 ata_data_xfer(ap, qc->cdb, ap->cdb_len, 1); 3256 ata_data_xfer(ap, qc->cdb, ap->cdb_len, 1);
3257 ata_altstatus(ap); /* flush */ 3257 ata_altstatus(ap); /* flush */
@@ -3298,8 +3298,8 @@ static int ata_pio_first_block(struct ata_port *ap)
3298 int has_next; 3298 int has_next;
3299 3299
3300 qc = ata_qc_from_tag(ap, ap->active_tag); 3300 qc = ata_qc_from_tag(ap, ap->active_tag);
3301 assert(qc != NULL); 3301 WARN_ON(qc == NULL);
3302 assert(qc->flags & ATA_QCFLAG_ACTIVE); 3302 WARN_ON((qc->flags & ATA_QCFLAG_ACTIVE) == 0);
3303 3303
3304 /* if polling, we will stay in the work queue after sending the data. 3304 /* if polling, we will stay in the work queue after sending the data.
3305 * otherwise, interrupt handler takes over after sending the data. 3305 * otherwise, interrupt handler takes over after sending the data.
@@ -3945,7 +3945,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
3945 break; 3945 break;
3946 3946
3947 case ATA_PROT_DMA: 3947 case ATA_PROT_DMA:
3948 assert(!(qc->tf.flags & ATA_TFLAG_POLLING)); 3948 WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING);
3949 3949
3950 ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ 3950 ap->ops->tf_load(ap, &qc->tf); /* load tf registers */
3951 ap->ops->bmdma_setup(qc); /* set up bmdma */ 3951 ap->ops->bmdma_setup(qc); /* set up bmdma */
@@ -3997,7 +3997,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
3997 break; 3997 break;
3998 3998
3999 case ATA_PROT_ATAPI_DMA: 3999 case ATA_PROT_ATAPI_DMA:
4000 assert(!(qc->tf.flags & ATA_TFLAG_POLLING)); 4000 WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING);
4001 4001
4002 ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ 4002 ap->ops->tf_load(ap, &qc->tf); /* load tf registers */
4003 ap->ops->bmdma_setup(qc); /* set up bmdma */ 4003 ap->ops->bmdma_setup(qc); /* set up bmdma */
@@ -4415,7 +4415,7 @@ fsm_start:
4415 /* make sure qc->err_mask is available to 4415 /* make sure qc->err_mask is available to
4416 * know what's wrong and recover 4416 * know what's wrong and recover
4417 */ 4417 */
4418 assert(qc->err_mask); 4418 WARN_ON(qc->err_mask == 0);
4419 4419
4420 ap->hsm_task_state = HSM_ST_IDLE; 4420 ap->hsm_task_state = HSM_ST_IDLE;
4421 ata_qc_complete(qc); 4421 ata_qc_complete(qc);