svn commit: r249089 - head/sys/dev/ahci
Alexander Motin
mav at FreeBSD.org
Thu Apr 4 09:15:20 UTC 2013
Author: mav
Date: Thu Apr 4 09:15:19 2013
New Revision: 249089
URL: http://svnweb.freebsd.org/changeset/base/249089
Log:
Check status of ahci_em_reset() on attach and abort if reset failed.
For now it is just a hypothetical case.
Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>
Modified:
head/sys/dev/ahci/ahciem.c
Modified: head/sys/dev/ahci/ahciem.c
==============================================================================
--- head/sys/dev/ahci/ahciem.c Thu Apr 4 08:57:29 2013 (r249088)
+++ head/sys/dev/ahci/ahciem.c Thu Apr 4 09:15:19 2013 (r249089)
@@ -104,7 +104,10 @@ ahci_em_attach(device_t dev)
} else
enc->r_memr = NULL;
mtx_lock(&enc->mtx);
- ahci_em_reset(dev);
+ if (ahci_em_reset(dev) != 0) {
+ error = ENXIO;
+ goto err1;
+ }
rid = ATA_IRQ_RID;
/* Create the device queue for our SIM. */
devq = cam_simq_alloc(1);
More information about the svn-src-head
mailing list