Merge branch 'upstream'
[sfrench/cifs-2.6.git] / drivers / scsi / sata_qstor.c
index bfc1dc8e7779cbe05fd208922c195fee96ae7fed..bf7bb9ec18d052860b6cda80f00071ab7f1a612e 100644 (file)
@@ -277,7 +277,7 @@ static unsigned int qs_fill_sg(struct ata_queued_cmd *qc)
        u8 *prd = pp->pkt + QS_CPB_BYTES;
 
        WARN_ON(qc->__sg == NULL);
        u8 *prd = pp->pkt + QS_CPB_BYTES;
 
        WARN_ON(qc->__sg == NULL);
-       WARN_ON(qc->n_elem == 0);
+       WARN_ON(qc->n_elem == 0 && qc->pad_len == 0);
 
        nelem = 0;
        ata_for_each_sg(sg, qc) {
 
        nelem = 0;
        ata_for_each_sg(sg, qc) {