[PATCH][RFC] Allow drivers/scsi/imm.c to compile in 2.5.1pre6

Rich Baum (richbaum@acm.org)
Fri, 7 Dec 2001 21:45:46 -0500


--------------Boundary-00=_AO70AAF110LTNOKUAX4H
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

The attached patch fixes compile errors in imm.c in 2.5.1pre6. At boot it
will detect the drive however if a disk is in the drive I get an oops (see
oops1.log). If there is no disk it will boot just fine.

When I run 'eject /dev/sda' after I insert a disk in the drive I get an oops
(see oops2.log).

Please give me some feedback on what can be done to fix these problems. I
can also do other tests and provide more information if need.

Thanks,
Rich
--------------Boundary-00=_AO70AAF110LTNOKUAX4H
Content-Type: text/x-diff;
charset="iso-8859-1";
name="imm.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="imm.diff"

LS0tIGxpbnV4L2RyaXZlcnMvc2NzaS9pbW0uYwlTdW4gU2VwIDMwIDE0OjI2OjA3IDIwMDEKKysr
IGxpbnV4LXJiL2RyaXZlcnMvc2NzaS9pbW0uYwlTdW4gRGVjICAyIDIwOjQ1OjIwIDIwMDEKQEAg
LTEzNyw3ICsxMzcsNyBAQAogCiAgICAgaWYgKCFwYikgewogCXByaW50aygiaW1tOiBwYXJwb3J0
IHJlcG9ydHMgbm8gZGV2aWNlcy5cbiIpOwotCXNwaW5fbG9ja19pcnEoJmlvX3JlcXVlc3RfbG9j
ayk7CisJc3Bpbl9sb2NrX2lycSgmaHJlZy0+aG9zdF9sb2NrKTsKIAlyZXR1cm4gMDsKICAgICB9
CiAgIHJldHJ5X2VudHJ5OgpAQCAtMTYzLDcgKzE2Myw3IEBACiAJCSAgICAgICJwYXJkZXZpY2Ug
aXMgb3duaW5nIHRoZSBwb3J0IGZvciB0b28gbG9uZ3RpbWUhXG4iLAogCQkJICAgaSk7CiAJCSAg
ICBwYXJwb3J0X3VucmVnaXN0ZXJfZGV2aWNlIChpbW1faG9zdHNbaV0uZGV2KTsKLQkJICAgIHNw
aW5fbG9ja19pc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ywgZmxhZ3MpOwogICAgIHJldHVybjsKIH0KIAo=

--------------Boundary-00=_AO70AAF110LTNOKUAX4H
Content-Type: text/plain;
charset="iso-8859-1";
name="oops1.log"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="oops1.log"

a3N5bW9vcHMgMi40LjMgb24gaTU4NiAyLjUuMS1wcmUxLiAgT3B0aW9ucyB1c2VkCiAgICAgLXYg
L3Vzci9zcmMvbGludXgtcmIvdm1saW51eCAoc3BlY2lmaWVkKQogICAgIC1LIChzcGVjaWZpZWQp
CiAgICAgLUwgKHNwZWNpZmllZCkKICAgICAtbyAvbGliL21vZHVsZXMvMi41LjEtcHJlNi8gKHNw
ZWNpZmllZCkKICAgICAtbSAvdXNyL3NyYy9saW51eC1yYi9TeXN0ZW0ubWFwIChzcGVjaWZpZWQp
CgpObyBtb2R1bGVzIGluIGtzeW1zLCBza2lwcGluZyBvYmplY3RzCkNQVTogMApFSVA6IDAwMTA6
WzxjMDIxMGJjZj5dICBOb3QgdGFpbnRlZApVc2luZyBkZWZhdWx0cyBmcm9tIGtzeW1vb3BzIC10
IGVsZjMyLWkzODYgLWEgaTM4NgpFRkxBR1M6IDAwMDAxMDIwMgplYXg6IDAwMDAwM2ViIGVieDog
MDAwMDAyMDAgZWN4OiAwMDAwMDM3YSBlZHg6IDAwMDAwMDAwCmVzaTogMDAwMDAzNzggZWRpOiAw
MDAwMDAwMSBlYnA6IDAwMDAwMDI1IGVzcDogYzAzMGZlNWMKZHM6IDAwMTggZXM6MDAxOCBzczow
MDE4ClN0YWNrOiAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDM3OCBj
MDIxMGVlZSAwMDAwMDM3OCAwMDAwMDAwMAogICAgICAgMDAwMDAyMDAgYzAzMGRlZGUgMDAwMDAw
MDAgYzdmMTUyMDAgMDAwMDAzNzggYzAyMTBlZWUgMDAwMDAyMDAgYzdmMTUyMDAKICAgICAgIDAw
MDAwMDAwIDAw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ICBhZGQgICAgJDB4NCwlZXNwCkNvZGU7ICBjMDIxMGJkYSA8aW1tX2J5dGVfaW4rNGEvNjA+
CiAgIGQ6ICAgYjggMDEgMDAgMDAgMDAgICAgICAgICAgICBtb3YgICAgJDB4MSwlZWF4CkNvZGU7
ICBjMDIxMGJlMCA8aW1tX2J5dGVfaW4rNTAvNjA+CiAgMTI6ICAgNWIgICAgICAgICAgICAgICAg
ICAgICAgICBwb3AgICAgJWVieApDb2RlOyAgYzAyMTBiZTAgPGltbV9ieXRlX2luKzUwLzYwPgog
IDEzOiAgIDVlICAgICAgICAgICAgICAgICAgICAgICAgcG9wICAgICVlc2kK

--------------Boundary-00=_AO70AAF110LTNOKUAX4H
Content-Type: text/plain;
charset="iso-8859-1";
name="oops2.log"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="oops2.log"

a3N5bW9vcHMgMi40LjMgb24gaTU4NiAyLjUuMS1wcmUxLiAgT3B0aW9ucyB1c2VkCiAgICAgLXYg
L3Vzci9zcmMvbGludXgtcmIvdm1saW51eCAoc3BlY2lmaWVkKQogICAgIC1LIChzcGVjaWZpZWQp
CiAgICAgLUwgKHNwZWNpZmllZCkKICAgICAtbyAvbGliL21vZHVsZXMvMi41LjEtcHJlNi8gKHNw
ZWNpZmllZCkKICAgICAtbSAvdXNyL3NyYy9saW51eC1yYi9TeXN0ZW0ubWFwIChzcGVjaWZpZWQp
CgpObyBtb2R1bGVzIGluIGtzeW1zLCBza2lwcGluZyBvYmplY3RzCkNQVTogMApFSVA6IDAwMTA6
WzxjMDIxMGJjZj5dICBOb3QgdGFpbnRlZApVc2luZyBkZWZhdWx0cyBmcm9tIGtzeW1vb3BzIC10
IGVsZjMyLWkzODYgLWEgaTM4NgpFRkxBR1M6IDAwMDAxMDIwMgplYXg6IDAwMDAwM2ViIGVieDog
MDAwMDAyMDAgZWN4OiAwMDAwMDM3YSBlZHg6IDAwMDAwMDAwCmVzaTogMDAwMDAzNzggZWRpOiAw
MDAwMDAwMSB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wPgogICA3OiAgIDRi
ICAgICAgICAgICAgICAgICAgICAgICAgZGVjICAgICVlYngKQ29kZTsgIGMwMjEwYmQ2IDxpbW1f
Ynl0ZV9pbis0Ni82MD4KICAgODogICA3NSBlNyAgICAgICAgICAgICAgICAgICAgIGpuZSAgICBm
ZmZmZmZmMSA8X0VJUCsweGZmZmZmZmYxPiBjMDIxMGJiZSA8aW1tX2J5dGVfaW4rMmUvNjA+CkNv
ZGU7ICBjMDIxMGJkOCA8aW1tX2J5dGVfaW4rNDgvNjA+CiAgIGE6ICAgODMgYzQgMDQgICAgICAg
ICAgICAgICAgICBhZGQgICAgJDB4NCwlZXNwCkNvZGU7ICBjMDIxMGJkYSA8aW1tX2J5dGVfaW4r
NGEvNjA+CiAgIGQ6ICAgYjggMDEgMDAgMDAgMDAgICAgICAgICAgICBtb3YgICAgJDB4MSwlZWF4
CkNvZGU7ICBjMDIxMGJlMCA8aW1tX2J5dGVfaW4rNTAvNjA+CiAgMTI6ICAgNWIgICAgICAgICAg
ICAgICAgICAgICAgICBwb3AgICAgJWVieApDb2RlOyAgYzAyMTBiZTAgPGltbV9ieXRlX2luKzUw
LzYwPgogIDEzOiAgIDVlICAgICAgICAgICAgICAgICAgICAgICAgcG9wICAgICVlc2kKCg==

--------------Boundary-00=_AO70AAF110LTNOKUAX4H--
-
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/