aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-08-29 22:47:14 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-08-29 22:47:14 +0000
commitbc32f05443db36ef071214bab172c71303beeda4 (patch)
treeda19cce1aadd750a851611f3dd51c67020bf8b03 /sys
parentcc85aca9cd271cfddde9fb28b8e7c2df0177b41e (diff)
downloadsrc-bc32f05443db36ef071214bab172c71303beeda4.tar.gz
src-bc32f05443db36ef071214bab172c71303beeda4.zip
Use device_verbose() to undo device_quiet() when detaching from t[45]iovX.
The device quiet flag is not automatically reset on detach, so it is inherited by other device drivers (e.g. when switching a device driver over to ppt for PCI pass through). Cope with this behavior by explicitly marking the device verbose during detach so that the next driver can make its own decision. Sponsored by: Chelsio Communications
Notes
Notes: svn path=/head/; revision=305032
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cxgbe/t4_iov.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c
index d0c31e82b330..0b3567bdeb7a 100644
--- a/sys/dev/cxgbe/t4_iov.c
+++ b/sys/dev/cxgbe/t4_iov.c
@@ -209,10 +209,15 @@ static int
t4iov_detach(device_t dev)
{
struct t4iov_softc *sc;
+ int error;
sc = device_get_softc(dev);
- if (sc->sc_attached)
- return (t4iov_detach_child(dev));
+ if (sc->sc_attached) {
+ error = t4iov_detach_child(dev);
+ if (error)
+ return (error);
+ }
+ device_verbose(dev);
return (0);
}