On Monday 13 June 2005 14:59, you wrote: > > The task is to update sata_nv to notify libata-core that a device has > disappeared. libata-core then notifies the SCSI layer of this. No new > ioctls need to be supported. > > Jeff Hi Jeff, Thank you for your answers. Reading a little of http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/libata.pdf and drivers/scsi/sata_nv.c , it seems to me that I have to add a call to ata_port_disable() into sata_nv.c:nv_check_hotplug(). In sata_nv.c , nv_check_hotplug() is called from nv_interrupt() , which seems to be the interrupt handler. I add the call to ata_port_disable(ap) , taking ap from the ata_host_set structure, but that structure seems to be able to have many ap ports (its an array). Question: is it ok to set ap as host_set->ports[0] or should I have to see what ata_port is the one that has been unplugged? The only change so far looks like this. It does compile cleanly, but I will have the hardware to test it tomorrow. static void nv_check_hotplug(struct ata_host_set *host_set) { u8 intr_status; struct ata_port *ap; // Get the ATA Port to be disabled if hot-removed ap = host_set->ports[0]; intr_status = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); // Clear interrupt status. outb(0xff, host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); if (intr_status & NV_INT_STATUS_HOTPLUG) { if (intr_status & NV_INT_STATUS_PDEV_ADDED) printk(KERN_WARNING "nv_sata: " "Primary device added\n"); if (intr_status & NV_INT_STATUS_PDEV_REMOVED) { printk(KERN_WARNING "nv_sata: " "Primary device removed\n"); ata_port_disable(ap); } if (intr_status & NV_INT_STATUS_SDEV_ADDED) printk(KERN_WARNING "nv_sata: " "Secondary device added\n"); if (intr_status & NV_INT_STATUS_SDEV_REMOVED) { printk(KERN_WARNING "nv_sata: " "Secondary device removed\n"); ata_port_disable(ap); } } } Thanks in advance, -- Diego. - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html