From owner-p4-projects@FreeBSD.ORG Sun Sep 13 17:29:06 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 84FC7106568D; Sun, 13 Sep 2009 17:29:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 491DF106568B for ; Sun, 13 Sep 2009 17:29:06 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 37BA68FC14 for ; Sun, 13 Sep 2009 17:29:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n8DHT6rl055481 for ; Sun, 13 Sep 2009 17:29:06 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n8DHT689055479 for perforce@freebsd.org; Sun, 13 Sep 2009 17:29:06 GMT (envelope-from mav@freebsd.org) Date: Sun, 13 Sep 2009 17:29:06 GMT Message-Id: <200909131729.n8DHT689055479@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Cc: Subject: PERFORCE change 168509 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2009 17:29:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=168509 Change 168509 by mav@mav_mavtest on 2009/09/13 17:28:22 Fill request->parent before calling ata_modify_if_48bit(). Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#19 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#19 (text+ko) ==== @@ -59,19 +59,18 @@ /* Prepare paramers required by low-level code. */ request->unit = atadev->unit; + if (!(request->parent = device_get_parent(request->dev))) { + request->result = ENXIO; + if (request->callback) + (request->callback)(request); + return; + } if ((atadev->param.config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_16) request->flags |= ATA_R_ATAPI16; if ((atadev->param.config & ATA_DRQ_MASK) == ATA_DRQ_INTR) request->flags |= ATA_R_ATAPI_INTR; if ((request->flags & ATA_R_ATAPI) == 0) ata_modify_if_48bit(request); - /* check that the device is still valid */ - if (!(request->parent = device_get_parent(request->dev))) { - request->result = ENXIO; - if (request->callback) - (request->callback)(request); - return; - } ch = device_get_softc(request->parent); callout_init_mtx(&request->callout, &ch->state_mtx, CALLOUT_RETURNUNLOCKED); if (!request->callback && !(request->flags & ATA_R_REQUEUE))