@@ -6120,6 +6120,10 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
xfer_mask = ata_pack_xfermask(ap->pio_mask, ap->mwdma_mask,
ap->udma_mask);
+ if (ap->ops->is_hotpluggable)
+ ap->scsi_host->hotpluggable =
+ ap->ops->is_hotpluggable(ap);
+
if (!ata_port_is_dummy(ap)) {
ata_port_printk(ap, KERN_INFO,
"%cATA max %s %s\n",
@@ -814,6 +814,7 @@ struct ata_port_operations {
void (*pmp_detach)(struct ata_port *ap);
int (*enable_pm)(struct ata_port *ap, enum link_pm policy);
void (*disable_pm)(struct ata_port *ap);
+ int (*is_hotpluggable)(struct ata_port *ap);
/*
* Start, stop, suspend and resume
Some libata host drivers may be able to provide hotplug information on a port by port basis. Add a port operation to allow this to be done, and ensure that it's called during registration. Signed-off-by: Matthew Garrett <mjg@redhat.com> --- drivers/ata/libata-core.c | 4 ++++ include/linux/libata.h | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)