Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 23 Mar 2002 17:54:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 23 Mar 2002 17:54:27 -0500 Received: from astound-64-85-224-253.ca.astound.net ([64.85.224.253]:22532 "EHLO master.linux-ide.org") by vger.kernel.org with ESMTP id ; Sat, 23 Mar 2002 17:54:08 -0500 Date: Sat, 23 Mar 2002 14:53:58 -0800 (PST) From: Andre Hedrick To: linux-kernel@vger.kernel.org cc: Martin Dalecki Subject: [PATCH] linux-2.5.7.fix2.patch Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1430322656-215002990-1016924038=:1053" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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. --1430322656-215002990-1016924038=:1053 Content-Type: text/plain; charset=us-ascii Martin et al. This is the next step in stablizing the transport layer. I have not booted but it will compile, and it is nearly identical to what I generated for 2.4 to be released soon. The comments are harsh on the interface but it functionally correct. If you get an device error in PIO, bad things can happen to the data. This is no different in the stock 2.4.0->2.4.18->19x. Of of all the transport data handlers. CLEAN and SAFE: DMA read/write is safe and has always been. Single sector PIO WRITING is clean and safe. DIRTY but operational (error events in the hardware will cause data problems) Single sector PIO READING can corrupt a single sector if there is a device error. Multi-Read/Write will corrupt and misreport data only on an error. What is still lacking in block is the much needed in proccess bio walker. Once I can finish coding this fix into BLOCK, then I can complete the transport layer and slap it on a bus analyzer and force articial errors on the buss to see if the driver behaves correctly. If this passes, we are good to run like the wind. Regards, Andre Hedrick LAD Storage Consulting Group --1430322656-215002990-1016924038=:1053 Content-Type: text/plain; charset=us-ascii; name="linux-2.5.7.fix2.patch" Content-Transfer-Encoding: base64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.5.7.fix2.patch" ZGlmZiAtdXJOIGxpbnV4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fV1JJVEUsIElERV9DT01NQU5EX1JFRyk7DQogLyoNCiAg KiBTdHJhdGVneSBvbiB3cml0ZSBpczoNCiAgKglsb29rIGZvciB0aGUgRFJR IHRoYXQgc2hvdWxkIGhhdmUgYmVlbiBpbW1lZGlhdGVseSBhc3NlcnRlZA0K ZGlmZiAtdXJOIGxpbnV4LTIuNS43L2RyaXZlcnMvaWRlL3RybTI5MC5jIGxp bnV4LTIuNS43LmZpeC9kcml2ZXJzL2lkZS90cm0yOTAuYw0KLS0tIGxpbnV4 LTIuNS43L2RyaXZlcnMvaWRlL3RybTI5MC5jCVRodSBNYXIgIDcgMTg6MTg6 MTYgMjAwMg0KKysrIGxpbnV4LTIuNS43LmZpeC9kcml2ZXJzL2lkZS90cm0y OTAuYwlTYXQgTWFyIDIzIDAxOjI5OjI5IDIwMDINCkBAIC0xOTQsNiArMTk0 LDggQEANCiAJCQlvdXR3KChjb3VudCAqIDIpIC0gMSwgaHdpZi0+ZG1hX2Jh c2UrMik7IC8qIHN0YXJ0IERNQSAqLw0KIAkJCWlmIChkcml2ZS0+dHlwZSAh PSBBVEFfRElTSykNCiAJCQkJcmV0dXJuIDA7DQorCQkJaWYgKEhXR1JPVVAo ZHJpdmUpLT5oYW5kbGVyICE9IE5VTEwpCS8qIHBhcmFub2lhIGNoZWNrICov DQorCQkJCUJVRygpOw0KIAkJCWlkZV9zZXRfaGFuZGxlcihkcml2ZSwgJmlk ZV9kbWFfaW50ciwgV0FJVF9DTUQsIE5VTEwpOw0KIAkJCU9VVF9CWVRFKHJl YWRpbmcgPyBXSU5fUkVBRERNQSA6IFdJTl9XUklURURNQSwgSURFX0NPTU1B TkRfUkVHKTsNCiAJCQlyZXR1cm4gMDsNCg== --1430322656-215002990-1016924038=:1053-- - 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/