Date: Thu, 4 Apr 2013 09:15:20 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249089 - head/sys/dev/ahci Message-ID: <201304040915.r349FKkY091828@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304040915.r349FKkY091828>