Re: [RFC/CFT] cmd640 irqlocking fixes

Andre Hedrick (andre@linux-ide.org)
Thu, 25 Jul 2002 03:51:07 -0700 (PDT)


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-520486149-1027594267=:4719
Content-Type: text/plain; charset=us-ascii

On 25 Jul 2002, Alan Cox wrote:

> On Thu, 2002-07-25 at 09:56, Marcin Dalecki wrote:
> > OK. Right. We have to touch this code anyway. Do you know first hand how
> > to detect programmatically which configuration method is in charge? If
> > not I can look it up on my own..
>
> Just copy the code from 2.4.19-rc3-ac3. Andre didnt write it so you
> don't have to pretend it doesn't exist. I'll do this and test it since I
> did the original fixes in 2.4. Expect a patch later today

I am sorry Alan, but I fixed all of the locking code in 2.4 a long time
ago, and you adopted it somewhere around this patch.

Please check your patch revisions, and I can retrive out of archives
the date and time when I finally fixed it for all of x86 and then when I
started reworking all the arch specifics. Noting that I had broken the
ia64 locking and DM of HP replied to me offering help to solve the need
for the local_irq_set() calls which are need currently.

I have now fix all the asm-*/system.h asm-*/hw_irq.h etc with proper
assembley calls.

Again I have to call this patch and fix and take credit and full ownership
of removing all the save/cli/sti/restore which littered the driver and
were spread like cow patties through a chopper gun.

Cheers,

Andre Hedrick
LAD Storage Consulting Group

--1430322656-520486149-1027594267=:4719
Content-Type: text/plain; charset=us-ascii; name="ide-2.4.19-p8-ac1.all.convert.10.patch"
Content-Transfer-Encoding: base64
Content-ID: <Pine.LNX.4.10.10207250351070.4719@master.linux-ide.org>
Content-Description:
Content-Disposition: attachment; filename="ide-2.4.19-p8-ac1.all.convert.10.patch"

ZGlmZiAtdXJOIGxpbnV4LTIuNC4xOS1wOC1hYzEtcHJpc3RpbmUvZHJpdmVy
cy9pZGUvY21kNjQwLmMgbGludXgtMi40LjE5LXA4LWFjMS9kcml2ZXJzL2lk
ZS9jbWQ2NDAuYw0KLS0tIGxpbnV4LTIuNC4xOS1wOC1hYzEtcHJpc3R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W5kbHkgYXR0ZW1wdGluZw0KLQkJICogYSBjb25maWd1cmF0aW9uIGN5Y2xl
IHR5cGUgdGhhdCBpcyBub3Qgc3VwcG9ydGVkIGJ5IHRoZSBoYXJkd2FyZS4N
Ci0JCSAqLw0KKwkJLyogRmluZCBvdXQgd2hhdCBraW5kIG9mIFBDSSBwcm9i
aW5nIGlzIHN1cHBvcnRlZCBvdGhlcndpc2UNCisJCSAgIEp1c3RpbiBHaWJi
cyB3aWxsIHN1bGsuLiAqLw0KIAkJaWYgKHBjaV9jb25mMSgpICYmIHByb2Jl
X2Zvcl9jbWQ2NDBfcGNpMSgpKQ0KIAkJCWJ1c190eXBlID0gIlBDSSAodHlw
ZTEpIjsNCiAJCWVsc2UgaWYgKHBjaV9jb25mMigpICYmIHByb2JlX2Zvcl9j
bWQ2NDBfcGNpMigpKQ0K
--1430322656-520486149-1027594267=:4719--
-
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/