mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix linking problem when atadisk is not use in ata-all.c
Add dummy intr_func and lock_func to ata-card.c Dont call ad_print if the driver decided there is no disk.
This commit is contained in:
parent
17d47eb38a
commit
9dec0f3de0
3 changed files with 19 additions and 3 deletions
|
|
@ -611,7 +611,9 @@ ata_boot_attach(void)
|
|||
free(ata_delayed_attach, M_TEMP);
|
||||
ata_delayed_attach = NULL;
|
||||
}
|
||||
#ifdef DEV_ATADISK
|
||||
ata_raid_attach();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -58,10 +58,20 @@ ata_pccard_match(device_t dev)
|
|||
return (0);
|
||||
|
||||
/* other devices might need to be matched here */
|
||||
|
||||
return(ENXIO);
|
||||
}
|
||||
|
||||
static int
|
||||
ata_pccard_intrnoop(struct ata_channel *ch)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
ata_pccard_locknoop(struct ata_channel *ch, int type)
|
||||
{
|
||||
}
|
||||
|
||||
static int
|
||||
ata_pccard_probe(device_t dev)
|
||||
{
|
||||
|
|
@ -106,6 +116,8 @@ ata_pccard_probe(device_t dev)
|
|||
|
||||
ch->unit = 0;
|
||||
ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE);
|
||||
ch->intr_func = ata_pccard_intrnoop;
|
||||
ch->lock_func = ata_pccard_locknoop;
|
||||
return ata_probe(dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,8 +219,10 @@ ad_attach(struct ata_device *atadev)
|
|||
/* if this disk belongs to an ATA RAID dont print the probe */
|
||||
if (ata_raiddisk_attach(adp))
|
||||
adp->flags |= AD_F_RAID_SUBDISK;
|
||||
else
|
||||
ad_print(adp);
|
||||
else {
|
||||
if (atadev->driver)
|
||||
ad_print(adp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue