diff options
41 files changed, 539 insertions, 1032 deletions
diff --git a/Documentation/ABI/testing/sysfs-kernel-uids b/Documentation/ABI/testing/sysfs-kernel-uids new file mode 100644 index 000000000000..648d65dbc0e7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-kernel-uids | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | What: /sys/kernel/uids/<uid>/cpu_shares | ||
| 2 | Date: December 2007 | ||
| 3 | Contact: Dhaval Giani <dhaval@linux.vnet.ibm.com> | ||
| 4 | Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> | ||
| 5 | Description: | ||
| 6 | The /sys/kernel/uids/<uid>/cpu_shares tunable is used | ||
| 7 | to set the cpu bandwidth a user is allowed. This is a | ||
| 8 | propotional value. What that means is that if there | ||
| 9 | are two users logged in, each with an equal number of | ||
| 10 | shares, then they will get equal CPU bandwidth. Another | ||
| 11 | example would be, if User A has shares = 1024 and user | ||
| 12 | B has shares = 2048, User B will get twice the CPU | ||
| 13 | bandwidth user A will. For more details refer | ||
| 14 | Documentation/sched-design-CFS.txt | ||
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO index d9d832c010ef..488c77fa3aae 100644 --- a/Documentation/ja_JP/HOWTO +++ b/Documentation/ja_JP/HOWTO | |||
| @@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a | |||
| 11 | fork. So if you have any comments or updates for this file, please try | 11 | fork. So if you have any comments or updates for this file, please try |
| 12 | to update the original English file first. | 12 | to update the original English file first. |
| 13 | 13 | ||
| 14 | Last Updated: 2007/09/23 | 14 | Last Updated: 2007/11/16 |
| 15 | ================================== | 15 | ================================== |
| 16 | これは、 | 16 | これは、 |
| 17 | linux-2.6.23/Documentation/HOWTO | 17 | linux-2.6.24/Documentation/HOWTO |
| 18 | の和訳です。 | 18 | の和訳です。 |
| 19 | 19 | ||
| 20 | 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > | 20 | 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > |
| 21 | 翻訳日: 2007/09/19 | 21 | 翻訳日: 2007/11/10 |
| 22 | 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> | 22 | 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> |
| 23 | 校正者: 松倉さん <nbh--mats at nifty dot com> | 23 | 校正者: 松倉さん <nbh--mats at nifty dot com> |
| 24 | 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> | 24 | 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> |
| @@ -110,7 +110,7 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを | |||
| 110 | 新しいドキュメントファイルも追加することを勧めます。 | 110 | 新しいドキュメントファイルも追加することを勧めます。 |
| 111 | カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの | 111 | カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの |
| 112 | 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 | 112 | 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 |
| 113 | をマニュアルページのメンテナ mtk-manpages@gmx.net に送ることを勧めま | 113 | をマニュアルページのメンテナ mtk.manpages@gmail.com に送ることを勧めま |
| 114 | す。 | 114 | す。 |
| 115 | 115 | ||
| 116 | 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で | 116 | 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で |
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO index b51d7ca842ba..029fca914c05 100644 --- a/Documentation/ko_KR/HOWTO +++ b/Documentation/ko_KR/HOWTO | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | NOTE: | 1 | NOTE: |
| 2 | This is a version of Documentation/HOWTO translated into korean | 2 | This is a version of Documentation/HOWTO translated into korean |
| 3 | This document is maintained by minchan Kim < minchan.kim@gmail.com> | 3 | This document is maintained by minchan Kim <minchan.kim@gmail.com> |
| 4 | If you find any difference between this document and the original file or | 4 | If you find any difference between this document and the original file or |
| 5 | a problem with the translation, please contact the maintainer of this file. | 5 | a problem with the translation, please contact the maintainer of this file. |
| 6 | 6 | ||
| @@ -14,7 +14,7 @@ try to update the original English file first. | |||
| 14 | Documentation/HOWTO | 14 | Documentation/HOWTO |
| 15 | 의 한글 번역입니다. | 15 | 의 한글 번역입니다. |
| 16 | 16 | ||
| 17 | 역자: 김민찬 <minchan.kim@gmail.com > | 17 | 역자: 김민찬 <minchan.kim@gmail.com> |
| 18 | 감수: 이제이미 <jamee.lee@samsung.com> | 18 | 감수: 이제이미 <jamee.lee@samsung.com> |
| 19 | ================================== | 19 | ================================== |
| 20 | 20 | ||
| @@ -23,11 +23,11 @@ Documentation/HOWTO | |||
| 23 | 23 | ||
| 24 | 이 문서는 커널 개발에 있어 가장 중요한 문서이다. 이 문서는 | 24 | 이 문서는 커널 개발에 있어 가장 중요한 문서이다. 이 문서는 |
| 25 | 리눅스 커널 개발자가 되는 법과 리눅스 커널 개발 커뮤니티와 일하는 | 25 | 리눅스 커널 개발자가 되는 법과 리눅스 커널 개발 커뮤니티와 일하는 |
| 26 | 법을 담고있다. 커널 프로그래밍의기술적인 측면과 관련된 내용들은 | 26 | 법을 담고있다. 커널 프로그래밍의 기술적인 측면과 관련된 내용들은 |
| 27 | 포함하지 않으려고 하였지만 올바으로 여러분을 안내하는 데 도움이 | 27 | 포함하지 않으려고 하였지만 올바 길 여러분을 안내하는 데는 도움이 |
| 28 | 될 것이다. | 28 | 될 것이다. |
| 29 | 29 | ||
| 30 | 이 문서에서 오래된 것을 발견하면 문서의 아래쪽에 나열된 메인너에게 | 30 | 이 문서에서 오래된 것을 발견하면 문서의 아래쪽에 나열된 메인이너에게 |
| 31 | 패치를 보내달라. | 31 | 패치를 보내달라. |
| 32 | 32 | ||
| 33 | 33 | ||
| @@ -36,12 +36,12 @@ Documentation/HOWTO | |||
| 36 | 36 | ||
| 37 | 자, 여러분은 리눅스 커널 개발자가 되는 법을 배우고 싶은가? 아니면 | 37 | 자, 여러분은 리눅스 커널 개발자가 되는 법을 배우고 싶은가? 아니면 |
| 38 | 상사로부터"이 장치를 위한 리눅스 드라이버를 작성하시오"라는 말을 | 38 | 상사로부터"이 장치를 위한 리눅스 드라이버를 작성하시오"라는 말을 |
| 39 | 들었는가? 이 문서 여러분이 겪게 될 과정과 커뮤니티와 일하는 법을 | 39 | 들었는가? 이 문서의 적은 여러분이 겪게 될 과정과 커뮤니티와 력는 |
| 40 | 조언하여 여러분의 목적을 달성하기 위해 필요한 것 모두를 알려주는 | 40 | 법 언하여 여러분의 목적을 달성하기 위해 필요한 것 모두를 알려주기 |
| 41 | 것이다. | 41 | 함다. |
| 42 | 42 | ||
| 43 | 커널은 대부분은 C로 작성되고 몇몇 아키텍쳐의 의존적인 부분은 | 43 | 커널은 대부분은 C로 작성되어 있고 몇몇 아키텍쳐의 의존적인 부분은 |
| 44 | 어셈블리로 작성되다. 커널 개발을 위해 C를 잘 이해하고 있어야 한다. | 44 | 어셈블리로 작성되 다. 커널 개발을 위해 C를 잘 이해하고 있어야 한다. |
| 45 | 여러분이 특정 아키텍쳐의 low-level 개발을 할 것이 아니라면 | 45 | 여러분이 특정 아키텍쳐의 low-level 개발을 할 것이 아니라면 |
| 46 | 어셈블리(특정 아키텍쳐)는 잘 알아야 할 필요는 없다. | 46 | 어셈블리(특정 아키텍쳐)는 잘 알아야 할 필요는 없다. |
| 47 | 다음의 참고서적들은 기본에 충실한 C 교육이나 수년간의 경험에 견주지는 | 47 | 다음의 참고서적들은 기본에 충실한 C 교육이나 수년간의 경험에 견주지는 |
| @@ -59,11 +59,11 @@ Documentation/HOWTO | |||
| 59 | 어떤 참고문서도 있지 않다. 정보를 얻기 위해서는 gcc info (`info gcc`)페이지를 | 59 | 어떤 참고문서도 있지 않다. 정보를 얻기 위해서는 gcc info (`info gcc`)페이지를 |
| 60 | 살펴보라. | 60 | 살펴보라. |
| 61 | 61 | ||
| 62 | 여러분은 기존의 개발 커뮤니티와 일하는 법을 배우려고 하고 있다는 것을 | 62 | 여러분은 기존의 개발 커뮤니티와 력는 법을 배우려고 하고 있다는 것을 |
| 63 | 기억하라. 코딩, 스타일, 관한 훌륭한 표준을 가진 사람들이 모인 | 63 | 기억하라. 코딩, 스타일, 함에 관한 훌륭한 표준을 가진 사람들이 모인 |
| 64 | 다양한 그룹이 있다. 이 표준들은 오랜동안 크고 지역적으로 분산된 팀들에 | 64 | 다양한 그룹이 있다. 이 표준들은 오랜동안 크고 지역적으로 분산된 팀들에 |
| 65 | 의해 가장 좋은 방법으로 일하기위하여 찾은 것을 기초로 만들어져왔다. | 65 | 의해 가장 좋은 방법으로 일하기 위하여 찾은 것을 기초로 만들어져 왔다. |
| 66 | 그 표준들은 문서화가 잘 되어 있기 때문에 가능한한 미리 많은 표준들에 | 66 | 그 표준들은 문서화가 잘 되어있기 때문에 가능한한 미리 많은 표준들에 |
| 67 | 관하여 배우려고 시도하라. 다른 사람들은 여러분이나 여러분의 회사가 | 67 | 관하여 배우려고 시도하라. 다른 사람들은 여러분이나 여러분의 회사가 |
| 68 | 일하는 방식에 적응하는 것을 원하지는 않는다. | 68 | 일하는 방식에 적응하는 것을 원하지는 않는다. |
| 69 | 69 | ||
| @@ -73,7 +73,7 @@ Documentation/HOWTO | |||
| 73 | 73 | ||
| 74 | 리눅스 커널 소스 코드는 GPL로 배포(release)되었다. 소스트리의 메인 | 74 | 리눅스 커널 소스 코드는 GPL로 배포(release)되었다. 소스트리의 메인 |
| 75 | 디렉토리에 있는 라이센스에 관하여 상세하게 쓰여 있는 COPYING이라는 | 75 | 디렉토리에 있는 라이센스에 관하여 상세하게 쓰여 있는 COPYING이라는 |
| 76 | 파일을 봐라.여러분이 라이센스에 관한 더 깊은 문제를 가지고 있다면 | 76 | 파일을 봐라. 여러분이 라이센스에 관한 더 깊은 문제를 가지고 있다면 |
| 77 | 리눅스 커널 메일링 리스트에 묻지말고 변호사와 연락하라. 메일링 | 77 | 리눅스 커널 메일링 리스트에 묻지말고 변호사와 연락하라. 메일링 |
| 78 | 리스트들에 있는 사람들은 변호사가 아니기 때문에 법적 문제에 관하여 | 78 | 리스트들에 있는 사람들은 변호사가 아니기 때문에 법적 문제에 관하여 |
| 79 | 그들의 말에 의지해서는 안된다. | 79 | 그들의 말에 의지해서는 안된다. |
| @@ -85,12 +85,12 @@ GPL에 관한 잦은 질문들과 답변들은 다음을 참조하라. | |||
| 85 | 문서 | 85 | 문서 |
| 86 | ---- | 86 | ---- |
| 87 | 87 | ||
| 88 | 리눅스 커널 소스 트리는 커널 커뮤니티와 일하는 법을 배우기 위 은 | 88 | 리눅스 커널 소스 트리는 커널 커뮤니티와 력는 법을 배우기위 훌한 |
| 89 | 귀한 문서들을 가지고 있다. 새로운 기능들이 커널에 들어가게 될 때, | 89 | 한 문서들을 가지고 있다. 새로운 기능들이 커널에 들어가게 될 때, |
| 90 | 그 기능을 어떻게 사용하는지에 관한 설명을 위하여 새로운 문서 파일을 | 90 | 그 기능을 어떻게 사용하는지에 관한 설명을 위하여 새로운 문서 파일을 |
| 91 | 추가하는 것을 권장한다. 커널이 유저스페이스로 노출하는 인터페이스를 | 91 | 추가하는 것을 권장한다. 커널이 유저스페이스로 노출하는 인터페이스를 |
| 92 | 변경하게 되면 변경을 설명하는 메뉴얼 페이지들에 대한 패치나 정보를 | 92 | 변경하게 되면 변경을 설명하는 메뉴얼 페이지들에 대한 패치나 정보를 |
| 93 | mtk-manpages@gmx.net의 메인너에게 보낼 것을 권장한다. | 93 | mtk.manpages@gmail.com의 메인이너에게 보낼 것을 권장한다. |
| 94 | 94 | ||
| 95 | 다음은 커널 소스 트리에 있는 읽어야 할 파일들의 리스트이다. | 95 | 다음은 커널 소스 트리에 있는 읽어야 할 파일들의 리스트이다. |
| 96 | README | 96 | README |
| @@ -105,7 +105,7 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다. | |||
| 105 | Documentation/CodingStyle | 105 | Documentation/CodingStyle |
| 106 | 이 문서는 리눅스 커널 코딩 스타일과 그렇게 한 몇몇 이유를 설명한다. | 106 | 이 문서는 리눅스 커널 코딩 스타일과 그렇게 한 몇몇 이유를 설명한다. |
| 107 | 모든 새로운 코드는 이 문서에 가이드라인들을 따라야 한다. 대부분의 | 107 | 모든 새로운 코드는 이 문서에 가이드라인들을 따라야 한다. 대부분의 |
| 108 | 메인너들은 이 규칙을 따르는 패치들만을 받아들일 것이고 많은 사람들이 | 108 | 메인이너들은 이 규칙을 따르는 패치들만을 받아들일 것이고 많은 사람들이 |
| 109 | 그 패치가 올바른 스타일일 경우만 코드를 검토할 것이다. | 109 | 그 패치가 올바른 스타일일 경우만 코드를 검토할 것이다. |
| 110 | 110 | ||
| 111 | Documentation/SubmittingPatches | 111 | Documentation/SubmittingPatches |
| @@ -115,9 +115,10 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다. | |||
| 115 | - Email 내용들 | 115 | - Email 내용들 |
| 116 | - Email 양식 | 116 | - Email 양식 |
| 117 | - 그것을 누구에게 보낼지 | 117 | - 그것을 누구에게 보낼지 |
| 118 | 이러한 규칙들을 따르는 것이 성공을 보장하진 않는다(왜냐하면 모든 | 118 | 이러한 규칙들을 따르는 것이 성공(역자주: 패치가 받아들여 지는 것)을 |
| 119 | 패치들은 내용과 스타일에 관하여 면밀히 검토되기 때문이다). | 119 | 보장하진 않는다(왜냐하면 모든 패치들은 내용과 스타일에 관하여 |
| 120 | 그러나 규칙을 따르지 않는다면 거의 성공하지도 못할 것이다. | 120 | 면밀히 검토되기 때문이다). 그러나 규칙을 따르지 않는다면 거의 |
| 121 | 성공하지도 못할 것이다. | ||
| 121 | 122 | ||
| 122 | 올바른 패치들을 만드는 법에 관한 훌륭한 다른 문서들이 있다. | 123 | 올바른 패치들을 만드는 법에 관한 훌륭한 다른 문서들이 있다. |
| 123 | "The Perfect Patch" | 124 | "The Perfect Patch" |
| @@ -126,13 +127,13 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다. | |||
| 126 | http://linux.yyz.us/patch-format.html | 127 | http://linux.yyz.us/patch-format.html |
| 127 | 128 | ||
| 128 | Documentation/stable_api_nonsense.txt | 129 | Documentation/stable_api_nonsense.txt |
| 129 | 이 문서는 의도적으로 커널이 변하지 않는 API를 갖지 않도록 결정한 | 130 | 이 문서는 의도적으로 커널이 하는 API를 갖지 않도록 결정한 |
| 130 | 이유를 설명하며 다음과 같은 것들을 포함한다. | 131 | 이유를 설명하며 다음과 같은 것들을 포함한다. |
| 131 | - 서브시스템 shim-layer(호환성을 위해?) | 132 | - 서브시스템 shim-layer(호환성을 위해?) |
| 132 | - 운영 체제들 간의 드라이버 이식성 | 133 | - 운영체제들간의 드라이버 이식성 |
| 133 | - 커널 소스 트리내에 빠른 변화를 늦추는 것(또는 빠른 변화를 막는 것) | 134 | - 커널 소스 트리내에 빠른 변화를 늦추는 것(또는 빠른 변화를 막는 것) |
| 134 | 이 문서는 리눅스 개발 철학을 이해하는데 필수적이며 다른 운영체제에서 | 135 | 이 문서는 리눅스 개발 철학을 이해하는데 필수적이며 다른 운영체제에서 |
| 135 | 리눅스로 겨오는 사람들에게는 매우 중요하다. | 136 | 리눅스로 향는 사람들에게는 매우 중요하다. |
| 136 | 137 | ||
| 137 | 138 | ||
| 138 | Documentation/SecurityBugs | 139 | Documentation/SecurityBugs |
| @@ -141,10 +142,10 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다. | |||
| 141 | 도와 달라. | 142 | 도와 달라. |
| 142 | 143 | ||
| 143 | Documentation/ManagementStyle | 144 | Documentation/ManagementStyle |
| 144 | 이 문서는 리눅스 커널 메인너들이 어떻 들의 방법론 신 | 145 | 이 문서는 리눅스 커널 메인이너들이 그들의 방법론 녹아 있는 |
| 145 | 어떻게 공유하고 운영하는지를 설명한다. 이것은 커널 개발에 입문하는 | 146 | 신을 떻게 공유하고 운영하는지를 설명한다. 이것은 커널 개발에 입문하는 |
| 146 | 모든 사람들(또는 커널 개발에 작은 호기심이라도 있는 사람들)이 | 147 | 모든 사람들(또는 커널 개발에 작은 호기심이라도 있는 사람들)이 |
| 147 | 읽어야 할 중요한 문서이다. 왜냐하면 이 문서는 커널 메인너들의 | 148 | 읽어야 할 중요한 문서이다. 왜냐하면 이 문서는 커널 메인이너들의 |
| 148 | 독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기 | 149 | 독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기 |
| 149 | 때문이다. | 150 | 때문이다. |
| 150 | 151 | ||
| @@ -160,7 +161,7 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다. | |||
| 160 | 161 | ||
| 161 | Documentation/applying-patches.txt | 162 | Documentation/applying-patches.txt |
| 162 | 패치가 무엇이며 그것을 커널의 다른 개발 브랜치들에 어떻게 | 163 | 패치가 무엇이며 그것을 커널의 다른 개발 브랜치들에 어떻게 |
| 163 | 적용하는지에 관하여 자세히 설명 하고 있는 좋은 입문서이다. | 164 | 적용하는지에 관하여 자세히 설명하고 있는 좋은 입문서이다. |
| 164 | 165 | ||
| 165 | 커널은 소스 코드 그 자체에서 자동적으로 만들어질 수 있는 많은 문서들을 | 166 | 커널은 소스 코드 그 자체에서 자동적으로 만들어질 수 있는 많은 문서들을 |
| 166 | 가지고 있다. 이것은 커널 내의 API에 대한 모든 설명, 그리고 락킹을 | 167 | 가지고 있다. 이것은 커널 내의 API에 대한 모든 설명, 그리고 락킹을 |
| @@ -192,7 +193,7 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H | |||
| 192 | 여러분이 어디서 시작해야 할진 모르지만 커널 개발 커뮤니티에 참여할 수 | 193 | 여러분이 어디서 시작해야 할진 모르지만 커널 개발 커뮤니티에 참여할 수 |
| 193 | 있는 일들을 찾길 원한다면 리눅스 커널 Janitor 프로젝트를 살펴봐라. | 194 | 있는 일들을 찾길 원한다면 리눅스 커널 Janitor 프로젝트를 살펴봐라. |
| 194 | http://janitor.kernelnewbies.org/ | 195 | http://janitor.kernelnewbies.org/ |
| 195 | 그곳은 시작하기에 아주 곳이다. 그곳은 리눅스 커널 소스 트리내에 | 196 | 그곳은 시작하기에 훌한 이다. 그곳은 리눅스 커널 소스 트리내에 |
| 196 | 간단히 정리되고 수정될 수 있는 문제들에 관하여 설명한다. 여러분은 이 | 197 | 간단히 정리되고 수정될 수 있는 문제들에 관하여 설명한다. 여러분은 이 |
| 197 | 프로젝트를 대표하는 개발자들과 일하면서 자신의 패치를 리눅스 커널 트리에 | 198 | 프로젝트를 대표하는 개발자들과 일하면서 자신의 패치를 리눅스 커널 트리에 |
| 198 | 반영하기 위한 기본적인 것들을 배우게 될것이며 여러분이 아직 아이디어를 | 199 | 반영하기 위한 기본적인 것들을 배우게 될것이며 여러분이 아직 아이디어를 |
| @@ -212,7 +213,7 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H | |||
| 212 | 것은 Linux Cross-Reference project이며 그것은 자기 참조 방식이며 | 213 | 것은 Linux Cross-Reference project이며 그것은 자기 참조 방식이며 |
| 213 | 소스코드를 인덱스된 웹 페이지들의 형태로 보여준다. 최신의 멋진 커널 | 214 | 소스코드를 인덱스된 웹 페이지들의 형태로 보여준다. 최신의 멋진 커널 |
| 214 | 코드 저장소는 다음을 통하여 참조할 수 있다. | 215 | 코드 저장소는 다음을 통하여 참조할 수 있다. |
| 215 | http://sosdg.org/~coywolf/lxr/ | 216 | http://users.sosdg.org/~qiyong/lxr/ |
| 216 | 217 | ||
| 217 | 218 | ||
| 218 | 개발 프로세스 | 219 | 개발 프로세스 |
| @@ -233,44 +234,45 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H | |||
| 233 | 2.6.x 커널들은 Linux Torvalds가 관리하며 kernel.org의 pub/linux/kernel/v2.6/ | 234 | 2.6.x 커널들은 Linux Torvalds가 관리하며 kernel.org의 pub/linux/kernel/v2.6/ |
| 234 | 디렉토리에서 참조될 수 있다.개발 프로세스는 다음과 같다. | 235 | 디렉토리에서 참조될 수 있다.개발 프로세스는 다음과 같다. |
| 235 | - 새로운 커널이 배포되자마자 2주의 시간이 주어진다. 이 기간동은 | 236 | - 새로운 커널이 배포되자마자 2주의 시간이 주어진다. 이 기간동은 |
| 236 | 메인너들은 큰 diff들을 Linus에게 제출할 수 있다. 대개 이 패치들은 | 237 | 메인이너들은 큰 diff들을 Linus에게 제출할 수 있다. 대개 이 패치들은 |
| 237 | 몇 주 동안 -mm 커널내에 이미 있었던 것들이다. 큰 변경들을 제출하는 데 | 238 | 몇 주 동안 -mm 커널내에 이미 있었던 것들이다. 큰 변경들을 제출하는 데 |
| 238 | 선호되는 방법은 git(커널의 소스 관리 툴, 더 많은 정보들은 http://git.or.cz/ | 239 | 선호되는 방법은 git(커널의 소스 관리 툴, 더 많은 정보들은 http://git.or.cz/ |
| 239 | 에서 참조할 수 있다)를 사용하는 것이지만 순수한 패치파일의 형식으로 보내 | 240 | 에서 참조할 수 있다)를 사용하는 것이지만 순수한 패치파일의 형식으로 보내 |
| 240 | 것도 무관하다. | 241 | 것도 무관하다. |
| 241 | - 2주 후에 -rc1 커널이 배포되며 지금부터는 전체 커널의 안정성에 영향을 | 242 | - 2주 후에 -rc1 커널이 배포되며 지금부터는 전체 커널의 안정성에 영향을 |
| 242 | 미칠수 있는 새로운 기능들을 포함하지 않는 패치들만 추가될 수 있다. | 243 | 미칠수 있는 새로운 기능들을 포함하지 않는 패치들만 추가될 수 있다. |
| 243 | 완전히 새로운 드라이버(혹은 파일시스템)는 -rc1 이후에만 받아들여진다는 | 244 | 완전히 새로운 드라이버(혹은 파일시스템)는 -rc1 이후에만 받아들여진다는 |
| 244 | 것을 기억해라. 왜냐하면 변경이 자체내에서만 발생하고 추가된 코드가 | 245 | 것을 기억해라. 왜냐하면 변경이 자체내에서만 발생하고 추가된 코드가 |
| 245 | 드라이버 외부의 다른 부분에는 영향을 주지 않으므로 그런 변경은 | 246 | 드라이버 외부의 다른 부분에는 영향을 주지 않으므로 그런 변경은 |
| 246 | 퇴보(regression)를 일으킬 만한 위험을 가지고 있지 않기 때문이다. -rc1이 | 247 | 회귀(역자주: 이전에는 존재하지 않았지만 새로운 기능추가나 변경으로 인해 |
| 248 | 생겨난 버그)를 일으킬 만한 위험을 가지고 있지 않기 때문이다. -rc1이 | ||
| 247 | 배포된 이후에 git를 사용하여 패치들을 Linus에게 보낼수 있지만 패치들은 | 249 | 배포된 이후에 git를 사용하여 패치들을 Linus에게 보낼수 있지만 패치들은 |
| 248 | 공식적인 메일링 리스트로 보내서 검토를 받을 필요가 있다. | 250 | 공식적인 메일링 리스트로 보내서 검토를 받을 필요가 있다. |
| 249 | - 새로운 -rc는 Linus는 현재 git tree가 테스트 하기에 충분히 안정된 상태에 | 251 | - 새로운 -rc는 Linus가 현재 git tree가 테스트 하기에 충분히 안정된 상태에 |
| 250 | 있다고 판단될 때마다 배포된다. 목표는 새로운 -rc 커널을 매주 배포하는 | 252 | 있다고 판단될 때마다 배포된다. 목표는 새로운 -rc 커널을 매주 배포하는 |
| 251 | 것이다. | 253 | 것이다. |
| 252 | - 이러한 프로세스는 커널이 "준비"되었다고 여겨질때까지 계속된다. | 254 | - 이러한 프로세스는 커널이 "준비(ready)"되었다고 여겨질때까지 계속된다. |
| 253 | 프로세스는 대체로 6주간 지속된다. | 255 | 프로세스는 대체로 6주간 지속된다. |
| 254 | - 각 -rc 배포에 있는 알려진 보의 목록들은 다음 URI에 남겨진다. | 256 | - 각 -rc 배포에 있는 알려진 귀의 목록들은 다음 URI에 남겨진다. |
| 255 | http://kernelnewbies.org/known_regressions | 257 | http://kernelnewbies.org/known_regressions |
| 256 | 258 | ||
| 257 | 커널 배포에 있어서 언급할만한 가치가 있는 리눅스 커널 메일링 리스트의 | 259 | 커널 배포에 있어서 언급할만한 가치가 있는 리눅스 커널 메일링 리스트의 |
| 258 | Andrew Morton의 글이 있다. | 260 | Andrew Morton의 글이 있다. |
| 259 | "커널이 언제 배포될지는 아무 모른다. 왜냐하면 배포는 알려진 | 261 | "커널이 언제 배포될지는 아무 모른다. 왜냐하면 배포는 알려진 |
| 260 | 버그의 상황에 따라 배포되는 것이지 미리정해 놓은 시간에 따라 | 262 | 버그의 상황에 따라 배포되는 것이지 미리정해 놓은 시간에 따라 |
| 261 | 배포되는 것은 아니기 때문이다." | 263 | 배포되는 것은 아니기 때문이다." |
| 262 | 264 | ||
| 263 | 2.6.x.y - 안정 커널 트리 | 265 | 2.6.x.y - 안정 커널 트리 |
| 264 | ------------------------ | 266 | ------------------------ |
| 265 | 267 | ||
| 266 | 4 자리 숫자로 이루어진 버젼의 커널들은 -stable 커널들이다. 그것들은 2.6.x | 268 | 4 자리 숫자로 이루어진 버젼의 커널들은 -stable 커널들이다. 그것들은 2.6.x |
| 267 | 커널에서 발견된 큰 이나 보안 문제들 중 비교적 작고 중요한 수정들을 | 269 | 커널에서 발견된 큰 귀들이나 보안 문제들 중 비교적 작고 중요한 수정들을 |
| 268 | 포함한다. | 270 | 포함한다. |
| 269 | 271 | ||
| 270 | 이것은 가장 최근의 안정적인 커널을 원하는 사용자에게 추천되는 브랜치이며, | 272 | 이것은 가장 최근의 안정적인 커널을 원하는 사용자에게 추천되는 브랜치이며, |
| 271 | 개발/실험적 버젼을 테스트하는 것을 돕는는 별로 관 없다. | 273 | 개발/실험적 버젼을 테스트하는 것을 돕고자 하는 사용자과는 별로 관련이 없다. |
| 272 | 274 | ||
| 273 | 어떤 2.6.x.y 커널도 사용가능 다면 그때는 가장 높은 숫자의 2.6.x | 275 | 어떤 2.6.x.y 커널도 사용 다면 그때는 가장 높은 숫자의 2.6.x |
| 274 | 커널이 현재의 안정 커널이다. | 276 | 커널이 현재의 안정 커널이다. |
| 275 | 277 | ||
| 276 | 2.6.x.y는 "stable" 팀<stable@kernel.org>에 의해 관리되며 거의 매번 격주로 | 278 | 2.6.x.y는 "stable" 팀<stable@kernel.org>에 의해 관리되며 거의 매번 격주로 |
| @@ -294,7 +296,7 @@ Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는 | |||
| 294 | 서브시스템 커널 트리와 패치들을 가져와서 리눅스 커널 메일링 리스트로 | 296 | 서브시스템 커널 트리와 패치들을 가져와서 리눅스 커널 메일링 리스트로 |
| 295 | 온 많은 패치들과 한데 묶는다. 이 트리는 새로운 기능들과 패치들을 위한 | 297 | 온 많은 패치들과 한데 묶는다. 이 트리는 새로운 기능들과 패치들을 위한 |
| 296 | 장소를 제공하는 역할을 한다. 하나의 패치가 -mm에 한동안 있으면서 그 가치가 | 298 | 장소를 제공하는 역할을 한다. 하나의 패치가 -mm에 한동안 있으면서 그 가치가 |
| 297 | 증명되게 되면 Andrew나 서브시스템 메인너는 그것을 메인라인에 포함시키기 | 299 | 증명되게 되면 Andrew나 서브시스템 메인이너는 그것을 메인라인에 포함시키기 |
| 298 | 위하여 Linus에게 보낸다. | 300 | 위하여 Linus에게 보낸다. |
| 299 | 301 | ||
| 300 | 커널 트리에 포함하고 싶은 모든 새로운 패치들은 Linus에게 보내지기 전에 | 302 | 커널 트리에 포함하고 싶은 모든 새로운 패치들은 Linus에게 보내지기 전에 |
| @@ -327,7 +329,7 @@ Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는 | |||
| 327 | - ACPI development tree, Len Brown <len.brown@intel.com > | 329 | - ACPI development tree, Len Brown <len.brown@intel.com > |
| 328 | git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git | 330 | git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git |
| 329 | 331 | ||
| 330 | - Block development tree, Jens Axboe <axboe@suse.de> | 332 | - Block development tree, Jens Axboe <jens.axboe@oracle.com> |
| 331 | git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git | 333 | git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git |
| 332 | 334 | ||
| 333 | - DRM development tree, Dave Airlie <airlied@linux.ie> | 335 | - DRM development tree, Dave Airlie <airlied@linux.ie> |
| @@ -367,8 +369,8 @@ bugzilla.kernel.org는 리눅스 커널 개발자들이 커널의 버그를 추 | |||
| 367 | kernel bugzilla를 사용하는 자세한 방법은 다음을 참조하라. | 369 | kernel bugzilla를 사용하는 자세한 방법은 다음을 참조하라. |
| 368 | http://test.kernel.org/bugzilla/faq.html | 370 | http://test.kernel.org/bugzilla/faq.html |
| 369 | 371 | ||
| 370 | 메인 커널 소스 디렉토리에 있는 REPORTING-BUGS 파일은 커널 버그 같 | 372 | 메인 커널 소스 디렉토리에 있는 REPORTING-BUGS 파일은 커널 버그 각되는 |
| 371 | 것을 보고하는는 법에 관한 좋은 템플릿이고 문제를 추적하기 위해서 커널 | 373 | 것을 보고하는 에 관한 좋은 템플릿이며 문제를 추적하기 위해서 커널 |
| 372 | 개발자들이 필요로 하는 정보가 무엇들인지를 상세히 설명하고 있다. | 374 | 개발자들이 필요로 하는 정보가 무엇들인지를 상세히 설명하고 있다. |
| 373 | 375 | ||
| 374 | 376 | ||
| @@ -383,7 +385,7 @@ kernel bugzilla를 사용하는 자세한 방법은 다음을 참조하라. | |||
| 383 | 점수를 얻을 수 있는 가장 좋은 방법중의 하나이다. 왜냐하면 많은 사람들은 | 385 | 점수를 얻을 수 있는 가장 좋은 방법중의 하나이다. 왜냐하면 많은 사람들은 |
| 384 | 다른 사람들의 버그들을 수정하기 위하여 시간을 낭비하지 않기 때문이다. | 386 | 다른 사람들의 버그들을 수정하기 위하여 시간을 낭비하지 않기 때문이다. |
| 385 | 387 | ||
| 386 | 이미 보고된 버그 리포트들을 가지고 작업하기 위해서 http://bugzilla.kernelorg를 | 388 | 이미 보고된 버그 리포트들을 가지고 작업하기 위해서 http://bugzilla.kernel.org를 |
| 387 | 참조하라. 여러분이 앞으로 생겨날 버그 리포트들의 조언자가 되길 원한다면 | 389 | 참조하라. 여러분이 앞으로 생겨날 버그 리포트들의 조언자가 되길 원한다면 |
| 388 | bugme-new 메일링 리스트나(새로운 버그 리포트들만이 이곳에서 메일로 전해진다) | 390 | bugme-new 메일링 리스트나(새로운 버그 리포트들만이 이곳에서 메일로 전해진다) |
| 389 | bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다) | 391 | bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다) |
| @@ -404,8 +406,8 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메 | |||
| 404 | 웹상의 많은 다른 곳에도 메일링 리스트의 아카이브들이 있다. | 406 | 웹상의 많은 다른 곳에도 메일링 리스트의 아카이브들이 있다. |
| 405 | 이러한 아카이브들을 찾으려면 검색 엔진을 사용하라. 예를 들어: | 407 | 이러한 아카이브들을 찾으려면 검색 엔진을 사용하라. 예를 들어: |
| 406 | http://dir.gmane.org/gmane.linux.kernel | 408 | http://dir.gmane.org/gmane.linux.kernel |
| 407 | 여러분이 새로운 문제에 관해 리스트에 올리기 전에 말하고 싶은 주제에 한 | 409 | 여러분이 새로운 문제에 관해 리스트에 올리기 전에 말하고 싶은 주제에 한 |
| 408 | 것을 아카이브에서 먼저 찾기를 강력히 권장한다. 이미 상세하게 토론된 많은 | 410 | 것을 아카이브에서 먼저 찾아보기를 강력히 권장한다. 이미 상세하게 토론된 많은 |
| 409 | 것들이 메일링 리스트의 아카이브에 기록되어 있다. | 411 | 것들이 메일링 리스트의 아카이브에 기록되어 있다. |
| 410 | 412 | ||
| 411 | 각각의 커널 서브시스템들의 대부분은 자신들의 개발에 관한 노력들로 이루어진 | 413 | 각각의 커널 서브시스템들의 대부분은 자신들의 개발에 관한 노력들로 이루어진 |
| @@ -443,7 +445,7 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메 | |||
| 443 | 무엇보다도 메일링 리스트의 다른 구독자들에게 보여주려 한다는 것을 기억하라. | 445 | 무엇보다도 메일링 리스트의 다른 구독자들에게 보여주려 한다는 것을 기억하라. |
| 444 | 446 | ||
| 445 | 447 | ||
| 446 | 커뮤니티와 일하는 법 | 448 | 커뮤니티와 력는 법 |
| 447 | -------------------- | 449 | -------------------- |
| 448 | 450 | ||
| 449 | 커널 커뮤니티의 목적은 가능한한 가장 좋은 커널을 제공하는 것이다. 여러분이 | 451 | 커널 커뮤니티의 목적은 가능한한 가장 좋은 커널을 제공하는 것이다. 여러분이 |
| @@ -474,7 +476,7 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메 | |||
| 474 | 올바른 방향의 해결책으로 이끌어갈 의지가 있다면 받아들여질 것이라는 점을 | 476 | 올바른 방향의 해결책으로 이끌어갈 의지가 있다면 받아들여질 것이라는 점을 |
| 475 | 기억하라. | 477 | 기억하라. |
| 476 | 478 | ||
| 477 | 여러분의 첫 패치에 여러분이 수정해야하는 십여개 정도의 회신이 오는 | 479 | 여러분의 첫 패치에 여러분이 수정해야하는 십여개 정도의 회신이 오는 |
| 478 | 경우도 흔하다. 이것은 여러분의 패치가 받아들여지지 않을 것이라는 것을 | 480 | 경우도 흔하다. 이것은 여러분의 패치가 받아들여지지 않을 것이라는 것을 |
| 479 | 의미하는 것이 아니고 개인적으로 여러분에게 감정이 있어서 그러는 것도 | 481 | 의미하는 것이 아니고 개인적으로 여러분에게 감정이 있어서 그러는 것도 |
| 480 | 아니다. 간단히 여러분의 패치에 제기된 문제들을 수정하고 그것을 다시 | 482 | 아니다. 간단히 여러분의 패치에 제기된 문제들을 수정하고 그것을 다시 |
| @@ -486,12 +488,12 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메 | |||
| 486 | 커널 커뮤니티는 가장 전통적인 회사의 개발 환경과는 다르다. 여기에 여러분들의 | 488 | 커널 커뮤니티는 가장 전통적인 회사의 개발 환경과는 다르다. 여기에 여러분들의 |
| 487 | 문제를 피하기 위한 목록이 있다. | 489 | 문제를 피하기 위한 목록이 있다. |
| 488 | 여러분들이 제안한 변경들에 관하여 말할 때 좋은 것들 : | 490 | 여러분들이 제안한 변경들에 관하여 말할 때 좋은 것들 : |
| 489 | - " 이것은 여러 문제들을 해겹합니다." | 491 | - "이것은 여러 문제들을 해겹합니다." |
| 490 | - "이것은 2000 라인의 코드를 제거합니다." | 492 | - "이것은 2000 라인의 코드를 제거합니다." |
| 491 | - "이것은 내가 말하려는 것에 관해 설명하는 패치입니다." | 493 | - "이것은 내가 말하려는 것에 관해 설명하는 패치입니다." |
| 492 | - "나는 5개의 다른 아키텍쳐에서 그것을 테스트했슴으로..." | 494 | - "나는 5개의 다른 아키텍쳐에서 그것을 테스트했슴으로..." |
| 493 | - "여기에 일련의 작은 패치들이 있음로..." | 495 | - "여기에 일련의 작은 패치들이 있음로..." |
| 494 | - "이것은 일반적인 머신에서 성능을 향상시..." | 496 | - "이것은 일반적인 머신에서 성능을 향상시으로..." |
| 495 | 497 | ||
| 496 | 여러분들이 말할 때 피해야 할 좋지 않은 것들 : | 498 | 여러분들이 말할 때 피해야 할 좋지 않은 것들 : |
| 497 | - "우리를 그것을 AIT/ptx/Solaris에서 이러한 방법으로 했다. 그러므로 그것은 좋은 것임에 틀립없다..." | 499 | - "우리를 그것을 AIT/ptx/Solaris에서 이러한 방법으로 했다. 그러므로 그것은 좋은 것임에 틀립없다..." |
| @@ -500,7 +502,7 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메 | |||
| 500 | - "이것은 우리의 엔터프라이즈 상품 라인을 위한 것이다." | 502 | - "이것은 우리의 엔터프라이즈 상품 라인을 위한 것이다." |
| 501 | - "여기에 나의 생각을 말하고 있는 1000 페이지 설계 문서가 있다." | 503 | - "여기에 나의 생각을 말하고 있는 1000 페이지 설계 문서가 있다." |
| 502 | - "나는 6달동안 이것을 했으니..." | 504 | - "나는 6달동안 이것을 했으니..." |
| 503 | - "여기 5000라인 짜리 패치가 있으니..." | 505 | - "여기 5000라인 짜리 패치가 있으니..." |
| 504 | - "나는 현재 뒤죽박죽인 것을 재작성했다. 그리고 여기에..." | 506 | - "나는 현재 뒤죽박죽인 것을 재작성했다. 그리고 여기에..." |
| 505 | - "나는 마감시한을 가지고 있으므로 이 패치는 지금 적용될 필요가 있다." | 507 | - "나는 마감시한을 가지고 있으므로 이 패치는 지금 적용될 필요가 있다." |
| 506 | 508 | ||
| @@ -510,13 +512,13 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메 | |||
| 510 | 없다는 것이다. 리눅스 커널의 작업 환경에서는 단지 이메일 주소만 | 512 | 없다는 것이다. 리눅스 커널의 작업 환경에서는 단지 이메일 주소만 |
| 511 | 알수 있기 때문에 여성과 소수 민족들도 모두 받아들여진다. 국제적으로 | 513 | 알수 있기 때문에 여성과 소수 민족들도 모두 받아들여진다. 국제적으로 |
| 512 | 일하게 되는 측면은 사람의 이름에 근거하여 성별을 추측할 수 없게 | 514 | 일하게 되는 측면은 사람의 이름에 근거하여 성별을 추측할 수 없게 |
| 513 | 하기때문에 차별을 없애는 데 도움을 준다. Andrea라는 이름을 가진 남자와 | 515 | 하기때문에 차별을 없애는 데 도움을 준다. Andrea라는 이름을 가진 남자와 |
| 514 | Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅스 커널에서 | 516 | Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅스 커널에서 |
| 515 | 작업하며 생각을 표현해왔던 대부분의 여성들은 긍정적인 경험을 가지고 | 517 | 작업하며 생각을 표현해왔던 대부분의 여성들은 긍정적인 경험을 가지고 |
| 516 | 있다. | 518 | 있다. |
| 517 | 519 | ||
| 518 | 언어 장벽은 영어에 익숙하지 않은 몇몇 사람들에게 문제가 될 수도 있다. | 520 | 언어 장벽은 영어에 익숙하지 않은 몇몇 사람들에게 문제가 될 수도 있다. |
| 519 | 언어의 훌륭한 구사는 메일링 리스트에서 올바르게 자신의 생각을 | 521 | 언어의 훌륭한 구사는 메일링 리스트에서 올바르게 자신의 생각을 |
| 520 | 표현하기 위하여 필요하다. 그래서 여러분은 이메일을 보내기 전에 | 522 | 표현하기 위하여 필요하다. 그래서 여러분은 이메일을 보내기 전에 |
| 521 | 영어를 올바르게 사용하고 있는지를 체크하는 것이 바람직하다. | 523 | 영어를 올바르게 사용하고 있는지를 체크하는 것이 바람직하다. |
| 522 | 524 | ||
| @@ -524,13 +526,13 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅 | |||
| 524 | 여러분의 변경을 나누어라 | 526 | 여러분의 변경을 나누어라 |
| 525 | ------------------------ | 527 | ------------------------ |
| 526 | 528 | ||
| 527 | 리눅스 커널 커뮤니티는 한꺼번에 굉장히 큰 코드의 묶음을 쉽게 | 529 | 리눅스 커널 커뮤니티는 한꺼번에 굉장히 큰 코드의 묶음(chunk)을 쉽게 |
| 528 | 받아들이지 않는다. 변경은 적절하게 소개되고, 검토되고, 각각의 | 530 | 받아들이지 않는다. 변경은 적절하게 소개되고, 검토되고, 각각의 |
| 529 | 부분으로 작게 나누어져야 한다. 이것은 회사에서 하는 것과는 정확히 | 531 | 부분으로 작게 나누어져야 한다. 이것은 회사에서 하는 것과는 정확히 |
| 530 | 반대되는 것이다. 여러분들의 제안은 개발 초기에 일찍이 소개되야 한다. | 532 | 반대되는 것이다. 여러분들의 제안은 개발 초기에 일찍이 소개되야 한다. |
| 531 | 그래서 여러분들은 자신이 하고 있는 것에 관하여 피드백을 받을 수 있게 | 533 | 그래서 여러분들은 자신이 하고 있는 것에 관하여 피드백을 받을 수 있게 |
| 532 | 된다. 커뮤니티가 여러분들이 커뮤니티와 함께 일하고 있다는 것을 | 534 | 된다. 커뮤니티가 여러분들이 커뮤니티와 함께 일하고 있다는 것을 |
| 533 | 느끼도록 만들고 커뮤니티가 여러분의 기능을 위한 쓰레기 장으로 | 535 | 느끼도록 만들고 커뮤니티가 여러분의 기능을 위한 쓰레기 장으로 |
| 534 | 사용되지 않고 있다는 것을 느끼게 하자. 그러나 메일링 리스트에 한번에 | 536 | 사용되지 않고 있다는 것을 느끼게 하자. 그러나 메일링 리스트에 한번에 |
| 535 | 50개의 이메일을 보내지는 말아라. 여러분들의 일련의 패치들은 항상 | 537 | 50개의 이메일을 보내지는 말아라. 여러분들의 일련의 패치들은 항상 |
| 536 | 더 작아야 한다. | 538 | 더 작아야 한다. |
| @@ -539,7 +541,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅 | |||
| 539 | 541 | ||
| 540 | 1) 작은 패치들은 여러분의 패치들이 적용될 수 있는 확률을 높여준다. | 542 | 1) 작은 패치들은 여러분의 패치들이 적용될 수 있는 확률을 높여준다. |
| 541 | 왜냐하면 다른 사람들은 정확성을 검증하기 위하여 많은 시간과 노력을 | 543 | 왜냐하면 다른 사람들은 정확성을 검증하기 위하여 많은 시간과 노력을 |
| 542 | 들이기를 원하지 않는다. 5줄의 패치는 메인너가 거의 몇 초간 힐끗 | 544 | 들이기를 원하지 않는다. 5줄의 패치는 메인이너가 거의 몇 초간 힐끗 |
| 543 | 보면 적용될 수 있다. 그러나 500 줄의 패치는 정확성을 검토하기 위하여 | 545 | 보면 적용될 수 있다. 그러나 500 줄의 패치는 정확성을 검토하기 위하여 |
| 544 | 몇시간이 걸릴 수도 있다(걸리는 시간은 패치의 크기 혹은 다른 것에 | 546 | 몇시간이 걸릴 수도 있다(걸리는 시간은 패치의 크기 혹은 다른 것에 |
| 545 | 비례하여 기하급수적으로 늘어난다). | 547 | 비례하여 기하급수적으로 늘어난다). |
| @@ -558,18 +560,18 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅 | |||
| 558 | 간결하고 가장 뛰어난 답을 보길 원한다. 훌륭한 학생은 이것을 알고 | 560 | 간결하고 가장 뛰어난 답을 보길 원한다. 훌륭한 학생은 이것을 알고 |
| 559 | 마지막으로 답을 얻기 전 중간 과정들을 제출하진 않는다. | 561 | 마지막으로 답을 얻기 전 중간 과정들을 제출하진 않는다. |
| 560 | 562 | ||
| 561 | 커널 개발도 마찬가지이다. 메인너들과 검토하는 사람들은 문제를 | 563 | 커널 개발도 마찬가지이다. 메인이너들과 검토하는 사람들은 문제를 |
| 562 | 풀어나가는 과정속에 숨겨진 과정을 보길 원하진 않는다. 그들은 | 564 | 풀어나가는 과정속에 숨겨진 과정을 보길 원하진 않는다. 그들은 |
| 563 | 간결하고 멋진 답을 보길 원한다." | 565 | 간결하고 멋진 답을 보길 원한다." |
| 564 | 566 | ||
| 565 | 커뮤니티와 일하며 뛰어난 답을 찾 여러분들의 완성지 은 들 | 567 | 커뮤니티와 력하며 뛰어난 답을 찾는 여러분들의 마지 못 업들 |
| 566 | 사이에 균형을 유지해야 하는 어려 있 수 있다. 그러므로 프로세스의 | 568 | 사이에 균형을 유지해야 하는 것 려 른. 그러므로 프로세스의 |
| 567 | 초반에 여러분의 을 향상시키기위한 피드백을 얻는 것 뿐만 아니라 | 569 | 초반에 여러분의 향상시키기위한 피드백을 얻는 것 뿐만 아니라 |
| 568 | 여러분들의 변경들을 작은 묶음으로 유지해서 심지어는 여러분의 작업의 | 570 | 여러분들의 변경들을 작은 묶음으로 유지해서 심지어는 여러분의 작업의 |
| 569 | 모든 부분이 지금은 포함될 준비가 되어있지 않지만 작은 부분은 이 | 571 | 모든 부분이 지금은 포함될 준비가 되어있지 않지만 작은 부분은 써 |
| 570 | 받아들여질 수 있도록 유지하는 것이 바람직하다. | 572 | 받아들여질 수 있도록 유지하는 것이 바람직하다. |
| 571 | 573 | ||
| 572 | 또한 완성되지 않았고 "나중에 수정될 것이다." 와 같은 것들 포함하는 | 574 | 또한 완성되지 않았고 "나중에 수정될 것이다." 와 같은 것들 포함하는 |
| 573 | 패치들은 받아들여지지 않을 것이라는 점을 유념하라. | 575 | 패치들은 받아들여지지 않을 것이라는 점을 유념하라. |
| 574 | 576 | ||
| 575 | 변경을 정당화해라 | 577 | 변경을 정당화해라 |
| @@ -577,7 +579,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅 | |||
| 577 | 579 | ||
| 578 | 여러분들의 나누어진 패치들을 리눅스 커뮤니티가 왜 반영해야 하는지를 | 580 | 여러분들의 나누어진 패치들을 리눅스 커뮤니티가 왜 반영해야 하는지를 |
| 579 | 알도록 하는 것은 매우 중요하다. 새로운 기능들이 필요하고 유용하다는 | 581 | 알도록 하는 것은 매우 중요하다. 새로운 기능들이 필요하고 유용하다는 |
| 580 | 것은 반드시 그에 는 이유가 있어야 한다. | 582 | 것은 반드시 그에 합한 이유가 있어야 한다. |
| 581 | 583 | ||
| 582 | 584 | ||
| 583 | 변경을 문서화해라 | 585 | 변경을 문서화해라 |
| @@ -588,7 +590,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅 | |||
| 588 | 것이다. 그리고 항상 그 내용을 보길 원하는 모든 사람들을 위해 보존될 | 590 | 것이다. 그리고 항상 그 내용을 보길 원하는 모든 사람들을 위해 보존될 |
| 589 | 것이다. 패치는 완벽하게 다음과 같은 내용들을 포함하여 설명해야 한다. | 591 | 것이다. 패치는 완벽하게 다음과 같은 내용들을 포함하여 설명해야 한다. |
| 590 | - 변경이 왜 필요한지 | 592 | - 변경이 왜 필요한지 |
| 591 | - 패치에 관한 전체 설계 프로치 | 593 | - 패치에 관한 전체 설계 근(approach) |
| 592 | - 구현 상세들 | 594 | - 구현 상세들 |
| 593 | - 테스트 결과들 | 595 | - 테스트 결과들 |
| 594 | 596 | ||
| @@ -600,7 +602,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅 | |||
| 600 | 602 | ||
| 601 | 603 | ||
| 602 | 이 모든 것을 하는 것은 매우 어려운 일이다. 완벽히 소화하는 데는 적어도 몇년이 | 604 | 이 모든 것을 하는 것은 매우 어려운 일이다. 완벽히 소화하는 데는 적어도 몇년이 |
| 603 | 걸릴 수도 있다. 많은 인내와 결가 필요한 계속되는 개선의 과정이다. 그러나 | 605 | 걸릴 수도 있다. 많은 인내와 결 필요한 계속되는 개선의 과정이다. 그러나 |
| 604 | 가능한한 포기하지 말라. 많은 사람들은 이전부터 해왔던 것이고 그 사람들도 | 606 | 가능한한 포기하지 말라. 많은 사람들은 이전부터 해왔던 것이고 그 사람들도 |
| 605 | 정확하게 여러분들이 지금 서 있는 그 곳부터 시작했었다. | 607 | 정확하게 여러분들이 지금 서 있는 그 곳부터 시작했었다. |
| 606 | 608 | ||
| @@ -620,4 +622,4 @@ David A. Wheeler, Junio Hamano, Michael Kerrisk, and Alex Shepard에게도 감 | |||
| 620 | 622 | ||
| 621 | 623 | ||
| 622 | 624 | ||
| 623 | 메인너: Greg Kroah-Hartman <greg@kroah.com> | 625 | 메인이너: Greg Kroah-Hartman <greg@kroah.com> |
diff --git a/Documentation/ko_KR/stable_api_nonsense.txt b/Documentation/ko_KR/stable_api_nonsense.txt new file mode 100644 index 000000000000..8f2b0e1d98c4 --- /dev/null +++ b/Documentation/ko_KR/stable_api_nonsense.txt | |||
| @@ -0,0 +1,195 @@ | |||
| 1 | NOTE: | ||
| 2 | This is a version of Documentation/stable_api_nonsense.txt translated | ||
| 3 | into korean | ||
| 4 | This document is maintained by barrios <minchan.kim@gmail.com> | ||
| 5 | If you find any difference between this document and the original file or | ||
| 6 | a problem with the translation, please contact the maintainer of this file. | ||
| 7 | |||
| 8 | Please also note that the purpose of this file is to be easier to | ||
| 9 | read for non English (read: korean) speakers and is not intended as | ||
| 10 | a fork. So if you have any comments or updates for this file please | ||
| 11 | try to update the original English file first. | ||
| 12 | |||
| 13 | ================================== | ||
| 14 | 이 문서는 | ||
| 15 | Documentation/stable_api_nonsense.txt | ||
| 16 | 의 한글 번역입니다. | ||
| 17 | |||
| 18 | 역자: 김민찬 <minchan.kim@gmail.com> | ||
| 19 | 감수: 이제이미 <jamee.lee@samsung.com> | ||
| 20 | ================================== | ||
| 21 | |||
| 22 | 리눅스 커널 드라이버 인터페이스 | ||
| 23 | (여러분들의 모든 질문에 대한 답 그리고 다른 몇가지) | ||
| 24 | |||
| 25 | Greg Kroah-Hartman <greg@kroah.com> | ||
| 26 | |||
| 27 | 이 문서는 리눅스가 왜 바이너리 커널 인터페이스를 갖지 않는지, 왜 변하지 | ||
| 28 | 않는(stable) 커널 인터페이스를 갖지 않는지를 설명하기 위해 쓰여졌다. | ||
| 29 | 이 문서는 커널과 유저공간 사이의 인터페이스가 아니라 커널 내부의 | ||
| 30 | 인터페이스들을 설명하고 있다는 것을 유념하라. 커널과 유저공간 사이의 | ||
| 31 | 인터페이스는 응용프로그램이 사용하는 syscall 인터페이스이다. 그 인터페이스는 | ||
| 32 | 오랫동안 거의 변하지 않았고 앞으로도 변하지 않을 것이다. 나는 pre 0.9에서 | ||
| 33 | 만들어졌지만 최신의 2.6 커널 배포에서도 잘 동작하는 프로그램을 가지고 | ||
| 34 | 있다. 이 인터페이스는 사용자와 응용프로그램 개발자들이 변하지 않을 것이라고 | ||
| 35 | 여길수 있는 것이다. | ||
| 36 | |||
| 37 | |||
| 38 | 초록 | ||
| 39 | ---- | ||
| 40 | 여러분은 변하지 않는 커널 인터페이스를 원한다고 생각하지만 실제로는 | ||
| 41 | 그렇지 않으며 심지어는 그것을 알아채지 못한다. 여러분이 원하는 것은 | ||
| 42 | 안정되게 실행되는 드라이버이며 드라이버가 메인 커널 트리에 있을 때 | ||
| 43 | 그런 안정적인 드라이버를 얻을 수 있게 된다. 또한 여러분의 드라이버가 | ||
| 44 | 메인 커널 트리에 있다면 다른 많은 좋은 이점들을 얻게 된다. 그러한 것들이 | ||
| 45 | 리눅스를 강건하고, 안정적이며, 성숙한 운영체제로 만들어 놓음으로써 | ||
| 46 | 여러분들로 하여금 바로 리눅스를 사용하게 만드는 이유이다. | ||
| 47 | |||
| 48 | |||
| 49 | 소개 | ||
| 50 | ---- | ||
| 51 | |||
| 52 | 커널 내부의 인터페이스가 바뀌는 것을 걱정하며 커널 드라이버를 작성하고 | ||
| 53 | 싶어하는 사람은 정말 이상한 사람이다. 세상의 대다수의 사람들은 이 인터페이스를 | ||
| 54 | 보지못할 것이며 전혀 걱정하지도 않는다. | ||
| 55 | |||
| 56 | 먼저, 나는 closed 소스, hidden 소스, binary blobs, 소스 wrappers, 또는 GPL로 | ||
| 57 | 배포되었지만 소스 코드를 갖고 있지 않은 커널 드라이버들을 설명하는 어떤 다른 | ||
| 58 | 용어들에 관한 어떤 법적인 문제에 관해서는 언급하지 않을 것이다. 어떤 법적인 | ||
| 59 | 질문들을 가지고 있다면 변호사와 연락하라. 나는 프로그래머이므로 여기서 기술적인 | ||
| 60 | 문제들만을 설명하려고 한다. (법적인 문제를 경시하는 것은 아니다. 그런 문제들은 | ||
| 61 | 엄연히 현실에 있고 여러분들은 항상 그 문제들을 인식하고 있을 필요는 있다.) | ||
| 62 | |||
| 63 | 자, 두가지의 주요 주제가 있다. 바이너리 커널 인터페이스들과 변하지 않는 | ||
| 64 | 커널 소스 인터페이들. 그것들은 서로 의존성을 가지고 있지만 바이너리 | ||
| 65 | 문제를 먼저 풀고 넘어갈 것이다. | ||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | 바이너리 커널 인터페이스 | ||
| 70 | ------------------------ | ||
| 71 | 우리가 변하지 않는 커널 소스 인터페이스를 가지고 있다고 가정하자. 그러면 | ||
| 72 | 바이너리 인터페이스 또한 자연적으로 변하지 않을까? 틀렸다. 리눅스 커널에 | ||
| 73 | 관한 다음 사실들을 생각해보라. | ||
| 74 | - 여러분들이 사용하는 C 컴파일러의 버젼에 따라 다른 커널 자료 구조들은 | ||
| 75 | 다른 alignmnet들을 갖게 될것이고 다른 방법으로(함수들을 inline으로 | ||
| 76 | 했느냐, 아니냐) 다른 함수들을 포함하는 것도 가능한다. 중요한 것은 | ||
| 77 | 개별적인 함수 구성이 아니라 자료 구조 패딩이 달라진다는 점이다. | ||
| 78 | - 여러분이 선택한 커널 빌드 옵션에 따라서 커널은 다양한 것들을 가정할 | ||
| 79 | 수 있다. | ||
| 80 | - 다른 구조체들은 다른 필드들을 포함할 수 있다. | ||
| 81 | - 몇몇 함수들은 전혀 구현되지 않을 수도 있다(즉, 몇몇 lock들은 | ||
| 82 | non-SMP 빌드에서는 사라져 버릴수도 있다). | ||
| 83 | - 커널내에 메모리는 build optoin들에 따라 다른 방법으로 align될수 | ||
| 84 | 있다. | ||
| 85 | - 리눅스는 많은 다양한 프로세서 아키텍쳐에서 실행된다. 한 아키텍쳐의 | ||
| 86 | 바이너리 드라이버를 다른 아키텍쳐에서 정상적으로 실행시킬 방법은 | ||
| 87 | 없다. | ||
| 88 | |||
| 89 | 커널을 빌드했던 C 컴파일러와 정확하게 같은 것을 사용하고 정확하게 같은 | ||
| 90 | 커널 구성(configuration)을 사용하여 여러분들의 모듈을 빌드하면 간단히 | ||
| 91 | 많은 문제들을 해결할 수 있다. 이렇게 하는 것은 여러분들이 하나의 리눅스 | ||
| 92 | 배포판의 하나의 배포 버젼을 위한 모듈만을 제공한다면 별일 아닐 것이다. | ||
| 93 | 그러나 각기 다른 리눅스 배포판마다 한번씩 빌드하는 수를 각 리눅스 배포판마다 | ||
| 94 | 제공하는 다른 릴리즈의 수와 곱하게 되면 이번에는 각 릴리즈들의 다른 빌드 | ||
| 95 | 옵션의 악몽과 마주하게 것이다. 또한 각 리눅스 배포판들은 다른 하드웨어 | ||
| 96 | 종류에(다른 프로세서 타입과 다른 옵션들) 맞춰져 있는 많은 다른 커널들을 | ||
| 97 | 배포한다. 그러므로 한번의 배포에서조차 여러분들의 모듈은 여러 버젼을 | ||
| 98 | 만들 필요가 있다. | ||
| 99 | |||
| 100 | 나를 믿어라. 여러분들은 이러한 종류의 배포를 지원하려고 시도한다면 시간이 | ||
| 101 | 지나면 미칠지경이 될 것이다. 난 이러한 것을 오래전에 아주 어렵게 배웠다... | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | 변하지않는 커널 소스 인터페이스들 | ||
| 106 | --------------------------------- | ||
| 107 | |||
| 108 | 리눅스 커널 드라이버를 계속해서 메인 커널 트리에 반영하지 않고 | ||
| 109 | 유지보수하려고 하는 사름들과 이 문제를 논의하게 되면 훨씬 더 | ||
| 110 | "논란의 여지가 많은" 주제가 될 것이다. | ||
| 111 | |||
| 112 | 리눅스 커널 개발은 끊임없이 빠른 속도로 이루어지고 있으며 결코 | ||
| 113 | 느슨해진 적이 없다. 커널 개발자들이 현재 인터페이스들에서 버그를 | ||
| 114 | 발견하거나 무엇인가 할수 있는 더 좋은 방법을 찾게 되었다고 하자. | ||
| 115 | 그들이 발견한 것을 실행한다면 아마도 더 잘 동작하도록 현재 인터페이스들을 | ||
| 116 | 수정하게 될 것이다. 그들이 그런 일을 하게되면 함수 이름들은 변하게 되고, | ||
| 117 | 구조체들은 늘어나거나 줄어들게 되고, 함수 파라미터들은 재작업될 것이다. | ||
| 118 | 이러한 일이 발생되면 커널 내에 이 인터페이스를 사용했던 인스턴스들이 동시에 | ||
| 119 | 수정될 것이며 이러한 과정은 모든 것이 계속해서 올바르게 동작할 것이라는 | ||
| 120 | 것을 보장한다. | ||
| 121 | |||
| 122 | 이러한 것의 한 예로써, 커널 내부의 USB 인터페이스들은 이 서브시스템이 | ||
| 123 | 생긴 이후로 적어도 3번의 다른 재작업을 겪었다. 이 재작업들은 많은 다른 | ||
| 124 | 문제들을 풀었다. | ||
| 125 | - 데이터 스트림들의 동기적인 모델에서 비동기적인 모델로의 변화. 이것은 | ||
| 126 | 많은 드라이버들의 복잡성을 줄이고 처리량을 향상시켜 현재는 거의 모든 | ||
| 127 | USB 장치들의 거의 최대 속도로 실행되고 있다. | ||
| 128 | - USB 드라이버가 USB 코어로부터 데이터 패킷들을 할당받로록 한 변경으로 | ||
| 129 | 인해서 지금의 모든 드라이버들은 많은 문서화된 데드락을 수정하기 위하여 | ||
| 130 | USB 코어에게 더 많은 정보를 제공해야만 한다. | ||
| 131 | |||
| 132 | 이것은 오랫동안 자신의 오래된 USB 인터페이스들을 유지해야 하는 closed 운영체제들과는 | ||
| 133 | 완전히 반대되는 것이다. closed된 운영체제들은 새로운 개발자들에게 우연히 낡은 | ||
| 134 | 인터페이스를 사용하게 할 기회를 주게되며, 적절하지 못한 방법으로 처리하게 되어 | ||
| 135 | 운영체제의 안정성을 해치는 문제를 야기하게 된다. | ||
| 136 | |||
| 137 | 이 두가지의 예들 모두, 모든 개발자들은 꼭 이루어져야 하는 중요한 변화들이라고 | ||
| 138 | 동의를 하였고 비교적 적은 고통으로 변경되어졌다. 리눅스가 변하지 않는 소스 | ||
| 139 | 인터페이스를 고집한다면, 새로운 인터페이스가 만들어지게 되며 반면 기존의 오래된 | ||
| 140 | 것들, 그리고 깨진 것들은 계속해서 유지되어야 하며 이러한 일들은 USB 개발자들에게 | ||
| 141 | 또 다른 일거리를 주게 된다. 모든 리눅스 USB 개발자들에게 자신의 그들의 업무를 | ||
| 142 | 마친 후 시간을 투자하여 아무 득도 없는 무료 봉사를 해달라고 하는 것은 가능성이 | ||
| 143 | 희박한 일이다. | ||
| 144 | |||
| 145 | 보안 문제 역시 리눅스에게는 매우 중요하다. 보안 문제가 발견되면 그것은 | ||
| 146 | 매우 짧은 시간 안에 수정된다. 보안 문제는 그 문제를 해결하기 위하여 | ||
| 147 | 여러번 내부 커널 인터페이스들을 재작업하게 만들었다. 이러한 문제가 | ||
| 148 | 발생하였을 때 그 인터페이스들을 사용하는 모든 드라이버들도 동시에 | ||
| 149 | 수정되어 보안 문제가 앞으로 갑작스럽게 생기지는 않을 것이라는 것을 | ||
| 150 | 보장한다. 내부 인터페이스들의 변경이 허락되지 않으면 이러한 종류의 보안 | ||
| 151 | 문제를 수정하고 그것이 다시 발생하지 않을 것이라고 보장하는 것은 가능하지 | ||
| 152 | 않을 것이다. | ||
| 153 | |||
| 154 | 커널 인터페이스들은 계속해서 정리되고 있다. 현재 인터페이스를 사용하는 | ||
| 155 | 사람이 한명도 없다면 그것은 삭제된다. 이것은 커널이 가능한한 가장 작게 | ||
| 156 | 유지되며 존재하는 모든 가능성이 있는 인터페이스들이 테스트된다는 것을 | ||
| 157 | 보장한다(사용되지 않는 인터페이스들은 유효성 검증을 하기가 거의 불가능하다). | ||
| 158 | |||
| 159 | |||
| 160 | 무엇을 해야 하나 | ||
| 161 | --------------- | ||
| 162 | 자, 여러분이 메인 커널 트리에 있지 않은 리눅스 커널 드라이버를 가지고 | ||
| 163 | 있다면 여러분은 즉, 개발자는 무엇을 해야 하나? 모든 배포판마다 다른 | ||
| 164 | 커널 버젼을 위한 바이너리 드라이버를 배포하는 것은 악몽이며 계속해서 | ||
| 165 | 변하고 있는 커널 인터페이스들의 맞처 유지보수하려고 시도하는 것은 힘든 | ||
| 166 | 일이다. | ||
| 167 | |||
| 168 | 간단하다. 여러분의 커널 드라이버를 메인 커널 트리에 반영하라(우리는 여기서 | ||
| 169 | GPL을 따르는 배포 드라이버에 관해 얘기하고 있다는 것을 상기하라. 여러분의 | ||
| 170 | 코드가 이러한 분류에 해당되지 않는다면 행운을 빈다. 여러분 스스로 어떻게든 | ||
| 171 | 해야만 한다). 여러분의 드라이버가 트리에 있게되면 커널 인터페이스가 | ||
| 172 | 변경되더라도 가장 먼저 커널에 변경을 가했던 사람에 의해서 수정될 것이다. | ||
| 173 | 이것은 여러분의 드라이버가 여러분의 별다른 노력없이 항상 빌드가 가능하며 | ||
| 174 | 동작하는 것을 보장한다. | ||
| 175 | |||
| 176 | 메인 커널 트리에 여러분의 드라이버를 반영하면 얻게 되는 장점들은 다음과 같다. | ||
| 177 | - 관리의 드는 비용(원래 개발자의)은 줄어줄면서 드라이버의 질은 향상될 것이다. | ||
| 178 | - 다른 개발자들이 여러분의 드라이버에 기능들을 추가 할 것이다. | ||
| 179 | - 다른 사람들은 여러분의 드라이버에 버그를 발견하고 수정할 것이다. | ||
| 180 | - 다른 사람들은 여러분의 드라이버의 개선점을 찾을 줄 것이다. | ||
| 181 | - 외부 인터페이스 변경으로 인해 여러분의 드라이버의 수정이 필요하다면 다른 | ||
| 182 | 사람들이 드라이버를 업데이트할 것이다. | ||
| 183 | - 여러분의 드라이버는 별다른 노력 없이 모든 리눅스 배포판에 자동적으로 | ||
| 184 | 추가될 것이다. | ||
| 185 | |||
| 186 | 리눅스는 다른 운영 체제보다 "쉽게 쓸수 있는(out of the box)" 많은 다른 장치들을 | ||
| 187 | 지원하고 어떤 다른 운영 체제보다 다양한 아키텍쳐위에서 이러한 장치들을 지원하기 때문에 | ||
| 188 | 이러한 증명된 개발 모델은 틀림없이 바로 가고 있는 것이다. | ||
| 189 | |||
| 190 | |||
| 191 | |||
| 192 | ------ | ||
| 193 | |||
| 194 | 이 문서의 초안을 검토해주고 코멘트 해준 Randy Dunlap, Andrew Morton, David Brownell, | ||
| 195 | Hanna Linder, Robert Love, 그리고 Nishanth Aravamudan에게 감사한다. | ||
diff --git a/Documentation/tipar.txt b/Documentation/tipar.txt deleted file mode 100644 index 67133baef6ef..000000000000 --- a/Documentation/tipar.txt +++ /dev/null | |||
| @@ -1,93 +0,0 @@ | |||
| 1 | |||
| 2 | Parallel link cable for Texas Instruments handhelds | ||
| 3 | =================================================== | ||
| 4 | |||
| 5 | |||
| 6 | Author: Romain Lievin | ||
| 7 | Homepage: http://lpg.ticalc.org/prj_tidev/index.html | ||
| 8 | |||
| 9 | |||
| 10 | INTRODUCTION: | ||
| 11 | |||
| 12 | This is a driver for the very common home-made parallel link cable, a cable | ||
| 13 | designed for connecting TI8x/9x graphing calculators (handhelds) to a computer | ||
| 14 | or workstation (Alpha, Sparc). Given that driver is built on parport, the | ||
| 15 | parallel port abstraction layer, this driver is architecture-independent. | ||
| 16 | |||
| 17 | It can also be used with another device plugged on the same port (such as a | ||
| 18 | ZIP drive). I have a 100MB ZIP and both of them work fine! | ||
| 19 | |||
| 20 | If you need more information, please visit the 'TI drivers' homepage at the URL | ||
| 21 | above. | ||
| 22 | |||
| 23 | WHAT YOU NEED: | ||
| 24 | |||
| 25 | A TI calculator and a program capable of communicating with your calculator. | ||
| 26 | |||
| 27 | TiLP will work for sure (since I am its developer!). yal92 may be able to use | ||
| 28 | it by changing tidev for tipar (may require some hacking...). | ||
| 29 | |||
| 30 | HOW TO USE IT: | ||
| 31 | |||
| 32 | You must have first compiled parport support (CONFIG_PARPORT_DEV): either | ||
| 33 | compiled in your kernel, either as a module. | ||
| 34 | |||
| 35 | Next, (as root): | ||
| 36 | |||
| 37 | modprobe parport | ||
| 38 | modprobe tipar | ||
| 39 | |||
| 40 | If it is not already there (it usually is), create the device: | ||
| 41 | |||
| 42 | mknod /dev/tipar0 c 115 0 | ||
| 43 | mknod /dev/tipar1 c 115 1 | ||
| 44 | mknod /dev/tipar2 c 115 2 | ||
| 45 | |||
| 46 | You will have to set permissions on this device to allow you to read/write | ||
| 47 | from it: | ||
| 48 | |||
| 49 | chmod 666 /dev/tipar[0..2] | ||
| 50 | |||
| 51 | Now you are ready to run a linking program such as TiLP. Be sure to configure | ||
| 52 | it properly (RTFM). | ||
| 53 | |||
| 54 | MODULE PARAMETERS: | ||
| 55 | |||
| 56 | You can set these with: modprobe tipar NAME=VALUE | ||
| 57 | There is currently no way to set these on a per-cable basis. | ||
| 58 | |||
| 59 | NAME: timeout | ||
| 60 | TYPE: integer | ||
| 61 | DEFAULT: 15 | ||
| 62 | DESC: Timeout value in tenth of seconds. If no data is available once this | ||
| 63 | time has expired then the driver will return with a timeout error. | ||
| 64 | |||
| 65 | NAME: delay | ||
| 66 | TYPE: integer | ||
| 67 | DEFAULT: 10 | ||
| 68 | DESC: Inter-bit delay in micro-seconds. A lower value gives an higher data | ||
| 69 | rate but makes transmission less reliable. | ||
| 70 | |||
| 71 | These parameters can be changed at run time by any program via ioctl(2) calls | ||
| 72 | as listed in ./include/linux/ticable.h. | ||
| 73 | |||
| 74 | Rather than write 50 pages describing the ioctl() and so on, it is | ||
| 75 | perhaps more useful you look at ticables library (dev_link.c) that demonstrates | ||
| 76 | how to use them, and demonstrates the features of the driver. This is | ||
| 77 | probably a lot more useful to people interested in writing applications | ||
| 78 | that will be using this driver. | ||
| 79 | |||
| 80 | QUIRKS/BUGS: | ||
| 81 | |||
| 82 | None. | ||
| 83 | |||
| 84 | HOW TO CONTACT US: | ||
| 85 | |||
| 86 | You can email me at roms@lpg.ticalc.org. Please prefix the subject line | ||
| 87 | with "TIPAR: " so that I am certain to notice your message. | ||
| 88 | You can also mail JB at jb@jblache.org. He packaged these drivers for Debian. | ||
| 89 | |||
| 90 | CREDITS: | ||
| 91 | |||
| 92 | The code is based on tidev.c & parport.c. | ||
| 93 | The driver has been developed independently of Texas Instruments. | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 9507b4207512..a7caced39bfa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -3699,11 +3699,6 @@ M: nagar@watson.ibm.com | |||
| 3699 | L: linux-kernel@vger.kernel.org | 3699 | L: linux-kernel@vger.kernel.org |
| 3700 | S: Maintained | 3700 | S: Maintained |
| 3701 | 3701 | ||
| 3702 | TI PARALLEL LINK CABLE DRIVER | ||
| 3703 | P: Romain Lievin | ||
| 3704 | M: roms@lpg.ticalc.org | ||
| 3705 | S: Maintained | ||
| 3706 | |||
| 3707 | TIPC NETWORK LAYER | 3702 | TIPC NETWORK LAYER |
| 3708 | P: Per Liden | 3703 | P: Per Liden |
| 3709 | M: per.liden@ericsson.com | 3704 | M: per.liden@ericsson.com |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index a509b8d79781..ef1ed5d70125 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
| @@ -543,28 +543,6 @@ config PPDEV | |||
| 543 | 543 | ||
| 544 | If unsure, say N. | 544 | If unsure, say N. |
| 545 | 545 | ||
| 546 | config TIPAR | ||
| 547 | tristate "Texas Instruments parallel link cable support" | ||
| 548 | depends on PARPORT | ||
| 549 | ---help--- | ||
| 550 | If you own a Texas Instruments graphing calculator and use a | ||
| 551 | parallel link cable, then you might be interested in this driver. | ||
| 552 | |||
| 553 | If you enable this driver, you will be able to communicate with | ||
| 554 | your calculator through a set of device nodes under /dev. The | ||
| 555 | main advantage of this driver is that you don't have to be root | ||
| 556 | to use this precise link cable (depending on the permissions on | ||
| 557 | the device nodes, though). | ||
| 558 | |||
| 559 | To compile this driver as a module, choose M here: the | ||
| 560 | module will be called tipar. | ||
| 561 | |||
| 562 | If you don't know what a parallel link cable is or what a Texas | ||
| 563 | Instruments graphing calculator is, then you probably don't need this | ||
| 564 | driver. | ||
| 565 | |||
| 566 | If unsure, say N. | ||
| 567 | |||
| 568 | config HVC_DRIVER | 546 | config HVC_DRIVER |
| 569 | bool | 547 | bool |
| 570 | help | 548 | help |
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c deleted file mode 100644 index cef55c40654f..000000000000 --- a/drivers/char/tipar.c +++ /dev/null | |||
| @@ -1,557 +0,0 @@ | |||
| 1 | /* Hey EMACS -*- linux-c -*- | ||
| 2 | * | ||
| 3 | * tipar - low level driver for handling a parallel link cable designed | ||
| 4 | * for Texas Instruments graphing calculators (http://lpg.ticalc.org). | ||
| 5 | * A part of the TiLP project. | ||
| 6 | * | ||
| 7 | * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org> | ||
| 8 | * under the terms of the GNU General Public License. | ||
| 9 | * | ||
| 10 | * Various fixes & clean-up from the Linux Kernel Mailing List | ||
| 11 | * (Alan Cox, Richard B. Johnson, Christoph Hellwig). | ||
| 12 | */ | ||
| 13 | |||
| 14 | /* This driver should, in theory, work with any parallel port that has an | ||
| 15 | * appropriate low-level driver; all I/O is done through the parport | ||
| 16 | * abstraction layer. | ||
| 17 | * | ||
| 18 | * If this driver is built into the kernel, you can configure it using the | ||
| 19 | * kernel command-line. For example: | ||
| 20 | * | ||
| 21 | * tipar=timeout,delay (set timeout and delay) | ||
| 22 | * | ||
| 23 | * If the driver is loaded as a module, similar functionality is available | ||
| 24 | * using module parameters. The equivalent of the above commands would be: | ||
| 25 | * | ||
| 26 | * # insmod tipar timeout=15 delay=10 | ||
| 27 | */ | ||
| 28 | |||
| 29 | /* COMPATIBILITY WITH OLD KERNELS | ||
| 30 | * | ||
| 31 | * Usually, parallel cables were bound to ports at | ||
| 32 | * particular I/O addresses, as follows: | ||
| 33 | * | ||
| 34 | * tipar0 0x378 | ||
| 35 | * tipar1 0x278 | ||
| 36 | * tipar2 0x3bc | ||
| 37 | * | ||
| 38 | * | ||
| 39 | * This driver, by default, binds tipar devices according to parport and | ||
| 40 | * the minor number. | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | #undef DEBUG /* change to #define to get debugging | ||
| 44 | * output - for pr_debug() */ | ||
| 45 | #include <linux/module.h> | ||
| 46 | #include <linux/types.h> | ||
| 47 | #include <linux/errno.h> | ||
| 48 | #include <linux/kernel.h> | ||
| 49 | #include <linux/sched.h> | ||
| 50 | #include <linux/delay.h> | ||
| 51 | #include <linux/fcntl.h> | ||
| 52 | #include <linux/fs.h> | ||
| 53 | #include <linux/init.h> | ||
| 54 | #include <asm/uaccess.h> | ||
| 55 | #include <linux/ioport.h> | ||
| 56 | #include <asm/io.h> | ||
| 57 | #include <linux/bitops.h> | ||
| 58 | #include <linux/parport.h> /* Our code depend on parport */ | ||
| 59 | #include <linux/device.h> | ||
| 60 | |||
| 61 | /* | ||
| 62 | * TI definitions | ||
| 63 | */ | ||
| 64 | #include <linux/ticable.h> | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Version Information | ||
| 68 | */ | ||
| 69 | #define DRIVER_VERSION "1.19" | ||
| 70 | #define DRIVER_AUTHOR "Romain Lievin <roms@lpg.ticalc.org>" | ||
| 71 | #define DRIVER_DESC "Device driver for TI/PC parallel link cables" | ||
| 72 | #define DRIVER_LICENSE "GPL" | ||
| 73 | |||
| 74 | #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq)) | ||
| 75 | |||
| 76 | /* ----- global variables --------------------------------------------- */ | ||
| 77 | |||
| 78 | struct tipar_struct { | ||
| 79 | struct pardevice *dev; /* Parport device entry */ | ||
| 80 | }; | ||
| 81 | |||
| 82 | #define PP_NO 3 | ||
| 83 | static struct tipar_struct table[PP_NO]; | ||
| 84 | |||
| 85 | static int delay = IO_DELAY; /* inter-bit delay in microseconds */ | ||
| 86 | static int timeout = TIMAXTIME; /* timeout in tenth of seconds */ | ||
| 87 | |||
| 88 | static unsigned int tp_count; /* tipar count */ | ||
| 89 | static unsigned long opened; /* opened devices */ | ||
| 90 | |||
| 91 | static struct class *tipar_class; | ||
| 92 | |||
| 93 | /* --- macros for parport access -------------------------------------- */ | ||
| 94 | |||
| 95 | #define r_dtr(x) (parport_read_data(table[(x)].dev->port)) | ||
| 96 | #define r_str(x) (parport_read_status(table[(x)].dev->port)) | ||
| 97 | #define w_ctr(x,y) (parport_write_control(table[(x)].dev->port, (y))) | ||
| 98 | #define w_dtr(x,y) (parport_write_data(table[(x)].dev->port, (y))) | ||
| 99 | |||
| 100 | /* --- setting states on the D-bus with the right timing: ------------- */ | ||
| 101 | |||
| 102 | static inline void | ||
| 103 | outbyte(int value, int minor) | ||
| 104 | { | ||
| 105 | w_dtr(minor, value); | ||
| 106 | } | ||
| 107 | |||
| 108 | static inline int | ||
| 109 | inbyte(int minor) | ||
| 110 | { | ||
| 111 | return (r_str(minor)); | ||
| 112 | } | ||
| 113 | |||
| 114 | static inline void | ||
| 115 | init_ti_parallel(int minor) | ||
| 116 | { | ||
| 117 | outbyte(3, minor); | ||
| 118 | } | ||
| 119 | |||
| 120 | /* ----- global defines ----------------------------------------------- */ | ||
| 121 | |||
| 122 | #define START(x) { x = jiffies + (HZ * timeout) / 10; } | ||
| 123 | #define WAIT(x) { \ | ||
| 124 | if (time_before((x), jiffies)) return -1; \ | ||
| 125 | if (need_resched()) schedule(); } | ||
| 126 | |||
| 127 | /* ----- D-bus bit-banging functions ---------------------------------- */ | ||
| 128 | |||
| 129 | /* D-bus protocol (45kbit/s max): | ||
| 130 | 1 0 0 | ||
| 131 | _______ ______|______ __________|________ __________ | ||
| 132 | Red : ________ | ____ | ____ | ||
| 133 | _ ____________|________ ______|__________ _____ | ||
| 134 | White: ________ | ______ | _______ | ||
| 135 | */ | ||
| 136 | |||
| 137 | /* Try to transmit a byte on the specified port (-1 if error). */ | ||
| 138 | static int | ||
| 139 | put_ti_parallel(int minor, unsigned char data) | ||
| 140 | { | ||
| 141 | unsigned int bit; | ||
| 142 | unsigned long max; | ||
| 143 | |||
| 144 | for (bit = 0; bit < 8; bit++) { | ||
| 145 | if (data & 1) { | ||
| 146 | outbyte(2, minor); | ||
| 147 | START(max); | ||
| 148 | do { | ||
| 149 | WAIT(max); | ||
| 150 | } while (inbyte(minor) & 0x10); | ||
| 151 | |||
| 152 | outbyte(3, minor); | ||
| 153 | START(max); | ||
| 154 | do { | ||
| 155 | WAIT(max); | ||
| 156 | } while (!(inbyte(minor) & 0x10)); | ||
| 157 | } else { | ||
| 158 | outbyte(1, minor); | ||
| 159 | START(max); | ||
| 160 | do { | ||
| 161 | WAIT(max); | ||
| 162 | } while (inbyte(minor) & 0x20); | ||
| 163 | |||
| 164 | outbyte(3, minor); | ||
| 165 | START(max); | ||
| 166 | do { | ||
| 167 | WAIT(max); | ||
| 168 | } while (!(inbyte(minor) & 0x20)); | ||
| 169 | } | ||
| 170 | |||
| 171 | data >>= 1; | ||
| 172 | udelay(delay); | ||
| 173 | |||
| 174 | if (need_resched()) | ||
| 175 | schedule(); | ||
| 176 | } | ||
| 177 | |||
| 178 | return 0; | ||
| 179 | } | ||
| 180 | |||
| 181 | /* Receive a byte on the specified port or -1 if error. */ | ||
| 182 | static int | ||
| 183 | get_ti_parallel(int minor) | ||
| 184 | { | ||
| 185 | unsigned int bit; | ||
| 186 | unsigned char v, data = 0; | ||
| 187 | unsigned long max; | ||
| 188 | |||
| 189 | for (bit = 0; bit < 8; bit++) { | ||
| 190 | START(max); | ||
| 191 | do { | ||
| 192 | WAIT(max); | ||
| 193 | } while ((v = inbyte(minor) & 0x30) == 0x30); | ||
| 194 | |||
| 195 | if (v == 0x10) { | ||
| 196 | data = (data >> 1) | 0x80; | ||
| 197 | outbyte(1, minor); | ||
| 198 | START(max); | ||
| 199 | do { | ||
| 200 | WAIT(max); | ||
| 201 | } while (!(inbyte(minor) & 0x20)); | ||
| 202 | outbyte(3, minor); | ||
| 203 | } else { | ||
| 204 | data = data >> 1; | ||
| 205 | outbyte(2, minor); | ||
| 206 | START(max); | ||
| 207 | do { | ||
| 208 | WAIT(max); | ||
| 209 | } while (!(inbyte(minor) & 0x10)); | ||
| 210 | outbyte(3, minor); | ||
| 211 | } | ||
| 212 | |||
| 213 | udelay(delay); | ||
| 214 | if (need_resched()) | ||
| 215 | schedule(); | ||
| 216 | } | ||
| 217 | |||
| 218 | return (int) data; | ||
| 219 | } | ||
| 220 | |||
| 221 | /* Try to detect a parallel link cable on the specified port */ | ||
| 222 | static int | ||
| 223 | probe_ti_parallel(int minor) | ||
| 224 | { | ||
| 225 | int i; | ||
| 226 | int seq[] = { 0x00, 0x20, 0x10, 0x30 }; | ||
| 227 | int data; | ||
| 228 | |||
| 229 | for (i = 3; i >= 0; i--) { | ||
| 230 | outbyte(3, minor); | ||
| 231 | outbyte(i, minor); | ||
| 232 | udelay(delay); | ||
| 233 | data = inbyte(minor) & 0x30; | ||
| 234 | pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i, | ||
| 235 | data, seq[i]); | ||
| 236 | if (data != seq[i]) { | ||
| 237 | outbyte(3, minor); | ||
| 238 | return -1; | ||
| 239 | } | ||
| 240 | } | ||
| 241 | |||
| 242 | outbyte(3, minor); | ||
| 243 | return 0; | ||
| 244 | } | ||
| 245 | |||
| 246 | /* ----- kernel module functions--------------------------------------- */ | ||
| 247 | |||
| 248 | static int | ||
| 249 | tipar_open(struct inode *inode, struct file *file) | ||
| 250 | { | ||
| 251 | unsigned int minor = iminor(inode) - TIPAR_MINOR; | ||
| 252 | |||
| 253 | if (tp_count == 0 || minor > tp_count - 1) | ||
| 254 | return -ENXIO; | ||
| 255 | |||
| 256 | if (test_and_set_bit(minor, &opened)) | ||
| 257 | return -EBUSY; | ||
| 258 | |||
| 259 | if (!table[minor].dev) { | ||
| 260 | printk(KERN_ERR "%s: NULL device for minor %u\n", | ||
| 261 | __FUNCTION__, minor); | ||
| 262 | return -ENXIO; | ||
| 263 | } | ||
| 264 | parport_claim_or_block(table[minor].dev); | ||
| 265 | init_ti_parallel(minor); | ||
| 266 | parport_release(table[minor].dev); | ||
| 267 | |||
| 268 | return nonseekable_open(inode, file); | ||
| 269 | } | ||
| 270 | |||
| 271 | static int | ||
| 272 | tipar_close(struct inode *inode, struct file *file) | ||
| 273 | { | ||
| 274 | unsigned int minor = iminor(inode) - TIPAR_MINOR; | ||
| 275 | |||
| 276 | if (minor > tp_count - 1) | ||
| 277 | return -ENXIO; | ||
| 278 | |||
| 279 | clear_bit(minor, &opened); | ||
| 280 | |||
| 281 | return 0; | ||
| 282 | } | ||
| 283 | |||
| 284 | static ssize_t | ||
| 285 | tipar_write (struct file *file, const char __user *buf, size_t count, | ||
| 286 | loff_t * ppos) | ||
| 287 | { | ||
| 288 | unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; | ||
| 289 | ssize_t n; | ||
| 290 | |||
| 291 | parport_claim_or_block(table[minor].dev); | ||
| 292 | |||
| 293 | for (n = 0; n < count; n++) { | ||
| 294 | unsigned char b; | ||
| 295 | |||
| 296 | if (get_user(b, buf + n)) { | ||
| 297 | n = -EFAULT; | ||
| 298 | goto out; | ||
| 299 | } | ||
| 300 | |||
| 301 | if (put_ti_parallel(minor, b) == -1) { | ||
| 302 | init_ti_parallel(minor); | ||
| 303 | n = -ETIMEDOUT; | ||
| 304 | goto out; | ||
| 305 | } | ||
| 306 | } | ||
| 307 | out: | ||
| 308 | parport_release(table[minor].dev); | ||
| 309 | return n; | ||
| 310 | } | ||
| 311 | |||
| 312 | static ssize_t | ||
| 313 | tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) | ||
| 314 | { | ||
| 315 | int b = 0; | ||
| 316 | unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; | ||
| 317 | ssize_t retval = 0; | ||
| 318 | ssize_t n = 0; | ||
| 319 | |||
| 320 | if (count == 0) | ||
| 321 | return 0; | ||
| 322 | |||
| 323 | parport_claim_or_block(table[minor].dev); | ||
| 324 | |||
| 325 | while (n < count) { | ||
| 326 | b = get_ti_parallel(minor); | ||
| 327 | if (b == -1) { | ||
| 328 | init_ti_parallel(minor); | ||
| 329 | retval = -ETIMEDOUT; | ||
| 330 | goto out; | ||
| 331 | } else { | ||
| 332 | if (put_user(b, buf + n)) { | ||
| 333 | retval = -EFAULT; | ||
| 334 | break; | ||
| 335 | } else | ||
| 336 | retval = ++n; | ||
| 337 | } | ||
| 338 | |||
| 339 | /* Non-blocking mode : try again ! */ | ||
| 340 | if (file->f_flags & O_NONBLOCK) { | ||
| 341 | retval = -EAGAIN; | ||
| 342 | goto out; | ||
| 343 | } | ||
| 344 | |||
| 345 | /* Signal pending, try again ! */ | ||
| 346 | if (signal_pending(current)) { | ||
| 347 | retval = -ERESTARTSYS; | ||
| 348 | goto out; | ||
| 349 | } | ||
| 350 | |||
| 351 | if (need_resched()) | ||
| 352 | schedule(); | ||
| 353 | } | ||
| 354 | |||
| 355 | out: | ||
| 356 | parport_release(table[minor].dev); | ||
| 357 | return retval; | ||
| 358 | } | ||
| 359 | |||
| 360 | static int | ||
| 361 | tipar_ioctl(struct inode *inode, struct file *file, | ||
| 362 | unsigned int cmd, unsigned long arg) | ||
| 363 | { | ||
| 364 | int retval = 0; | ||
| 365 | |||
| 366 | switch (cmd) { | ||
| 367 | case IOCTL_TIPAR_DELAY: | ||
| 368 | delay = (int)arg; //get_user(delay, &arg); | ||
| 369 | break; | ||
| 370 | case IOCTL_TIPAR_TIMEOUT: | ||
| 371 | if (arg != 0) | ||
| 372 | timeout = (int)arg; | ||
| 373 | else | ||
| 374 | retval = -EINVAL; | ||
| 375 | break; | ||
| 376 | default: | ||
| 377 | retval = -ENOTTY; | ||
| 378 | break; | ||
| 379 | } | ||
| 380 | |||
| 381 | return retval; | ||
| 382 | } | ||
| 383 | |||
| 384 | /* ----- kernel module registering ------------------------------------ */ | ||
| 385 | |||
| 386 | static const struct file_operations tipar_fops = { | ||
| 387 | .owner = THIS_MODULE, | ||
| 388 | .llseek = no_llseek, | ||
| 389 | .read = tipar_read, | ||
| 390 | .write = tipar_write, | ||
| 391 | .ioctl = tipar_ioctl, | ||
| 392 | .open = tipar_open, | ||
| 393 | .release = tipar_close, | ||
| 394 | }; | ||
| 395 | |||
| 396 | /* --- initialisation code ------------------------------------- */ | ||
| 397 | |||
| 398 | #ifndef MODULE | ||
| 399 | /* You must set these - there is no sane way to probe for this cable. | ||
| 400 | * You can use 'tipar=timeout,delay' to set these now. */ | ||
| 401 | static int __init | ||
| 402 | tipar_setup(char *str) | ||
| 403 | { | ||
| 404 | int ints[3]; | ||
| 405 | |||
| 406 | str = get_options(str, ARRAY_SIZE(ints), ints); | ||
| 407 | |||
| 408 | if (ints[0] > 0) { | ||
| 409 | if (ints[1] != 0) | ||
| 410 | timeout = ints[1]; | ||
| 411 | else | ||
| 412 | printk(KERN_WARNING "tipar: bad timeout value (0), " | ||
| 413 | "using default value instead"); | ||
| 414 | if (ints[0] > 1) { | ||
| 415 | delay = ints[2]; | ||
| 416 | } | ||
| 417 | } | ||
| 418 | |||
| 419 | return 1; | ||
| 420 | } | ||
| 421 | #endif | ||
| 422 | |||
| 423 | /* | ||
| 424 | * Register our module into parport. | ||
| 425 | * Pass also 2 callbacks functions to parport: a pre-emptive function and an | ||
| 426 | * interrupt handler function (unused). | ||
| 427 | * Display a message such "tipar0: using parport0 (polling)". | ||
| 428 | */ | ||
| 429 | static int | ||
| 430 | tipar_register(int nr, struct parport *port) | ||
| 431 | { | ||
| 432 | int err = 0; | ||
| 433 | |||
| 434 | /* Register our module into parport */ | ||
| 435 | table[nr].dev = parport_register_device(port, "tipar", | ||
| 436 | NULL, NULL, NULL, 0, | ||
| 437 | (void *) &table[nr]); | ||
| 438 | |||
| 439 | if (table[nr].dev == NULL) { | ||
| 440 | err = 1; | ||
| 441 | goto out; | ||
| 442 | } | ||
| 443 | |||
| 444 | device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR, | ||
| 445 | TIPAR_MINOR + nr), "par%d", nr); | ||
| 446 | |||
| 447 | /* Display informations */ | ||
| 448 | pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == | ||
| 449 | PARPORT_IRQ_NONE) ? "polling" : "interrupt-driven"); | ||
| 450 | |||
| 451 | if (probe_ti_parallel(nr) != -1) | ||
| 452 | pr_info("tipar%d: link cable found\n", nr); | ||
| 453 | else | ||
| 454 | pr_info("tipar%d: link cable not found\n", nr); | ||
| 455 | |||
| 456 | err = 0; | ||
| 457 | |||
| 458 | out: | ||
| 459 | return err; | ||
| 460 | } | ||
| 461 | |||
| 462 | static void | ||
| 463 | tipar_attach(struct parport *port) | ||
| 464 | { | ||
| 465 | if (tp_count == PP_NO) { | ||
| 466 | pr_info("tipar: ignoring parallel port (max. %d)\n", PP_NO); | ||
| 467 | return; | ||
| 468 | } | ||
| 469 | |||
| 470 | if (!tipar_register(tp_count, port)) | ||
| 471 | tp_count++; | ||
| 472 | } | ||
| 473 | |||
| 474 | static void | ||
| 475 | tipar_detach(struct parport *port) | ||
| 476 | { | ||
| 477 | /* Nothing to do */ | ||
| 478 | } | ||
| 479 | |||
| 480 | static struct parport_driver tipar_driver = { | ||
| 481 | .name = "tipar", | ||
| 482 | .attach = tipar_attach, | ||
| 483 | .detach = tipar_detach, | ||
| 484 | }; | ||
| 485 | |||
| 486 | static int __init | ||
| 487 | tipar_init_module(void) | ||
| 488 | { | ||
| 489 | int err = 0; | ||
| 490 | |||
| 491 | pr_info("tipar: parallel link cable driver, version %s\n", | ||
| 492 | DRIVER_VERSION); | ||
| 493 | |||
| 494 | if (register_chrdev(TIPAR_MAJOR, "tipar", &tipar_fops)) { | ||
| 495 | printk(KERN_ERR "tipar: unable to get major %d\n", TIPAR_MAJOR); | ||
| 496 | err = -EIO; | ||
| 497 | goto out; | ||
| 498 | } | ||
| 499 | |||
| 500 | tipar_class = class_create(THIS_MODULE, "ticables"); | ||
| 501 | if (IS_ERR(tipar_class)) { | ||
| 502 | err = PTR_ERR(tipar_class); | ||
| 503 | goto out_chrdev; | ||
| 504 | } | ||
| 505 | if (parport_register_driver(&tipar_driver)) { | ||
| 506 | printk(KERN_ERR "tipar: unable to register with parport\n"); | ||
| 507 | err = -EIO; | ||
| 508 | goto out_class; | ||
| 509 | } | ||
| 510 | |||
| 511 | err = 0; | ||
| 512 | goto out; | ||
| 513 | |||
| 514 | out_class: | ||
| 515 | class_destroy(tipar_class); | ||
| 516 | |||
| 517 | out_chrdev: | ||
| 518 | unregister_chrdev(TIPAR_MAJOR, "tipar"); | ||
| 519 | out: | ||
| 520 | return err; | ||
| 521 | } | ||
| 522 | |||
| 523 | static void __exit | ||
| 524 | tipar_cleanup_module(void) | ||
| 525 | { | ||
| 526 | unsigned int i; | ||
| 527 | |||
| 528 | /* Unregistering module */ | ||
| 529 | parport_unregister_driver(&tipar_driver); | ||
| 530 | |||
| 531 | unregister_chrdev(TIPAR_MAJOR, "tipar"); | ||
| 532 | |||
| 533 | for (i = 0; i < PP_NO; i++) { | ||
| 534 | if (table[i].dev == NULL) | ||
| 535 | continue; | ||
| 536 | parport_unregister_device(table[i].dev); | ||
| 537 | device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); | ||
| 538 | } | ||
| 539 | class_destroy(tipar_class); | ||
| 540 | |||
| 541 | pr_info("tipar: module unloaded\n"); | ||
| 542 | } | ||
| 543 | |||
| 544 | /* --------------------------------------------------------------------- */ | ||
| 545 | |||
| 546 | __setup("tipar=", tipar_setup); | ||
| 547 | module_init(tipar_init_module); | ||
| 548 | module_exit(tipar_cleanup_module); | ||
| 549 | |||
| 550 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
| 551 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
| 552 | MODULE_LICENSE(DRIVER_LICENSE); | ||
| 553 | |||
| 554 | module_param(timeout, int, 0); | ||
| 555 | MODULE_PARM_DESC(timeout, "Timeout (default=1.5 seconds)"); | ||
| 556 | module_param(delay, int, 0); | ||
| 557 | MODULE_PARM_DESC(delay, "Inter-bit delay (default=10 microseconds)"); | ||
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 45b22282f149..fb06555708a8 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
| @@ -390,7 +390,7 @@ config IDEPCI_PCIBUS_ORDER | |||
| 390 | 390 | ||
| 391 | # TODO: split it on per host driver config options (or module parameters) | 391 | # TODO: split it on per host driver config options (or module parameters) |
| 392 | config BLK_DEV_OFFBOARD | 392 | config BLK_DEV_OFFBOARD |
| 393 | bool "Boot off-board chipsets first support" | 393 | bool "Boot off-board chipsets first support (DEPRECATED)" |
| 394 | depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) | 394 | depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) |
| 395 | help | 395 | help |
| 396 | Normally, IDE controllers built into the motherboard (on-board | 396 | Normally, IDE controllers built into the motherboard (on-board |
| @@ -410,6 +410,10 @@ config BLK_DEV_OFFBOARD | |||
| 410 | Note that, if you do this, the order of the hd* devices will be | 410 | Note that, if you do this, the order of the hd* devices will be |
| 411 | rearranged which may require modification of fstab and other files. | 411 | rearranged which may require modification of fstab and other files. |
| 412 | 412 | ||
| 413 | Please also note that this method of assuring stable naming of | ||
| 414 | IDE devices is unreliable and use other means for achieving it | ||
| 415 | (i.e. udev). | ||
| 416 | |||
| 413 | If in doubt, say N. | 417 | If in doubt, say N. |
| 414 | 418 | ||
| 415 | config BLK_DEV_GENERIC | 419 | config BLK_DEV_GENERIC |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 57a5f63d6ae3..92ac658dac33 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
| @@ -1650,31 +1650,6 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason) | |||
| 1650 | return 1; | 1650 | return 1; |
| 1651 | } | 1651 | } |
| 1652 | 1652 | ||
| 1653 | static void post_transform_command(struct request *req) | ||
| 1654 | { | ||
| 1655 | u8 *c = req->cmd; | ||
| 1656 | char *ibuf; | ||
| 1657 | |||
| 1658 | if (!blk_pc_request(req)) | ||
| 1659 | return; | ||
| 1660 | |||
| 1661 | if (req->bio) | ||
| 1662 | ibuf = bio_data(req->bio); | ||
| 1663 | else | ||
| 1664 | ibuf = req->data; | ||
| 1665 | |||
| 1666 | if (!ibuf) | ||
| 1667 | return; | ||
| 1668 | |||
| 1669 | /* | ||
| 1670 | * set ansi-revision and response data as atapi | ||
| 1671 | */ | ||
| 1672 | if (c[0] == GPCMD_INQUIRY) { | ||
| 1673 | ibuf[2] |= 2; | ||
| 1674 | ibuf[3] = (ibuf[3] & 0xf0) | 2; | ||
| 1675 | } | ||
| 1676 | } | ||
| 1677 | |||
| 1678 | typedef void (xfer_func_t)(ide_drive_t *, void *, u32); | 1653 | typedef void (xfer_func_t)(ide_drive_t *, void *, u32); |
| 1679 | 1654 | ||
| 1680 | /* | 1655 | /* |
| @@ -1810,9 +1785,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
| 1810 | return ide_started; | 1785 | return ide_started; |
| 1811 | 1786 | ||
| 1812 | end_request: | 1787 | end_request: |
| 1813 | if (!rq->data_len) | ||
| 1814 | post_transform_command(rq); | ||
| 1815 | |||
| 1816 | spin_lock_irqsave(&ide_lock, flags); | 1788 | spin_lock_irqsave(&ide_lock, flags); |
| 1817 | blkdev_dequeue_request(rq); | 1789 | blkdev_dequeue_request(rq); |
| 1818 | end_that_request_last(rq, 1); | 1790 | end_that_request_last(rq, 1); |
| @@ -3049,12 +3021,7 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) | |||
| 3049 | else | 3021 | else |
| 3050 | printk(" drive"); | 3022 | printk(" drive"); |
| 3051 | 3023 | ||
| 3052 | printk(", %dkB Cache", be16_to_cpu(cap.buffer_size)); | 3024 | printk(KERN_CONT ", %dkB Cache\n", be16_to_cpu(cap.buffer_size)); |
| 3053 | |||
| 3054 | if (drive->using_dma) | ||
| 3055 | ide_dma_verbose(drive); | ||
| 3056 | |||
| 3057 | printk("\n"); | ||
| 3058 | 3025 | ||
| 3059 | return nslots; | 3026 | return nslots; |
| 3060 | } | 3027 | } |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 00123d99527a..b1781908e1f2 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
| @@ -13,32 +13,6 @@ | |||
| 13 | * and Andre Hedrick <andre@linux-ide.org> | 13 | * and Andre Hedrick <andre@linux-ide.org> |
| 14 | * | 14 | * |
| 15 | * This is the IDE/ATA disk driver, as evolved from hd.c and ide.c. | 15 | * This is the IDE/ATA disk driver, as evolved from hd.c and ide.c. |
| 16 | * | ||
| 17 | * Version 1.00 move disk only code from ide.c to ide-disk.c | ||
| 18 | * support optional byte-swapping of all data | ||
| 19 | * Version 1.01 fix previous byte-swapping code | ||
| 20 | * Version 1.02 remove ", LBA" from drive identification msgs | ||
| 21 | * Version 1.03 fix display of id->buf_size for big-endian | ||
| 22 | * Version 1.04 add /proc configurable settings and S.M.A.R.T support | ||
| 23 | * Version 1.05 add capacity support for ATA3 >= 8GB | ||
| 24 | * Version 1.06 get boot-up messages to show full cyl count | ||
| 25 | * Version 1.07 disable door-locking if it fails | ||
| 26 | * Version 1.08 fixed CHS/LBA translations for ATA4 > 8GB, | ||
| 27 | * process of adding new ATA4 compliance. | ||
| 28 | * fixed problems in allowing fdisk to see | ||
| 29 | * the entire disk. | ||
| 30 | * Version 1.09 added increment of rq->sector in ide_multwrite | ||
| 31 | * added UDMA 3/4 reporting | ||
| 32 | * Version 1.10 request queue changes, Ultra DMA 100 | ||
| 33 | * Version 1.11 added 48-bit lba | ||
| 34 | * Version 1.12 adding taskfile io access method | ||
| 35 | * Version 1.13 added standby and flush-cache for notifier | ||
| 36 | * Version 1.14 added acoustic-wcache | ||
| 37 | * Version 1.15 convert all calls to ide_raw_taskfile | ||
| 38 | * since args will return register content. | ||
| 39 | * Version 1.16 added suspend-resume-checkpower | ||
| 40 | * Version 1.17 do flush on standby, do flush on ATA < ATA6 | ||
| 41 | * fix wcache setup. | ||
| 42 | */ | 16 | */ |
| 43 | 17 | ||
| 44 | #define IDEDISK_VERSION "1.18" | 18 | #define IDEDISK_VERSION "1.18" |
| @@ -961,11 +935,8 @@ static void idedisk_setup (ide_drive_t *drive) | |||
| 961 | if (id->buf_size) | 935 | if (id->buf_size) |
| 962 | printk (" w/%dKiB Cache", id->buf_size/2); | 936 | printk (" w/%dKiB Cache", id->buf_size/2); |
| 963 | 937 | ||
| 964 | printk(", CHS=%d/%d/%d", | 938 | printk(KERN_CONT ", CHS=%d/%d/%d\n", |
| 965 | drive->bios_cyl, drive->bios_head, drive->bios_sect); | 939 | drive->bios_cyl, drive->bios_head, drive->bios_sect); |
| 966 | if (drive->using_dma) | ||
| 967 | ide_dma_verbose(drive); | ||
| 968 | printk("\n"); | ||
| 969 | 940 | ||
| 970 | /* write cache enabled? */ | 941 | /* write cache enabled? */ |
| 971 | if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5))) | 942 | if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5))) |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 0d795a1678c7..4703837bf1fc 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
| @@ -611,12 +611,6 @@ static int __ide_dma_test_irq(ide_drive_t *drive) | |||
| 611 | ide_hwif_t *hwif = HWIF(drive); | 611 | ide_hwif_t *hwif = HWIF(drive); |
| 612 | u8 dma_stat = hwif->INB(hwif->dma_status); | 612 | u8 dma_stat = hwif->INB(hwif->dma_status); |
| 613 | 613 | ||
| 614 | #if 0 /* do not set unless you know what you are doing */ | ||
| 615 | if (dma_stat & 4) { | ||
| 616 | u8 stat = hwif->INB(IDE_STATUS_REG); | ||
| 617 | hwif->OUTB(hwif->dma_status, dma_stat & 0xE4); | ||
| 618 | } | ||
| 619 | #endif | ||
| 620 | /* return 1 if INTR asserted */ | 614 | /* return 1 if INTR asserted */ |
| 621 | if ((dma_stat & 4) == 4) | 615 | if ((dma_stat & 4) == 4) |
| 622 | return 1; | 616 | return 1; |
| @@ -753,10 +747,12 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) | |||
| 753 | mode = XFER_MW_DMA_1; | 747 | mode = XFER_MW_DMA_1; |
| 754 | } | 748 | } |
| 755 | 749 | ||
| 756 | printk(KERN_DEBUG "%s: %s mode selected\n", drive->name, | 750 | mode = min(mode, req_mode); |
| 751 | |||
| 752 | printk(KERN_INFO "%s: %s mode selected\n", drive->name, | ||
| 757 | mode ? ide_xfer_verbose(mode) : "no DMA"); | 753 | mode ? ide_xfer_verbose(mode) : "no DMA"); |
| 758 | 754 | ||
| 759 | return min(mode, req_mode); | 755 | return mode; |
| 760 | } | 756 | } |
| 761 | 757 | ||
| 762 | EXPORT_SYMBOL_GPL(ide_find_dma_mode); | 758 | EXPORT_SYMBOL_GPL(ide_find_dma_mode); |
| @@ -772,6 +768,9 @@ static int ide_tune_dma(ide_drive_t *drive) | |||
| 772 | if (__ide_dma_bad_drive(drive)) | 768 | if (__ide_dma_bad_drive(drive)) |
| 773 | return 0; | 769 | return 0; |
| 774 | 770 | ||
| 771 | if (ide_id_dma_bug(drive)) | ||
| 772 | return 0; | ||
| 773 | |||
| 775 | if (drive->hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) | 774 | if (drive->hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) |
| 776 | return config_drive_for_dma(drive); | 775 | return config_drive_for_dma(drive); |
| 777 | 776 | ||
| @@ -806,58 +805,23 @@ static int ide_dma_check(ide_drive_t *drive) | |||
| 806 | return vdma ? 0 : -1; | 805 | return vdma ? 0 : -1; |
| 807 | } | 806 | } |
| 808 | 807 | ||
| 809 | void ide_dma_verbose(ide_drive_t *drive) | 808 | int ide_id_dma_bug(ide_drive_t *drive) |
| 810 | { | 809 | { |
| 811 | struct hd_driveid *id = drive->id; | 810 | struct hd_driveid *id = drive->id; |
| 812 | ide_hwif_t *hwif = HWIF(drive); | ||
| 813 | 811 | ||
| 814 | if (id->field_valid & 4) { | 812 | if (id->field_valid & 4) { |
| 815 | if ((id->dma_ultra >> 8) && (id->dma_mword >> 8)) | 813 | if ((id->dma_ultra >> 8) && (id->dma_mword >> 8)) |
| 816 | goto bug_dma_off; | 814 | goto err_out; |
| 817 | if (id->dma_ultra & ((id->dma_ultra >> 8) & hwif->ultra_mask)) { | ||
| 818 | if (((id->dma_ultra >> 11) & 0x1F) && | ||
| 819 | eighty_ninty_three(drive)) { | ||
| 820 | if ((id->dma_ultra >> 15) & 1) { | ||
| 821 | printk(", UDMA(mode 7)"); | ||
| 822 | } else if ((id->dma_ultra >> 14) & 1) { | ||
| 823 | printk(", UDMA(133)"); | ||
| 824 | } else if ((id->dma_ultra >> 13) & 1) { | ||
| 825 | printk(", UDMA(100)"); | ||
| 826 | } else if ((id->dma_ultra >> 12) & 1) { | ||
| 827 | printk(", UDMA(66)"); | ||
| 828 | } else if ((id->dma_ultra >> 11) & 1) { | ||
| 829 | printk(", UDMA(44)"); | ||
| 830 | } else | ||
| 831 | goto mode_two; | ||
| 832 | } else { | ||
| 833 | mode_two: | ||
| 834 | if ((id->dma_ultra >> 10) & 1) { | ||
| 835 | printk(", UDMA(33)"); | ||
| 836 | } else if ((id->dma_ultra >> 9) & 1) { | ||
| 837 | printk(", UDMA(25)"); | ||
| 838 | } else if ((id->dma_ultra >> 8) & 1) { | ||
| 839 | printk(", UDMA(16)"); | ||
| 840 | } | ||
| 841 | } | ||
| 842 | } else { | ||
| 843 | printk(", (U)DMA"); /* Can be BIOS-enabled! */ | ||
| 844 | } | ||
| 845 | } else if (id->field_valid & 2) { | 815 | } else if (id->field_valid & 2) { |
| 846 | if ((id->dma_mword >> 8) && (id->dma_1word >> 8)) | 816 | if ((id->dma_mword >> 8) && (id->dma_1word >> 8)) |
| 847 | goto bug_dma_off; | 817 | goto err_out; |
| 848 | printk(", DMA"); | ||
| 849 | } else if (id->field_valid & 1) { | ||
| 850 | goto bug_dma_off; | ||
| 851 | } | 818 | } |
| 852 | return; | 819 | return 0; |
| 853 | bug_dma_off: | 820 | err_out: |
| 854 | printk(", BUG DMA OFF"); | 821 | printk(KERN_ERR "%s: bad DMA info in identify block\n", drive->name); |
| 855 | hwif->dma_off_quietly(drive); | 822 | return 1; |
| 856 | return; | ||
| 857 | } | 823 | } |
| 858 | 824 | ||
| 859 | EXPORT_SYMBOL(ide_dma_verbose); | ||
| 860 | |||
| 861 | int ide_set_dma(ide_drive_t *drive) | 825 | int ide_set_dma(ide_drive_t *drive) |
| 862 | { | 826 | { |
| 863 | ide_hwif_t *hwif = drive->hwif; | 827 | ide_hwif_t *hwif = drive->hwif; |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index db22d1ff4e55..bef781fec500 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
| @@ -970,7 +970,8 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq) | |||
| 970 | if (rc) | 970 | if (rc) |
| 971 | printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); | 971 | printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); |
| 972 | SELECT_DRIVE(drive); | 972 | SELECT_DRIVE(drive); |
| 973 | HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]); | 973 | if (IDE_CONTROL_REG) |
| 974 | HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); | ||
| 974 | rc = ide_wait_not_busy(HWIF(drive), 100000); | 975 | rc = ide_wait_not_busy(HWIF(drive), 100000); |
| 975 | if (rc) | 976 | if (rc) |
| 976 | printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); | 977 | printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 5c3256180ae5..cef405ddaf0e 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
| @@ -748,6 +748,9 @@ int ide_driveid_update(ide_drive_t *drive) | |||
| 748 | drive->id->dma_1word = id->dma_1word; | 748 | drive->id->dma_1word = id->dma_1word; |
| 749 | /* anything more ? */ | 749 | /* anything more ? */ |
| 750 | kfree(id); | 750 | kfree(id); |
| 751 | |||
| 752 | if (drive->using_dma && ide_id_dma_bug(drive)) | ||
| 753 | ide_dma_off(drive); | ||
| 751 | } | 754 | } |
| 752 | 755 | ||
| 753 | return 1; | 756 | return 1; |
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 1609b8604f56..062d3bcb2471 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
| @@ -29,41 +29,44 @@ | |||
| 29 | * Add common non I/O op stuff here. Make sure it has proper | 29 | * Add common non I/O op stuff here. Make sure it has proper |
| 30 | * kernel-doc function headers or your patch will be rejected | 30 | * kernel-doc function headers or your patch will be rejected |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | static const char *udma_str[] = | ||
| 34 | { "UDMA/16", "UDMA/25", "UDMA/33", "UDMA/44", | ||
| 35 | "UDMA/66", "UDMA/100", "UDMA/133", "UDMA7" }; | ||
| 36 | static const char *mwdma_str[] = | ||
| 37 | { "MWDMA0", "MWDMA1", "MWDMA2" }; | ||
| 38 | static const char *swdma_str[] = | ||
| 39 | { "SWDMA0", "SWDMA1", "SWDMA2" }; | ||
| 40 | static const char *pio_str[] = | ||
| 41 | { "PIO0", "PIO1", "PIO2", "PIO3", "PIO4", "PIO5" }; | ||
| 33 | 42 | ||
| 34 | /** | 43 | /** |
| 35 | * ide_xfer_verbose - return IDE mode names | 44 | * ide_xfer_verbose - return IDE mode names |
| 36 | * @xfer_rate: rate to name | 45 | * @mode: transfer mode |
| 37 | * | 46 | * |
| 38 | * Returns a constant string giving the name of the mode | 47 | * Returns a constant string giving the name of the mode |
| 39 | * requested. | 48 | * requested. |
| 40 | */ | 49 | */ |
| 41 | 50 | ||
| 42 | char *ide_xfer_verbose (u8 xfer_rate) | 51 | const char *ide_xfer_verbose(u8 mode) |
| 43 | { | 52 | { |
| 44 | switch(xfer_rate) { | 53 | const char *s; |
| 45 | case XFER_UDMA_7: return("UDMA 7"); | 54 | u8 i = mode & 0xf; |
| 46 | case XFER_UDMA_6: return("UDMA 6"); | 55 | |
| 47 | case XFER_UDMA_5: return("UDMA 5"); | 56 | if (mode >= XFER_UDMA_0 && mode <= XFER_UDMA_7) |
| 48 | case XFER_UDMA_4: return("UDMA 4"); | 57 | s = udma_str[i]; |
| 49 | case XFER_UDMA_3: return("UDMA 3"); | 58 | else if (mode >= XFER_MW_DMA_0 && mode <= XFER_MW_DMA_2) |
| 50 | case XFER_UDMA_2: return("UDMA 2"); | 59 | s = mwdma_str[i]; |
| 51 | case XFER_UDMA_1: return("UDMA 1"); | 60 | else if (mode >= XFER_SW_DMA_0 && mode <= XFER_SW_DMA_2) |
| 52 | case XFER_UDMA_0: return("UDMA 0"); | 61 | s = swdma_str[i]; |
| 53 | case XFER_MW_DMA_2: return("MW DMA 2"); | 62 | else if (mode >= XFER_PIO_0 && mode <= XFER_PIO_5) |
| 54 | case XFER_MW_DMA_1: return("MW DMA 1"); | 63 | s = pio_str[i & 0x7]; |
| 55 | case XFER_MW_DMA_0: return("MW DMA 0"); | 64 | else if (mode == XFER_PIO_SLOW) |
| 56 | case XFER_SW_DMA_2: return("SW DMA 2"); | 65 | s = "PIO SLOW"; |
| 57 | case XFER_SW_DMA_1: return("SW DMA 1"); | 66 | else |
| 58 | case XFER_SW_DMA_0: return("SW DMA 0"); | 67 | s = "XFER ERROR"; |
| 59 | case XFER_PIO_4: return("PIO 4"); | 68 | |
| 60 | case XFER_PIO_3: return("PIO 3"); | 69 | return s; |
| 61 | case XFER_PIO_2: return("PIO 2"); | ||
| 62 | case XFER_PIO_1: return("PIO 1"); | ||
| 63 | case XFER_PIO_0: return("PIO 0"); | ||
| 64 | case XFER_PIO_SLOW: return("PIO SLOW"); | ||
| 65 | default: return("XFER ERROR"); | ||
| 66 | } | ||
| 67 | } | 70 | } |
| 68 | 71 | ||
| 69 | EXPORT_SYMBOL(ide_xfer_verbose); | 72 | EXPORT_SYMBOL(ide_xfer_verbose); |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index ee848c705995..2994523be7bf 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
| @@ -13,22 +13,8 @@ | |||
| 13 | * | 13 | * |
| 14 | * This is the IDE probe module, as evolved from hd.c and ide.c. | 14 | * This is the IDE probe module, as evolved from hd.c and ide.c. |
| 15 | * | 15 | * |
| 16 | * Version 1.00 move drive probing code from ide.c to ide-probe.c | 16 | * -- increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot |
| 17 | * Version 1.01 fix compilation problem for m68k | 17 | * by Andrea Arcangeli |
| 18 | * Version 1.02 increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot | ||
| 19 | * by Andrea Arcangeli | ||
| 20 | * Version 1.03 fix for (hwif->chipset == ide_4drives) | ||
| 21 | * Version 1.04 fixed buggy treatments of known flash memory cards | ||
| 22 | * | ||
| 23 | * Version 1.05 fix for (hwif->chipset == ide_pdc4030) | ||
| 24 | * added ide6/7/8/9 | ||
| 25 | * allowed for secondary flash card to be detectable | ||
| 26 | * with new flag : drive->ata_flash : 1; | ||
| 27 | * Version 1.06 stream line request queue and prep for cascade project. | ||
| 28 | * Version 1.07 max_sect <= 255; slower disks would get behind and | ||
| 29 | * then fall over when they get to 256. Paul G. | ||
| 30 | * Version 1.10 Update set for new IDE. drive->id is now always | ||
| 31 | * valid after probe time even with noprobe | ||
| 32 | */ | 18 | */ |
| 33 | 19 | ||
| 34 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| @@ -667,7 +653,8 @@ static int wait_hwif_ready(ide_hwif_t *hwif) | |||
| 667 | /* Ignore disks that we will not probe for later. */ | 653 | /* Ignore disks that we will not probe for later. */ |
| 668 | if (!drive->noprobe || drive->present) { | 654 | if (!drive->noprobe || drive->present) { |
| 669 | SELECT_DRIVE(drive); | 655 | SELECT_DRIVE(drive); |
| 670 | hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]); | 656 | if (IDE_CONTROL_REG) |
| 657 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); | ||
| 671 | mdelay(2); | 658 | mdelay(2); |
| 672 | rc = ide_wait_not_busy(hwif, 35000); | 659 | rc = ide_wait_not_busy(hwif, 35000); |
| 673 | if (rc) | 660 | if (rc) |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 674a65c1a130..54943da6e4e5 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
| @@ -800,11 +800,17 @@ int set_io_32bit(ide_drive_t *drive, int arg) | |||
| 800 | if (arg < 0 || arg > 1 + (SUPPORT_VLB_SYNC << 1)) | 800 | if (arg < 0 || arg > 1 + (SUPPORT_VLB_SYNC << 1)) |
| 801 | return -EINVAL; | 801 | return -EINVAL; |
| 802 | 802 | ||
| 803 | if (ide_spin_wait_hwgroup(drive)) | ||
| 804 | return -EBUSY; | ||
| 805 | |||
| 803 | drive->io_32bit = arg; | 806 | drive->io_32bit = arg; |
| 804 | #ifdef CONFIG_BLK_DEV_DTC2278 | 807 | #ifdef CONFIG_BLK_DEV_DTC2278 |
| 805 | if (HWIF(drive)->chipset == ide_dtc2278) | 808 | if (HWIF(drive)->chipset == ide_dtc2278) |
| 806 | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; | 809 | HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg; |
| 807 | #endif /* CONFIG_BLK_DEV_DTC2278 */ | 810 | #endif /* CONFIG_BLK_DEV_DTC2278 */ |
| 811 | |||
| 812 | spin_unlock_irq(&ide_lock); | ||
| 813 | |||
| 808 | return 0; | 814 | return 0; |
| 809 | } | 815 | } |
| 810 | 816 | ||
| @@ -1670,10 +1676,34 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
| 1670 | return sprintf(buf, "ide:m-%s\n", media_string(drive)); | 1676 | return sprintf(buf, "ide:m-%s\n", media_string(drive)); |
| 1671 | } | 1677 | } |
| 1672 | 1678 | ||
| 1679 | static ssize_t model_show(struct device *dev, struct device_attribute *attr, | ||
| 1680 | char *buf) | ||
| 1681 | { | ||
| 1682 | ide_drive_t *drive = to_ide_device(dev); | ||
| 1683 | return sprintf(buf, "%s\n", drive->id->model); | ||
| 1684 | } | ||
| 1685 | |||
| 1686 | static ssize_t firmware_show(struct device *dev, struct device_attribute *attr, | ||
| 1687 | char *buf) | ||
| 1688 | { | ||
| 1689 | ide_drive_t *drive = to_ide_device(dev); | ||
| 1690 | return sprintf(buf, "%s\n", drive->id->fw_rev); | ||
| 1691 | } | ||
| 1692 | |||
| 1693 | static ssize_t serial_show(struct device *dev, struct device_attribute *attr, | ||
| 1694 | char *buf) | ||
| 1695 | { | ||
| 1696 | ide_drive_t *drive = to_ide_device(dev); | ||
| 1697 | return sprintf(buf, "%s\n", drive->id->serial_no); | ||
| 1698 | } | ||
| 1699 | |||
| 1673 | static struct device_attribute ide_dev_attrs[] = { | 1700 | static struct device_attribute ide_dev_attrs[] = { |
| 1674 | __ATTR_RO(media), | 1701 | __ATTR_RO(media), |
| 1675 | __ATTR_RO(drivename), | 1702 | __ATTR_RO(drivename), |
| 1676 | __ATTR_RO(modalias), | 1703 | __ATTR_RO(modalias), |
| 1704 | __ATTR_RO(model), | ||
| 1705 | __ATTR_RO(firmware), | ||
| 1706 | __ATTR(serial, 0400, serial_show, NULL), | ||
| 1677 | __ATTR_NULL | 1707 | __ATTR_NULL |
| 1678 | }; | 1708 | }; |
| 1679 | 1709 | ||
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 5682895d36d9..9fce25bdec8a 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/drivers/ide/pci/hpt366.c Version 1.21 Oct 23, 2007 | 2 | * linux/drivers/ide/pci/hpt366.c Version 1.22 Dec 4, 2007 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> |
| 5 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. | 5 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. |
| @@ -310,6 +310,8 @@ static u32 twenty_five_base_hpt36x[] = { | |||
| 310 | /* XFER_PIO_0 */ 0xc0d08585 | 310 | /* XFER_PIO_0 */ 0xc0d08585 |
| 311 | }; | 311 | }; |
| 312 | 312 | ||
| 313 | #if 0 | ||
| 314 | /* These are the timing tables from the HighPoint open source drivers... */ | ||
| 313 | static u32 thirty_three_base_hpt37x[] = { | 315 | static u32 thirty_three_base_hpt37x[] = { |
| 314 | /* XFER_UDMA_6 */ 0x12446231, /* 0x12646231 ?? */ | 316 | /* XFER_UDMA_6 */ 0x12446231, /* 0x12646231 ?? */ |
| 315 | /* XFER_UDMA_5 */ 0x12446231, | 317 | /* XFER_UDMA_5 */ 0x12446231, |
| @@ -369,6 +371,73 @@ static u32 sixty_six_base_hpt37x[] = { | |||
| 369 | /* XFER_PIO_1 */ 0x0d029d26, | 371 | /* XFER_PIO_1 */ 0x0d029d26, |
| 370 | /* XFER_PIO_0 */ 0x0d029d5e | 372 | /* XFER_PIO_0 */ 0x0d029d5e |
| 371 | }; | 373 | }; |
| 374 | #else | ||
| 375 | /* | ||
| 376 | * The following are the new timing tables with PIO mode data/taskfile transfer | ||
| 377 | * overclocking fixed... | ||
| 378 | */ | ||
| 379 | |||
| 380 | /* This table is taken from the HPT370 data manual rev. 1.02 */ | ||
| 381 | static u32 thirty_three_base_hpt37x[] = { | ||
| 382 | /* XFER_UDMA_6 */ 0x16455031, /* 0x16655031 ?? */ | ||
| 383 | /* XFER_UDMA_5 */ 0x16455031, | ||
| 384 | /* XFER_UDMA_4 */ 0x16455031, | ||
| 385 | /* XFER_UDMA_3 */ 0x166d5031, | ||
| 386 | /* XFER_UDMA_2 */ 0x16495031, | ||
| 387 | /* XFER_UDMA_1 */ 0x164d5033, | ||
| 388 | /* XFER_UDMA_0 */ 0x16515097, | ||
| 389 | |||
| 390 | /* XFER_MW_DMA_2 */ 0x26515031, | ||
| 391 | /* XFER_MW_DMA_1 */ 0x26515033, | ||
| 392 | /* XFER_MW_DMA_0 */ 0x26515097, | ||
| 393 | |||
| 394 | /* XFER_PIO_4 */ 0x06515021, | ||
| 395 | /* XFER_PIO_3 */ 0x06515022, | ||
| 396 | /* XFER_PIO_2 */ 0x06515033, | ||
| 397 | /* XFER_PIO_1 */ 0x06915065, | ||
| 398 | /* XFER_PIO_0 */ 0x06d1508a | ||
| 399 | }; | ||
| 400 | |||
| 401 | static u32 fifty_base_hpt37x[] = { | ||
| 402 | /* XFER_UDMA_6 */ 0x1a861842, | ||
| 403 | /* XFER_UDMA_5 */ 0x1a861842, | ||
| 404 | /* XFER_UDMA_4 */ 0x1aae1842, | ||
| 405 | /* XFER_UDMA_3 */ 0x1a8e1842, | ||
| 406 | /* XFER_UDMA_2 */ 0x1a0e1842, | ||
| 407 | /* XFER_UDMA_1 */ 0x1a161854, | ||
| 408 | /* XFER_UDMA_0 */ 0x1a1a18ea, | ||
| 409 | |||
| 410 | /* XFER_MW_DMA_2 */ 0x2a821842, | ||
| 411 | /* XFER_MW_DMA_1 */ 0x2a821854, | ||
| 412 | /* XFER_MW_DMA_0 */ 0x2a8218ea, | ||
| 413 | |||
| 414 | /* XFER_PIO_4 */ 0x0a821842, | ||
| 415 | /* XFER_PIO_3 */ 0x0a821843, | ||
| 416 | /* XFER_PIO_2 */ 0x0a821855, | ||
| 417 | /* XFER_PIO_1 */ 0x0ac218a8, | ||
| 418 | /* XFER_PIO_0 */ 0x0b02190c | ||
| 419 | }; | ||
| 420 | |||
| 421 | static u32 sixty_six_base_hpt37x[] = { | ||
| 422 | /* XFER_UDMA_6 */ 0x1c86fe62, | ||
| 423 | /* XFER_UDMA_5 */ 0x1caefe62, /* 0x1c8afe62 */ | ||
| 424 | /* XFER_UDMA_4 */ 0x1c8afe62, | ||
| 425 | /* XFER_UDMA_3 */ 0x1c8efe62, | ||
| 426 | /* XFER_UDMA_2 */ 0x1c92fe62, | ||
| 427 | /* XFER_UDMA_1 */ 0x1c9afe62, | ||
| 428 | /* XFER_UDMA_0 */ 0x1c82fe62, | ||
| 429 | |||
| 430 | /* XFER_MW_DMA_2 */ 0x2c82fe62, | ||
| 431 | /* XFER_MW_DMA_1 */ 0x2c82fe66, | ||
| 432 | /* XFER_MW_DMA_0 */ 0x2c82ff2e, | ||
| 433 | |||
| 434 | /* XFER_PIO_4 */ 0x0c82fe62, | ||
| 435 | /* XFER_PIO_3 */ 0x0c82fe84, | ||
| 436 | /* XFER_PIO_2 */ 0x0c82fea6, | ||
| 437 | /* XFER_PIO_1 */ 0x0d02ff26, | ||
| 438 | /* XFER_PIO_0 */ 0x0d42ff7f | ||
| 439 | }; | ||
| 440 | #endif | ||
| 372 | 441 | ||
| 373 | #define HPT366_DEBUG_DRIVE_INFO 0 | 442 | #define HPT366_DEBUG_DRIVE_INFO 0 |
| 374 | #define HPT371_ALLOW_ATA133_6 1 | 443 | #define HPT371_ALLOW_ATA133_6 1 |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 4234efeba606..2b4f44e45a1a 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
| @@ -482,8 +482,9 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev) | |||
| 482 | { | 482 | { |
| 483 | struct pci_dev *dev2; | 483 | struct pci_dev *dev2; |
| 484 | 484 | ||
| 485 | dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 2, | 485 | dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1, |
| 486 | PCI_FUNC(dev->devfn))); | 486 | PCI_FUNC(dev->devfn))); |
| 487 | |||
| 487 | if (dev2 && | 488 | if (dev2 && |
| 488 | dev2->vendor == dev->vendor && | 489 | dev2->vendor == dev->vendor && |
| 489 | dev2->device == dev->device) { | 490 | dev2->device == dev->device) { |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 25fd09053220..d2cd5a3d38f8 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
| @@ -704,7 +704,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_devices); | |||
| 704 | /* | 704 | /* |
| 705 | * Module interfaces | 705 | * Module interfaces |
| 706 | */ | 706 | */ |
| 707 | 707 | ||
| 708 | static int pre_init = 1; /* Before first ordered IDE scan */ | 708 | static int pre_init = 1; /* Before first ordered IDE scan */ |
| 709 | static LIST_HEAD(ide_pci_drivers); | 709 | static LIST_HEAD(ide_pci_drivers); |
| 710 | 710 | ||
| @@ -714,7 +714,7 @@ static LIST_HEAD(ide_pci_drivers); | |||
| 714 | * @module: owner module of the driver | 714 | * @module: owner module of the driver |
| 715 | * | 715 | * |
| 716 | * Registers a driver with the IDE layer. The IDE layer arranges that | 716 | * Registers a driver with the IDE layer. The IDE layer arranges that |
| 717 | * boot time setup is done in the expected device order and then | 717 | * boot time setup is done in the expected device order and then |
| 718 | * hands the controllers off to the core PCI code to do the rest of | 718 | * hands the controllers off to the core PCI code to do the rest of |
| 719 | * the work. | 719 | * the work. |
| 720 | * | 720 | * |
| @@ -724,13 +724,12 @@ static LIST_HEAD(ide_pci_drivers); | |||
| 724 | int __ide_pci_register_driver(struct pci_driver *driver, struct module *module, | 724 | int __ide_pci_register_driver(struct pci_driver *driver, struct module *module, |
| 725 | const char *mod_name) | 725 | const char *mod_name) |
| 726 | { | 726 | { |
| 727 | if(!pre_init) | 727 | if (!pre_init) |
| 728 | return __pci_register_driver(driver, module, mod_name); | 728 | return __pci_register_driver(driver, module, mod_name); |
| 729 | driver->driver.owner = module; | 729 | driver->driver.owner = module; |
| 730 | list_add_tail(&driver->node, &ide_pci_drivers); | 730 | list_add_tail(&driver->node, &ide_pci_drivers); |
| 731 | return 0; | 731 | return 0; |
| 732 | } | 732 | } |
| 733 | |||
| 734 | EXPORT_SYMBOL_GPL(__ide_pci_register_driver); | 733 | EXPORT_SYMBOL_GPL(__ide_pci_register_driver); |
| 735 | 734 | ||
| 736 | /** | 735 | /** |
| @@ -741,17 +740,18 @@ EXPORT_SYMBOL_GPL(__ide_pci_register_driver); | |||
| 741 | * This is only used during boot up to get the ordering correct. After | 740 | * This is only used during boot up to get the ordering correct. After |
| 742 | * boot up the pci layer takes over the job. | 741 | * boot up the pci layer takes over the job. |
| 743 | */ | 742 | */ |
| 744 | 743 | ||
| 745 | static int __init ide_scan_pcidev(struct pci_dev *dev) | 744 | static int __init ide_scan_pcidev(struct pci_dev *dev) |
| 746 | { | 745 | { |
| 747 | struct list_head *l; | 746 | struct list_head *l; |
| 748 | struct pci_driver *d; | 747 | struct pci_driver *d; |
| 749 | 748 | ||
| 750 | list_for_each(l, &ide_pci_drivers) { | 749 | list_for_each(l, &ide_pci_drivers) { |
| 751 | d = list_entry(l, struct pci_driver, node); | 750 | d = list_entry(l, struct pci_driver, node); |
| 752 | if (d->id_table) { | 751 | if (d->id_table) { |
| 753 | const struct pci_device_id *id = pci_match_id(d->id_table, | 752 | const struct pci_device_id *id = |
| 754 | dev); | 753 | pci_match_id(d->id_table, dev); |
| 754 | |||
| 755 | if (id != NULL && d->probe(dev, id) >= 0) { | 755 | if (id != NULL && d->probe(dev, id) >= 0) { |
| 756 | dev->driver = d; | 756 | dev->driver = d; |
| 757 | pci_dev_get(dev); | 757 | pci_dev_get(dev); |
| @@ -779,13 +779,13 @@ void __init ide_scan_pcibus (int scan_direction) | |||
| 779 | 779 | ||
| 780 | pre_init = 0; | 780 | pre_init = 0; |
| 781 | if (!scan_direction) | 781 | if (!scan_direction) |
| 782 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) | 782 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev))) |
| 783 | ide_scan_pcidev(dev); | 783 | ide_scan_pcidev(dev); |
| 784 | else | 784 | else |
| 785 | while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev)) | 785 | while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, |
| 786 | != NULL) | 786 | dev))) |
| 787 | ide_scan_pcidev(dev); | 787 | ide_scan_pcidev(dev); |
| 788 | 788 | ||
| 789 | /* | 789 | /* |
| 790 | * Hand the drivers over to the PCI layer now we | 790 | * Hand the drivers over to the PCI layer now we |
| 791 | * are post init. | 791 | * are post init. |
| @@ -794,9 +794,10 @@ void __init ide_scan_pcibus (int scan_direction) | |||
| 794 | list_for_each_safe(l, n, &ide_pci_drivers) { | 794 | list_for_each_safe(l, n, &ide_pci_drivers) { |
| 795 | list_del(l); | 795 | list_del(l); |
| 796 | d = list_entry(l, struct pci_driver, node); | 796 | d = list_entry(l, struct pci_driver, node); |
| 797 | if (__pci_register_driver(d, d->driver.owner, d->driver.mod_name)) | 797 | if (__pci_register_driver(d, d->driver.owner, |
| 798 | printk(KERN_ERR "%s: failed to register driver for %s\n", | 798 | d->driver.mod_name)) |
| 799 | __FUNCTION__, d->driver.mod_name); | 799 | printk(KERN_ERR "%s: failed to register %s driver\n", |
| 800 | __FUNCTION__, d->driver.mod_name); | ||
| 800 | } | 801 | } |
| 801 | } | 802 | } |
| 802 | #endif | 803 | #endif |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index c2f8a78c894c..2f75d695eed7 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
| @@ -276,7 +276,8 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) | |||
| 276 | sz = pci_size(l, sz, (u32)PCI_ROM_ADDRESS_MASK); | 276 | sz = pci_size(l, sz, (u32)PCI_ROM_ADDRESS_MASK); |
| 277 | if (sz) { | 277 | if (sz) { |
| 278 | res->flags = (l & IORESOURCE_ROM_ENABLE) | | 278 | res->flags = (l & IORESOURCE_ROM_ENABLE) | |
| 279 | IORESOURCE_MEM | IORESOURCE_READONLY; | 279 | IORESOURCE_MEM | IORESOURCE_PREFETCH | |
| 280 | IORESOURCE_READONLY | IORESOURCE_CACHEABLE; | ||
| 280 | res->start = l & PCI_ROM_ADDRESS_MASK; | 281 | res->start = l & PCI_ROM_ADDRESS_MASK; |
| 281 | res->end = res->start + (unsigned long) sz; | 282 | res->end = res->start + (unsigned long) sz; |
| 282 | } | 283 | } |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 7a835a35f21d..9706de9d98d5 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
| @@ -242,6 +242,11 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign | |||
| 242 | } | 242 | } |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | static void ide_scsi_hex_dump(u8 *data, int len) | ||
| 246 | { | ||
| 247 | print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, data, len, 0); | ||
| 248 | } | ||
| 249 | |||
| 245 | static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_command) | 250 | static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_command) |
| 246 | { | 251 | { |
| 247 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); | 252 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); |
| @@ -272,8 +277,7 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co | |||
| 272 | pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd; | 277 | pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd; |
| 273 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { | 278 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { |
| 274 | printk ("ide-scsi: %s: queue cmd = ", drive->name); | 279 | printk ("ide-scsi: %s: queue cmd = ", drive->name); |
| 275 | print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, pc->c, | 280 | ide_scsi_hex_dump(pc->c, 6); |
| 276 | 6, 0); | ||
| 277 | } | 281 | } |
| 278 | rq->rq_disk = scsi->disk; | 282 | rq->rq_disk = scsi->disk; |
| 279 | return ide_do_drive_cmd(drive, rq, ide_preempt); | 283 | return ide_do_drive_cmd(drive, rq, ide_preempt); |
| @@ -328,8 +332,7 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs) | |||
| 328 | idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer; | 332 | idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer; |
| 329 | if (log) { | 333 | if (log) { |
| 330 | printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number); | 334 | printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number); |
| 331 | print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, | 335 | ide_scsi_hex_dump(pc->buffer, 16); |
| 332 | pc->buffer, 16, 0); | ||
| 333 | } | 336 | } |
| 334 | memcpy((void *) opc->scsi_cmd->sense_buffer, pc->buffer, SCSI_SENSE_BUFFERSIZE); | 337 | memcpy((void *) opc->scsi_cmd->sense_buffer, pc->buffer, SCSI_SENSE_BUFFERSIZE); |
| 335 | kfree(pc->buffer); | 338 | kfree(pc->buffer); |
| @@ -808,12 +811,10 @@ static int idescsi_queue (struct scsi_cmnd *cmd, | |||
| 808 | 811 | ||
| 809 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { | 812 | if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { |
| 810 | printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number); | 813 | printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number); |
| 811 | print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, | 814 | ide_scsi_hex_dump(cmd->cmnd, cmd->cmd_len); |
| 812 | cmd->cmnd, cmd->cmd_len, 0); | ||
| 813 | if (memcmp(pc->c, cmd->cmnd, cmd->cmd_len)) { | 815 | if (memcmp(pc->c, cmd->cmnd, cmd->cmd_len)) { |
| 814 | printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number); | 816 | printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number); |
| 815 | print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, | 817 | ide_scsi_hex_dump(pc->c, 12); |
| 816 | pc->c, 12, 0); | ||
| 817 | } | 818 | } |
| 818 | } | 819 | } |
| 819 | 820 | ||
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 5cf6d5f9acbd..3fb9af80cbf4 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
| @@ -125,7 +125,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) | |||
| 125 | 125 | ||
| 126 | pci_set_master (dev); | 126 | pci_set_master (dev); |
| 127 | 127 | ||
| 128 | retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED); | 128 | retval = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED); |
| 129 | if (retval != 0) | 129 | if (retval != 0) |
| 130 | goto err4; | 130 | goto err4; |
| 131 | return retval; | 131 | return retval; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 13b326a13377..b04d232d4c65 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -522,9 +522,9 @@ static void hub_quiesce(struct usb_hub *hub) | |||
| 522 | /* (blocking) stop khubd and related activity */ | 522 | /* (blocking) stop khubd and related activity */ |
| 523 | usb_kill_urb(hub->urb); | 523 | usb_kill_urb(hub->urb); |
| 524 | if (hub->has_indicators) | 524 | if (hub->has_indicators) |
| 525 | cancel_delayed_work(&hub->leds); | 525 | cancel_delayed_work_sync(&hub->leds); |
| 526 | if (hub->has_indicators || hub->tt.hub) | 526 | if (hub->tt.hub) |
| 527 | flush_scheduled_work(); | 527 | cancel_work_sync(&hub->tt.kevent); |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | static void hub_activate(struct usb_hub *hub) | 530 | static void hub_activate(struct usb_hub *hub) |
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index a6adf7e0f6f8..cd62b029d176 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
| @@ -887,6 +887,7 @@ static void pullup(struct at91_udc *udc, int is_on) | |||
| 887 | 887 | ||
| 888 | if (is_on) { | 888 | if (is_on) { |
| 889 | clk_on(udc); | 889 | clk_on(udc); |
| 890 | at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_RXRSM); | ||
| 890 | at91_udp_write(udc, AT91_UDP_TXVC, 0); | 891 | at91_udp_write(udc, AT91_UDP_TXVC, 0); |
| 891 | if (cpu_is_at91rm9200()) | 892 | if (cpu_is_at91rm9200()) |
| 892 | at91_set_gpio_value(udc->board.pullup_pin, 1); | 893 | at91_set_gpio_value(udc->board.pullup_pin, 1); |
| @@ -904,6 +905,7 @@ static void pullup(struct at91_udc *udc, int is_on) | |||
| 904 | } | 905 | } |
| 905 | } else { | 906 | } else { |
| 906 | stop_activity(udc); | 907 | stop_activity(udc); |
| 908 | at91_udp_write(udc, AT91_UDP_IDR, AT91_UDP_RXRSM); | ||
| 907 | at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS); | 909 | at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS); |
| 908 | if (cpu_is_at91rm9200()) | 910 | if (cpu_is_at91rm9200()) |
| 909 | at91_set_gpio_value(udc->board.pullup_pin, 0); | 911 | at91_set_gpio_value(udc->board.pullup_pin, 0); |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index b7b7bfbce527..430821cb95c8 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
| @@ -122,7 +122,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
| 122 | temp = in_le32(hcd->regs + 0x1a8); | 122 | temp = in_le32(hcd->regs + 0x1a8); |
| 123 | out_le32(hcd->regs + 0x1a8, temp | 0x3); | 123 | out_le32(hcd->regs + 0x1a8, temp | 0x3); |
| 124 | 124 | ||
| 125 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); | 125 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
| 126 | if (retval != 0) | 126 | if (retval != 0) |
| 127 | goto err4; | 127 | goto err4; |
| 128 | return retval; | 128 | return retval; |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 704f33fdd2f1..ecfe800fd720 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
| @@ -732,24 +732,27 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) | |||
| 732 | struct ohci_regs __iomem *regs = ohci->regs; | 732 | struct ohci_regs __iomem *regs = ohci->regs; |
| 733 | int ints; | 733 | int ints; |
| 734 | 734 | ||
| 735 | /* we can eliminate a (slow) ohci_readl() | 735 | /* Read interrupt status (and flush pending writes). We ignore the |
| 736 | * if _only_ WDH caused this irq | 736 | * optimization of checking the LSB of hcca->done_head; it doesn't |
| 737 | * work on all systems (edge triggering for OHCI can be a factor). | ||
| 737 | */ | 738 | */ |
| 738 | if ((ohci->hcca->done_head != 0) | 739 | ints = ohci_readl(ohci, ®s->intrstatus); |
| 739 | && ! (hc32_to_cpup (ohci, &ohci->hcca->done_head) | ||
| 740 | & 0x01)) { | ||
| 741 | ints = OHCI_INTR_WDH; | ||
| 742 | 740 | ||
| 743 | /* cardbus/... hardware gone before remove() */ | 741 | /* Check for an all 1's result which is a typical consequence |
| 744 | } else if ((ints = ohci_readl (ohci, ®s->intrstatus)) == ~(u32)0) { | 742 | * of dead, unclocked, or unplugged (CardBus...) devices |
| 743 | */ | ||
| 744 | if (ints == ~(u32)0) { | ||
| 745 | disable (ohci); | 745 | disable (ohci); |
| 746 | ohci_dbg (ohci, "device removed!\n"); | 746 | ohci_dbg (ohci, "device removed!\n"); |
| 747 | return IRQ_HANDLED; | 747 | return IRQ_HANDLED; |
| 748 | } | ||
| 749 | |||
| 750 | /* We only care about interrupts that are enabled */ | ||
| 751 | ints &= ohci_readl(ohci, ®s->intrenable); | ||
| 748 | 752 | ||
| 749 | /* interrupt for some other device? */ | 753 | /* interrupt for some other device? */ |
| 750 | } else if ((ints &= ohci_readl (ohci, ®s->intrenable)) == 0) { | 754 | if (ints == 0) |
| 751 | return IRQ_NOTMINE; | 755 | return IRQ_NOTMINE; |
| 752 | } | ||
| 753 | 756 | ||
| 754 | if (ints & OHCI_INTR_UE) { | 757 | if (ints & OHCI_INTR_UE) { |
| 755 | // e.g. due to PCI Master/Target Abort | 758 | // e.g. due to PCI Master/Target Abort |
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 0a7426920150..0c3e6b790b7b 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
| @@ -142,7 +142,7 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 142 | 142 | ||
| 143 | ohci_hcd_init(ohci); | 143 | ohci_hcd_init(ohci); |
| 144 | 144 | ||
| 145 | rv = usb_add_hcd(hcd, irq, 0); | 145 | rv = usb_add_hcd(hcd, irq, IRQF_DISABLED); |
| 146 | if (rv == 0) | 146 | if (rv == 0) |
| 147 | return 0; | 147 | return 0; |
| 148 | 148 | ||
diff --git a/drivers/usb/host/ohci-ssb.c b/drivers/usb/host/ohci-ssb.c index fe70e72340de..6e9c2d6db887 100644 --- a/drivers/usb/host/ohci-ssb.c +++ b/drivers/usb/host/ohci-ssb.c | |||
| @@ -160,7 +160,7 @@ static int ssb_ohci_attach(struct ssb_device *dev) | |||
| 160 | hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len); | 160 | hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len); |
| 161 | if (!hcd->regs) | 161 | if (!hcd->regs) |
| 162 | goto err_put_hcd; | 162 | goto err_put_hcd; |
| 163 | err = usb_add_hcd(hcd, dev->irq, IRQF_SHARED); | 163 | err = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED); |
| 164 | if (err) | 164 | if (err) |
| 165 | goto err_iounmap; | 165 | goto err_iounmap; |
| 166 | 166 | ||
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index ae8ec4474eb8..0ce2fc5e396b 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
| @@ -2197,7 +2197,7 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
| 2197 | INIT_LIST_HEAD(&r8a66597->child_device); | 2197 | INIT_LIST_HEAD(&r8a66597->child_device); |
| 2198 | 2198 | ||
| 2199 | hcd->rsrc_start = res->start; | 2199 | hcd->rsrc_start = res->start; |
| 2200 | ret = usb_add_hcd(hcd, irq, 0); | 2200 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED); |
| 2201 | if (ret != 0) { | 2201 | if (ret != 0) { |
| 2202 | err("Failed to add hcd"); | 2202 | err("Failed to add hcd"); |
| 2203 | goto clean_up; | 2203 | goto clean_up; |
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 4db17f75f4f1..ec987897b8ed 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
| @@ -378,7 +378,6 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd) | |||
| 378 | { | 378 | { |
| 379 | struct uhci_hcd *uhci = hcd_to_uhci(hcd); | 379 | struct uhci_hcd *uhci = hcd_to_uhci(hcd); |
| 380 | unsigned short status; | 380 | unsigned short status; |
| 381 | unsigned long flags; | ||
| 382 | 381 | ||
| 383 | /* | 382 | /* |
| 384 | * Read the interrupt status, and write it back to clear the | 383 | * Read the interrupt status, and write it back to clear the |
| @@ -398,7 +397,7 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd) | |||
| 398 | dev_err(uhci_dev(uhci), "host controller process " | 397 | dev_err(uhci_dev(uhci), "host controller process " |
| 399 | "error, something bad happened!\n"); | 398 | "error, something bad happened!\n"); |
| 400 | if (status & USBSTS_HCH) { | 399 | if (status & USBSTS_HCH) { |
| 401 | spin_lock_irqsave(&uhci->lock, flags); | 400 | spin_lock(&uhci->lock); |
| 402 | if (uhci->rh_state >= UHCI_RH_RUNNING) { | 401 | if (uhci->rh_state >= UHCI_RH_RUNNING) { |
| 403 | dev_err(uhci_dev(uhci), | 402 | dev_err(uhci_dev(uhci), |
| 404 | "host controller halted, " | 403 | "host controller halted, " |
| @@ -415,16 +414,16 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd) | |||
| 415 | * pending unlinks */ | 414 | * pending unlinks */ |
| 416 | mod_timer(&hcd->rh_timer, jiffies); | 415 | mod_timer(&hcd->rh_timer, jiffies); |
| 417 | } | 416 | } |
| 418 | spin_unlock_irqrestore(&uhci->lock, flags); | 417 | spin_unlock(&uhci->lock); |
| 419 | } | 418 | } |
| 420 | } | 419 | } |
| 421 | 420 | ||
| 422 | if (status & USBSTS_RD) | 421 | if (status & USBSTS_RD) |
| 423 | usb_hcd_poll_rh_status(hcd); | 422 | usb_hcd_poll_rh_status(hcd); |
| 424 | else { | 423 | else { |
| 425 | spin_lock_irqsave(&uhci->lock, flags); | 424 | spin_lock(&uhci->lock); |
| 426 | uhci_scan_schedule(uhci); | 425 | uhci_scan_schedule(uhci); |
| 427 | spin_unlock_irqrestore(&uhci->lock, flags); | 426 | spin_unlock(&uhci->lock); |
| 428 | } | 427 | } |
| 429 | 428 | ||
| 430 | return IRQ_HANDLED; | 429 | return IRQ_HANDLED; |
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 3a83cb4c4bc2..da16b5157816 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c | |||
| @@ -71,6 +71,7 @@ static struct usb_device_id id_table [] = { | |||
| 71 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ | 71 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ |
| 72 | { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ | 72 | { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ |
| 73 | { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ | 73 | { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ |
| 74 | { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ | ||
| 74 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ | 75 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ |
| 75 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ | 76 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
| 76 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ | 77 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ |
| @@ -98,8 +99,8 @@ static struct usb_serial_driver cp2101_device = { | |||
| 98 | .usb_driver = &cp2101_driver, | 99 | .usb_driver = &cp2101_driver, |
| 99 | .id_table = id_table, | 100 | .id_table = id_table, |
| 100 | .num_interrupt_in = 0, | 101 | .num_interrupt_in = 0, |
| 101 | .num_bulk_in = 0, | 102 | .num_bulk_in = NUM_DONT_CARE, |
| 102 | .num_bulk_out = 0, | 103 | .num_bulk_out = NUM_DONT_CARE, |
| 103 | .num_ports = 1, | 104 | .num_ports = 1, |
| 104 | .open = cp2101_open, | 105 | .open = cp2101_open, |
| 105 | .close = cp2101_close, | 106 | .close = cp2101_close, |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 4590124cf888..d1185f53447b 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
| @@ -158,8 +158,8 @@ static struct usb_device_id option_ids[] = { | |||
| 158 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, | 158 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, |
| 159 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, | 159 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, |
| 160 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, | 160 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, |
| 161 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, | 161 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
| 162 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) }, | 162 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
| 163 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */ | 163 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */ |
| 164 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */ | 164 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */ |
| 165 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */ | 165 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */ |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 605ebccdcd51..e5c274044a5f 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
| @@ -100,6 +100,7 @@ static struct usb_device_id id_table [] = { | |||
| 100 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ | 100 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ |
| 101 | { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ | 101 | { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ |
| 102 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ | 102 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ |
| 103 | { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ | ||
| 103 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ | 104 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ |
| 104 | { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ | 105 | { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ |
| 105 | { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ | 106 | { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ |
| @@ -137,7 +138,6 @@ static struct usb_device_id id_table_3port [] = { | |||
| 137 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ | 138 | { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ |
| 138 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ | 139 | { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ |
| 139 | { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ | 140 | { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ |
| 140 | { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ | ||
| 141 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ | 141 | { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ |
| 142 | { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ | 142 | { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ |
| 143 | { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ | 143 | { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ |
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 836a34ae6ec6..7c9593b7b04e 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
| @@ -114,9 +114,15 @@ static int slave_configure(struct scsi_device *sdev) | |||
| 114 | * while others have trouble with more than 64K. At this time we | 114 | * while others have trouble with more than 64K. At this time we |
| 115 | * are limiting both to 32K (64 sectores). | 115 | * are limiting both to 32K (64 sectores). |
| 116 | */ | 116 | */ |
| 117 | if ((us->flags & US_FL_MAX_SECTORS_64) && | 117 | if (us->flags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) { |
| 118 | sdev->request_queue->max_sectors > 64) | 118 | unsigned int max_sectors = 64; |
| 119 | blk_queue_max_sectors(sdev->request_queue, 64); | 119 | |
| 120 | if (us->flags & US_FL_MAX_SECTORS_MIN) | ||
| 121 | max_sectors = PAGE_CACHE_SIZE >> 9; | ||
| 122 | if (sdev->request_queue->max_sectors > max_sectors) | ||
| 123 | blk_queue_max_sectors(sdev->request_queue, | ||
| 124 | max_sectors); | ||
| 125 | } | ||
| 120 | 126 | ||
| 121 | /* We can't put these settings in slave_alloc() because that gets | 127 | /* We can't put these settings in slave_alloc() because that gets |
| 122 | * called before the device type is known. Consequently these | 128 | * called before the device type is known. Consequently these |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 2c27721bd259..6d6108b3993b 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
| @@ -376,6 +376,13 @@ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100, | |||
| 376 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 376 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
| 377 | US_FL_FIX_CAPACITY), | 377 | US_FL_FIX_CAPACITY), |
| 378 | 378 | ||
| 379 | /* Reported by Doug Maxey (dwm@austin.ibm.com) */ | ||
| 380 | UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, | ||
| 381 | "IBM", | ||
| 382 | "IBM RSA2", | ||
| 383 | US_SC_DEVICE, US_PR_CB, NULL, | ||
| 384 | US_FL_MAX_SECTORS_MIN), | ||
| 385 | |||
| 379 | /* BENQ DC5330 | 386 | /* BENQ DC5330 |
| 380 | * Reported by Manuel Fombuena <mfombuena@ya.com> and | 387 | * Reported by Manuel Fombuena <mfombuena@ya.com> and |
| 381 | * Frank Copeland <fjc@thingy.apana.org.au> */ | 388 | * Frank Copeland <fjc@thingy.apana.org.au> */ |
| @@ -1258,14 +1265,6 @@ UNUSUAL_DEV( 0x0ace, 0x20ff, 0x0101, 0x0101, | |||
| 1258 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1265 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
| 1259 | US_FL_IGNORE_DEVICE ), | 1266 | US_FL_IGNORE_DEVICE ), |
| 1260 | 1267 | ||
| 1261 | /* SanDisk that has a second LUN for a driver ISO, reported by | ||
| 1262 | * Ben Collins <bcollins@ubuntu.com> */ | ||
| 1263 | UNUSUAL_DEV( 0x0781, 0x5406, 0x0000, 0xffff, | ||
| 1264 | "SanDisk", | ||
| 1265 | "U3 Cruzer Micro driver ISO", | ||
| 1266 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
| 1267 | US_FL_SINGLE_LUN ), | ||
| 1268 | |||
| 1269 | #ifdef CONFIG_USB_STORAGE_ISD200 | 1268 | #ifdef CONFIG_USB_STORAGE_ISD200 |
| 1270 | UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, | 1269 | UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, |
| 1271 | "ATI", | 1270 | "ATI", |
diff --git a/include/linux/ide.h b/include/linux/ide.h index dc75ccbcf991..9a6a41e7079f 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -1255,6 +1255,7 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
| 1255 | 1255 | ||
| 1256 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1256 | #ifdef CONFIG_BLK_DEV_IDEDMA |
| 1257 | int __ide_dma_bad_drive(ide_drive_t *); | 1257 | int __ide_dma_bad_drive(ide_drive_t *); |
| 1258 | int ide_id_dma_bug(ide_drive_t *); | ||
| 1258 | 1259 | ||
| 1259 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1260 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
| 1260 | 1261 | ||
| @@ -1264,7 +1265,6 @@ static inline u8 ide_max_dma_mode(ide_drive_t *drive) | |||
| 1264 | } | 1265 | } |
| 1265 | 1266 | ||
| 1266 | void ide_dma_off(ide_drive_t *); | 1267 | void ide_dma_off(ide_drive_t *); |
| 1267 | void ide_dma_verbose(ide_drive_t *); | ||
| 1268 | int ide_set_dma(ide_drive_t *); | 1268 | int ide_set_dma(ide_drive_t *); |
| 1269 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1269 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
| 1270 | 1270 | ||
| @@ -1287,6 +1287,7 @@ extern void ide_dma_timeout(ide_drive_t *); | |||
| 1287 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1287 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
| 1288 | 1288 | ||
| 1289 | #else | 1289 | #else |
| 1290 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | ||
| 1290 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | 1291 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } |
| 1291 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1292 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
| 1292 | static inline void ide_dma_off(ide_drive_t *drive) { ; } | 1293 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
| @@ -1333,8 +1334,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
| 1333 | hwif->hwif_data = data; | 1334 | hwif->hwif_data = data; |
| 1334 | } | 1335 | } |
| 1335 | 1336 | ||
| 1336 | /* ide-lib.c */ | 1337 | const char *ide_xfer_verbose(u8 mode); |
| 1337 | extern char *ide_xfer_verbose(u8 xfer_rate); | ||
| 1338 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1338 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
| 1339 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1339 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
| 1340 | 1340 | ||
diff --git a/include/linux/ticable.h b/include/linux/ticable.h deleted file mode 100644 index 8c2212086dcd..000000000000 --- a/include/linux/ticable.h +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | /* Hey EMACS -*- linux-c -*- | ||
| 2 | * | ||
| 3 | * tipar/tiser/tiusb - low level driver for handling link cables | ||
| 4 | * designed for Texas Instruments graphing calculators. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org> | ||
| 7 | * | ||
| 8 | * Redistribution of this file is permitted under the terms of the GNU | ||
| 9 | * Public License (GPL) | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _TICABLE_H | ||
| 13 | #define _TICABLE_H 1 | ||
| 14 | |||
| 15 | /* Internal default constants for the kernel module */ | ||
| 16 | #define TIMAXTIME 15 /* 1.5 seconds */ | ||
| 17 | #define IO_DELAY 10 /* 10 micro-seconds */ | ||
| 18 | |||
| 19 | /* Major & minor number for character devices */ | ||
| 20 | #define TIPAR_MAJOR 115 /* 0 to 7 */ | ||
| 21 | #define TIPAR_MINOR 0 | ||
| 22 | |||
| 23 | #define TISER_MAJOR 115 /* 8 to 15 */ | ||
| 24 | #define TISER_MINOR 8 | ||
| 25 | |||
| 26 | #define TIUSB_MAJOR 115 /* 16 to 31 */ | ||
| 27 | #define TIUSB_MINOR 16 | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Request values for the 'ioctl' function. | ||
| 31 | */ | ||
| 32 | #define IOCTL_TIPAR_DELAY _IOW('p', 0xa8, int) /* set delay */ | ||
| 33 | #define IOCTL_TIPAR_TIMEOUT _IOW('p', 0xa9, int) /* set timeout */ | ||
| 34 | |||
| 35 | #define IOCTL_TISER_DELAY _IOW('p', 0xa0, int) /* set delay */ | ||
| 36 | #define IOCTL_TISER_TIMEOUT _IOW('p', 0xa1, int) /* set timeout */ | ||
| 37 | |||
| 38 | #define IOCTL_TIUSB_TIMEOUT _IOW('N', 0x20, int) /* set timeout */ | ||
| 39 | #define IOCTL_TIUSB_RESET_DEVICE _IOW('N', 0x21, int) /* reset device */ | ||
| 40 | #define IOCTL_TIUSB_RESET_PIPES _IOW('N', 0x22, int) /* reset both pipes*/ | ||
| 41 | #define IOCTL_TIUSB_GET_MAXPS _IOR('N', 0x23, int) /* max packet size */ | ||
| 42 | #define IOCTL_TIUSB_GET_DEVID _IOR('N', 0x24, int) /* get device type */ | ||
| 43 | |||
| 44 | #endif /* TICABLE_H */ | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 416ee7617d9e..5fc8ff73b7bb 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -107,6 +107,7 @@ enum usb_interface_condition { | |||
| 107 | * @condition: binding state of the interface: not bound, binding | 107 | * @condition: binding state of the interface: not bound, binding |
| 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
| 109 | * @is_active: flag set when the interface is bound and not suspended. | 109 | * @is_active: flag set when the interface is bound and not suspended. |
| 110 | * @sysfs_files_created: sysfs attributes exist | ||
| 110 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
| 111 | * capability during autosuspend. | 112 | * capability during autosuspend. |
| 112 | * @dev: driver model's view of this device | 113 | * @dev: driver model's view of this device |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1b792b9286ba..a417b09b8b3d 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
| @@ -48,7 +48,10 @@ | |||
| 48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | 48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ |
| 49 | /* Don't claim device */ \ | 49 | /* Don't claim device */ \ |
| 50 | US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ | 50 | US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ |
| 51 | /* sometimes sizes is too big */ | 51 | /* sometimes sizes is too big */ \ |
| 52 | US_FLAG(MAX_SECTORS_MIN,0x00002000) \ | ||
| 53 | /* Sets max_sectors to arch min */ | ||
| 54 | |||
| 52 | 55 | ||
| 53 | #define US_FLAG(name, value) US_FL_##name = value , | 56 | #define US_FLAG(name, value) US_FL_##name = value , |
| 54 | enum { US_DO_ALL_FLAGS }; | 57 | enum { US_DO_ALL_FLAGS }; |
diff --git a/lib/kobject.c b/lib/kobject.c index b52e9f4ef371..3590f022a609 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
| @@ -234,13 +234,13 @@ int kobject_register(struct kobject * kobj) | |||
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | /** | 236 | /** |
| 237 | * kobject_set_name - Set the name of an object | 237 | * kobject_set_name - Set the name of a kobject |
| 238 | * @kobj: object. | 238 | * @kobj: kobject to name |
| 239 | * @fmt: format string used to build the name | 239 | * @fmt: format string used to build the name |
| 240 | * | 240 | * |
| 241 | * If strlen(name) >= KOBJ_NAME_LEN, then use a dynamically allocated | 241 | * This sets the name of the kobject. If you have already added the |
| 242 | * string that @kobj->k_name points to. Otherwise, use the static | 242 | * kobject to the system, you must call kobject_rename() in order to |
| 243 | * @kobj->name array. | 243 | * change the name of the kobject. |
| 244 | */ | 244 | */ |
| 245 | int kobject_set_name(struct kobject * kobj, const char * fmt, ...) | 245 | int kobject_set_name(struct kobject * kobj, const char * fmt, ...) |
| 246 | { | 246 | { |
