Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751313AbWJVRP3 (ORCPT ); Sun, 22 Oct 2006 13:15:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751316AbWJVRP3 (ORCPT ); Sun, 22 Oct 2006 13:15:29 -0400 Received: from mout0.freenet.de ([194.97.50.131]:56269 "EHLO mout0.freenet.de") by vger.kernel.org with ESMTP id S1751313AbWJVRP2 (ORCPT ); Sun, 22 Oct 2006 13:15:28 -0400 Date: Sun, 22 Oct 2006 19:17:28 +0200 To: linux-kernel@vger.kernel.org Subject: [PATCH] 2.6.19-rc2-mm2 pktcdvd: add sysfs and debugfs interface Reply-To: balagi@justmail.de From: "Thomas Maier" Cc: petero2@telia.com, akpm@osdl.org Content-Type: multipart/mixed; boundary=----------hwWKFn2jd84xAw9EVebSv7 MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.02 (Win32) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 28679 Lines: 457 ------------hwWKFn2jd84xAw9EVebSv7 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Hello, this patch adds a sysfs and debugfs interface to the pktcdvd driver. The procfs interface is not modified! Look into the 2 ABI/testing/* files in the patch for more infos. Signed-off-by: Thomas Maier ------------hwWKFn2jd84xAw9EVebSv7 Content-Disposition: attachment; filename=pktcdvd-add-sysfs-debugfs.patch Content-Type: application/octet-stream; name=pktcdvd-add-sysfs-debugfs.patch Content-Transfer-Encoding: Base64 ZGlmZiAtdXJwTiBsaW51eC0yLjYuMTktcmMyLW1tMi9Eb2N1bWVudGF0aW9uL0FC SS90ZXN0aW5nL2RlYnVnZnMtcGt0Y2R2ZCAxLXN5c2ZzLWRlYnVnZnMvRG9jdW1l bnRhdGlvbi9BQkkvdGVzdGluZy9kZWJ1Z2ZzLXBrdGNkdmQKLS0tIGxpbnV4LTIu Ni4xOS1yYzItbW0yL0RvY3VtZW50Y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aW5vcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IHRvIGl0IHRvIHJlbW92ZSB0aGUgcGt0Y2R2ZCBkZXZpY2UuCisKKyAgICBkZXZp Y2VfbWFwICAgICAoMDQ0NCkgIFNob3dzIHRoZSBkZXZpY2UgbWFwcGluZyBpbiBm b3JtYXQ6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBrdGNkdmRbMC03 XSA8cGt0ZGV2aWQ+IDxibGtkZXZpZD4KKwkKKy9zeXMvY2xhc3MvcGt0Y2R2ZC9w a3RjZHZkWzAtN10vCisgICAgZGV2ICAgICAgICAgICAgICAgICAgICgwNDQ0KSBE ZXZpY2UgaWQKKyAgICB1ZXZlbnQgICAgICAgICAgICAgICAgKDAyMDApIFRvIHNl bmQgYW4gdWV2ZW50LgorICAgIAorL3N5cy9jbGFzcy9wa3RjZHZkL3BrdGNkdmRb MC03XS9zdGF0LworICAgIHBhY2tldHNfc3RhcnRlZCAgICAgICAoMDQ0NCkgTnVt YmVyIG9mIHN0YXJ0ZWQgcGFja2V0cy4KKyAgICBwYWNrZXRzX2ZpbmlzaGVkICAg ICAgKDA0NDQpIE51bWJlciBvZiBmaW5pc2hlZCBwYWNrZXRzLgorCisgICAga2Jf d3JpdHRlbiAgICAgICAgICAgICgwNDQ0KSBrQnl0ZXMgd3JpdHRlbi4KKyAgICBr Yl9yZWFkICAgICAgICAgICAgICAgKDA0NDQpIGtCeXRlcyByZWFkLgorICAgIGti X3JlYWRfZ2F0aGVyICAgICAgICAoMDQ0NCkga0J5dGVzIHJlYWQgdG8gZmlsbCB3 cml0ZSBwYWNrZXRzLgorICAgIAorICAgIHJlc2V0ICAgICAgICAgICAgICAgICAo MDIwMCkgV3JpdGUgYW55IHZhbHVlIHRvIGl0IHRvIHJlc2V0CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBwa3RjZHZkIGRldmljZSBzdGF0aXN0aWMg dmFsdWVzLCBsaWtlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBi eXRlcyByZWFkL3dyaXR0ZW4uCisgICAgCisvc3lzL2NsYXNzL3BrdGNkdmQvcGt0 Y2R2ZFswLTddL3dyaXRlX3F1ZXVlLworICAgIHNpemUgICAgICAgICAgICAgICAg ICAoMDQ0NCkgQ29udGFpbnMgdGhlIHNpemUgb2YgdGhlIGJpbyB3cml0ZQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVldWUuCisKKyAgICBjb25n ZXN0aW9uX29mZiAgICAgICAgKDA2NDQpIElmIGJpbyB3cml0ZSBxdWV1ZSBzaXpl IGlzIGJlbG93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlz IG1hcmssIGFjY2VwdCBuZXcgYmlvIHJlcXVlc3RzCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBmcm9tIHRoZSBibG9jayBsYXllci4KKworICAgIGNv bmdlc3Rpb25fb24gICAgICAgICAoMDY0NCkgSWYgYmlvIHdyaXRlIHF1ZXVlIHNp emUgaXMgaGlnaGVyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBh cyB0aGlzIG1hcmssIGRvIG5vIGxvbmdlciBhY2NlcHQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGJpbyB3cml0ZSByZXF1ZXN0cyBmcm9tIHRoZSBi bG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXIgYW5k IHdhaXQgdGlsbCB0aGUgcGt0Y2R2ZAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZGV2aWNlIGhhcyBwcm9jZXNzZWQgZW5vdWdoIGJpbydzCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbyB0aGF0IGJpbyB3cml0ZSBx dWV1ZSBzaXplIGlzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBi ZWxvdyBjb25nZXN0aW9uIG9mZiBtYXJrLgorICAgICAgICAgICAgICAgIC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k7CisKKworCisvKgorICogY3JlYXRlIGFuZCByZWdpc3RlciBhIHBr dGNkdmQga2VybmVsIG9iamVjdC4KKyAqLworc3RhdGljIHN0cnVjdCBwa3RjZHZk X2tvYmoqIHBrdF9rb2JqX2NyZWF0ZShzdHJ1Y3QgcGt0Y2R2ZF9kZXZpY2UgKnBk LAorCQkJCQljb25zdCBjaGFyKiBuYW1lLAorCQkJCQlzdHJ1Y3Qga29iamVjdCog cGFyZW50LAorCQkJCQlzdHJ1Y3Qga29ial90eXBlKiBrdHlwZSkKK3sKKwlzdHJ1 Y3QgcGt0Y2R2ZF9rb2JqICpwOworCXAgPSBremFsbG9jKHNpemVvZigqcCksIEdG UF9LRVJORUwpOworCWlmICghcCkKKwkJcmV0dXJuIE5VTEw7CisJa29iamVjdF9z ZXRfbmFtZSgmcC0+a29iaiwgIiVzIiwgbmFtZSk7CisJcC0+a29iai5wYXJlbnQg PSBwYXJlbnQ7CisJcC0+a29iai5rdHlwZSA9IGt0eXBlOworCXAtPnBkID0gcGQ7 CisJaWYgKGtvYmplY3RfcmVnaXN0ZXIoJnAtPmtvYmopICE9IDApCisJCXJldHVy biBOVUxMOworCXJldHVybiBwOworfQorLyoKKyAqIHJlbW92ZSBhIHBrdGNkdmQg a2VybmVsIG9iamVjdC4KKyAqLworc3RhdGljIHZvaWQgcGt0X2tvYmpfcmVtb3Zl KHN0cnVjdCBwa3RjZHZkX2tvYmogKnApCit7CisJaWYgKHApCisJCWtvYmplY3Rf dW5yZWdpc3RlcigmcC0+a29iaik7Cit9CisvKgorICogZGVmYXVsdCByZWxlYXNl IGZ1bmN0aW9uIGZvciBwa3RjZHZkIGtlcm5lbCBvYmplY3RzLgorICovCitzdGF0 aWMgdm9pZCBwa3Rfa29ial9yZWxlYXNlKHN0cnVjdCBrb2JqZWN0ICprb2JqKQor eworCWtmcmVlKHRvX3BrdGNkdmRrb2JqKGtvYmopKTsKK30KKworCisvKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKgorICoKKyAqIHN5c2ZzIGludGVyZmFjZSBmb3IgcGt0Y2R2ZAorICogYnkg KEMpIDIwMDYgIFRob21hcyBNYWllciA8YmFsYWdpQGp1c3RtYWlsLmRlPgorICoK KyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqLworCisjZGVmaW5lIERFRl9BVFRSKF9vYmosX25hbWUsX21v ZGUpIFwKKwlzdGF0aWMgc3RydWN0IGF0dHJpYnV0ZSBfb2JqID0geyBcCisJCS5u YW1lID0gX25hbWUsIC5vd25lciA9IFRISVNfTU9EVUxFLCAubW9kZSA9IF9tb2Rl IH0KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioKKyAgL3N5cy9jbGFzcy9wa3RjZHZkL3BrdGNkdmRb MC03XS8KKyAgICAgICAgICAgICAgICAgICAgIHN0YXQvcmVzZXQKKyAgICAgICAg ICAgICAgICAgICAgIHN0YXQvcGFja2V0c19zdGFydGVkCisgICAgICAgICAgICAg ICAgICAgICBzdGF0L3BhY2tldHNfZmluaXNoZWQKKyAgICAgICAgICAgICAgICAg ICAgIHN0YXQva2Jfd3JpdHRlbgorICAgICAgICAgICAgICAgICAgICAgc3RhdC9r Yl9yZWFkCisgICAgICAgICAgICAgICAgICAgICBzdGF0L2tiX3JlYWRfZ2F0aGVy CisgICAgICAgICAgICAgICAgICAgICB3cml0ZV9xdWV1ZS9zaXplCisgICAgICAg ICAgICAgICAgICAgICB3cml0ZV9xdWV1ZS9jb25nZXN0aW9uX29mZgorICAgICAg ICAgICAgICAgICAgICAgd3JpdGVfcXVldWUvY29uZ2VzdGlvbl9vbgorICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiovCisKK0RFRl9BVFRSKGtvYmpfcGt0X2F0dHJfc3QxLCAicmVzZXQiLCAw MjAwKTsKK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ICAg ICAgIGFkZCAgICAgICAgICAgIG1hcCBibG9jayBkZXZpY2UKKyAgICAgICAgICAg ICAgICAgICAgIHJlbW92ZSAgICAgICAgIHVubWFwIHBhY2tldCBkZXYKKyAgICAg ICAgICAgICAgICAgICAgIGRldmljZV9tYXAgICAgIHNob3cgbWFwcGluZ3MKKyAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBjbGFzc19wa3RjZHZk X3JlbGVhc2Uoc3RydWN0IGNsYXNzICpjbHMpCit7CisJa2ZyZWUoY2xzKTsKK30K K3N0YXRpYyBzc2l6ZV90IGNsYXNzX3BrdGNkdmRfc2hvd19tYXAoc3RydWN0IGNs YXNzICpjLCBjaGFyICpkYXRhKQoreworCWludCBuID0gMDsKKwlpbnQgaWR4Owor CW11dGV4X2xvY2tfbmVzdGVkKCZjdGxfbXV0ZXgsIFNJTkdMRV9ERVBUSF9ORVNU SU5HKTsKKwlmb3IgKGlkeCA9IDA7IGlkeCA8IE1BWF9XUklURVJTOyBpZHgrKykg eworCQlzdHJ1Y3QgcGt0Y2R2ZF9kZXZpY2UgKnBkID0gcGt0X2RldnNbaWR4XTsK KwkJaWYgKCFwZCkKKwkJCWNvbnRpbnVlOworCQluICs9IHNwcmludGYoZGF0YStu LCAiJXMgJXU6JXUgJXU6JXVcbiIsCisJCQlwZC0+bmFtZSwKKwkJCU1BSk9SKHBk LT5wa3RfZGV2KSwgTUlOT1IocGQtPnBrdF9kZXYpLAorCQkJTUFKT1IocGQtPmJk ZXYtPmJkX2RldiksCisJCQlNSU5PUihwZC0+YmRldi0+YmRfZGV2KSk7CisJfQor CW11dGV4X3VubG9jaygmY3RsX211dGV4KTsKKwlyZXR1cm4gbjsKK30KKworc3Rh dGljIHNzaXplX3QgY2xhc3NfcGt0Y2R2ZF9zdG9yZV9hZGQoc3RydWN0IGNsYXNz ICpjLCBjb25zdCBjaGFyICpidWY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- - 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/