Albert Lee wrote: > -static void ata_pio_sector(struct ata_queued_cmd *qc, int last) > +static void ata_pio_sector(struct ata_queued_cmd *qc, int last, int lock) I think the naming of @lock is a bit confusing here. @clr_hsm_wq or @last_sector, maybe? > + if (lock) { > + tail = 8; > + head = ATA_SECT_SIZE - tail; /* multiple of 8 bytes */ > + ap->ops->data_xfer(qc->dev, buf + offset, head, do_write); > + spin_lock_irqsave(ap->lock, irq_flags); > + } > + > + ap->ops->data_xfer(qc->dev, buf + offset + head, tail, do_write); Aieee, we have to transfer the whole last sector while holding the spin lock and IRQ disabled. That's sad but pushing locking into ->data_xfer doesn't sound attractive either. Any better ideas? > @@ -5119,6 +5187,10 @@ inline unsigned int ata_host_intr (struc > VPRINTK("ata%u: protocol %d task_state %d\n", > ap->print_id, qc->tf.protocol, ap->hsm_task_state); > > + /* HSM accessing the port from the workqueue */ > + if (ap->pflags & ATA_PFLAG_HSM_WQ) > + goto idle_irq; > + Please update LLDs with private IRQ handlers too. Maybe we need ata_idle_irq(ap) test? Thanks. -- tejun - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html