--- old/drivers/scsi/sata_qstor.c 2006-11-14 11:30:37.000000000 -0500 +++ linux/drivers/scsi/sata_qstor.c 2006-11-14 13:22:05.000000000 -0500 @@ -299,6 +299,19 @@ return nelem; } +static void qs_set_nien (struct ata_port *ap, int new_nien) +{ + struct ata_ioports *ioaddr = &ap->ioaddr; + + if ((ap->ctl & ATA_NIEN) != new_nien) { + ap->ctl = (ap->ctl & ~ATA_NIEN) | new_nien; + ap->last_ctl = ap->ctl; + writeb(ap->ctl, (void __iomem *)ioaddr->ctl_addr); + wmb(); + ata_check_status(ap); + } +} + static void qs_qc_prep(struct ata_queued_cmd *qc) { struct qs_port_priv *pp = qc->ap->private_data; @@ -357,6 +370,8 @@ switch (qc->tf.protocol) { case ATA_PROT_DMA: + /* packet mode requires that the NIEN bit be turned on */ + qs_set_nien(qc->ap, ATA_NIEN); pp->state = qs_state_pkt; qs_packet_start(qc); @@ -370,6 +385,7 @@ break; } + qs_set_nien(qc->ap, 0); // FIXME: is this necessary here? pp->state = qs_state_mmio; return ata_qc_issue_prot(qc); }