Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261762AbTKGWEw (ORCPT ); Fri, 7 Nov 2003 17:04:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261831AbTKGWEr (ORCPT ); Fri, 7 Nov 2003 17:04:47 -0500 Received: from DaVinci.coe.neu.edu ([129.10.32.95]:54919 "EHLO DaVinci.coe.neu.edu") by vger.kernel.org with ESMTP id S264369AbTKGOil (ORCPT ); Fri, 7 Nov 2003 09:38:41 -0500 Date: Fri, 7 Nov 2003 09:38:36 -0500 (EST) From: Mauricio Martinez To: cc: Corey Minyard Subject: [PATCH] 2.4.22 drivers/cdrom/cdu31a.c Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1068215916=:27679" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4491 Lines: 85 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-851401618-1068215916=:27679 Content-Type: TEXT/PLAIN; charset=US-ASCII This patch fixes a problem (multiple reads of the same data) while reading from a CDU31 SONY CD-ROM drive. The hack was originally suggested by Corey Minyard a few months ago (and working well for months in my old P5/200), but for some reason it didn't appear in the current stable release of the kernel - Patch submitted just for the sake of code cleanliness. -Mauricio Martinez mauricio@coe.neu.edu ---559023410-851401618-1068215916=:27679 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="cdu31a.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="cdu31a.patch" LS0tIGRyaXZlcnMvY2Ryb20vY2R1MzFhLmMub3JpZwlGcmkgSnVuIDEzIDA5 OjUxOjMyIDIwMDMNCisrKyBkcml2ZXJzL2Nkcm9tL2NkdTMxYS5jCVdlZCBP Y3QgMjkgMjM6MDM6MTAgMjAwMw0KQEAgLTEzNDEsNyArMTM0MSw3IEBADQog I2VuZG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YmxvY2ssIG5ibG9jaywNCi0JCQkJCXJlc19yZWcsICZyZXNfc2l6 ZSk7DQorCQkJaWYgKG5ibG9jayA+PSA0KSB7DQorCQkJCXJlYWRfZGF0YV9i bG9jayhidWZmZXIsIGJsb2NrLCA0LA0KKwkJCQkJCXJlc19yZWcsICZyZXNf c2l6ZSk7DQorCQkJCW5ibG9jayAtPSA0Ow0KKwkJCQlibG9jayArPSA0Ow0K KwkJCQlidWZmZXIgKz0gNCAqIDUxMjsNCisJCQl9IGVsc2Ugew0KKwkJCQly ZWFkX2RhdGFfYmxvY2soYnVmZmVyLCBibG9jaywgbmJsb2NrLA0KKwkJCQkJ CXJlc19yZWcsICZyZXNfc2l6ZSk7DQorCQkJCW5ibG9jayA9IDA7DQorCQkJ fQ0KIAkJCWlmIChyZXNfcmVnWzBdID09IDB4MjApIHsNCiAJCQkJaWYgKG51 bV9yZXRyaWVzID4gTUFYX0NEVTMxQV9SRVRSSUVTKSB7DQogCQkJCQllbmRf cmVxdWVzdCgwKTsNCkBAIC0xNzE3LDYgKzE3MjYsMTAgQEANCiAJCQkJCSAg ICAgYmxvY2ssIG5ibG9jayk7DQogCQkJCX0NCiAJCQkJZ290byB0cnlfcmVh ZF9hZ2FpbjsNCisvKgkJCX0gZWxzZSBpZiAobmJsb2NrID4gMCkgew0KKwkJ CQlwcmludGsoIk51bWJlciBvZiBibG9ja3MgbGVmdDogJWRcbiIsIG5ibG9j ayk7DQorCQkJCWVuZF9yZXF1ZXN0KDEpOw0KKyovDQogCQkJfSBlbHNlIHsN CiAJCQkJZW5kX3JlcXVlc3QoMSk7DQogCQkJfQ0K ---559023410-851401618-1068215916=:27679-- - 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/