From: krw Date: Wed, 28 Jul 2010 23:47:43 +0000 (+0000) Subject: DVD_INVALIDATE_AGID is a 'no payload' operation, so don't set X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ffe9f3d7bc9f68579d8ed093f2caed73a36e6c1a;p=openbsd DVD_INVALIDATE_AGID is a 'no payload' operation, so don't set xs->datalen and reset xs->data to NULL. This prevents a spurious attempt to setup (dma map, etc) and possibly attempt data tranfser. In line with what Linux and FreeBSD do as far as I can tell. Reduces the delay before my DVD starts playing its movie. Idea to also set xs->data to NULL from matthew@. "No objection" matthew@ --- diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 790ae7e360f..2f599259537 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.180 2010/07/25 16:34:41 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.181 2010/07/28 23:47:43 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -1835,7 +1835,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) case DVD_INVALIDATE_AGID: xs->cmd->opcode = GPCMD_REPORT_KEY; xs->cmd->bytes[9] = 0x3f | (a->lsa.agid << 6); - xs->datalen = 16; + xs->data = NULL; error = scsi_xs_sync(xs); scsi_xs_put(xs);