summaryrefslogtreecommitdiff
path: root/sys/dev/ata/ata-disk.c
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>2003-05-02 12:41:44 +0000
committerSøren Schmidt <sos@FreeBSD.org>2003-05-02 12:41:44 +0000
commit31de970e72f18d82e5d242693ac3c6fdbc892ff6 (patch)
tree4b09eae0061923301227391b42c8daa8744fcfac /sys/dev/ata/ata-disk.c
parentbdf54b2fc4001ef121669c252baa92bfd536e79d (diff)
Add ioctl to add a spare disk to a RAID array.
Fix the discovery of RAID's to not grap unused disks. Change the probe printing of a RAID a bit.
Notes
svn path=/head/; revision=114529
Diffstat (limited to 'sys/dev/ata/ata-disk.c')
-rw-r--r--sys/dev/ata/ata-disk.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 1d622af033f8..cb4e16364b40 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -202,11 +202,9 @@ ad_attach(struct ata_device *atadev)
atadev->flags = 0;
ata_enclosure_print(atadev);
-
- /* only print probe banner if we are not part of a RAID array */
- if (!ata_raiddisk_attach(adp))
- if (atadev->driver)
- ad_print(adp);
+ if (atadev->driver)
+ ad_print(adp);
+ ata_raiddisk_attach(adp);
}
void
@@ -248,9 +246,9 @@ adopen(struct disk *dp)
struct ad_softc *adp = dp->d_drv1;
if (adp->flags & AD_F_RAID_SUBDISK)
- return EBUSY;
+ return EPERM;
- /* hold off access to we are fully attached */
+ /* hold off access until we are fully attached */
while (ata_delayed_attach)
tsleep(&ata_delayed_attach, PRIBIO, "adopn", 1);
return 0;