if (ap && !(ap->flags & (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) { 
if (ap && !(ap->flags & ATA_FLAG_PORT_DISABLED)) { 
static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set){	unsigned int handled = 0;	u8 sFFE;	u8 __iomem *mmio_base = host_set->mmio_base;	do {		u32 sff0 = readl(mmio_base + QS_HST_SFF);		u32 sff1 = readl(mmio_base + QS_HST_SFF + 4);		u8 sEVLD = (sff1 >> 30) & 0x01;	/* valid flag */		sFFE  = sff1 >> 31;		/* empty flag */		if (sEVLD) {			u8 sDST = sff0 >> 16;	/* dev status */			u8 sHST = sff1 & 0x3f;	/* host status */			unsigned int port_no = (sff1 >> 8) & 0x03;			struct ata_port *ap = host_set->ports[port_no];			DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n",					sff1, sff0, port_no, sHST, sDST);			handled = 1;			if (ap && !(ap->flags &				    (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {				struct ata_queued_cmd *qc;				struct qs_port_priv *pp = ap->private_data;				if (!pp || pp->state != qs_state_pkt)					continue;				qc = ata_qc_from_tag(ap, ap->active_tag);				if (qc && (!(qc->tf.ctl & ATA_NIEN))) {					switch (sHST) {					case 0: /* sucessful CPB */					case 3: /* device error */						pp->state = qs_state_idle;						qs_enter_reg_mode(qc->ap);						ata_qc_complete(qc, sDST);						break;					default:						break;					}				}			}		}	} while (!sFFE);	return handled;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e50362eccd8809a224cda5f71714a088ba37b2ab/sata_qstor.c/buggy/drivers/scsi/sata_qstor.c