Date: Sun, 13 Sep 2009 17:29:06 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 168509 for review Message-ID: <200909131729.n8DHT689055479@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909131729.n8DHT689055479>