Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757634AbZDWHgJ (ORCPT ); Thu, 23 Apr 2009 03:36:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755935AbZDWH2v (ORCPT ); Thu, 23 Apr 2009 03:28:51 -0400 Received: from sous-sol.org ([216.99.217.87]:48392 "EHLO x200.localdomain" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755198AbZDWH2u (ORCPT ); Thu, 23 Apr 2009 03:28:50 -0400 Message-Id: <20090423072354.829910686@sous-sol.org> User-Agent: quilt/0.47-1 Date: Thu, 23 Apr 2009 00:20:48 -0700 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Bartlomiej Zolnierkiewicz , Borislav Petkov , Michael Roth Subject: [patch 028/100] ide-atapi: start DMA after issuing a packet command References: <20090423072020.428683652@sous-sol.org> Content-Disposition: inline; filename=ide-atapi-start-dma-after-issuing-a-packet-command.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1671 Lines: 51 -stable review patch. If anyone has any objections, please let us know. --------------------- From: Borislav Petkov upstream commit: 2eba08270990b99fb5429b76ee97184ddd272f7f Apparently¹, some ATAPI devices want to see the packet command first before enabling DMA otherwise they simply hang indefinitely. Reorder the two steps and start DMA only after having issued the command first. [1] http://marc.info/?l=linux-kernel&m=123835520317235&w=2 Signed-off-by: Borislav Petkov Reported-by: Michael Roth Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Chris Wright --- drivers/ide/ide-atapi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c @@ -568,6 +568,10 @@ static ide_startstop_t ide_transfer_pc(i : ide_pc_intr), timeout, expiry); + /* Send the actual packet */ + if ((drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) == 0) + hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len); + /* Begin DMA, if necessary */ if (dev_is_idecd(drive)) { if (drive->dma) @@ -579,10 +583,6 @@ static ide_startstop_t ide_transfer_pc(i } } - /* Send the actual packet */ - if ((drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) == 0) - hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len); - return ide_started; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/